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,56 @@
.v-bottom-navigation {
display: flex;
max-width: 100%;
overflow: hidden;
position: absolute;
transition: transform, color 0.2s, 0.2s cubic-bezier(0.4, 0, 0.2, 1);
border-color: rgba(var(--v-border-color), var(--v-border-opacity));
border-style: solid;
border-width: 0;
border-radius: 0;
background: rgb(var(--v-theme-surface));
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
}
.v-bottom-navigation--border {
border-width: thin;
box-shadow: none;
}
.v-bottom-navigation--active {
box-shadow: 0px 2px 4px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 4px 5px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 10px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
}
.v-bottom-navigation__content {
display: flex;
flex: none;
font-size: 0.75rem;
justify-content: center;
transition: inherit;
width: 100%;
}
.v-bottom-navigation .v-bottom-navigation__content > .v-btn {
font-size: inherit;
height: 100%;
max-width: 168px;
min-width: 80px;
text-transform: none;
transition: inherit;
width: auto;
border-radius: 0;
}
.v-bottom-navigation .v-bottom-navigation__content > .v-btn .v-btn__content,
.v-bottom-navigation .v-bottom-navigation__content > .v-btn .v-btn__icon {
transition: inherit;
}
.v-bottom-navigation .v-bottom-navigation__content > .v-btn .v-btn__icon {
font-size: 1.5rem;
}
.v-bottom-navigation--grow .v-bottom-navigation__content > .v-btn {
flex-grow: 1;
}
.v-bottom-navigation--shift .v-bottom-navigation__content .v-btn:not(.v-btn--selected) .v-btn__content > span {
transition: inherit;
opacity: 0;
}
.v-bottom-navigation--shift .v-bottom-navigation__content .v-btn:not(.v-btn--selected) .v-btn__content {
transform: translateY(0.5rem);
}

View File

@ -0,0 +1,130 @@
import { createVNode as _createVNode } from "vue";
// Styles
import "./VBottomNavigation.css";
// Components
import { VBtnToggleSymbol } from "../VBtnToggle/VBtnToggle.mjs"; // Composables
import { makeBorderProps, useBorder } from "../../composables/border.mjs";
import { useBackgroundColor } from "../../composables/color.mjs";
import { makeComponentProps } from "../../composables/component.mjs";
import { provideDefaults } from "../../composables/defaults.mjs";
import { makeDensityProps, useDensity } from "../../composables/density.mjs";
import { makeElevationProps, useElevation } from "../../composables/elevation.mjs";
import { makeGroupProps, useGroup } from "../../composables/group.mjs";
import { makeLayoutItemProps, useLayoutItem } from "../../composables/layout.mjs";
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
import { useSsrBoot } from "../../composables/ssrBoot.mjs";
import { makeTagProps } from "../../composables/tag.mjs";
import { makeThemeProps, useTheme } from "../../composables/theme.mjs"; // Utilities
import { computed, toRef } from 'vue';
import { convertToUnit, genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVBottomNavigationProps = propsFactory({
bgColor: String,
color: String,
grow: Boolean,
mode: {
type: String,
validator: v => !v || ['horizontal', 'shift'].includes(v)
},
height: {
type: [Number, String],
default: 56
},
active: {
type: Boolean,
default: true
},
...makeBorderProps(),
...makeComponentProps(),
...makeDensityProps(),
...makeElevationProps(),
...makeRoundedProps(),
...makeLayoutItemProps({
name: 'bottom-navigation'
}),
...makeTagProps({
tag: 'header'
}),
...makeGroupProps({
modelValue: true,
selectedClass: 'v-btn--selected'
}),
...makeThemeProps()
}, 'VBottomNavigation');
export const VBottomNavigation = genericComponent()({
name: 'VBottomNavigation',
props: makeVBottomNavigationProps(),
emits: {
'update:modelValue': value => true
},
setup(props, _ref) {
let {
slots
} = _ref;
const {
themeClasses
} = useTheme();
const {
borderClasses
} = useBorder(props);
const {
backgroundColorClasses,
backgroundColorStyles
} = useBackgroundColor(toRef(props, 'bgColor'));
const {
densityClasses
} = useDensity(props);
const {
elevationClasses
} = useElevation(props);
const {
roundedClasses
} = useRounded(props);
const {
ssrBootStyles
} = useSsrBoot();
const height = computed(() => Number(props.height) - (props.density === 'comfortable' ? 8 : 0) - (props.density === 'compact' ? 16 : 0));
const isActive = toRef(props, 'active');
const {
layoutItemStyles
} = useLayoutItem({
id: props.name,
order: computed(() => parseInt(props.order, 10)),
position: computed(() => 'bottom'),
layoutSize: computed(() => isActive.value ? height.value : 0),
elementSize: height,
active: isActive,
absolute: toRef(props, 'absolute')
});
useGroup(props, VBtnToggleSymbol);
provideDefaults({
VBtn: {
color: toRef(props, 'color'),
density: toRef(props, 'density'),
stacked: computed(() => props.mode !== 'horizontal'),
variant: 'text'
}
}, {
scoped: true
});
useRender(() => {
return _createVNode(props.tag, {
"class": ['v-bottom-navigation', {
'v-bottom-navigation--active': isActive.value,
'v-bottom-navigation--grow': props.grow,
'v-bottom-navigation--shift': props.mode === 'shift'
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class],
"style": [backgroundColorStyles.value, layoutItemStyles.value, {
height: convertToUnit(height.value),
transform: `translateY(${convertToUnit(!isActive.value ? 100 : 0, '%')})`
}, ssrBootStyles.value, props.style]
}, {
default: () => [slots.default && _createVNode("div", {
"class": "v-bottom-navigation__content"
}, [slots.default()])]
});
});
return {};
}
});
//# sourceMappingURL=VBottomNavigation.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,57 @@
@use '../../styles/tools'
@use './variables' as *
.v-bottom-navigation
display: flex
max-width: 100%
overflow: hidden
position: absolute
transition: $bottom-navigation-transition
@include tools.border($bottom-navigation-border...)
@include tools.rounded($bottom-navigation-border-radius)
@include tools.theme($bottom-navigation-theme...)
&--active
@include tools.elevation($bottom-navigation-elevation)
.v-bottom-navigation__content
display: flex
flex: none
font-size: $bottom-navigation-content-font-size
justify-content: center
transition: inherit
width: 100%
.v-bottom-navigation &
> .v-btn
font-size: inherit
height: $bottom-navigation-height
max-width: $bottom-navigation-max-width
min-width: $bottom-navigation-min-width
text-transform: $bottom-navigation-text-transform
transition: inherit
width: auto
@include tools.rounded(0)
.v-btn__content,
.v-btn__icon
transition: inherit
.v-btn__icon
font-size: $bottom-navigation-icon-font-size
.v-bottom-navigation--grow &
> .v-btn
flex-grow: 1
.v-bottom-navigation--shift &
.v-btn
&:not(.v-btn--selected)
.v-btn__content > span
transition: inherit
opacity: 0
.v-btn__content
transform: $bottom-navigation-shift-icon-transform

View File

@ -0,0 +1,42 @@
@use 'sass:map';
@use 'sass:math';
@use '../../styles/settings';
@use "../../styles/settings/variables";
@use "../../styles/tools/functions";
// VBottomNavigation
$bottom-navigation-background: rgb(var(--v-theme-surface)) !default;
$bottom-navigation-border-color: settings.$border-color-root !default;
$bottom-navigation-border-radius: 0 !default;
$bottom-navigation-border-radius: map.get(settings.$rounded, '0') !default;
$bottom-navigation-border-style: settings.$border-style-root !default;
$bottom-navigation-border-thin-width: thin !default;
$bottom-navigation-border-width: 0 !default;
$bottom-navigation-button-color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity)) !default;
$bottom-navigation-color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity)) !default;
$bottom-navigation-content-font-size: functions.map-deep-get(variables.$typography, 'caption', 'size') !default;
$bottom-navigation-elevation: 4 !default;
$bottom-navigation-flat-elevation: 0 !default;
$bottom-navigation-height: 100% !default;
$bottom-navigation-icon-font-size: 1.5rem !default;
$bottom-navigation-max-width: 168px !default;
$bottom-navigation-min-width: 80px !default;
$bottom-navigation-opacity: var(--v-medium-emphasis-opacity) !default;
$bottom-navigation-shift-content-color: rgba(var(--v-theme-on-surface), 0) !default;
$bottom-navigation-shift-icon-top: math.div($bottom-navigation-icon-font-size, 3) !default;
$bottom-navigation-shift-icon-transform: translateY($bottom-navigation-shift-icon-top) !default;
$bottom-navigation-text-transform: none !default;
$bottom-navigation-transition: transform, color .2s, .2s settings.$standard-easing !default;
// Lists
$bottom-navigation-border: (
$bottom-navigation-border-color,
$bottom-navigation-border-style,
$bottom-navigation-border-width,
$bottom-navigation-border-thin-width
) !default;
$bottom-navigation-theme: (
$bottom-navigation-background,
$bottom-navigation-color
) !default;

View File

@ -0,0 +1,348 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode } 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>>;
}
type Density = null | 'default' | 'comfortable' | 'compact';
declare const VBottomNavigation: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
absolute: boolean;
height: string | number;
active: boolean;
name: string;
order: string | number;
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
density: Density;
selectedClass: string;
grow: boolean;
} & {
max?: number | undefined;
border?: string | number | boolean | undefined;
color?: string | undefined;
class?: any;
mode?: string | undefined;
mandatory?: boolean | "force" | undefined;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | 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 & {
absolute: boolean;
height: string | number;
active: boolean;
name: string;
order: string | number;
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
density: Density;
selectedClass: string;
grow: boolean;
} & {
max?: number | undefined;
border?: string | number | boolean | undefined;
color?: string | undefined;
class?: any;
mode?: string | undefined;
mandatory?: boolean | "force" | undefined;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
} & {}, {
absolute: boolean;
height: string | number;
active: boolean;
name: string;
order: string | number;
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
rounded: string | number | boolean;
density: Density;
selectedClass: string;
grow: boolean;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
absolute: boolean;
height: string | number;
active: boolean;
name: string;
order: string | number;
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
density: Density;
selectedClass: string;
grow: boolean;
} & {
max?: number | undefined;
border?: string | number | boolean | undefined;
color?: string | undefined;
class?: any;
mode?: string | undefined;
mandatory?: boolean | "force" | undefined;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
} & {}, {}, {}, {}, {}, {
absolute: boolean;
height: string | number;
active: boolean;
name: string;
order: string | number;
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
rounded: string | number | boolean;
density: Density;
selectedClass: string;
grow: boolean;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
absolute: boolean;
height: string | number;
active: boolean;
name: string;
order: string | number;
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
density: Density;
selectedClass: string;
grow: boolean;
} & {
max?: number | undefined;
border?: string | number | boolean | undefined;
color?: string | undefined;
class?: any;
mode?: string | undefined;
mandatory?: boolean | "force" | undefined;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
} & {}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
'update:modelValue': (value: any) => boolean;
}, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "update:modelValue">, string, {
absolute: boolean;
height: string | number;
active: boolean;
name: string;
order: string | number;
style: vue.StyleValue;
disabled: boolean;
multiple: boolean;
tag: string;
rounded: string | number | boolean;
density: Density;
selectedClass: string;
grow: boolean;
}, {}, string, vue.SlotsType<Partial<{
default: () => 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: {
default: never;
}) => GenericProps<{
modelValue?: T | undefined;
'onUpdate:modelValue'?: ((value: T) => void) | undefined;
}, {
default: never;
}>) & FilterPropsOptions<{
theme: StringConstructor;
modelValue: Omit<{
type: null;
default: undefined;
}, "type" | "default"> & {
type: vue.PropType<any>;
default: any;
};
multiple: BooleanConstructor;
mandatory: vue.PropType<boolean | "force">;
max: NumberConstructor;
selectedClass: {
type: vue.PropType<string>;
default: string;
};
disabled: BooleanConstructor;
tag: Omit<{
type: StringConstructor;
default: string;
}, "type" | "default"> & {
type: vue.PropType<string>;
default: string;
};
name: Omit<{
type: StringConstructor;
}, "type" | "default"> & {
type: vue.PropType<string>;
default: string;
};
order: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
absolute: BooleanConstructor;
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
elevation: {
type: (StringConstructor | NumberConstructor)[];
validator(v: any): boolean;
};
density: {
type: vue.PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
bgColor: StringConstructor;
color: StringConstructor;
grow: BooleanConstructor;
mode: {
type: StringConstructor;
validator: (v: any) => boolean;
};
height: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
active: {
type: BooleanConstructor;
default: boolean;
};
}, vue.ExtractPropTypes<{
theme: StringConstructor;
modelValue: Omit<{
type: null;
default: undefined;
}, "type" | "default"> & {
type: vue.PropType<any>;
default: any;
};
multiple: BooleanConstructor;
mandatory: vue.PropType<boolean | "force">;
max: NumberConstructor;
selectedClass: {
type: vue.PropType<string>;
default: string;
};
disabled: BooleanConstructor;
tag: Omit<{
type: StringConstructor;
default: string;
}, "type" | "default"> & {
type: vue.PropType<string>;
default: string;
};
name: Omit<{
type: StringConstructor;
}, "type" | "default"> & {
type: vue.PropType<string>;
default: string;
};
order: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
absolute: BooleanConstructor;
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
elevation: {
type: (StringConstructor | NumberConstructor)[];
validator(v: any): boolean;
};
density: {
type: vue.PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
bgColor: StringConstructor;
color: StringConstructor;
grow: BooleanConstructor;
mode: {
type: StringConstructor;
validator: (v: any) => boolean;
};
height: {
type: (StringConstructor | NumberConstructor)[];
default: number;
};
active: {
type: BooleanConstructor;
default: boolean;
};
}>>;
type VBottomNavigation = InstanceType<typeof VBottomNavigation>;
export { VBottomNavigation };

View File

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

View File

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