vuetify 3.3.7 → 3.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +3 -3
- package/dist/json/importMap.json +76 -76
- package/dist/json/web-types.json +153 -153
- package/dist/vuetify-labs.css +471 -523
- package/dist/vuetify-labs.d.ts +65 -64
- package/dist/vuetify-labs.esm.js +149 -82
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +148 -81
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +49 -107
- package/dist/vuetify.d.ts +23 -23
- package/dist/vuetify.esm.js +92 -69
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +91 -68
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +116 -112
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.css +2 -2
- package/lib/components/VAutocomplete/VAutocomplete.sass +2 -2
- package/lib/components/VCarousel/VCarousel.mjs +58 -57
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.css +1 -0
- package/lib/components/VColorPicker/VColorPickerEdit.sass +1 -0
- package/lib/components/VColorPicker/VColorPickerPreview.css +1 -1
- package/lib/components/VColorPicker/_variables.scss +2 -1
- package/lib/components/VCombobox/VCombobox.css +2 -2
- package/lib/components/VCombobox/VCombobox.sass +2 -2
- package/lib/components/VField/VField.css +8 -70
- package/lib/components/VField/VField.mjs +1 -1
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +5 -8
- package/lib/components/VField/_variables.scss +3 -3
- package/lib/components/VList/VListItem.css +3 -0
- package/lib/components/VList/VListItem.sass +10 -3
- package/lib/components/VOverlay/VOverlay.mjs +2 -2
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/locationStrategies.mjs +6 -0
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +4 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VTextField/VTextField.css +1 -1
- package/lib/composables/filter.mjs +3 -2
- package/lib/composables/filter.mjs.map +1 -1
- package/lib/composables/theme.mjs +2 -2
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +23 -23
- package/lib/labs/VDataIterator/index.d.mts +1 -0
- package/lib/labs/VDataTable/VDataTableRows.mjs +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/items.mjs +1 -0
- package/lib/labs/VDataTable/composables/items.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.mts +47 -46
- package/lib/labs/VDataTable/types.mjs.map +1 -1
- package/lib/labs/VDateInput/composables.mjs +1 -1
- package/lib/labs/VDateInput/composables.mjs.map +1 -1
- package/lib/labs/VDateInput/index.d.mts +16 -16
- package/lib/labs/VDatePicker/VDatePicker.mjs +8 -7
- package/lib/labs/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/labs/VDatePicker/VDatePickerControls.css +7 -0
- package/lib/labs/VDatePicker/VDatePickerControls.mjs +1 -0
- package/lib/labs/VDatePicker/VDatePickerControls.mjs.map +1 -1
- package/lib/labs/VDatePicker/VDatePickerControls.sass +8 -0
- package/lib/labs/VDatePicker/composables.mjs +15 -2
- package/lib/labs/VDatePicker/composables.mjs.map +1 -1
- package/lib/labs/VDatePicker/index.d.mts +18 -18
- package/lib/labs/VDateRangePicker/VDateRangePicker.mjs +2 -4
- package/lib/labs/VDateRangePicker/VDateRangePicker.mjs.map +1 -1
- package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs +4 -5
- package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs.map +1 -1
- package/lib/labs/VDateRangePicker/index.d.mts +59 -51
- package/lib/labs/VPicker/VPicker.css +0 -1
- package/lib/labs/VPicker/VPicker.sass +0 -1
- package/lib/labs/components.d.mts +65 -64
- package/lib/labs/date/adapters/vuetify.mjs +14 -1
- package/lib/labs/date/adapters/vuetify.mjs.map +1 -1
- package/lib/labs/date/date.mjs +3 -3
- package/lib/labs/date/date.mjs.map +1 -1
- package/lib/labs/date/index.d.mts +25 -1
- package/package.json +2 -2
- package/lib/components/VField/_mixins.sass +0 -7
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
padding-inline-end: inherit;
|
|
64
64
|
}
|
|
65
65
|
.v-autocomplete--single .v-field--variant-outlined input {
|
|
66
|
-
top:
|
|
67
|
-
transform: translateY(-50%);
|
|
66
|
+
top: 50%;
|
|
67
|
+
transform: translateY(calc(-50% - (var(--v-input-chips-margin-top) + var(--v-input-chips-margin-bottom)) / 2));
|
|
68
68
|
}
|
|
69
69
|
.v-autocomplete--single .v-field--active input {
|
|
70
70
|
transition: none;
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
|
|
82
82
|
.v-field--variant-outlined
|
|
83
83
|
input
|
|
84
|
-
top:
|
|
85
|
-
transform: translateY(-50%)
|
|
84
|
+
top: 50%
|
|
85
|
+
transform: translateY(calc(-50% - (var(--v-input-chips-margin-top) + var(--v-input-chips-margin-bottom))/2))
|
|
86
86
|
|
|
87
87
|
.v-field--active
|
|
88
88
|
input
|
|
@@ -68,64 +68,65 @@ export const VCarousel = genericComponent()({
|
|
|
68
68
|
window.clearTimeout(slideTimeout);
|
|
69
69
|
window.requestAnimationFrame(startTimeout);
|
|
70
70
|
}
|
|
71
|
-
useRender(() =>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
}, [group.items.value.length > 0 && _createVNode(VDefaultsProvider, {
|
|
98
|
-
"defaults": {
|
|
99
|
-
VBtn: {
|
|
100
|
-
color: props.color,
|
|
101
|
-
icon: props.delimiterIcon,
|
|
102
|
-
size: 'x-small',
|
|
103
|
-
variant: 'text'
|
|
71
|
+
useRender(() => {
|
|
72
|
+
const [windowProps] = VWindow.filterProps(props);
|
|
73
|
+
return _createVNode(VWindow, _mergeProps({
|
|
74
|
+
"ref": windowRef
|
|
75
|
+
}, windowProps, {
|
|
76
|
+
"modelValue": model.value,
|
|
77
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
78
|
+
"class": ['v-carousel', {
|
|
79
|
+
'v-carousel--hide-delimiter-background': props.hideDelimiterBackground,
|
|
80
|
+
'v-carousel--vertical-delimiters': props.verticalDelimiters
|
|
81
|
+
}, props.class],
|
|
82
|
+
"style": [{
|
|
83
|
+
height: convertToUnit(props.height)
|
|
84
|
+
}, props.style]
|
|
85
|
+
}), {
|
|
86
|
+
default: slots.default,
|
|
87
|
+
additional: _ref2 => {
|
|
88
|
+
let {
|
|
89
|
+
group
|
|
90
|
+
} = _ref2;
|
|
91
|
+
return _createVNode(_Fragment, null, [!props.hideDelimiters && _createVNode("div", {
|
|
92
|
+
"class": "v-carousel__controls",
|
|
93
|
+
"style": {
|
|
94
|
+
left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',
|
|
95
|
+
right: props.verticalDelimiters === 'right' ? 0 : 'auto'
|
|
104
96
|
}
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
97
|
+
}, [group.items.value.length > 0 && _createVNode(VDefaultsProvider, {
|
|
98
|
+
"defaults": {
|
|
99
|
+
VBtn: {
|
|
100
|
+
color: props.color,
|
|
101
|
+
icon: props.delimiterIcon,
|
|
102
|
+
size: 'x-small',
|
|
103
|
+
variant: 'text'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"scoped": true
|
|
107
|
+
}, {
|
|
108
|
+
default: () => [group.items.value.map((item, index) => {
|
|
109
|
+
const props = {
|
|
110
|
+
id: `carousel-item-${item.id}`,
|
|
111
|
+
'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),
|
|
112
|
+
class: [group.isSelected(item.id) && 'v-btn--active'],
|
|
113
|
+
onClick: () => group.select(item.id, true)
|
|
114
|
+
};
|
|
115
|
+
return slots.item ? slots.item({
|
|
116
|
+
props,
|
|
117
|
+
item
|
|
118
|
+
}) : _createVNode(VBtn, _mergeProps(item, props), null);
|
|
119
|
+
})]
|
|
120
|
+
})]), props.progress && _createVNode(VProgressLinear, {
|
|
121
|
+
"class": "v-carousel__progress",
|
|
122
|
+
"color": typeof props.progress === 'string' ? props.progress : undefined,
|
|
123
|
+
"modelValue": (group.getItemIndex(model.value) + 1) / group.items.value.length * 100
|
|
124
|
+
}, null)]);
|
|
125
|
+
},
|
|
126
|
+
prev: slots.prev,
|
|
127
|
+
next: slots.next
|
|
128
|
+
});
|
|
129
|
+
});
|
|
129
130
|
return {};
|
|
130
131
|
}
|
|
131
132
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCarousel.mjs","names":["VBtn","VDefaultsProvider","VProgressLinear","makeVWindowProps","VWindow","IconValue","useLocale","useProxiedModel","onMounted","ref","watch","convertToUnit","genericComponent","propsFactory","useRender","makeVCarouselProps","color","String","cycle","Boolean","delimiterIcon","type","default","height","Number","hideDelimiters","hideDelimiterBackground","interval","validator","value","progress","verticalDelimiters","continuous","mandatory","showArrows","VCarousel","name","props","emits","val","setup","_ref","slots","model","t","windowRef","slideTimeout","restartTimeout","window","clearTimeout","startTimeout","setTimeout","group","next","requestAnimationFrame","_createVNode","$event","class","style","additional","_ref2","_Fragment","left","right","items","length","icon","size","variant","map","item","index","id","isSelected","onClick","select","_mergeProps","undefined","getItemIndex","prev"],"sources":["../../../src/components/VCarousel/VCarousel.tsx"],"sourcesContent":["// Styles\nimport './VCarousel.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VProgressLinear } from '@/components/VProgressLinear'\nimport { makeVWindowProps, VWindow } from '@/components/VWindow/VWindow'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { onMounted, ref, watch } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VWindowSlots } from '@/components/VWindow/VWindow'\nimport type { GroupProvide } from '@/composables/group'\n\nexport const makeVCarouselProps = propsFactory({\n color: String,\n cycle: Boolean,\n delimiterIcon: {\n type: IconValue,\n default: '$delimiter',\n },\n height: {\n type: [Number, String],\n default: 500,\n },\n hideDelimiters: Boolean,\n hideDelimiterBackground: Boolean,\n interval: {\n type: [Number, String],\n default: 6000,\n validator: (value: string | number) => Number(value) > 0,\n },\n progress: [Boolean, String],\n verticalDelimiters: [Boolean, String] as PropType<boolean | 'left' | 'right'>,\n\n ...makeVWindowProps({\n continuous: true,\n mandatory: 'force' as const,\n showArrows: true,\n }),\n}, 'VCarousel')\n\ntype VCarouselSlots = VWindowSlots & {\n item: {\n props: Record<string, any>\n item: {\n id: number\n value: unknown\n disabled: boolean | undefined\n }\n }\n}\n\nexport const VCarousel = genericComponent<VCarouselSlots>()({\n name: 'VCarousel',\n\n props: makeVCarouselProps(),\n\n emits: {\n 'update:modelValue': (val: any) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { t } = useLocale()\n const windowRef = ref<typeof VWindow>()\n\n let slideTimeout = -1\n watch(model, restartTimeout)\n watch(() => props.interval, restartTimeout)\n watch(() => props.cycle, val => {\n if (val) restartTimeout()\n else window.clearTimeout(slideTimeout)\n })\n\n onMounted(startTimeout)\n\n function startTimeout () {\n if (!props.cycle || !windowRef.value) return\n\n slideTimeout = window.setTimeout(windowRef.value.group.next, +props.interval > 0 ? +props.interval : 6000)\n }\n\n function restartTimeout () {\n window.clearTimeout(slideTimeout)\n window.requestAnimationFrame(startTimeout)\n }\n\n useRender(() => (\n <VWindow\n ref={ windowRef }\n v-model={ model.value }\n class={[\n 'v-carousel',\n {\n 'v-carousel--hide-delimiter-background': props.hideDelimiterBackground,\n 'v-carousel--vertical-delimiters': props.verticalDelimiters,\n },\n props.class,\n ]}\n style={[\n { height: convertToUnit(props.height) },\n props.style,\n ]}\n continuous\n mandatory=\"force\"\n showArrows={ props.showArrows }\n >\n {{\n default: slots.default,\n additional: ({ group }: { group: GroupProvide }) => (\n <>\n { !props.hideDelimiters && (\n <div\n class=\"v-carousel__controls\"\n style={{\n left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',\n right: props.verticalDelimiters === 'right' ? 0 : 'auto',\n }}\n >\n { group.items.value.length > 0 && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n color: props.color,\n icon: props.delimiterIcon,\n size: 'x-small',\n variant: 'text',\n },\n }}\n scoped\n >\n { group.items.value.map((item, index) => {\n const props = {\n id: `carousel-item-${item.id}`,\n 'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),\n class: [group.isSelected(item.id) && 'v-btn--active'],\n onClick: () => group.select(item.id, true),\n }\n\n return slots.item\n ? slots.item({ props, item })\n : (<VBtn { ...item } { ...props } />)\n })}\n </VDefaultsProvider>\n )}\n </div>\n )}\n\n { props.progress && (\n <VProgressLinear\n class=\"v-carousel__progress\"\n color={ typeof props.progress === 'string' ? props.progress : undefined }\n modelValue={ (group.getItemIndex(model.value) + 1) / group.items.value.length * 100 }\n />\n )}\n </>\n ),\n prev: slots.prev,\n next: slots.next,\n }}\n </VWindow>\n ))\n\n return {}\n },\n})\n\nexport type VCarousel = InstanceType<typeof VCarousel>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,OAAO,kCAElC;AAAA,SACSC,SAAS;AAAA,SACTC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,SAAS,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAClCC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAEjE;AAKA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,KAAK,EAAEC,MAAM;EACbC,KAAK,EAAEC,OAAO;EACdC,aAAa,EAAE;IACbC,IAAI,EAAEhB,SAAS;IACfiB,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNF,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;IACtBK,OAAO,EAAE;EACX,CAAC;EACDG,cAAc,EAAEN,OAAO;EACvBO,uBAAuB,EAAEP,OAAO;EAChCQ,QAAQ,EAAE;IACRN,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;IACtBK,OAAO,EAAE,IAAI;IACbM,SAAS,EAAGC,KAAsB,IAAKL,MAAM,CAACK,KAAK,CAAC,GAAG;EACzD,CAAC;EACDC,QAAQ,EAAE,CAACX,OAAO,EAAEF,MAAM,CAAC;EAC3Bc,kBAAkB,EAAE,CAACZ,OAAO,EAAEF,MAAM,CAAyC;EAE7E,GAAGd,gBAAgB,CAAC;IACl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AAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"VCarousel.mjs","names":["VBtn","VDefaultsProvider","VProgressLinear","makeVWindowProps","VWindow","IconValue","useLocale","useProxiedModel","onMounted","ref","watch","convertToUnit","genericComponent","propsFactory","useRender","makeVCarouselProps","color","String","cycle","Boolean","delimiterIcon","type","default","height","Number","hideDelimiters","hideDelimiterBackground","interval","validator","value","progress","verticalDelimiters","continuous","mandatory","showArrows","VCarousel","name","props","emits","val","setup","_ref","slots","model","t","windowRef","slideTimeout","restartTimeout","window","clearTimeout","startTimeout","setTimeout","group","next","requestAnimationFrame","windowProps","filterProps","_createVNode","_mergeProps","$event","class","style","additional","_ref2","_Fragment","left","right","items","length","icon","size","variant","map","item","index","id","isSelected","onClick","select","undefined","getItemIndex","prev"],"sources":["../../../src/components/VCarousel/VCarousel.tsx"],"sourcesContent":["// Styles\nimport './VCarousel.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VProgressLinear } from '@/components/VProgressLinear'\nimport { makeVWindowProps, VWindow } from '@/components/VWindow/VWindow'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { onMounted, ref, watch } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VWindowSlots } from '@/components/VWindow/VWindow'\nimport type { GroupProvide } from '@/composables/group'\n\nexport const makeVCarouselProps = propsFactory({\n color: String,\n cycle: Boolean,\n delimiterIcon: {\n type: IconValue,\n default: '$delimiter',\n },\n height: {\n type: [Number, String],\n default: 500,\n },\n hideDelimiters: Boolean,\n hideDelimiterBackground: Boolean,\n interval: {\n type: [Number, String],\n default: 6000,\n validator: (value: string | number) => Number(value) > 0,\n },\n progress: [Boolean, String],\n verticalDelimiters: [Boolean, String] as PropType<boolean | 'left' | 'right'>,\n\n ...makeVWindowProps({\n continuous: true,\n mandatory: 'force' as const,\n showArrows: true,\n }),\n}, 'VCarousel')\n\ntype VCarouselSlots = VWindowSlots & {\n item: {\n props: Record<string, any>\n item: {\n id: number\n value: unknown\n disabled: boolean | undefined\n }\n }\n}\n\nexport const VCarousel = genericComponent<VCarouselSlots>()({\n name: 'VCarousel',\n\n props: makeVCarouselProps(),\n\n emits: {\n 'update:modelValue': (val: any) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { t } = useLocale()\n const windowRef = ref<typeof VWindow>()\n\n let slideTimeout = -1\n watch(model, restartTimeout)\n watch(() => props.interval, restartTimeout)\n watch(() => props.cycle, val => {\n if (val) restartTimeout()\n else window.clearTimeout(slideTimeout)\n })\n\n onMounted(startTimeout)\n\n function startTimeout () {\n if (!props.cycle || !windowRef.value) return\n\n slideTimeout = window.setTimeout(windowRef.value.group.next, +props.interval > 0 ? +props.interval : 6000)\n }\n\n function restartTimeout () {\n window.clearTimeout(slideTimeout)\n window.requestAnimationFrame(startTimeout)\n }\n\n useRender(() => {\n const [windowProps] = VWindow.filterProps(props)\n\n return (\n <VWindow\n ref={ windowRef }\n { ...windowProps }\n v-model={ model.value }\n class={[\n 'v-carousel',\n {\n 'v-carousel--hide-delimiter-background': props.hideDelimiterBackground,\n 'v-carousel--vertical-delimiters': props.verticalDelimiters,\n },\n props.class,\n ]}\n style={[\n { height: convertToUnit(props.height) },\n props.style,\n ]}\n >\n {{\n default: slots.default,\n additional: ({ group }: { group: GroupProvide }) => (\n <>\n { !props.hideDelimiters && (\n <div\n class=\"v-carousel__controls\"\n style={{\n left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',\n right: props.verticalDelimiters === 'right' ? 0 : 'auto',\n }}\n >\n { group.items.value.length > 0 && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n color: props.color,\n icon: props.delimiterIcon,\n size: 'x-small',\n variant: 'text',\n },\n }}\n scoped\n >\n { group.items.value.map((item, index) => {\n const props = {\n id: `carousel-item-${item.id}`,\n 'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),\n class: [group.isSelected(item.id) && 'v-btn--active'],\n onClick: () => group.select(item.id, true),\n }\n\n return slots.item\n ? slots.item({ props, item })\n : (<VBtn { ...item } { ...props } />)\n })}\n </VDefaultsProvider>\n )}\n </div>\n )}\n\n { props.progress && (\n <VProgressLinear\n class=\"v-carousel__progress\"\n color={ typeof props.progress === 'string' ? props.progress : undefined }\n modelValue={ (group.getItemIndex(model.value) + 1) / group.items.value.length * 100 }\n />\n )}\n </>\n ),\n prev: slots.prev,\n next: slots.next,\n }}\n </VWindow>\n )\n })\n\n return {}\n },\n})\n\nexport type VCarousel = InstanceType<typeof VCarousel>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,OAAO,kCAElC;AAAA,SACSC,SAAS;AAAA,SACTC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,SAAS,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAClCC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAEjE;AAKA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,KAAK,EAAEC,MAAM;EACbC,KAAK,EAAEC,OAAO;EACdC,aAAa,EAAE;IACbC,IAAI,EAAEhB,SAAS;IACfiB,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNF,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;IACtBK,OAAO,EAAE;EACX,CAAC;EACDG,cAAc,EAAEN,OAAO;EACvBO,uBAAuB,EAAEP,OAAO;EAChCQ,QAAQ,EAAE;IACRN,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;I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AAK,QAAQ,GAAGO,KAAK,CAACP,QAAQ,GAAGiD,SAAS;YAAA,cAC1D,CAAC3B,KAAK,CAAC4B,YAAY,CAACrC,KAAK,CAACd,KAAK,CAAC,GAAG,CAAC,IAAIuB,KAAK,CAACe,KAAK,CAACtC,KAAK,CAACuC,MAAM,GAAG;UAAG,QAEtF;QAAA,CAEJ;QACDa,IAAI,EAAEvC,KAAK,CAACuC,IAAI;QAChB5B,IAAI,EAAEX,KAAK,CAACW;MAAI;IAIxB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -6,8 +6,9 @@ $color-picker-elevation: 2 !default;
|
|
|
6
6
|
$color-picker-input-font-size: 0.75rem !default;
|
|
7
7
|
$color-picker-input-height: 32px !default;
|
|
8
8
|
$color-picker-input-margin: 8px !default;
|
|
9
|
-
$color-picker-preview-margin-bottom:
|
|
9
|
+
$color-picker-preview-margin-bottom: 0 !default;
|
|
10
10
|
$color-picker-input-margin-bottom: 8px !default;
|
|
11
|
+
$color-picker-input-margin-top: 24px !default;
|
|
11
12
|
|
|
12
13
|
// VColorPickerSwatch
|
|
13
14
|
$color-picker-swatch-color-border-radius: 2px !default;
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
padding-inline-end: inherit;
|
|
64
64
|
}
|
|
65
65
|
.v-combobox--single .v-field--variant-outlined input {
|
|
66
|
-
top:
|
|
67
|
-
transform: translateY(-50%);
|
|
66
|
+
top: 50%;
|
|
67
|
+
transform: translateY(calc(-50% - (var(--v-input-chips-margin-top) + var(--v-input-chips-margin-bottom)) / 2));
|
|
68
68
|
}
|
|
69
69
|
.v-combobox--single .v-field--active input {
|
|
70
70
|
transition: none;
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
|
|
82
82
|
.v-field--variant-outlined
|
|
83
83
|
input
|
|
84
|
-
top:
|
|
85
|
-
transform: translateY(-50%)
|
|
84
|
+
top: 50%
|
|
85
|
+
transform: translateY(calc(-50% - (var(--v-input-chips-margin-top) + var(--v-input-chips-margin-bottom))/2))
|
|
86
86
|
|
|
87
87
|
.v-field--active
|
|
88
88
|
input
|
|
@@ -51,47 +51,17 @@
|
|
|
51
51
|
border-bottom-right-radius: 0;
|
|
52
52
|
}
|
|
53
53
|
.v-input--density-default .v-field--variant-solo, .v-input--density-default .v-field--variant-solo-inverted, .v-input--density-default .v-field--variant-solo-filled, .v-input--density-default .v-field--variant-filled {
|
|
54
|
-
--v-input-control-height:
|
|
54
|
+
--v-input-control-height: 56px;
|
|
55
55
|
--v-field-padding-bottom: 5px;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.v-input--density-default .v-field--variant-solo, .v-input--density-default .v-field--variant-solo-inverted, .v-input--density-default .v-field--variant-solo-filled, .v-input--density-default .v-field--variant-filled {
|
|
59
|
-
--v-input-control-height: 52px;
|
|
60
|
-
--v-field-padding-bottom: 5px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.v-input--density-default .v-field--variant-solo, .v-input--density-default .v-field--variant-solo-inverted, .v-input--density-default .v-field--variant-solo-filled, .v-input--density-default .v-field--variant-filled {
|
|
64
|
-
--v-input-control-height: 50px;
|
|
65
|
-
--v-field-padding-bottom: 5px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.v-input--density-comfortable .v-field--variant-solo, .v-input--density-comfortable .v-field--variant-solo-inverted, .v-input--density-comfortable .v-field--variant-solo-filled, .v-input--density-comfortable .v-field--variant-filled {
|
|
69
|
-
--v-input-control-height: 46px;
|
|
70
|
-
--v-field-padding-bottom: 1px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
58
|
.v-input--density-comfortable .v-field--variant-solo, .v-input--density-comfortable .v-field--variant-solo-inverted, .v-input--density-comfortable .v-field--variant-solo-filled, .v-input--density-comfortable .v-field--variant-filled {
|
|
74
|
-
--v-input-control-height:
|
|
59
|
+
--v-input-control-height: 48px;
|
|
75
60
|
--v-field-padding-bottom: 1px;
|
|
76
61
|
}
|
|
77
62
|
|
|
78
|
-
.v-input--density-comfortable .v-field--variant-solo, .v-input--density-comfortable .v-field--variant-solo-inverted, .v-input--density-comfortable .v-field--variant-solo-filled, .v-input--density-comfortable .v-field--variant-filled {
|
|
79
|
-
--v-input-control-height: 42px;
|
|
80
|
-
--v-field-padding-bottom: 1px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.v-input--density-compact .v-field--variant-solo, .v-input--density-compact .v-field--variant-solo-inverted, .v-input--density-compact .v-field--variant-solo-filled, .v-input--density-compact .v-field--variant-filled {
|
|
84
|
-
--v-input-control-height: 38px;
|
|
85
|
-
--v-field-padding-bottom: 0px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.v-input--density-compact .v-field--variant-solo, .v-input--density-compact .v-field--variant-solo-inverted, .v-input--density-compact .v-field--variant-solo-filled, .v-input--density-compact .v-field--variant-filled {
|
|
89
|
-
--v-input-control-height: 36px;
|
|
90
|
-
--v-field-padding-bottom: 0px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
63
|
.v-input--density-compact .v-field--variant-solo, .v-input--density-compact .v-field--variant-solo-inverted, .v-input--density-compact .v-field--variant-solo-filled, .v-input--density-compact .v-field--variant-filled {
|
|
94
|
-
--v-input-control-height:
|
|
64
|
+
--v-input-control-height: 40px;
|
|
95
65
|
--v-field-padding-bottom: 0px;
|
|
96
66
|
}
|
|
97
67
|
|
|
@@ -120,53 +90,20 @@
|
|
|
120
90
|
--v-field-padding-top: var(--v-field-padding-top--plain-underlined, 6px);
|
|
121
91
|
}
|
|
122
92
|
.v-input--density-default .v-field--variant-plain, .v-input--density-default .v-field--variant-underlined {
|
|
123
|
-
--v-input-control-height:
|
|
93
|
+
--v-input-control-height: 48px;
|
|
124
94
|
--v-field-padding-bottom: 5px;
|
|
125
95
|
}
|
|
126
96
|
|
|
127
|
-
.v-input--density-default .v-field--variant-plain, .v-input--density-default .v-field--variant-underlined {
|
|
128
|
-
--v-input-control-height: 44px;
|
|
129
|
-
--v-field-padding-bottom: 5px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.v-input--density-default .v-field--variant-plain, .v-input--density-default .v-field--variant-underlined {
|
|
133
|
-
--v-input-control-height: 42px;
|
|
134
|
-
--v-field-padding-bottom: 5px;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.v-input--density-comfortable .v-field--variant-plain, .v-input--density-comfortable .v-field--variant-underlined {
|
|
138
|
-
--v-input-control-height: 38px;
|
|
139
|
-
--v-field-padding-bottom: 1px;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.v-input--density-comfortable .v-field--variant-plain, .v-input--density-comfortable .v-field--variant-underlined {
|
|
143
|
-
--v-input-control-height: 36px;
|
|
144
|
-
--v-field-padding-bottom: 1px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
97
|
.v-input--density-comfortable .v-field--variant-plain, .v-input--density-comfortable .v-field--variant-underlined {
|
|
148
|
-
--v-input-control-height:
|
|
98
|
+
--v-input-control-height: 40px;
|
|
149
99
|
--v-field-padding-bottom: 1px;
|
|
150
100
|
}
|
|
151
101
|
|
|
152
102
|
.v-input--density-compact .v-field--variant-plain, .v-input--density-compact .v-field--variant-underlined {
|
|
153
|
-
--v-input-control-height:
|
|
154
|
-
--v-field-padding-bottom: 0px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.v-input--density-compact .v-field--variant-plain, .v-input--density-compact .v-field--variant-underlined {
|
|
158
|
-
--v-input-control-height: 28px;
|
|
159
|
-
--v-field-padding-bottom: 0px;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.v-input--density-compact .v-field--variant-plain, .v-input--density-compact .v-field--variant-underlined {
|
|
163
|
-
--v-input-control-height: 26px;
|
|
103
|
+
--v-input-control-height: 32px;
|
|
164
104
|
--v-field-padding-bottom: 0px;
|
|
165
105
|
}
|
|
166
106
|
|
|
167
|
-
.v-field--variant-outlined {
|
|
168
|
-
--v-input-chips-margin-bottom: 2px;
|
|
169
|
-
}
|
|
170
107
|
.v-field--flat {
|
|
171
108
|
box-shadow: none;
|
|
172
109
|
}
|
|
@@ -188,7 +125,8 @@
|
|
|
188
125
|
flex-wrap: wrap;
|
|
189
126
|
letter-spacing: 0.009375em;
|
|
190
127
|
opacity: var(--v-high-emphasis-opacity);
|
|
191
|
-
min-height:
|
|
128
|
+
min-height: max(var(--v-input-control-height, 56px), 1.5rem + var(--v-field-input-padding-top) + var(--v-field-input-padding-bottom) + var(--v-input-chips-margin-bottom) + 2px);
|
|
129
|
+
min-width: 0;
|
|
192
130
|
padding-inline-start: var(--v-field-padding-start);
|
|
193
131
|
padding-inline-end: var(--v-field-padding-end);
|
|
194
132
|
padding-top: var(--v-field-input-padding-top);
|
|
@@ -200,7 +200,7 @@ export const VField = genericComponent()({
|
|
|
200
200
|
}, null), _createVNode(LoaderSlot, {
|
|
201
201
|
"name": "v-field",
|
|
202
202
|
"active": !!props.loading,
|
|
203
|
-
"color": props.error ? 'error' : props.color
|
|
203
|
+
"color": props.error ? 'error' : typeof props.loading === 'string' ? props.loading : props.color
|
|
204
204
|
}, {
|
|
205
205
|
default: slots.loader
|
|
206
206
|
}), hasPrepend && _createVNode("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VField.mjs","names":["VFieldLabel","VExpandXTransition","useInputIcon","useBackgroundColor","useTextColor","makeComponentProps","makeFocusProps","useFocus","IconValue","LoaderSlot","makeLoaderProps","useLoader","useRtl","makeRoundedProps","useRounded","makeThemeProps","provideTheme","computed","ref","toRef","watch","animate","convertToUnit","EventProp","genericComponent","getUid","isOn","nullifyTransforms","pick","propsFactory","standardEasing","useRender","allowedVariants","makeVFieldProps","appendInnerIcon","bgColor","String","clearable","Boolean","clearIcon","type","default","active","centerAffix","undefined","color","baseColor","dirty","disabled","error","flat","label","persistentClear","prependInnerIcon","reverse","singleLine","variant","validator","v","includes","VField","name","inheritAttrs","props","id","emits","focused","val","setup","_ref","attrs","emit","slots","themeClasses","loaderClasses","focusClasses","isFocused","focus","blur","InputIcon","roundedClasses","rtlClasses","isActive","hasLabel","uid","messagesId","value","labelRef","floatingLabelRef","controlRef","isPlainOrUnderlined","backgroundColorClasses","backgroundColorStyles","textColorClasses","textColorStyles","el","$el","targetEl","requestAnimationFrame","rect","targetRect","getBoundingClientRect","x","y","height","targetWidth","width","Math","abs","maxWidth","style","getComputedStyle","targetStyle","duration","parseFloat","transitionDuration","scale","getPropertyValue","visibility","transform","easing","direction","finished","then","removeProperty","flush","slotProps","onClick","e","target","document","activeElement","preventDefault","isOutlined","hasPrepend","hasClear","clear","hasAppend","for","_createVNode","_mergeProps","class","loading","loader","_withDirectives","stopPropagation","_vShow","_Fragment","filterFieldProps","keys","Object","filter","k"],"sources":["../../../src/components/VField/VField.tsx"],"sourcesContent":["// Styles\nimport './VField.sass'\n\n// Components\nimport { VFieldLabel } from './VFieldLabel'\nimport { VExpandXTransition } from '@/components/transitions'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { IconValue } from '@/composables/icons'\nimport { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader'\nimport { useRtl } from '@/composables/locale'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, ref, toRef, watch } from 'vue'\nimport {\n animate,\n convertToUnit,\n EventProp,\n genericComponent,\n getUid,\n isOn,\n nullifyTransforms,\n pick,\n propsFactory,\n standardEasing,\n useRender,\n} from '@/util'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { LoaderSlotProps } from '@/composables/loader'\nimport type { GenericProps } from '@/util'\n\nconst allowedVariants = ['underlined', 'outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled', 'plain'] as const\ntype Variant = typeof allowedVariants[number]\n\nexport interface DefaultInputSlot {\n isActive: Ref<boolean>\n isFocused: Ref<boolean>\n controlRef: Ref<HTMLElement | undefined>\n focus: () => void\n blur: () => void\n}\n\nexport interface VFieldSlot extends DefaultInputSlot {\n props: Record<string, unknown>\n}\n\nexport const makeVFieldProps = propsFactory({\n appendInnerIcon: IconValue,\n bgColor: String,\n clearable: Boolean,\n clearIcon: {\n type: IconValue,\n default: '$clear',\n },\n active: Boolean,\n centerAffix: {\n type: Boolean,\n default: undefined,\n },\n color: String,\n baseColor: String,\n dirty: Boolean,\n disabled: {\n type: Boolean,\n default: null,\n },\n error: Boolean,\n flat: Boolean,\n label: String,\n persistentClear: Boolean,\n prependInnerIcon: IconValue,\n reverse: Boolean,\n singleLine: Boolean,\n variant: {\n type: String as PropType<Variant>,\n default: 'filled',\n validator: (v: any) => allowedVariants.includes(v),\n },\n\n 'onClick:clear': EventProp<[MouseEvent]>(),\n 'onClick:appendInner': EventProp<[MouseEvent]>(),\n 'onClick:prependInner': EventProp<[MouseEvent]>(),\n\n ...makeComponentProps(),\n ...makeLoaderProps(),\n ...makeRoundedProps(),\n ...makeThemeProps(),\n}, 'VField')\n\nexport type VFieldSlots = {\n clear: never\n 'prepend-inner': DefaultInputSlot\n 'append-inner': DefaultInputSlot\n label: DefaultInputSlot & { label: string | undefined, props: Record<string, any> }\n loader: LoaderSlotProps\n default: VFieldSlot\n}\n\nexport const VField = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (val: T) => any\n },\n slots: VFieldSlots\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VField',\n\n inheritAttrs: false,\n\n props: {\n id: String,\n\n ...makeFocusProps(),\n ...makeVFieldProps(),\n },\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (val: any) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { themeClasses } = provideTheme(props)\n const { loaderClasses } = useLoader(props)\n const { focusClasses, isFocused, focus, blur } = useFocus(props)\n const { InputIcon } = useInputIcon(props)\n const { roundedClasses } = useRounded(props)\n const { rtlClasses } = useRtl()\n\n const isActive = computed(() => props.dirty || props.active)\n const hasLabel = computed(() => !props.singleLine && !!(props.label || slots.label))\n\n const uid = getUid()\n const id = computed(() => props.id || `input-${uid}`)\n const messagesId = computed(() => `${id.value}-messages`)\n\n const labelRef = ref<VFieldLabel>()\n const floatingLabelRef = ref<VFieldLabel>()\n const controlRef = ref<HTMLElement>()\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant))\n\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { textColorClasses, textColorStyles } = useTextColor(computed(() => {\n return props.error || props.disabled ? undefined\n : isActive.value && isFocused.value ? props.color\n : props.baseColor\n }))\n\n watch(isActive, val => {\n if (hasLabel.value) {\n const el: HTMLElement = labelRef.value!.$el\n const targetEl: HTMLElement = floatingLabelRef.value!.$el\n\n requestAnimationFrame(() => {\n const rect = nullifyTransforms(el)\n const targetRect = targetEl.getBoundingClientRect()\n\n const x = targetRect.x - rect.x\n const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2)\n\n const targetWidth = targetRect.width / 0.75\n const width = Math.abs(targetWidth - rect.width) > 1\n ? { maxWidth: convertToUnit(targetWidth) }\n : undefined\n\n const style = getComputedStyle(el)\n const targetStyle = getComputedStyle(targetEl)\n const duration = parseFloat(style.transitionDuration) * 1000 || 150\n const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'))\n const color = targetStyle.getPropertyValue('color')\n\n el.style.visibility = 'visible'\n targetEl.style.visibility = 'hidden'\n\n animate(el, {\n transform: `translate(${x}px, ${y}px) scale(${scale})`,\n color,\n ...width,\n }, {\n duration,\n easing: standardEasing,\n direction: val ? 'normal' : 'reverse',\n }).finished.then(() => {\n el.style.removeProperty('visibility')\n targetEl.style.removeProperty('visibility')\n })\n })\n }\n }, { flush: 'post' })\n\n const slotProps = computed<DefaultInputSlot>(() => ({\n isActive,\n isFocused,\n controlRef,\n blur,\n focus,\n }))\n\n function onClick (e: MouseEvent) {\n if (e.target !== document.activeElement) {\n e.preventDefault()\n }\n }\n\n useRender(() => {\n const isOutlined = props.variant === 'outlined'\n const hasPrepend = (slots['prepend-inner'] || props.prependInnerIcon)\n const hasClear = !!(props.clearable || slots.clear)\n const hasAppend = !!(slots['append-inner'] || props.appendInnerIcon || hasClear)\n const label = slots.label\n ? slots.label({\n ...slotProps.value,\n label: props.label,\n props: { for: id.value },\n })\n : props.label\n\n return (\n <div\n class={[\n 'v-field',\n {\n 'v-field--active': isActive.value,\n 'v-field--appended': hasAppend,\n 'v-field--center-affix': props.centerAffix ?? !isPlainOrUnderlined.value,\n 'v-field--disabled': props.disabled,\n 'v-field--dirty': props.dirty,\n 'v-field--error': props.error,\n 'v-field--flat': props.flat,\n 'v-field--has-background': !!props.bgColor,\n 'v-field--persistent-clear': props.persistentClear,\n 'v-field--prepended': hasPrepend,\n 'v-field--reverse': props.reverse,\n 'v-field--single-line': props.singleLine,\n 'v-field--no-label': !label,\n [`v-field--variant-${props.variant}`]: true,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n focusClasses.value,\n loaderClasses.value,\n roundedClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n textColorStyles.value,\n props.style,\n ]}\n onClick={ onClick }\n { ...attrs }\n >\n <div class=\"v-field__overlay\" />\n\n <LoaderSlot\n name=\"v-field\"\n active={ !!props.loading }\n color={ props.error ? 'error' : props.color }\n v-slots={{ default: slots.loader }}\n />\n\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-field__prepend-inner\">\n { props.prependInnerIcon && (\n <InputIcon key=\"prepend-icon\" name=\"prependInner\" />\n )}\n\n { slots['prepend-inner']?.(slotProps.value) }\n </div>\n )}\n\n <div class=\"v-field__field\" data-no-activator=\"\">\n {['filled', 'solo', 'solo-inverted', 'solo-filled'].includes(props.variant) && hasLabel.value && (\n <VFieldLabel\n key=\"floating-label\"\n ref={ floatingLabelRef }\n class={[textColorClasses.value]}\n floating\n for={ id.value }\n >\n { label }\n </VFieldLabel>\n )}\n\n <VFieldLabel ref={ labelRef } for={ id.value }>\n { label }\n </VFieldLabel>\n\n { slots.default?.({\n ...slotProps.value,\n props: {\n id: id.value,\n class: 'v-field__input',\n 'aria-describedby': messagesId.value,\n },\n focus,\n blur,\n } as VFieldSlot)}\n </div>\n\n { hasClear && (\n <VExpandXTransition key=\"clear\">\n <div\n class=\"v-field__clearable\"\n v-show={ props.dirty }\n onMousedown={ (e: MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n { slots.clear\n ? slots.clear()\n : <InputIcon name=\"clear\" />\n }\n </div>\n </VExpandXTransition>\n )}\n\n { hasAppend && (\n <div key=\"append\" class=\"v-field__append-inner\">\n { slots['append-inner']?.(slotProps.value) }\n\n { props.appendInnerIcon && (\n <InputIcon key=\"append-icon\" name=\"appendInner\" />\n )}\n </div>\n )}\n\n <div\n class={[\n 'v-field__outline',\n textColorClasses.value,\n ]}\n >\n { isOutlined && (\n <>\n <div class=\"v-field__outline__start\" />\n\n { hasLabel.value && (\n <div class=\"v-field__outline__notch\">\n <VFieldLabel ref={ floatingLabelRef } floating for={ id.value }>\n { label }\n </VFieldLabel>\n </div>\n )}\n\n <div class=\"v-field__outline__end\" />\n </>\n )}\n\n { isPlainOrUnderlined.value && hasLabel.value && (\n <VFieldLabel ref={ floatingLabelRef } floating for={ id.value }>\n { label }\n </VFieldLabel>\n )}\n </div>\n </div>\n )\n })\n\n return {\n controlRef,\n }\n },\n})\n\nexport type VField = InstanceType<typeof VField>\n\n// TODO: this is kinda slow, might be better to implicitly inherit props instead\nexport function filterFieldProps (attrs: Record<string, unknown>) {\n const keys = Object.keys(VField.props).filter(k => !isOn(k) && k !== 'class' && k !== 'style')\n return pick(attrs, keys)\n}\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,WAAW;AAAA,SACXC,kBAAkB;AAAA,SAClBC,YAAY,mCAErB;AA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CAAC,CAAC;IAEF,OAAO;MACLsC;IACF,CAAC;EACH;AACF,CAAC,CAAC;AAIF;AACA,OAAO,SAAS2D,gBAAgBA,CAAE9E,KAA8B,EAAE;EAChE,MAAM+E,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACzF,MAAM,CAACG,KAAK,CAAC,CAACwF,MAAM,CAACC,CAAC,IAAI,CAAC9H,IAAI,CAAC8H,CAAC,CAAC,IAAIA,CAAC,KAAK,OAAO,IAAIA,CAAC,KAAK,OAAO,CAAC;EAC9F,OAAO5H,IAAI,CAAC0C,KAAK,EAAE+E,IAAI,CAAC;AAC1B"}
|
|
1
|
+
{"version":3,"file":"VField.mjs","names":["VFieldLabel","VExpandXTransition","useInputIcon","useBackgroundColor","useTextColor","makeComponentProps","makeFocusProps","useFocus","IconValue","LoaderSlot","makeLoaderProps","useLoader","useRtl","makeRoundedProps","useRounded","makeThemeProps","provideTheme","computed","ref","toRef","watch","animate","convertToUnit","EventProp","genericComponent","getUid","isOn","nullifyTransforms","pick","propsFactory","standardEasing","useRender","allowedVariants","makeVFieldProps","appendInnerIcon","bgColor","String","clearable","Boolean","clearIcon","type","default","active","centerAffix","undefined","color","baseColor","dirty","disabled","error","flat","label","persistentClear","prependInnerIcon","reverse","singleLine","variant","validator","v","includes","VField","name","inheritAttrs","props","id","emits","focused","val","setup","_ref","attrs","emit","slots","themeClasses","loaderClasses","focusClasses","isFocused","focus","blur","InputIcon","roundedClasses","rtlClasses","isActive","hasLabel","uid","messagesId","value","labelRef","floatingLabelRef","controlRef","isPlainOrUnderlined","backgroundColorClasses","backgroundColorStyles","textColorClasses","textColorStyles","el","$el","targetEl","requestAnimationFrame","rect","targetRect","getBoundingClientRect","x","y","height","targetWidth","width","Math","abs","maxWidth","style","getComputedStyle","targetStyle","duration","parseFloat","transitionDuration","scale","getPropertyValue","visibility","transform","easing","direction","finished","then","removeProperty","flush","slotProps","onClick","e","target","document","activeElement","preventDefault","isOutlined","hasPrepend","hasClear","clear","hasAppend","for","_createVNode","_mergeProps","class","loading","loader","_withDirectives","stopPropagation","_vShow","_Fragment","filterFieldProps","keys","Object","filter","k"],"sources":["../../../src/components/VField/VField.tsx"],"sourcesContent":["// Styles\nimport './VField.sass'\n\n// Components\nimport { VFieldLabel } from './VFieldLabel'\nimport { VExpandXTransition } from '@/components/transitions'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { IconValue } from '@/composables/icons'\nimport { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader'\nimport { useRtl } from '@/composables/locale'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, ref, toRef, watch } from 'vue'\nimport {\n animate,\n convertToUnit,\n EventProp,\n genericComponent,\n getUid,\n isOn,\n nullifyTransforms,\n pick,\n propsFactory,\n standardEasing,\n useRender,\n} from '@/util'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { LoaderSlotProps } from '@/composables/loader'\nimport type { GenericProps } from '@/util'\n\nconst allowedVariants = ['underlined', 'outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled', 'plain'] as const\ntype Variant = typeof allowedVariants[number]\n\nexport interface DefaultInputSlot {\n isActive: Ref<boolean>\n isFocused: Ref<boolean>\n controlRef: Ref<HTMLElement | undefined>\n focus: () => void\n blur: () => void\n}\n\nexport interface VFieldSlot extends DefaultInputSlot {\n props: Record<string, unknown>\n}\n\nexport const makeVFieldProps = propsFactory({\n appendInnerIcon: IconValue,\n bgColor: String,\n clearable: Boolean,\n clearIcon: {\n type: IconValue,\n default: '$clear',\n },\n active: Boolean,\n centerAffix: {\n type: Boolean,\n default: undefined,\n },\n color: String,\n baseColor: String,\n dirty: Boolean,\n disabled: {\n type: Boolean,\n default: null,\n },\n error: Boolean,\n flat: Boolean,\n label: String,\n persistentClear: Boolean,\n prependInnerIcon: IconValue,\n reverse: Boolean,\n singleLine: Boolean,\n variant: {\n type: String as PropType<Variant>,\n default: 'filled',\n validator: (v: any) => allowedVariants.includes(v),\n },\n\n 'onClick:clear': EventProp<[MouseEvent]>(),\n 'onClick:appendInner': EventProp<[MouseEvent]>(),\n 'onClick:prependInner': EventProp<[MouseEvent]>(),\n\n ...makeComponentProps(),\n ...makeLoaderProps(),\n ...makeRoundedProps(),\n ...makeThemeProps(),\n}, 'VField')\n\nexport type VFieldSlots = {\n clear: never\n 'prepend-inner': DefaultInputSlot\n 'append-inner': DefaultInputSlot\n label: DefaultInputSlot & { label: string | undefined, props: Record<string, any> }\n loader: LoaderSlotProps\n default: VFieldSlot\n}\n\nexport const VField = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (val: T) => any\n },\n slots: VFieldSlots\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VField',\n\n inheritAttrs: false,\n\n props: {\n id: String,\n\n ...makeFocusProps(),\n ...makeVFieldProps(),\n },\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (val: any) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { themeClasses } = provideTheme(props)\n const { loaderClasses } = useLoader(props)\n const { focusClasses, isFocused, focus, blur } = useFocus(props)\n const { InputIcon } = useInputIcon(props)\n const { roundedClasses } = useRounded(props)\n const { rtlClasses } = useRtl()\n\n const isActive = computed(() => props.dirty || props.active)\n const hasLabel = computed(() => !props.singleLine && !!(props.label || slots.label))\n\n const uid = getUid()\n const id = computed(() => props.id || `input-${uid}`)\n const messagesId = computed(() => `${id.value}-messages`)\n\n const labelRef = ref<VFieldLabel>()\n const floatingLabelRef = ref<VFieldLabel>()\n const controlRef = ref<HTMLElement>()\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant))\n\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { textColorClasses, textColorStyles } = useTextColor(computed(() => {\n return props.error || props.disabled ? undefined\n : isActive.value && isFocused.value ? props.color\n : props.baseColor\n }))\n\n watch(isActive, val => {\n if (hasLabel.value) {\n const el: HTMLElement = labelRef.value!.$el\n const targetEl: HTMLElement = floatingLabelRef.value!.$el\n\n requestAnimationFrame(() => {\n const rect = nullifyTransforms(el)\n const targetRect = targetEl.getBoundingClientRect()\n\n const x = targetRect.x - rect.x\n const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2)\n\n const targetWidth = targetRect.width / 0.75\n const width = Math.abs(targetWidth - rect.width) > 1\n ? { maxWidth: convertToUnit(targetWidth) }\n : undefined\n\n const style = getComputedStyle(el)\n const targetStyle = getComputedStyle(targetEl)\n const duration = parseFloat(style.transitionDuration) * 1000 || 150\n const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'))\n const color = targetStyle.getPropertyValue('color')\n\n el.style.visibility = 'visible'\n targetEl.style.visibility = 'hidden'\n\n animate(el, {\n transform: `translate(${x}px, ${y}px) scale(${scale})`,\n color,\n ...width,\n }, {\n duration,\n easing: standardEasing,\n direction: val ? 'normal' : 'reverse',\n }).finished.then(() => {\n el.style.removeProperty('visibility')\n targetEl.style.removeProperty('visibility')\n })\n })\n }\n }, { flush: 'post' })\n\n const slotProps = computed<DefaultInputSlot>(() => ({\n isActive,\n isFocused,\n controlRef,\n blur,\n focus,\n }))\n\n function onClick (e: MouseEvent) {\n if (e.target !== document.activeElement) {\n e.preventDefault()\n }\n }\n\n useRender(() => {\n const isOutlined = props.variant === 'outlined'\n const hasPrepend = (slots['prepend-inner'] || props.prependInnerIcon)\n const hasClear = !!(props.clearable || slots.clear)\n const hasAppend = !!(slots['append-inner'] || props.appendInnerIcon || hasClear)\n const label = slots.label\n ? slots.label({\n ...slotProps.value,\n label: props.label,\n props: { for: id.value },\n })\n : props.label\n\n return (\n <div\n class={[\n 'v-field',\n {\n 'v-field--active': isActive.value,\n 'v-field--appended': hasAppend,\n 'v-field--center-affix': props.centerAffix ?? !isPlainOrUnderlined.value,\n 'v-field--disabled': props.disabled,\n 'v-field--dirty': props.dirty,\n 'v-field--error': props.error,\n 'v-field--flat': props.flat,\n 'v-field--has-background': !!props.bgColor,\n 'v-field--persistent-clear': props.persistentClear,\n 'v-field--prepended': hasPrepend,\n 'v-field--reverse': props.reverse,\n 'v-field--single-line': props.singleLine,\n 'v-field--no-label': !label,\n [`v-field--variant-${props.variant}`]: true,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n focusClasses.value,\n loaderClasses.value,\n roundedClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n textColorStyles.value,\n props.style,\n ]}\n onClick={ onClick }\n { ...attrs }\n >\n <div class=\"v-field__overlay\" />\n\n <LoaderSlot\n name=\"v-field\"\n active={ !!props.loading }\n color={ props.error ? 'error' : (typeof props.loading === 'string' ? props.loading : props.color) }\n v-slots={{ default: slots.loader }}\n />\n\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-field__prepend-inner\">\n { props.prependInnerIcon && (\n <InputIcon key=\"prepend-icon\" name=\"prependInner\" />\n )}\n\n { slots['prepend-inner']?.(slotProps.value) }\n </div>\n )}\n\n <div class=\"v-field__field\" data-no-activator=\"\">\n {['filled', 'solo', 'solo-inverted', 'solo-filled'].includes(props.variant) && hasLabel.value && (\n <VFieldLabel\n key=\"floating-label\"\n ref={ floatingLabelRef }\n class={[textColorClasses.value]}\n floating\n for={ id.value }\n >\n { label }\n </VFieldLabel>\n )}\n\n <VFieldLabel ref={ labelRef } for={ id.value }>\n { label }\n </VFieldLabel>\n\n { slots.default?.({\n ...slotProps.value,\n props: {\n id: id.value,\n class: 'v-field__input',\n 'aria-describedby': messagesId.value,\n },\n focus,\n blur,\n } as VFieldSlot)}\n </div>\n\n { hasClear && (\n <VExpandXTransition key=\"clear\">\n <div\n class=\"v-field__clearable\"\n v-show={ props.dirty }\n onMousedown={ (e: MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n { slots.clear\n ? slots.clear()\n : <InputIcon name=\"clear\" />\n }\n </div>\n </VExpandXTransition>\n )}\n\n { hasAppend && (\n <div key=\"append\" class=\"v-field__append-inner\">\n { slots['append-inner']?.(slotProps.value) }\n\n { props.appendInnerIcon && (\n <InputIcon key=\"append-icon\" name=\"appendInner\" />\n )}\n </div>\n )}\n\n <div\n class={[\n 'v-field__outline',\n textColorClasses.value,\n ]}\n >\n { isOutlined && (\n <>\n <div class=\"v-field__outline__start\" />\n\n { hasLabel.value && (\n <div class=\"v-field__outline__notch\">\n <VFieldLabel ref={ floatingLabelRef } floating for={ id.value }>\n { label }\n </VFieldLabel>\n </div>\n )}\n\n <div class=\"v-field__outline__end\" />\n </>\n )}\n\n { isPlainOrUnderlined.value && hasLabel.value && (\n <VFieldLabel ref={ floatingLabelRef } floating for={ id.value }>\n { label }\n </VFieldLabel>\n )}\n </div>\n </div>\n )\n })\n\n return {\n controlRef,\n }\n },\n})\n\nexport type VField = InstanceType<typeof VField>\n\n// TODO: this is kinda slow, might be better to implicitly inherit props instead\nexport function filterFieldProps (attrs: Record<string, unknown>) {\n const keys = Object.keys(VField.props).filter(k => !isOn(k) && k !== 'class' && k !== 'style')\n return pick(attrs, keys)\n}\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,WAAW;AAAA,SACXC,kBAAkB;AAAA,SAClBC,YAAY,mCAErB;AAAA,SACSC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB;AAAA,SAClBC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,SAAS;AAAA,SACTC,UAAU,EAAEC,eAAe,EAAEC,SAAS;AAAA,SACtCC,MAAM;AAAA,SACNC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,cAAc,EAAEC,YAAY,uCAErC;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAE/CC,OAAO,EACPC,aAAa,EAC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AC,KAAK,OAAO,IAAIA,CAAC,KAAK,OAAO,CAAC;EAC9F,OAAO5H,IAAI,CAAC0C,KAAK,EAAE+E,IAAI,CAAC;AAC1B"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
@use '../../styles/settings'
|
|
5
5
|
@use '../../styles/tools'
|
|
6
6
|
@use './variables' as *
|
|
7
|
-
@use './mixins' as *
|
|
8
7
|
|
|
9
8
|
/* region INPUT */
|
|
10
9
|
.v-field
|
|
@@ -69,9 +68,9 @@
|
|
|
69
68
|
$root: &
|
|
70
69
|
|
|
71
70
|
@at-root
|
|
72
|
-
@include
|
|
71
|
+
@include tools.density('v-input', $input-density) using ($modifier)
|
|
73
72
|
@at-root #{selector.nest(&, $root)}
|
|
74
|
-
--v-input-control-height: #{$field-control-height + $modifier
|
|
73
|
+
--v-input-control-height: #{$field-control-height + $modifier}
|
|
75
74
|
--v-field-padding-bottom: #{math.max(0px, $field-control-padding-bottom + $modifier * .5)}
|
|
76
75
|
|
|
77
76
|
&--variant-outlined,
|
|
@@ -97,14 +96,11 @@
|
|
|
97
96
|
--v-field-padding-top: var(--v-field-padding-top--plain-underlined, 6px)
|
|
98
97
|
|
|
99
98
|
@at-root
|
|
100
|
-
@include
|
|
99
|
+
@include tools.density('v-input', $input-density) using ($modifier)
|
|
101
100
|
@at-root #{selector.nest(&, $root)}
|
|
102
|
-
--v-input-control-height: #{$field-control-underlined-height + $modifier
|
|
101
|
+
--v-input-control-height: #{$field-control-underlined-height + $modifier}
|
|
103
102
|
--v-field-padding-bottom: #{math.max(0px, $field-control-padding-bottom + $modifier * .5)}
|
|
104
103
|
|
|
105
|
-
&--variant-outlined
|
|
106
|
-
--v-input-chips-margin-bottom: #{$input-chips-margin-top}
|
|
107
|
-
|
|
108
104
|
&--flat
|
|
109
105
|
box-shadow: none
|
|
110
106
|
|
|
@@ -128,6 +124,7 @@
|
|
|
128
124
|
letter-spacing: $field-letter-spacing
|
|
129
125
|
opacity: $field-input-opacity
|
|
130
126
|
min-height: $field-input-min-height
|
|
127
|
+
min-width: 0
|
|
131
128
|
padding-inline-start: var(--v-field-padding-start)
|
|
132
129
|
padding-inline-end: var(--v-field-padding-end)
|
|
133
130
|
padding-top: var(--v-field-input-padding-top)
|
|
@@ -36,10 +36,10 @@ $field-control-height: 56px !default;
|
|
|
36
36
|
|
|
37
37
|
// INPUT
|
|
38
38
|
$field-input-opacity: var(--v-high-emphasis-opacity) !default;
|
|
39
|
-
$field-input-min-height: #{
|
|
39
|
+
$field-input-min-height: #{max(
|
|
40
40
|
var(--v-input-control-height, $input-control-height),
|
|
41
|
-
calc($input-font-size * $input-line-height + var(--v-field-input-padding-top) + var(--v-field-input-padding-bottom))
|
|
42
|
-
)
|
|
41
|
+
calc($input-font-size * $input-line-height + var(--v-field-input-padding-top) + var(--v-field-input-padding-bottom) + var(--v-input-chips-margin-bottom) + $input-chips-margin-top)
|
|
42
|
+
)} !default;
|
|
43
43
|
$field-input-padding-top: calc(var(--v-field-padding-top, $field-control-padding-top) + var(--v-input-padding-top, 0)) !default;
|
|
44
44
|
$field-input-padding-bottom: var(--v-field-padding-bottom, $field-control-padding-bottom) !default;
|
|
45
45
|
|
|
@@ -405,4 +405,7 @@
|
|
|
405
405
|
|
|
406
406
|
.v-list-group__header.v-list-item--active:not(:focus-visible) .v-list-item__overlay {
|
|
407
407
|
opacity: 0;
|
|
408
|
+
}
|
|
409
|
+
.v-list-group__header.v-list-item--active:hover .v-list-item__overlay {
|
|
410
|
+
opacity: calc(var(--v-hover-opacity) * var(--v-theme-overlay-multiplier));
|
|
408
411
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@use 'sass:list'
|
|
2
|
+
@use 'sass:map'
|
|
2
3
|
@use 'sass:math'
|
|
4
|
+
@use '../../styles/settings'
|
|
3
5
|
@use '../../styles/tools'
|
|
4
6
|
@use './variables' as *
|
|
5
7
|
|
|
@@ -261,6 +263,11 @@ $base-padding: list.nth($list-item-padding, 2)
|
|
|
261
263
|
.v-list-group__items .v-list-item
|
|
262
264
|
padding-inline-start: calc(#{$base-padding} + var(--indent-padding)) !important
|
|
263
265
|
|
|
264
|
-
.v-list-group__header.v-list-item--active
|
|
265
|
-
|
|
266
|
-
|
|
266
|
+
.v-list-group__header.v-list-item--active
|
|
267
|
+
&:not(:focus-visible)
|
|
268
|
+
.v-list-item__overlay
|
|
269
|
+
opacity: 0
|
|
270
|
+
|
|
271
|
+
&:hover
|
|
272
|
+
.v-list-item__overlay
|
|
273
|
+
opacity: calc(#{map.get(settings.$states, 'hover')} * var(--v-theme-overlay-multiplier))
|
|
@@ -224,11 +224,11 @@ export const VOverlay = genericComponent()({
|
|
|
224
224
|
props: mergeProps({
|
|
225
225
|
ref: activatorRef
|
|
226
226
|
}, activatorEvents.value, props.activatorProps)
|
|
227
|
-
}), isMounted.value && _createVNode(Teleport, {
|
|
227
|
+
}), isMounted.value && hasContent.value && _createVNode(Teleport, {
|
|
228
228
|
"disabled": !teleportTarget.value,
|
|
229
229
|
"to": teleportTarget.value
|
|
230
230
|
}, {
|
|
231
|
-
default: () => [
|
|
231
|
+
default: () => [_createVNode("div", _mergeProps({
|
|
232
232
|
"class": ['v-overlay', {
|
|
233
233
|
'v-overlay--absolute': props.absolute || props.contained,
|
|
234
234
|
'v-overlay--active': isActive.value,
|