@vuetify/nightly 3.0.0-beta.10 → 3.0.0-beta.13
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/CHANGELOG.md +13 -2
- package/dist/json/attributes.json +37 -29
- package/dist/json/importMap.json +46 -46
- package/dist/json/tags.json +10 -8
- package/dist/json/web-types.json +101 -87
- package/dist/vuetify.css +545 -441
- package/dist/vuetify.d.ts +12095 -10059
- package/dist/vuetify.esm.js +401 -266
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +371 -236
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +3 -3
- package/dist/vuetify.min.js +496 -490
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +171 -0
- package/lib/blueprints/md1.d.ts +167 -0
- package/lib/blueprints/md2.d.ts +167 -0
- package/lib/blueprints/md3.d.ts +167 -0
- package/lib/components/VAlert/index.d.ts +185 -0
- package/lib/components/VApp/index.d.ts +83 -0
- package/lib/components/VAppBar/VAppBar.css +3 -0
- package/lib/components/VAppBar/VAppBar.sass +3 -0
- package/lib/components/VAppBar/index.d.ts +156 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.ts +1569 -0
- package/lib/components/VAvatar/VAvatar.css +44 -2
- package/lib/components/VAvatar/VAvatar.mjs +16 -12
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/VAvatar.sass +5 -1
- package/lib/components/VAvatar/_variables.scss +9 -4
- package/lib/components/VAvatar/index.d.ts +80 -0
- package/lib/components/VBadge/index.d.ts +123 -0
- package/lib/components/VBanner/index.d.ts +122 -0
- package/lib/components/VBottomNavigation/index.d.ts +143 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +2 -2
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +301 -0
- package/lib/components/VBtn/VBtn.css +8 -3
- package/lib/components/VBtn/VBtn.mjs +16 -6
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.ts +210 -0
- package/lib/components/VBtnGroup/index.d.ts +65 -0
- package/lib/components/VBtnToggle/VBtnToggle.mjs +1 -3
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +175 -0
- package/lib/components/VCard/VCard.css +8 -3
- package/lib/components/VCard/index.d.ts +230 -0
- package/lib/components/VCarousel/VCarousel.mjs +3 -3
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.ts +80 -0
- package/lib/components/VCheckbox/index.d.ts +291 -0
- package/lib/components/VChip/index.d.ts +195 -0
- package/lib/components/VChipGroup/index.d.ts +89 -0
- package/lib/components/VCode/index.d.ts +19 -0
- package/lib/components/VColorPicker/index.d.ts +116 -0
- package/lib/components/VCombobox/VCombobox.mjs +1 -1
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +1590 -0
- package/lib/components/VCounter/index.d.ts +223 -0
- package/lib/components/VDefaultsProvider/index.d.ts +26 -0
- package/lib/components/VDialog/VDialog.css +2 -0
- package/lib/components/VDialog/VDialog.mjs +17 -12
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +2 -0
- package/lib/components/VDialog/index.d.ts +859 -0
- package/lib/components/VDivider/index.d.ts +22 -0
- package/lib/components/VExpansionPanel/VExpansionPanel.css +8 -3
- package/lib/components/VExpansionPanel/index.d.ts +206 -0
- package/lib/components/VField/VField.css +27 -24
- package/lib/components/VField/VField.mjs +1 -1
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +23 -21
- package/lib/components/VField/index.d.ts +332 -0
- package/lib/components/VFileInput/VFileInput.mjs +3 -3
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +236 -0
- package/lib/components/VFooter/VFooter.css +7 -0
- package/lib/components/VFooter/VFooter.sass +1 -1
- package/lib/components/VFooter/_variables.scss +11 -0
- package/lib/components/VFooter/index.d.ts +76 -0
- package/lib/components/VForm/index.d.ts +72 -0
- package/lib/components/VGrid/index.d.ts +154 -0
- package/lib/components/VHover/index.d.ts +30 -0
- package/lib/components/VIcon/index.d.ts +124 -0
- package/lib/components/VImg/VImg.mjs +29 -27
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.ts +89 -0
- package/lib/components/VInput/VInput.mjs +4 -4
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +325 -0
- package/lib/components/VItemGroup/index.d.ts +210 -0
- package/lib/components/VKbd/index.d.ts +19 -0
- package/lib/components/VLabel/VLabel.css +4 -1
- package/lib/components/VLabel/VLabel.mjs +4 -1
- package/lib/components/VLabel/VLabel.mjs.map +1 -1
- package/lib/components/VLabel/VLabel.sass +3 -1
- package/lib/components/VLabel/index.d.ts +16 -0
- package/lib/components/VLayout/index.d.ts +75 -0
- package/lib/components/VLazy/index.d.ts +85 -0
- package/lib/components/VList/VListItem.css +8 -3
- package/lib/components/VList/VListItem.mjs +4 -4
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +1250 -0
- package/lib/components/VLocaleProvider/index.d.ts +23 -0
- package/lib/components/VMain/index.d.ts +26 -0
- package/lib/components/VMenu/VMenu.mjs +16 -3
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.ts +817 -0
- package/lib/components/VMessages/index.d.ts +234 -0
- package/lib/components/VNavigationDrawer/index.d.ts +148 -0
- package/lib/components/VNoSsr/index.d.ts +7 -0
- package/lib/components/VOverlay/VOverlay.mjs +4 -3
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.ts +579 -0
- package/lib/components/VOverlay/useActivator.mjs +27 -1
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +6 -3
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/index.d.ts +247 -0
- package/lib/components/VParallax/VParallax.mjs +24 -10
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VParallax/index.d.ts +18 -0
- package/lib/components/VProgressCircular/index.d.ts +68 -0
- package/lib/components/VProgressLinear/index.d.ts +101 -0
- package/lib/components/VRadio/index.d.ts +103 -0
- package/lib/components/VRadioGroup/VRadioGroup.css +2 -3
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.sass +2 -2
- package/lib/components/VRadioGroup/_variables.scss +0 -1
- package/lib/components/VRadioGroup/index.d.ts +186 -0
- package/lib/components/VRangeSlider/VRangeSlider.mjs +12 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +242 -0
- package/lib/components/VRating/index.d.ts +356 -0
- package/lib/components/VResponsive/index.d.ts +23 -0
- package/lib/components/VSelect/VSelect.mjs +1 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +1521 -0
- package/lib/components/VSelectionControl/VSelectionControl.mjs +2 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.ts +275 -0
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +5 -0
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +3 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.sass +5 -0
- package/lib/components/VSelectionControlGroup/index.d.ts +47 -0
- package/lib/components/VSheet/index.d.ts +68 -0
- package/lib/components/VSlideGroup/index.d.ts +151 -0
- package/lib/components/VSlider/VSlider.css +7 -2
- package/lib/components/VSlider/VSlider.mjs +14 -4
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.sass +6 -2
- package/lib/components/VSlider/VSliderTrack.css +20 -20
- package/lib/components/VSlider/VSliderTrack.mjs +7 -3
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/VSliderTrack.sass +14 -14
- package/lib/components/VSlider/_variables.scss +2 -2
- package/lib/components/VSlider/index.d.ts +239 -0
- package/lib/components/VSlider/slider.mjs +2 -2
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs +3 -2
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.ts +892 -0
- package/lib/components/VSwitch/index.d.ts +175 -0
- package/lib/components/VSystemBar/index.d.ts +61 -0
- package/lib/components/VTable/index.d.ts +39 -0
- package/lib/components/VTabs/VTab.mjs +1 -0
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/index.d.ts +178 -0
- package/lib/components/VTextField/VTextField.css +2 -3
- package/lib/components/VTextField/VTextField.sass +2 -4
- package/lib/components/VTextField/index.d.ts +582 -0
- package/lib/components/VTextarea/VTextarea.css +5 -3
- package/lib/components/VTextarea/VTextarea.mjs +2 -1
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/VTextarea.sass +5 -4
- package/lib/components/VTextarea/index.d.ts +218 -0
- package/lib/components/VThemeProvider/index.d.ts +24 -0
- package/lib/components/VTimeline/VTimeline.css +21 -6
- package/lib/components/VTimeline/VTimeline.mjs +6 -1
- package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
- package/lib/components/VTimeline/VTimeline.sass +16 -2
- package/lib/components/VTimeline/_variables.scss +4 -3
- package/lib/components/VTimeline/index.d.ts +154 -0
- package/lib/components/VToolbar/VToolbar.css +0 -1
- package/lib/components/VToolbar/VToolbar.sass +0 -1
- package/lib/components/VToolbar/index.d.ts +414 -0
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/index.d.ts +799 -0
- package/lib/components/VValidation/index.d.ts +61 -0
- package/lib/components/VWindow/index.d.ts +428 -0
- package/lib/components/index.d.ts +12037 -10009
- package/lib/components/transitions/index.d.ts +454 -0
- package/lib/composables/display.mjs +3 -3
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/items.mjs.map +1 -1
- package/lib/composables/locale.mjs +10 -3
- package/lib/composables/locale.mjs.map +1 -1
- package/lib/composables/proxiedModel.mjs +28 -10
- package/lib/composables/proxiedModel.mjs.map +1 -1
- package/lib/composables/router.mjs +10 -2
- package/lib/composables/router.mjs.map +1 -1
- package/lib/composables/selectLink.mjs +4 -4
- package/lib/composables/selectLink.mjs.map +1 -1
- package/lib/composables/theme.mjs +37 -33
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/validation.mjs +1 -1
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +46 -51
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.ts +31 -22
- package/lib/locale/adapters/vue-i18n.d.ts +35 -0
- package/lib/locale/adapters/vue-intl.d.ts +42 -0
- package/lib/styles/main.css +73 -73
- package/lib/styles/settings/_colors.scss +84 -84
- package/lib/styles/tools/_states.sass +8 -3
- package/lib/util/getCurrentInstance.mjs +2 -3
- package/lib/util/getCurrentInstance.mjs.map +1 -1
- package/lib/util/helpers.mjs +6 -11
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
|
|
3
|
+
declare const VDivider: vue.DefineComponent<{
|
|
4
|
+
theme: StringConstructor;
|
|
5
|
+
color: StringConstructor;
|
|
6
|
+
inset: BooleanConstructor;
|
|
7
|
+
length: (StringConstructor | NumberConstructor)[];
|
|
8
|
+
thickness: (StringConstructor | NumberConstructor)[];
|
|
9
|
+
vertical: BooleanConstructor;
|
|
10
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
11
|
+
theme: StringConstructor;
|
|
12
|
+
color: StringConstructor;
|
|
13
|
+
inset: BooleanConstructor;
|
|
14
|
+
length: (StringConstructor | NumberConstructor)[];
|
|
15
|
+
thickness: (StringConstructor | NumberConstructor)[];
|
|
16
|
+
vertical: BooleanConstructor;
|
|
17
|
+
}>>, {
|
|
18
|
+
inset: boolean;
|
|
19
|
+
vertical: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
export { VDivider };
|
|
@@ -133,11 +133,16 @@
|
|
|
133
133
|
opacity: calc(0.12 * var(--v-theme-overlay-multiplier));
|
|
134
134
|
}
|
|
135
135
|
.v-expansion-panel-title--active:hover > .v-expansion-panel-title__overlay, .v-expansion-panel-title[aria-haspopup=menu][aria-expanded=true]:hover > .v-expansion-panel-title__overlay {
|
|
136
|
-
opacity: calc(0.12 * var(--v-theme-overlay-multiplier));
|
|
137
|
-
}
|
|
138
|
-
.v-expansion-panel-title--active:focus > .v-expansion-panel-title__overlay, .v-expansion-panel-title[aria-haspopup=menu][aria-expanded=true]:focus > .v-expansion-panel-title__overlay {
|
|
139
136
|
opacity: calc(0.16 * var(--v-theme-overlay-multiplier));
|
|
140
137
|
}
|
|
138
|
+
.v-expansion-panel-title--active:focus-visible > .v-expansion-panel-title__overlay, .v-expansion-panel-title[aria-haspopup=menu][aria-expanded=true]:focus-visible > .v-expansion-panel-title__overlay {
|
|
139
|
+
opacity: calc(0.24 * var(--v-theme-overlay-multiplier));
|
|
140
|
+
}
|
|
141
|
+
@supports not selector(:focus-visible) {
|
|
142
|
+
.v-expansion-panel-title--active:focus > .v-expansion-panel-title__overlay, .v-expansion-panel-title[aria-haspopup=menu][aria-expanded=true]:focus > .v-expansion-panel-title__overlay {
|
|
143
|
+
opacity: calc(0.24 * var(--v-theme-overlay-multiplier));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
141
146
|
.v-expansion-panel-title--active::before {
|
|
142
147
|
opacity: 0.12;
|
|
143
148
|
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { PropType, JSXComponent } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const VExpansionPanels: vue.DefineComponent<{
|
|
5
|
+
theme: StringConstructor;
|
|
6
|
+
tag: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: null;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
multiple: BooleanConstructor;
|
|
15
|
+
mandatory: PropType<boolean | "force">;
|
|
16
|
+
max: NumberConstructor;
|
|
17
|
+
selectedClass: StringConstructor;
|
|
18
|
+
disabled: BooleanConstructor;
|
|
19
|
+
color: StringConstructor;
|
|
20
|
+
variant: {
|
|
21
|
+
type: PropType<"default" | "inset" | "accordion" | "popout">;
|
|
22
|
+
default: string;
|
|
23
|
+
validator: (v: any) => boolean;
|
|
24
|
+
};
|
|
25
|
+
readonly: BooleanConstructor;
|
|
26
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
27
|
+
'update:modelValue': (val: unknown) => true;
|
|
28
|
+
}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
29
|
+
theme: StringConstructor;
|
|
30
|
+
tag: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
modelValue: {
|
|
35
|
+
type: null;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
multiple: BooleanConstructor;
|
|
39
|
+
mandatory: PropType<boolean | "force">;
|
|
40
|
+
max: NumberConstructor;
|
|
41
|
+
selectedClass: StringConstructor;
|
|
42
|
+
disabled: BooleanConstructor;
|
|
43
|
+
color: StringConstructor;
|
|
44
|
+
variant: {
|
|
45
|
+
type: PropType<"default" | "inset" | "accordion" | "popout">;
|
|
46
|
+
default: string;
|
|
47
|
+
validator: (v: any) => boolean;
|
|
48
|
+
};
|
|
49
|
+
readonly: BooleanConstructor;
|
|
50
|
+
}>> & {
|
|
51
|
+
"onUpdate:modelValue"?: ((val: unknown) => any) | undefined;
|
|
52
|
+
}, {
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
multiple: boolean;
|
|
55
|
+
readonly: boolean;
|
|
56
|
+
tag: string;
|
|
57
|
+
variant: "default" | "inset" | "accordion" | "popout";
|
|
58
|
+
modelValue: any;
|
|
59
|
+
}>;
|
|
60
|
+
declare type VExpansionPanels = InstanceType<typeof VExpansionPanels>;
|
|
61
|
+
|
|
62
|
+
declare type IconValue = string | JSXComponent;
|
|
63
|
+
declare const IconValue: PropType<IconValue>;
|
|
64
|
+
|
|
65
|
+
declare const VExpansionPanel: vue.DefineComponent<{
|
|
66
|
+
color: StringConstructor;
|
|
67
|
+
expandIcon: {
|
|
68
|
+
type: vue.PropType<IconValue>;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
collapseIcon: {
|
|
72
|
+
type: vue.PropType<IconValue>;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
hideActions: BooleanConstructor;
|
|
76
|
+
ripple: {
|
|
77
|
+
type: (ObjectConstructor | BooleanConstructor)[];
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
80
|
+
readonly: BooleanConstructor;
|
|
81
|
+
tag: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
rounded: {
|
|
86
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
87
|
+
default: undefined;
|
|
88
|
+
};
|
|
89
|
+
eager: BooleanConstructor;
|
|
90
|
+
value: null;
|
|
91
|
+
disabled: BooleanConstructor;
|
|
92
|
+
selectedClass: StringConstructor;
|
|
93
|
+
elevation: {
|
|
94
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
95
|
+
validator(v: any): boolean;
|
|
96
|
+
};
|
|
97
|
+
title: StringConstructor;
|
|
98
|
+
text: StringConstructor;
|
|
99
|
+
bgColor: StringConstructor;
|
|
100
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
101
|
+
'group:selected': (val: {
|
|
102
|
+
value: boolean;
|
|
103
|
+
}) => true;
|
|
104
|
+
}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
105
|
+
color: StringConstructor;
|
|
106
|
+
expandIcon: {
|
|
107
|
+
type: vue.PropType<IconValue>;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
collapseIcon: {
|
|
111
|
+
type: vue.PropType<IconValue>;
|
|
112
|
+
default: string;
|
|
113
|
+
};
|
|
114
|
+
hideActions: BooleanConstructor;
|
|
115
|
+
ripple: {
|
|
116
|
+
type: (ObjectConstructor | BooleanConstructor)[];
|
|
117
|
+
default: boolean;
|
|
118
|
+
};
|
|
119
|
+
readonly: BooleanConstructor;
|
|
120
|
+
tag: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
default: string;
|
|
123
|
+
};
|
|
124
|
+
rounded: {
|
|
125
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
126
|
+
default: undefined;
|
|
127
|
+
};
|
|
128
|
+
eager: BooleanConstructor;
|
|
129
|
+
value: null;
|
|
130
|
+
disabled: BooleanConstructor;
|
|
131
|
+
selectedClass: StringConstructor;
|
|
132
|
+
elevation: {
|
|
133
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
134
|
+
validator(v: any): boolean;
|
|
135
|
+
};
|
|
136
|
+
title: StringConstructor;
|
|
137
|
+
text: StringConstructor;
|
|
138
|
+
bgColor: StringConstructor;
|
|
139
|
+
}>> & {
|
|
140
|
+
"onGroup:selected"?: ((val: {
|
|
141
|
+
value: boolean;
|
|
142
|
+
}) => any) | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
eager: boolean;
|
|
145
|
+
disabled: boolean;
|
|
146
|
+
readonly: boolean;
|
|
147
|
+
tag: string;
|
|
148
|
+
rounded: string | number | boolean;
|
|
149
|
+
ripple: boolean | Record<string, any>;
|
|
150
|
+
collapseIcon: IconValue;
|
|
151
|
+
expandIcon: IconValue;
|
|
152
|
+
hideActions: boolean;
|
|
153
|
+
}>;
|
|
154
|
+
declare type VExpansionPanel = InstanceType<typeof VExpansionPanel>;
|
|
155
|
+
|
|
156
|
+
declare const VExpansionPanelText: vue.DefineComponent<{
|
|
157
|
+
eager: BooleanConstructor;
|
|
158
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
159
|
+
eager: BooleanConstructor;
|
|
160
|
+
}>>, {
|
|
161
|
+
eager: boolean;
|
|
162
|
+
}>;
|
|
163
|
+
declare type VExpansionPanelText = InstanceType<typeof VExpansionPanelText>;
|
|
164
|
+
|
|
165
|
+
declare const VExpansionPanelTitle: vue.DefineComponent<{
|
|
166
|
+
color: StringConstructor;
|
|
167
|
+
expandIcon: {
|
|
168
|
+
type: vue.PropType<IconValue>;
|
|
169
|
+
default: string;
|
|
170
|
+
};
|
|
171
|
+
collapseIcon: {
|
|
172
|
+
type: vue.PropType<IconValue>;
|
|
173
|
+
default: string;
|
|
174
|
+
};
|
|
175
|
+
hideActions: BooleanConstructor;
|
|
176
|
+
ripple: {
|
|
177
|
+
type: (ObjectConstructor | BooleanConstructor)[];
|
|
178
|
+
default: boolean;
|
|
179
|
+
};
|
|
180
|
+
readonly: BooleanConstructor;
|
|
181
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
182
|
+
color: StringConstructor;
|
|
183
|
+
expandIcon: {
|
|
184
|
+
type: vue.PropType<IconValue>;
|
|
185
|
+
default: string;
|
|
186
|
+
};
|
|
187
|
+
collapseIcon: {
|
|
188
|
+
type: vue.PropType<IconValue>;
|
|
189
|
+
default: string;
|
|
190
|
+
};
|
|
191
|
+
hideActions: BooleanConstructor;
|
|
192
|
+
ripple: {
|
|
193
|
+
type: (ObjectConstructor | BooleanConstructor)[];
|
|
194
|
+
default: boolean;
|
|
195
|
+
};
|
|
196
|
+
readonly: BooleanConstructor;
|
|
197
|
+
}>>, {
|
|
198
|
+
readonly: boolean;
|
|
199
|
+
ripple: boolean | Record<string, any>;
|
|
200
|
+
collapseIcon: IconValue;
|
|
201
|
+
expandIcon: IconValue;
|
|
202
|
+
hideActions: boolean;
|
|
203
|
+
}>;
|
|
204
|
+
declare type VExpansionPanelTitle = InstanceType<typeof VExpansionPanelTitle>;
|
|
205
|
+
|
|
206
|
+
export { VExpansionPanel, VExpansionPanelText, VExpansionPanelTitle, VExpansionPanels };
|
|
@@ -39,44 +39,46 @@
|
|
|
39
39
|
border-bottom-left-radius: 0;
|
|
40
40
|
border-bottom-right-radius: 0;
|
|
41
41
|
}
|
|
42
|
-
.v-field--variant-
|
|
43
|
-
|
|
44
|
-
padding:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
.v-input--density-default .v-field--variant-solo, .v-input--density-default .v-field--variant-filled {
|
|
43
|
+
--v-input-control-height: 56px;
|
|
44
|
+
--v-field-padding-bottom: 6px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.v-input--density-comfortable .v-field--variant-solo, .v-input--density-comfortable .v-field--variant-filled {
|
|
48
|
+
--v-input-control-height: 48px;
|
|
48
49
|
--v-field-padding-bottom: 2px;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
|
|
52
|
+
.v-input--density-compact .v-field--variant-solo, .v-input--density-compact .v-field--variant-filled {
|
|
53
|
+
--v-input-control-height: 40px;
|
|
54
|
+
--v-field-padding-bottom: -2px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.v-field--variant-outlined, .v-field--single-line, .v-field--no-label {
|
|
51
58
|
--v-field-padding-top: 0px;
|
|
52
59
|
}
|
|
53
|
-
.v-input--density-default .v-field--variant-outlined, .v-input--density-default .v-field--single-line {
|
|
60
|
+
.v-input--density-default .v-field--variant-outlined, .v-input--density-default .v-field--single-line, .v-input--density-default .v-field--no-label {
|
|
54
61
|
--v-field-padding-bottom: 16px;
|
|
55
62
|
}
|
|
56
63
|
|
|
57
|
-
.v-input--density-comfortable .v-field--variant-outlined, .v-input--density-comfortable .v-field--single-line {
|
|
64
|
+
.v-input--density-comfortable .v-field--variant-outlined, .v-input--density-comfortable .v-field--single-line, .v-input--density-comfortable .v-field--no-label {
|
|
58
65
|
--v-field-padding-bottom: 12px;
|
|
59
66
|
}
|
|
60
67
|
|
|
61
|
-
.v-input--density-compact .v-field--variant-outlined, .v-input--density-compact .v-field--single-line {
|
|
68
|
+
.v-input--density-compact .v-field--variant-outlined, .v-input--density-compact .v-field--single-line, .v-input--density-compact .v-field--no-label {
|
|
62
69
|
--v-field-padding-bottom: 8px;
|
|
63
70
|
}
|
|
64
71
|
|
|
65
|
-
.v-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
.v-field--variant-plain, .v-field--variant-underlined {
|
|
73
|
+
border-radius: 0;
|
|
74
|
+
padding: 0;
|
|
68
75
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
--v-
|
|
76
|
+
.v-field--variant-plain.v-field, .v-field--variant-underlined.v-field {
|
|
77
|
+
--v-field-padding-start: 0px;
|
|
78
|
+
--v-field-padding-end: 0px;
|
|
79
|
+
--v-field-padding-top: 6px;
|
|
72
80
|
--v-field-padding-bottom: 2px;
|
|
73
81
|
}
|
|
74
|
-
|
|
75
|
-
.v-input--density-compact .v-field--variant-solo, .v-input--density-compact .v-field--variant-filled {
|
|
76
|
-
--v-input-control-height: 40px;
|
|
77
|
-
--v-field-padding-bottom: -2px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
82
|
.v-input--density-default .v-field--variant-plain, .v-input--density-default .v-field--variant-underlined {
|
|
81
83
|
--v-input-control-height: 48px;
|
|
82
84
|
}
|
|
@@ -89,10 +91,10 @@
|
|
|
89
91
|
--v-input-control-height: 32px;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
.v-field--prepended {
|
|
94
|
+
.v-field.v-field--prepended {
|
|
93
95
|
--v-field-padding-start: 6px;
|
|
94
96
|
}
|
|
95
|
-
.v-field--appended {
|
|
97
|
+
.v-field.v-field--appended {
|
|
96
98
|
--v-field-padding-end: 6px;
|
|
97
99
|
}
|
|
98
100
|
|
|
@@ -115,6 +117,7 @@
|
|
|
115
117
|
letter-spacing: inherit;
|
|
116
118
|
}
|
|
117
119
|
.v-field__input input::placeholder,
|
|
120
|
+
input.v-field__input::placeholder,
|
|
118
121
|
textarea.v-field__input::placeholder {
|
|
119
122
|
color: currentColor;
|
|
120
123
|
opacity: var(--v-disabled-opacity);
|
|
@@ -173,7 +173,7 @@ export const VField = genericComponent()({
|
|
|
173
173
|
'v-field--prepended': hasPrepend,
|
|
174
174
|
'v-field--reverse': props.reverse,
|
|
175
175
|
'v-field--single-line': props.singleLine,
|
|
176
|
-
'v-field--
|
|
176
|
+
'v-field--no-label': !label,
|
|
177
177
|
[`v-field--variant-${props.variant}`]: true
|
|
178
178
|
}, themeClasses.value, backgroundColorClasses.value, focusClasses.value, loaderClasses.value],
|
|
179
179
|
"style": [backgroundColorStyles.value, textColorStyles.value],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VField.mjs","names":["VExpandXTransition","useInputIcon","VFieldLabel","IconValue","LoaderSlot","makeLoaderProps","useLoader","makeFocusProps","useFocus","makeThemeProps","provideTheme","useBackgroundColor","useTextColor","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","color","dirty","disabled","error","label","persistentClear","prependInnerIcon","reverse","singleLine","variant","validator","v","includes","VField","name","inheritAttrs","props","id","emits","e","focused","val","setup","attrs","emit","slots","themeClasses","loaderClasses","focusClasses","isFocused","focus","blur","InputIcon","isActive","hasLabel","uid","labelRef","floatingLabelRef","controlRef","backgroundColorClasses","backgroundColorStyles","textColorClasses","textColorStyles","value","undefined","el","$el","targetEl","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","target","document","activeElement","preventDefault","isOutlined","hasPrepend","hasClear","clear","hasAppend","for","loading","loader","class","filterFieldProps","keys","Object","filter","k"],"sources":["../../../src/components/VField/VField.tsx"],"sourcesContent":["// Styles\nimport './VField.sass'\n\n// Components\nimport { VExpandXTransition } from '@/components/transitions'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\nimport { VFieldLabel } from './VFieldLabel'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\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 { LoaderSlotProps } from '@/composables/loader'\nimport type { MakeSlots } from '@/util'\nimport type { PropType, Ref } from 'vue'\nimport type { VInputSlot } from '@/components/VInput/VInput'\n\nconst allowedVariants = ['underlined', 'outlined', 'filled', 'solo', '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 color: String,\n dirty: Boolean,\n disabled: Boolean,\n error: 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,\n 'onClick:appendInner': EventProp,\n 'onClick:prependInner': EventProp,\n\n ...makeThemeProps(),\n ...makeLoaderProps(),\n}, 'v-field')\n\nexport type VFieldSlots = MakeSlots<{\n clear: []\n 'prepend-inner': [DefaultInputSlot & VInputSlot]\n 'append-inner': [DefaultInputSlot & VInputSlot]\n label: [DefaultInputSlot & VInputSlot]\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}>()({\n name: 'VField',\n\n inheritAttrs: false,\n\n props: {\n id: String,\n\n ...makeFocusProps(),\n ...makeVFieldProps(),\n },\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\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\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\n const labelRef = ref<VFieldLabel>()\n const floatingLabelRef = ref<VFieldLabel>()\n const controlRef = ref<HTMLElement>()\n\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { textColorClasses, textColorStyles } = useTextColor(computed(() => {\n return (\n isActive.value &&\n isFocused.value &&\n !props.error &&\n !props.disabled\n ) ? props.color : undefined\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 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 }, { 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 emit('click:control', e)\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 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--disabled': props.disabled,\n 'v-field--dirty': props.dirty,\n 'v-field--error': props.error,\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--has-label': !!label,\n [`v-field--variant-${props.variant}`]: true,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n focusClasses.value,\n loaderClasses.value,\n ]}\n style={[\n backgroundColorStyles.value,\n textColorStyles.value,\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 { ['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 },\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 >\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 { ['plain', 'underlined'].includes(props.variant) && 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))\n return pick(attrs, keys)\n}\n"],"mappings":";AAAA;AACA,sB,CAEA;;SACSA,kB;SACAC,Y;SACAC,W,6BAET;;SACSC,S;SACAC,U,EAAYC,e,EAAiBC,S;SAC7BC,c,EAAgBC,Q;SAChBC,c,EAAgBC,Y;SAChBC,kB,EAAoBC,Y,uCAE7B;;AACA,SAASC,QAAT,EAAmBC,GAAnB,EAAwBC,KAAxB,EAA+BC,KAA/B,QAA4C,KAA5C;SAEEC,O,EACAC,a,EACAC,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AK,EAAmBkD,SAAS,CAAChC,KAA7B,CAFA,EAIL3B,KAAK,CAACzB,eAAN;QAAA,OACe,aADf;QAAA,QACkC;MADlC,QAJK,EA3Ff;QAAA,SAsGa,CACL,kBADK,EAELkD,gBAAgB,CAACE,KAFZ;MAtGb,IA2GQsC,UAAU;QAAA,SAEG;MAFH,UAIN/C,QAAQ,CAACS,KAAT;QAAA,SACW;MADX;QAAA,OAEqBN,gBAFrB;QAAA;QAAA,OAEuDpB,EAAE,CAAC0B;MAF1D;QAAA,gBAGMvC,KAHN;MAAA,IAJM;QAAA,SAYG;MAZH,UA3GlB,EA2HQ,CAAC,OAAD,EAAU,YAAV,EAAwBQ,QAAxB,CAAiCI,KAAK,CAACP,OAAvC,KAAmDyB,QAAQ,CAACS,KAA5D;QAAA,OACmBN,gBADnB;QAAA;QAAA,OACqDpB,EAAE,CAAC0B;MADxD;QAAA,gBAEIvC,KAFJ;MAAA,EA3HR;IAmID,CA/IQ,CAAT;IAiJA,OAAO;MACLkC;IADK,CAAP;EAGD;;AAvPE,CANiC,CAA/B;AAkQP;AACA,OAAO,SAASoD,gBAAT,CAA2BnE,KAA3B,EAA2D;EAChE,MAAMoE,IAAI,GAAGC,MAAM,CAACD,IAAP,CAAY9E,MAAM,CAACG,KAAnB,EAA0B6E,MAA1B,CAAiCC,CAAC,IAAI,CAAC/G,IAAI,CAAC+G,CAAD,CAA3C,CAAb;EACA,OAAO7G,IAAI,CAACsC,KAAD,EAAQoE,IAAR,CAAX;AACD"}
|
|
1
|
+
{"version":3,"file":"VField.mjs","names":["VExpandXTransition","useInputIcon","VFieldLabel","IconValue","LoaderSlot","makeLoaderProps","useLoader","makeFocusProps","useFocus","makeThemeProps","provideTheme","useBackgroundColor","useTextColor","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","color","dirty","disabled","error","label","persistentClear","prependInnerIcon","reverse","singleLine","variant","validator","v","includes","VField","name","inheritAttrs","props","id","emits","e","focused","val","setup","attrs","emit","slots","themeClasses","loaderClasses","focusClasses","isFocused","focus","blur","InputIcon","isActive","hasLabel","uid","labelRef","floatingLabelRef","controlRef","backgroundColorClasses","backgroundColorStyles","textColorClasses","textColorStyles","value","undefined","el","$el","targetEl","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","target","document","activeElement","preventDefault","isOutlined","hasPrepend","hasClear","clear","hasAppend","for","loading","loader","class","filterFieldProps","keys","Object","filter","k"],"sources":["../../../src/components/VField/VField.tsx"],"sourcesContent":["// Styles\nimport './VField.sass'\n\n// Components\nimport { VExpandXTransition } from '@/components/transitions'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\nimport { VFieldLabel } from './VFieldLabel'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\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 { LoaderSlotProps } from '@/composables/loader'\nimport type { MakeSlots } from '@/util'\nimport type { PropType, Ref } from 'vue'\nimport type { VInputSlot } from '@/components/VInput/VInput'\n\nconst allowedVariants = ['underlined', 'outlined', 'filled', 'solo', '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 color: String,\n dirty: Boolean,\n disabled: Boolean,\n error: 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,\n 'onClick:appendInner': EventProp,\n 'onClick:prependInner': EventProp,\n\n ...makeThemeProps(),\n ...makeLoaderProps(),\n}, 'v-field')\n\nexport type VFieldSlots = MakeSlots<{\n clear: []\n 'prepend-inner': [DefaultInputSlot & VInputSlot]\n 'append-inner': [DefaultInputSlot & VInputSlot]\n label: [DefaultInputSlot & VInputSlot]\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}>()({\n name: 'VField',\n\n inheritAttrs: false,\n\n props: {\n id: String,\n\n ...makeFocusProps(),\n ...makeVFieldProps(),\n },\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\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\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\n const labelRef = ref<VFieldLabel>()\n const floatingLabelRef = ref<VFieldLabel>()\n const controlRef = ref<HTMLElement>()\n\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { textColorClasses, textColorStyles } = useTextColor(computed(() => {\n return (\n isActive.value &&\n isFocused.value &&\n !props.error &&\n !props.disabled\n ) ? props.color : undefined\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 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 }, { 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 emit('click:control', e)\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 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--disabled': props.disabled,\n 'v-field--dirty': props.dirty,\n 'v-field--error': props.error,\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 ]}\n style={[\n backgroundColorStyles.value,\n textColorStyles.value,\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 { ['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 },\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 >\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 { ['plain', 'underlined'].includes(props.variant) && 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))\n return pick(attrs, keys)\n}\n"],"mappings":";AAAA;AACA,sB,CAEA;;SACSA,kB;SACAC,Y;SACAC,W,6BAET;;SACSC,S;SACAC,U,EAAYC,e,EAAiBC,S;SAC7BC,c,EAAgBC,Q;SAChBC,c,EAAgBC,Y;SAChBC,kB,EAAoBC,Y,uCAE7B;;AACA,SAASC,QAAT,EAAmBC,GAAnB,EAAwBC,KAAxB,EAA+BC,KAA/B,QAA4C,KAA5C;SAEEC,O,EACAC,a,EACAC,S,EACAC,gB,EACAC,M,EACAC,I,EACAC,iB,EACAC,I,EACAC,Y,EACAC,c,EACAC,S,gCAGF;;AAMA,MAAMC,eAAe,GAAG,CAAC,YAAD,EAAe,UAAf,EAA2B,QAA3B,EAAqC,MAArC,EAA6C,OAA7C,CAAxB;AAeA,OAAO,MAAMC,eAAe,GAAGJ,YAAY,CAAC;EAC1CK,eAAe,EAAE3B,SADyB;EAE1C4B,OAAO,EAAEC,MAFiC;EAG1CC,SAAS,EAAEC,OAH+B;EAI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,gBAGMvC,KAHN;MAAA,IAJM;QAAA,SAYG;MAZH,UA3GlB,EA2HQ,CAAC,OAAD,EAAU,YAAV,EAAwBQ,QAAxB,CAAiCI,KAAK,CAACP,OAAvC,KAAmDyB,QAAQ,CAACS,KAA5D;QAAA,OACmBN,gBADnB;QAAA;QAAA,OACqDpB,EAAE,CAAC0B;MADxD;QAAA,gBAEIvC,KAFJ;MAAA,EA3HR;IAmID,CA/IQ,CAAT;IAiJA,OAAO;MACLkC;IADK,CAAP;EAGD;;AAvPE,CANiC,CAA/B;AAkQP;AACA,OAAO,SAASoD,gBAAT,CAA2BnE,KAA3B,EAA2D;EAChE,MAAMoE,IAAI,GAAGC,MAAM,CAACD,IAAP,CAAY9E,MAAM,CAACG,KAAnB,EAA0B6E,MAA1B,CAAiCC,CAAC,IAAI,CAAC/G,IAAI,CAAC+G,CAAD,CAA3C,CAAb;EACA,OAAO7G,IAAI,CAACsC,KAAD,EAAQoE,IAAR,CAAX;AACD"}
|
|
@@ -48,38 +48,38 @@
|
|
|
48
48
|
border-bottom-left-radius: 0
|
|
49
49
|
border-bottom-right-radius: 0
|
|
50
50
|
|
|
51
|
-
&--variant-
|
|
52
|
-
&--variant-
|
|
53
|
-
border-radius: 0
|
|
54
|
-
padding: 0
|
|
55
|
-
--v-field-padding-start: 0px
|
|
56
|
-
--v-field-padding-end: 0px
|
|
57
|
-
--v-field-padding-top: 6px
|
|
58
|
-
--v-field-padding-bottom: 2px
|
|
59
|
-
|
|
60
|
-
&--variant-outlined,
|
|
61
|
-
&--single-line
|
|
62
|
-
--v-field-padding-top: 0px
|
|
51
|
+
&--variant-solo,
|
|
52
|
+
&--variant-filled
|
|
63
53
|
$root: &
|
|
64
54
|
|
|
65
55
|
@at-root
|
|
66
56
|
@include tools.density('v-input', $input-density) using ($modifier)
|
|
67
57
|
@at-root #{selector.nest(&, $root)}
|
|
68
|
-
--v-
|
|
58
|
+
--v-input-control-height: #{$field-control-height + $modifier}
|
|
59
|
+
--v-field-padding-bottom: #{$field-control-padding-bottom + $modifier * .5}
|
|
69
60
|
|
|
70
|
-
&--variant-
|
|
71
|
-
&--
|
|
61
|
+
&--variant-outlined,
|
|
62
|
+
&--single-line,
|
|
63
|
+
&--no-label
|
|
64
|
+
--v-field-padding-top: 0px
|
|
72
65
|
$root: &
|
|
73
66
|
|
|
74
67
|
@at-root
|
|
75
68
|
@include tools.density('v-input', $input-density) using ($modifier)
|
|
76
69
|
@at-root #{selector.nest(&, $root)}
|
|
77
|
-
--v-
|
|
78
|
-
--v-field-padding-bottom: #{$field-control-padding-bottom + $modifier * .5}
|
|
70
|
+
--v-field-padding-bottom: #{16px + $modifier * .5}
|
|
79
71
|
|
|
80
72
|
&--variant-plain,
|
|
81
73
|
&--variant-underlined
|
|
82
74
|
$root: &
|
|
75
|
+
border-radius: 0
|
|
76
|
+
padding: 0
|
|
77
|
+
|
|
78
|
+
&.v-field
|
|
79
|
+
--v-field-padding-start: 0px
|
|
80
|
+
--v-field-padding-end: 0px
|
|
81
|
+
--v-field-padding-top: 6px
|
|
82
|
+
--v-field-padding-bottom: 2px
|
|
83
83
|
|
|
84
84
|
@at-root
|
|
85
85
|
@include tools.density('v-input', $input-density) using ($modifier)
|
|
@@ -87,11 +87,12 @@
|
|
|
87
87
|
--v-input-control-height: #{$field-control-underlined-height + $modifier}
|
|
88
88
|
|
|
89
89
|
// These are separate so they can override the default variant styles
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
&.v-field
|
|
91
|
+
&--prepended
|
|
92
|
+
--v-field-padding-start: #{$field-control-affixed-inner-padding}
|
|
92
93
|
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
&--appended
|
|
95
|
+
--v-field-padding-end: #{$field-control-affixed-inner-padding}
|
|
95
96
|
|
|
96
97
|
/* endregion */
|
|
97
98
|
/* region ELEMENTS */
|
|
@@ -113,6 +114,7 @@
|
|
|
113
114
|
|
|
114
115
|
@at-root
|
|
115
116
|
& input::placeholder,
|
|
117
|
+
input#{&}::placeholder,
|
|
116
118
|
textarea#{&}::placeholder
|
|
117
119
|
color: currentColor
|
|
118
120
|
opacity: var(--v-disabled-opacity)
|