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,210 @@
.v-alert {
display: grid;
flex: 1 1;
grid-template-areas: "prepend content append close" ". content . .";
grid-template-columns: max-content auto max-content max-content;
position: relative;
padding: 16px;
overflow: hidden;
--v-border-color: currentColor;
border-radius: 4px;
}
.v-alert--absolute {
position: absolute;
}
.v-alert--fixed {
position: fixed;
}
.v-alert--sticky {
position: sticky;
}
.v-alert--variant-plain, .v-alert--variant-outlined, .v-alert--variant-text, .v-alert--variant-tonal {
background: transparent;
color: inherit;
}
.v-alert--variant-plain {
opacity: 0.62;
}
.v-alert--variant-plain:focus, .v-alert--variant-plain:hover {
opacity: 1;
}
.v-alert--variant-plain .v-alert__overlay {
display: none;
}
.v-alert--variant-elevated, .v-alert--variant-flat {
background: rgb(var(--v-theme-surface-light));
color: rgba(var(--v-theme-on-surface-light), var(--v-high-emphasis-opacity));
}
.v-alert--variant-elevated {
box-shadow: 0px 2px 1px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 1px 1px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 3px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
}
.v-alert--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-alert--variant-outlined {
border: thin solid currentColor;
}
.v-alert--variant-text .v-alert__overlay {
background: currentColor;
}
.v-alert--variant-tonal .v-alert__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-alert--prominent {
grid-template-areas: "prepend content append close" "prepend content . .";
}
.v-alert.v-alert--border {
--v-border-opacity: 0.38;
}
.v-alert.v-alert--border.v-alert--border-start {
padding-inline-start: 24px;
}
.v-alert.v-alert--border.v-alert--border-end {
padding-inline-end: 24px;
}
.v-alert--variant-plain {
transition: 0.2s opacity cubic-bezier(0.4, 0, 0.2, 1);
}
.v-alert--density-default {
padding-bottom: 16px;
padding-top: 16px;
}
.v-alert--density-default.v-alert--border-top {
padding-top: 24px;
}
.v-alert--density-default.v-alert--border-bottom {
padding-bottom: 24px;
}
.v-alert--density-comfortable {
padding-bottom: 12px;
padding-top: 12px;
}
.v-alert--density-comfortable.v-alert--border-top {
padding-top: 20px;
}
.v-alert--density-comfortable.v-alert--border-bottom {
padding-bottom: 20px;
}
.v-alert--density-compact {
padding-bottom: 8px;
padding-top: 8px;
}
.v-alert--density-compact.v-alert--border-top {
padding-top: 16px;
}
.v-alert--density-compact.v-alert--border-bottom {
padding-bottom: 16px;
}
.v-alert__border {
border-radius: inherit;
bottom: 0;
left: 0;
opacity: var(--v-border-opacity);
position: absolute;
pointer-events: none;
right: 0;
top: 0;
width: 100%;
border-color: currentColor;
border-style: solid;
border-width: 0;
}
.v-alert__border--border {
border-width: 8px;
box-shadow: none;
}
.v-alert--border-start .v-alert__border {
border-inline-start-width: 8px;
}
.v-alert--border-end .v-alert__border {
border-inline-end-width: 8px;
}
.v-alert--border-top .v-alert__border {
border-top-width: 8px;
}
.v-alert--border-bottom .v-alert__border {
border-bottom-width: 8px;
}
.v-alert__close {
flex: 0 1 auto;
grid-area: close;
}
.v-alert__content {
align-self: center;
grid-area: content;
overflow: hidden;
}
.v-alert__append,
.v-alert__close {
align-self: flex-start;
margin-inline-start: 16px;
}
.v-alert__append {
align-self: flex-start;
grid-area: append;
}
.v-alert__append + .v-alert__close {
margin-inline-start: 16px;
}
.v-alert__prepend {
align-self: flex-start;
display: flex;
align-items: center;
grid-area: prepend;
margin-inline-end: 16px;
}
.v-alert--prominent .v-alert__prepend {
align-self: center;
}
.v-alert__underlay {
grid-area: none;
position: absolute;
}
.v-alert--border-start .v-alert__underlay {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.v-alert--border-end .v-alert__underlay {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.v-alert--border-top .v-alert__underlay {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.v-alert--border-bottom .v-alert__underlay {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.v-alert-title {
align-items: center;
align-self: center;
display: flex;
font-size: 1.25rem;
font-weight: 500;
hyphens: auto;
letter-spacing: 0.0125em;
line-height: 1.75rem;
overflow-wrap: normal;
text-transform: none;
word-break: normal;
word-wrap: break-word;
}

View File

@ -0,0 +1,205 @@
import { mergeProps as _mergeProps, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
// Styles
import "./VAlert.css";
// Components
import { VAlertTitle } from "./VAlertTitle.mjs";
import { VBtn } from "../VBtn/index.mjs";
import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs";
import { VIcon } from "../VIcon/index.mjs"; // Composables
import { useTextColor } from "../../composables/color.mjs";
import { makeComponentProps } from "../../composables/component.mjs";
import { makeDensityProps, useDensity } from "../../composables/density.mjs";
import { makeDimensionProps, useDimension } from "../../composables/dimensions.mjs";
import { makeElevationProps, useElevation } from "../../composables/elevation.mjs";
import { IconValue } from "../../composables/icons.mjs";
import { useLocale } from "../../composables/locale.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 { makeTagProps } from "../../composables/tag.mjs";
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs";
import { genOverlays, makeVariantProps, useVariant } from "../../composables/variant.mjs"; // Utilities
import { computed, toRef } from 'vue';
import { genericComponent, propsFactory } from "../../util/index.mjs"; // Types
const allowedTypes = ['success', 'info', 'warning', 'error'];
export const makeVAlertProps = propsFactory({
border: {
type: [Boolean, String],
validator: val => {
return typeof val === 'boolean' || ['top', 'end', 'bottom', 'start'].includes(val);
}
},
borderColor: String,
closable: Boolean,
closeIcon: {
type: IconValue,
default: '$close'
},
closeLabel: {
type: String,
default: '$vuetify.close'
},
icon: {
type: [Boolean, String, Function, Object],
default: null
},
modelValue: {
type: Boolean,
default: true
},
prominent: Boolean,
title: String,
text: String,
type: {
type: String,
validator: val => allowedTypes.includes(val)
},
...makeComponentProps(),
...makeDensityProps(),
...makeDimensionProps(),
...makeElevationProps(),
...makeLocationProps(),
...makePositionProps(),
...makeRoundedProps(),
...makeTagProps(),
...makeThemeProps(),
...makeVariantProps({
variant: 'flat'
})
}, 'VAlert');
export const VAlert = genericComponent()({
name: 'VAlert',
props: makeVAlertProps(),
emits: {
'click:close': e => true,
'update:modelValue': value => true
},
setup(props, _ref) {
let {
emit,
slots
} = _ref;
const isActive = useProxiedModel(props, 'modelValue');
const icon = computed(() => {
if (props.icon === false) return undefined;
if (!props.type) return props.icon;
return props.icon ?? `$${props.type}`;
});
const variantProps = computed(() => ({
color: props.color ?? props.type,
variant: props.variant
}));
const {
themeClasses
} = provideTheme(props);
const {
colorClasses,
colorStyles,
variantClasses
} = useVariant(variantProps);
const {
densityClasses
} = useDensity(props);
const {
dimensionStyles
} = useDimension(props);
const {
elevationClasses
} = useElevation(props);
const {
locationStyles
} = useLocation(props);
const {
positionClasses
} = usePosition(props);
const {
roundedClasses
} = useRounded(props);
const {
textColorClasses,
textColorStyles
} = useTextColor(toRef(props, 'borderColor'));
const {
t
} = useLocale();
const closeProps = computed(() => ({
'aria-label': t(props.closeLabel),
onClick(e) {
isActive.value = false;
emit('click:close', e);
}
}));
return () => {
const hasPrepend = !!(slots.prepend || icon.value);
const hasTitle = !!(slots.title || props.title);
const hasClose = !!(slots.close || props.closable);
return isActive.value && _createVNode(props.tag, {
"class": ['v-alert', props.border && {
'v-alert--border': !!props.border,
[`v-alert--border-${props.border === true ? 'start' : props.border}`]: true
}, {
'v-alert--prominent': props.prominent
}, themeClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, variantClasses.value, props.class],
"style": [colorStyles.value, dimensionStyles.value, locationStyles.value, props.style],
"role": "alert"
}, {
default: () => [genOverlays(false, 'v-alert'), props.border && _createVNode("div", {
"key": "border",
"class": ['v-alert__border', textColorClasses.value],
"style": textColorStyles.value
}, null), hasPrepend && _createVNode("div", {
"key": "prepend",
"class": "v-alert__prepend"
}, [!slots.prepend ? _createVNode(VIcon, {
"key": "prepend-icon",
"density": props.density,
"icon": icon.value,
"size": props.prominent ? 44 : 28
}, null) : _createVNode(VDefaultsProvider, {
"key": "prepend-defaults",
"disabled": !icon.value,
"defaults": {
VIcon: {
density: props.density,
icon: icon.value,
size: props.prominent ? 44 : 28
}
}
}, slots.prepend)]), _createVNode("div", {
"class": "v-alert__content"
}, [hasTitle && _createVNode(VAlertTitle, {
"key": "title"
}, {
default: () => [slots.title?.() ?? props.title]
}), slots.text?.() ?? props.text, slots.default?.()]), slots.append && _createVNode("div", {
"key": "append",
"class": "v-alert__append"
}, [slots.append()]), hasClose && _createVNode("div", {
"key": "close",
"class": "v-alert__close"
}, [!slots.close ? _createVNode(VBtn, _mergeProps({
"key": "close-btn",
"icon": props.closeIcon,
"size": "x-small",
"variant": "text"
}, closeProps.value), null) : _createVNode(VDefaultsProvider, {
"key": "close-defaults",
"defaults": {
VBtn: {
icon: props.closeIcon,
size: 'x-small',
variant: 'text'
}
}
}, {
default: () => [slots.close?.({
props: closeProps.value
})]
})])]
});
};
}
});
//# sourceMappingURL=VAlert.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,132 @@
@use '../../styles/tools'
@use './variables' as *
.v-alert
display: grid
flex: 1 1
grid-template-areas: "prepend content append close" ". content . ."
grid-template-columns: max-content auto max-content max-content
position: relative
padding: $alert-padding
overflow: hidden
--v-border-color: #{$alert-border-color}
@include tools.position($alert-positions)
@include tools.rounded($alert-border-radius)
@include tools.variant($alert-variants...)
&--prominent
grid-template-areas: "prepend content append close" "prepend content . ."
&.v-alert--border
--v-border-opacity: #{$alert-border-opacity}
&.v-alert--border-start
padding-inline-start: $alert-padding + $alert-border-thin-width
&.v-alert--border-end
padding-inline-end: $alert-padding + $alert-border-thin-width
&--variant-plain
transition: $alert-plain-transition
@at-root
@include tools.density('v-alert', $alert-density) using ($modifier)
padding-bottom: $alert-padding + $modifier
padding-top: $alert-padding + $modifier
&.v-alert--border-top
padding-top: $alert-padding + $alert-border-thin-width + $modifier
&.v-alert--border-bottom
padding-bottom: $alert-padding + $alert-border-thin-width + $modifier
.v-alert__border
border-radius: inherit
bottom: 0
left: 0
opacity: var(--v-border-opacity)
position: absolute
pointer-events: none
right: 0
top: 0
width: 100%
@include tools.border($alert-border...)
.v-alert--border-start &
border-inline-start-width: $alert-border-thin-width
.v-alert--border-end &
border-inline-end-width: $alert-border-thin-width
.v-alert--border-top &
border-top-width: $alert-border-thin-width
.v-alert--border-bottom &
border-bottom-width: $alert-border-thin-width
.v-alert__close
flex: 0 1 auto
grid-area: close
.v-alert__content
align-self: center
grid-area: content
overflow: hidden
.v-alert__append,
.v-alert__close
align-self: flex-start
margin-inline-start: $alert-append-margin-inline-start
.v-alert__append
align-self: flex-start
grid-area: append
+ .v-alert__close
margin-inline-start: $alert-append-close-margin-inline-start
.v-alert__prepend
align-self: flex-start
display: flex
align-items: center
grid-area: prepend
margin-inline-end: $alert-prepend-margin-inline-end
.v-alert--prominent &
align-self: center
.v-alert__underlay
grid-area: none
position: absolute
.v-alert--border-start &
border-top-left-radius: 0
border-bottom-left-radius: 0
.v-alert--border-end &
border-top-right-radius: 0
border-bottom-right-radius: 0
.v-alert--border-top &
border-top-left-radius: 0
border-top-right-radius: 0
.v-alert--border-bottom &
border-bottom-left-radius: 0
border-bottom-right-radius: 0
.v-alert-title
align-items: center
align-self: center
display: flex
font-size: $alert-title-font-size
font-weight: $alert-title-font-weight
hyphens: $alert-title-hyphens
letter-spacing: $alert-title-letter-spacing
line-height: $alert-title-line-height
overflow-wrap: $alert-title-overflow-wrap
text-transform: $alert-title-text-transform
word-break: $alert-title-word-break
word-wrap: $alert-title-word-wrap

View File

@ -0,0 +1,4 @@
// Utilities
import { createSimpleFunctional } from "../../util/index.mjs";
export const VAlertTitle = createSimpleFunctional('v-alert-title');
//# sourceMappingURL=VAlertTitle.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VAlertTitle.mjs","names":["createSimpleFunctional","VAlertTitle"],"sources":["../../../src/components/VAlert/VAlertTitle.ts"],"sourcesContent":["// Utilities\nimport { createSimpleFunctional } from '@/util'\n\nexport const VAlertTitle = createSimpleFunctional('v-alert-title')\n\nexport type VAlertTitle = InstanceType<typeof VAlertTitle>\n"],"mappings":"AAAA;AAAA,SACSA,sBAAsB;AAE/B,OAAO,MAAMC,WAAW,GAAGD,sBAAsB,CAAC,eAAe,CAAC"}

View File

@ -0,0 +1,52 @@
@use '../../styles/settings';
@use '../../styles/tools';
// VAlert
$alert-background: rgb(var(--v-theme-surface-light)) !default;
$alert-border-color: currentColor !default;
$alert-border-opacity: .38 !default;
$alert-border-radius: settings.$border-radius-root !default;
$alert-border-style: settings.$border-style-root !default;
$alert-border-thin-width: 8px !default;
$alert-border-width: 0 !default;
$alert-color: rgba(var(--v-theme-on-surface-light), var(--v-high-emphasis-opacity)) !default;
$alert-density: ('default': 0, 'comfortable': -1, 'compact': -2) !default;
$alert-elevation: 1 !default;
$alert-padding: 16px !default;
$alert-plain-opacity: .62 !default;
$alert-plain-transition: .2s opacity settings.$standard-easing !default;
$alert-positions: absolute fixed sticky !default;
$alert-prepend-margin-inline-end: 16px !default;
$alert-append-margin-inline-start: 16px !default;
$alert-append-close-margin-inline-start: 16px !default;
// VAlertTitle
$alert-title-font-size: tools.map-deep-get(settings.$typography, 'h6', 'size') !default;
$alert-title-font-weight: tools.map-deep-get(settings.$typography, 'h6', 'weight') !default;
$alert-title-hyphens: auto !default;
$alert-title-letter-spacing: tools.map-deep-get(settings.$typography, 'h6', 'letter-spacing') !default;
// $alert-title-line-height: tools.map-deep-get(settings.$typography, 'h6', 'line-height') !default;
$alert-title-line-height: 1.75rem !default;
$alert-title-overflow-wrap: normal !default;
$alert-title-text-transform: none !default;
$alert-title-word-break: normal !default;
$alert-title-word-wrap: break-word !default;
// VAlertText
$alert-text-line-height: 1.35 !default;
// Lists
$alert-border: (
$alert-border-color,
$alert-border-style,
$alert-border-width,
$alert-border-thin-width
) !default;
$alert-variants: (
$alert-background,
$alert-color,
$alert-elevation,
$alert-plain-opacity,
'v-alert'
) !default;

View File

@ -0,0 +1,632 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, JSXComponent, PropType } from 'vue';
type Density = null | 'default' | 'comfortable' | 'compact';
declare const block: readonly ["top", "bottom"];
declare const inline: readonly ["start", "end", "left", "right"];
type Tblock = typeof block[number];
type Tinline = typeof inline[number];
type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
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 IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
declare const IconValue: PropType<IconValue>;
declare const allowedTypes: readonly ["success", "info", "warning", "error"];
type ContextualType = typeof allowedTypes[number];
declare const VAlert: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
style: vue.StyleValue;
tag: string;
icon: false | IconValue;
prominent: boolean;
density: Density;
modelValue: boolean;
closable: boolean;
closeIcon: IconValue;
closeLabel: string;
} & {
type?: "error" | "success" | "warning" | "info" | undefined;
location?: Anchor | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
border?: boolean | "end" | "start" | "top" | "bottom" | undefined;
borderColor?: string | undefined;
color?: string | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
title?: string | undefined;
text?: string | undefined;
class?: any;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
prepend?: (() => vue.VNodeChild) | undefined;
title?: (() => vue.VNodeChild) | undefined;
text?: (() => vue.VNodeChild) | undefined;
append?: (() => vue.VNodeChild) | undefined;
close?: ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
prepend?: false | (() => vue.VNodeChild) | undefined;
title?: false | (() => vue.VNodeChild) | undefined;
text?: false | (() => vue.VNodeChild) | undefined;
append?: false | (() => vue.VNodeChild) | undefined;
close?: false | ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:title"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:text"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:close"?: false | ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
"onClick:close"?: ((e: MouseEvent) => any) | undefined;
}, () => false | JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
'click:close': (e: MouseEvent) => true;
'update:modelValue': (value: boolean) => true;
}, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
style: vue.StyleValue;
tag: string;
icon: false | IconValue;
prominent: boolean;
density: Density;
modelValue: boolean;
closable: boolean;
closeIcon: IconValue;
closeLabel: string;
} & {
type?: "error" | "success" | "warning" | "info" | undefined;
location?: Anchor | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
border?: boolean | "end" | "start" | "top" | "bottom" | undefined;
borderColor?: string | undefined;
color?: string | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
title?: string | undefined;
text?: string | undefined;
class?: any;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
prepend?: (() => vue.VNodeChild) | undefined;
title?: (() => vue.VNodeChild) | undefined;
text?: (() => vue.VNodeChild) | undefined;
append?: (() => vue.VNodeChild) | undefined;
close?: ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
prepend?: false | (() => vue.VNodeChild) | undefined;
title?: false | (() => vue.VNodeChild) | undefined;
text?: false | (() => vue.VNodeChild) | undefined;
append?: false | (() => vue.VNodeChild) | undefined;
close?: false | ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:title"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:text"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:close"?: false | ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
"onClick:close"?: ((e: MouseEvent) => any) | undefined;
}, {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
style: vue.StyleValue;
tag: string;
icon: false | IconValue;
rounded: string | number | boolean;
prominent: boolean;
density: Density;
modelValue: boolean;
closable: boolean;
closeIcon: IconValue;
closeLabel: string;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
prepend: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
title: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
text: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
append: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
close: (arg: {
props: Record<string, any>;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
style: vue.StyleValue;
tag: string;
icon: false | IconValue;
prominent: boolean;
density: Density;
modelValue: boolean;
closable: boolean;
closeIcon: IconValue;
closeLabel: string;
} & {
type?: "error" | "success" | "warning" | "info" | undefined;
location?: Anchor | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
border?: boolean | "end" | "start" | "top" | "bottom" | undefined;
borderColor?: string | undefined;
color?: string | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
title?: string | undefined;
text?: string | undefined;
class?: any;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
prepend?: (() => vue.VNodeChild) | undefined;
title?: (() => vue.VNodeChild) | undefined;
text?: (() => vue.VNodeChild) | undefined;
append?: (() => vue.VNodeChild) | undefined;
close?: ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
prepend?: false | (() => vue.VNodeChild) | undefined;
title?: false | (() => vue.VNodeChild) | undefined;
text?: false | (() => vue.VNodeChild) | undefined;
append?: false | (() => vue.VNodeChild) | undefined;
close?: false | ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:title"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:text"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:close"?: false | ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
"onClick:close"?: ((e: MouseEvent) => any) | undefined;
}, () => false | JSX.Element, {}, {}, {}, {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
style: vue.StyleValue;
tag: string;
icon: false | IconValue;
rounded: string | number | boolean;
prominent: boolean;
density: Density;
modelValue: boolean;
closable: boolean;
closeIcon: IconValue;
closeLabel: string;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
style: vue.StyleValue;
tag: string;
icon: false | IconValue;
prominent: boolean;
density: Density;
modelValue: boolean;
closable: boolean;
closeIcon: IconValue;
closeLabel: string;
} & {
type?: "error" | "success" | "warning" | "info" | undefined;
location?: Anchor | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
border?: boolean | "end" | "start" | "top" | "bottom" | undefined;
borderColor?: string | undefined;
color?: string | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
title?: string | undefined;
text?: string | undefined;
class?: any;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
prepend?: (() => vue.VNodeChild) | undefined;
title?: (() => vue.VNodeChild) | undefined;
text?: (() => vue.VNodeChild) | undefined;
append?: (() => vue.VNodeChild) | undefined;
close?: ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
prepend?: false | (() => vue.VNodeChild) | undefined;
title?: false | (() => vue.VNodeChild) | undefined;
text?: false | (() => vue.VNodeChild) | undefined;
append?: false | (() => vue.VNodeChild) | undefined;
close?: false | ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:title"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:text"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:close"?: false | ((arg: {
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
"onClick:close"?: ((e: MouseEvent) => any) | undefined;
}, () => false | JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
'click:close': (e: MouseEvent) => true;
'update:modelValue': (value: boolean) => true;
}, string, {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
style: vue.StyleValue;
tag: string;
icon: false | IconValue;
rounded: string | number | boolean;
prominent: boolean;
density: Density;
modelValue: boolean;
closable: boolean;
closeIcon: IconValue;
closeLabel: string;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
prepend: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
title: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
text: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
append: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
close: (arg: {
props: Record<string, any>;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & 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;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
position: {
type: PropType<"fixed" | "absolute" | "static" | "sticky" | "relative">;
validator: (v: any) => boolean;
};
location: PropType<Anchor>;
elevation: {
type: (StringConstructor | NumberConstructor)[];
validator(v: any): boolean;
};
height: (StringConstructor | NumberConstructor)[];
maxHeight: (StringConstructor | NumberConstructor)[];
maxWidth: (StringConstructor | NumberConstructor)[];
minHeight: (StringConstructor | NumberConstructor)[];
minWidth: (StringConstructor | NumberConstructor)[];
width: (StringConstructor | NumberConstructor)[];
density: {
type: PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: PropType<any>;
style: {
type: PropType<vue.StyleValue>;
default: null;
};
border: {
type: PropType<boolean | "end" | "start" | "top" | "bottom">;
validator: (val: boolean | string) => boolean;
};
borderColor: StringConstructor;
closable: BooleanConstructor;
closeIcon: {
type: PropType<IconValue>;
default: string;
};
closeLabel: {
type: StringConstructor;
default: string;
};
icon: {
type: PropType<false | IconValue>;
default: null;
};
modelValue: {
type: BooleanConstructor;
default: boolean;
};
prominent: BooleanConstructor;
title: StringConstructor;
text: StringConstructor;
type: {
type: PropType<"error" | "success" | "warning" | "info">;
validator: (val: ContextualType) => boolean;
};
}, 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;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
position: {
type: PropType<"fixed" | "absolute" | "static" | "sticky" | "relative">;
validator: (v: any) => boolean;
};
location: PropType<Anchor>;
elevation: {
type: (StringConstructor | NumberConstructor)[];
validator(v: any): boolean;
};
height: (StringConstructor | NumberConstructor)[];
maxHeight: (StringConstructor | NumberConstructor)[];
maxWidth: (StringConstructor | NumberConstructor)[];
minHeight: (StringConstructor | NumberConstructor)[];
minWidth: (StringConstructor | NumberConstructor)[];
width: (StringConstructor | NumberConstructor)[];
density: {
type: PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: PropType<any>;
style: {
type: PropType<vue.StyleValue>;
default: null;
};
border: {
type: PropType<boolean | "end" | "start" | "top" | "bottom">;
validator: (val: boolean | string) => boolean;
};
borderColor: StringConstructor;
closable: BooleanConstructor;
closeIcon: {
type: PropType<IconValue>;
default: string;
};
closeLabel: {
type: StringConstructor;
default: string;
};
icon: {
type: PropType<false | IconValue>;
default: null;
};
modelValue: {
type: BooleanConstructor;
default: boolean;
};
prominent: BooleanConstructor;
title: StringConstructor;
text: StringConstructor;
type: {
type: PropType<"error" | "success" | "warning" | "info">;
validator: (val: ContextualType) => boolean;
};
}>>;
type VAlert = InstanceType<typeof VAlert>;
declare const VAlertTitle: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
style: vue.StyleValue;
tag: string;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
style: vue.StyleValue;
tag: string;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
style: vue.StyleValue;
tag: string;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
style: vue.StyleValue;
tag: string;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>, {}, {}, {}, {
style: vue.StyleValue;
tag: string;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
style: vue.StyleValue;
tag: string;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
style: vue.StyleValue;
tag: string;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
tag: {
type: StringConstructor;
default: string;
};
}, vue.ExtractPropTypes<{
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
tag: {
type: StringConstructor;
default: string;
};
}>>;
type VAlertTitle = InstanceType<typeof VAlertTitle>;
export { VAlert, VAlertTitle };

View File

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

View File

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

16
VApp/node_modules/vuetify/lib/components/VApp/VApp.css generated vendored Normal file
View File

@ -0,0 +1,16 @@
.v-application {
display: flex;
background: rgb(var(--v-theme-background));
color: rgba(var(--v-theme-on-background), var(--v-high-emphasis-opacity));
}
.v-application__wrap {
backface-visibility: hidden;
display: flex;
flex-direction: column;
flex: 1 1 auto;
max-width: 100%;
min-height: 100vh;
min-height: 100dvh;
position: relative;
}

49
VApp/node_modules/vuetify/lib/components/VApp/VApp.mjs generated vendored Normal file
View File

@ -0,0 +1,49 @@
import { createVNode as _createVNode } from "vue";
// Styles
import "./VApp.css";
// Composables
import { makeComponentProps } from "../../composables/component.mjs";
import { createLayout, makeLayoutProps } from "../../composables/layout.mjs";
import { useRtl } from "../../composables/locale.mjs";
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs"; // Utilities
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
export const makeVAppProps = propsFactory({
...makeComponentProps(),
...makeLayoutProps({
fullHeight: true
}),
...makeThemeProps()
}, 'VApp');
export const VApp = genericComponent()({
name: 'VApp',
props: makeVAppProps(),
setup(props, _ref) {
let {
slots
} = _ref;
const theme = provideTheme(props);
const {
layoutClasses,
getLayoutItem,
items,
layoutRef
} = createLayout(props);
const {
rtlClasses
} = useRtl();
useRender(() => _createVNode("div", {
"ref": layoutRef,
"class": ['v-application', theme.themeClasses.value, layoutClasses.value, rtlClasses.value, props.class],
"style": [props.style]
}, [_createVNode("div", {
"class": "v-application__wrap"
}, [slots.default?.()])]));
return {
getLayoutItem,
items,
theme
};
}
});
//# sourceMappingURL=VApp.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VApp.mjs","names":["makeComponentProps","createLayout","makeLayoutProps","useRtl","makeThemeProps","provideTheme","genericComponent","propsFactory","useRender","makeVAppProps","fullHeight","VApp","name","props","setup","_ref","slots","theme","layoutClasses","getLayoutItem","items","layoutRef","rtlClasses","_createVNode","themeClasses","value","class","style","default"],"sources":["../../../src/components/VApp/VApp.tsx"],"sourcesContent":["// Styles\nimport './VApp.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { createLayout, makeLayoutProps } from '@/composables/layout'\nimport { useRtl } from '@/composables/locale'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVAppProps = propsFactory({\n ...makeComponentProps(),\n ...makeLayoutProps({ fullHeight: true }),\n ...makeThemeProps(),\n}, 'VApp')\n\nexport const VApp = genericComponent()({\n name: 'VApp',\n\n props: makeVAppProps(),\n\n setup (props, { slots }) {\n const theme = provideTheme(props)\n const { layoutClasses, getLayoutItem, items, layoutRef } = createLayout(props)\n const { rtlClasses } = useRtl()\n\n useRender(() => (\n <div\n ref={ layoutRef }\n class={[\n 'v-application',\n theme.themeClasses.value,\n layoutClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n props.style,\n ]}\n >\n <div class=\"v-application__wrap\">\n { slots.default?.() }\n </div>\n </div>\n ))\n\n return {\n getLayoutItem,\n items,\n theme,\n }\n },\n})\n\nexport type VApp = InstanceType<typeof VApp>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,YAAY,EAAEC,eAAe;AAAA,SAC7BC,MAAM;AAAA,SACNC,cAAc,EAAEC,YAAY,uCAErC;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAElD,OAAO,MAAMC,aAAa,GAAGF,YAAY,CAAC;EACxC,GAAGP,kBAAkB,CAAC,CAAC;EACvB,GAAGE,eAAe,CAAC;IAAEQ,UAAU,EAAE;EAAK,CAAC,CAAC;EACxC,GAAGN,cAAc,CAAC;AACpB,CAAC,EAAE,MAAM,CAAC;AAEV,OAAO,MAAMO,IAAI,GAAGL,gBAAgB,CAAC,CAAC,CAAC;EACrCM,IAAI,EAAE,MAAM;EAEZC,KAAK,EAAEJ,aAAa,CAAC,CAAC;EAEtBK,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,MAAME,KAAK,GAAGZ,YAAY,CAACQ,KAAK,CAAC;IACjC,MAAM;MAAEK,aAAa;MAAEC,aAAa;MAAEC,KAAK;MAAEC;IAAU,CAAC,GAAGpB,YAAY,CAACY,KAAK,CAAC;IAC9E,MAAM;MAAES;IAAW,CAAC,GAAGnB,MAAM,CAAC,CAAC;IAE/BK,SAAS,CAAC,MAAAe,YAAA;MAAA,OAEAF,SAAS;MAAA,SACR,CACL,eAAe,EACfJ,KAAK,CAACO,YAAY,CAACC,KAAK,EACxBP,aAAa,CAACO,KAAK,EACnBH,UAAU,CAACG,KAAK,EAChBZ,KAAK,CAACa,KAAK,CACZ;MAAA,SACM,CACLb,KAAK,CAACc,KAAK;IACZ,IAAAJ,YAAA;MAAA;IAAA,IAGGP,KAAK,CAACY,OAAO,GAAG,CAAC,IAGxB,CAAC;IAEF,OAAO;MACLT,aAAa;MACbC,KAAK;MACLH;IACF,CAAC;EACH;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,16 @@
@use './variables' as *
.v-application
display: flex
background: $application-background
color: $application-color
.v-application__wrap
backface-visibility: hidden
display: flex
flex-direction: column
flex: 1 1 auto
max-width: 100%
min-height: 100vh
min-height: 100dvh
position: relative

View File

@ -0,0 +1,6 @@
@use '../../styles/settings';
@use '../../styles/tools';
// VApp
$application-background: rgb(var(--v-theme-background)) !default;
$application-color: rgba(var(--v-theme-on-background), var(--v-high-emphasis-opacity)) !default;

View File

@ -0,0 +1,230 @@
import * as vue from 'vue';
import { Ref, DeepReadonly, ComponentPropsOptions, ExtractPropTypes } from 'vue';
interface InternalThemeDefinition {
dark: boolean;
colors: Colors;
variables: Record<string, string | number>;
}
interface Colors extends BaseColors, OnColors {
[key: string]: string;
}
interface BaseColors {
background: string;
surface: string;
primary: string;
secondary: string;
success: string;
warning: string;
error: string;
info: string;
}
interface OnColors {
'on-background': string;
'on-surface': string;
'on-primary': string;
'on-secondary': string;
'on-success': string;
'on-warning': string;
'on-error': string;
'on-info': string;
}
interface ThemeInstance {
readonly isDisabled: boolean;
readonly themes: Ref<Record<string, InternalThemeDefinition>>;
readonly name: Readonly<Ref<string>>;
readonly current: DeepReadonly<Ref<InternalThemeDefinition>>;
readonly computedThemes: DeepReadonly<Ref<Record<string, InternalThemeDefinition>>>;
readonly themeClasses: Readonly<Ref<string | undefined>>;
readonly styles: Readonly<Ref<string>>;
readonly global: {
readonly name: Ref<string>;
readonly current: DeepReadonly<Ref<InternalThemeDefinition>>;
};
}
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 const VApp: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
style: vue.StyleValue;
fullHeight: boolean;
} & {
class?: any;
theme?: string | undefined;
overlaps?: string[] | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
getLayoutItem: (id: string) => {
size: number;
position: "left" | "top" | "bottom" | "right";
top: number;
bottom: number;
left: number;
right: number;
id: string;
} | undefined;
items: vue.ComputedRef<{
size: number;
position: "left" | "top" | "bottom" | "right";
top: number;
bottom: number;
left: number;
right: number;
id: string;
}[]>;
theme: ThemeInstance;
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
style: vue.StyleValue;
fullHeight: boolean;
} & {
class?: any;
theme?: string | undefined;
overlaps?: string[] | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
style: vue.StyleValue;
fullHeight: boolean;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
style: vue.StyleValue;
fullHeight: boolean;
} & {
class?: any;
theme?: string | undefined;
overlaps?: string[] | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
getLayoutItem: (id: string) => {
size: number;
position: "left" | "top" | "bottom" | "right";
top: number;
bottom: number;
left: number;
right: number;
id: string;
} | undefined;
items: vue.ComputedRef<{
size: number;
position: "left" | "top" | "bottom" | "right";
top: number;
bottom: number;
left: number;
right: number;
id: string;
}[]>;
theme: ThemeInstance;
}, {}, {}, {}, {
style: vue.StyleValue;
fullHeight: boolean;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
style: vue.StyleValue;
fullHeight: boolean;
} & {
class?: any;
theme?: string | undefined;
overlaps?: string[] | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
getLayoutItem: (id: string) => {
size: number;
position: "left" | "top" | "bottom" | "right";
top: number;
bottom: number;
left: number;
right: number;
id: string;
} | undefined;
items: vue.ComputedRef<{
size: number;
position: "left" | "top" | "bottom" | "right";
top: number;
bottom: number;
left: number;
right: number;
id: string;
}[]>;
theme: ThemeInstance;
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
style: vue.StyleValue;
fullHeight: boolean;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
theme: StringConstructor;
overlaps: vue.Prop<string[]>;
fullHeight: {
type: vue.PropType<boolean>;
default: boolean;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
}, vue.ExtractPropTypes<{
theme: StringConstructor;
overlaps: vue.Prop<string[]>;
fullHeight: {
type: vue.PropType<boolean>;
default: boolean;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
}>>;
type VApp = InstanceType<typeof VApp>;
export { VApp };

View File

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

View File

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

View File

@ -0,0 +1,13 @@
.v-app-bar {
display: flex;
}
.v-app-bar.v-toolbar {
background: rgb(var(--v-theme-surface));
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
}
.v-app-bar.v-toolbar:not(.v-toolbar--flat) {
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-app-bar:not(.v-toolbar--absolute) {
padding-inline-end: var(--v-scrollbar-offset);
}

View File

@ -0,0 +1,130 @@
import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from "vue";
// Styles
import "./VAppBar.css";
// Components
import { makeVToolbarProps, VToolbar } from "../VToolbar/VToolbar.mjs"; // Composables
import { makeLayoutItemProps, useLayoutItem } from "../../composables/layout.mjs";
import { useProxiedModel } from "../../composables/proxiedModel.mjs";
import { makeScrollProps, useScroll } from "../../composables/scroll.mjs";
import { useSsrBoot } from "../../composables/ssrBoot.mjs";
import { useToggleScope } from "../../composables/toggleScope.mjs"; // Utilities
import { computed, ref, shallowRef, toRef, watchEffect } from 'vue';
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVAppBarProps = propsFactory({
scrollBehavior: String,
modelValue: {
type: Boolean,
default: true
},
location: {
type: String,
default: 'top',
validator: value => ['top', 'bottom'].includes(value)
},
...makeVToolbarProps(),
...makeLayoutItemProps(),
...makeScrollProps(),
height: {
type: [Number, String],
default: 64
}
}, 'VAppBar');
export const VAppBar = genericComponent()({
name: 'VAppBar',
props: makeVAppBarProps(),
emits: {
'update:modelValue': value => true
},
setup(props, _ref) {
let {
slots
} = _ref;
const vToolbarRef = ref();
const isActive = useProxiedModel(props, 'modelValue');
const scrollBehavior = computed(() => {
const behavior = new Set(props.scrollBehavior?.split(' ') ?? []);
return {
hide: behavior.has('hide'),
// fullyHide: behavior.has('fully-hide'),
inverted: behavior.has('inverted'),
collapse: behavior.has('collapse'),
elevate: behavior.has('elevate'),
fadeImage: behavior.has('fade-image')
// shrink: behavior.has('shrink'),
};
});
const canScroll = computed(() => {
const behavior = scrollBehavior.value;
return behavior.hide ||
// behavior.fullyHide ||
behavior.inverted || behavior.collapse || behavior.elevate || behavior.fadeImage ||
// behavior.shrink ||
!isActive.value;
});
const {
currentScroll,
scrollThreshold,
isScrollingUp,
scrollRatio
} = useScroll(props, {
canScroll
});
const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));
const isFlat = computed(() => props.flat || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));
const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);
const height = computed(() => {
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
const height = vToolbarRef.value?.contentHeight ?? 0;
const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
return height + extensionHeight;
});
useToggleScope(computed(() => !!props.scrollBehavior), () => {
watchEffect(() => {
if (scrollBehavior.value.hide) {
if (scrollBehavior.value.inverted) {
isActive.value = currentScroll.value > scrollThreshold.value;
} else {
isActive.value = isScrollingUp.value || currentScroll.value < scrollThreshold.value;
}
} else {
isActive.value = true;
}
});
});
const {
ssrBootStyles
} = useSsrBoot();
const {
layoutItemStyles
} = useLayoutItem({
id: props.name,
order: computed(() => parseInt(props.order, 10)),
position: toRef(props, 'location'),
layoutSize: height,
elementSize: shallowRef(undefined),
active: isActive,
absolute: toRef(props, 'absolute')
});
useRender(() => {
const toolbarProps = VToolbar.filterProps(props);
return _createVNode(VToolbar, _mergeProps({
"ref": vToolbarRef,
"class": ['v-app-bar', {
'v-app-bar--bottom': props.location === 'bottom'
}, props.class],
"style": [{
...layoutItemStyles.value,
'--v-toolbar-image-opacity': opacity.value,
height: undefined,
...ssrBootStyles.value
}, props.style]
}, toolbarProps, {
"collapse": isCollapsed.value,
"flat": isFlat.value
}), slots);
});
return {};
}
});
//# sourceMappingURL=VAppBar.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
@use '../../styles/tools'
@use './variables' as *
.v-app-bar
display: flex
&.v-toolbar
@include tools.theme($app-bar-theme...)
&:not(.v-toolbar--flat)
@include tools.elevation($app-bar-elevation)
&:not(.v-toolbar--absolute)
padding-inline-end: var(--v-scrollbar-offset)

View File

@ -0,0 +1,24 @@
import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from "vue";
// Components
import { makeVBtnProps, VBtn } from "../VBtn/VBtn.mjs"; // Utilities
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVAppBarNavIconProps = propsFactory({
...makeVBtnProps({
icon: '$menu',
variant: 'text'
})
}, 'VAppBarNavIcon');
export const VAppBarNavIcon = genericComponent()({
name: 'VAppBarNavIcon',
props: makeVAppBarNavIconProps(),
setup(props, _ref) {
let {
slots
} = _ref;
useRender(() => _createVNode(VBtn, _mergeProps(props, {
"class": ['v-app-bar-nav-icon']
}), slots));
return {};
}
});
//# sourceMappingURL=VAppBarNavIcon.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VAppBarNavIcon.mjs","names":["makeVBtnProps","VBtn","genericComponent","propsFactory","useRender","makeVAppBarNavIconProps","icon","variant","VAppBarNavIcon","name","props","setup","_ref","slots","_createVNode","_mergeProps"],"sources":["../../../src/components/VAppBar/VAppBarNavIcon.tsx"],"sourcesContent":["// Components\nimport { makeVBtnProps, VBtn } from '@/components/VBtn/VBtn'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VBtnSlots } from '@/components/VBtn/VBtn'\n\nexport const makeVAppBarNavIconProps = propsFactory({\n ...makeVBtnProps({\n icon: '$menu',\n variant: 'text' as const,\n }),\n}, 'VAppBarNavIcon')\n\nexport const VAppBarNavIcon = genericComponent<VBtnSlots>()({\n name: 'VAppBarNavIcon',\n\n props: makeVAppBarNavIconProps(),\n\n setup (props, { slots }) {\n useRender(() => (\n <VBtn\n { ...props }\n class={[\n 'v-app-bar-nav-icon',\n ]}\n v-slots={ slots }\n />\n ))\n\n return {}\n },\n})\n\nexport type VAppBarNavIcon = InstanceType<typeof VAppBarNavIcon>\n"],"mappings":";AAAA;AAAA,SACSA,aAAa,EAAEC,IAAI,4BAE5B;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAGA,OAAO,MAAMC,uBAAuB,GAAGF,YAAY,CAAC;EAClD,GAAGH,aAAa,CAAC;IACfM,IAAI,EAAE,OAAO;IACbC,OAAO,EAAE;EACX,CAAC;AACH,CAAC,EAAE,gBAAgB,CAAC;AAEpB,OAAO,MAAMC,cAAc,GAAGN,gBAAgB,CAAY,CAAC,CAAC;EAC1DO,IAAI,EAAE,gBAAgB;EAEtBC,KAAK,EAAEL,uBAAuB,CAAC,CAAC;EAEhCM,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrBR,SAAS,CAAC,MAAAU,YAAA,CAAAb,IAAA,EAAAc,WAAA,CAEDL,KAAK;MAAA,SACH,CACL,oBAAoB;IACrB,IACSG,KAAK,CAElB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,18 @@
import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from "vue";
// Components
import { makeVToolbarTitleProps, VToolbarTitle } from "../VToolbar/VToolbarTitle.mjs"; // Utilities
import { genericComponent, useRender } from "../../util/index.mjs"; // Types
export const VAppBarTitle = genericComponent()({
name: 'VAppBarTitle',
props: makeVToolbarTitleProps(),
setup(props, _ref) {
let {
slots
} = _ref;
useRender(() => _createVNode(VToolbarTitle, _mergeProps(props, {
"class": "v-app-bar-title"
}), slots));
return {};
}
});
//# sourceMappingURL=VAppBarTitle.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VAppBarTitle.mjs","names":["makeVToolbarTitleProps","VToolbarTitle","genericComponent","useRender","VAppBarTitle","name","props","setup","_ref","slots","_createVNode","_mergeProps"],"sources":["../../../src/components/VAppBar/VAppBarTitle.tsx"],"sourcesContent":["// Components\nimport { makeVToolbarTitleProps, VToolbarTitle } from '@/components/VToolbar/VToolbarTitle'\n\n// Utilities\nimport { genericComponent, useRender } from '@/util'\n\n// Types\nimport type { VToolbarTitleSlots } from '@/components/VToolbar/VToolbarTitle'\n\nexport const VAppBarTitle = genericComponent<VToolbarTitleSlots>()({\n name: 'VAppBarTitle',\n\n props: makeVToolbarTitleProps(),\n\n setup (props, { slots }) {\n useRender(() => (\n <VToolbarTitle\n { ...props }\n class=\"v-app-bar-title\"\n v-slots={ slots }\n />\n ))\n\n return {}\n },\n})\n\nexport type VAppBarTitle = InstanceType<typeof VAppBarTitle>\n"],"mappings":";AAAA;AAAA,SACSA,sBAAsB,EAAEC,aAAa,yCAE9C;AAAA,SACSC,gBAAgB,EAAEC,SAAS,gCAEpC;AAGA,OAAO,MAAMC,YAAY,GAAGF,gBAAgB,CAAqB,CAAC,CAAC;EACjEG,IAAI,EAAE,cAAc;EAEpBC,KAAK,EAAEN,sBAAsB,CAAC,CAAC;EAE/BO,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrBL,SAAS,CAAC,MAAAO,YAAA,CAAAT,aAAA,EAAAU,WAAA,CAEDL,KAAK;MAAA;IAAA,IAEAG,KAAK,CAElB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,44 @@
@use "sass:map";
@use "../../styles/settings/variables";
@use "../../styles/tools/functions";
// VAppBar
$app-bar-background: rgb(var(--v-theme-surface)) !default;
$app-bar-border-color: variables.$border-color-root !default;
$app-bar-border-radius: map.get(variables.$rounded, '0') !default;
$app-bar-border-style: variables.$border-style-root !default;
$app-bar-border-thin-width: 0 0 thin !default;
$app-bar-border-width: 0 !default;
$app-bar-collapsed-border-radius: 24px !default;
$app-bar-collapsed-max-width: 112px !default;
$app-bar-color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity)) !default;
$app-bar-density-comfortable-padding: 4px !default;
$app-bar-density-compact-padding: 0 !default;
$app-bar-density-default-padding: 8px !default;
$app-bar-elevation: 4 !default;
$app-bar-flat-elevation: 0 !default;
$app-bar-image-height: inherit !default;
$app-bar-image-object-fit: cover !default;
$app-bar-image-width: inherit !default;
$app-bar-padding-end: 4px !default;
$app-bar-padding-start: 4px !default;
$app-bar-prominent-height: 128px !default;
$app-bar-rounded-border-radius: variables.$border-radius-root !default;
$app-bar-scrolled-title-padding-bottom: 9px !default;
$app-bar-shaped-border-radius: map.get(variables.$rounded, 'xl') $app-bar-border-radius !default;
$app-bar-title-font-size: functions.map-deep-get(variables.$typography, 'h5', 'size') !default;
$app-bar-title-padding: 6px 20px !default;
$app-bar-transition: .2s variables.$standard-easing !default;
// Lists
$app-bar-border: (
$app-bar-border-color,
$app-bar-border-style,
$app-bar-border-width,
$app-bar-border-thin-width
) !default;
$app-bar-theme: (
$app-bar-background,
$app-bar-color
) !default;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
export { VAppBar } from "./VAppBar.mjs";
export { VAppBarNavIcon } from "./VAppBarNavIcon.mjs";
export { VAppBarTitle } from "./VAppBarTitle.mjs";
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.mjs","names":["VAppBar","VAppBarNavIcon","VAppBarTitle"],"sources":["../../../src/components/VAppBar/index.ts"],"sourcesContent":["export { VAppBar } from './VAppBar'\nexport { VAppBarNavIcon } from './VAppBarNavIcon'\nexport { VAppBarTitle } from './VAppBarTitle'\n"],"mappings":"SAASA,OAAO;AAAA,SACPC,cAAc;AAAA,SACdC,YAAY"}

View File

@ -0,0 +1,82 @@
.v-autocomplete .v-field .v-text-field__prefix,
.v-autocomplete .v-field .v-text-field__suffix,
.v-autocomplete .v-field .v-field__input, .v-autocomplete .v-field.v-field {
cursor: text;
}
.v-autocomplete .v-field .v-field__input > input {
flex: 1 1;
}
.v-autocomplete .v-field input {
min-width: 64px;
}
.v-autocomplete .v-field:not(.v-field--focused) input {
min-width: 0;
}
.v-autocomplete .v-field--dirty .v-autocomplete__selection {
margin-inline-end: 2px;
}
.v-autocomplete .v-autocomplete__selection-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.v-autocomplete__content {
overflow: hidden;
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));
border-radius: 4px;
}
.v-autocomplete__mask {
background: rgb(var(--v-theme-surface-light));
}
.v-autocomplete__selection {
display: inline-flex;
align-items: center;
height: 1.5rem;
letter-spacing: inherit;
line-height: inherit;
max-width: calc(100% - 2px - 2px);
}
.v-autocomplete__selection:first-child {
margin-inline-start: 0;
}
.v-autocomplete--chips.v-input--density-compact .v-field--variant-solo .v-label.v-field-label--floating,
.v-autocomplete--chips.v-input--density-compact .v-field--variant-solo-inverted .v-label.v-field-label--floating,
.v-autocomplete--chips.v-input--density-compact .v-field--variant-filled .v-label.v-field-label--floating,
.v-autocomplete--chips.v-input--density-compact .v-field--variant-solo-filled .v-label.v-field-label--floating {
top: 0px;
}
.v-autocomplete--selecting-index .v-autocomplete__selection {
opacity: var(--v-medium-emphasis-opacity);
}
.v-autocomplete--selecting-index .v-autocomplete__selection--selected {
opacity: 1;
}
.v-autocomplete--selecting-index .v-field__input > input {
caret-color: transparent;
}
.v-autocomplete--single.v-text-field .v-field--focused input {
flex: 1 1;
position: absolute;
left: 0;
right: 0;
width: 100%;
padding-inline: inherit;
}
.v-autocomplete--single .v-field--active input {
transition: none;
}
.v-autocomplete--single .v-field--dirty:not(.v-field--focused) input {
opacity: 0;
}
.v-autocomplete--single .v-field--focused .v-autocomplete__selection {
opacity: 0;
}
.v-autocomplete__menu-icon {
margin-inline-start: 4px;
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.v-autocomplete--active-menu .v-autocomplete__menu-icon {
opacity: var(--v-high-emphasis-opacity);
transform: rotate(180deg);
}

View File

@ -0,0 +1,473 @@
import { createTextVNode as _createTextVNode, mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment } from "vue";
// Styles
import "./VAutocomplete.css";
// Components
import { VAvatar } from "../VAvatar/index.mjs";
import { VCheckboxBtn } from "../VCheckbox/index.mjs";
import { VChip } from "../VChip/index.mjs";
import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs";
import { VIcon } from "../VIcon/index.mjs";
import { VList, VListItem } from "../VList/index.mjs";
import { VMenu } from "../VMenu/index.mjs";
import { makeSelectProps } from "../VSelect/VSelect.mjs";
import { makeVTextFieldProps, VTextField } from "../VTextField/VTextField.mjs";
import { VVirtualScroll } from "../VVirtualScroll/index.mjs"; // Composables
import { useScrolling } from "../VSelect/useScrolling.mjs";
import { useTextColor } from "../../composables/color.mjs";
import { makeFilterProps, useFilter } from "../../composables/filter.mjs";
import { useForm } from "../../composables/form.mjs";
import { forwardRefs } from "../../composables/forwardRefs.mjs";
import { useItems } from "../../composables/list-items.mjs";
import { useLocale } from "../../composables/locale.mjs";
import { useProxiedModel } from "../../composables/proxiedModel.mjs";
import { makeTransitionProps } from "../../composables/transition.mjs"; // Utilities
import { computed, mergeProps, nextTick, ref, shallowRef, watch } from 'vue';
import { ensureValidVNode, genericComponent, IN_BROWSER, matchesSelector, noop, omit, propsFactory, useRender, wrapInArray } from "../../util/index.mjs"; // Types
function highlightResult(text, matches, length) {
if (matches == null) return text;
if (Array.isArray(matches)) throw new Error('Multiple matches is not implemented');
return typeof matches === 'number' && ~matches ? _createVNode(_Fragment, null, [_createVNode("span", {
"class": "v-autocomplete__unmask"
}, [text.substr(0, matches)]), _createVNode("span", {
"class": "v-autocomplete__mask"
}, [text.substr(matches, length)]), _createVNode("span", {
"class": "v-autocomplete__unmask"
}, [text.substr(matches + length)])]) : text;
}
export const makeVAutocompleteProps = propsFactory({
autoSelectFirst: {
type: [Boolean, String]
},
clearOnSelect: Boolean,
search: String,
...makeFilterProps({
filterKeys: ['title']
}),
...makeSelectProps(),
...omit(makeVTextFieldProps({
modelValue: null,
role: 'combobox'
}), ['validationValue', 'dirty', 'appendInnerIcon']),
...makeTransitionProps({
transition: false
})
}, 'VAutocomplete');
export const VAutocomplete = genericComponent()({
name: 'VAutocomplete',
props: makeVAutocompleteProps(),
emits: {
'update:focused': focused => true,
'update:search': value => true,
'update:modelValue': value => true,
'update:menu': value => true
},
setup(props, _ref) {
let {
slots
} = _ref;
const {
t
} = useLocale();
const vTextFieldRef = ref();
const isFocused = shallowRef(false);
const isPristine = shallowRef(true);
const listHasFocus = shallowRef(false);
const vMenuRef = ref();
const vVirtualScrollRef = ref();
const _menu = useProxiedModel(props, 'menu');
const menu = computed({
get: () => _menu.value,
set: v => {
if (_menu.value && !v && vMenuRef.value?.ΨopenChildren) return;
_menu.value = v;
}
});
const selectionIndex = shallowRef(-1);
const color = computed(() => vTextFieldRef.value?.color);
const label = computed(() => menu.value ? props.closeText : props.openText);
const {
items,
transformIn,
transformOut
} = useItems(props);
const {
textColorClasses,
textColorStyles
} = useTextColor(color);
const search = useProxiedModel(props, 'search', '');
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {
const transformed = transformOut(v);
return props.multiple ? transformed : transformed[0] ?? null;
});
const counterValue = computed(() => {
return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : model.value.length;
});
const form = useForm();
const {
filteredItems,
getMatches
} = useFilter(props, items, () => isPristine.value ? '' : search.value);
const displayItems = computed(() => {
if (props.hideSelected) {
return filteredItems.value.filter(filteredItem => !model.value.some(s => s.value === filteredItem.value));
}
return filteredItems.value;
});
const selectedValues = computed(() => model.value.map(selection => selection.props.value));
const highlightFirst = computed(() => {
const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;
return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
});
const menuDisabled = computed(() => props.hideNoData && !displayItems.value.length || props.readonly || form?.isReadonly.value);
const listRef = ref();
const {
onListScroll,
onListKeydown
} = useScrolling(listRef, vTextFieldRef);
function onClear(e) {
if (props.openOnClear) {
menu.value = true;
}
search.value = '';
}
function onMousedownControl() {
if (menuDisabled.value) return;
menu.value = true;
}
function onMousedownMenuIcon(e) {
if (menuDisabled.value) return;
if (isFocused.value) {
e.preventDefault();
e.stopPropagation();
}
menu.value = !menu.value;
}
function onKeydown(e) {
if (props.readonly || form?.isReadonly.value) return;
const selectionStart = vTextFieldRef.value.selectionStart;
const length = model.value.length;
if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
e.preventDefault();
}
if (['Enter', 'ArrowDown'].includes(e.key)) {
menu.value = true;
}
if (['Escape'].includes(e.key)) {
menu.value = false;
}
if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key)) {
select(displayItems.value[0]);
}
if (e.key === 'ArrowDown' && highlightFirst.value) {
listRef.value?.focus('next');
}
if (!props.multiple) return;
if (['Backspace', 'Delete'].includes(e.key)) {
if (selectionIndex.value < 0) {
if (e.key === 'Backspace' && !search.value) {
selectionIndex.value = length - 1;
}
return;
}
const originalSelectionIndex = selectionIndex.value;
const selectedItem = model.value[selectionIndex.value];
if (selectedItem && !selectedItem.props.disabled) select(selectedItem);
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
}
if (e.key === 'ArrowLeft') {
if (selectionIndex.value < 0 && selectionStart > 0) return;
const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
if (model.value[prev]) {
selectionIndex.value = prev;
} else {
selectionIndex.value = -1;
vTextFieldRef.value.setSelectionRange(search.value?.length, search.value?.length);
}
}
if (e.key === 'ArrowRight') {
if (selectionIndex.value < 0) return;
const next = selectionIndex.value + 1;
if (model.value[next]) {
selectionIndex.value = next;
} else {
selectionIndex.value = -1;
vTextFieldRef.value.setSelectionRange(0, 0);
}
}
}
function onChange(e) {
if (matchesSelector(vTextFieldRef.value, ':autofill') || matchesSelector(vTextFieldRef.value, ':-webkit-autofill')) {
const item = items.value.find(item => item.title === e.target.value);
if (item) {
select(item);
}
}
}
function onAfterLeave() {
if (isFocused.value) {
isPristine.value = true;
vTextFieldRef.value?.focus();
}
}
function onFocusin(e) {
isFocused.value = true;
setTimeout(() => {
listHasFocus.value = true;
});
}
function onFocusout(e) {
listHasFocus.value = false;
}
function onUpdateModelValue(v) {
if (v == null || v === '' && !props.multiple) model.value = [];
}
const isSelecting = shallowRef(false);
function select(item) {
let add = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
if (item.props.disabled) return;
if (props.multiple) {
const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
if (index === -1) {
model.value = [...model.value, item];
} else {
const value = [...model.value];
value.splice(index, 1);
model.value = value;
}
if (props.clearOnSelect) {
search.value = '';
}
} else {
model.value = add ? [item] : [];
isSelecting.value = true;
search.value = add ? item.title : '';
menu.value = false;
isPristine.value = true;
nextTick(() => isSelecting.value = false);
}
}
watch(isFocused, (val, oldVal) => {
if (val === oldVal) return;
if (val) {
isSelecting.value = true;
search.value = props.multiple ? '' : String(model.value.at(-1)?.props.title ?? '');
isPristine.value = true;
nextTick(() => isSelecting.value = false);
} else {
if (!props.multiple && search.value == null) model.value = [];else if (highlightFirst.value && !listHasFocus.value && !model.value.some(_ref2 => {
let {
value
} = _ref2;
return value === displayItems.value[0].value;
})) {
select(displayItems.value[0]);
}
menu.value = false;
search.value = '';
selectionIndex.value = -1;
}
});
watch(search, val => {
if (!isFocused.value || isSelecting.value) return;
if (val) menu.value = true;
isPristine.value = !val;
});
watch(menu, () => {
if (!props.hideSelected && menu.value && model.value.length) {
const index = displayItems.value.findIndex(item => model.value.some(s => item.value === s.value));
IN_BROWSER && window.requestAnimationFrame(() => {
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
});
}
});
watch(displayItems, (val, oldVal) => {
if (!isFocused.value) return;
if (!val.length && props.hideNoData) {
menu.value = false;
}
if (!oldVal.length && val.length) {
menu.value = true;
}
});
useRender(() => {
const hasChips = !!(props.chips || slots.chip);
const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
const isDirty = model.value.length > 0;
const textFieldProps = VTextField.filterProps(props);
return _createVNode(VTextField, _mergeProps({
"ref": vTextFieldRef
}, textFieldProps, {
"modelValue": search.value,
"onUpdate:modelValue": [$event => search.value = $event, onUpdateModelValue],
"focused": isFocused.value,
"onUpdate:focused": $event => isFocused.value = $event,
"validationValue": model.externalValue,
"counterValue": counterValue.value,
"dirty": isDirty,
"onChange": onChange,
"class": ['v-autocomplete', `v-autocomplete--${props.multiple ? 'multiple' : 'single'}`, {
'v-autocomplete--active-menu': menu.value,
'v-autocomplete--chips': !!props.chips,
'v-autocomplete--selection-slot': !!slots.selection,
'v-autocomplete--selecting-index': selectionIndex.value > -1
}, props.class],
"style": props.style,
"readonly": props.readonly,
"placeholder": isDirty ? undefined : props.placeholder,
"onClick:clear": onClear,
"onMousedown:control": onMousedownControl,
"onKeydown": onKeydown
}), {
...slots,
default: () => _createVNode(_Fragment, null, [_createVNode(VMenu, _mergeProps({
"ref": vMenuRef,
"modelValue": menu.value,
"onUpdate:modelValue": $event => menu.value = $event,
"activator": "parent",
"contentClass": "v-autocomplete__content",
"disabled": menuDisabled.value,
"eager": props.eager,
"maxHeight": 310,
"openOnClick": false,
"closeOnContentClick": false,
"transition": props.transition,
"onAfterLeave": onAfterLeave
}, props.menuProps), {
default: () => [hasList && _createVNode(VList, _mergeProps({
"ref": listRef,
"selected": selectedValues.value,
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
"onMousedown": e => e.preventDefault(),
"onKeydown": onListKeydown,
"onFocusin": onFocusin,
"onFocusout": onFocusout,
"onScrollPassive": onListScroll,
"tabindex": "-1",
"aria-live": "polite",
"color": props.itemColor ?? props.color
}, props.listProps), {
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? _createVNode(VListItem, {
"title": t(props.noDataText)
}, null)), _createVNode(VVirtualScroll, {
"ref": vVirtualScrollRef,
"renderless": true,
"items": displayItems.value
}, {
default: _ref3 => {
let {
item,
index,
itemRef
} = _ref3;
const itemProps = mergeProps(item.props, {
ref: itemRef,
key: index,
active: highlightFirst.value && index === 0 ? true : undefined,
onClick: () => select(item)
});
return slots.item?.({
item,
index,
props: itemProps
}) ?? _createVNode(VListItem, itemProps, {
prepend: _ref4 => {
let {
isSelected
} = _ref4;
return _createVNode(_Fragment, null, [props.multiple && !props.hideSelected ? _createVNode(VCheckboxBtn, {
"key": item.value,
"modelValue": isSelected,
"ripple": false,
"tabindex": "-1"
}, null) : undefined, item.props.prependAvatar && _createVNode(VAvatar, {
"image": item.props.prependAvatar
}, null), item.props.prependIcon && _createVNode(VIcon, {
"icon": item.props.prependIcon
}, null)]);
},
title: () => {
return isPristine.value ? item.title : highlightResult(item.title, getMatches(item)?.title, search.value?.length ?? 0);
}
});
}
}), slots['append-item']?.()]
})]
}), model.value.map((item, index) => {
function onChipClose(e) {
e.stopPropagation();
e.preventDefault();
select(item, false);
}
const slotProps = {
'onClick:close': onChipClose,
onMousedown(e) {
e.preventDefault();
e.stopPropagation();
},
modelValue: true,
'onUpdate:modelValue': undefined
};
const hasSlot = hasChips ? !!slots.chip : !!slots.selection;
const slotContent = hasSlot ? ensureValidVNode(hasChips ? slots.chip({
item,
index,
props: slotProps
}) : slots.selection({
item,
index
})) : undefined;
if (hasSlot && !slotContent) return undefined;
return _createVNode("div", {
"key": item.value,
"class": ['v-autocomplete__selection', index === selectionIndex.value && ['v-autocomplete__selection--selected', textColorClasses.value]],
"style": index === selectionIndex.value ? textColorStyles.value : {}
}, [hasChips ? !slots.chip ? _createVNode(VChip, _mergeProps({
"key": "chip",
"closable": props.closableChips,
"size": "small",
"text": item.title,
"disabled": item.props.disabled
}, slotProps), null) : _createVNode(VDefaultsProvider, {
"key": "chip-defaults",
"defaults": {
VChip: {
closable: props.closableChips,
size: 'small',
text: item.title
}
}
}, {
default: () => [slotContent]
}) : slotContent ?? _createVNode("span", {
"class": "v-autocomplete__selection-text"
}, [item.title, props.multiple && index < model.value.length - 1 && _createVNode("span", {
"class": "v-autocomplete__selection-comma"
}, [_createTextVNode(",")])])]);
})]),
'append-inner': function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _createVNode(_Fragment, null, [slots['append-inner']?.(...args), props.menuIcon ? _createVNode(VIcon, {
"class": "v-autocomplete__menu-icon",
"icon": props.menuIcon,
"onMousedown": onMousedownMenuIcon,
"onClick": noop,
"aria-label": t(label.value),
"title": t(label.value)
}, null) : undefined]);
}
});
});
return forwardRefs({
isFocused,
isPristine,
menu,
search,
filteredItems,
select
}, vTextFieldRef);
}
});
//# sourceMappingURL=VAutocomplete.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,105 @@
@use 'sass:selector'
@use 'sass:math'
@use '../../styles/settings'
@use '../../styles/tools'
@use './variables' as *
.v-autocomplete
.v-field
.v-text-field__prefix,
.v-text-field__suffix,
.v-field__input,
&.v-field
cursor: text
.v-field
.v-field__input
> input
flex: 1 1
.v-field
input
min-width: $autocomplete-focused-input
&:not(.v-field--focused)
input
min-width: 0
.v-field--dirty
.v-autocomplete__selection
margin-inline-end: $autocomplete-selection-gap
.v-autocomplete__selection-text
overflow: hidden
text-overflow: ellipsis
white-space: nowrap
.v-autocomplete
&__content
overflow: hidden
@include tools.elevation($autocomplete-content-elevation)
@include tools.rounded($autocomplete-content-border-radius)
&__mask
background: rgb(var(--v-theme-surface-light))
&__selection
display: inline-flex
align-items: center
height: calc($input-font-size * $input-line-height)
letter-spacing: inherit
line-height: inherit
max-width: calc(100% - $autocomplete-selection-gap - $autocomplete-input-buffer)
&__selection
&:first-child
margin-inline-start: 0
&--chips.v-input--density-compact
.v-field--variant-solo,
.v-field--variant-solo-inverted,
.v-field--variant-filled,
.v-field--variant-solo-filled
.v-label.v-field-label
&--floating
top: 0px
&--selecting-index
.v-autocomplete__selection
opacity: var(--v-medium-emphasis-opacity)
&--selected
opacity: 1
.v-field__input > input
caret-color: transparent
&--single
&.v-text-field .v-field--focused input
flex: 1 1
position: absolute
left: 0
right: 0
width: 100%
padding-inline: inherit
.v-field--active
input
transition: none
.v-field--dirty:not(.v-field--focused)
input
opacity: 0
.v-field--focused
.v-autocomplete__selection
opacity: 0
&__menu-icon
margin-inline-start: 4px
transition: $autocomplete-transition
.v-autocomplete--active-menu &
opacity: var(--v-high-emphasis-opacity)
transform: rotate(180deg)

View File

@ -0,0 +1,14 @@
@forward '../VInput/variables';
@use '../../styles/settings';
// Defaults
$autocomplete-content-border-radius: 4px !default;
$autocomplete-content-elevation: 4 !default;
$autocomplete-focused-input: 64px !default;
$autocomplete-input-buffer: 2px !default;
$autocomplete-line-height: 1.75 !default;
$autocomplete-selection-gap: 2px !default;
$autocomplete-transition: .2s settings.$standard-easing !default;
$autocomplete-chips-control-min-height: 64px !default;
$autocomplete-chips-margin-top: null !default;
$autocomplete-chips-margin-bottom: null !default;

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -0,0 +1,88 @@
.v-avatar {
flex: none;
align-items: center;
display: inline-flex;
justify-content: center;
line-height: normal;
overflow: hidden;
position: relative;
text-align: center;
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
transition-property: width, height;
vertical-align: middle;
border-radius: 50%;
}
.v-avatar.v-avatar--size-x-small {
--v-avatar-height: 24px;
}
.v-avatar.v-avatar--size-small {
--v-avatar-height: 32px;
}
.v-avatar.v-avatar--size-default {
--v-avatar-height: 40px;
}
.v-avatar.v-avatar--size-large {
--v-avatar-height: 48px;
}
.v-avatar.v-avatar--size-x-large {
--v-avatar-height: 56px;
}
.v-avatar.v-avatar--density-default {
height: calc(var(--v-avatar-height) + 0px);
width: calc(var(--v-avatar-height) + 0px);
}
.v-avatar.v-avatar--density-comfortable {
height: calc(var(--v-avatar-height) + -4px);
width: calc(var(--v-avatar-height) + -4px);
}
.v-avatar.v-avatar--density-compact {
height: calc(var(--v-avatar-height) + -8px);
width: calc(var(--v-avatar-height) + -8px);
}
.v-avatar--variant-plain, .v-avatar--variant-outlined, .v-avatar--variant-text, .v-avatar--variant-tonal {
background: transparent;
color: inherit;
}
.v-avatar--variant-plain {
opacity: 0.62;
}
.v-avatar--variant-plain:focus, .v-avatar--variant-plain:hover {
opacity: 1;
}
.v-avatar--variant-plain .v-avatar__overlay {
display: none;
}
.v-avatar--variant-elevated, .v-avatar--variant-flat {
background: var(--v-theme-surface);
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
}
.v-avatar--variant-elevated {
box-shadow: 0px 2px 1px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 1px 1px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 3px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
}
.v-avatar--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-avatar--variant-outlined {
border: thin solid currentColor;
}
.v-avatar--variant-text .v-avatar__overlay {
background: currentColor;
}
.v-avatar--variant-tonal .v-avatar__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-avatar--rounded {
border-radius: 4px;
}
.v-avatar .v-img {
height: 100%;
width: 100%;
}

View File

@ -0,0 +1,92 @@
import { createVNode as _createVNode } from "vue";
// Styles
import "./VAvatar.css";
// Components
import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs";
import { VIcon } from "../VIcon/index.mjs";
import { VImg } from "../VImg/index.mjs"; // Composables
import { makeComponentProps } from "../../composables/component.mjs";
import { makeDensityProps, useDensity } from "../../composables/density.mjs";
import { IconValue } from "../../composables/icons.mjs";
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
import { makeSizeProps, useSize } from "../../composables/size.mjs";
import { makeTagProps } from "../../composables/tag.mjs";
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs";
import { genOverlays, makeVariantProps, useVariant } from "../../composables/variant.mjs"; // Utilities
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
export const makeVAvatarProps = propsFactory({
start: Boolean,
end: Boolean,
icon: IconValue,
image: String,
text: String,
...makeComponentProps(),
...makeDensityProps(),
...makeRoundedProps(),
...makeSizeProps(),
...makeTagProps(),
...makeThemeProps(),
...makeVariantProps({
variant: 'flat'
})
}, 'VAvatar');
export const VAvatar = genericComponent()({
name: 'VAvatar',
props: makeVAvatarProps(),
setup(props, _ref) {
let {
slots
} = _ref;
const {
themeClasses
} = provideTheme(props);
const {
colorClasses,
colorStyles,
variantClasses
} = useVariant(props);
const {
densityClasses
} = useDensity(props);
const {
roundedClasses
} = useRounded(props);
const {
sizeClasses,
sizeStyles
} = useSize(props);
useRender(() => _createVNode(props.tag, {
"class": ['v-avatar', {
'v-avatar--start': props.start,
'v-avatar--end': props.end
}, themeClasses.value, colorClasses.value, densityClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
"style": [colorStyles.value, sizeStyles.value, props.style]
}, {
default: () => [!slots.default ? props.image ? _createVNode(VImg, {
"key": "image",
"src": props.image,
"alt": "",
"cover": true
}, null) : props.icon ? _createVNode(VIcon, {
"key": "icon",
"icon": props.icon
}, null) : props.text : _createVNode(VDefaultsProvider, {
"key": "content-defaults",
"defaults": {
VImg: {
cover: true,
image: props.image
},
VIcon: {
icon: props.icon
}
}
}, {
default: () => [slots.default()]
}), genOverlays(false, 'v-avatar')]
}));
return {};
}
});
//# sourceMappingURL=VAvatar.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,29 @@
@use '../../styles/settings'
@use '../../styles/tools'
@use './mixins' as *
@use './variables' as *
.v-avatar
flex: none
align-items: center
display: inline-flex
justify-content: center
line-height: $avatar-line-height
overflow: hidden
position: relative
text-align: center
transition: 0.2s settings.$standard-easing
transition-property: width, height
vertical-align: $avatar-vertical-align
@include avatar-sizes($avatar-sizes)
@include avatar-density(('height', 'width'), $avatar-density)
@include tools.rounded($avatar-border-radius)
@include tools.variant($avatar-variants...)
&--rounded
@include tools.rounded($avatar-rounded-border-radius)
.v-img
height: 100%
width: 100%

View File

@ -0,0 +1,31 @@
@use 'sass:map';
@use 'sass:meta';
@use '../../styles/settings';
@use './variables' as *;
@mixin avatar-sizes ($map: $avatar-sizes) {
@each $sizeName, $multiplier in settings.$size-scales {
$size: map.get($map, 'height') + (8 * $multiplier);
&.v-avatar--size-#{$sizeName} {
--v-avatar-height: #{$size};
}
}
}
@mixin avatar-density ($properties, $densities) {
@each $density, $multiplier in $densities {
$value: calc(var(--v-avatar-height) + #{$multiplier * settings.$spacer});
&.v-avatar--density-#{$density} {
@if meta.type-of($properties) == "list" {
@each $property in $properties {
#{$property}: $value;
}
}
@else {
#{$properties}: $value;
}
}
}
}

View File

@ -0,0 +1,33 @@
@use "sass:map";
@use "../../styles/settings/variables";
@use "../../styles/tools/functions";
// Defaults
$avatar-background: var(--v-theme-surface) !default;
$avatar-border-radius: map.get(variables.$rounded, 'circle') !default;
$avatar-color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity)) !default;
$avatar-density: ('default': 0, 'comfortable': -1, 'compact': -2) !default;
$avatar-elevation: 1 !default;
$avatar-height: 40px !default;
$avatar-line-height: normal !default;
$avatar-plain-opacity: .62 !default;
$avatar-rounded-border-radius: variables.$border-radius-root !default;
$avatar-vertical-align: middle !default;
$avatar-width: 40px !default;
$avatar-sizes: () !default;
$avatar-sizes: functions.map-deep-merge(
(
'height': $avatar-height,
'width': $avatar-width
),
$avatar-sizes
);
$avatar-variants: (
$avatar-background,
$avatar-color,
$avatar-elevation,
$avatar-plain-opacity,
'v-avatar'
) !default;

View File

@ -0,0 +1,239 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, JSXComponent, PropType } from 'vue';
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';
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
declare const IconValue: PropType<IconValue>;
declare const VAvatar: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
end: boolean;
start: boolean;
style: vue.StyleValue;
size: string | number;
tag: string;
density: Density;
} & {
color?: string | undefined;
image?: string | undefined;
text?: string | undefined;
class?: any;
icon?: IconValue | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
end: boolean;
start: boolean;
style: vue.StyleValue;
size: string | number;
tag: string;
density: Density;
} & {
color?: string | undefined;
image?: string | undefined;
text?: string | undefined;
class?: any;
icon?: IconValue | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
end: boolean;
start: boolean;
style: vue.StyleValue;
size: string | number;
tag: string;
rounded: string | number | boolean;
density: Density;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
end: boolean;
start: boolean;
style: vue.StyleValue;
size: string | number;
tag: string;
density: Density;
} & {
color?: string | undefined;
image?: string | undefined;
text?: string | undefined;
class?: any;
icon?: IconValue | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, {}, {}, {}, {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
end: boolean;
start: boolean;
style: vue.StyleValue;
size: string | number;
tag: string;
rounded: string | number | boolean;
density: Density;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
end: boolean;
start: boolean;
style: vue.StyleValue;
size: string | number;
tag: string;
density: Density;
} & {
color?: string | undefined;
image?: string | undefined;
text?: string | undefined;
class?: any;
icon?: IconValue | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
variant: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
end: boolean;
start: boolean;
style: vue.StyleValue;
size: string | number;
tag: string;
rounded: string | number | boolean;
density: Density;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
color: StringConstructor;
variant: Omit<{
type: vue.PropType<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
default: string;
validator: (v: any) => boolean;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">>;
default: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
};
theme: StringConstructor;
tag: {
type: StringConstructor;
default: string;
};
size: {
type: (StringConstructor | NumberConstructor)[];
default: string;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
density: {
type: vue.PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
start: BooleanConstructor;
end: BooleanConstructor;
icon: vue.PropType<IconValue>;
image: StringConstructor;
text: StringConstructor;
}, vue.ExtractPropTypes<{
color: StringConstructor;
variant: Omit<{
type: vue.PropType<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
default: string;
validator: (v: any) => boolean;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">>;
default: NonNullable<"flat" | "text" | "elevated" | "tonal" | "outlined" | "plain">;
};
theme: StringConstructor;
tag: {
type: StringConstructor;
default: string;
};
size: {
type: (StringConstructor | NumberConstructor)[];
default: string;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
density: {
type: vue.PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
start: BooleanConstructor;
end: BooleanConstructor;
icon: vue.PropType<IconValue>;
image: StringConstructor;
text: StringConstructor;
}>>;
type VAvatar = InstanceType<typeof VAvatar>;
export { VAvatar };

View File

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

View File

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

View File

@ -0,0 +1,72 @@
.v-badge {
display: inline-block;
line-height: 1;
}
.v-badge__badge {
align-items: center;
display: inline-flex;
border-radius: 10px;
font-size: 0.75rem;
font-weight: 500;
height: 1.25rem;
justify-content: center;
min-width: 20px;
padding: 4px 6px;
pointer-events: auto;
position: absolute;
text-align: center;
text-indent: 0;
transition: 0.225s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
background: rgb(var(--v-theme-surface-variant));
color: rgba(var(--v-theme-on-surface-variant), var(--v-high-emphasis-opacity));
}
.v-badge--bordered .v-badge__badge::after {
border-radius: inherit;
border-style: solid;
border-width: 2px;
bottom: 0;
color: rgb(var(--v-theme-background));
content: "";
left: 0;
position: absolute;
right: 0;
top: 0;
transform: scale(1.05);
}
.v-badge--dot .v-badge__badge {
border-radius: 4.5px;
height: 9px;
min-width: 0;
padding: 0;
width: 9px;
}
.v-badge--dot .v-badge__badge::after {
border-width: 1.5px;
}
.v-badge--inline .v-badge__badge {
position: relative;
vertical-align: middle;
}
.v-badge__badge .v-icon {
color: inherit;
font-size: 0.75rem;
margin: 0 -2px;
}
.v-badge__badge img,
.v-badge__badge .v-img {
height: 100%;
width: 100%;
}
.v-badge__wrapper {
display: flex;
position: relative;
}
.v-badge--inline .v-badge__wrapper {
align-items: center;
display: inline-flex;
justify-content: center;
margin: 0 4px;
}

View File

@ -0,0 +1,112 @@
import { withDirectives as _withDirectives, mergeProps as _mergeProps, vShow as _vShow, createVNode as _createVNode } from "vue";
// Styles
import "./VBadge.css";
// Components
import { VIcon } from "../VIcon/index.mjs"; // Composables
import { useBackgroundColor, useTextColor } from "../../composables/color.mjs";
import { makeComponentProps } from "../../composables/component.mjs";
import { IconValue } from "../../composables/icons.mjs";
import { useLocale } from "../../composables/locale.mjs";
import { makeLocationProps, useLocation } from "../../composables/location.mjs";
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
import { makeTagProps } from "../../composables/tag.mjs";
import { makeThemeProps, useTheme } from "../../composables/theme.mjs";
import { makeTransitionProps, MaybeTransition } from "../../composables/transition.mjs"; // Utilities
import { toRef } from 'vue';
import { genericComponent, pickWithRest, propsFactory, useRender } from "../../util/index.mjs";
export const makeVBadgeProps = propsFactory({
bordered: Boolean,
color: String,
content: [Number, String],
dot: Boolean,
floating: Boolean,
icon: IconValue,
inline: Boolean,
label: {
type: String,
default: '$vuetify.badge'
},
max: [Number, String],
modelValue: {
type: Boolean,
default: true
},
offsetX: [Number, String],
offsetY: [Number, String],
textColor: String,
...makeComponentProps(),
...makeLocationProps({
location: 'top end'
}),
...makeRoundedProps(),
...makeTagProps(),
...makeThemeProps(),
...makeTransitionProps({
transition: 'scale-rotate-transition'
})
}, 'VBadge');
export const VBadge = genericComponent()({
name: 'VBadge',
inheritAttrs: false,
props: makeVBadgeProps(),
setup(props, ctx) {
const {
backgroundColorClasses,
backgroundColorStyles
} = useBackgroundColor(toRef(props, 'color'));
const {
roundedClasses
} = useRounded(props);
const {
t
} = useLocale();
const {
textColorClasses,
textColorStyles
} = useTextColor(toRef(props, 'textColor'));
const {
themeClasses
} = useTheme();
const {
locationStyles
} = useLocation(props, true, side => {
const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;
return base + (['top', 'bottom'].includes(side) ? +(props.offsetY ?? 0) : ['left', 'right'].includes(side) ? +(props.offsetX ?? 0) : 0);
});
useRender(() => {
const value = Number(props.content);
const content = !props.max || isNaN(value) ? props.content : value <= +props.max ? value : `${props.max}+`;
const [badgeAttrs, attrs] = pickWithRest(ctx.attrs, ['aria-atomic', 'aria-label', 'aria-live', 'role', 'title']);
return _createVNode(props.tag, _mergeProps({
"class": ['v-badge', {
'v-badge--bordered': props.bordered,
'v-badge--dot': props.dot,
'v-badge--floating': props.floating,
'v-badge--inline': props.inline
}, props.class]
}, attrs, {
"style": props.style
}), {
default: () => [_createVNode("div", {
"class": "v-badge__wrapper"
}, [ctx.slots.default?.(), _createVNode(MaybeTransition, {
"transition": props.transition
}, {
default: () => [_withDirectives(_createVNode("span", _mergeProps({
"class": ['v-badge__badge', themeClasses.value, backgroundColorClasses.value, roundedClasses.value, textColorClasses.value],
"style": [backgroundColorStyles.value, textColorStyles.value, props.inline ? {} : locationStyles.value],
"aria-atomic": "true",
"aria-label": t(props.label, value),
"aria-live": "polite",
"role": "status"
}, badgeAttrs), [props.dot ? undefined : ctx.slots.badge ? ctx.slots.badge?.() : props.icon ? _createVNode(VIcon, {
"icon": props.icon
}, null) : content]), [[_vShow, props.modelValue]])]
})])]
});
});
return {};
}
});
//# sourceMappingURL=VBadge.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,73 @@
@use '../../styles/tools'
@use './variables' as *
.v-badge
display: inline-block
line-height: $badge-line-height
.v-badge__badge
align-items: center
display: inline-flex
border-radius: $badge-border-radius
font-size: $badge-font-size
font-weight: $badge-font-weight
height: $badge-height
justify-content: center
min-width: $badge-min-width
padding: $badge-padding
pointer-events: auto
position: absolute
text-align: center
text-indent: 0
transition: $badge-transition
white-space: nowrap
@include tools.theme($badge-theme...)
.v-badge--bordered &
&::after
border-radius: inherit
border-style: $badge-border-style
border-width: $badge-border-width
bottom: 0
color: $badge-border-color
content: ''
left: 0
position: absolute
right: 0
top: 0
transform: $badge-border-transform
.v-badge--dot &
border-radius: $badge-dot-border-radius
height: $badge-dot-height
min-width: 0
padding: 0
width: $badge-dot-width
&::after
border-width: $badge-dot-border-width
.v-badge--inline &
position: relative
vertical-align: $badge-inline-vertical-align
.v-icon
color: inherit
font-size: $badge-font-size
margin: $badge-icon-margin
img,
.v-img
height: 100%
width: 100%
.v-badge__wrapper
display: flex
position: relative
.v-badge--inline &
align-items: center
display: inline-flex
justify-content: center
margin: $badge-wrapper-margin

View File

@ -0,0 +1,32 @@
@use '../../styles/settings';
// VBadge
$badge-background: rgb(var(--v-theme-surface-variant)) !default;
$badge-color: rgba(var(--v-theme-on-surface-variant), var(--v-high-emphasis-opacity)) !default;
$badge-border-color: rgb(var(--v-theme-background)) !default;
$badge-border-radius: 10px !default;
$badge-border-style: solid !default;
$badge-border-transform: scale(1.05) !default;
$badge-border-width: 2px !default;
$badge-dot-border-radius: 4.5px !default;
$badge-dot-border-width: 1.5px !default;
$badge-dot-height: 9px !default;
$badge-dot-width: 9px !default;
$badge-font-family: settings.$body-font-family !default;
$badge-font-size: .75rem !default;
$badge-font-weight: 500 !default;
$badge-height: 1.25rem !default;
$badge-icon-margin: 0 -2px !default;
$badge-icon-padding: 4px 6px !default;
$badge-inline-vertical-align: middle !default;
$badge-line-height: 1 !default;
$badge-min-width: 20px !default;
$badge-padding: 4px 6px !default;
$badge-transition: .225s settings.$standard-easing !default;
$badge-wrapper-margin: 0 4px !default;
// Lists
$badge-theme: (
$badge-background,
$badge-color
) !default;

View File

@ -0,0 +1,336 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, JSXComponent, PropType } from 'vue';
declare const block: readonly ["top", "bottom"];
declare const inline: readonly ["start", "end", "left", "right"];
type Tblock = typeof block[number];
type Tinline = typeof inline[number];
type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
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 IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
declare const IconValue: PropType<IconValue>;
declare const VBadge: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
inline: boolean;
location: NonNullable<Anchor>;
transition: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
label: string;
style: vue.StyleValue;
tag: string;
dot: boolean;
floating: boolean;
modelValue: boolean;
bordered: boolean;
} & {
max?: string | number | undefined;
color?: string | undefined;
content?: string | number | undefined;
class?: any;
icon?: IconValue | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
offsetX?: string | number | undefined;
offsetY?: string | number | undefined;
textColor?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
badge?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
badge?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:badge"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
inline: boolean;
location: NonNullable<Anchor>;
transition: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
label: string;
style: vue.StyleValue;
tag: string;
dot: boolean;
floating: boolean;
modelValue: boolean;
bordered: boolean;
} & {
max?: string | number | undefined;
color?: string | undefined;
content?: string | number | undefined;
class?: any;
icon?: IconValue | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
offsetX?: string | number | undefined;
offsetY?: string | number | undefined;
textColor?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
badge?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
badge?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:badge"?: false | (() => vue.VNodeChild) | undefined;
}, {
inline: boolean;
location: NonNullable<Anchor>;
transition: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
label: string;
style: vue.StyleValue;
tag: string;
dot: boolean;
rounded: string | number | boolean;
floating: boolean;
modelValue: boolean;
bordered: boolean;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
badge: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
inline: boolean;
location: NonNullable<Anchor>;
transition: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
label: string;
style: vue.StyleValue;
tag: string;
dot: boolean;
floating: boolean;
modelValue: boolean;
bordered: boolean;
} & {
max?: string | number | undefined;
color?: string | undefined;
content?: string | number | undefined;
class?: any;
icon?: IconValue | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
offsetX?: string | number | undefined;
offsetY?: string | number | undefined;
textColor?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
badge?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
badge?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:badge"?: false | (() => vue.VNodeChild) | undefined;
}, {}, {}, {}, {}, {
inline: boolean;
location: NonNullable<Anchor>;
transition: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
label: string;
style: vue.StyleValue;
tag: string;
dot: boolean;
rounded: string | number | boolean;
floating: boolean;
modelValue: boolean;
bordered: boolean;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
inline: boolean;
location: NonNullable<Anchor>;
transition: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
label: string;
style: vue.StyleValue;
tag: string;
dot: boolean;
floating: boolean;
modelValue: boolean;
bordered: boolean;
} & {
max?: string | number | undefined;
color?: string | undefined;
content?: string | number | undefined;
class?: any;
icon?: IconValue | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
offsetX?: string | number | undefined;
offsetY?: string | number | undefined;
textColor?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
badge?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
badge?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:badge"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
inline: boolean;
location: NonNullable<Anchor>;
transition: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
label: string;
style: vue.StyleValue;
tag: string;
dot: boolean;
rounded: string | number | boolean;
floating: boolean;
modelValue: boolean;
bordered: boolean;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
badge: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
transition: Omit<{
type: vue.PropType<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
default: string;
validator: (val: unknown) => boolean;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>>;
default: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
};
theme: StringConstructor;
tag: {
type: StringConstructor;
default: string;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
location: {
type: vue.PropType<NonNullable<Anchor>>;
default: NonNullable<Anchor>;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
bordered: BooleanConstructor;
color: StringConstructor;
content: (StringConstructor | NumberConstructor)[];
dot: BooleanConstructor;
floating: BooleanConstructor;
icon: vue.PropType<IconValue>;
inline: BooleanConstructor;
label: {
type: StringConstructor;
default: string;
};
max: (StringConstructor | NumberConstructor)[];
modelValue: {
type: BooleanConstructor;
default: boolean;
};
offsetX: (StringConstructor | NumberConstructor)[];
offsetY: (StringConstructor | NumberConstructor)[];
textColor: StringConstructor;
}, vue.ExtractPropTypes<{
transition: Omit<{
type: vue.PropType<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
default: string;
validator: (val: unknown) => boolean;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>>;
default: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
};
theme: StringConstructor;
tag: {
type: StringConstructor;
default: string;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
location: {
type: vue.PropType<NonNullable<Anchor>>;
default: NonNullable<Anchor>;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
bordered: BooleanConstructor;
color: StringConstructor;
content: (StringConstructor | NumberConstructor)[];
dot: BooleanConstructor;
floating: BooleanConstructor;
icon: vue.PropType<IconValue>;
inline: BooleanConstructor;
label: {
type: StringConstructor;
default: string;
};
max: (StringConstructor | NumberConstructor)[];
modelValue: {
type: BooleanConstructor;
default: boolean;
};
offsetX: (StringConstructor | NumberConstructor)[];
offsetY: (StringConstructor | NumberConstructor)[];
textColor: StringConstructor;
}>>;
type VBadge = InstanceType<typeof VBadge>;
export { VBadge };

View File

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

View File

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

View File

@ -0,0 +1,158 @@
.v-banner {
display: grid;
flex: 1 1;
font-size: 0.875rem;
grid-template-areas: "prepend content actions";
grid-template-columns: max-content auto max-content;
grid-template-rows: max-content max-content;
line-height: 1.375rem;
overflow: hidden;
padding-inline: 16px 8px;
padding-top: 16px;
padding-bottom: 16px;
position: relative;
width: 100%;
border-color: rgba(var(--v-border-color), var(--v-border-opacity));
border-style: solid;
border-width: 0 0 thin 0;
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));
border-radius: 0;
background: rgb(var(--v-theme-surface));
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
}
.v-banner--border {
border-width: thin;
box-shadow: none;
}
.v-banner--absolute {
position: absolute;
}
.v-banner--fixed {
position: fixed;
}
.v-banner--sticky {
position: sticky;
}
.v-banner--rounded {
border-radius: 4px;
}
.v-banner--stacked:not(.v-banner--one-line) {
grid-template-areas: "prepend content" ". actions";
}
.v-banner--stacked .v-banner-text {
padding-inline-end: 36px;
}
.v-banner--density-default .v-banner-actions {
margin-bottom: -8px;
}
.v-banner--density-default.v-banner--one-line {
padding-top: 8px;
padding-bottom: 8px;
}
.v-banner--density-default.v-banner--one-line .v-banner-actions {
margin-bottom: 0;
}
.v-banner--density-default.v-banner--one-line {
padding-top: 10px;
}
.v-banner--density-default.v-banner--two-line {
padding-top: 16px;
padding-bottom: 16px;
}
.v-banner--density-default.v-banner--three-line {
padding-top: 24px;
padding-bottom: 16px;
}
.v-banner--density-default:not(.v-banner--one-line) .v-banner-actions, .v-banner--density-default.v-banner--two-line .v-banner-actions, .v-banner--density-default.v-banner--three-line .v-banner-actions {
margin-top: 20px;
}
.v-banner--density-comfortable .v-banner-actions {
margin-bottom: -4px;
}
.v-banner--density-comfortable.v-banner--one-line {
padding-top: 4px;
padding-bottom: 4px;
}
.v-banner--density-comfortable.v-banner--one-line .v-banner-actions {
margin-bottom: 0;
}
.v-banner--density-comfortable.v-banner--two-line {
padding-top: 12px;
padding-bottom: 12px;
}
.v-banner--density-comfortable.v-banner--three-line {
padding-top: 20px;
padding-bottom: 12px;
}
.v-banner--density-comfortable:not(.v-banner--one-line) .v-banner-actions, .v-banner--density-comfortable.v-banner--two-line .v-banner-actions, .v-banner--density-comfortable.v-banner--three-line .v-banner-actions {
margin-top: 16px;
}
.v-banner--density-compact .v-banner-actions {
margin-bottom: 0px;
}
.v-banner--density-compact.v-banner--one-line {
padding-top: 0px;
padding-bottom: 0px;
}
.v-banner--density-compact.v-banner--one-line .v-banner-actions {
margin-bottom: 0;
}
.v-banner--density-compact.v-banner--two-line {
padding-top: 8px;
padding-bottom: 8px;
}
.v-banner--density-compact.v-banner--three-line {
padding-top: 16px;
padding-bottom: 8px;
}
.v-banner--density-compact:not(.v-banner--one-line) .v-banner-actions, .v-banner--density-compact.v-banner--two-line .v-banner-actions, .v-banner--density-compact.v-banner--three-line .v-banner-actions {
margin-top: 12px;
}
.v-banner--sticky {
top: 0;
}
.v-banner__content {
align-items: center;
display: flex;
grid-area: content;
}
.v-banner__prepend {
align-self: flex-start;
grid-area: prepend;
margin-inline-end: 24px;
}
.v-banner-actions {
align-self: flex-end;
display: flex;
flex: 0 1;
grid-area: actions;
justify-content: flex-end;
}
.v-banner--two-line .v-banner-actions, .v-banner--three-line .v-banner-actions {
margin-top: 20px;
}
.v-banner-text {
-webkit-box-orient: vertical;
display: -webkit-box;
padding-inline-end: 90px;
overflow: hidden;
}
.v-banner--one-line .v-banner-text {
-webkit-line-clamp: 1;
}
.v-banner--two-line .v-banner-text {
-webkit-line-clamp: 2;
}
.v-banner--three-line .v-banner-text {
-webkit-line-clamp: 3;
}
.v-banner--two-line .v-banner-text, .v-banner--three-line .v-banner-text {
align-self: flex-start;
}

View File

@ -0,0 +1,140 @@
import { resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
// Styles
import "./VBanner.css";
// Components
import { VBannerActions } from "./VBannerActions.mjs";
import { VBannerText } from "./VBannerText.mjs";
import { VAvatar } from "../VAvatar/index.mjs";
import { VDefaultsProvider } from "../VDefaultsProvider/index.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 { makeDimensionProps, useDimension } from "../../composables/dimensions.mjs";
import { makeDisplayProps, useDisplay } from "../../composables/display.mjs";
import { makeElevationProps, useElevation } from "../../composables/elevation.mjs";
import { IconValue } from "../../composables/icons.mjs";
import { makeLocationProps, useLocation } from "../../composables/location.mjs";
import { makePositionProps, usePosition } from "../../composables/position.mjs";
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
import { makeTagProps } from "../../composables/tag.mjs";
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs"; // Utilities
import { toRef } from 'vue';
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVBannerProps = propsFactory({
avatar: String,
bgColor: String,
color: String,
icon: IconValue,
lines: String,
stacked: Boolean,
sticky: Boolean,
text: String,
...makeBorderProps(),
...makeComponentProps(),
...makeDensityProps(),
...makeDimensionProps(),
...makeDisplayProps(),
...makeElevationProps(),
...makeLocationProps(),
...makePositionProps(),
...makeRoundedProps(),
...makeTagProps(),
...makeThemeProps()
}, 'VBanner');
export const VBanner = genericComponent()({
name: 'VBanner',
props: makeVBannerProps(),
setup(props, _ref) {
let {
slots
} = _ref;
const {
backgroundColorClasses,
backgroundColorStyles
} = useBackgroundColor(props, 'bgColor');
const {
borderClasses
} = useBorder(props);
const {
densityClasses
} = useDensity(props);
const {
displayClasses,
mobile
} = useDisplay(props);
const {
dimensionStyles
} = useDimension(props);
const {
elevationClasses
} = useElevation(props);
const {
locationStyles
} = useLocation(props);
const {
positionClasses
} = usePosition(props);
const {
roundedClasses
} = useRounded(props);
const {
themeClasses
} = provideTheme(props);
const color = toRef(props, 'color');
const density = toRef(props, 'density');
provideDefaults({
VBannerActions: {
color,
density
}
});
useRender(() => {
const hasText = !!(props.text || slots.text);
const hasPrependMedia = !!(props.avatar || props.icon);
const hasPrepend = !!(hasPrependMedia || slots.prepend);
return _createVNode(props.tag, {
"class": ['v-banner', {
'v-banner--stacked': props.stacked || mobile.value,
'v-banner--sticky': props.sticky,
[`v-banner--${props.lines}-line`]: !!props.lines
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, densityClasses.value, displayClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, props.class],
"style": [backgroundColorStyles.value, dimensionStyles.value, locationStyles.value, props.style],
"role": "banner"
}, {
default: () => [hasPrepend && _createVNode("div", {
"key": "prepend",
"class": "v-banner__prepend"
}, [!slots.prepend ? _createVNode(VAvatar, {
"key": "prepend-avatar",
"color": color.value,
"density": density.value,
"icon": props.icon,
"image": props.avatar
}, null) : _createVNode(VDefaultsProvider, {
"key": "prepend-defaults",
"disabled": !hasPrependMedia,
"defaults": {
VAvatar: {
color: color.value,
density: density.value,
icon: props.icon,
image: props.avatar
}
}
}, slots.prepend)]), _createVNode("div", {
"class": "v-banner__content"
}, [hasText && _createVNode(VBannerText, {
"key": "text"
}, {
default: () => [slots.text?.() ?? props.text]
}), slots.default?.()]), slots.actions && _createVNode(VBannerActions, {
"key": "actions"
}, slots.actions)]
});
});
}
});
//# sourceMappingURL=VBanner.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,107 @@
@use 'sass:math'
@use '../../styles/tools'
@use './variables' as *
.v-banner
display: grid
flex: 1 1
font-size: $banner-font-size
grid-template-areas: "prepend content actions"
grid-template-columns: max-content auto max-content
grid-template-rows: max-content max-content
line-height: $banner-line-height
overflow: hidden
padding-inline: $banner-padding-inline-start $banner-padding-inline-end
padding-top: $banner-padding * 2
padding-bottom: $banner-padding * 2
position: relative
width: $banner-width
@include tools.border($banner-border...)
@include tools.elevation($banner-elevation)
@include tools.position($banner-positions)
@include tools.rounded($banner-border-radius)
@include tools.theme($banner-theme...)
&--rounded
@include tools.rounded($banner-rounded-border-radius)
&--stacked
&:not(.v-banner--one-line)
grid-template-areas: "prepend content" ". actions"
.v-banner-text
padding-inline-end: $banner-stacked-padding-inline-end
@at-root
@include tools.density('v-banner', $banner-density) using ($modifier)
.v-banner-actions
margin-bottom: -($banner-padding + $modifier)
&.v-banner--one-line
padding-top: $banner-padding + $modifier
padding-bottom: $banner-padding + $modifier
.v-banner-actions
margin-bottom: 0
@if ($modifier == 0px)
&.v-banner--one-line
padding-top: $banner-padding + $modifier + 2
&.v-banner--two-line
padding-top: $banner-padding * 2 + $modifier
padding-bottom: $banner-padding * 2 + $modifier
&.v-banner--three-line
padding-top: $banner-padding * 3 + $modifier
padding-bottom: $banner-padding * 2 + $modifier
&:not(.v-banner--one-line),
&.v-banner--two-line,
&.v-banner--three-line
.v-banner-actions
margin-top: $banner-action-margin + $modifier
&--sticky
top: $banner-sticky-top
.v-banner__content
align-items: center
display: flex
grid-area: content
.v-banner__prepend
align-self: flex-start
grid-area: prepend
margin-inline-end: $banner-prepend-margin-end
.v-banner-actions
align-self: flex-end
display: flex
flex: 0 1
grid-area: actions
justify-content: flex-end
.v-banner--two-line &,
.v-banner--three-line &
margin-top: $banner-actions-line-margin-top
.v-banner-text
-webkit-box-orient: vertical
display: -webkit-box
padding-inline-end: $banner-text-padding-end
overflow: hidden
.v-banner--one-line &
-webkit-line-clamp: 1
.v-banner--two-line &
-webkit-line-clamp: 2
.v-banner--three-line &
-webkit-line-clamp: 3
.v-banner--two-line &,
.v-banner--three-line &
align-self: flex-start

View File

@ -0,0 +1,33 @@
import { createVNode as _createVNode } from "vue";
// Composables
import { makeComponentProps } from "../../composables/component.mjs";
import { provideDefaults } from "../../composables/defaults.mjs"; // Utilities
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
export const makeVBannerActionsProps = propsFactory({
color: String,
density: String,
...makeComponentProps()
}, 'VBannerActions');
export const VBannerActions = genericComponent()({
name: 'VBannerActions',
props: makeVBannerActionsProps(),
setup(props, _ref) {
let {
slots
} = _ref;
provideDefaults({
VBtn: {
color: props.color,
density: props.density,
slim: true,
variant: 'text'
}
});
useRender(() => _createVNode("div", {
"class": ['v-banner-actions', props.class],
"style": props.style
}, [slots.default?.()]));
return {};
}
});
//# sourceMappingURL=VBannerActions.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VBannerActions.mjs","names":["makeComponentProps","provideDefaults","genericComponent","propsFactory","useRender","makeVBannerActionsProps","color","String","density","VBannerActions","name","props","setup","_ref","slots","VBtn","slim","variant","_createVNode","class","style","default"],"sources":["../../../src/components/VBanner/VBannerActions.tsx"],"sourcesContent":["// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVBannerActionsProps = propsFactory({\n color: String,\n density: String,\n\n ...makeComponentProps(),\n}, 'VBannerActions')\n\nexport const VBannerActions = genericComponent()({\n name: 'VBannerActions',\n\n props: makeVBannerActionsProps(),\n\n setup (props, { slots }) {\n provideDefaults({\n VBtn: {\n color: props.color,\n density: props.density,\n slim: true,\n variant: 'text',\n },\n })\n\n useRender(() => (\n <div\n class={[\n 'v-banner-actions',\n props.class,\n ]}\n style={ props.style }\n >\n { slots.default?.() }\n </div>\n ))\n\n return {}\n },\n})\n\nexport type VBannerActions = InstanceType<typeof VBannerActions>\n"],"mappings":";AAAA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,eAAe,0CAExB;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAElD,OAAO,MAAMC,uBAAuB,GAAGF,YAAY,CAAC;EAClDG,KAAK,EAAEC,MAAM;EACbC,OAAO,EAAED,MAAM;EAEf,GAAGP,kBAAkB,CAAC;AACxB,CAAC,EAAE,gBAAgB,CAAC;AAEpB,OAAO,MAAMS,cAAc,GAAGP,gBAAgB,CAAC,CAAC,CAAC;EAC/CQ,IAAI,EAAE,gBAAgB;EAEtBC,KAAK,EAAEN,uBAAuB,CAAC,CAAC;EAEhCO,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrBZ,eAAe,CAAC;MACdc,IAAI,EAAE;QACJT,KAAK,EAAEK,KAAK,CAACL,KAAK;QAClBE,OAAO,EAAEG,KAAK,CAACH,OAAO;QACtBQ,IAAI,EAAE,IAAI;QACVC,OAAO,EAAE;MACX;IACF,CAAC,CAAC;IAEFb,SAAS,CAAC,MAAAc,YAAA;MAAA,SAEC,CACL,kBAAkB,EAClBP,KAAK,CAACQ,KAAK,CACZ;MAAA,SACOR,KAAK,CAACS;IAAK,IAEjBN,KAAK,CAACO,OAAO,GAAG,CAAC,EAEtB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,4 @@
// Utilities
import { createSimpleFunctional } from "../../util/index.mjs";
export const VBannerText = createSimpleFunctional('v-banner-text');
//# sourceMappingURL=VBannerText.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VBannerText.mjs","names":["createSimpleFunctional","VBannerText"],"sources":["../../../src/components/VBanner/VBannerText.ts"],"sourcesContent":["// Utilities\nimport { createSimpleFunctional } from '@/util'\n\nexport const VBannerText = createSimpleFunctional('v-banner-text')\n\nexport type VBannerText = InstanceType<typeof VBannerText>\n"],"mappings":"AAAA;AAAA,SACSA,sBAAsB;AAE/B,OAAO,MAAMC,WAAW,GAAGD,sBAAsB,CAAC,eAAe,CAAC"}

View File

@ -0,0 +1,46 @@
@use 'sass:map';
@use '../../styles/settings';
@use '../../styles/tools';
// Defaults
$banner-action-margin: 20px !default;
$banner-actions-line-margin-top: 20px !default;
$banner-background: rgb(var(--v-theme-surface)) !default;
$banner-border-color: settings.$border-color-root !default;
$banner-border-radius: map.get(settings.$rounded, 0) !default;
$banner-border-style: settings.$border-style-root !default;
$banner-border-thin-width: thin !default;
$banner-border-width: 0 0 thin 0 !default;
$banner-color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity)) !default;
$banner-density: ('default': 0, 'comfortable': -1, 'compact': -2) !default;
$banner-elevation: 0 !default;
$banner-font-size: tools.map-deep-get(settings.$typography, 'body-2', 'size') !default;
$banner-line-height: tools.map-deep-get(settings.$typography, 'subtitle-2', 'line-height') !default;
$banner-padding-inline-start: 16px !default;
$banner-padding-inline-end: 8px !default;
$banner-padding: 8px !default;
$banner-positions: absolute fixed sticky !default;
$banner-prepend-margin-end: 24px !default;
$banner-rounded-border-radius: settings.$border-radius-root !default;
$banner-stacked-padding-inline-end: 36px !default;
$banner-sticky-top: 0 !default;
$banner-text-padding-end: 90px !default;
$banner-width: 100% !default;
// Mobile
$banner-mobile-avatar-margin-end: 16px !default;
$banner-mobile-content-padding-end: 8px !default;
$banner-mobile-padding-end: 8px !default;
$banner-mobile-padding-start: 16px !default;
$banner-border: (
$banner-border-color,
$banner-border-style,
$banner-border-width,
$banner-border-thin-width
) !default;
$banner-theme: (
$banner-background,
$banner-color
) !default;

View File

@ -0,0 +1,574 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, JSXComponent, PropType } from 'vue';
type Density = null | 'default' | 'comfortable' | 'compact';
declare const breakpoints: readonly ["sm", "md", "lg", "xl", "xxl"];
type Breakpoint = typeof breakpoints[number];
type DisplayBreakpoint = 'xs' | Breakpoint;
declare const block: readonly ["top", "bottom"];
declare const inline: readonly ["start", "end", "left", "right"];
type Tblock = typeof block[number];
type Tinline = typeof inline[number];
type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
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 IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
declare const IconValue: PropType<IconValue>;
declare const VBanner: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
style: vue.StyleValue;
tag: string;
sticky: boolean;
density: Density;
stacked: boolean;
} & {
location?: Anchor | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
border?: string | number | boolean | undefined;
color?: string | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
text?: string | undefined;
class?: any;
icon?: IconValue | undefined;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
lines?: "one" | "two" | "three" | undefined;
avatar?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
prepend?: (() => vue.VNodeChild) | undefined;
text?: (() => vue.VNodeChild) | undefined;
actions?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
prepend?: false | (() => vue.VNodeChild) | undefined;
text?: false | (() => vue.VNodeChild) | undefined;
actions?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:text"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:actions"?: false | (() => vue.VNodeChild) | undefined;
}, void, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
style: vue.StyleValue;
tag: string;
sticky: boolean;
density: Density;
stacked: boolean;
} & {
location?: Anchor | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
border?: string | number | boolean | undefined;
color?: string | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
text?: string | undefined;
class?: any;
icon?: IconValue | undefined;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
lines?: "one" | "two" | "three" | undefined;
avatar?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
prepend?: (() => vue.VNodeChild) | undefined;
text?: (() => vue.VNodeChild) | undefined;
actions?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
prepend?: false | (() => vue.VNodeChild) | undefined;
text?: false | (() => vue.VNodeChild) | undefined;
actions?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:text"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:actions"?: false | (() => vue.VNodeChild) | undefined;
}, {
style: vue.StyleValue;
tag: string;
sticky: boolean;
rounded: string | number | boolean;
density: Density;
stacked: boolean;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
prepend: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
text: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
actions: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
style: vue.StyleValue;
tag: string;
sticky: boolean;
density: Density;
stacked: boolean;
} & {
location?: Anchor | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
border?: string | number | boolean | undefined;
color?: string | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
text?: string | undefined;
class?: any;
icon?: IconValue | undefined;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
lines?: "one" | "two" | "three" | undefined;
avatar?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
prepend?: (() => vue.VNodeChild) | undefined;
text?: (() => vue.VNodeChild) | undefined;
actions?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
prepend?: false | (() => vue.VNodeChild) | undefined;
text?: false | (() => vue.VNodeChild) | undefined;
actions?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:text"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:actions"?: false | (() => vue.VNodeChild) | undefined;
}, {}, {}, {}, {}, {
style: vue.StyleValue;
tag: string;
sticky: boolean;
rounded: string | number | boolean;
density: Density;
stacked: boolean;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
style: vue.StyleValue;
tag: string;
sticky: boolean;
density: Density;
stacked: boolean;
} & {
location?: Anchor | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
border?: string | number | boolean | undefined;
color?: string | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
position?: "fixed" | "absolute" | "static" | "sticky" | "relative" | undefined;
text?: string | undefined;
class?: any;
icon?: IconValue | undefined;
elevation?: string | number | undefined;
theme?: string | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
lines?: "one" | "two" | "three" | undefined;
avatar?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
prepend?: (() => vue.VNodeChild) | undefined;
text?: (() => vue.VNodeChild) | undefined;
actions?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
prepend?: false | (() => vue.VNodeChild) | undefined;
text?: false | (() => vue.VNodeChild) | undefined;
actions?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:text"?: false | (() => vue.VNodeChild) | undefined;
"v-slot:actions"?: false | (() => vue.VNodeChild) | undefined;
}, void, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
style: vue.StyleValue;
tag: string;
sticky: boolean;
rounded: string | number | boolean;
density: Density;
stacked: boolean;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
prepend: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
text: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
actions: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
theme: StringConstructor;
tag: {
type: StringConstructor;
default: string;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
position: {
type: PropType<"fixed" | "absolute" | "static" | "sticky" | "relative">;
validator: (v: any) => boolean;
};
location: PropType<Anchor>;
elevation: {
type: (StringConstructor | NumberConstructor)[];
validator(v: any): boolean;
};
mobileBreakpoint: PropType<number | DisplayBreakpoint>;
height: (StringConstructor | NumberConstructor)[];
maxHeight: (StringConstructor | NumberConstructor)[];
maxWidth: (StringConstructor | NumberConstructor)[];
minHeight: (StringConstructor | NumberConstructor)[];
minWidth: (StringConstructor | NumberConstructor)[];
width: (StringConstructor | NumberConstructor)[];
density: {
type: PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: PropType<any>;
style: {
type: PropType<vue.StyleValue>;
default: null;
};
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
avatar: StringConstructor;
bgColor: StringConstructor;
color: StringConstructor;
icon: PropType<IconValue>;
lines: PropType<"one" | "two" | "three">;
stacked: BooleanConstructor;
sticky: BooleanConstructor;
text: StringConstructor;
}, vue.ExtractPropTypes<{
theme: StringConstructor;
tag: {
type: StringConstructor;
default: string;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
position: {
type: PropType<"fixed" | "absolute" | "static" | "sticky" | "relative">;
validator: (v: any) => boolean;
};
location: PropType<Anchor>;
elevation: {
type: (StringConstructor | NumberConstructor)[];
validator(v: any): boolean;
};
mobileBreakpoint: PropType<number | DisplayBreakpoint>;
height: (StringConstructor | NumberConstructor)[];
maxHeight: (StringConstructor | NumberConstructor)[];
maxWidth: (StringConstructor | NumberConstructor)[];
minHeight: (StringConstructor | NumberConstructor)[];
minWidth: (StringConstructor | NumberConstructor)[];
width: (StringConstructor | NumberConstructor)[];
density: {
type: PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: PropType<any>;
style: {
type: PropType<vue.StyleValue>;
default: null;
};
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
avatar: StringConstructor;
bgColor: StringConstructor;
color: StringConstructor;
icon: PropType<IconValue>;
lines: PropType<"one" | "two" | "three">;
stacked: BooleanConstructor;
sticky: BooleanConstructor;
text: StringConstructor;
}>>;
type VBanner = InstanceType<typeof VBanner>;
declare const VBannerActions: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
style: vue.StyleValue;
} & {
color?: string | undefined;
class?: any;
density?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
style: vue.StyleValue;
} & {
color?: string | undefined;
class?: any;
density?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
style: vue.StyleValue;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
style: vue.StyleValue;
} & {
color?: string | undefined;
class?: any;
density?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, {}, {}, {}, {
style: vue.StyleValue;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
style: vue.StyleValue;
} & {
color?: string | undefined;
class?: any;
density?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
style: vue.StyleValue;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
color: StringConstructor;
density: StringConstructor;
}, vue.ExtractPropTypes<{
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
color: StringConstructor;
density: StringConstructor;
}>>;
type VBannerActions = InstanceType<typeof VBannerActions>;
declare const VBannerText: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
style: vue.StyleValue;
tag: string;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
style: vue.StyleValue;
tag: string;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
style: vue.StyleValue;
tag: string;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
style: vue.StyleValue;
tag: string;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>, {}, {}, {}, {
style: vue.StyleValue;
tag: string;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
style: vue.StyleValue;
tag: string;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
style: vue.StyleValue;
tag: string;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
tag: {
type: StringConstructor;
default: string;
};
}, vue.ExtractPropTypes<{
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
tag: {
type: StringConstructor;
default: string;
};
}>>;
type VBannerText = InstanceType<typeof VBannerText>;
export { VBanner, VBannerActions, VBannerText };

View File

@ -0,0 +1,4 @@
export { VBanner } from "./VBanner.mjs";
export { VBannerActions } from "./VBannerActions.mjs";
export { VBannerText } from "./VBannerText.mjs";
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.mjs","names":["VBanner","VBannerActions","VBannerText"],"sources":["../../../src/components/VBanner/index.ts"],"sourcesContent":["export { VBanner } from './VBanner'\nexport { VBannerActions } from './VBannerActions'\nexport { VBannerText } from './VBannerText'\n"],"mappings":"SAASA,OAAO;AAAA,SACPC,cAAc;AAAA,SACdC,WAAW"}

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"}

View File

@ -0,0 +1,33 @@
.bottom-sheet-transition-enter-from {
transform: translateY(100%);
}
.bottom-sheet-transition-leave-to {
transform: translateY(100%);
}
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content {
align-self: flex-end;
border-radius: 0;
flex: 0 1 auto;
left: 0;
right: 0;
margin-inline: 0;
margin-bottom: 0;
transition-duration: 0.2s;
width: 100%;
max-width: 100%;
overflow: visible;
box-shadow: 0px 7px 8px -4px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 12px 17px 2px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 5px 22px 4px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
}
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content > .v-card,
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content > .v-sheet {
border-radius: 0;
}
.v-bottom-sheet.v-bottom-sheet--inset {
max-width: none;
}
@media (min-width: 600px) {
.v-bottom-sheet.v-bottom-sheet--inset {
max-width: 70%;
}
}

View File

@ -0,0 +1,41 @@
import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from "vue";
// Styles
import "./VBottomSheet.css";
// Components
import { makeVDialogProps, VDialog } from "../VDialog/VDialog.mjs"; // Composables
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVBottomSheetProps = propsFactory({
inset: Boolean,
...makeVDialogProps({
transition: 'bottom-sheet-transition'
})
}, 'VBottomSheet');
export const VBottomSheet = genericComponent()({
name: 'VBottomSheet',
props: makeVBottomSheetProps(),
emits: {
'update:modelValue': value => true
},
setup(props, _ref) {
let {
slots
} = _ref;
const isActive = useProxiedModel(props, 'modelValue');
useRender(() => {
const dialogProps = VDialog.filterProps(props);
return _createVNode(VDialog, _mergeProps(dialogProps, {
"contentClass": ['v-bottom-sheet__content', props.contentClass],
"modelValue": isActive.value,
"onUpdate:modelValue": $event => isActive.value = $event,
"class": ['v-bottom-sheet', {
'v-bottom-sheet--inset': props.inset
}, props.class],
"style": props.style
}), slots);
});
return {};
}
});
//# sourceMappingURL=VBottomSheet.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VBottomSheet.mjs","names":["makeVDialogProps","VDialog","useProxiedModel","genericComponent","propsFactory","useRender","makeVBottomSheetProps","inset","Boolean","transition","VBottomSheet","name","props","emits","value","setup","_ref","slots","isActive","dialogProps","filterProps","_createVNode","_mergeProps","contentClass","$event","class","style"],"sources":["../../../src/components/VBottomSheet/VBottomSheet.tsx"],"sourcesContent":["// Styles\nimport './VBottomSheet.sass'\n\n// Components\nimport { makeVDialogProps, VDialog } from '@/components/VDialog/VDialog'\n\n// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { OverlaySlots } from '@/components/VOverlay/VOverlay'\n\nexport const makeVBottomSheetProps = propsFactory({\n inset: Boolean,\n\n ...makeVDialogProps({\n transition: 'bottom-sheet-transition',\n }),\n}, 'VBottomSheet')\n\nexport const VBottomSheet = genericComponent<OverlaySlots>()({\n name: 'VBottomSheet',\n\n props: makeVBottomSheetProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n },\n\n setup (props, { slots }) {\n const isActive = useProxiedModel(props, 'modelValue')\n\n useRender(() => {\n const dialogProps = VDialog.filterProps(props)\n\n return (\n <VDialog\n { ...dialogProps }\n contentClass={[\n 'v-bottom-sheet__content',\n props.contentClass,\n ]}\n v-model={ isActive.value }\n class={[\n 'v-bottom-sheet',\n {\n 'v-bottom-sheet--inset': props.inset,\n },\n props.class,\n ]}\n style={ props.style }\n v-slots={ slots }\n />\n )\n })\n\n return {}\n },\n})\n\nexport type VBottomSheet = InstanceType<typeof VBottomSheet>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,OAAO,kCAElC;AAAA,SACSC,eAAe,8CAExB;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAGA,OAAO,MAAMC,qBAAqB,GAAGF,YAAY,CAAC;EAChDG,KAAK,EAAEC,OAAO;EAEd,GAAGR,gBAAgB,CAAC;IAClBS,UAAU,EAAE;EACd,CAAC;AACH,CAAC,EAAE,cAAc,CAAC;AAElB,OAAO,MAAMC,YAAY,GAAGP,gBAAgB,CAAe,CAAC,CAAC;EAC3DQ,IAAI,EAAE,cAAc;EAEpBC,KAAK,EAAEN,qBAAqB,CAAC,CAAC;EAE9BO,KAAK,EAAE;IACL,mBAAmB,EAAGC,KAAc,IAAK;EAC3C,CAAC;EAEDC,KAAKA,CAAEH,KAAK,EAAAI,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,MAAME,QAAQ,GAAGhB,eAAe,CAACU,KAAK,EAAE,YAAY,CAAC;IAErDP,SAAS,CAAC,MAAM;MACd,MAAMc,WAAW,GAAGlB,OAAO,CAACmB,WAAW,CAACR,KAAK,CAAC;MAE9C,OAAAS,YAAA,CAAApB,OAAA,EAAAqB,WAAA,CAESH,WAAW;QAAA,gBACF,CACZ,yBAAyB,EACzBP,KAAK,CAACW,YAAY,CACnB;QAAA,cACSL,QAAQ,CAACJ,KAAK;QAAA,uBAAAU,MAAA,IAAdN,QAAQ,CAACJ,KAAK,GAAAU,MAAA;QAAA,SACjB,CACL,gBAAgB,EAChB;UACE,uBAAuB,EAAEZ,KAAK,CAACL;QACjC,CAAC,EACDK,KAAK,CAACa,KAAK,CACZ;QAAA,SACOb,KAAK,CAACc;MAAK,IACTT,KAAK;IAGrB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,38 @@
@use '../../styles/settings'
@use '../../styles/tools'
@use './variables' as *
// Transition
.bottom-sheet-transition
&-enter-from
transform: translateY(100%)
&-leave-to
transform: translateY(100%)
// Block
.v-bottom-sheet
> .v-bottom-sheet__content.v-overlay__content
align-self: flex-end
border-radius: 0
flex: 0 1 auto
left: 0
right: 0
margin-inline: 0
margin-bottom: 0
transition-duration: $bottom-sheet-transition-duration
width: 100%
max-width: 100%
overflow: visible
@include tools.elevation($bottom-sheet-elevation)
> .v-card,
> .v-sheet
border-radius: $bottom-sheet-border-radius
&.v-bottom-sheet--inset
max-width: none
@media #{map-get(settings.$display-breakpoints, 'sm-and-up')}
max-width: $bottom-sheet-inset-width

View File

@ -0,0 +1,6 @@
@use '../../styles/settings';
$bottom-sheet-elevation: 12 !default;
$bottom-sheet-inset-width: 70% !default;
$bottom-sheet-border-radius: 0 !default;
$bottom-sheet-transition-duration: .2s !default;

View File

@ -0,0 +1,790 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, Ref, EffectScope } from 'vue';
declare const block: readonly ["top", "bottom"];
declare const inline: readonly ["start", "end", "left", "right"];
type Tblock = typeof block[number];
type Tinline = typeof inline[number];
type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
declare class Box {
x: number;
y: number;
width: number;
height: number;
constructor({ x, y, width, height }: {
x: number;
y: number;
width: number;
height: number;
});
get top(): number;
get bottom(): number;
get left(): number;
get right(): number;
}
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>>;
}
interface LocationStrategyData {
contentEl: Ref<HTMLElement | undefined>;
target: Ref<HTMLElement | [x: number, y: number] | undefined>;
isActive: Ref<boolean>;
isRtl: Ref<boolean>;
}
type LocationStrategyFn = (data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => undefined | {
updateLocation: (e: Event) => void;
};
declare const locationStrategies: {
static: typeof staticLocationStrategy;
connected: typeof connectedLocationStrategy;
};
interface StrategyProps$1 {
locationStrategy: keyof typeof locationStrategies | LocationStrategyFn;
location: Anchor;
origin: Anchor | 'auto' | 'overlap';
offset?: number | string | number[];
maxHeight?: number | string;
maxWidth?: number | string;
minHeight?: number | string;
minWidth?: number | string;
}
declare function staticLocationStrategy(): void;
declare function connectedLocationStrategy(data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>): {
updateLocation: () => {
available: {
x: number;
y: number;
};
contentBox: Box;
} | undefined;
};
interface ScrollStrategyData {
root: Ref<HTMLElement | undefined>;
contentEl: Ref<HTMLElement | undefined>;
targetEl: Ref<HTMLElement | undefined>;
isActive: Ref<boolean>;
updateLocation: Ref<((e: Event) => void) | undefined>;
}
type ScrollStrategyFn = (data: ScrollStrategyData, props: StrategyProps, scope: EffectScope) => void;
declare const scrollStrategies: {
none: null;
close: typeof closeScrollStrategy;
block: typeof blockScrollStrategy;
reposition: typeof repositionScrollStrategy;
};
interface StrategyProps {
scrollStrategy: keyof typeof scrollStrategies | ScrollStrategyFn;
contained: boolean | undefined;
}
declare function closeScrollStrategy(data: ScrollStrategyData): void;
declare function blockScrollStrategy(data: ScrollStrategyData, props: StrategyProps): void;
declare function repositionScrollStrategy(data: ScrollStrategyData, props: StrategyProps, scope: EffectScope): void;
declare const VBottomSheet: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
absolute: boolean;
location: Anchor;
origin: NonNullable<"auto" | Anchor | "overlap">;
inset: boolean;
transition: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
zIndex: NonNullable<string | number>;
style: vue.StyleValue;
eager: boolean;
disabled: boolean;
modelValue: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
activatorProps: Record<string, any>;
openOnHover: boolean;
closeOnContentClick: boolean;
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
fullscreen: boolean;
retainFocus: boolean;
scrollable: boolean;
} & {
offset?: string | number | number[] | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
opacity?: string | number | undefined;
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
class?: any;
theme?: string | undefined;
contentClass?: any;
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
closeDelay?: string | number | undefined;
openDelay?: string | number | undefined;
openOnClick?: boolean | undefined;
openOnFocus?: boolean | undefined;
contentProps?: any;
attach?: string | boolean | Element | undefined;
} & {
$children?: vue.VNodeChild | {
default?: ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild);
'v-slots'?: {
default?: false | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: false | ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
"v-slot:activator"?: false | ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
'update:modelValue': (value: boolean) => boolean;
}, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
absolute: boolean;
location: Anchor;
origin: NonNullable<"auto" | Anchor | "overlap">;
inset: boolean;
transition: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
zIndex: NonNullable<string | number>;
style: vue.StyleValue;
eager: boolean;
disabled: boolean;
modelValue: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
activatorProps: Record<string, any>;
openOnHover: boolean;
closeOnContentClick: boolean;
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
fullscreen: boolean;
retainFocus: boolean;
scrollable: boolean;
} & {
offset?: string | number | number[] | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
opacity?: string | number | undefined;
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
class?: any;
theme?: string | undefined;
contentClass?: any;
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
closeDelay?: string | number | undefined;
openDelay?: string | number | undefined;
openOnClick?: boolean | undefined;
openOnFocus?: boolean | undefined;
contentProps?: any;
attach?: string | boolean | Element | undefined;
} & {
$children?: vue.VNodeChild | {
default?: ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild);
'v-slots'?: {
default?: false | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: false | ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
"v-slot:activator"?: false | ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
}, {
absolute: boolean;
location: Anchor;
origin: NonNullable<"auto" | Anchor | "overlap">;
inset: boolean;
transition: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
zIndex: NonNullable<string | number>;
style: vue.StyleValue;
eager: boolean;
disabled: boolean;
modelValue: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
activatorProps: Record<string, any>;
openOnClick: boolean;
openOnHover: boolean;
openOnFocus: boolean;
closeOnContentClick: boolean;
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
fullscreen: boolean;
retainFocus: boolean;
scrollable: boolean;
}, true, {}, vue.SlotsType<Partial<{
default: (arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
activator: (arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
absolute: boolean;
location: Anchor;
origin: NonNullable<"auto" | Anchor | "overlap">;
inset: boolean;
transition: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
zIndex: NonNullable<string | number>;
style: vue.StyleValue;
eager: boolean;
disabled: boolean;
modelValue: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
activatorProps: Record<string, any>;
openOnHover: boolean;
closeOnContentClick: boolean;
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
fullscreen: boolean;
retainFocus: boolean;
scrollable: boolean;
} & {
offset?: string | number | number[] | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
opacity?: string | number | undefined;
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
class?: any;
theme?: string | undefined;
contentClass?: any;
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
closeDelay?: string | number | undefined;
openDelay?: string | number | undefined;
openOnClick?: boolean | undefined;
openOnFocus?: boolean | undefined;
contentProps?: any;
attach?: string | boolean | Element | undefined;
} & {
$children?: vue.VNodeChild | {
default?: ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild);
'v-slots'?: {
default?: false | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: false | ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
"v-slot:activator"?: false | ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
}, {}, {}, {}, {}, {
absolute: boolean;
location: Anchor;
origin: NonNullable<"auto" | Anchor | "overlap">;
inset: boolean;
transition: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
zIndex: NonNullable<string | number>;
style: vue.StyleValue;
eager: boolean;
disabled: boolean;
modelValue: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
activatorProps: Record<string, any>;
openOnClick: boolean;
openOnHover: boolean;
openOnFocus: boolean;
closeOnContentClick: boolean;
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
fullscreen: boolean;
retainFocus: boolean;
scrollable: boolean;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
absolute: boolean;
location: Anchor;
origin: NonNullable<"auto" | Anchor | "overlap">;
inset: boolean;
transition: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
zIndex: NonNullable<string | number>;
style: vue.StyleValue;
eager: boolean;
disabled: boolean;
modelValue: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
activatorProps: Record<string, any>;
openOnHover: boolean;
closeOnContentClick: boolean;
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
fullscreen: boolean;
retainFocus: boolean;
scrollable: boolean;
} & {
offset?: string | number | number[] | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
opacity?: string | number | undefined;
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
class?: any;
theme?: string | undefined;
contentClass?: any;
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
closeDelay?: string | number | undefined;
openDelay?: string | number | undefined;
openOnClick?: boolean | undefined;
openOnFocus?: boolean | undefined;
contentProps?: any;
attach?: string | boolean | Element | undefined;
} & {
$children?: vue.VNodeChild | {
default?: ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild);
'v-slots'?: {
default?: false | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: false | ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNodeChild) | undefined;
"v-slot:activator"?: false | ((arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
'update:modelValue': (value: boolean) => boolean;
}, string, {
absolute: boolean;
location: Anchor;
origin: NonNullable<"auto" | Anchor | "overlap">;
inset: boolean;
transition: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
zIndex: NonNullable<string | number>;
style: vue.StyleValue;
eager: boolean;
disabled: boolean;
modelValue: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
activatorProps: Record<string, any>;
openOnClick: boolean;
openOnHover: boolean;
openOnFocus: boolean;
closeOnContentClick: boolean;
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
fullscreen: boolean;
retainFocus: boolean;
scrollable: boolean;
}, {}, string, vue.SlotsType<Partial<{
default: (arg: {
isActive: vue.Ref<boolean>;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
activator: (arg: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
transition: Omit<Omit<{
type: vue.PropType<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
default: string;
validator: (val: unknown) => boolean;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
default: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
};
}, "type" | "default"> & {
type: vue.PropType<NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>>;
default: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
};
theme: StringConstructor;
scrollStrategy: Omit<{
type: vue.PropType<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
default: string;
validator: (val: any) => boolean;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">>;
default: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
};
locationStrategy: {
type: vue.PropType<"connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined)>;
default: string;
validator: (val: any) => boolean;
};
location: {
type: vue.PropType<Anchor>;
default: string;
};
origin: Omit<{
type: vue.PropType<"auto" | Anchor | "overlap">;
default: string;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<"auto" | Anchor | "overlap">>;
default: NonNullable<"auto" | Anchor | "overlap">;
};
offset: vue.PropType<string | number | number[] | undefined>;
eager: BooleanConstructor;
height: (StringConstructor | NumberConstructor)[];
maxHeight: (StringConstructor | NumberConstructor)[];
maxWidth: (StringConstructor | NumberConstructor)[];
minHeight: (StringConstructor | NumberConstructor)[];
minWidth: (StringConstructor | NumberConstructor)[];
width: (StringConstructor | NumberConstructor)[];
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
closeDelay: (StringConstructor | NumberConstructor)[];
openDelay: (StringConstructor | NumberConstructor)[];
target: vue.PropType<Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined>;
activator: vue.PropType<Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined>;
activatorProps: {
type: vue.PropType<Record<string, any>>;
default: () => {};
};
openOnClick: {
type: BooleanConstructor;
default: undefined;
};
openOnHover: BooleanConstructor;
openOnFocus: {
type: BooleanConstructor;
default: undefined;
};
closeOnContentClick: BooleanConstructor;
absolute: BooleanConstructor;
attach: vue.PropType<string | boolean | Element>;
closeOnBack: {
type: BooleanConstructor;
default: boolean;
};
contained: BooleanConstructor;
contentClass: null;
contentProps: null;
disabled: BooleanConstructor;
opacity: (StringConstructor | NumberConstructor)[];
noClickAnimation: BooleanConstructor;
modelValue: BooleanConstructor;
persistent: BooleanConstructor;
scrim: {
type: (StringConstructor | BooleanConstructor)[];
default: boolean;
};
zIndex: Omit<{
type: (StringConstructor | NumberConstructor)[];
default: number;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<string | number>>;
default: NonNullable<string | number>;
};
fullscreen: BooleanConstructor;
retainFocus: {
type: BooleanConstructor;
default: boolean;
};
scrollable: BooleanConstructor;
inset: BooleanConstructor;
}, vue.ExtractPropTypes<{
transition: Omit<Omit<{
type: vue.PropType<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})>;
default: string;
validator: (val: unknown) => boolean;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
default: NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
};
}, "type" | "default"> & {
type: vue.PropType<NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>>;
default: NonNullable<NonNullable<string | boolean | (vue.TransitionProps & {
component?: vue.Component | undefined;
})> | {
component: vue.Component;
}>;
};
theme: StringConstructor;
scrollStrategy: Omit<{
type: vue.PropType<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
default: string;
validator: (val: any) => boolean;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">>;
default: NonNullable<"none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition">;
};
locationStrategy: {
type: vue.PropType<"connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: vue.Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined)>;
default: string;
validator: (val: any) => boolean;
};
location: {
type: vue.PropType<Anchor>;
default: string;
};
origin: Omit<{
type: vue.PropType<"auto" | Anchor | "overlap">;
default: string;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<"auto" | Anchor | "overlap">>;
default: NonNullable<"auto" | Anchor | "overlap">;
};
offset: vue.PropType<string | number | number[] | undefined>;
eager: BooleanConstructor;
height: (StringConstructor | NumberConstructor)[];
maxHeight: (StringConstructor | NumberConstructor)[];
maxWidth: (StringConstructor | NumberConstructor)[];
minHeight: (StringConstructor | NumberConstructor)[];
minWidth: (StringConstructor | NumberConstructor)[];
width: (StringConstructor | NumberConstructor)[];
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
closeDelay: (StringConstructor | NumberConstructor)[];
openDelay: (StringConstructor | NumberConstructor)[];
target: vue.PropType<Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined>;
activator: vue.PropType<Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined>;
activatorProps: {
type: vue.PropType<Record<string, any>>;
default: () => {};
};
openOnClick: {
type: BooleanConstructor;
default: undefined;
};
openOnHover: BooleanConstructor;
openOnFocus: {
type: BooleanConstructor;
default: undefined;
};
closeOnContentClick: BooleanConstructor;
absolute: BooleanConstructor;
attach: vue.PropType<string | boolean | Element>;
closeOnBack: {
type: BooleanConstructor;
default: boolean;
};
contained: BooleanConstructor;
contentClass: null;
contentProps: null;
disabled: BooleanConstructor;
opacity: (StringConstructor | NumberConstructor)[];
noClickAnimation: BooleanConstructor;
modelValue: BooleanConstructor;
persistent: BooleanConstructor;
scrim: {
type: (StringConstructor | BooleanConstructor)[];
default: boolean;
};
zIndex: Omit<{
type: (StringConstructor | NumberConstructor)[];
default: number;
}, "type" | "default"> & {
type: vue.PropType<NonNullable<string | number>>;
default: NonNullable<string | number>;
};
fullscreen: BooleanConstructor;
retainFocus: {
type: BooleanConstructor;
default: boolean;
};
scrollable: BooleanConstructor;
inset: BooleanConstructor;
}>>;
type VBottomSheet = InstanceType<typeof VBottomSheet>;
export { VBottomSheet };

View File

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

View File

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

View File

@ -0,0 +1,58 @@
.v-breadcrumbs {
display: flex;
align-items: center;
line-height: 1.375rem;
padding: 16px 12px;
}
.v-breadcrumbs--rounded {
border-radius: 4px;
}
.v-breadcrumbs--density-default {
padding-top: 16px;
padding-bottom: 16px;
}
.v-breadcrumbs--density-comfortable {
padding-top: 12px;
padding-bottom: 12px;
}
.v-breadcrumbs--density-compact {
padding-top: 8px;
padding-bottom: 8px;
}
.v-breadcrumbs__prepend {
align-items: center;
display: inline-flex;
}
.v-breadcrumbs-item {
align-items: center;
color: inherit;
display: inline-flex;
padding: 0 4px;
text-decoration: none;
vertical-align: middle;
}
.v-breadcrumbs-item--disabled {
opacity: var(--v-disabled-opacity);
pointer-events: none;
}
.v-breadcrumbs-item--link {
color: inherit;
text-decoration: none;
}
.v-breadcrumbs-item--link:hover {
text-decoration: underline;
}
.v-breadcrumbs-item .v-icon {
font-size: 1rem;
margin-inline: -4px 2px;
}
.v-breadcrumbs-divider {
display: inline-block;
padding: 0 8px;
vertical-align: middle;
}

View File

@ -0,0 +1,132 @@
import { mergeProps as _mergeProps, Fragment as _Fragment, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
// Styles
import "./VBreadcrumbs.css";
// Components
import { VBreadcrumbsDivider } from "./VBreadcrumbsDivider.mjs";
import { VBreadcrumbsItem } from "./VBreadcrumbsItem.mjs";
import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs";
import { VIcon } from "../VIcon/index.mjs"; // Composables
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 { IconValue } from "../../composables/icons.mjs";
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
import { computed, toRef } from 'vue';
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVBreadcrumbsProps = propsFactory({
activeClass: String,
activeColor: String,
bgColor: String,
color: String,
disabled: Boolean,
divider: {
type: String,
default: '/'
},
icon: IconValue,
items: {
type: Array,
default: () => []
},
...makeComponentProps(),
...makeDensityProps(),
...makeRoundedProps(),
...makeTagProps({
tag: 'ul'
})
}, 'VBreadcrumbs');
export const VBreadcrumbs = genericComponent()({
name: 'VBreadcrumbs',
props: makeVBreadcrumbsProps(),
setup(props, _ref) {
let {
slots
} = _ref;
const {
backgroundColorClasses,
backgroundColorStyles
} = useBackgroundColor(toRef(props, 'bgColor'));
const {
densityClasses
} = useDensity(props);
const {
roundedClasses
} = useRounded(props);
provideDefaults({
VBreadcrumbsDivider: {
divider: toRef(props, 'divider')
},
VBreadcrumbsItem: {
activeClass: toRef(props, 'activeClass'),
activeColor: toRef(props, 'activeColor'),
color: toRef(props, 'color'),
disabled: toRef(props, 'disabled')
}
});
const items = computed(() => props.items.map(item => {
return typeof item === 'string' ? {
item: {
title: item
},
raw: item
} : {
item,
raw: item
};
}));
useRender(() => {
const hasPrepend = !!(slots.prepend || props.icon);
return _createVNode(props.tag, {
"class": ['v-breadcrumbs', backgroundColorClasses.value, densityClasses.value, roundedClasses.value, props.class],
"style": [backgroundColorStyles.value, props.style]
}, {
default: () => [hasPrepend && _createVNode("li", {
"key": "prepend",
"class": "v-breadcrumbs__prepend"
}, [!slots.prepend ? _createVNode(VIcon, {
"key": "prepend-icon",
"start": true,
"icon": props.icon
}, null) : _createVNode(VDefaultsProvider, {
"key": "prepend-defaults",
"disabled": !props.icon,
"defaults": {
VIcon: {
icon: props.icon,
start: true
}
}
}, slots.prepend)]), items.value.map((_ref2, index, array) => {
let {
item,
raw
} = _ref2;
return _createVNode(_Fragment, null, [slots.item?.({
item,
index
}) ?? _createVNode(VBreadcrumbsItem, _mergeProps({
"key": index,
"disabled": index >= array.length - 1
}, typeof item === 'string' ? {
title: item
} : item), {
default: slots.title ? () => slots.title?.({
item,
index
}) : undefined
}), index < array.length - 1 && _createVNode(VBreadcrumbsDivider, null, {
default: slots.divider ? () => slots.divider?.({
item: raw,
index
}) : undefined
})]);
}), slots.default?.()]
});
});
return {};
}
});
//# sourceMappingURL=VBreadcrumbs.mjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,48 @@
@use '../../styles/tools'
@use './variables' as *
.v-breadcrumbs
display: flex
align-items: center
line-height: $breadcrumbs-line-height
padding: $breadcrumbs-padding-y $breadcrumbs-padding-x
&--rounded
@include tools.rounded($breadcrumbs-rounded-border-radius)
@at-root
@include tools.density('v-breadcrumbs', $breadcrumbs-density) using ($modifier)
padding-top: #{$breadcrumbs-padding-y + $modifier}
padding-bottom: #{$breadcrumbs-padding-y + $modifier}
.v-breadcrumbs__prepend
align-items: center
display: inline-flex
.v-breadcrumbs-item
align-items: center
color: inherit
display: inline-flex
padding: $breadcrumbs-item-padding
text-decoration: none
vertical-align: $breadcrumbs-vertical-align
&--disabled
opacity: $breadcrumbs-item-disabled-opacity
pointer-events: none
&--link
color: inherit
text-decoration: none
&--link:hover
text-decoration: $breadcrumbs-item-link-text-decoration
.v-icon
font-size: $breadcrumbs-item-icon-font-size
margin-inline: $breadcrumbs-item-icon-margin-inline-start $breadcrumbs-item-icon-margin-inline-end
.v-breadcrumbs-divider
display: inline-block
padding: $breadcrumbs-divider-padding
vertical-align: $breadcrumbs-vertical-align

View File

@ -0,0 +1,23 @@
import { createVNode as _createVNode } from "vue";
// Composables
import { makeComponentProps } from "../../composables/component.mjs"; // Utilities
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
export const makeVBreadcrumbsDividerProps = propsFactory({
divider: [Number, String],
...makeComponentProps()
}, 'VBreadcrumbsDivider');
export const VBreadcrumbsDivider = genericComponent()({
name: 'VBreadcrumbsDivider',
props: makeVBreadcrumbsDividerProps(),
setup(props, _ref) {
let {
slots
} = _ref;
useRender(() => _createVNode("li", {
"class": ['v-breadcrumbs-divider', props.class],
"style": props.style
}, [slots?.default?.() ?? props.divider]));
return {};
}
});
//# sourceMappingURL=VBreadcrumbsDivider.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VBreadcrumbsDivider.mjs","names":["makeComponentProps","genericComponent","propsFactory","useRender","makeVBreadcrumbsDividerProps","divider","Number","String","VBreadcrumbsDivider","name","props","setup","_ref","slots","_createVNode","class","style","default"],"sources":["../../../src/components/VBreadcrumbs/VBreadcrumbsDivider.tsx"],"sourcesContent":["// Composables\nimport { makeComponentProps } from '@/composables/component'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVBreadcrumbsDividerProps = propsFactory({\n divider: [Number, String],\n\n ...makeComponentProps(),\n}, 'VBreadcrumbsDivider')\n\nexport const VBreadcrumbsDivider = genericComponent()({\n name: 'VBreadcrumbsDivider',\n\n props: makeVBreadcrumbsDividerProps(),\n\n setup (props, { slots }) {\n useRender(() => (\n <li\n class={[\n 'v-breadcrumbs-divider',\n props.class,\n ]}\n style={ props.style }\n >\n { slots?.default?.() ?? props.divider }\n </li>\n ))\n\n return {}\n },\n})\n\nexport type VBreadcrumbsDivider = InstanceType<typeof VBreadcrumbsDivider>\n"],"mappings":";AAAA;AAAA,SACSA,kBAAkB,2CAE3B;AAAA,SACSC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAElD,OAAO,MAAMC,4BAA4B,GAAGF,YAAY,CAAC;EACvDG,OAAO,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;EAEzB,GAAGP,kBAAkB,CAAC;AACxB,CAAC,EAAE,qBAAqB,CAAC;AAEzB,OAAO,MAAMQ,mBAAmB,GAAGP,gBAAgB,CAAC,CAAC,CAAC;EACpDQ,IAAI,EAAE,qBAAqB;EAE3BC,KAAK,EAAEN,4BAA4B,CAAC,CAAC;EAErCO,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrBT,SAAS,CAAC,MAAAW,YAAA;MAAA,SAEC,CACL,uBAAuB,EACvBJ,KAAK,CAACK,KAAK,CACZ;MAAA,SACOL,KAAK,CAACM;IAAK,IAEjBH,KAAK,EAAEI,OAAO,GAAG,CAAC,IAAIP,KAAK,CAACL,OAAO,EAExC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,58 @@
import { createVNode as _createVNode } from "vue";
// Composables
import { useTextColor } from "../../composables/color.mjs";
import { makeComponentProps } from "../../composables/component.mjs";
import { makeRouterProps, useLink } from "../../composables/router.mjs";
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
import { computed } from 'vue';
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
export const makeVBreadcrumbsItemProps = propsFactory({
active: Boolean,
activeClass: String,
activeColor: String,
color: String,
disabled: Boolean,
title: String,
...makeComponentProps(),
...makeRouterProps(),
...makeTagProps({
tag: 'li'
})
}, 'VBreadcrumbsItem');
export const VBreadcrumbsItem = genericComponent()({
name: 'VBreadcrumbsItem',
props: makeVBreadcrumbsItemProps(),
setup(props, _ref) {
let {
slots,
attrs
} = _ref;
const link = useLink(props, attrs);
const isActive = computed(() => props.active || link.isActive?.value);
const color = computed(() => isActive.value ? props.activeColor : props.color);
const {
textColorClasses,
textColorStyles
} = useTextColor(color);
useRender(() => {
return _createVNode(props.tag, {
"class": ['v-breadcrumbs-item', {
'v-breadcrumbs-item--active': isActive.value,
'v-breadcrumbs-item--disabled': props.disabled,
[`${props.activeClass}`]: isActive.value && props.activeClass
}, textColorClasses.value, props.class],
"style": [textColorStyles.value, props.style],
"aria-current": isActive.value ? 'page' : undefined
}, {
default: () => [!link.isLink.value ? slots.default?.() ?? props.title : _createVNode("a", {
"class": "v-breadcrumbs-item--link",
"href": link.href.value,
"aria-current": isActive.value ? 'page' : undefined,
"onClick": link.navigate
}, [slots.default?.() ?? props.title])]
});
});
return {};
}
});
//# sourceMappingURL=VBreadcrumbsItem.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VBreadcrumbsItem.mjs","names":["useTextColor","makeComponentProps","makeRouterProps","useLink","makeTagProps","computed","genericComponent","propsFactory","useRender","makeVBreadcrumbsItemProps","active","Boolean","activeClass","String","activeColor","color","disabled","title","tag","VBreadcrumbsItem","name","props","setup","_ref","slots","attrs","link","isActive","value","textColorClasses","textColorStyles","_createVNode","class","style","undefined","default","isLink","href","navigate"],"sources":["../../../src/components/VBreadcrumbs/VBreadcrumbsItem.tsx"],"sourcesContent":["// Composables\nimport { useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeRouterProps, useLink } from '@/composables/router'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { computed } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVBreadcrumbsItemProps = propsFactory({\n active: Boolean,\n activeClass: String,\n activeColor: String,\n color: String,\n disabled: Boolean,\n title: String,\n\n ...makeComponentProps(),\n ...makeRouterProps(),\n ...makeTagProps({ tag: 'li' }),\n}, 'VBreadcrumbsItem')\n\nexport const VBreadcrumbsItem = genericComponent()({\n name: 'VBreadcrumbsItem',\n\n props: makeVBreadcrumbsItemProps(),\n\n setup (props, { slots, attrs }) {\n const link = useLink(props, attrs)\n const isActive = computed(() => props.active || link.isActive?.value)\n const color = computed(() => isActive.value ? props.activeColor : props.color)\n\n const { textColorClasses, textColorStyles } = useTextColor(color)\n\n useRender(() => {\n return (\n <props.tag\n class={[\n 'v-breadcrumbs-item',\n {\n 'v-breadcrumbs-item--active': isActive.value,\n 'v-breadcrumbs-item--disabled': props.disabled,\n [`${props.activeClass}`]: isActive.value && props.activeClass,\n },\n textColorClasses.value,\n props.class,\n ]}\n style={[\n textColorStyles.value,\n props.style,\n ]}\n aria-current={ isActive.value ? 'page' : undefined }\n >\n { !link.isLink.value ? slots.default?.() ?? props.title : (\n <a\n class=\"v-breadcrumbs-item--link\"\n href={ link.href.value }\n aria-current={ isActive.value ? 'page' : undefined }\n onClick={ link.navigate }\n >\n { slots.default?.() ?? props.title }\n </a>\n )}\n </props.tag>\n )\n })\n return {}\n },\n})\n\nexport type VBreadcrumbsItem = InstanceType<typeof VBreadcrumbsItem>\n"],"mappings":";AAAA;AAAA,SACSA,YAAY;AAAA,SACZC,kBAAkB;AAAA,SAClBC,eAAe,EAAEC,OAAO;AAAA,SACxBC,YAAY,qCAErB;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAElD,OAAO,MAAMC,yBAAyB,GAAGF,YAAY,CAAC;EACpDG,MAAM,EAAEC,OAAO;EACfC,WAAW,EAAEC,MAAM;EACnBC,WAAW,EAAED,MAAM;EACnBE,KAAK,EAAEF,MAAM;EACbG,QAAQ,EAAEL,OAAO;EACjBM,KAAK,EAAEJ,MAAM;EAEb,GAAGZ,kBAAkB,CAAC,CAAC;EACvB,GAAGC,eAAe,CAAC,CAAC;EACpB,GAAGE,YAAY,CAAC;IAAEc,GAAG,EAAE;EAAK,CAAC;AAC/B,CAAC,EAAE,kBAAkB,CAAC;AAEtB,OAAO,MAAMC,gBAAgB,GAAGb,gBAAgB,CAAC,CAAC,CAAC;EACjDc,IAAI,EAAE,kBAAkB;EAExBC,KAAK,EAAEZ,yBAAyB,CAAC,CAAC;EAElCa,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAoB;IAAA,IAAlB;MAAEC,KAAK;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC5B,MAAMG,IAAI,GAAGvB,OAAO,CAACkB,KAAK,EAAEI,KAAK,CAAC;IAClC,MAAME,QAAQ,GAAGtB,QAAQ,CAAC,MAAMgB,KAAK,CAACX,MAAM,IAAIgB,IAAI,CAACC,QAAQ,EAAEC,KAAK,CAAC;IACrE,MAAMb,KAAK,GAAGV,QAAQ,CAAC,MAAMsB,QAAQ,CAACC,KAAK,GAAGP,KAAK,CAACP,WAAW,GAAGO,KAAK,CAACN,KAAK,CAAC;IAE9E,MAAM;MAAEc,gBAAgB;MAAEC;IAAgB,CAAC,GAAG9B,YAAY,CAACe,KAAK,CAAC;IAEjEP,SAAS,CAAC,MAAM;MACd,OAAAuB,YAAA,CAAAV,KAAA,CAAAH,GAAA;QAAA,SAEW,CACL,oBAAoB,EACpB;UACE,4BAA4B,EAAES,QAAQ,CAACC,KAAK;UAC5C,8BAA8B,EAAEP,KAAK,CAACL,QAAQ;UAC9C,CAAE,GAAEK,KAAK,CAACT,WAAY,EAAC,GAAGe,QAAQ,CAACC,KAAK,IAAIP,KAAK,CAACT;QACpD,CAAC,EACDiB,gBAAgB,CAACD,KAAK,EACtBP,KAAK,CAACW,KAAK,CACZ;QAAA,SACM,CACLF,eAAe,CAACF,KAAK,EACrBP,KAAK,CAACY,KAAK,CACZ;QAAA,gBACcN,QAAQ,CAACC,KAAK,GAAG,MAAM,GAAGM;MAAS;QAAAC,OAAA,EAAAA,CAAA,MAEhD,CAACT,IAAI,CAACU,MAAM,CAACR,KAAK,GAAGJ,KAAK,CAACW,OAAO,GAAG,CAAC,IAAId,KAAK,CAACJ,KAAK,GAAAc,YAAA;UAAA;UAAA,QAG5CL,IAAI,CAACW,IAAI,CAACT,KAAK;UAAA,gBACPD,QAAQ,CAACC,KAAK,GAAG,MAAM,GAAGM,SAAS;UAAA,WACxCR,IAAI,CAACY;QAAQ,IAErBd,KAAK,CAACW,OAAO,GAAG,CAAC,IAAId,KAAK,CAACJ,KAAK,EAErC;MAAA;IAGP,CAAC,CAAC;IACF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,17 @@
@use '../../styles/settings';
@use '../../styles/tools';
// Defaults
$breadcrumbs-density: ('default': 0, 'comfortable': -1, 'compact': -2) !default;
$breadcrumbs-divider-padding: 0 8px !default;
$breadcrumbs-item-disabled-opacity: var(--v-disabled-opacity) !default;
$breadcrumbs-item-icon-font-size: tools.map-deep-get(settings.$typography, 'body-1', 'size') !default;
$breadcrumbs-item-icon-margin-inline-end: 2px !default;
$breadcrumbs-item-icon-margin-inline-start: -4px !default;
$breadcrumbs-item-link-text-decoration: underline !default;
$breadcrumbs-item-padding: 0 4px !default;
$breadcrumbs-line-height: tools.map-deep-get(settings.$typography, 'subtitle-2', 'line-height') !default;
$breadcrumbs-padding-y: 16px !default;
$breadcrumbs-padding-x: 12px !default;
$breadcrumbs-rounded-border-radius: settings.$border-radius-root !default;
$breadcrumbs-vertical-align: middle !default;

View File

@ -0,0 +1,586 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, JSXComponent, PropType } from 'vue';
// @ts-ignore
import * as vue_router from 'vue-router';
// @ts-ignore
import { RouteLocationRaw } from 'vue-router';
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';
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
declare const IconValue: PropType<IconValue>;
interface LinkProps {
href: string | undefined;
replace: boolean | undefined;
to: RouteLocationRaw | undefined;
exact: boolean | undefined;
}
type BreadcrumbItem = string | (Partial<LinkProps> & {
title: string;
disabled?: boolean;
});
declare const VBreadcrumbs: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
style: vue.StyleValue;
disabled: boolean;
tag: string;
divider: string;
density: Density;
} & {
color?: string | undefined;
class?: any;
icon?: IconValue | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
activeClass?: string | undefined;
activeColor?: string | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<Record<string, any>, "$children" | "v-slot:default" | "v-slots" | "items" | "v-slot:title" | "v-slot:prepend" | "v-slot:item" | "v-slot:divider">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
style: vue.StyleValue;
disabled: boolean;
tag: string;
divider: string;
density: Density;
} & {
color?: string | undefined;
class?: any;
icon?: IconValue | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
activeClass?: string | undefined;
activeColor?: string | undefined;
}, {
style: vue.StyleValue;
disabled: boolean;
tag: string;
divider: string;
rounded: string | number | boolean;
density: Density;
}, true, {}, vue.SlotsType<Partial<{
prepend: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
title: (arg: {
item: BreadcrumbItem;
index: number;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
divider: (arg: {
item: BreadcrumbItem;
index: number;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
item: (arg: {
item: BreadcrumbItem;
index: number;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
style: vue.StyleValue;
disabled: boolean;
tag: string;
divider: string;
density: Density;
} & {
color?: string | undefined;
class?: any;
icon?: IconValue | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
activeClass?: string | undefined;
activeColor?: string | undefined;
}, {}, {}, {}, {}, {
style: vue.StyleValue;
disabled: boolean;
tag: string;
divider: string;
rounded: string | number | boolean;
density: Density;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
style: vue.StyleValue;
disabled: boolean;
tag: string;
divider: string;
density: Density;
} & {
color?: string | undefined;
class?: any;
icon?: IconValue | undefined;
rounded?: string | number | boolean | undefined;
bgColor?: string | undefined;
activeClass?: string | undefined;
activeColor?: string | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<Record<string, any>, "$children" | "v-slot:default" | "v-slots" | "items" | "v-slot:title" | "v-slot:prepend" | "v-slot:item" | "v-slot:divider">, string, {
style: vue.StyleValue;
disabled: boolean;
tag: string;
divider: string;
rounded: string | number | boolean;
density: Density;
}, {}, string, vue.SlotsType<Partial<{
prepend: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
title: (arg: {
item: BreadcrumbItem;
index: number;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
divider: (arg: {
item: BreadcrumbItem;
index: number;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
item: (arg: {
item: BreadcrumbItem;
index: number;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T extends BreadcrumbItem>(props: {
items?: T[] | undefined;
}, slots: {
prepend: never;
title: {
item: T;
index: number;
};
divider: {
item: T;
index: number;
};
item: {
item: T;
index: number;
};
default: never;
}) => GenericProps<{
items?: T[] | undefined;
}, {
prepend: never;
title: {
item: T;
index: number;
};
divider: {
item: T;
index: number;
};
item: {
item: T;
index: number;
};
default: never;
}>) & FilterPropsOptions<{
tag: Omit<{
type: StringConstructor;
default: string;
}, "type" | "default"> & {
type: PropType<string>;
default: string;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
density: {
type: PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: PropType<any>;
style: {
type: PropType<vue.StyleValue>;
default: null;
};
activeClass: StringConstructor;
activeColor: StringConstructor;
bgColor: StringConstructor;
color: StringConstructor;
disabled: BooleanConstructor;
divider: {
type: StringConstructor;
default: string;
};
icon: PropType<IconValue>;
items: {
type: PropType<readonly BreadcrumbItem[]>;
default: () => never[];
};
}, vue.ExtractPropTypes<{
tag: Omit<{
type: StringConstructor;
default: string;
}, "type" | "default"> & {
type: PropType<string>;
default: string;
};
rounded: {
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
default: undefined;
};
density: {
type: PropType<Density>;
default: string;
validator: (v: any) => boolean;
};
class: PropType<any>;
style: {
type: PropType<vue.StyleValue>;
default: null;
};
activeClass: StringConstructor;
activeColor: StringConstructor;
bgColor: StringConstructor;
color: StringConstructor;
disabled: BooleanConstructor;
divider: {
type: StringConstructor;
default: string;
};
icon: PropType<IconValue>;
items: {
type: PropType<readonly BreadcrumbItem[]>;
default: () => never[];
};
}>>;
type VBreadcrumbs = InstanceType<typeof VBreadcrumbs>;
declare const VBreadcrumbsItem: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
replace: boolean;
exact: boolean;
active: boolean;
style: vue.StyleValue;
disabled: boolean;
tag: string;
} & {
color?: string | undefined;
title?: string | undefined;
class?: any;
href?: string | undefined;
to?: vue_router.RouteLocationRaw | undefined;
activeClass?: string | undefined;
activeColor?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
replace: boolean;
exact: boolean;
active: boolean;
style: vue.StyleValue;
disabled: boolean;
tag: string;
} & {
color?: string | undefined;
title?: string | undefined;
class?: any;
href?: string | undefined;
to?: vue_router.RouteLocationRaw | undefined;
activeClass?: string | undefined;
activeColor?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
replace: boolean;
exact: boolean;
active: boolean;
style: vue.StyleValue;
disabled: boolean;
tag: string;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
replace: boolean;
exact: boolean;
active: boolean;
style: vue.StyleValue;
disabled: boolean;
tag: string;
} & {
color?: string | undefined;
title?: string | undefined;
class?: any;
href?: string | undefined;
to?: vue_router.RouteLocationRaw | undefined;
activeClass?: string | undefined;
activeColor?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, {}, {}, {}, {
replace: boolean;
exact: boolean;
active: boolean;
style: vue.StyleValue;
disabled: boolean;
tag: string;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
replace: boolean;
exact: boolean;
active: boolean;
style: vue.StyleValue;
disabled: boolean;
tag: string;
} & {
color?: string | undefined;
title?: string | undefined;
class?: any;
href?: string | undefined;
to?: vue_router.RouteLocationRaw | undefined;
activeClass?: string | undefined;
activeColor?: string | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
replace: boolean;
exact: boolean;
active: boolean;
style: vue.StyleValue;
disabled: boolean;
tag: string;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
tag: Omit<{
type: StringConstructor;
default: string;
}, "type" | "default"> & {
type: vue.PropType<string>;
default: string;
};
href: StringConstructor;
replace: BooleanConstructor;
to: vue.PropType<vue_router.RouteLocationRaw>;
exact: BooleanConstructor;
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
active: BooleanConstructor;
activeClass: StringConstructor;
activeColor: StringConstructor;
color: StringConstructor;
disabled: BooleanConstructor;
title: StringConstructor;
}, vue.ExtractPropTypes<{
tag: Omit<{
type: StringConstructor;
default: string;
}, "type" | "default"> & {
type: vue.PropType<string>;
default: string;
};
href: StringConstructor;
replace: BooleanConstructor;
to: vue.PropType<vue_router.RouteLocationRaw>;
exact: BooleanConstructor;
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
active: BooleanConstructor;
activeClass: StringConstructor;
activeColor: StringConstructor;
color: StringConstructor;
disabled: BooleanConstructor;
title: StringConstructor;
}>>;
type VBreadcrumbsItem = InstanceType<typeof VBreadcrumbsItem>;
declare const VBreadcrumbsDivider: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
style: vue.StyleValue;
} & {
class?: any;
divider?: string | number | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
style: vue.StyleValue;
} & {
class?: any;
divider?: string | number | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {
style: vue.StyleValue;
}, true, {}, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
style: vue.StyleValue;
} & {
class?: any;
divider?: string | number | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, {}, {}, {}, {
style: vue.StyleValue;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
style: vue.StyleValue;
} & {
class?: any;
divider?: string | number | undefined;
} & {
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
default?: (() => vue.VNodeChild) | undefined;
};
'v-slots'?: {
default?: false | (() => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
style: vue.StyleValue;
}, {}, string, vue.SlotsType<Partial<{
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
divider: (StringConstructor | NumberConstructor)[];
}, vue.ExtractPropTypes<{
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
divider: (StringConstructor | NumberConstructor)[];
}>>;
type VBreadcrumbsDivider = InstanceType<typeof VBreadcrumbsDivider>;
export { VBreadcrumbs, VBreadcrumbsDivider, VBreadcrumbsItem };

View File

@ -0,0 +1,4 @@
export { VBreadcrumbs } from "./VBreadcrumbs.mjs";
export { VBreadcrumbsItem } from "./VBreadcrumbsItem.mjs";
export { VBreadcrumbsDivider } from "./VBreadcrumbsDivider.mjs";
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.mjs","names":["VBreadcrumbs","VBreadcrumbsItem","VBreadcrumbsDivider"],"sources":["../../../src/components/VBreadcrumbs/index.ts"],"sourcesContent":["export { VBreadcrumbs } from './VBreadcrumbs'\nexport { VBreadcrumbsItem } from './VBreadcrumbsItem'\nexport { VBreadcrumbsDivider } from './VBreadcrumbsDivider'\n"],"mappings":"SAASA,YAAY;AAAA,SACZC,gBAAgB;AAAA,SAChBC,mBAAmB"}

403
VApp/node_modules/vuetify/lib/components/VBtn/VBtn.css generated vendored Normal file
View File

@ -0,0 +1,403 @@
.v-btn {
align-items: center;
border-radius: 4px;
display: inline-grid;
grid-template-areas: "prepend content append";
grid-template-columns: max-content auto max-content;
font-weight: 500;
justify-content: center;
letter-spacing: 0.0892857143em;
line-height: normal;
max-width: 100%;
outline: none;
position: relative;
text-decoration: none;
text-indent: 0.0892857143em;
text-transform: uppercase;
transition-property: box-shadow, transform, opacity, background;
transition-duration: 0.28s;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
user-select: none;
vertical-align: middle;
flex-shrink: 0;
border-color: rgba(var(--v-border-color), var(--v-border-opacity));
border-style: solid;
border-width: 0;
}
.v-btn--size-x-small {
--v-btn-size: 0.625rem;
--v-btn-height: 20px;
font-size: var(--v-btn-size);
min-width: 36px;
padding: 0 8px;
}
.v-btn--size-small {
--v-btn-size: 0.75rem;
--v-btn-height: 28px;
font-size: var(--v-btn-size);
min-width: 50px;
padding: 0 12px;
}
.v-btn--size-default {
--v-btn-size: 0.875rem;
--v-btn-height: 36px;
font-size: var(--v-btn-size);
min-width: 64px;
padding: 0 16px;
}
.v-btn--size-large {
--v-btn-size: 1rem;
--v-btn-height: 44px;
font-size: var(--v-btn-size);
min-width: 78px;
padding: 0 20px;
}
.v-btn--size-x-large {
--v-btn-size: 1.125rem;
--v-btn-height: 52px;
font-size: var(--v-btn-size);
min-width: 92px;
padding: 0 24px;
}
.v-btn.v-btn--density-default {
height: calc(var(--v-btn-height) + 0px);
}
.v-btn.v-btn--density-comfortable {
height: calc(var(--v-btn-height) + -8px);
}
.v-btn.v-btn--density-compact {
height: calc(var(--v-btn-height) + -12px);
}
.v-btn--border {
border-width: thin;
box-shadow: none;
}
.v-btn--absolute {
position: absolute;
}
.v-btn--fixed {
position: fixed;
}
.v-btn:hover > .v-btn__overlay {
opacity: calc(var(--v-hover-opacity) * var(--v-theme-overlay-multiplier));
}
.v-btn:focus-visible > .v-btn__overlay {
opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
}
@supports not selector(:focus-visible) {
.v-btn:focus > .v-btn__overlay {
opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
}
}
.v-btn--active > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true] > .v-btn__overlay {
opacity: calc(var(--v-activated-opacity) * var(--v-theme-overlay-multiplier));
}
.v-btn--active:hover > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:hover > .v-btn__overlay {
opacity: calc((var(--v-activated-opacity) + var(--v-hover-opacity)) * var(--v-theme-overlay-multiplier));
}
.v-btn--active:focus-visible > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:focus-visible > .v-btn__overlay {
opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
}
@supports not selector(:focus-visible) {
.v-btn--active:focus > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:focus > .v-btn__overlay {
opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
}
}
.v-btn--variant-plain, .v-btn--variant-outlined, .v-btn--variant-text, .v-btn--variant-tonal {
background: transparent;
color: inherit;
}
.v-btn--variant-plain {
opacity: 0.62;
}
.v-btn--variant-plain:focus, .v-btn--variant-plain:hover {
opacity: 1;
}
.v-btn--variant-plain .v-btn__overlay {
display: none;
}
.v-btn--variant-elevated, .v-btn--variant-flat {
background: rgb(var(--v-theme-surface));
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
}
.v-btn--variant-elevated {
box-shadow: 0px 3px 1px -2px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 2px 2px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 5px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
}
.v-btn--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-btn--variant-outlined {
border: thin solid currentColor;
}
.v-btn--variant-text .v-btn__overlay {
background: currentColor;
}
.v-btn--variant-tonal .v-btn__underlay {
background: currentColor;
opacity: var(--v-activated-opacity);
border-radius: inherit;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
}
@supports selector(:focus-visible) {
.v-btn::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
border: 2px solid currentColor;
border-radius: inherit;
opacity: 0;
transition: opacity 0.2s ease-in-out;
}
.v-btn:focus-visible::after {
opacity: calc(0.25 * var(--v-theme-overlay-multiplier));
}
}
.v-btn--icon {
border-radius: 50%;
min-width: 0;
padding: 0;
}
.v-btn--icon.v-btn--size-default {
--v-btn-size: 1rem;
}
.v-btn--icon.v-btn--density-default {
width: calc(var(--v-btn-height) + 12px);
height: calc(var(--v-btn-height) + 12px);
}
.v-btn--icon.v-btn--density-comfortable {
width: calc(var(--v-btn-height) + 0px);
height: calc(var(--v-btn-height) + 0px);
}
.v-btn--icon.v-btn--density-compact {
width: calc(var(--v-btn-height) + -8px);
height: calc(var(--v-btn-height) + -8px);
}
.v-btn--elevated:hover, .v-btn--elevated:focus {
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-btn--elevated:active {
box-shadow: 0px 5px 5px -3px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 8px 10px 1px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 3px 14px 2px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
}
.v-btn--flat {
box-shadow: none;
}
.v-btn--block {
display: flex;
flex: 1 0 auto;
min-width: 100%;
}
.v-btn--disabled {
pointer-events: none;
opacity: 0.26;
}
.v-btn--disabled:hover {
opacity: 0.26;
}
.v-btn--disabled.v-btn--variant-elevated, .v-btn--disabled.v-btn--variant-flat {
box-shadow: none;
opacity: 1;
color: rgba(var(--v-theme-on-surface), 0.26);
background: rgb(var(--v-theme-surface));
}
.v-btn--disabled.v-btn--variant-elevated .v-btn__overlay, .v-btn--disabled.v-btn--variant-flat .v-btn__overlay {
opacity: 0.4615384615;
}
.v-btn--loading {
pointer-events: none;
}
.v-btn--loading .v-btn__content,
.v-btn--loading .v-btn__prepend,
.v-btn--loading .v-btn__append {
opacity: 0;
}
.v-btn--stacked {
grid-template-areas: "prepend" "content" "append";
grid-template-columns: auto;
grid-template-rows: max-content max-content max-content;
justify-items: center;
align-content: center;
}
.v-btn--stacked .v-btn__content {
flex-direction: column;
line-height: 1.25;
}
.v-btn--stacked .v-btn__prepend,
.v-btn--stacked .v-btn__append,
.v-btn--stacked .v-btn__content > .v-icon--start,
.v-btn--stacked .v-btn__content > .v-icon--end {
margin-inline: 0;
}
.v-btn--stacked .v-btn__prepend,
.v-btn--stacked .v-btn__content > .v-icon--start {
margin-bottom: 4px;
}
.v-btn--stacked .v-btn__append,
.v-btn--stacked .v-btn__content > .v-icon--end {
margin-top: 4px;
}
.v-btn--stacked.v-btn--size-x-small {
--v-btn-size: 0.625rem;
--v-btn-height: 56px;
font-size: var(--v-btn-size);
min-width: 56px;
padding: 0 12px;
}
.v-btn--stacked.v-btn--size-small {
--v-btn-size: 0.75rem;
--v-btn-height: 64px;
font-size: var(--v-btn-size);
min-width: 64px;
padding: 0 14px;
}
.v-btn--stacked.v-btn--size-default {
--v-btn-size: 0.875rem;
--v-btn-height: 72px;
font-size: var(--v-btn-size);
min-width: 72px;
padding: 0 16px;
}
.v-btn--stacked.v-btn--size-large {
--v-btn-size: 1rem;
--v-btn-height: 80px;
font-size: var(--v-btn-size);
min-width: 80px;
padding: 0 18px;
}
.v-btn--stacked.v-btn--size-x-large {
--v-btn-size: 1.125rem;
--v-btn-height: 88px;
font-size: var(--v-btn-size);
min-width: 88px;
padding: 0 20px;
}
.v-btn--stacked.v-btn--density-default {
height: calc(var(--v-btn-height) + 0px);
}
.v-btn--stacked.v-btn--density-comfortable {
height: calc(var(--v-btn-height) + -16px);
}
.v-btn--stacked.v-btn--density-compact {
height: calc(var(--v-btn-height) + -24px);
}
.v-btn--slim {
padding: 0 8px;
}
.v-btn--rounded {
border-radius: 24px;
}
.v-btn--rounded.v-btn--icon {
border-radius: 4px;
}
.v-btn .v-icon {
--v-icon-size-multiplier: 0.8571428571;
}
.v-btn--icon .v-icon {
--v-icon-size-multiplier: 1;
}
.v-btn--stacked .v-icon {
--v-icon-size-multiplier: 1.1428571429;
}
.v-btn__loader {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
.v-btn__content,
.v-btn__prepend,
.v-btn__append {
align-items: center;
display: flex;
transition: transform, opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.v-btn__prepend {
grid-area: prepend;
margin-inline: calc(var(--v-btn-height) / -9) calc(var(--v-btn-height) / 4.5);
}
.v-btn__append {
grid-area: append;
margin-inline: calc(var(--v-btn-height) / 4.5) calc(var(--v-btn-height) / -9);
}
.v-btn__content {
grid-area: content;
justify-content: center;
white-space: nowrap;
}
.v-btn__content > .v-icon--start {
margin-inline: calc(var(--v-btn-height) / -9) calc(var(--v-btn-height) / 4.5);
}
.v-btn__content > .v-icon--end {
margin-inline: calc(var(--v-btn-height) / 4.5) calc(var(--v-btn-height) / -9);
}
.v-btn--stacked .v-btn__content {
white-space: normal;
}
.v-btn__overlay {
background-color: currentColor;
border-radius: inherit;
opacity: 0;
transition: opacity 0.2s ease-in-out;
}
.v-btn__overlay,
.v-btn__underlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.v-card-actions .v-btn ~ .v-btn:not(.v-btn-toggle .v-btn) {
margin-inline-start: 0.5rem;
}
.v-pagination .v-btn {
border-radius: 4px;
}
.v-pagination .v-btn--rounded {
border-radius: 50%;
}
.v-btn__overlay {
transition: none;
}
.v-pagination__item--is-active .v-btn__overlay {
opacity: var(--v-border-opacity);
}

231
VApp/node_modules/vuetify/lib/components/VBtn/VBtn.mjs generated vendored Normal file
View File

@ -0,0 +1,231 @@
import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
// Styles
import "./VBtn.css";
// Components
import { VBtnToggleSymbol } from "../VBtnToggle/VBtnToggle.mjs";
import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs";
import { VIcon } from "../VIcon/index.mjs";
import { VProgressCircular } from "../VProgressCircular/index.mjs"; // Composables
import { makeBorderProps, useBorder } from "../../composables/border.mjs";
import { makeComponentProps } from "../../composables/component.mjs";
import { makeDensityProps, useDensity } from "../../composables/density.mjs";
import { makeDimensionProps, useDimension } from "../../composables/dimensions.mjs";
import { makeElevationProps, useElevation } from "../../composables/elevation.mjs";
import { makeGroupItemProps, useGroupItem } from "../../composables/group.mjs";
import { IconValue } from "../../composables/icons.mjs";
import { makeLoaderProps, useLoader } from "../../composables/loader.mjs";
import { makeLocationProps, useLocation } from "../../composables/location.mjs";
import { makePositionProps, usePosition } from "../../composables/position.mjs";
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
import { makeRouterProps, useLink } from "../../composables/router.mjs";
import { useSelectLink } from "../../composables/selectLink.mjs";
import { makeSizeProps, useSize } from "../../composables/size.mjs";
import { makeTagProps } from "../../composables/tag.mjs";
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs";
import { genOverlays, makeVariantProps, useVariant } from "../../composables/variant.mjs"; // Directives
import { Ripple } from "../../directives/ripple/index.mjs"; // Utilities
import { computed } from 'vue';
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVBtnProps = propsFactory({
active: {
type: Boolean,
default: undefined
},
symbol: {
type: null,
default: VBtnToggleSymbol
},
flat: Boolean,
icon: [Boolean, String, Function, Object],
prependIcon: IconValue,
appendIcon: IconValue,
block: Boolean,
slim: Boolean,
stacked: Boolean,
ripple: {
type: [Boolean, Object],
default: true
},
text: String,
...makeBorderProps(),
...makeComponentProps(),
...makeDensityProps(),
...makeDimensionProps(),
...makeElevationProps(),
...makeGroupItemProps(),
...makeLoaderProps(),
...makeLocationProps(),
...makePositionProps(),
...makeRoundedProps(),
...makeRouterProps(),
...makeSizeProps(),
...makeTagProps({
tag: 'button'
}),
...makeThemeProps(),
...makeVariantProps({
variant: 'elevated'
})
}, 'VBtn');
export const VBtn = genericComponent()({
name: 'VBtn',
directives: {
Ripple
},
props: makeVBtnProps(),
emits: {
'group:selected': val => true
},
setup(props, _ref) {
let {
attrs,
slots
} = _ref;
const {
themeClasses
} = provideTheme(props);
const {
borderClasses
} = useBorder(props);
const {
colorClasses,
colorStyles,
variantClasses
} = useVariant(props);
const {
densityClasses
} = useDensity(props);
const {
dimensionStyles
} = useDimension(props);
const {
elevationClasses
} = useElevation(props);
const {
loaderClasses
} = useLoader(props);
const {
locationStyles
} = useLocation(props);
const {
positionClasses
} = usePosition(props);
const {
roundedClasses
} = useRounded(props);
const {
sizeClasses,
sizeStyles
} = useSize(props);
const group = useGroupItem(props, props.symbol, false);
const link = useLink(props, attrs);
const isActive = computed(() => {
if (props.active !== undefined) {
return props.active;
}
if (link.isLink.value) {
return link.isActive?.value;
}
return group?.isSelected.value;
});
const isDisabled = computed(() => group?.disabled.value || props.disabled);
const isElevated = computed(() => {
return props.variant === 'elevated' && !(props.disabled || props.flat || props.border);
});
const valueAttr = computed(() => {
if (props.value === undefined || typeof props.value === 'symbol') return undefined;
return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
});
function onClick(e) {
if (isDisabled.value || link.isLink.value && (e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0 || attrs.target === '_blank')) return;
link.navigate?.(e);
group?.toggle();
}
useSelectLink(link, group?.select);
useRender(() => {
const Tag = link.isLink.value ? 'a' : props.tag;
const hasPrepend = !!(props.prependIcon || slots.prepend);
const hasAppend = !!(props.appendIcon || slots.append);
const hasIcon = !!(props.icon && props.icon !== true);
const hasColor = group?.isSelected.value && (!link.isLink.value || link.isActive?.value) || !group || link.isActive?.value;
return _withDirectives(_createVNode(Tag, {
"type": Tag === 'a' ? undefined : 'button',
"class": ['v-btn', group?.selectedClass.value, {
'v-btn--active': isActive.value,
'v-btn--block': props.block,
'v-btn--disabled': isDisabled.value,
'v-btn--elevated': isElevated.value,
'v-btn--flat': props.flat,
'v-btn--icon': !!props.icon,
'v-btn--loading': props.loading,
'v-btn--slim': props.slim,
'v-btn--stacked': props.stacked
}, themeClasses.value, borderClasses.value, hasColor ? colorClasses.value : undefined, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
"style": [hasColor ? colorStyles.value : undefined, dimensionStyles.value, locationStyles.value, sizeStyles.value, props.style],
"disabled": isDisabled.value || undefined,
"href": link.href.value,
"onClick": onClick,
"value": valueAttr.value
}, {
default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && _createVNode("span", {
"key": "prepend",
"class": "v-btn__prepend"
}, [!slots.prepend ? _createVNode(VIcon, {
"key": "prepend-icon",
"icon": props.prependIcon
}, null) : _createVNode(VDefaultsProvider, {
"key": "prepend-defaults",
"disabled": !props.prependIcon,
"defaults": {
VIcon: {
icon: props.prependIcon
}
}
}, slots.prepend)]), _createVNode("span", {
"class": "v-btn__content",
"data-no-activator": ""
}, [!slots.default && hasIcon ? _createVNode(VIcon, {
"key": "content-icon",
"icon": props.icon
}, null) : _createVNode(VDefaultsProvider, {
"key": "content-defaults",
"disabled": !hasIcon,
"defaults": {
VIcon: {
icon: props.icon
}
}
}, {
default: () => [slots.default?.() ?? props.text]
})]), !props.icon && hasAppend && _createVNode("span", {
"key": "append",
"class": "v-btn__append"
}, [!slots.append ? _createVNode(VIcon, {
"key": "append-icon",
"icon": props.appendIcon
}, null) : _createVNode(VDefaultsProvider, {
"key": "append-defaults",
"disabled": !props.appendIcon,
"defaults": {
VIcon: {
icon: props.appendIcon
}
}
}, slots.append)]), !!props.loading && _createVNode("span", {
"key": "loader",
"class": "v-btn__loader"
}, [slots.loader?.() ?? _createVNode(VProgressCircular, {
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
"indeterminate": true,
"size": "23",
"width": "2"
}, null)])]
}), [[_resolveDirective("ripple"), !isDisabled.value && props.ripple, null]]);
});
return {
group
};
}
});
//# sourceMappingURL=VBtn.mjs.map

File diff suppressed because one or more lines are too long

236
VApp/node_modules/vuetify/lib/components/VBtn/VBtn.sass generated vendored Normal file
View File

@ -0,0 +1,236 @@
@use 'sass:math'
@use 'sass:map'
@use '../../styles/settings'
@use '../../styles/tools'
@use './mixins' as *
@use './variables' as *
.v-btn
align-items: center
border-radius: $button-border-radius
display: inline-grid
grid-template-areas: "prepend content append"
grid-template-columns: max-content auto max-content
font-weight: $button-font-weight
justify-content: center
letter-spacing: $button-text-letter-spacing
line-height: $button-line-height
max-width: $button-max-width
outline: none
position: relative
text-decoration: none
text-indent: $button-text-letter-spacing
text-transform: $button-text-transform
transition-property: $button-transition-property
transition-duration: 0.28s
transition-timing-function: settings.$standard-easing
user-select: none
vertical-align: $button-vertical-align
flex-shrink: 0
@at-root
@include button-sizes()
@include button-density('height', $button-density)
@include tools.border($button-border...)
@include tools.position($button-positions)
@include tools.states('.v-btn__overlay')
@include tools.variant($button-variants...)
@supports selector(:focus-visible)
&::after
@include tools.absolute(true)
pointer-events: none
border: 2px solid currentColor
border-radius: inherit
opacity: 0
transition: opacity .2s ease-in-out
&:focus-visible::after
opacity: calc(.25 * var(--v-theme-overlay-multiplier))
&--icon
border-radius: $button-icon-border-radius
min-width: 0
padding: 0
// ensure that default
// v-icon size is 24px
&.v-btn--size-default
--v-btn-size: #{$button-icon-font-size}
@at-root &
@include button-density(('width', 'height'), $button-icon-density)
&--elevated
&:hover,
&:focus
+tools.elevation(map.get($button-elevation, 'hover'))
&:active
+tools.elevation(map.get($button-elevation, 'active'))
&--flat
box-shadow: none
&--block
display: flex
flex: 1 0 auto
min-width: 100%
&--disabled
pointer-events: none
@if ($button-colored-disabled)
opacity: $button-disabled-opacity
&:hover
opacity: $button-disabled-opacity
@else
opacity: 1
&.v-btn
// specificity has to be higher to override theme !important
color: rgba(var(--v-theme-on-surface), $button-disabled-opacity) !important
&.v-btn--variant-elevated,
&.v-btn--variant-flat
box-shadow: none
@if ($button-colored-disabled)
opacity: 1
color: rgba(var(--v-theme-on-surface), $button-disabled-opacity)
background: rgb(var(--v-theme-surface))
@else
background: rgb(var(--v-theme-surface)) !important
.v-btn__overlay
// __overlay uses currentColor, so we need to divide
// by the text opacity to get the correct value
opacity: math.div($button-disabled-overlay, $button-disabled-opacity)
&--loading
pointer-events: none
.v-btn__content,
.v-btn__prepend,
.v-btn__append
opacity: 0
&--stacked
grid-template-areas: "prepend" "content" "append"
grid-template-columns: auto
grid-template-rows: max-content max-content max-content
justify-items: center
align-content: center
.v-btn__content
flex-direction: column
line-height: $button-stacked-line-height
.v-btn__prepend,
.v-btn__append,
.v-btn__content > .v-icon--start,
.v-btn__content > .v-icon--end
margin-inline: 0
.v-btn__prepend,
.v-btn__content > .v-icon--start
margin-bottom: $button-stacked-icon-margin
.v-btn__append,
.v-btn__content > .v-icon--end
margin-top: $button-stacked-icon-margin
@at-root
@include button-sizes($button-stacked-sizes, true)
@include button-density('height', $button-stacked-density)
&--slim
padding: $button-slim-padding
&--rounded
@include tools.rounded($button-rounded-border-radius)
&.v-btn--icon
@include tools.rounded($button-border-radius)
.v-icon
--v-icon-size-multiplier: #{calc(18/21)}
&--icon
.v-icon
--v-icon-size-multiplier: 1
&--stacked
.v-icon
--v-icon-size-multiplier: #{calc(24/21)}
.v-btn__loader
align-items: center
display: flex
height: 100%
justify-content: center
left: 0
position: absolute
top: 0
width: 100%
.v-btn__content,
.v-btn__prepend,
.v-btn__append
align-items: center
display: flex
transition: $button-content-transition
.v-btn__prepend
grid-area: prepend
margin-inline: $button-margin-start $button-margin-end
.v-btn__append
grid-area: append
margin-inline: $button-margin-end $button-margin-start
.v-btn__content
grid-area: content
justify-content: center
white-space: $button-white-space
> .v-icon--start
margin-inline: $button-margin-start $button-margin-end
> .v-icon--end
margin-inline: $button-margin-end $button-margin-start
.v-btn--stacked &
white-space: normal
.v-btn__overlay
background-color: currentColor
border-radius: inherit
opacity: 0
transition: opacity .2s ease-in-out
.v-btn__overlay,
.v-btn__underlay
@include tools.absolute()
pointer-events: none
// VCard
.v-btn
~ .v-btn:not(.v-btn-toggle .v-btn)
.v-card-actions &
margin-inline-start: $button-card-actions-margin
// VPagination
.v-btn
.v-pagination &
@include tools.rounded($button-pagination-border-radius)
&--rounded
.v-pagination &
@include tools.rounded($button-pagination-rounded-border-radius)
&__overlay
transition: none
.v-pagination__item--is-active &
opacity: $button-pagination-active-overlay-opacity

View File

@ -0,0 +1,38 @@
@use 'sass:math';
@use 'sass:map';
@use 'sass:meta';
@use '../../styles/settings';
@use '../../styles/tools';
@use './variables' as *;
@mixin button-sizes ($map: $button-sizes, $immediate: false) {
@each $sizeName, $multiplier in settings.$size-scales {
$size: map.get($map, 'font-size') + math.div(2 * $multiplier, 16);
$height: map.get($map, 'height') + (settings.$size-scale * $multiplier);
#{if($immediate, &, '')}.v-btn--size-#{$sizeName} {
--v-btn-size: #{$size};
--v-btn-height: #{$height};
font-size: var(--v-btn-size);
min-width: tools.roundEven($height * map.get($map, 'width-ratio'));
padding: 0 tools.roundEven(math.div($height, map.get($map, 'padding-ratio')));
}
}
}
@mixin button-density ($properties, $densities) {
@each $density, $multiplier in $densities {
$value: calc(var(--v-btn-height) + #{$multiplier * settings.$spacer});
&.v-btn--density-#{$density} {
@if meta.type-of($properties) == "list" {
@each $property in $properties {
#{$property}: $value;
}
}
@else {
#{$properties}: $value;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More