@vuetify/nightly 3.2.0-dev-20230309.0 → 3.2.0-dev-20230322.0
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 +2 -2
- package/dist/json/attributes.json +210 -30
- package/dist/json/importMap.json +4 -4
- package/dist/json/tags.json +47 -2
- package/dist/json/web-types.json +529 -63
- package/dist/vuetify-labs.css +1186 -1146
- package/dist/vuetify-labs.d.ts +56928 -14280
- package/dist/vuetify-labs.esm.js +557 -363
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +557 -363
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +204 -179
- package/dist/vuetify.d.ts +55330 -15866
- package/dist/vuetify.esm.js +400 -306
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +400 -306
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +668 -667
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +6 -9
- package/lib/blueprints/md1.d.ts +6 -9
- package/lib/blueprints/md2.d.ts +6 -9
- package/lib/blueprints/md3.d.ts +6 -9
- package/lib/blueprints/md3.mjs +6 -0
- package/lib/blueprints/md3.mjs.map +1 -1
- package/lib/components/VAlert/VAlert.mjs +29 -15
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/index.d.ts +510 -82
- package/lib/components/VApp/VApp.css +1 -0
- package/lib/components/VApp/VApp.sass +1 -0
- package/lib/components/VApp/index.d.ts +158 -20
- package/lib/components/VAppBar/VAppBar.mjs +2 -2
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +616 -110
- package/lib/components/VAutocomplete/VAutocomplete.mjs +13 -7
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.ts +1656 -130
- package/lib/components/VAvatar/index.d.ts +205 -29
- package/lib/components/VBadge/index.d.ts +284 -42
- package/lib/components/VBanner/VBanner.mjs +19 -12
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/index.d.ts +478 -84
- package/lib/components/VBottomNavigation/index.d.ts +321 -40
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +11 -7
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +325 -45
- package/lib/components/VBtn/VBtn.css +0 -5
- package/lib/components/VBtn/VBtn.mjs +65 -58
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.sass +0 -7
- package/lib/components/VBtn/_variables.scss +0 -2
- package/lib/components/VBtn/index.d.ts +452 -69
- package/lib/components/VBtnGroup/VBtnGroup.mjs +1 -7
- package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
- package/lib/components/VBtnGroup/index.d.ts +185 -26
- package/lib/components/VBtnToggle/VBtnToggle.mjs +2 -2
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +245 -35
- package/lib/components/VCard/VCard.mjs +10 -6
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs +27 -23
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +938 -172
- package/lib/components/VCarousel/index.d.ts +561 -123
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +1 -4
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +831 -147
- package/lib/components/VChip/VChip.css +110 -90
- package/lib/components/VChip/VChip.mjs +70 -48
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/_mixins.scss +27 -23
- package/lib/components/VChip/index.d.ts +474 -76
- package/lib/components/VChipGroup/index.d.ts +227 -32
- package/lib/components/VCode/index.d.ts +109 -16
- package/lib/components/VColorPicker/index.d.ts +284 -20
- package/lib/components/VCombobox/VCombobox.mjs +13 -7
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +1668 -130
- package/lib/components/VCounter/index.d.ts +1894 -87
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +4 -1
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
- package/lib/components/VDefaultsProvider/index.d.ts +133 -21
- package/lib/components/VDialog/VDialog.css +31 -24
- package/lib/components/VDialog/VDialog.mjs +2 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +19 -12
- package/lib/components/VDialog/index.d.ts +2362 -146
- package/lib/components/VDivider/index.d.ts +130 -23
- package/lib/components/VExpansionPanel/index.d.ts +719 -119
- package/lib/components/VField/index.d.ts +163 -21
- package/lib/components/VFileInput/index.d.ts +1038 -104
- package/lib/components/VFooter/VFooter.css +2 -0
- package/lib/components/VFooter/VFooter.sass +2 -0
- package/lib/components/VFooter/_variables.scss +2 -0
- package/lib/components/VFooter/index.d.ts +203 -28
- package/lib/components/VForm/index.d.ts +204 -23
- package/lib/components/VGrid/VCol.mjs +6 -5
- package/lib/components/VGrid/VCol.mjs.map +1 -1
- package/lib/components/VGrid/VRow.mjs +4 -4
- package/lib/components/VGrid/VRow.mjs.map +1 -1
- package/lib/components/VGrid/index.d.ts +733 -76
- package/lib/components/VHover/index.d.ts +182 -35
- package/lib/components/VIcon/index.d.ts +494 -50
- package/lib/components/VImg/VImg.mjs +2 -2
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.ts +275 -46
- package/lib/components/VInput/index.d.ts +315 -53
- package/lib/components/VItemGroup/index.d.ts +308 -52
- package/lib/components/VKbd/VKbd.css +1 -0
- package/lib/components/VKbd/VKbd.sass +1 -0
- package/lib/components/VKbd/_variables.scss +1 -0
- package/lib/components/VKbd/index.d.ts +109 -16
- package/lib/components/VLabel/index.d.ts +113 -20
- package/lib/components/VLayout/index.d.ts +296 -41
- package/lib/components/VLazy/VLazy.mjs +4 -1
- package/lib/components/VLazy/VLazy.mjs.map +1 -1
- package/lib/components/VLazy/index.d.ts +219 -30
- package/lib/components/VList/VListChildren.mjs +2 -2
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +1 -4
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +23 -19
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +1461 -223
- package/lib/components/VLocaleProvider/index.d.ts +121 -20
- package/lib/components/VMain/index.d.ts +118 -17
- package/lib/components/VMenu/VMenu.css +4 -4
- package/lib/components/VMenu/VMenu.mjs +2 -2
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.sass +1 -1
- package/lib/components/VMenu/index.d.ts +2368 -142
- package/lib/components/VMessages/index.d.ts +1921 -98
- package/lib/components/VNavigationDrawer/index.d.ts +379 -56
- package/lib/components/VOverlay/VOverlay.css +2 -2
- package/lib/components/VOverlay/VOverlay.mjs +1 -4
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.sass +1 -1
- package/lib/components/VOverlay/_variables.scss +1 -1
- package/lib/components/VOverlay/index.d.ts +519 -85
- package/lib/components/VPagination/index.d.ts +502 -68
- package/lib/components/VParallax/VParallax.mjs +3 -3
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VParallax/index.d.ts +141 -28
- package/lib/components/VProgressCircular/index.d.ts +186 -25
- package/lib/components/VProgressLinear/index.d.ts +319 -48
- package/lib/components/VRadio/index.d.ts +313 -57
- package/lib/components/VRadioGroup/VRadioGroup.mjs +4 -6
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +463 -83
- package/lib/components/VRangeSlider/index.d.ts +528 -80
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/index.d.ts +305 -43
- package/lib/components/VResponsive/index.d.ts +142 -27
- package/lib/components/VSelect/VSelect.mjs +13 -7
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +3060 -328
- package/lib/components/VSelectionControl/VSelectionControl.mjs +1 -4
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.ts +76 -4
- package/lib/components/VSelectionControlGroup/index.d.ts +242 -38
- package/lib/components/VSheet/VSheet.mjs +1 -7
- package/lib/components/VSheet/VSheet.mjs.map +1 -1
- package/lib/components/VSheet/index.d.ts +194 -31
- package/lib/components/VSlideGroup/index.d.ts +475 -83
- package/lib/components/VSlider/VSliderTrack.mjs +1 -0
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +521 -79
- package/lib/components/VSlider/slider.mjs +5 -6
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.css +2 -7
- package/lib/components/VSnackbar/VSnackbar.mjs +4 -3
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +3 -8
- package/lib/components/VSnackbar/index.d.ts +1219 -81
- package/lib/components/VSwitch/VSwitch.mjs +2 -2
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +498 -92
- package/lib/components/VSystemBar/index.d.ts +184 -27
- package/lib/components/VTable/index.d.ts +190 -35
- package/lib/components/VTabs/VTab.mjs +7 -23
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/index.d.ts +623 -71
- package/lib/components/VTextField/VTextField.mjs +8 -5
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +1404 -106
- package/lib/components/VTextarea/VTextarea.mjs +7 -1
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +1014 -102
- package/lib/components/VThemeProvider/index.d.ts +124 -19
- package/lib/components/VTimeline/VTimelineDivider.mjs +18 -10
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
- package/lib/components/VTimeline/index.d.ts +441 -71
- package/lib/components/VToolbar/VToolbar.mjs +10 -9
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/index.d.ts +542 -93
- package/lib/components/VTooltip/VTooltip.css +3 -3
- package/lib/components/VTooltip/VTooltip.mjs +2 -2
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.sass +1 -1
- package/lib/components/VTooltip/index.d.ts +1276 -82
- package/lib/components/VValidation/index.d.ts +201 -30
- package/lib/components/VWindow/index.d.ts +527 -95
- package/lib/components/index.d.ts +55255 -15788
- package/lib/components/transitions/index.d.ts +2097 -308
- package/lib/composables/defaults.mjs +2 -0
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/display.mjs +2 -0
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/form.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.ts +7 -10
- package/lib/labs/VDataTable/VDataTable.css +15 -0
- package/lib/labs/VDataTable/VDataTable.mjs +41 -17
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTable.sass +9 -0
- package/lib/labs/VDataTable/VDataTableFooter.mjs +3 -2
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRow.mjs +8 -2
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +2 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +39 -17
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +23 -12
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/expand.mjs +1 -1
- package/lib/labs/VDataTable/composables/expand.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/group.mjs +12 -1
- package/lib/labs/VDataTable/composables/group.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/options.mjs +0 -12
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/paginate.mjs +25 -4
- package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/select.mjs +1 -1
- package/lib/labs/VDataTable/composables/select.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/sort.mjs +19 -3
- package/lib/labs/VDataTable/composables/sort.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +4179 -1017
- package/lib/labs/VVirtualScroll/index.d.ts +32 -1
- package/lib/labs/components.d.ts +4214 -1026
- package/lib/locale/adapters/vue-i18n.d.ts +1 -1
- package/lib/locale/adapters/vue-i18n.mjs +1 -1
- package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
- package/lib/styles/main.css +4 -0
- package/lib/styles/settings/_utilities.scss +7 -0
- package/lib/util/animation.mjs +8 -1
- package/lib/util/animation.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +15 -7
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +4 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +5 -10
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
flex: 1 1 auto;
|
|
5
5
|
padding: 8px 16px;
|
|
6
6
|
position: relative;
|
|
7
|
+
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
8
|
+
transition-property: height, width, transform, max-width, left, right, top, bottom;
|
|
7
9
|
border-color: rgba(var(--v-border-color), var(--v-border-opacity));
|
|
8
10
|
border-style: solid;
|
|
9
11
|
border-width: 0;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../styles/settings';
|
|
3
|
+
@use "../../styles/settings/variables";
|
|
3
4
|
|
|
4
5
|
// VFooter
|
|
5
6
|
$footer-background: rgb(var(--v-theme-surface)) !default;
|
|
@@ -15,6 +16,7 @@ $footer-elevation: 0 !default;
|
|
|
15
16
|
$footer-padding: 8px 16px !default;
|
|
16
17
|
$footer-positions: absolute fixed !default;
|
|
17
18
|
$footer-rounded-border-radius: settings.$border-radius-root !default;
|
|
19
|
+
$footer-transition: .2s variables.$standard-easing !default;
|
|
18
20
|
|
|
19
21
|
// Lists
|
|
20
22
|
$footer-border: (
|
|
@@ -1,31 +1,142 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes } from 'vue';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
4
|
+
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
|
5
|
+
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare const VFooter: {
|
|
9
|
+
new (...args: any[]): {
|
|
10
|
+
$: vue.ComponentInternalInstance;
|
|
11
|
+
$data: {};
|
|
12
|
+
$props: Partial<{
|
|
13
|
+
absolute: boolean;
|
|
14
|
+
height: string | number;
|
|
15
|
+
order: string | number;
|
|
16
|
+
tag: string;
|
|
17
|
+
app: boolean;
|
|
18
|
+
rounded: string | number | boolean;
|
|
19
|
+
}> & Omit<{
|
|
20
|
+
absolute: boolean;
|
|
21
|
+
height: string | number;
|
|
22
|
+
order: string | number;
|
|
23
|
+
tag: string;
|
|
24
|
+
app: boolean;
|
|
25
|
+
} & {
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
border?: string | number | boolean | undefined;
|
|
28
|
+
color?: string | undefined;
|
|
29
|
+
elevation?: string | number | undefined;
|
|
30
|
+
theme?: string | undefined;
|
|
31
|
+
rounded?: string | number | boolean | undefined;
|
|
32
|
+
} & {
|
|
33
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
34
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
35
|
+
};
|
|
36
|
+
$slots?: {
|
|
37
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
'v-slots'?: {
|
|
40
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
} & {
|
|
43
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
44
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "absolute" | "height" | "order" | "tag" | "app" | "rounded">;
|
|
45
|
+
$attrs: {
|
|
46
|
+
[x: string]: unknown;
|
|
47
|
+
};
|
|
48
|
+
$refs: {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
};
|
|
51
|
+
$slots: Readonly<{
|
|
52
|
+
[name: string]: vue.Slot | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
$root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
55
|
+
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
56
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
57
|
+
$el: any;
|
|
58
|
+
$options: vue.ComponentOptionsBase<{
|
|
59
|
+
absolute: boolean;
|
|
60
|
+
height: string | number;
|
|
61
|
+
order: string | number;
|
|
62
|
+
tag: string;
|
|
63
|
+
app: boolean;
|
|
64
|
+
} & {
|
|
65
|
+
name?: string | undefined;
|
|
66
|
+
border?: string | number | boolean | undefined;
|
|
67
|
+
color?: string | undefined;
|
|
68
|
+
elevation?: string | number | undefined;
|
|
69
|
+
theme?: string | undefined;
|
|
70
|
+
rounded?: string | number | boolean | undefined;
|
|
71
|
+
} & {
|
|
72
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
73
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
74
|
+
};
|
|
75
|
+
$slots?: {
|
|
76
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
'v-slots'?: {
|
|
79
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
} & {
|
|
82
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
83
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
|
|
84
|
+
absolute: boolean;
|
|
85
|
+
height: string | number;
|
|
86
|
+
order: string | number;
|
|
87
|
+
tag: string;
|
|
88
|
+
app: boolean;
|
|
89
|
+
rounded: string | number | boolean;
|
|
90
|
+
}, {}, string> & {
|
|
91
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
92
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
93
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
94
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
95
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
96
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
97
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
98
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
99
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
100
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
101
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
102
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
103
|
+
renderTracked?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
104
|
+
renderTriggered?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
105
|
+
errorCaptured?: (((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
106
|
+
};
|
|
107
|
+
$forceUpdate: () => void;
|
|
108
|
+
$nextTick: typeof vue.nextTick;
|
|
109
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: vue.WatchOptions<boolean> | undefined): vue.WatchStopHandle;
|
|
110
|
+
} & {
|
|
111
|
+
absolute: boolean;
|
|
112
|
+
height: string | number;
|
|
113
|
+
order: string | number;
|
|
114
|
+
tag: string;
|
|
115
|
+
app: boolean;
|
|
116
|
+
} & {
|
|
117
|
+
name?: string | undefined;
|
|
118
|
+
border?: string | number | boolean | undefined;
|
|
119
|
+
color?: string | undefined;
|
|
120
|
+
elevation?: string | number | undefined;
|
|
121
|
+
theme?: string | undefined;
|
|
122
|
+
rounded?: string | number | boolean | undefined;
|
|
123
|
+
} & {
|
|
124
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
125
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
126
|
+
};
|
|
127
|
+
$slots?: {
|
|
128
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
129
|
+
} | undefined;
|
|
130
|
+
'v-slots'?: {
|
|
131
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
132
|
+
} | undefined;
|
|
133
|
+
} & {
|
|
134
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
135
|
+
} & vue.ShallowUnwrapRef<{}> & {} & vue.ComponentCustomProperties & {};
|
|
136
|
+
__isFragment?: undefined;
|
|
137
|
+
__isTeleport?: undefined;
|
|
138
|
+
__isSuspense?: undefined;
|
|
139
|
+
} & vue.ComponentOptionsBase<{
|
|
29
140
|
absolute: boolean;
|
|
30
141
|
height: string | number;
|
|
31
142
|
order: string | number;
|
|
@@ -50,14 +161,78 @@ declare const VFooter: vue.DefineComponent<{
|
|
|
50
161
|
} | undefined;
|
|
51
162
|
} & {
|
|
52
163
|
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
53
|
-
}, {
|
|
164
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
|
|
54
165
|
absolute: boolean;
|
|
55
166
|
height: string | number;
|
|
56
167
|
order: string | number;
|
|
57
168
|
tag: string;
|
|
58
169
|
app: boolean;
|
|
59
170
|
rounded: string | number | boolean;
|
|
60
|
-
}
|
|
171
|
+
}, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
|
|
172
|
+
theme: StringConstructor;
|
|
173
|
+
tag: Omit<{
|
|
174
|
+
type: StringConstructor;
|
|
175
|
+
default: string;
|
|
176
|
+
}, "type" | "default"> & {
|
|
177
|
+
type: vue.PropType<string>;
|
|
178
|
+
default: string;
|
|
179
|
+
};
|
|
180
|
+
rounded: {
|
|
181
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
182
|
+
default: undefined;
|
|
183
|
+
};
|
|
184
|
+
name: {
|
|
185
|
+
type: StringConstructor;
|
|
186
|
+
};
|
|
187
|
+
order: {
|
|
188
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
189
|
+
default: number;
|
|
190
|
+
};
|
|
191
|
+
absolute: BooleanConstructor;
|
|
192
|
+
elevation: {
|
|
193
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
194
|
+
validator(v: any): boolean;
|
|
195
|
+
};
|
|
196
|
+
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
197
|
+
app: BooleanConstructor;
|
|
198
|
+
color: StringConstructor;
|
|
199
|
+
height: {
|
|
200
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
201
|
+
default: string;
|
|
202
|
+
};
|
|
203
|
+
}, vue.ExtractPropTypes<{
|
|
204
|
+
theme: StringConstructor;
|
|
205
|
+
tag: Omit<{
|
|
206
|
+
type: StringConstructor;
|
|
207
|
+
default: string;
|
|
208
|
+
}, "type" | "default"> & {
|
|
209
|
+
type: vue.PropType<string>;
|
|
210
|
+
default: string;
|
|
211
|
+
};
|
|
212
|
+
rounded: {
|
|
213
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
214
|
+
default: undefined;
|
|
215
|
+
};
|
|
216
|
+
name: {
|
|
217
|
+
type: StringConstructor;
|
|
218
|
+
};
|
|
219
|
+
order: {
|
|
220
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
221
|
+
default: number;
|
|
222
|
+
};
|
|
223
|
+
absolute: BooleanConstructor;
|
|
224
|
+
elevation: {
|
|
225
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
226
|
+
validator(v: any): boolean;
|
|
227
|
+
};
|
|
228
|
+
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
229
|
+
app: BooleanConstructor;
|
|
230
|
+
color: StringConstructor;
|
|
231
|
+
height: {
|
|
232
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
233
|
+
default: string;
|
|
234
|
+
};
|
|
235
|
+
}>>;
|
|
61
236
|
type VFooter = InstanceType<typeof VFooter>;
|
|
62
237
|
|
|
63
238
|
export { VFooter };
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes } from 'vue';
|
|
3
|
+
|
|
4
|
+
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
|
5
|
+
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
|
|
6
|
+
}
|
|
2
7
|
|
|
3
8
|
interface FieldValidationResult {
|
|
4
9
|
id: number | string;
|
|
@@ -11,7 +16,177 @@ interface FormValidationResult {
|
|
|
11
16
|
interface SubmitEventPromise extends SubmitEvent, Promise<FormValidationResult> {
|
|
12
17
|
}
|
|
13
18
|
|
|
14
|
-
declare const VForm:
|
|
19
|
+
declare const VForm: {
|
|
20
|
+
new (...args: any[]): {
|
|
21
|
+
$: vue.ComponentInternalInstance;
|
|
22
|
+
$data: {};
|
|
23
|
+
$props: Partial<{
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
readonly: boolean;
|
|
26
|
+
modelValue: boolean | null;
|
|
27
|
+
validateOn: "input" | "blur" | "submit" | undefined;
|
|
28
|
+
fastFail: boolean;
|
|
29
|
+
}> & Omit<{
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
readonly: boolean;
|
|
32
|
+
modelValue: boolean | null;
|
|
33
|
+
validateOn: "input" | "blur" | "submit" | undefined;
|
|
34
|
+
fastFail: boolean;
|
|
35
|
+
} & {} & {
|
|
36
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
37
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
38
|
+
};
|
|
39
|
+
$slots?: {
|
|
40
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
'v-slots'?: {
|
|
43
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
} & {
|
|
46
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
47
|
+
} & {
|
|
48
|
+
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
|
|
49
|
+
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
|
|
50
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "disabled" | "readonly" | "modelValue" | "validateOn" | "fastFail">;
|
|
51
|
+
$attrs: {
|
|
52
|
+
[x: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
$refs: {
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
$slots: Readonly<{
|
|
58
|
+
[name: string]: vue.Slot | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
$root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
61
|
+
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
62
|
+
$emit: ((event: "submit", e: SubmitEventPromise) => void) & ((event: "update:modelValue", val: boolean | null) => void);
|
|
63
|
+
$el: any;
|
|
64
|
+
$options: vue.ComponentOptionsBase<{
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
readonly: boolean;
|
|
67
|
+
modelValue: boolean | null;
|
|
68
|
+
validateOn: "input" | "blur" | "submit" | undefined;
|
|
69
|
+
fastFail: boolean;
|
|
70
|
+
} & {} & {
|
|
71
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
72
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
73
|
+
};
|
|
74
|
+
$slots?: {
|
|
75
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
'v-slots'?: {
|
|
78
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
} & {
|
|
81
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
82
|
+
} & {
|
|
83
|
+
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
|
|
84
|
+
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
errors: vue.Ref<{
|
|
87
|
+
id: string | number;
|
|
88
|
+
errorMessages: string[];
|
|
89
|
+
}[]>;
|
|
90
|
+
isDisabled: vue.ComputedRef<boolean>;
|
|
91
|
+
isReadonly: vue.ComputedRef<boolean>;
|
|
92
|
+
isValidating: vue.Ref<boolean>;
|
|
93
|
+
items: vue.Ref<{
|
|
94
|
+
id: string | number;
|
|
95
|
+
validate: () => Promise<string[]>;
|
|
96
|
+
reset: () => void;
|
|
97
|
+
resetValidation: () => void;
|
|
98
|
+
isValid: boolean | null;
|
|
99
|
+
errorMessages: string[];
|
|
100
|
+
}[]>;
|
|
101
|
+
validate: () => Promise<{
|
|
102
|
+
valid: boolean;
|
|
103
|
+
errors: {
|
|
104
|
+
id: string | number;
|
|
105
|
+
errorMessages: string[];
|
|
106
|
+
}[];
|
|
107
|
+
}>;
|
|
108
|
+
reset: () => void;
|
|
109
|
+
resetValidation: () => void;
|
|
110
|
+
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
111
|
+
'update:modelValue': (val: boolean | null) => true;
|
|
112
|
+
submit: (e: SubmitEventPromise) => true;
|
|
113
|
+
}, string, {
|
|
114
|
+
disabled: boolean;
|
|
115
|
+
readonly: boolean;
|
|
116
|
+
modelValue: boolean | null;
|
|
117
|
+
validateOn: "input" | "blur" | "submit" | undefined;
|
|
118
|
+
fastFail: boolean;
|
|
119
|
+
}, {}, string> & {
|
|
120
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
121
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
122
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
123
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
124
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
125
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
126
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
127
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
128
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
129
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
130
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
131
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
132
|
+
renderTracked?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
133
|
+
renderTriggered?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
134
|
+
errorCaptured?: (((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
135
|
+
};
|
|
136
|
+
$forceUpdate: () => void;
|
|
137
|
+
$nextTick: typeof vue.nextTick;
|
|
138
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: vue.WatchOptions<boolean> | undefined): vue.WatchStopHandle;
|
|
139
|
+
} & {
|
|
140
|
+
disabled: boolean;
|
|
141
|
+
readonly: boolean;
|
|
142
|
+
modelValue: boolean | null;
|
|
143
|
+
validateOn: "input" | "blur" | "submit" | undefined;
|
|
144
|
+
fastFail: boolean;
|
|
145
|
+
} & {} & {
|
|
146
|
+
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
147
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
148
|
+
};
|
|
149
|
+
$slots?: {
|
|
150
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
151
|
+
} | undefined;
|
|
152
|
+
'v-slots'?: {
|
|
153
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
154
|
+
} | undefined;
|
|
155
|
+
} & {
|
|
156
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
157
|
+
} & {
|
|
158
|
+
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
|
|
159
|
+
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
|
|
160
|
+
} & vue.ShallowUnwrapRef<{
|
|
161
|
+
errors: vue.Ref<{
|
|
162
|
+
id: string | number;
|
|
163
|
+
errorMessages: string[];
|
|
164
|
+
}[]>;
|
|
165
|
+
isDisabled: vue.ComputedRef<boolean>;
|
|
166
|
+
isReadonly: vue.ComputedRef<boolean>;
|
|
167
|
+
isValidating: vue.Ref<boolean>;
|
|
168
|
+
items: vue.Ref<{
|
|
169
|
+
id: string | number;
|
|
170
|
+
validate: () => Promise<string[]>;
|
|
171
|
+
reset: () => void;
|
|
172
|
+
resetValidation: () => void;
|
|
173
|
+
isValid: boolean | null;
|
|
174
|
+
errorMessages: string[];
|
|
175
|
+
}[]>;
|
|
176
|
+
validate: () => Promise<{
|
|
177
|
+
valid: boolean;
|
|
178
|
+
errors: {
|
|
179
|
+
id: string | number;
|
|
180
|
+
errorMessages: string[];
|
|
181
|
+
}[];
|
|
182
|
+
}>;
|
|
183
|
+
reset: () => void;
|
|
184
|
+
resetValidation: () => void;
|
|
185
|
+
}> & {} & vue.ComponentCustomProperties & {};
|
|
186
|
+
__isFragment?: undefined;
|
|
187
|
+
__isTeleport?: undefined;
|
|
188
|
+
__isSuspense?: undefined;
|
|
189
|
+
} & vue.ComponentOptionsBase<{
|
|
15
190
|
disabled: boolean;
|
|
16
191
|
readonly: boolean;
|
|
17
192
|
modelValue: boolean | null;
|
|
@@ -29,6 +204,9 @@ declare const VForm: vue.DefineComponent<{
|
|
|
29
204
|
} | undefined;
|
|
30
205
|
} & {
|
|
31
206
|
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
207
|
+
} & {
|
|
208
|
+
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
|
|
209
|
+
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
|
|
32
210
|
}, {
|
|
33
211
|
errors: vue.Ref<{
|
|
34
212
|
id: string | number;
|
|
@@ -57,34 +235,37 @@ declare const VForm: vue.DefineComponent<{
|
|
|
57
235
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
58
236
|
'update:modelValue': (val: boolean | null) => true;
|
|
59
237
|
submit: (e: SubmitEventPromise) => true;
|
|
60
|
-
}, string,
|
|
238
|
+
}, string, {
|
|
61
239
|
disabled: boolean;
|
|
62
240
|
readonly: boolean;
|
|
63
241
|
modelValue: boolean | null;
|
|
64
242
|
validateOn: "input" | "blur" | "submit" | undefined;
|
|
65
243
|
fastFail: boolean;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
244
|
+
}, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
|
|
245
|
+
disabled: BooleanConstructor;
|
|
246
|
+
fastFail: BooleanConstructor;
|
|
247
|
+
readonly: BooleanConstructor;
|
|
248
|
+
modelValue: {
|
|
249
|
+
type: vue.PropType<boolean | null>;
|
|
250
|
+
default: null;
|
|
69
251
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}>;
|
|
252
|
+
validateOn: {
|
|
253
|
+
type: vue.PropType<"input" | "blur" | "submit" | undefined>;
|
|
254
|
+
default: string;
|
|
255
|
+
};
|
|
256
|
+
}, vue.ExtractPropTypes<{
|
|
257
|
+
disabled: BooleanConstructor;
|
|
258
|
+
fastFail: BooleanConstructor;
|
|
259
|
+
readonly: BooleanConstructor;
|
|
260
|
+
modelValue: {
|
|
261
|
+
type: vue.PropType<boolean | null>;
|
|
262
|
+
default: null;
|
|
263
|
+
};
|
|
264
|
+
validateOn: {
|
|
265
|
+
type: vue.PropType<"input" | "blur" | "submit" | undefined>;
|
|
266
|
+
default: string;
|
|
267
|
+
};
|
|
268
|
+
}>>;
|
|
88
269
|
type VForm = InstanceType<typeof VForm>;
|
|
89
270
|
|
|
90
271
|
export { VForm };
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
import "./VGrid.css";
|
|
3
3
|
|
|
4
4
|
// Composables
|
|
5
|
-
import { makeTagProps } from "../../composables/tag.mjs";
|
|
5
|
+
import { makeTagProps } from "../../composables/tag.mjs";
|
|
6
|
+
import { breakpoints } from "../../composables/display.mjs"; // Utilities
|
|
6
7
|
import { capitalize, computed, h } from 'vue';
|
|
7
8
|
import { genericComponent } from "../../util/index.mjs"; // Types
|
|
8
|
-
const breakpoints = ['sm', 'md', 'lg', 'xl', 'xxl']; // no xs
|
|
9
|
-
|
|
10
9
|
const breakpointProps = (() => {
|
|
11
10
|
return breakpoints.reduce((props, val) => {
|
|
12
11
|
props[val] = {
|
|
@@ -18,7 +17,8 @@ const breakpointProps = (() => {
|
|
|
18
17
|
})();
|
|
19
18
|
const offsetProps = (() => {
|
|
20
19
|
return breakpoints.reduce((props, val) => {
|
|
21
|
-
|
|
20
|
+
const offsetKey = 'offset' + capitalize(val);
|
|
21
|
+
props[offsetKey] = {
|
|
22
22
|
type: [String, Number],
|
|
23
23
|
default: null
|
|
24
24
|
};
|
|
@@ -27,7 +27,8 @@ const offsetProps = (() => {
|
|
|
27
27
|
})();
|
|
28
28
|
const orderProps = (() => {
|
|
29
29
|
return breakpoints.reduce((props, val) => {
|
|
30
|
-
|
|
30
|
+
const orderKey = 'order' + capitalize(val);
|
|
31
|
+
props[orderKey] = {
|
|
31
32
|
type: [String, Number],
|
|
32
33
|
default: null
|
|
33
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCol.mjs","names":["makeTagProps","capitalize","computed","h","genericComponent","
|
|
1
|
+
{"version":3,"file":"VCol.mjs","names":["makeTagProps","breakpoints","capitalize","computed","h","genericComponent","breakpointProps","reduce","props","val","type","Boolean","String","Number","default","offsetProps","offsetKey","orderProps","orderKey","propMap","col","Object","keys","offset","order","breakpointClass","prop","className","undefined","breakpoint","replace","toLowerCase","ALIGN_SELF_VALUES","VCol","name","cols","alignSelf","validator","str","includes","setup","slots","classes","classList","forEach","value","push","hasColClasses","some","startsWith","tag","class"],"sources":["../../../src/components/VGrid/VCol.ts"],"sourcesContent":["// Styles\nimport './VGrid.sass'\n\n// Composables\nimport { makeTagProps } from '@/composables/tag'\nimport { breakpoints } from '@/composables/display'\n\n// Utilities\nimport { capitalize, computed, h } from 'vue'\nimport { genericComponent } from '@/util'\n\n// Types\nimport type { Prop, PropType } from 'vue'\nimport type { Breakpoint } from '@/composables/display'\n\ntype BreakpointOffset = `offset${Capitalize<Breakpoint>}`\ntype BreakpointOrder = `order${Capitalize<Breakpoint>}`\n\nconst breakpointProps = (() => {\n return breakpoints.reduce((props, val) => {\n props[val] = {\n type: [Boolean, String, Number],\n default: false,\n }\n return props\n }, {} as Record<Breakpoint, Prop<boolean | string | number, false>>)\n})()\n\nconst offsetProps = (() => {\n return breakpoints.reduce((props, val) => {\n const offsetKey = ('offset' + capitalize(val)) as BreakpointOffset\n props[offsetKey] = {\n type: [String, Number],\n default: null,\n }\n return props\n }, {} as Record<BreakpointOffset, Prop<string | number, null>>)\n})()\n\nconst orderProps = (() => {\n return breakpoints.reduce((props, val) => {\n const orderKey = ('order' + capitalize(val)) as BreakpointOrder\n props[orderKey] = {\n type: [String, Number],\n default: null,\n }\n return props\n }, {} as Record<BreakpointOrder, Prop<string | number, null>>)\n})()\n\nconst propMap = {\n col: Object.keys(breakpointProps),\n offset: Object.keys(offsetProps),\n order: Object.keys(orderProps),\n}\n\nfunction breakpointClass (type: keyof typeof propMap, prop: string, val: boolean | string | number) {\n let className: string = type\n if (val == null || val === false) {\n return undefined\n }\n if (prop) {\n const breakpoint = prop.replace(type, '')\n className += `-${breakpoint}`\n }\n if (type === 'col') {\n className = 'v-' + className\n }\n // Handling the boolean style prop when accepting [Boolean, String, Number]\n // means Vue will not convert <v-col sm></v-col> to sm: true for us.\n // Since the default is false, an empty string indicates the prop's presence.\n if (type === 'col' && (val === '' || val === true)) {\n // .v-col-md\n return className.toLowerCase()\n }\n // .order-md-6\n className += `-${val}`\n return className.toLowerCase()\n}\n\nconst ALIGN_SELF_VALUES = ['auto', 'start', 'end', 'center', 'baseline', 'stretch'] as const\n\nexport const VCol = genericComponent()({\n name: 'VCol',\n\n props: {\n cols: {\n type: [Boolean, String, Number],\n default: false,\n },\n ...breakpointProps,\n offset: {\n type: [String, Number],\n default: null,\n },\n ...offsetProps,\n order: {\n type: [String, Number],\n default: null,\n },\n ...orderProps,\n alignSelf: {\n type: String as PropType<typeof ALIGN_SELF_VALUES[number]>,\n default: null,\n validator: (str: any) => ALIGN_SELF_VALUES.includes(str),\n },\n\n ...makeTagProps(),\n },\n\n setup (props, { slots }) {\n const classes = computed(() => {\n const classList: any[] = []\n\n // Loop through `col`, `offset`, `order` breakpoint props\n let type: keyof typeof propMap\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value: string | number | boolean = (props as any)[prop]\n const className = breakpointClass(type, prop, value)\n if (className) classList!.push(className)\n })\n }\n\n const hasColClasses = classList.some(className => className.startsWith('v-col-'))\n\n classList.push({\n // Default to .v-col if no other col-{bp}-* classes generated nor `cols` specified.\n 'v-col': !hasColClasses || !props.cols,\n [`v-col-${props.cols}`]: props.cols,\n [`offset-${props.offset}`]: props.offset,\n [`order-${props.order}`]: props.order,\n [`align-self-${props.alignSelf}`]: props.alignSelf,\n })\n\n return classList\n })\n\n return () => h(props.tag, {\n class: classes.value,\n }, slots.default?.())\n },\n})\n\nexport type VCol = InstanceType<typeof VCol>\n"],"mappings":"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"}
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import "./VGrid.css";
|
|
3
3
|
|
|
4
4
|
// Composables
|
|
5
|
-
import { makeTagProps } from "../../composables/tag.mjs";
|
|
5
|
+
import { makeTagProps } from "../../composables/tag.mjs";
|
|
6
|
+
import { breakpoints } from "../../composables/display.mjs"; // Utilities
|
|
6
7
|
import { capitalize, computed, h } from 'vue';
|
|
7
8
|
import { genericComponent } from "../../util/index.mjs"; // Types
|
|
8
|
-
const breakpoints = ['sm', 'md', 'lg', 'xl', 'xxl']; // no xs
|
|
9
|
-
|
|
10
9
|
const ALIGNMENT = ['start', 'end', 'center'];
|
|
11
10
|
const SPACE = ['space-between', 'space-around', 'space-evenly'];
|
|
12
11
|
function makeRowProps(prefix, def) {
|
|
13
12
|
return breakpoints.reduce((props, val) => {
|
|
14
|
-
|
|
13
|
+
const prefixKey = prefix + capitalize(val);
|
|
14
|
+
props[prefixKey] = def();
|
|
15
15
|
return props;
|
|
16
16
|
}, {});
|
|
17
17
|
}
|