Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
120
VApp/node_modules/vuetify/lib/components/VSnackbar/VSnackbar.css
generated
vendored
Normal file
120
VApp/node_modules/vuetify/lib/components/VSnackbar/VSnackbar.css
generated
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
.v-snackbar {
|
||||
justify-content: center;
|
||||
z-index: 10000;
|
||||
margin: 8px;
|
||||
margin-inline-end: calc(8px + var(--v-scrollbar-offset));
|
||||
}
|
||||
.v-snackbar:not(.v-snackbar--centered):not(.v-snackbar--top) {
|
||||
align-items: flex-end;
|
||||
}
|
||||
.v-snackbar__wrapper {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
max-width: 672px;
|
||||
min-height: 48px;
|
||||
min-width: 344px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.v-snackbar--variant-plain, .v-snackbar--variant-outlined, .v-snackbar--variant-text, .v-snackbar--variant-tonal {
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
.v-snackbar--variant-plain {
|
||||
opacity: 0.62;
|
||||
}
|
||||
.v-snackbar--variant-plain:focus, .v-snackbar--variant-plain:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.v-snackbar--variant-plain .v-snackbar__overlay {
|
||||
display: none;
|
||||
}
|
||||
.v-snackbar--variant-elevated, .v-snackbar--variant-flat {
|
||||
background: rgb(var(--v-theme-surface-variant));
|
||||
color: rgb(var(--v-theme-on-surface-variant));
|
||||
}
|
||||
.v-snackbar--variant-elevated {
|
||||
box-shadow: 0px 3px 5px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 6px 10px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 18px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
|
||||
}
|
||||
.v-snackbar--variant-flat {
|
||||
box-shadow: 0px 0px 0px 0px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 0px 0px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 0px 0px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
|
||||
}
|
||||
.v-snackbar--variant-outlined {
|
||||
border: thin solid currentColor;
|
||||
}
|
||||
.v-snackbar--variant-text .v-snackbar__overlay {
|
||||
background: currentColor;
|
||||
}
|
||||
.v-snackbar--variant-tonal .v-snackbar__underlay {
|
||||
background: currentColor;
|
||||
opacity: var(--v-activated-opacity);
|
||||
border-radius: inherit;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.v-snackbar__content {
|
||||
flex-grow: 1;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.0178571429em;
|
||||
line-height: 1.25rem;
|
||||
margin-right: auto;
|
||||
padding: 14px 16px;
|
||||
text-align: initial;
|
||||
}
|
||||
.v-snackbar__actions {
|
||||
align-items: center;
|
||||
align-self: center;
|
||||
display: flex;
|
||||
margin-inline-end: 8px;
|
||||
}
|
||||
.v-snackbar__actions > .v-btn {
|
||||
padding: 0 8px;
|
||||
min-width: auto;
|
||||
}
|
||||
.v-snackbar__timer {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
.v-snackbar__timer .v-progress-linear {
|
||||
transition: 0.2s linear;
|
||||
}
|
||||
.v-snackbar--absolute {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
.v-snackbar--multi-line .v-snackbar__wrapper {
|
||||
min-height: 68px;
|
||||
}
|
||||
.v-snackbar--vertical .v-snackbar__wrapper {
|
||||
flex-direction: column;
|
||||
}
|
||||
.v-snackbar--vertical .v-snackbar__wrapper .v-snackbar__actions {
|
||||
align-self: flex-end;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.v-snackbar-transition-enter-active, .v-snackbar-transition-leave-active {
|
||||
transition-duration: 0.15s;
|
||||
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
||||
}
|
||||
.v-snackbar-transition-enter-active {
|
||||
transition-property: opacity, transform;
|
||||
}
|
||||
.v-snackbar-transition-enter-from {
|
||||
opacity: 0;
|
||||
transform: scale(0.8);
|
||||
}
|
||||
.v-snackbar-transition-leave-active {
|
||||
transition-property: opacity;
|
||||
}
|
||||
.v-snackbar-transition-leave-to {
|
||||
opacity: 0;
|
||||
}
|
195
VApp/node_modules/vuetify/lib/components/VSnackbar/VSnackbar.mjs
generated
vendored
Normal file
195
VApp/node_modules/vuetify/lib/components/VSnackbar/VSnackbar.mjs
generated
vendored
Normal file
@ -0,0 +1,195 @@
|
||||
import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
|
||||
// Styles
|
||||
import "./VSnackbar.css";
|
||||
|
||||
// Components
|
||||
import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs";
|
||||
import { VOverlay } from "../VOverlay/index.mjs";
|
||||
import { makeVOverlayProps } from "../VOverlay/VOverlay.mjs";
|
||||
import { VProgressLinear } from "../VProgressLinear/index.mjs"; // Composables
|
||||
import { forwardRefs } from "../../composables/forwardRefs.mjs";
|
||||
import { makeLocationProps, useLocation } from "../../composables/location.mjs";
|
||||
import { makePositionProps, usePosition } from "../../composables/position.mjs";
|
||||
import { useProxiedModel } from "../../composables/proxiedModel.mjs";
|
||||
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
|
||||
import { useScopeId } from "../../composables/scopeId.mjs";
|
||||
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs";
|
||||
import { genOverlays, makeVariantProps, useVariant } from "../../composables/variant.mjs"; // Utilities
|
||||
import { mergeProps, nextTick, onMounted, onScopeDispose, ref, shallowRef, watch } from 'vue';
|
||||
import { genericComponent, omit, propsFactory, refElement, useRender } from "../../util/index.mjs";
|
||||
function useCountdown(milliseconds) {
|
||||
const time = shallowRef(milliseconds);
|
||||
let timer = -1;
|
||||
function clear() {
|
||||
clearInterval(timer);
|
||||
}
|
||||
function reset() {
|
||||
clear();
|
||||
nextTick(() => time.value = milliseconds);
|
||||
}
|
||||
function start(el) {
|
||||
const style = el ? getComputedStyle(el) : {
|
||||
transitionDuration: 0.2
|
||||
};
|
||||
const interval = parseFloat(style.transitionDuration) * 1000 || 200;
|
||||
clear();
|
||||
if (time.value <= 0) return;
|
||||
const startTime = performance.now();
|
||||
timer = window.setInterval(() => {
|
||||
const elapsed = performance.now() - startTime + interval;
|
||||
time.value = Math.max(milliseconds - elapsed, 0);
|
||||
if (time.value <= 0) clear();
|
||||
}, interval);
|
||||
}
|
||||
onScopeDispose(clear);
|
||||
return {
|
||||
clear,
|
||||
time,
|
||||
start,
|
||||
reset
|
||||
};
|
||||
}
|
||||
export const makeVSnackbarProps = propsFactory({
|
||||
multiLine: Boolean,
|
||||
text: String,
|
||||
timer: [Boolean, String],
|
||||
timeout: {
|
||||
type: [Number, String],
|
||||
default: 5000
|
||||
},
|
||||
vertical: Boolean,
|
||||
...makeLocationProps({
|
||||
location: 'bottom'
|
||||
}),
|
||||
...makePositionProps(),
|
||||
...makeRoundedProps(),
|
||||
...makeVariantProps(),
|
||||
...makeThemeProps(),
|
||||
...omit(makeVOverlayProps({
|
||||
transition: 'v-snackbar-transition'
|
||||
}), ['persistent', 'noClickAnimation', 'scrim', 'scrollStrategy'])
|
||||
}, 'VSnackbar');
|
||||
export const VSnackbar = genericComponent()({
|
||||
name: 'VSnackbar',
|
||||
props: makeVSnackbarProps(),
|
||||
emits: {
|
||||
'update:modelValue': v => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const isActive = useProxiedModel(props, 'modelValue');
|
||||
const {
|
||||
locationStyles
|
||||
} = useLocation(props);
|
||||
const {
|
||||
positionClasses
|
||||
} = usePosition(props);
|
||||
const {
|
||||
scopeId
|
||||
} = useScopeId();
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
colorClasses,
|
||||
colorStyles,
|
||||
variantClasses
|
||||
} = useVariant(props);
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(props);
|
||||
const countdown = useCountdown(Number(props.timeout));
|
||||
const overlay = ref();
|
||||
const timerRef = ref();
|
||||
const isHovering = shallowRef(false);
|
||||
watch(isActive, startTimeout);
|
||||
watch(() => props.timeout, startTimeout);
|
||||
onMounted(() => {
|
||||
if (isActive.value) startTimeout();
|
||||
});
|
||||
let activeTimeout = -1;
|
||||
function startTimeout() {
|
||||
countdown.reset();
|
||||
window.clearTimeout(activeTimeout);
|
||||
const timeout = Number(props.timeout);
|
||||
if (!isActive.value || timeout === -1) return;
|
||||
const element = refElement(timerRef.value);
|
||||
countdown.start(element);
|
||||
activeTimeout = window.setTimeout(() => {
|
||||
isActive.value = false;
|
||||
}, timeout);
|
||||
}
|
||||
function clearTimeout() {
|
||||
countdown.reset();
|
||||
window.clearTimeout(activeTimeout);
|
||||
}
|
||||
function onPointerenter() {
|
||||
isHovering.value = true;
|
||||
clearTimeout();
|
||||
}
|
||||
function onPointerleave() {
|
||||
isHovering.value = false;
|
||||
startTimeout();
|
||||
}
|
||||
useRender(() => {
|
||||
const overlayProps = VOverlay.filterProps(props);
|
||||
const hasContent = !!(slots.default || slots.text || props.text);
|
||||
return _createVNode(VOverlay, _mergeProps({
|
||||
"ref": overlay,
|
||||
"class": ['v-snackbar', {
|
||||
'v-snackbar--active': isActive.value,
|
||||
'v-snackbar--multi-line': props.multiLine && !props.vertical,
|
||||
'v-snackbar--timer': !!props.timer,
|
||||
'v-snackbar--vertical': props.vertical
|
||||
}, positionClasses.value, props.class],
|
||||
"style": props.style
|
||||
}, overlayProps, {
|
||||
"modelValue": isActive.value,
|
||||
"onUpdate:modelValue": $event => isActive.value = $event,
|
||||
"contentProps": mergeProps({
|
||||
class: ['v-snackbar__wrapper', themeClasses.value, colorClasses.value, roundedClasses.value, variantClasses.value],
|
||||
style: [locationStyles.value, colorStyles.value],
|
||||
onPointerenter,
|
||||
onPointerleave
|
||||
}, overlayProps.contentProps),
|
||||
"persistent": true,
|
||||
"noClickAnimation": true,
|
||||
"scrim": false,
|
||||
"scrollStrategy": "none",
|
||||
"_disableGlobalStack": true
|
||||
}, scopeId), {
|
||||
default: () => [genOverlays(false, 'v-snackbar'), props.timer && !isHovering.value && _createVNode("div", {
|
||||
"key": "timer",
|
||||
"class": "v-snackbar__timer"
|
||||
}, [_createVNode(VProgressLinear, {
|
||||
"ref": timerRef,
|
||||
"color": typeof props.timer === 'string' ? props.timer : 'info',
|
||||
"max": props.timeout,
|
||||
"model-value": countdown.time.value
|
||||
}, null)]), hasContent && _createVNode("div", {
|
||||
"key": "content",
|
||||
"class": "v-snackbar__content",
|
||||
"role": "status",
|
||||
"aria-live": "polite"
|
||||
}, [slots.text?.() ?? props.text, slots.default?.()]), slots.actions && _createVNode(VDefaultsProvider, {
|
||||
"defaults": {
|
||||
VBtn: {
|
||||
variant: 'text',
|
||||
ripple: false,
|
||||
slim: true
|
||||
}
|
||||
}
|
||||
}, {
|
||||
default: () => [_createVNode("div", {
|
||||
"class": "v-snackbar__actions"
|
||||
}, [slots.actions()])]
|
||||
})],
|
||||
activator: slots.activator
|
||||
});
|
||||
});
|
||||
return forwardRefs({}, overlay);
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VSnackbar.mjs.map
|
1
VApp/node_modules/vuetify/lib/components/VSnackbar/VSnackbar.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VSnackbar/VSnackbar.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
87
VApp/node_modules/vuetify/lib/components/VSnackbar/VSnackbar.sass
generated
vendored
Normal file
87
VApp/node_modules/vuetify/lib/components/VSnackbar/VSnackbar.sass
generated
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
@use '../../styles/tools'
|
||||
@use '../../styles/settings'
|
||||
@use './variables' as *
|
||||
|
||||
.v-snackbar
|
||||
justify-content: center
|
||||
z-index: $snackbar-z-index
|
||||
margin: $snackbar-wrapper-margin
|
||||
margin-inline-end: calc(#{$snackbar-wrapper-margin} + var(--v-scrollbar-offset))
|
||||
|
||||
&:not(.v-snackbar--centered):not(.v-snackbar--top)
|
||||
align-items: flex-end
|
||||
|
||||
&__wrapper
|
||||
align-items: center
|
||||
display: flex
|
||||
max-width: $snackbar-wrapper-max-width
|
||||
min-height: $snackbar-wrapper-min-height
|
||||
min-width: $snackbar-wrapper-min-width
|
||||
overflow: hidden
|
||||
padding: $snackbar-wrapper-padding
|
||||
|
||||
@include tools.rounded($snackbar-border-radius)
|
||||
|
||||
@at-root .v-snackbar
|
||||
@include tools.variant($snackbar-variants...)
|
||||
|
||||
&__content
|
||||
flex-grow: 1
|
||||
font-size: $snackbar-font-size
|
||||
font-weight: $snackbar-font-weight
|
||||
letter-spacing: $snackbar-letter-spacing
|
||||
line-height: $snackbar-line-height
|
||||
margin-right: auto
|
||||
padding: $snackbar-content-padding
|
||||
text-align: initial
|
||||
|
||||
&__actions
|
||||
align-items: center
|
||||
align-self: center
|
||||
display: flex
|
||||
margin-inline-end: $snackbar-action-margin
|
||||
|
||||
& > .v-btn
|
||||
padding: $snackbar-btn-padding
|
||||
min-width: auto
|
||||
|
||||
&__timer
|
||||
width: 100%
|
||||
position: absolute
|
||||
top: 0
|
||||
|
||||
.v-progress-linear
|
||||
transition: .2s linear
|
||||
|
||||
&--absolute
|
||||
position: absolute
|
||||
z-index: $snackbar-absolute-z-index
|
||||
|
||||
&--multi-line &__wrapper
|
||||
min-height: $snackbar-multi-line-wrapper-min-height
|
||||
|
||||
&--vertical &__wrapper
|
||||
flex-direction: column
|
||||
|
||||
.v-snackbar__actions
|
||||
align-self: flex-end
|
||||
margin-bottom: $snackbar-vertical-action-margin-bottom
|
||||
|
||||
.v-snackbar-transition
|
||||
&-enter-active,
|
||||
&-leave-active
|
||||
transition-duration: .15s
|
||||
transition-timing-function: settings.$decelerated-easing
|
||||
|
||||
&-enter-active
|
||||
transition-property: opacity, transform
|
||||
|
||||
&-enter-from
|
||||
opacity: 0
|
||||
transform: scale($snackbar-transition-scale)
|
||||
|
||||
&-leave-active
|
||||
transition-property: opacity
|
||||
|
||||
&-leave-to
|
||||
opacity: 0
|
35
VApp/node_modules/vuetify/lib/components/VSnackbar/_variables.scss
generated
vendored
Normal file
35
VApp/node_modules/vuetify/lib/components/VSnackbar/_variables.scss
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
@use '../../styles/settings';
|
||||
@use '../../styles/tools';
|
||||
|
||||
// VSnackbar
|
||||
$snackbar-absolute-z-index: 1 !default;
|
||||
$snackbar-action-margin: 8px !default;
|
||||
$snackbar-border-radius: settings.$border-radius-root !default;
|
||||
$snackbar-plain-opacity: .62 !default;
|
||||
$snackbar-btn-padding: 0 8px !default;
|
||||
$snackbar-background: rgb(var(--v-theme-surface-variant)) !default;
|
||||
$snackbar-color: rgb(var(--v-theme-on-surface-variant)) !default;
|
||||
$snackbar-font-size: tools.map-deep-get(settings.$typography, 'body-2', 'size') !default;
|
||||
$snackbar-font-weight: tools.map-deep-get(settings.$typography, 'body-2', 'weight') !default;
|
||||
$snackbar-letter-spacing: tools.map-deep-get(settings.$typography, 'body-2', 'letter-spacing') !default;
|
||||
$snackbar-line-height: tools.map-deep-get(settings.$typography, 'body-2', 'line-height') !default;
|
||||
$snackbar-content-padding: 14px 16px !default;
|
||||
$snackbar-elevation: 6 !default;
|
||||
$snackbar-multi-line-wrapper-min-height: 68px !default;
|
||||
$snackbar-transition-scale: .8 !default;
|
||||
$snackbar-vertical-action-margin-bottom: 8px !default;
|
||||
$snackbar-wrapper-margin: 8px !default;
|
||||
$snackbar-wrapper-max-width: 672px !default;
|
||||
$snackbar-wrapper-min-height: 48px !default;
|
||||
$snackbar-wrapper-min-width: 344px !default;
|
||||
$snackbar-wrapper-padding: 0 !default;
|
||||
$snackbar-z-index: 10000 !default;
|
||||
|
||||
// List
|
||||
$snackbar-variants: (
|
||||
$snackbar-background,
|
||||
$snackbar-color,
|
||||
$snackbar-elevation,
|
||||
$snackbar-plain-opacity,
|
||||
'v-snackbar'
|
||||
) !default;
|
2054
VApp/node_modules/vuetify/lib/components/VSnackbar/index.d.mts
generated
vendored
Normal file
2054
VApp/node_modules/vuetify/lib/components/VSnackbar/index.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
VApp/node_modules/vuetify/lib/components/VSnackbar/index.mjs
generated
vendored
Normal file
2
VApp/node_modules/vuetify/lib/components/VSnackbar/index.mjs
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export { VSnackbar } from "./VSnackbar.mjs";
|
||||
//# sourceMappingURL=index.mjs.map
|
1
VApp/node_modules/vuetify/lib/components/VSnackbar/index.mjs.map
generated
vendored
Normal file
1
VApp/node_modules/vuetify/lib/components/VSnackbar/index.mjs.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["VSnackbar"],"sources":["../../../src/components/VSnackbar/index.ts"],"sourcesContent":["export { VSnackbar } from './VSnackbar'\n"],"mappings":"SAASA,SAAS"}
|
Reference in New Issue
Block a user