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,13 @@
.v-radio-group > .v-input__control {
flex-direction: column;
}
.v-radio-group > .v-input__control > .v-label {
margin-inline-start: 16px;
}
.v-radio-group > .v-input__control > .v-label + .v-selection-control-group {
padding-inline-start: 6px;
margin-top: 8px;
}
.v-radio-group .v-input__details {
padding-inline: 16px;
}

View File

@ -0,0 +1,100 @@
import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode, Fragment as _Fragment } from "vue";
// Styles
import "./VRadioGroup.css";
// Components
import { makeVInputProps, VInput } from "../VInput/VInput.mjs";
import { VLabel } from "../VLabel/index.mjs";
import { VSelectionControl } from "../VSelectionControl/index.mjs";
import { makeSelectionControlGroupProps, VSelectionControlGroup } from "../VSelectionControlGroup/VSelectionControlGroup.mjs"; // Composables
import { IconValue } from "../../composables/icons.mjs";
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
import { computed } from 'vue';
import { filterInputAttrs, genericComponent, getUid, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVRadioGroupProps = propsFactory({
height: {
type: [Number, String],
default: 'auto'
},
...makeVInputProps(),
...omit(makeSelectionControlGroupProps(), ['multiple']),
trueIcon: {
type: IconValue,
default: '$radioOn'
},
falseIcon: {
type: IconValue,
default: '$radioOff'
},
type: {
type: String,
default: 'radio'
}
}, 'VRadioGroup');
export const VRadioGroup = genericComponent()({
name: 'VRadioGroup',
inheritAttrs: false,
props: makeVRadioGroupProps(),
emits: {
'update:modelValue': value => true
},
setup(props, _ref) {
let {
attrs,
slots
} = _ref;
const uid = getUid();
const id = computed(() => props.id || `radio-group-${uid}`);
const model = useProxiedModel(props, 'modelValue');
useRender(() => {
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
const inputProps = VInput.filterProps(props);
const controlProps = VSelectionControl.filterProps(props);
const label = slots.label ? slots.label({
label: props.label,
props: {
for: id.value
}
}) : props.label;
return _createVNode(VInput, _mergeProps({
"class": ['v-radio-group', props.class],
"style": props.style
}, rootAttrs, inputProps, {
"modelValue": model.value,
"onUpdate:modelValue": $event => model.value = $event,
"id": id.value
}), {
...slots,
default: _ref2 => {
let {
id,
messagesId,
isDisabled,
isReadonly
} = _ref2;
return _createVNode(_Fragment, null, [label && _createVNode(VLabel, {
"id": id.value
}, {
default: () => [label]
}), _createVNode(VSelectionControlGroup, _mergeProps(controlProps, {
"id": id.value,
"aria-describedby": messagesId.value,
"defaultsTarget": "VRadio",
"trueIcon": props.trueIcon,
"falseIcon": props.falseIcon,
"type": props.type,
"disabled": isDisabled.value,
"readonly": isReadonly.value,
"aria-labelledby": label ? id.value : undefined,
"multiple": false
}, controlAttrs, {
"modelValue": model.value,
"onUpdate:modelValue": $event => model.value = $event
}), slots)]);
}
});
});
return {};
}
});
//# sourceMappingURL=VRadioGroup.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
@use './variables' as *
.v-radio-group
> .v-input__control
flex-direction: column
> .v-label
margin-inline-start: $radio-group-label-margin-inline-start
+ .v-selection-control-group
padding-inline-start: $radio-group-label-selection-group-padding-inline
margin-top: $radio-group-label-selection-group-margin-top
.v-input__details
padding-inline: $radio-group-details-padding-inline

View File

@ -0,0 +1,4 @@
$radio-group-details-padding-inline: 16px !default;
$radio-group-label-margin-inline-start: 16px !default;
$radio-group-label-selection-group-margin-top: 8px !default;
$radio-group-label-selection-group-padding-inline: 6px !default;

View File

@ -0,0 +1,544 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, JSXComponent, PropType, ComputedRef, Ref } from 'vue';
type SlotsToProps<U extends RawSlots, T = MakeInternalSlots<U>> = {
$children?: (VNodeChild | (T extends {
default: infer V;
} ? V : {}) | {
[K in keyof T]?: T[K];
});
'v-slots'?: {
[K in keyof T]?: T[K] | false;
};
} & {
[K in keyof T as `v-slot:${K & string}`]?: T[K] | false;
};
type RawSlots = Record<string, unknown>;
type Slot<T> = [T] extends [never] ? () => VNodeChild : (arg: T) => VNodeChild;
type VueSlot<T> = [T] extends [never] ? () => VNode[] : (arg: T) => VNode[];
type MakeInternalSlots<T extends RawSlots> = {
[K in keyof T]: Slot<T[K]>;
};
type MakeSlots<T extends RawSlots> = {
[K in keyof T]: VueSlot<T[K]>;
};
type GenericProps<Props, Slots extends Record<string, unknown>> = {
$props: Props & SlotsToProps<Slots>;
$slots: MakeSlots<Slots>;
};
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
}
declare function deepEqual(a: any, b: any): boolean;
type Density = null | 'default' | 'comfortable' | 'compact';
type ValidationResult = string | boolean;
type ValidationRule = ValidationResult | PromiseLike<ValidationResult> | ((value: any) => ValidationResult) | ((value: any) => PromiseLike<ValidationResult>);
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
declare const IconValue: PropType<IconValue>;
type VMessageSlot = {
message: string;
};
interface VInputSlot {
id: ComputedRef<string>;
messagesId: ComputedRef<string>;
isDirty: ComputedRef<boolean>;
isDisabled: ComputedRef<boolean>;
isReadonly: ComputedRef<boolean>;
isPristine: Ref<boolean>;
isValid: ComputedRef<boolean | null>;
isValidating: Ref<boolean>;
reset: () => void;
resetValidation: () => void;
validate: () => void;
}
type VInputSlots = {
default: VInputSlot;
prepend: VInputSlot;
append: VInputSlot;
details: VInputSlot;
message: VMessageSlot;
};
type VRadioGroupSlots = Omit<VInputSlots, 'default'> & {
default: never;
label: {
label: string | undefined;
props: Record<string, any>;
};
};
declare const VRadioGroup: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
type: string;
inline: boolean;
error: boolean;
height: string | number;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean | null;
readonly: boolean | null;
messages: string | readonly string[];
density: Density;
ripple: boolean;
falseIcon: IconValue;
trueIcon: IconValue;
valueComparator: typeof deepEqual;
focused: boolean;
errorMessages: string | readonly string[] | null;
maxErrors: string | number;
rules: readonly ValidationRule[];
centerAffix: boolean;
hideSpinButtons: boolean;
persistentHint: boolean;
} & {
id?: string | undefined;
name?: string | undefined;
color?: string | undefined;
label?: string | undefined;
class?: any;
theme?: string | undefined;
prependIcon?: IconValue | undefined;
appendIcon?: IconValue | undefined;
defaultsTarget?: string | undefined;
'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
validationValue?: any;
hint?: string | undefined;
hideDetails?: boolean | "auto" | undefined;
} & {}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
'update:modelValue': (value: any) => boolean;
}, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:label" | "v-slot:message" | "v-slot:details">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
type: string;
inline: boolean;
error: boolean;
height: string | number;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean | null;
readonly: boolean | null;
messages: string | readonly string[];
density: Density;
ripple: boolean;
falseIcon: IconValue;
trueIcon: IconValue;
valueComparator: typeof deepEqual;
focused: boolean;
errorMessages: string | readonly string[] | null;
maxErrors: string | number;
rules: readonly ValidationRule[];
centerAffix: boolean;
hideSpinButtons: boolean;
persistentHint: boolean;
} & {
id?: string | undefined;
name?: string | undefined;
color?: string | undefined;
label?: string | undefined;
class?: any;
theme?: string | undefined;
prependIcon?: IconValue | undefined;
appendIcon?: IconValue | undefined;
defaultsTarget?: string | undefined;
'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
validationValue?: any;
hint?: string | undefined;
hideDetails?: boolean | "auto" | undefined;
} & {}, {
type: string;
inline: boolean;
error: boolean;
height: string | number;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean | null;
readonly: boolean | null;
messages: string | readonly string[];
density: Density;
ripple: boolean;
falseIcon: IconValue;
trueIcon: IconValue;
valueComparator: typeof deepEqual;
focused: boolean;
errorMessages: string | readonly string[] | null;
maxErrors: string | number;
rules: readonly ValidationRule[];
centerAffix: boolean;
hideSpinButtons: boolean;
persistentHint: boolean;
}, true, {}, vue.SlotsType<Partial<{
message: (arg: VMessageSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
details: (arg: VInputSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
append: (arg: VInputSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
prepend: (arg: VInputSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
label: (arg: {
label: string | undefined;
props: Record<string, any>;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
type: string;
inline: boolean;
error: boolean;
height: string | number;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean | null;
readonly: boolean | null;
messages: string | readonly string[];
density: Density;
ripple: boolean;
falseIcon: IconValue;
trueIcon: IconValue;
valueComparator: typeof deepEqual;
focused: boolean;
errorMessages: string | readonly string[] | null;
maxErrors: string | number;
rules: readonly ValidationRule[];
centerAffix: boolean;
hideSpinButtons: boolean;
persistentHint: boolean;
} & {
id?: string | undefined;
name?: string | undefined;
color?: string | undefined;
label?: string | undefined;
class?: any;
theme?: string | undefined;
prependIcon?: IconValue | undefined;
appendIcon?: IconValue | undefined;
defaultsTarget?: string | undefined;
'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
validationValue?: any;
hint?: string | undefined;
hideDetails?: boolean | "auto" | undefined;
} & {}, {}, {}, {}, {}, {
type: string;
inline: boolean;
error: boolean;
height: string | number;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean | null;
readonly: boolean | null;
messages: string | readonly string[];
density: Density;
ripple: boolean;
falseIcon: IconValue;
trueIcon: IconValue;
valueComparator: typeof deepEqual;
focused: boolean;
errorMessages: string | readonly string[] | null;
maxErrors: string | number;
rules: readonly ValidationRule[];
centerAffix: boolean;
hideSpinButtons: boolean;
persistentHint: boolean;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
type: string;
inline: boolean;
error: boolean;
height: string | number;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean | null;
readonly: boolean | null;
messages: string | readonly string[];
density: Density;
ripple: boolean;
falseIcon: IconValue;
trueIcon: IconValue;
valueComparator: typeof deepEqual;
focused: boolean;
errorMessages: string | readonly string[] | null;
maxErrors: string | number;
rules: readonly ValidationRule[];
centerAffix: boolean;
hideSpinButtons: boolean;
persistentHint: boolean;
} & {
id?: string | undefined;
name?: string | undefined;
color?: string | undefined;
label?: string | undefined;
class?: any;
theme?: string | undefined;
prependIcon?: IconValue | undefined;
appendIcon?: IconValue | undefined;
defaultsTarget?: string | undefined;
'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
validateOn?: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
validationValue?: any;
hint?: string | undefined;
hideDetails?: boolean | "auto" | undefined;
} & {}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
'update:modelValue': (value: any) => boolean;
}, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:label" | "v-slot:message" | "v-slot:details">, string, {
type: string;
inline: boolean;
error: boolean;
height: string | number;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean | null;
readonly: boolean | null;
messages: string | readonly string[];
density: Density;
ripple: boolean;
falseIcon: IconValue;
trueIcon: IconValue;
valueComparator: typeof deepEqual;
focused: boolean;
errorMessages: string | readonly string[] | null;
maxErrors: string | number;
rules: readonly ValidationRule[];
centerAffix: boolean;
hideSpinButtons: boolean;
persistentHint: boolean;
}, {}, string, vue.SlotsType<Partial<{
message: (arg: VMessageSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
details: (arg: VInputSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
append: (arg: VInputSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
prepend: (arg: VInputSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
label: (arg: {
label: string | undefined;
props: Record<string, any>;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T>(props: {
modelValue?: T | null | undefined;
'onUpdate:modelValue'?: ((value: T | null) => void) | undefined;
}, slots: VRadioGroupSlots) => GenericProps<{
modelValue?: T | null | undefined;
'onUpdate:modelValue'?: ((value: T | null) => void) | undefined;
}, VRadioGroupSlots>) & FilterPropsOptions<{
trueIcon: {
type: vue.PropType<IconValue>;
default: string;
};
falseIcon: {
type: vue.PropType<IconValue>;
default: string;
};
type: {
type: StringConstructor;
default: string;
};
inline: BooleanConstructor;
error: BooleanConstructor;
id: StringConstructor;
name: StringConstructor;
color: StringConstructor;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
disabled: {
type: vue.PropType<boolean | null>;
default: null;
};
readonly: {
type: vue.PropType<boolean | null>;
default: null;
};
class: vue.PropType<any>;
theme: StringConstructor;
density: {
type: vue.PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
modelValue: null;
ripple: {
type: BooleanConstructor;
default: boolean;
};
defaultsTarget: StringConstructor;
valueComparator: {
type: vue.PropType<typeof deepEqual>;
default: typeof deepEqual;
};
focused: BooleanConstructor;
'onUpdate:focused': vue.PropType<(args_0: boolean) => void>;
errorMessages: {
type: vue.PropType<string | readonly string[] | null>;
default: () => never[];
};
maxErrors: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
label: StringConstructor;
rules: {
type: vue.PropType<readonly ValidationRule[]>;
default: () => never[];
};
validateOn: vue.PropType<"lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined>;
validationValue: null;
appendIcon: vue.PropType<IconValue>;
centerAffix: {
type: BooleanConstructor;
default: boolean;
};
prependIcon: vue.PropType<IconValue>;
hideDetails: vue.PropType<boolean | "auto">;
hideSpinButtons: BooleanConstructor;
hint: StringConstructor;
persistentHint: BooleanConstructor;
messages: {
type: vue.PropType<string | readonly string[]>;
default: () => never[];
};
direction: {
type: vue.PropType<"horizontal" | "vertical">;
default: string;
validator: (v: any) => boolean;
};
'onClick:prepend': vue.PropType<(args_0: MouseEvent) => void>;
'onClick:append': vue.PropType<(args_0: MouseEvent) => void>;
height: {
type: (StringConstructor | NumberConstructor)[];
default: string;
};
}, vue.ExtractPropTypes<{
trueIcon: {
type: vue.PropType<IconValue>;
default: string;
};
falseIcon: {
type: vue.PropType<IconValue>;
default: string;
};
type: {
type: StringConstructor;
default: string;
};
inline: BooleanConstructor;
error: BooleanConstructor;
id: StringConstructor;
name: StringConstructor;
color: StringConstructor;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
disabled: {
type: vue.PropType<boolean | null>;
default: null;
};
readonly: {
type: vue.PropType<boolean | null>;
default: null;
};
class: vue.PropType<any>;
theme: StringConstructor;
density: {
type: vue.PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
modelValue: null;
ripple: {
type: BooleanConstructor;
default: boolean;
};
defaultsTarget: StringConstructor;
valueComparator: {
type: vue.PropType<typeof deepEqual>;
default: typeof deepEqual;
};
focused: BooleanConstructor;
'onUpdate:focused': vue.PropType<(args_0: boolean) => void>;
errorMessages: {
type: vue.PropType<string | readonly string[] | null>;
default: () => never[];
};
maxErrors: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
label: StringConstructor;
rules: {
type: vue.PropType<readonly ValidationRule[]>;
default: () => never[];
};
validateOn: vue.PropType<"lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined>;
validationValue: null;
appendIcon: vue.PropType<IconValue>;
centerAffix: {
type: BooleanConstructor;
default: boolean;
};
prependIcon: vue.PropType<IconValue>;
hideDetails: vue.PropType<boolean | "auto">;
hideSpinButtons: BooleanConstructor;
hint: StringConstructor;
persistentHint: BooleanConstructor;
messages: {
type: vue.PropType<string | readonly string[]>;
default: () => never[];
};
direction: {
type: vue.PropType<"horizontal" | "vertical">;
default: string;
validator: (v: any) => boolean;
};
'onClick:prepend': vue.PropType<(args_0: MouseEvent) => void>;
'onClick:append': vue.PropType<(args_0: MouseEvent) => void>;
height: {
type: (StringConstructor | NumberConstructor)[];
default: string;
};
}>>;
type VRadioGroup = InstanceType<typeof VRadioGroup>;
export { VRadioGroup };

View File

@ -0,0 +1,2 @@
export { VRadioGroup } from "./VRadioGroup.mjs";
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.mjs","names":["VRadioGroup"],"sources":["../../../src/components/VRadioGroup/index.ts"],"sourcesContent":["export { VRadioGroup } from './VRadioGroup'\n"],"mappings":"SAASA,WAAW"}