vuetify 3.0.7 → 3.1.1
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/_settings.scss +1 -0
- package/dist/_component-variables-labs.sass +1 -0
- package/dist/json/attributes.json +452 -4
- package/dist/json/importMap-labs.json +28 -0
- package/dist/json/importMap.json +92 -92
- package/dist/json/tags.json +154 -8
- package/dist/json/web-types.json +1578 -18
- package/dist/vuetify-labs.css +25743 -0
- package/dist/vuetify-labs.d.ts +26770 -0
- package/dist/vuetify-labs.esm.js +20101 -0
- package/dist/vuetify-labs.esm.js.map +1 -0
- package/dist/vuetify-labs.js +20116 -0
- package/dist/vuetify-labs.min.css +12 -0
- package/dist/vuetify.css +92 -113
- package/dist/vuetify.d.ts +182 -204
- package/dist/vuetify.esm.js +213 -136
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +212 -135
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +790 -784
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +3 -2
- package/lib/blueprints/md1.d.ts +3 -2
- package/lib/blueprints/md2.d.ts +3 -2
- package/lib/blueprints/md3.d.ts +3 -2
- package/lib/components/VAlert/VAlertTitle.mjs.map +1 -1
- package/lib/components/VAlert/index.d.ts +1 -0
- package/lib/components/VAppBar/VAppBarTitle.mjs +4 -4
- package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +23 -16
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.ts +4 -12
- package/lib/components/VAvatar/VAvatar.mjs +2 -1
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +23 -20
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs +21 -2
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +4 -15
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -0
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +23 -16
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +4 -12
- package/lib/components/VDivider/VDivider.css +1 -1
- package/lib/components/VDivider/VDivider.sass +1 -0
- package/lib/components/VDivider/_variables.scss +2 -1
- package/lib/components/VField/VField.mjs +3 -1
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/index.d.ts +1 -0
- package/lib/components/VFileInput/VFileInput.mjs +2 -0
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +1 -0
- package/lib/components/VIcon/VIcon.mjs +25 -20
- package/lib/components/VIcon/VIcon.mjs.map +1 -1
- package/lib/components/VIcon/index.d.ts +4 -8
- package/lib/components/VInput/VInput.mjs +3 -0
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +1 -0
- package/lib/components/VList/VListItem.css +0 -4
- package/lib/components/VList/VListItem.sass +12 -6
- package/lib/components/VMessages/VMessages.mjs +3 -1
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +10 -2
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/index.d.ts +11 -3
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -0
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +4 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.mjs +29 -17
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +1 -0
- package/lib/components/VSlider/VSlider.mjs +4 -1
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.mjs +2 -0
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VTable/VTable.css +12 -29
- package/lib/components/VTable/VTable.mjs +3 -3
- package/lib/components/VTable/VTable.mjs.map +1 -1
- package/lib/components/VTable/VTable.sass +10 -17
- package/lib/components/VTable/_variables.scss +4 -2
- package/lib/components/VTextField/index.d.ts +1 -0
- package/lib/components/VTextarea/index.d.ts +1 -0
- package/lib/components/index.d.ts +27 -50
- package/lib/components/transitions/dialog-transition.mjs +3 -9
- package/lib/components/transitions/dialog-transition.mjs.map +1 -1
- package/lib/composables/filter.mjs +18 -10
- package/lib/composables/filter.mjs.map +1 -1
- package/lib/composables/icons.mjs +12 -7
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/fa-svg.d.ts +3 -2
- package/lib/iconsets/fa.d.ts +3 -2
- package/lib/iconsets/fa.mjs +2 -1
- package/lib/iconsets/fa.mjs.map +1 -1
- package/lib/iconsets/fa4.d.ts +3 -2
- package/lib/iconsets/fa4.mjs +2 -1
- package/lib/iconsets/fa4.mjs.map +1 -1
- package/lib/iconsets/md.d.ts +3 -2
- package/lib/iconsets/md.mjs +2 -1
- package/lib/iconsets/md.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.d.ts +3 -2
- package/lib/iconsets/mdi-svg.mjs +2 -1
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/iconsets/mdi.d.ts +3 -2
- package/lib/iconsets/mdi.mjs +2 -1
- package/lib/iconsets/mdi.mjs.map +1 -1
- package/lib/index.d.ts +28 -27
- package/lib/labs/VDataTable/VDataTable.css +119 -0
- package/lib/labs/VDataTable/VDataTable.mjs +146 -0
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTable.sass +106 -0
- package/lib/labs/VDataTable/VDataTableColumn.mjs +37 -0
- package/lib/labs/VDataTable/VDataTableColumn.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTableFooter.css +22 -0
- package/lib/labs/VDataTable/VDataTableFooter.mjs +105 -0
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTableFooter.sass +23 -0
- package/lib/labs/VDataTable/VDataTableGroupHeaderRow.mjs +88 -0
- package/lib/labs/VDataTable/VDataTableGroupHeaderRow.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTableHeaders.mjs +143 -0
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTableRow.mjs +75 -0
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTableRows.mjs +87 -0
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTableServer.mjs +124 -0
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -0
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +154 -0
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -0
- package/lib/labs/VDataTable/_variables.scss +6 -0
- package/lib/labs/VDataTable/composables/expand.mjs +51 -0
- package/lib/labs/VDataTable/composables/expand.mjs.map +1 -0
- package/lib/labs/VDataTable/composables/group.mjs +124 -0
- package/lib/labs/VDataTable/composables/group.mjs.map +1 -0
- package/lib/labs/VDataTable/composables/headers.mjs +152 -0
- package/lib/labs/VDataTable/composables/headers.mjs.map +1 -0
- package/lib/labs/VDataTable/composables/items.mjs +30 -0
- package/lib/labs/VDataTable/composables/items.mjs.map +1 -0
- package/lib/labs/VDataTable/composables/options.mjs +44 -0
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -0
- package/lib/labs/VDataTable/composables/paginate.mjs +62 -0
- package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -0
- package/lib/labs/VDataTable/composables/select.mjs +57 -0
- package/lib/labs/VDataTable/composables/select.mjs.map +1 -0
- package/lib/labs/VDataTable/composables/sort.mjs +109 -0
- package/lib/labs/VDataTable/composables/sort.mjs.map +1 -0
- package/lib/labs/VDataTable/composables/virtual.mjs +77 -0
- package/lib/labs/VDataTable/composables/virtual.mjs.map +1 -0
- package/lib/labs/VDataTable/index.d.ts +705 -0
- package/lib/labs/VDataTable/index.mjs +6 -0
- package/lib/labs/VDataTable/index.mjs.map +1 -0
- package/lib/labs/VDataTable/types.mjs +2 -0
- package/lib/labs/VDataTable/types.mjs.map +1 -0
- package/lib/labs/VVirtualScroll/VVirtualScroll.css +11 -0
- package/lib/labs/VVirtualScroll/VVirtualScroll.mjs +118 -0
- package/lib/labs/VVirtualScroll/VVirtualScroll.mjs.map +1 -0
- package/lib/{components → labs}/VVirtualScroll/VVirtualScroll.sass +0 -5
- package/lib/labs/VVirtualScroll/VVirtualScrollItem.mjs +35 -0
- package/lib/labs/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -0
- package/lib/labs/VVirtualScroll/index.d.ts +154 -0
- package/lib/labs/VVirtualScroll/index.mjs +2 -0
- package/lib/labs/VVirtualScroll/index.mjs.map +1 -0
- package/lib/labs/allComponents.mjs +3 -0
- package/lib/labs/allComponents.mjs.map +1 -0
- package/lib/labs/components.d.ts +856 -0
- package/lib/labs/components.mjs +3 -0
- package/lib/labs/components.mjs.map +1 -0
- package/lib/labs/entry-bundler.mjs +14 -0
- package/lib/labs/entry-bundler.mjs.map +1 -0
- package/lib/labs/index.mjs +3 -0
- package/lib/labs/index.mjs.map +1 -0
- package/lib/util/defineComponent.mjs +5 -1
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +0 -38
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +4 -2
- package/lib/components/VDataTable/MobileRow.mjs +0 -63
- package/lib/components/VDataTable/MobileRow.mjs.map +0 -1
- package/lib/components/VDataTable/Row.mjs +0 -57
- package/lib/components/VDataTable/Row.mjs.map +0 -1
- package/lib/components/VDataTable/RowGroup.mjs +0 -48
- package/lib/components/VDataTable/RowGroup.mjs.map +0 -1
- package/lib/components/VDataTable/VDataTable.mjs +0 -577
- package/lib/components/VDataTable/VDataTable.mjs.map +0 -1
- package/lib/components/VDataTable/VDataTable.sass +0 -98
- package/lib/components/VDataTable/VDataTableHeader.mjs +0 -42
- package/lib/components/VDataTable/VDataTableHeader.mjs.map +0 -1
- package/lib/components/VDataTable/VDataTableHeader.sass +0 -80
- package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs +0 -96
- package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs.map +0 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.mjs +0 -89
- package/lib/components/VDataTable/VDataTableHeaderMobile.mjs.map +0 -1
- package/lib/components/VDataTable/VEditDialog.mjs +0 -127
- package/lib/components/VDataTable/VEditDialog.mjs.map +0 -1
- package/lib/components/VDataTable/VEditDialog.sass +0 -22
- package/lib/components/VDataTable/VVirtualTable.mjs +0 -132
- package/lib/components/VDataTable/VVirtualTable.mjs.map +0 -1
- package/lib/components/VDataTable/VVirtualTable.sass +0 -13
- package/lib/components/VDataTable/_variables.scss +0 -24
- package/lib/components/VDataTable/index.mjs +0 -21
- package/lib/components/VDataTable/index.mjs.map +0 -1
- package/lib/components/VDataTable/mixins/header.mjs +0 -71
- package/lib/components/VDataTable/mixins/header.mjs.map +0 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +0 -108
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +0 -1
- package/lib/components/VVirtualScroll/index.mjs +0 -4
- package/lib/components/VVirtualScroll/index.mjs.map +0 -1
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
.v-table .v-table-divider {
|
|
6
6
|
border-right: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
|
|
7
7
|
}
|
|
8
|
-
.v-table .v-table__wrapper > table > thead > tr
|
|
8
|
+
.v-table .v-table__wrapper > table > thead > tr > th {
|
|
9
9
|
border-bottom: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
|
|
10
|
+
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
|
|
10
11
|
}
|
|
11
12
|
.v-table .v-table__wrapper > table > tbody > tr:not(:last-child) > td,
|
|
12
13
|
.v-table .v-table__wrapper > table > tbody > tr:not(:last-child) > th {
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.v-table {
|
|
35
|
+
--v-table-header-height: $table-header-height;
|
|
34
36
|
border-radius: inherit;
|
|
35
37
|
line-height: 1.5;
|
|
36
38
|
max-width: 100%;
|
|
@@ -51,65 +53,46 @@
|
|
|
51
53
|
.v-table > .v-table__wrapper > table > tbody > tr > th,
|
|
52
54
|
.v-table > .v-table__wrapper > table > thead > tr > th,
|
|
53
55
|
.v-table > .v-table__wrapper > table > tfoot > tr > th {
|
|
56
|
+
font-weight: 500;
|
|
54
57
|
user-select: none;
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
.v-table > .v-table__wrapper > table > tbody > tr > th.v-locale--is-ltr, .v-locale--is-ltr .v-table > .v-table__wrapper > table > tbody > tr > th,
|
|
58
|
-
.v-table > .v-table__wrapper > table > thead > tr > th.v-locale--is-ltr,
|
|
59
|
-
.v-locale--is-ltr .v-table > .v-table__wrapper > table > thead > tr > th,
|
|
60
|
-
.v-table > .v-table__wrapper > table > tfoot > tr > th.v-locale--is-ltr,
|
|
61
|
-
.v-locale--is-ltr .v-table > .v-table__wrapper > table > tfoot > tr > th {
|
|
62
|
-
text-align: left;
|
|
63
|
-
}
|
|
64
|
-
.v-table > .v-table__wrapper > table > tbody > tr > th.v-locale--is-rtl, .v-locale--is-rtl .v-table > .v-table__wrapper > table > tbody > tr > th,
|
|
65
|
-
.v-table > .v-table__wrapper > table > thead > tr > th.v-locale--is-rtl,
|
|
66
|
-
.v-locale--is-rtl .v-table > .v-table__wrapper > table > thead > tr > th,
|
|
67
|
-
.v-table > .v-table__wrapper > table > tfoot > tr > th.v-locale--is-rtl,
|
|
68
|
-
.v-locale--is-rtl .v-table > .v-table__wrapper > table > tfoot > tr > th {
|
|
69
|
-
text-align: right;
|
|
70
|
-
}
|
|
71
|
-
.v-table > .v-table__wrapper > table > tbody > tr > td,
|
|
72
|
-
.v-table > .v-table__wrapper > table > thead > tr > td,
|
|
73
|
-
.v-table > .v-table__wrapper > table > tfoot > tr > td {
|
|
74
|
-
font-size: 0.875rem;
|
|
58
|
+
text-align: start;
|
|
75
59
|
}
|
|
76
60
|
.v-table--density-default > .v-table__wrapper > table > tbody > tr > th,
|
|
77
61
|
.v-table--density-default > .v-table__wrapper > table > thead > tr > th,
|
|
78
62
|
.v-table--density-default > .v-table__wrapper > table > tfoot > tr > th {
|
|
79
|
-
height:
|
|
63
|
+
height: 56px;
|
|
80
64
|
}
|
|
81
65
|
.v-table--density-default > .v-table__wrapper > table > tbody > tr > td,
|
|
82
66
|
.v-table--density-default > .v-table__wrapper > table > thead > tr > td,
|
|
83
67
|
.v-table--density-default > .v-table__wrapper > table > tfoot > tr > td {
|
|
84
|
-
height:
|
|
68
|
+
height: calc(var(--v-table-row-height, 52px) + 0px);
|
|
85
69
|
}
|
|
86
70
|
|
|
87
71
|
.v-table--density-comfortable > .v-table__wrapper > table > tbody > tr > th,
|
|
88
72
|
.v-table--density-comfortable > .v-table__wrapper > table > thead > tr > th,
|
|
89
73
|
.v-table--density-comfortable > .v-table__wrapper > table > tfoot > tr > th {
|
|
90
|
-
height:
|
|
74
|
+
height: 48px;
|
|
91
75
|
}
|
|
92
76
|
.v-table--density-comfortable > .v-table__wrapper > table > tbody > tr > td,
|
|
93
77
|
.v-table--density-comfortable > .v-table__wrapper > table > thead > tr > td,
|
|
94
78
|
.v-table--density-comfortable > .v-table__wrapper > table > tfoot > tr > td {
|
|
95
|
-
height:
|
|
79
|
+
height: calc(var(--v-table-row-height, 52px) - 8px);
|
|
96
80
|
}
|
|
97
81
|
|
|
98
82
|
.v-table--density-compact > .v-table__wrapper > table > tbody > tr > th,
|
|
99
83
|
.v-table--density-compact > .v-table__wrapper > table > thead > tr > th,
|
|
100
84
|
.v-table--density-compact > .v-table__wrapper > table > tfoot > tr > th {
|
|
101
|
-
height:
|
|
85
|
+
height: 40px;
|
|
102
86
|
}
|
|
103
87
|
.v-table--density-compact > .v-table__wrapper > table > tbody > tr > td,
|
|
104
88
|
.v-table--density-compact > .v-table__wrapper > table > thead > tr > td,
|
|
105
89
|
.v-table--density-compact > .v-table__wrapper > table > tfoot > tr > td {
|
|
106
|
-
height:
|
|
90
|
+
height: calc(var(--v-table-row-height, 52px) - 16px);
|
|
107
91
|
}
|
|
108
92
|
|
|
109
93
|
.v-table__wrapper {
|
|
110
94
|
border-radius: inherit;
|
|
111
|
-
overflow
|
|
112
|
-
overflow-y: hidden;
|
|
95
|
+
overflow: auto;
|
|
113
96
|
}
|
|
114
97
|
|
|
115
98
|
.v-table--has-top > .v-table__wrapper > table > tbody > tr:first-child:hover > td:first-child {
|
|
@@ -29,7 +29,7 @@ export const VTable = defineComponent({
|
|
|
29
29
|
densityClasses
|
|
30
30
|
} = useDensity(props);
|
|
31
31
|
useRender(() => {
|
|
32
|
-
var _slots$top, _slots$bottom;
|
|
32
|
+
var _slots$top, _slots$wrapper, _slots$bottom;
|
|
33
33
|
return _createVNode(props.tag, {
|
|
34
34
|
"class": ['v-table', {
|
|
35
35
|
'v-table--fixed-height': !!props.height,
|
|
@@ -40,12 +40,12 @@ export const VTable = defineComponent({
|
|
|
40
40
|
'v-table--hover': props.hover
|
|
41
41
|
}, themeClasses.value, densityClasses.value]
|
|
42
42
|
}, {
|
|
43
|
-
default: () => [(_slots$top = slots.top) == null ? void 0 : _slots$top.call(slots), slots.default
|
|
43
|
+
default: () => [(_slots$top = slots.top) == null ? void 0 : _slots$top.call(slots), slots.default ? _createVNode("div", {
|
|
44
44
|
"class": "v-table__wrapper",
|
|
45
45
|
"style": {
|
|
46
46
|
height: convertToUnit(props.height)
|
|
47
47
|
}
|
|
48
|
-
}, [_createVNode("table", null, [slots.default()])]), (_slots$bottom = slots.bottom) == null ? void 0 : _slots$bottom.call(slots)]
|
|
48
|
+
}, [_createVNode("table", null, [slots.default()])]) : (_slots$wrapper = slots.wrapper) == null ? void 0 : _slots$wrapper.call(slots), (_slots$bottom = slots.bottom) == null ? void 0 : _slots$bottom.call(slots)]
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
51
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTable.mjs","names":["makeDensityProps","useDensity","makeTagProps","makeThemeProps","provideTheme","convertToUnit","defineComponent","useRender","VTable","name","props","fixedHeader","Boolean","fixedFooter","height","Number","String","hover","setup","slots","themeClasses","densityClasses","top","bottom","value","default"],"sources":["../../../src/components/VTable/VTable.tsx"],"sourcesContent":["// Styles\nimport './VTable.sass'\n\n// Composables\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { convertToUnit, defineComponent, useRender } from '@/util'\n\nexport const VTable = defineComponent({\n name: 'VTable',\n\n props: {\n fixedHeader: Boolean,\n fixedFooter: Boolean,\n height: [Number, String],\n hover: Boolean,\n\n ...makeDensityProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { densityClasses } = useDensity(props)\n\n useRender(() => (\n <props.tag\n class={[\n 'v-table',\n {\n 'v-table--fixed-height': !!props.height,\n 'v-table--fixed-header': props.fixedHeader,\n 'v-table--fixed-footer': props.fixedFooter,\n 'v-table--has-top': !!slots.top,\n 'v-table--has-bottom': !!slots.bottom,\n 'v-table--hover': props.hover,\n },\n themeClasses.value,\n densityClasses.value,\n ]}\n >\n { slots.top?.() }\n\n { slots.default
|
|
1
|
+
{"version":3,"file":"VTable.mjs","names":["makeDensityProps","useDensity","makeTagProps","makeThemeProps","provideTheme","convertToUnit","defineComponent","useRender","VTable","name","props","fixedHeader","Boolean","fixedFooter","height","Number","String","hover","setup","slots","themeClasses","densityClasses","top","bottom","value","default","wrapper"],"sources":["../../../src/components/VTable/VTable.tsx"],"sourcesContent":["// Styles\nimport './VTable.sass'\n\n// Composables\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { convertToUnit, defineComponent, useRender } from '@/util'\n\nexport const VTable = defineComponent({\n name: 'VTable',\n\n props: {\n fixedHeader: Boolean,\n fixedFooter: Boolean,\n height: [Number, String],\n hover: Boolean,\n\n ...makeDensityProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { densityClasses } = useDensity(props)\n\n useRender(() => (\n <props.tag\n class={[\n 'v-table',\n {\n 'v-table--fixed-height': !!props.height,\n 'v-table--fixed-header': props.fixedHeader,\n 'v-table--fixed-footer': props.fixedFooter,\n 'v-table--has-top': !!slots.top,\n 'v-table--has-bottom': !!slots.bottom,\n 'v-table--hover': props.hover,\n },\n themeClasses.value,\n densityClasses.value,\n ]}\n >\n { slots.top?.() }\n\n { slots.default ? (\n <div\n class=\"v-table__wrapper\"\n style={{ height: convertToUnit(props.height) }}\n >\n <table>\n { slots.default() }\n </table>\n </div>\n ) : slots.wrapper?.() }\n\n { slots.bottom?.() }\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VTable = InstanceType<typeof VTable>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,uCAErC;AAAA,SACSC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAElD,OAAO,MAAMC,MAAM,GAAGF,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ACX;AACF,CAAC,CAAC"}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
> table
|
|
15
15
|
> thead
|
|
16
16
|
> tr
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
> th
|
|
18
|
+
border-bottom: $table-border
|
|
19
|
+
color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity))
|
|
20
20
|
|
|
21
21
|
> tbody
|
|
22
22
|
> tr
|
|
@@ -60,6 +60,8 @@
|
|
|
60
60
|
|
|
61
61
|
// Block
|
|
62
62
|
.v-table
|
|
63
|
+
--v-table-header-height: $table-header-height
|
|
64
|
+
|
|
63
65
|
border-radius: inherit
|
|
64
66
|
// Do not inherit line-height
|
|
65
67
|
line-height: $table-line-height
|
|
@@ -76,21 +78,13 @@
|
|
|
76
78
|
> tr
|
|
77
79
|
> td,
|
|
78
80
|
> th
|
|
79
|
-
padding:
|
|
81
|
+
padding: $table-column-padding
|
|
80
82
|
transition: height settings.$standard-easing
|
|
81
83
|
|
|
82
84
|
> th
|
|
85
|
+
font-weight: $table-header-font-weight
|
|
83
86
|
user-select: none
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
@include tools.ltr()
|
|
87
|
-
text-align: left
|
|
88
|
-
|
|
89
|
-
@include tools.rtl()
|
|
90
|
-
text-align: right
|
|
91
|
-
|
|
92
|
-
> td
|
|
93
|
-
font-size: $table-row-font-size
|
|
87
|
+
text-align: start
|
|
94
88
|
|
|
95
89
|
@at-root
|
|
96
90
|
@include tools.density('v-table', $table-density) using ($modifier)
|
|
@@ -104,13 +98,12 @@
|
|
|
104
98
|
height: $table-header-height + $modifier
|
|
105
99
|
|
|
106
100
|
> td
|
|
107
|
-
height: $table-row-height + $modifier
|
|
101
|
+
height: calc($table-row-height + $modifier)
|
|
108
102
|
|
|
109
103
|
// Elements
|
|
110
104
|
.v-table__wrapper
|
|
111
105
|
border-radius: inherit
|
|
112
|
-
overflow
|
|
113
|
-
overflow-y: hidden
|
|
106
|
+
overflow: auto
|
|
114
107
|
|
|
115
108
|
// Modifiers
|
|
116
109
|
.v-table--has-top
|
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
$table-background: rgb(var(--v-theme-surface)) !default;
|
|
8
8
|
$table-color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity)) !default;
|
|
9
9
|
$table-density: ('default': 0, 'comfortable': -2, 'compact': -4) !default;
|
|
10
|
-
$table-header-height:
|
|
11
|
-
$table-
|
|
10
|
+
$table-header-height: 56px !default;
|
|
11
|
+
$table-header-font-weight: 500 !default;
|
|
12
12
|
$table-header-font-size: tools.map-deep-get(settings.$typography, 'caption', 'size') !default;
|
|
13
|
+
$table-row-height: var(--v-table-row-height, 52px) !default;
|
|
13
14
|
$table-row-font-size: tools.map-deep-get(settings.$typography, 'subtitle-2', 'size') !default;
|
|
14
15
|
$table-border-color: rgba(var(--v-border-color), var(--v-border-opacity)) !default;
|
|
15
16
|
$table-border: thin solid $table-border-color !default;
|
|
16
17
|
$table-hover-color: rgba(var(--v-border-color), var(--v-hover-opacity)) !default;
|
|
17
18
|
$table-line-height: 1.5 !default;
|
|
19
|
+
$table-column-padding: 0 16px !default;
|
|
18
20
|
|
|
19
21
|
// Lists
|
|
20
22
|
$table-theme: (
|
|
@@ -34,6 +34,7 @@ declare type ValidationRule = ValidationResult | PromiseLike<ValidationResult> |
|
|
|
34
34
|
|
|
35
35
|
interface VInputSlot {
|
|
36
36
|
id: ComputedRef<string>;
|
|
37
|
+
messagesId: ComputedRef<string>;
|
|
37
38
|
isDirty: ComputedRef<boolean>;
|
|
38
39
|
isDisabled: ComputedRef<boolean>;
|
|
39
40
|
isReadonly: ComputedRef<boolean>;
|
|
@@ -692,7 +692,6 @@ declare const IconValue: PropType<IconValue>;
|
|
|
692
692
|
declare const VComponentIcon: vue.DefineComponent<{
|
|
693
693
|
icon: {
|
|
694
694
|
type: PropType<IconValue>;
|
|
695
|
-
required: true;
|
|
696
695
|
};
|
|
697
696
|
tag: {
|
|
698
697
|
type: StringConstructor;
|
|
@@ -701,17 +700,16 @@ declare const VComponentIcon: vue.DefineComponent<{
|
|
|
701
700
|
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
702
701
|
icon: {
|
|
703
702
|
type: PropType<IconValue>;
|
|
704
|
-
required: true;
|
|
705
703
|
};
|
|
706
704
|
tag: {
|
|
707
705
|
type: StringConstructor;
|
|
708
706
|
required: true;
|
|
709
707
|
};
|
|
710
708
|
}>>, {}>;
|
|
709
|
+
declare type VComponentIcon = InstanceType<typeof VComponentIcon>;
|
|
711
710
|
declare const VSvgIcon: vue.DefineComponent<{
|
|
712
711
|
icon: {
|
|
713
712
|
type: PropType<IconValue>;
|
|
714
|
-
required: true;
|
|
715
713
|
};
|
|
716
714
|
tag: {
|
|
717
715
|
type: StringConstructor;
|
|
@@ -720,17 +718,16 @@ declare const VSvgIcon: vue.DefineComponent<{
|
|
|
720
718
|
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
721
719
|
icon: {
|
|
722
720
|
type: PropType<IconValue>;
|
|
723
|
-
required: true;
|
|
724
721
|
};
|
|
725
722
|
tag: {
|
|
726
723
|
type: StringConstructor;
|
|
727
724
|
required: true;
|
|
728
725
|
};
|
|
729
726
|
}>>, {}>;
|
|
727
|
+
declare type VSvgIcon = InstanceType<typeof VSvgIcon>;
|
|
730
728
|
declare const VLigatureIcon: vue.DefineComponent<{
|
|
731
729
|
icon: {
|
|
732
730
|
type: PropType<IconValue>;
|
|
733
|
-
required: true;
|
|
734
731
|
};
|
|
735
732
|
tag: {
|
|
736
733
|
type: StringConstructor;
|
|
@@ -739,17 +736,16 @@ declare const VLigatureIcon: vue.DefineComponent<{
|
|
|
739
736
|
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
740
737
|
icon: {
|
|
741
738
|
type: PropType<IconValue>;
|
|
742
|
-
required: true;
|
|
743
739
|
};
|
|
744
740
|
tag: {
|
|
745
741
|
type: StringConstructor;
|
|
746
742
|
required: true;
|
|
747
743
|
};
|
|
748
744
|
}>>, {}>;
|
|
745
|
+
declare type VLigatureIcon = InstanceType<typeof VLigatureIcon>;
|
|
749
746
|
declare const VClassIcon: vue.DefineComponent<{
|
|
750
747
|
icon: {
|
|
751
748
|
type: PropType<IconValue>;
|
|
752
|
-
required: true;
|
|
753
749
|
};
|
|
754
750
|
tag: {
|
|
755
751
|
type: StringConstructor;
|
|
@@ -758,13 +754,13 @@ declare const VClassIcon: vue.DefineComponent<{
|
|
|
758
754
|
}, () => JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
759
755
|
icon: {
|
|
760
756
|
type: PropType<IconValue>;
|
|
761
|
-
required: true;
|
|
762
757
|
};
|
|
763
758
|
tag: {
|
|
764
759
|
type: StringConstructor;
|
|
765
760
|
required: true;
|
|
766
761
|
};
|
|
767
762
|
}>>, {}>;
|
|
763
|
+
declare type VClassIcon = InstanceType<typeof VClassIcon>;
|
|
768
764
|
|
|
769
765
|
declare const VAppBarNavIcon: vue.DefineComponent<{
|
|
770
766
|
icon: {
|
|
@@ -959,6 +955,7 @@ declare const VAlertTitle: vue.DefineComponent<{
|
|
|
959
955
|
}>>, {
|
|
960
956
|
tag: string;
|
|
961
957
|
}>;
|
|
958
|
+
declare type VAlertTitle = InstanceType<typeof VAlertTitle>;
|
|
962
959
|
|
|
963
960
|
interface LoaderSlotProps {
|
|
964
961
|
color: string | undefined;
|
|
@@ -970,6 +967,7 @@ declare type ValidationRule = ValidationResult | PromiseLike<ValidationResult> |
|
|
|
970
967
|
|
|
971
968
|
interface VInputSlot {
|
|
972
969
|
id: ComputedRef<string>;
|
|
970
|
+
messagesId: ComputedRef<string>;
|
|
973
971
|
isDirty: ComputedRef<boolean>;
|
|
974
972
|
isDisabled: ComputedRef<boolean>;
|
|
975
973
|
isReadonly: ComputedRef<boolean>;
|
|
@@ -2345,10 +2343,7 @@ declare const VAutocomplete: {
|
|
|
2345
2343
|
search: vue.Ref<string | undefined> & {
|
|
2346
2344
|
readonly externalValue: string | undefined;
|
|
2347
2345
|
};
|
|
2348
|
-
filteredItems: vue.
|
|
2349
|
-
item: InternalItem<any>;
|
|
2350
|
-
matches: Record<string, FilterMatch>;
|
|
2351
|
-
}[]>;
|
|
2346
|
+
filteredItems: vue.Ref<InternalItem<any>[]>;
|
|
2352
2347
|
select: (item: InternalItem) => void;
|
|
2353
2348
|
} & Omit<any, string | number | symbol>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
2354
2349
|
'update:search': (val: any) => boolean;
|
|
@@ -2759,10 +2754,7 @@ declare const VAutocomplete: {
|
|
|
2759
2754
|
search: vue.Ref<string | undefined> & {
|
|
2760
2755
|
readonly externalValue: string | undefined;
|
|
2761
2756
|
};
|
|
2762
|
-
filteredItems: vue.
|
|
2763
|
-
item: InternalItem<any>;
|
|
2764
|
-
matches: Record<string, FilterMatch>;
|
|
2765
|
-
}[]>;
|
|
2757
|
+
filteredItems: vue.Ref<InternalItem<any>[]>;
|
|
2766
2758
|
select: (item: InternalItem) => void;
|
|
2767
2759
|
} & Omit<any, string | number | symbol>> & {} & vue.ComponentCustomProperties;
|
|
2768
2760
|
__isFragment?: undefined;
|
|
@@ -3110,10 +3102,7 @@ declare const VAutocomplete: {
|
|
|
3110
3102
|
search: vue.Ref<string | undefined> & {
|
|
3111
3103
|
readonly externalValue: string | undefined;
|
|
3112
3104
|
};
|
|
3113
|
-
filteredItems: vue.
|
|
3114
|
-
item: InternalItem<any>;
|
|
3115
|
-
matches: Record<string, FilterMatch>;
|
|
3116
|
-
}[]>;
|
|
3105
|
+
filteredItems: vue.Ref<InternalItem<any>[]>;
|
|
3117
3106
|
select: (item: InternalItem) => void;
|
|
3118
3107
|
} & Omit<any, string | number | symbol>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
3119
3108
|
'update:search': (val: any) => boolean;
|
|
@@ -3983,21 +3972,10 @@ declare const VBreadcrumbsItem: vue.DefineComponent<{
|
|
|
3983
3972
|
declare type VBreadcrumbsItem = InstanceType<typeof VBreadcrumbsItem>;
|
|
3984
3973
|
|
|
3985
3974
|
declare const VBreadcrumbsDivider: vue.DefineComponent<{
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
3991
|
-
[key: string]: any;
|
|
3992
|
-
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
3993
|
-
tag: {
|
|
3994
|
-
type: StringConstructor;
|
|
3995
|
-
default: string;
|
|
3996
|
-
};
|
|
3997
|
-
}>>, {
|
|
3998
|
-
tag: string;
|
|
3999
|
-
}>;
|
|
4000
|
-
declare type VBreadcrumbsDivider = InstanceType<typeof VBreadcrumbsDivider>;
|
|
3975
|
+
divider: (StringConstructor | NumberConstructor)[];
|
|
3976
|
+
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
3977
|
+
divider: (StringConstructor | NumberConstructor)[];
|
|
3978
|
+
}>>, {}>;
|
|
4001
3979
|
|
|
4002
3980
|
interface GroupItem {
|
|
4003
3981
|
id: number;
|
|
@@ -6124,10 +6102,7 @@ declare const VCombobox: {
|
|
|
6124
6102
|
};
|
|
6125
6103
|
search: vue.WritableComputedRef<string>;
|
|
6126
6104
|
selectionIndex: vue.Ref<number>;
|
|
6127
|
-
filteredItems: vue.
|
|
6128
|
-
item: InternalItem<any>;
|
|
6129
|
-
matches: Record<string, FilterMatch>;
|
|
6130
|
-
}[]>;
|
|
6105
|
+
filteredItems: vue.Ref<InternalItem<any>[]>;
|
|
6131
6106
|
select: (item: InternalItem) => void;
|
|
6132
6107
|
} & Omit<any, string | number | symbol>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
6133
6108
|
'update:modelValue': (val: any) => boolean;
|
|
@@ -6543,10 +6518,7 @@ declare const VCombobox: {
|
|
|
6543
6518
|
};
|
|
6544
6519
|
search: vue.WritableComputedRef<string>;
|
|
6545
6520
|
selectionIndex: vue.Ref<number>;
|
|
6546
|
-
filteredItems: vue.
|
|
6547
|
-
item: InternalItem<any>;
|
|
6548
|
-
matches: Record<string, FilterMatch>;
|
|
6549
|
-
}[]>;
|
|
6521
|
+
filteredItems: vue.Ref<InternalItem<any>[]>;
|
|
6550
6522
|
select: (item: InternalItem) => void;
|
|
6551
6523
|
} & Omit<any, string | number | symbol>> & {} & vue.ComponentCustomProperties;
|
|
6552
6524
|
__isFragment?: undefined;
|
|
@@ -6899,10 +6871,7 @@ declare const VCombobox: {
|
|
|
6899
6871
|
};
|
|
6900
6872
|
search: vue.WritableComputedRef<string>;
|
|
6901
6873
|
selectionIndex: vue.Ref<number>;
|
|
6902
|
-
filteredItems: vue.
|
|
6903
|
-
item: InternalItem<any>;
|
|
6904
|
-
matches: Record<string, FilterMatch>;
|
|
6905
|
-
}[]>;
|
|
6874
|
+
filteredItems: vue.Ref<InternalItem<any>[]>;
|
|
6906
6875
|
select: (item: InternalItem) => void;
|
|
6907
6876
|
} & Omit<any, string | number | symbol>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
6908
6877
|
'update:modelValue': (val: any) => boolean;
|
|
@@ -14248,7 +14217,10 @@ declare const VNavigationDrawer: vue.DefineComponent<{
|
|
|
14248
14217
|
default: null;
|
|
14249
14218
|
};
|
|
14250
14219
|
permanent: BooleanConstructor;
|
|
14251
|
-
rail:
|
|
14220
|
+
rail: {
|
|
14221
|
+
type: PropType<boolean | null>;
|
|
14222
|
+
default: null;
|
|
14223
|
+
};
|
|
14252
14224
|
railWidth: {
|
|
14253
14225
|
type: (StringConstructor | NumberConstructor)[];
|
|
14254
14226
|
default: number;
|
|
@@ -14274,6 +14246,7 @@ declare const VNavigationDrawer: vue.DefineComponent<{
|
|
|
14274
14246
|
isStuck: vue.Ref<boolean | "top" | "bottom">;
|
|
14275
14247
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
14276
14248
|
'update:modelValue': (val: boolean) => true;
|
|
14249
|
+
'update:rail': (val: boolean) => true;
|
|
14277
14250
|
}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
14278
14251
|
theme: StringConstructor;
|
|
14279
14252
|
tag: Omit<{
|
|
@@ -14310,7 +14283,10 @@ declare const VNavigationDrawer: vue.DefineComponent<{
|
|
|
14310
14283
|
default: null;
|
|
14311
14284
|
};
|
|
14312
14285
|
permanent: BooleanConstructor;
|
|
14313
|
-
rail:
|
|
14286
|
+
rail: {
|
|
14287
|
+
type: PropType<boolean | null>;
|
|
14288
|
+
default: null;
|
|
14289
|
+
};
|
|
14314
14290
|
railWidth: {
|
|
14315
14291
|
type: (StringConstructor | NumberConstructor)[];
|
|
14316
14292
|
default: number;
|
|
@@ -14334,6 +14310,7 @@ declare const VNavigationDrawer: vue.DefineComponent<{
|
|
|
14334
14310
|
sticky: BooleanConstructor;
|
|
14335
14311
|
}>> & {
|
|
14336
14312
|
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
14313
|
+
"onUpdate:rail"?: ((val: boolean) => any) | undefined;
|
|
14337
14314
|
}, {
|
|
14338
14315
|
absolute: boolean;
|
|
14339
14316
|
location: "end" | "start" | "left" | "bottom" | "right";
|
|
@@ -14351,7 +14328,7 @@ declare const VNavigationDrawer: vue.DefineComponent<{
|
|
|
14351
14328
|
disableRouteWatcher: boolean;
|
|
14352
14329
|
expandOnHover: boolean;
|
|
14353
14330
|
permanent: boolean;
|
|
14354
|
-
rail: boolean;
|
|
14331
|
+
rail: boolean | null;
|
|
14355
14332
|
railWidth: string | number;
|
|
14356
14333
|
}>;
|
|
14357
14334
|
declare type VNavigationDrawer = InstanceType<typeof VNavigationDrawer>;
|
|
@@ -30,9 +30,7 @@ export const VDialogTransition = defineComponent({
|
|
|
30
30
|
const animation = animate(el, [{
|
|
31
31
|
transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
|
|
32
32
|
opacity: 0
|
|
33
|
-
}, {
|
|
34
|
-
transform: ''
|
|
35
|
-
}], {
|
|
33
|
+
}, {}], {
|
|
36
34
|
duration: 225 * speed,
|
|
37
35
|
easing: deceleratedEasing
|
|
38
36
|
});
|
|
@@ -42,9 +40,7 @@ export const VDialogTransition = defineComponent({
|
|
|
42
40
|
}, {
|
|
43
41
|
opacity: 0,
|
|
44
42
|
offset: 0.33
|
|
45
|
-
}, {
|
|
46
|
-
opacity: 1
|
|
47
|
-
}], {
|
|
43
|
+
}, {}], {
|
|
48
44
|
duration: 225 * 2 * speed,
|
|
49
45
|
easing: standardEasing
|
|
50
46
|
});
|
|
@@ -67,9 +63,7 @@ export const VDialogTransition = defineComponent({
|
|
|
67
63
|
sy,
|
|
68
64
|
speed
|
|
69
65
|
} = getDimensions(props.target, el);
|
|
70
|
-
const animation = animate(el, [{
|
|
71
|
-
transform: ''
|
|
72
|
-
}, {
|
|
66
|
+
const animation = animate(el, [{}, {
|
|
73
67
|
transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
|
|
74
68
|
opacity: 0
|
|
75
69
|
}], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-transition.mjs","names":["Transition","acceleratedEasing","animate","deceleratedEasing","defineComponent","nullifyTransforms","standardEasing","VDialogTransition","name","props","target","Object","setup","slots","functions","onBeforeEnter","el","style","pointerEvents","visibility","onEnter","done","Promise","resolve","requestAnimationFrame","x","y","sx","sy","speed","getDimensions","animation","transform","opacity","duration","easing","getChildren","forEach","offset","finished","then","onAfterEnter","removeProperty","onBeforeLeave","onLeave","onAfterLeave","els","querySelector","children","targetBox","getBoundingClientRect","elBox","originX","originY","getComputedStyle","transformOrigin","split","map","v","parseFloat","anchorSide","anchorOffset","getPropertyValue","offsetX","left","width","offsetY","top","height","tsx","tsy","maxs","Math","max","asa","window","innerWidth","innerHeight","min"],"sources":["../../../src/components/transitions/dialog-transition.tsx"],"sourcesContent":["import type { PropType } from 'vue'\nimport { Transition } from 'vue'\nimport {\n acceleratedEasing,\n animate,\n deceleratedEasing,\n defineComponent,\n nullifyTransforms,\n standardEasing,\n} from '@/util'\n\nexport const VDialogTransition = defineComponent({\n name: 'VDialogTransition',\n\n props: {\n target: Object as PropType<HTMLElement>,\n },\n\n setup (props, { slots }) {\n const functions = {\n onBeforeEnter (el: Element) {\n (el as HTMLElement).style.pointerEvents = 'none'\n ;(el as HTMLElement).style.visibility = 'hidden'\n },\n async onEnter (el: Element, done: () => void) {\n await new Promise(resolve => requestAnimationFrame(resolve))\n await new Promise(resolve => requestAnimationFrame(resolve))\n ;(el as HTMLElement).style.visibility = ''\n\n const { x, y, sx, sy, speed } = getDimensions(props.target!, el as HTMLElement)\n\n const animation = animate(el, [\n { transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`, opacity: 0 },\n { transform: '' },\n ], {\n duration: 225 * speed,\n easing: deceleratedEasing,\n })\n getChildren(el)?.forEach(el => {\n animate(el, [\n { opacity: 0 },\n { opacity: 0, offset: 0.33 },\n { opacity: 1 },\n ], {\n duration: 225 * 2 * speed,\n easing: standardEasing,\n })\n })\n animation.finished.then(() => done())\n },\n onAfterEnter (el: Element) {\n (el as HTMLElement).style.removeProperty('pointer-events')\n },\n onBeforeLeave (el: Element) {\n (el as HTMLElement).style.pointerEvents = 'none'\n },\n async onLeave (el: Element, done: () => void) {\n await new Promise(resolve => requestAnimationFrame(resolve))\n\n const { x, y, sx, sy, speed } = getDimensions(props.target!, el as HTMLElement)\n\n const animation = animate(el, [\n { transform: '' },\n { transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`, opacity: 0 },\n ], {\n duration: 125 * speed,\n easing: acceleratedEasing,\n })\n animation.finished.then(() => done())\n getChildren(el)?.forEach(el => {\n animate(el, [\n {},\n { opacity: 0, offset: 0.2 },\n { opacity: 0 },\n ], {\n duration: 125 * 2 * speed,\n easing: standardEasing,\n })\n })\n },\n onAfterLeave (el: Element) {\n (el as HTMLElement).style.removeProperty('pointer-events')\n },\n }\n\n return () => {\n return props.target\n ? (\n <Transition\n name=\"dialog-transition\"\n { ...functions }\n css={ false }\n v-slots={ slots }\n />\n )\n : <Transition name=\"dialog-transition\" v-slots={ slots } />\n }\n },\n})\n\n/** Animatable children (card, sheet, list) */\nfunction getChildren (el: Element) {\n const els = el.querySelector(':scope > .v-card, :scope > .v-sheet, :scope > .v-list')?.children\n return els && [...els]\n}\n\nfunction getDimensions (target: HTMLElement, el: HTMLElement) {\n const targetBox = target.getBoundingClientRect()\n const elBox = nullifyTransforms(el)\n const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v))\n\n const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ')\n\n let offsetX = targetBox.left + targetBox.width / 2\n if (anchorSide === 'left' || anchorOffset === 'left') {\n offsetX -= targetBox.width / 2\n } else if (anchorSide === 'right' || anchorOffset === 'right') {\n offsetX += targetBox.width / 2\n }\n\n let offsetY = targetBox.top + targetBox.height / 2\n if (anchorSide === 'top' || anchorOffset === 'top') {\n offsetY -= targetBox.height / 2\n } else if (anchorSide === 'bottom' || anchorOffset === 'bottom') {\n offsetY += targetBox.height / 2\n }\n\n const tsx = targetBox.width / elBox.width\n const tsy = targetBox.height / elBox.height\n const maxs = Math.max(1, tsx, tsy)\n const sx = tsx / maxs || 0\n const sy = tsy / maxs || 0\n\n // Animate elements larger than 12% of the screen area up to 1.5x slower\n const asa = (elBox.width * elBox.height) / (window.innerWidth * window.innerHeight)\n const speed = asa > 0.12\n ? Math.min(1.5, (asa - 0.12) * 10 + 1)\n : 1\n\n return {\n x: offsetX - (originX + elBox.left),\n y: offsetY - (originY + elBox.top),\n sx,\n sy,\n speed,\n }\n}\n\nexport type VDialogTransition = InstanceType<typeof VDialogTransition>\n"],"mappings":";AACA,SAASA,UAAU,QAAQ,KAAK;AAAA,SAE9BC,iBAAiB,EACjBC,OAAO,EACPC,iBAAiB,EACjBC,eAAe,EACfC,iBAAiB,EACjBC,cAAc;AAGhB,OAAO,MAAMC,iBAAiB,GAAGH,eAAe,CAAC;EAC/CI,IAAI,EAAE,mBAAmB;EAEzBC,KAAK,EAAE;IACLC,MAAM,EAAEC;EACV,CAAC;EAEDC,KAAK,CAAEH,KAAK,QAAa;IAAA,IAAX;MAAEI;IAAM,CAAC;IACrB,MAAMC,SAAS,GAAG;MAChBC,aAAa,CAAEC,EAAW,EAAE;QACzBA,EAAE,CAAiBC,KAAK,CAACC,aAAa,GAAG,MAAM;QAC9CF,EAAE,CAAiBC,KAAK,CAACE,UAAU,GAAG,QAAQ;MAClD,CAAC;MACD,MAAMC,OAAO,CAAEJ,EAAW,EAAEK,IAAgB,EAAE;QAAA;QAC5C,MAAM,IAAIC,OAAO,CAACC,OAAO,IAAIC,qBAAqB,CAACD,OAAO,CAAC,CAAC;QAC5D,MAAM,IAAID,OAAO,CAACC,OAAO,IAAIC,qBAAqB,CAACD,OAAO,CAAC,CAAC;Q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;EACjC,CAAC,MAAM,IAAIR,UAAU,KAAK,QAAQ,IAAIC,YAAY,KAAK,QAAQ,EAAE;IAC/DK,OAAO,IAAIjB,SAAS,CAACmB,MAAM,GAAG,CAAC;EACjC;EAEA,MAAMC,GAAG,GAAGpB,SAAS,CAACgB,KAAK,GAAGd,KAAK,CAACc,KAAK;EACzC,MAAMK,GAAG,GAAGrB,SAAS,CAACmB,MAAM,GAAGjB,KAAK,CAACiB,MAAM;EAC3C,MAAMG,IAAI,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEJ,GAAG,EAAEC,GAAG,CAAC;EAClC,MAAM3C,EAAE,GAAG0C,GAAG,GAAGE,IAAI,IAAI,CAAC;EAC1B,MAAM3C,EAAE,GAAG0C,GAAG,GAAGC,IAAI,IAAI,CAAC;;EAE1B;EACA,MAAMG,GAAG,GAAIvB,KAAK,CAACc,KAAK,GAAGd,KAAK,CAACiB,MAAM,IAAKO,MAAM,CAACC,UAAU,GAAGD,MAAM,CAACE,WAAW,CAAC;EACnF,MAAMhD,KAAK,GAAG6C,GAAG,GAAG,IAAI,GACpBF,IAAI,CAACM,GAAG,CAAC,GAAG,EAAE,CAACJ,GAAG,GAAG,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC,GACpC,CAAC;EAEL,OAAO;IACLjD,CAAC,EAAEsC,OAAO,IAAIX,OAAO,GAAGD,KAAK,CAACa,IAAI,CAAC;IACnCtC,CAAC,EAAEwC,OAAO,IAAIb,OAAO,GAAGF,KAAK,CAACgB,GAAG,CAAC;IAClCxC,EAAE;IACFC,EAAE;IACFC;EACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"dialog-transition.mjs","names":["Transition","acceleratedEasing","animate","deceleratedEasing","defineComponent","nullifyTransforms","standardEasing","VDialogTransition","name","props","target","Object","setup","slots","functions","onBeforeEnter","el","style","pointerEvents","visibility","onEnter","done","Promise","resolve","requestAnimationFrame","x","y","sx","sy","speed","getDimensions","animation","transform","opacity","duration","easing","getChildren","forEach","offset","finished","then","onAfterEnter","removeProperty","onBeforeLeave","onLeave","onAfterLeave","els","querySelector","children","targetBox","getBoundingClientRect","elBox","originX","originY","getComputedStyle","transformOrigin","split","map","v","parseFloat","anchorSide","anchorOffset","getPropertyValue","offsetX","left","width","offsetY","top","height","tsx","tsy","maxs","Math","max","asa","window","innerWidth","innerHeight","min"],"sources":["../../../src/components/transitions/dialog-transition.tsx"],"sourcesContent":["import type { PropType } from 'vue'\nimport { Transition } from 'vue'\nimport {\n acceleratedEasing,\n animate,\n deceleratedEasing,\n defineComponent,\n nullifyTransforms,\n standardEasing,\n} from '@/util'\n\nexport const VDialogTransition = defineComponent({\n name: 'VDialogTransition',\n\n props: {\n target: Object as PropType<HTMLElement>,\n },\n\n setup (props, { slots }) {\n const functions = {\n onBeforeEnter (el: Element) {\n (el as HTMLElement).style.pointerEvents = 'none'\n ;(el as HTMLElement).style.visibility = 'hidden'\n },\n async onEnter (el: Element, done: () => void) {\n await new Promise(resolve => requestAnimationFrame(resolve))\n await new Promise(resolve => requestAnimationFrame(resolve))\n ;(el as HTMLElement).style.visibility = ''\n\n const { x, y, sx, sy, speed } = getDimensions(props.target!, el as HTMLElement)\n\n const animation = animate(el, [\n { transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`, opacity: 0 },\n {},\n ], {\n duration: 225 * speed,\n easing: deceleratedEasing,\n })\n getChildren(el)?.forEach(el => {\n animate(el, [\n { opacity: 0 },\n { opacity: 0, offset: 0.33 },\n {},\n ], {\n duration: 225 * 2 * speed,\n easing: standardEasing,\n })\n })\n animation.finished.then(() => done())\n },\n onAfterEnter (el: Element) {\n (el as HTMLElement).style.removeProperty('pointer-events')\n },\n onBeforeLeave (el: Element) {\n (el as HTMLElement).style.pointerEvents = 'none'\n },\n async onLeave (el: Element, done: () => void) {\n await new Promise(resolve => requestAnimationFrame(resolve))\n\n const { x, y, sx, sy, speed } = getDimensions(props.target!, el as HTMLElement)\n\n const animation = animate(el, [\n {},\n { transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`, opacity: 0 },\n ], {\n duration: 125 * speed,\n easing: acceleratedEasing,\n })\n animation.finished.then(() => done())\n getChildren(el)?.forEach(el => {\n animate(el, [\n {},\n { opacity: 0, offset: 0.2 },\n { opacity: 0 },\n ], {\n duration: 125 * 2 * speed,\n easing: standardEasing,\n })\n })\n },\n onAfterLeave (el: Element) {\n (el as HTMLElement).style.removeProperty('pointer-events')\n },\n }\n\n return () => {\n return props.target\n ? (\n <Transition\n name=\"dialog-transition\"\n { ...functions }\n css={ false }\n v-slots={ slots }\n />\n )\n : <Transition name=\"dialog-transition\" v-slots={ slots } />\n }\n },\n})\n\n/** Animatable children (card, sheet, list) */\nfunction getChildren (el: Element) {\n const els = el.querySelector(':scope > .v-card, :scope > .v-sheet, :scope > .v-list')?.children\n return els && [...els]\n}\n\nfunction getDimensions (target: HTMLElement, el: HTMLElement) {\n const targetBox = target.getBoundingClientRect()\n const elBox = nullifyTransforms(el)\n const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v))\n\n const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ')\n\n let offsetX = targetBox.left + targetBox.width / 2\n if (anchorSide === 'left' || anchorOffset === 'left') {\n offsetX -= targetBox.width / 2\n } else if (anchorSide === 'right' || anchorOffset === 'right') {\n offsetX += targetBox.width / 2\n }\n\n let offsetY = targetBox.top + targetBox.height / 2\n if (anchorSide === 'top' || anchorOffset === 'top') {\n offsetY -= targetBox.height / 2\n } else if (anchorSide === 'bottom' || anchorOffset === 'bottom') {\n offsetY += targetBox.height / 2\n }\n\n const tsx = targetBox.width / elBox.width\n const tsy = targetBox.height / elBox.height\n const maxs = Math.max(1, tsx, tsy)\n const sx = tsx / maxs || 0\n const sy = tsy / maxs || 0\n\n // Animate elements larger than 12% of the screen area up to 1.5x slower\n const asa = (elBox.width * elBox.height) / (window.innerWidth * window.innerHeight)\n const speed = asa > 0.12\n ? Math.min(1.5, (asa - 0.12) * 10 + 1)\n : 1\n\n return {\n x: offsetX - (originX + elBox.left),\n y: offsetY - (originY + elBox.top),\n sx,\n sy,\n speed,\n }\n}\n\nexport type VDialogTransition = InstanceType<typeof VDialogTransition>\n"],"mappings":";AACA,SAASA,UAAU,QAAQ,KAAK;AAAA,SAE9BC,iBAAiB,EACjBC,OAAO,EACPC,iBAAiB,EACjBC,eAAe,EACfC,iBAAiB,EACjBC,cAAc;AAGhB,OAAO,MAAMC,iBAAiB,GAAGH,eAAe,CAAC;EAC/CI,IAAI,EAAE,mBAAmB;EAEzBC,KAAK,EAAE;IACLC,MAAM,EAAEC;EACV,CAAC;EAEDC,KAAK,CAAEH,KAAK,QAAa;IAAA,IAAX;MAAEI;IAAM,CAAC;IACrB,MAAMC,SAAS,GAAG;MAChBC,aAAa,CAAEC,EAAW,EAAE;QACzBA,EAAE,CAAiBC,KAAK,CAACC,aAAa,GAAG,MAAM;QAC9CF,EAAE,CAAiBC,KAAK,CAACE,UAAU,GAAG,QAAQ;MAClD,CAAC;MACD,MAAMC,OAAO,CAAEJ,EAAW,EAAEK,IAAgB,EAAE;QAAA;QAC5C,MAAM,IAAIC,OAAO,CAACC,OAAO,IAAIC,qBAAqB,CAACD,OAAO,CAAC,CAAC;QAC5D,MAAM,IAAID,OAAO,CAACC,OAAO,IAAIC,qBAAqB,CAACD,OAAO,CAAC,CAAC;QAC1DP,EAAE,CAAiBC,KAAK,CAACE,UAAU,GAAG,EAAE;QAE1C,MAAM;UAAEM,CAAC;UAAEC,CAAC;UAAEC,EAAE;UAAEC,EAAE;UAAEC;QAAM,CAAC,GAAGC,aAAa,CAACrB,KAAK,CAACC,MAAM,EAAGM,EAAE,CAAgB;QAE/E,MAAMe,SAAS,GAAG7B,OAAO,CAACc,EAAE,EAAE,CAC5B;UAAEgB,SAAS,EAAG,aAAYP,CAAE,OAAMC,CAAE,aAAYC,EAAG,KAAIC,EAAG,GAAE;UAAEK,OAAO,EAAE;QAAE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,IAAI,IAAI,CAAC;EAC1B,MAAM3C,EAAE,GAAG0C,GAAG,GAAGC,IAAI,IAAI,CAAC;;EAE1B;EACA,MAAMG,GAAG,GAAIvB,KAAK,CAACc,KAAK,GAAGd,KAAK,CAACiB,MAAM,IAAKO,MAAM,CAACC,UAAU,GAAGD,MAAM,CAACE,WAAW,CAAC;EACnF,MAAMhD,KAAK,GAAG6C,GAAG,GAAG,IAAI,GACpBF,IAAI,CAACM,GAAG,CAAC,GAAG,EAAE,CAACJ,GAAG,GAAG,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC,GACpC,CAAC;EAEL,OAAO;IACLjD,CAAC,EAAEsC,OAAO,IAAIX,OAAO,GAAGD,KAAK,CAACa,IAAI,CAAC;IACnCtC,CAAC,EAAEwC,OAAO,IAAIb,OAAO,GAAGF,KAAK,CAACgB,GAAG,CAAC;IAClCxC,EAAE;IACFC,EAAE;IACFC;EACF,CAAC;AACH"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable no-labels */
|
|
3
3
|
// Utilities
|
|
4
4
|
import { getPropertyFromItem, propsFactory, wrapInArray } from "../util/index.mjs";
|
|
5
|
-
import { computed, unref } from 'vue';
|
|
5
|
+
import { computed, ref, unref, watchEffect } from 'vue';
|
|
6
6
|
|
|
7
7
|
// Types
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ export function filterItems(items, query, options) {
|
|
|
29
29
|
const customFiltersLength = Object.keys((options == null ? void 0 : options.customKeyFilter) ?? {}).length;
|
|
30
30
|
if (!(items != null && items.length)) return array;
|
|
31
31
|
loop: for (let i = 0; i < items.length; i++) {
|
|
32
|
-
const item = items[i];
|
|
32
|
+
const item = items[i].raw;
|
|
33
33
|
const customMatches = {};
|
|
34
34
|
const defaultMatches = {};
|
|
35
35
|
let match = -1;
|
|
@@ -71,28 +71,36 @@ export function filterItems(items, query, options) {
|
|
|
71
71
|
}
|
|
72
72
|
export function useFilter(props, items, query) {
|
|
73
73
|
const strQuery = computed(() => typeof (query == null ? void 0 : query.value) !== 'string' && typeof (query == null ? void 0 : query.value) !== 'number' ? '' : String(query.value));
|
|
74
|
-
const filteredItems =
|
|
74
|
+
const filteredItems = ref([]);
|
|
75
|
+
const filteredMatches = ref(new Map());
|
|
76
|
+
watchEffect(() => {
|
|
77
|
+
filteredItems.value = [];
|
|
78
|
+
filteredMatches.value = new Map();
|
|
75
79
|
const transformedItems = unref(items);
|
|
76
|
-
const
|
|
80
|
+
const results = filterItems(transformedItems, strQuery.value, {
|
|
77
81
|
customKeyFilter: props.customKeyFilter,
|
|
78
82
|
default: props.customFilter,
|
|
79
83
|
filterKeys: props.filterKeys,
|
|
80
84
|
filterMode: props.filterMode,
|
|
81
85
|
noFilter: props.noFilter
|
|
82
86
|
});
|
|
83
|
-
|
|
87
|
+
results.forEach(_ref => {
|
|
84
88
|
let {
|
|
85
89
|
index,
|
|
86
90
|
matches
|
|
87
91
|
} = _ref;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
};
|
|
92
|
+
const item = transformedItems[index];
|
|
93
|
+
filteredItems.value.push(item);
|
|
94
|
+
filteredMatches.value.set(item.value, matches);
|
|
92
95
|
});
|
|
93
96
|
});
|
|
97
|
+
function getMatches(item) {
|
|
98
|
+
return filteredMatches.value.get(item.value);
|
|
99
|
+
}
|
|
94
100
|
return {
|
|
95
|
-
filteredItems
|
|
101
|
+
filteredItems,
|
|
102
|
+
filteredMatches,
|
|
103
|
+
getMatches
|
|
96
104
|
};
|
|
97
105
|
}
|
|
98
106
|
//# sourceMappingURL=filter.mjs.map
|