Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
68
VApp/node_modules/vuetify/lib/components/VTextField/VTextField.css
generated
vendored
Normal file
68
VApp/node_modules/vuetify/lib/components/VTextField/VTextField.css
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
/* region BLOCK */
|
||||
.v-text-field input {
|
||||
color: inherit;
|
||||
opacity: 0;
|
||||
flex: 1;
|
||||
transition: 0.15s opacity cubic-bezier(0.4, 0, 0.2, 1);
|
||||
min-width: 0;
|
||||
}
|
||||
.v-text-field input:focus, .v-text-field input:active {
|
||||
outline: none;
|
||||
}
|
||||
.v-text-field input:invalid {
|
||||
box-shadow: none;
|
||||
}
|
||||
.v-text-field .v-field {
|
||||
cursor: text;
|
||||
}
|
||||
.v-text-field--prefixed.v-text-field .v-field__input {
|
||||
--v-field-padding-start: 6px;
|
||||
}
|
||||
|
||||
.v-text-field--suffixed.v-text-field .v-field__input {
|
||||
--v-field-padding-end: 0;
|
||||
}
|
||||
|
||||
.v-text-field .v-input__details {
|
||||
padding-inline: 16px;
|
||||
}
|
||||
.v-input--plain-underlined.v-text-field .v-input__details {
|
||||
padding-inline: 0;
|
||||
}
|
||||
|
||||
.v-text-field .v-field--no-label input,
|
||||
.v-text-field .v-field--active input {
|
||||
opacity: 1;
|
||||
}
|
||||
.v-text-field .v-field--single-line input {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
/* endregion */
|
||||
/* region ELEMENTS */
|
||||
.v-text-field__prefix, .v-text-field__suffix {
|
||||
align-items: center;
|
||||
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
||||
cursor: default;
|
||||
display: flex;
|
||||
opacity: 0;
|
||||
transition: inherit;
|
||||
white-space: nowrap;
|
||||
min-height: max(var(--v-input-control-height, 56px), 1.5rem + var(--v-field-input-padding-top) + var(--v-field-input-padding-bottom));
|
||||
padding-top: calc(var(--v-field-padding-top, 4px) + var(--v-input-padding-top, 0));
|
||||
padding-bottom: var(--v-field-padding-bottom, 6px);
|
||||
}
|
||||
.v-field--active .v-text-field__prefix, .v-field--active .v-text-field__suffix {
|
||||
opacity: 1;
|
||||
}
|
||||
.v-field--disabled .v-text-field__prefix, .v-field--disabled .v-text-field__suffix {
|
||||
color: rgba(var(--v-theme-on-surface), var(--v-disabled-opacity));
|
||||
}
|
||||
.v-text-field__prefix {
|
||||
padding-inline-start: var(--v-field-padding-start);
|
||||
}
|
||||
.v-text-field__suffix {
|
||||
padding-inline-end: var(--v-field-padding-end);
|
||||
}
|
||||
|
||||
/* endregion */
|
212
VApp/node_modules/vuetify/lib/components/VTextField/VTextField.mjs
generated
vendored
Normal file
212
VApp/node_modules/vuetify/lib/components/VTextField/VTextField.mjs
generated
vendored
Normal file
@ -0,0 +1,212 @@
|
||||
import { Fragment as _Fragment, withDirectives as _withDirectives, createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from "vue";
|
||||
// Styles
|
||||
import "./VTextField.css";
|
||||
|
||||
// Components
|
||||
import { VCounter } from "../VCounter/VCounter.mjs";
|
||||
import { filterFieldProps, makeVFieldProps, VField } from "../VField/VField.mjs";
|
||||
import { makeVInputProps, VInput } from "../VInput/VInput.mjs"; // Composables
|
||||
import { useFocus } from "../../composables/focus.mjs";
|
||||
import { forwardRefs } from "../../composables/forwardRefs.mjs";
|
||||
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Directives
|
||||
import Intersect from "../../directives/intersect/index.mjs"; // Utilities
|
||||
import { cloneVNode, computed, nextTick, ref } from 'vue';
|
||||
import { callEvent, filterInputAttrs, genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
|
||||
const activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month'];
|
||||
export const makeVTextFieldProps = propsFactory({
|
||||
autofocus: Boolean,
|
||||
counter: [Boolean, Number, String],
|
||||
counterValue: [Number, Function],
|
||||
prefix: String,
|
||||
placeholder: String,
|
||||
persistentPlaceholder: Boolean,
|
||||
persistentCounter: Boolean,
|
||||
suffix: String,
|
||||
role: String,
|
||||
type: {
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
modelModifiers: Object,
|
||||
...makeVInputProps(),
|
||||
...makeVFieldProps()
|
||||
}, 'VTextField');
|
||||
export const VTextField = genericComponent()({
|
||||
name: 'VTextField',
|
||||
directives: {
|
||||
Intersect
|
||||
},
|
||||
inheritAttrs: false,
|
||||
props: makeVTextFieldProps(),
|
||||
emits: {
|
||||
'click:control': e => true,
|
||||
'mousedown:control': e => true,
|
||||
'update:focused': focused => true,
|
||||
'update:modelValue': val => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
emit,
|
||||
slots
|
||||
} = _ref;
|
||||
const model = useProxiedModel(props, 'modelValue');
|
||||
const {
|
||||
isFocused,
|
||||
focus,
|
||||
blur
|
||||
} = useFocus(props);
|
||||
const counterValue = computed(() => {
|
||||
return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : (model.value ?? '').toString().length;
|
||||
});
|
||||
const max = computed(() => {
|
||||
if (attrs.maxlength) return attrs.maxlength;
|
||||
if (!props.counter || typeof props.counter !== 'number' && typeof props.counter !== 'string') return undefined;
|
||||
return props.counter;
|
||||
});
|
||||
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
||||
function onIntersect(isIntersecting, entries) {
|
||||
if (!props.autofocus || !isIntersecting) return;
|
||||
entries[0].target?.focus?.();
|
||||
}
|
||||
const vInputRef = ref();
|
||||
const vFieldRef = ref();
|
||||
const inputRef = ref();
|
||||
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
|
||||
function onFocus() {
|
||||
if (inputRef.value !== document.activeElement) {
|
||||
inputRef.value?.focus();
|
||||
}
|
||||
if (!isFocused.value) focus();
|
||||
}
|
||||
function onControlMousedown(e) {
|
||||
emit('mousedown:control', e);
|
||||
if (e.target === inputRef.value) return;
|
||||
onFocus();
|
||||
e.preventDefault();
|
||||
}
|
||||
function onControlClick(e) {
|
||||
onFocus();
|
||||
emit('click:control', e);
|
||||
}
|
||||
function onClear(e) {
|
||||
e.stopPropagation();
|
||||
onFocus();
|
||||
nextTick(() => {
|
||||
model.value = null;
|
||||
callEvent(props['onClick:clear'], e);
|
||||
});
|
||||
}
|
||||
function onInput(e) {
|
||||
const el = e.target;
|
||||
model.value = el.value;
|
||||
if (props.modelModifiers?.trim && ['text', 'search', 'password', 'tel', 'url'].includes(props.type)) {
|
||||
const caretPosition = [el.selectionStart, el.selectionEnd];
|
||||
nextTick(() => {
|
||||
el.selectionStart = caretPosition[0];
|
||||
el.selectionEnd = caretPosition[1];
|
||||
});
|
||||
}
|
||||
}
|
||||
useRender(() => {
|
||||
const hasCounter = !!(slots.counter || props.counter !== false && props.counter != null);
|
||||
const hasDetails = !!(hasCounter || slots.details);
|
||||
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
||||
const {
|
||||
modelValue: _,
|
||||
...inputProps
|
||||
} = VInput.filterProps(props);
|
||||
const fieldProps = filterFieldProps(props);
|
||||
return _createVNode(VInput, _mergeProps({
|
||||
"ref": vInputRef,
|
||||
"modelValue": model.value,
|
||||
"onUpdate:modelValue": $event => model.value = $event,
|
||||
"class": ['v-text-field', {
|
||||
'v-text-field--prefixed': props.prefix,
|
||||
'v-text-field--suffixed': props.suffix,
|
||||
'v-input--plain-underlined': isPlainOrUnderlined.value
|
||||
}, props.class],
|
||||
"style": props.style
|
||||
}, rootAttrs, inputProps, {
|
||||
"centerAffix": !isPlainOrUnderlined.value,
|
||||
"focused": isFocused.value
|
||||
}), {
|
||||
...slots,
|
||||
default: _ref2 => {
|
||||
let {
|
||||
id,
|
||||
isDisabled,
|
||||
isDirty,
|
||||
isReadonly,
|
||||
isValid
|
||||
} = _ref2;
|
||||
return _createVNode(VField, _mergeProps({
|
||||
"ref": vFieldRef,
|
||||
"onMousedown": onControlMousedown,
|
||||
"onClick": onControlClick,
|
||||
"onClick:clear": onClear,
|
||||
"onClick:prependInner": props['onClick:prependInner'],
|
||||
"onClick:appendInner": props['onClick:appendInner'],
|
||||
"role": props.role
|
||||
}, fieldProps, {
|
||||
"id": id.value,
|
||||
"active": isActive.value || isDirty.value,
|
||||
"dirty": isDirty.value || props.dirty,
|
||||
"disabled": isDisabled.value,
|
||||
"focused": isFocused.value,
|
||||
"error": isValid.value === false
|
||||
}), {
|
||||
...slots,
|
||||
default: _ref3 => {
|
||||
let {
|
||||
props: {
|
||||
class: fieldClass,
|
||||
...slotProps
|
||||
}
|
||||
} = _ref3;
|
||||
const inputNode = _withDirectives(_createVNode("input", _mergeProps({
|
||||
"ref": inputRef,
|
||||
"value": model.value,
|
||||
"onInput": onInput,
|
||||
"autofocus": props.autofocus,
|
||||
"readonly": isReadonly.value,
|
||||
"disabled": isDisabled.value,
|
||||
"name": props.name,
|
||||
"placeholder": props.placeholder,
|
||||
"size": 1,
|
||||
"type": props.type,
|
||||
"onFocus": onFocus,
|
||||
"onBlur": blur
|
||||
}, slotProps, inputAttrs), null), [[_resolveDirective("intersect"), {
|
||||
handler: onIntersect
|
||||
}, null, {
|
||||
once: true
|
||||
}]]);
|
||||
return _createVNode(_Fragment, null, [props.prefix && _createVNode("span", {
|
||||
"class": "v-text-field__prefix"
|
||||
}, [_createVNode("span", {
|
||||
"class": "v-text-field__prefix__text"
|
||||
}, [props.prefix])]), slots.default ? _createVNode("div", {
|
||||
"class": fieldClass,
|
||||
"data-no-activator": ""
|
||||
}, [slots.default(), inputNode]) : cloneVNode(inputNode, {
|
||||
class: fieldClass
|
||||
}), props.suffix && _createVNode("span", {
|
||||
"class": "v-text-field__suffix"
|
||||
}, [_createVNode("span", {
|
||||
"class": "v-text-field__suffix__text"
|
||||
}, [props.suffix])])]);
|
||||
}
|
||||
});
|
||||
},
|
||||
details: hasDetails ? slotProps => _createVNode(_Fragment, null, [slots.details?.(slotProps), hasCounter && _createVNode(_Fragment, null, [_createVNode("span", null, null), _createVNode(VCounter, {
|
||||
"active": props.persistentCounter || isFocused.value,
|
||||
"value": counterValue.value,
|
||||
"max": max.value
|
||||
}, slots.counter)])]) : undefined
|
||||
});
|
||||
});
|
||||
return forwardRefs({}, vInputRef, vFieldRef, inputRef);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VTextField.mjs.map
|
1
VApp/node_modules/vuetify/lib/components/VTextField/VTextField.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VTextField/VTextField.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
74
VApp/node_modules/vuetify/lib/components/VTextField/VTextField.sass
generated
vendored
Normal file
74
VApp/node_modules/vuetify/lib/components/VTextField/VTextField.sass
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
@use 'sass:selector'
|
||||
@use '../../styles/settings'
|
||||
@use './variables' as *
|
||||
|
||||
/* region BLOCK */
|
||||
.v-text-field
|
||||
input
|
||||
color: inherit
|
||||
opacity: 0
|
||||
flex: $text-field-input-flex
|
||||
transition: $text-field-input-transition
|
||||
min-width: 0
|
||||
|
||||
&:focus,
|
||||
&:active
|
||||
outline: none
|
||||
|
||||
// Remove Firefox red outline
|
||||
&:invalid
|
||||
box-shadow: none
|
||||
|
||||
.v-field
|
||||
cursor: text
|
||||
|
||||
.v-field__input
|
||||
@at-root #{selector.append('.v-text-field--prefixed', &)}
|
||||
--v-field-padding-start: #{$text-field-input-padding-start}
|
||||
|
||||
@at-root #{selector.append('.v-text-field--suffixed', &)}
|
||||
--v-field-padding-end: #{$text-field-input-padding-end}
|
||||
|
||||
.v-input__details
|
||||
padding-inline: $text-field-details-padding-inline
|
||||
@at-root #{selector.append('.v-input--plain-underlined', &)}
|
||||
padding-inline: 0
|
||||
|
||||
.v-field--no-label,
|
||||
.v-field--active
|
||||
input
|
||||
opacity: 1
|
||||
|
||||
.v-field--single-line
|
||||
input
|
||||
transition: none
|
||||
|
||||
/* endregion */
|
||||
/* region ELEMENTS */
|
||||
.v-text-field
|
||||
&__prefix,
|
||||
&__suffix
|
||||
align-items: center
|
||||
color: $text-field-affix-color
|
||||
cursor: default
|
||||
display: flex
|
||||
opacity: 0
|
||||
transition: inherit
|
||||
white-space: nowrap
|
||||
min-height: $field-input-min-height
|
||||
padding-top: calc(var(--v-field-padding-top, 4px) + var(--v-input-padding-top, 0))
|
||||
padding-bottom: var(--v-field-padding-bottom, 6px)
|
||||
|
||||
.v-field--active &
|
||||
opacity: 1
|
||||
|
||||
.v-field--disabled &
|
||||
color: $text-field-disabled-affix-color
|
||||
|
||||
&__prefix
|
||||
padding-inline-start: var(--v-field-padding-start)
|
||||
|
||||
&__suffix
|
||||
padding-inline-end: var(--v-field-padding-end)
|
||||
|
||||
/* endregion */
|
12
VApp/node_modules/vuetify/lib/components/VTextField/_variables.scss
generated
vendored
Normal file
12
VApp/node_modules/vuetify/lib/components/VTextField/_variables.scss
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
@forward '../VField/variables';
|
||||
@use '../../styles/settings';
|
||||
|
||||
// VTextField
|
||||
$text-field-affix-color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity)) !default;
|
||||
$text-field-border-radius: settings.$border-radius-root !default;
|
||||
$text-field-details-padding-inline: 16px !default;
|
||||
$text-field-disabled-affix-color: rgba(var(--v-theme-on-surface), var(--v-disabled-opacity)) !default;
|
||||
$text-field-input-flex: 1 !default;
|
||||
$text-field-input-padding-end: 0 !default;
|
||||
$text-field-input-padding-start: 6px !default;
|
||||
$text-field-input-transition: .15s opacity settings.$standard-easing !default;
|
2388
VApp/node_modules/vuetify/lib/components/VTextField/index.d.mts
generated
vendored
Normal file
2388
VApp/node_modules/vuetify/lib/components/VTextField/index.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
VApp/node_modules/vuetify/lib/components/VTextField/index.mjs
generated
vendored
Normal file
2
VApp/node_modules/vuetify/lib/components/VTextField/index.mjs
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export { VTextField } from "./VTextField.mjs";
|
||||
//# sourceMappingURL=index.mjs.map
|
1
VApp/node_modules/vuetify/lib/components/VTextField/index.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VTextField/index.mjs.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["VTextField"],"sources":["../../../src/components/VTextField/index.ts"],"sourcesContent":["export { VTextField } from './VTextField'\n"],"mappings":"SAASA,UAAU"}
|
Reference in New Issue
Block a user