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,19 @@
.v-chip-group {
display: flex;
max-width: 100%;
min-width: 0;
overflow-x: auto;
padding: 4px 0;
}
.v-chip-group .v-chip {
margin: 4px 8px 4px 0;
}
.v-chip-group .v-chip.v-chip--selected:not(.v-chip--disabled) .v-chip__overlay {
opacity: var(--v-activated-opacity);
}
.v-chip-group--column .v-slide-group__content {
white-space: normal;
flex-wrap: wrap;
max-width: 100%;
}

View File

@ -0,0 +1,82 @@
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
// Styles
import "./VChipGroup.css";
// Components
import { makeVSlideGroupProps, VSlideGroup } from "../VSlideGroup/VSlideGroup.mjs"; // Composables
import { makeComponentProps } from "../../composables/component.mjs";
import { provideDefaults } from "../../composables/defaults.mjs";
import { makeGroupProps, useGroup } from "../../composables/group.mjs";
import { makeTagProps } from "../../composables/tag.mjs";
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs";
import { makeVariantProps } from "../../composables/variant.mjs"; // Utilities
import { toRef } from 'vue';
import { deepEqual, genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const VChipGroupSymbol = Symbol.for('vuetify:v-chip-group');
export const makeVChipGroupProps = propsFactory({
column: Boolean,
filter: Boolean,
valueComparator: {
type: Function,
default: deepEqual
},
...makeVSlideGroupProps(),
...makeComponentProps(),
...makeGroupProps({
selectedClass: 'v-chip--selected'
}),
...makeTagProps(),
...makeThemeProps(),
...makeVariantProps({
variant: 'tonal'
})
}, 'VChipGroup');
export const VChipGroup = genericComponent()({
name: 'VChipGroup',
props: makeVChipGroupProps(),
emits: {
'update:modelValue': value => true
},
setup(props, _ref) {
let {
slots
} = _ref;
const {
themeClasses
} = provideTheme(props);
const {
isSelected,
select,
next,
prev,
selected
} = useGroup(props, VChipGroupSymbol);
provideDefaults({
VChip: {
color: toRef(props, 'color'),
disabled: toRef(props, 'disabled'),
filter: toRef(props, 'filter'),
variant: toRef(props, 'variant')
}
});
useRender(() => {
const slideGroupProps = VSlideGroup.filterProps(props);
return _createVNode(VSlideGroup, _mergeProps(slideGroupProps, {
"class": ['v-chip-group', {
'v-chip-group--column': props.column
}, themeClasses.value, props.class],
"style": props.style
}), {
default: () => [slots.default?.({
isSelected,
select,
next,
prev,
selected: selected.value
})]
});
});
return {};
}
});
//# sourceMappingURL=VChipGroup.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,23 @@
@use './variables' as *
// Block
.v-chip-group
display: flex
max-width: 100%
min-width: 0
overflow-x: auto
padding: $chip-group-padding
.v-chip
margin: $chip-group-margin
&.v-chip--selected:not(.v-chip--disabled)
.v-chip__overlay
opacity: $chip-group-selected-opacity
// Modifiers
.v-chip-group--column
.v-slide-group__content
white-space: normal
flex-wrap: wrap
max-width: 100%

View File

@ -0,0 +1,4 @@
// VChipGroup
$chip-group-selected-opacity: var(--v-activated-opacity) !default;
$chip-group-padding: 4px 0 !default;
$chip-group-margin: 4px 8px 4px 0 !default;

View File

@ -0,0 +1,376 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, JSXComponent, PropType, ComponentInternalInstance, Ref, ComputedRef } 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 IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
declare const IconValue: PropType<IconValue>;
interface GroupItem {
id: number;
value: Ref<unknown>;
disabled: Ref<boolean | undefined>;
}
interface GroupProvide {
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
unregister: (id: number) => void;
select: (id: number, value: boolean) => void;
selected: Ref<Readonly<number[]>>;
isSelected: (id: number) => boolean;
prev: () => void;
next: () => void;
selectedClass: Ref<string | undefined>;
items: ComputedRef<{
id: number;
value: unknown;
disabled: boolean | undefined;
}[]>;
disabled: Ref<boolean | undefined>;
getItemIndex: (value: unknown) => number;
}
declare const breakpoints: readonly ["sm", "md", "lg", "xl", "xxl"];
type Breakpoint = typeof breakpoints[number];
type DisplayBreakpoint = 'xs' | Breakpoint;
type VChipGroupSlots = {
default: {
isSelected: (id: number) => boolean;
select: (id: number, value: boolean) => void;
next: () => void;
prev: () => void;
selected: readonly number[];
};
};
declare const VChipGroup: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
symbol: any;
filter: boolean;
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
column: boolean;
selectedClass: string;
valueComparator: typeof deepEqual;
centerActive: boolean;
nextIcon: IconValue;
prevIcon: IconValue;
} & {
max?: number | undefined;
color?: string | undefined;
class?: any;
mandatory?: boolean | "force" | undefined;
theme?: string | undefined;
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
showArrows?: string | boolean | undefined;
} & {}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
'update:modelValue': (value: any) => boolean;
}, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "update:modelValue">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
symbol: any;
filter: boolean;
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
column: boolean;
selectedClass: string;
valueComparator: typeof deepEqual;
centerActive: boolean;
nextIcon: IconValue;
prevIcon: IconValue;
} & {
max?: number | undefined;
color?: string | undefined;
class?: any;
mandatory?: boolean | "force" | undefined;
theme?: string | undefined;
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
showArrows?: string | boolean | undefined;
} & {}, {
symbol: any;
filter: boolean;
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
column: boolean;
selectedClass: string;
valueComparator: typeof deepEqual;
centerActive: boolean;
nextIcon: IconValue;
prevIcon: IconValue;
}, true, {}, vue.SlotsType<Partial<{
default: (arg: {
isSelected: (id: number) => boolean;
select: (id: number, value: boolean) => void;
next: () => void;
prev: () => void;
selected: readonly number[];
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
symbol: any;
filter: boolean;
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
column: boolean;
selectedClass: string;
valueComparator: typeof deepEqual;
centerActive: boolean;
nextIcon: IconValue;
prevIcon: IconValue;
} & {
max?: number | undefined;
color?: string | undefined;
class?: any;
mandatory?: boolean | "force" | undefined;
theme?: string | undefined;
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
showArrows?: string | boolean | undefined;
} & {}, {}, {}, {}, {}, {
symbol: any;
filter: boolean;
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
column: boolean;
selectedClass: string;
valueComparator: typeof deepEqual;
centerActive: boolean;
nextIcon: IconValue;
prevIcon: IconValue;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
symbol: any;
filter: boolean;
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
column: boolean;
selectedClass: string;
valueComparator: typeof deepEqual;
centerActive: boolean;
nextIcon: IconValue;
prevIcon: IconValue;
} & {
max?: number | undefined;
color?: string | undefined;
class?: any;
mandatory?: boolean | "force" | undefined;
theme?: string | undefined;
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
showArrows?: string | boolean | undefined;
} & {}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
'update:modelValue': (value: any) => boolean;
}, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "update:modelValue">, string, {
symbol: any;
filter: boolean;
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
direction: "horizontal" | "vertical";
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
column: boolean;
selectedClass: string;
valueComparator: typeof deepEqual;
centerActive: boolean;
nextIcon: IconValue;
prevIcon: IconValue;
}, {}, string, vue.SlotsType<Partial<{
default: (arg: {
isSelected: (id: number) => boolean;
select: (id: number, value: boolean) => void;
next: () => void;
prev: () => void;
selected: readonly number[];
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T>(props: {
modelValue?: T | undefined;
'onUpdate:modelValue'?: ((value: T) => void) | undefined;
}, slots: VChipGroupSlots) => GenericProps<{
modelValue?: T | undefined;
'onUpdate:modelValue'?: ((value: T) => void) | undefined;
}, VChipGroupSlots>) & FilterPropsOptions<{
color: StringConstructor;
variant: Omit<{
type: PropType<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
default: string;
validator: (v: any) => boolean;
}, "type" | "default"> & {
type: PropType<NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">>;
default: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
};
theme: StringConstructor;
tag: {
type: StringConstructor;
default: string;
};
modelValue: {
type: null;
default: undefined;
};
multiple: BooleanConstructor;
mandatory: PropType<boolean | "force">;
max: NumberConstructor;
selectedClass: {
type: PropType<string>;
default: string;
};
disabled: BooleanConstructor;
class: PropType<any>;
style: {
type: PropType<vue.StyleValue>;
default: null;
};
mobileBreakpoint: PropType<number | DisplayBreakpoint>;
centerActive: BooleanConstructor;
direction: {
type: PropType<"horizontal" | "vertical">;
default: string;
};
symbol: {
type: null;
default: vue.InjectionKey<GroupProvide>;
};
nextIcon: {
type: PropType<IconValue>;
default: string;
};
prevIcon: {
type: PropType<IconValue>;
default: string;
};
showArrows: {
type: (StringConstructor | BooleanConstructor)[];
validator: (v: any) => boolean;
};
column: BooleanConstructor;
filter: BooleanConstructor;
valueComparator: {
type: PropType<typeof deepEqual>;
default: typeof deepEqual;
};
}, vue.ExtractPropTypes<{
color: StringConstructor;
variant: Omit<{
type: PropType<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
default: string;
validator: (v: any) => boolean;
}, "type" | "default"> & {
type: PropType<NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">>;
default: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
};
theme: StringConstructor;
tag: {
type: StringConstructor;
default: string;
};
modelValue: {
type: null;
default: undefined;
};
multiple: BooleanConstructor;
mandatory: PropType<boolean | "force">;
max: NumberConstructor;
selectedClass: {
type: PropType<string>;
default: string;
};
disabled: BooleanConstructor;
class: PropType<any>;
style: {
type: PropType<vue.StyleValue>;
default: null;
};
mobileBreakpoint: PropType<number | DisplayBreakpoint>;
centerActive: BooleanConstructor;
direction: {
type: PropType<"horizontal" | "vertical">;
default: string;
};
symbol: {
type: null;
default: vue.InjectionKey<GroupProvide>;
};
nextIcon: {
type: PropType<IconValue>;
default: string;
};
prevIcon: {
type: PropType<IconValue>;
default: string;
};
showArrows: {
type: (StringConstructor | BooleanConstructor)[];
validator: (v: any) => boolean;
};
column: BooleanConstructor;
filter: BooleanConstructor;
valueComparator: {
type: PropType<typeof deepEqual>;
default: typeof deepEqual;
};
}>>;
type VChipGroup = InstanceType<typeof VChipGroup>;
export { VChipGroup };

View File

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

View File

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