Tracking de l'application VApp (IHM du jeu)

This commit is contained in:
2025-05-11 18:04:12 +02:00
commit 89e9db9b62
17763 changed files with 3718499 additions and 0 deletions

View File

@ -0,0 +1,94 @@
// @ts-nocheck
/* eslint-disable */
// Styles
import "./VOverflowBtn.css";
// Extensions
import VSelect from "../VSelect/VSelect.mjs";
import VAutocomplete from "../VAutocomplete/index.mjs";
import VTextField from "../VTextField/VTextField.mjs"; // Components
import VBtn from "../VBtn/index.mjs"; // Utilities
import { consoleWarn } from "../../util/console.mjs";
/* @vue/component */
export default VAutocomplete.extend({
name: 'v-overflow-btn',
props: {
editable: Boolean,
segmented: Boolean
},
computed: {
classes() {
return {
...VAutocomplete.options.computed.classes.call(this),
'v-overflow-btn': true,
'v-overflow-btn--segmented': this.segmented,
'v-overflow-btn--editable': this.editable
};
},
isAnyValueAllowed() {
return this.editable || VAutocomplete.options.computed.isAnyValueAllowed.call(this);
},
isSingle() {
return true;
},
computedItems() {
return this.segmented ? this.allItems : this.filteredItems;
},
labelValue() {
return this.isFocused && !this.persistentPlaceholder || this.isLabelActive;
}
},
methods: {
genSelections() {
return this.editable ? VAutocomplete.options.methods.genSelections.call(this) : VSelect.options.methods.genSelections.call(this); // Override v-autocomplete's override
},
genCommaSelection(item, index, last) {
return this.segmented ? this.genSegmentedBtn(item) : VSelect.options.methods.genCommaSelection.call(this, item, index, last);
},
genInput() {
const input = VTextField.options.methods.genInput.call(this);
input.data = input.data || {};
input.data.domProps.value = this.editable ? this.internalSearch : '';
input.data.attrs.readonly = !this.isAnyValueAllowed;
return input;
},
genLabel() {
if (this.editable && this.isFocused) return null;
const label = VTextField.options.methods.genLabel.call(this);
if (!label) return label;
label.data = label.data || {};
// Reset previously set styles from parent
label.data.style = {};
return label;
},
genSegmentedBtn(item) {
const itemValue = this.getValue(item);
const itemObj = this.computedItems.find(i => this.getValue(i) === itemValue) || item;
if (!itemObj.text || !itemObj.callback) {
consoleWarn('When using "segmented" prop without a selection slot, items must contain both a text and callback property', this);
return null;
}
return this.$createElement(VBtn, {
props: {
text: true
},
on: {
click(e) {
e.stopPropagation();
itemObj.callback(e);
}
}
}, [itemObj.text]);
},
updateValue(val) {
if (val) {
this.initialValue = this.lazyValue;
} else if (this.initialValue !== this.lazyValue) {
this.$emit('change', this.lazyValue);
}
}
}
});
//# sourceMappingURL=VOverflowBtn.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,133 @@
@import './_variables.scss'
// Theme
+theme(v-overflow-btn) using ($material)
&#{&} > .v-input__control > .v-input__slot
border-color: map-get($material, 'dividers')
&:not(.v-input--is-focused):not(.v-input--has-state)
> .v-input__control > .v-input__slot:hover
background: map-get($material, 'cards')
&.v-overflow-btn--segmented
.v-input__append-inner
border-left: thin solid map-get($material, 'dividers')
.v-autocomplete__content.v-menu__content
box-shadow: $overflow-menu-content-box-shadow
.v-select-list
border-radius: $overflow-menu-content-select-list-border-radius
.v-overflow-btn
margin-top: $overflow-margin-top
padding-top: 0
&:not(.v-overflow-btn--editable) > .v-input__control > .v-input__slot
cursor: pointer
.v-input__slot
border-width: $overflow-input-slot-border-width
border-style: solid
&:before
display: none
.v-select__slot
height: $overflow-slot-height
&.v-input--dense
.v-select__slot
height: $overflow-dense-slot-height
input
cursor: pointer
margin-inline-start: $overflow-dense-input-margin-x
.v-select__selection--comma:first-child
margin-inline-start: $overflow-selection-comma-margin-x
.v-input__slot
transition: .3s map-get($transition, 'swing')
&::before,
&::after
display: none
.v-label
top: $overflow-label-top
margin-inline-start: $overflow-label-margin-x
.v-input__append-inner
align-items: center
align-self: auto
flex-shrink: 0
height: $overflow-append-inner-height
margin-top: 0
padding: 0 4px
width: $overflow-append-inner-width
.v-input__append-outer,
.v-input__prepend-outer
margin-bottom: $overflow-append-prepend-margin-bottom
margin-top: $overflow-append-prepend-margin-top
.v-input__control::before
// TODO: move to mixin
height: 1px
top: -1px
content: ''
left: 0
position: absolute
transition: $primary-transition
width: 100%
&.v-input--is-focused,
&.v-select--is-menu-active
.v-input__slot
border-color: transparent !important
box-shadow: $overflow-focused-active-slot-box-shadow
&.v-input--is-focused
.v-input__slot
border-radius: $overflow-focused-active-border-radius
&.v-select--is-menu-active
.v-input__slot
border-radius: $overflow-active-slot-border-radius
.v-select__selections
width: 0px
&--segmented
.v-input__slot
border-width: $overflow-segmented-input-slot-border-width
.v-select__selections
flex-wrap: nowrap
.v-btn
border-radius: 0
margin: 0
height: $overflow-segmented-selections-btn-height
width: 100%
// push past the input's padding
margin-inline-end: $overflow-segmented-selections-btn-margin-x
&__content
justify-content: start
&::before
background-color: transparent
&--editable
.v-select__slot
input
cursor: text
padding: $overflow-editable-select-slot-padding
.v-input__append-inner,
.v-input__append-inner *
cursor: pointer

View File

@ -0,0 +1,24 @@
@import '../../styles/styles.sass';
$overflow-active-slot-border-radius: $border-radius-root $border-radius-root 0 0 !default;
$overflow-append-inner-height: 48px !default;
$overflow-append-inner-width: 42px !default;
$overflow-append-prepend-margin-bottom: 12px !default;
$overflow-append-prepend-margin-top: 12px !default;
$overflow-dense-input-margin-x: 16px !default;
$overflow-dense-slot-height: 38px !default;
$overflow-focused-active-border-radius: $border-radius-root !default;
$overflow-focused-active-slot-box-shadow: 0 1px 6px 0 rgba(32,33,36,0.28) !default;
$overflow-focused-active-slot-elevation: 2 !default;
$overflow-input-slot-border-width: 2px 0 !default;
$overflow-label-margin-x: 16px !default;
$overflow-label-top: calc(50% - 10px) !default;
$overflow-margin-top: 12px !default;
$overflow-menu-content-box-shadow: 0 4px 6px 0 rgba(32,33,36,0.28) !default;
$overflow-menu-content-select-list-border-radius: 0 0 $border-radius-root $border-radius-root !default;
$overflow-segmented-input-slot-border-width: thin 0 !default;
$overflow-segmented-selections-btn-height: 48px !default;
$overflow-segmented-selections-btn-margin-x: -16px !default;
$overflow-selection-comma-margin-x: 16px !default;
$overflow-slot-height: 48px !default;
$overflow-editable-select-slot-padding: 8px 16px !default;

View File

@ -0,0 +1,4 @@
import VOverflowBtn from "./VOverflowBtn.mjs";
export { VOverflowBtn };
export default VOverflowBtn;
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.mjs","names":["VOverflowBtn"],"sources":["../../../src/components/VOverflowBtn/index.ts"],"sourcesContent":["import VOverflowBtn from './VOverflowBtn'\n\nexport { VOverflowBtn }\nexport default VOverflowBtn\n"],"mappings":"OAAOA,YAAY;AAEnB,SAASA,YAAY;AACrB,eAAeA,YAAY"}