nuxt-ui-tools 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +4 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +30 -15
- package/dist/runtime/form/components/actions/FormActions.d.vue.ts +0 -2
- package/dist/runtime/form/components/actions/FormActions.vue +5 -8
- package/dist/runtime/form/components/actions/FormActions.vue.d.ts +0 -2
- package/dist/runtime/form/components/layout/DrawerLayout.vue +5 -1
- package/dist/runtime/form/components/layout/ModalLayout.vue +5 -1
- package/dist/runtime/form/components/renderer/FormCompositeControl.d.vue.ts +15 -0
- package/dist/runtime/form/components/renderer/FormCompositeControl.vue +13 -0
- package/dist/runtime/form/components/renderer/FormCompositeControl.vue.d.ts +15 -0
- package/dist/runtime/form/components/renderer/FormFieldRenderer.d.vue.ts +1 -0
- package/dist/runtime/form/components/renderer/FormFieldRenderer.vue +19 -3
- package/dist/runtime/form/components/renderer/FormFieldRenderer.vue.d.ts +1 -0
- package/dist/runtime/form/components/renderer/FormFieldShell.d.vue.ts +4 -4
- package/dist/runtime/form/components/renderer/FormFieldShell.vue +15 -1
- package/dist/runtime/form/components/renderer/FormFieldShell.vue.d.ts +4 -4
- package/dist/runtime/form/components/root/Form.d.vue.ts +2 -2
- package/dist/runtime/form/components/root/Form.vue +5 -3
- package/dist/runtime/form/components/root/Form.vue.d.ts +2 -2
- package/dist/runtime/form/composables/use-field-control.d.ts +1 -1
- package/dist/runtime/form/composables/use-field-control.js +4 -0
- package/dist/runtime/form/composables/use-field-options.d.ts +1 -1
- package/dist/runtime/form/composables/use-field-options.js +75 -31
- package/dist/runtime/form/composables/use-form-field-chrome.d.ts +3 -0
- package/dist/runtime/form/composables/use-form-field-chrome.js +9 -0
- package/dist/runtime/form/composables/use-form-runtime.js +17 -5
- package/dist/runtime/form/fields/array-list/component.vue +4 -1
- package/dist/runtime/form/fields/auto-complete/component.vue +23 -16
- package/dist/runtime/form/fields/checkbox-card/component.vue +28 -29
- package/dist/runtime/form/fields/checkbox-group/component.vue +28 -29
- package/dist/runtime/form/fields/color-picker/component.vue +4 -2
- package/dist/runtime/form/fields/date-family/component.vue +9 -4
- package/dist/runtime/form/fields/hierarchy/SelectionCheckbox.d.vue.ts +13 -0
- package/dist/runtime/form/fields/hierarchy/SelectionCheckbox.vue +24 -0
- package/dist/runtime/form/fields/hierarchy/SelectionCheckbox.vue.d.ts +13 -0
- package/dist/runtime/form/fields/hierarchy/SelectionRadio.d.vue.ts +14 -0
- package/dist/runtime/form/fields/hierarchy/SelectionRadio.vue +27 -0
- package/dist/runtime/form/fields/hierarchy/SelectionRadio.vue.d.ts +14 -0
- package/dist/runtime/form/fields/hierarchy/component.vue +257 -142
- package/dist/runtime/form/fields/hierarchy/utils.d.ts +9 -0
- package/dist/runtime/form/fields/hierarchy/utils.js +32 -0
- package/dist/runtime/form/fields/input-group/component.vue +7 -30
- package/dist/runtime/form/fields/matrix/component.vue +9 -3
- package/dist/runtime/form/fields/phone-number/component.vue +7 -2
- package/dist/runtime/form/fields/rating/component.vue +25 -2
- package/dist/runtime/form/fields/select/component.vue +29 -21
- package/dist/runtime/form/fields/switch-group/component.vue +8 -3
- package/dist/runtime/form/fields/time/component.vue +7 -5
- package/dist/runtime/form/fields/upload/component.vue +5 -3
- package/dist/runtime/form/types/api.d.ts +9 -3
- package/dist/runtime/form/types/field-base.d.ts +3 -1
- package/dist/runtime/form/types/runtime.d.ts +2 -0
- package/dist/runtime/form/types/ui.d.ts +1 -0
- package/dist/runtime/form/utils/api.js +3 -0
- package/dist/runtime/form/utils/options.d.ts +11 -2
- package/dist/runtime/form/utils/options.js +57 -9
- package/dist/runtime/form/utils/state.js +10 -2
- package/dist/runtime/i18n/locales/en.js +38 -0
- package/dist/runtime/i18n/locales/fr.js +38 -0
- package/dist/runtime/i18n/types.d.ts +38 -0
- package/dist/runtime/i18n/use-locale.d.ts +2 -2
- package/dist/runtime/i18n/use-locale.js +3 -3
- package/dist/runtime/spreadsheet/components/layout/SpreadsheetImportFooter.d.vue.ts +2 -2
- package/dist/runtime/spreadsheet/components/layout/SpreadsheetImportFooter.vue.d.ts +2 -2
- package/dist/runtime/spreadsheet/components/steps/review/SpreadsheetReviewInspection.d.vue.ts +2 -2
- package/dist/runtime/spreadsheet/components/steps/review/SpreadsheetReviewInspection.vue.d.ts +2 -2
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-internals.d.ts +15 -15
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-resolutions.d.ts +2 -2
- package/dist/runtime/spreadsheet/schema/normalize.d.ts +1 -1
- package/dist/runtime/spreadsheet/utils/references/sources.d.ts +1 -1
- package/dist/runtime/table/components/DataList.d.vue.ts +2 -0
- package/dist/runtime/table/components/DataList.vue.d.ts +2 -0
- package/dist/runtime/table/components/actions/RowActions.d.vue.ts +4 -2
- package/dist/runtime/table/components/actions/RowActions.vue +2 -0
- package/dist/runtime/table/components/actions/RowActions.vue.d.ts +4 -2
- package/dist/runtime/table/components/data-list/DataListAddFilter.d.vue.ts +5 -3
- package/dist/runtime/table/components/data-list/DataListAddFilter.vue +6 -1
- package/dist/runtime/table/components/data-list/DataListAddFilter.vue.d.ts +5 -3
- package/dist/runtime/table/components/data-list/DataListContent.d.vue.ts +24 -17
- package/dist/runtime/table/components/data-list/DataListContent.vue +70 -17
- package/dist/runtime/table/components/data-list/DataListContent.vue.d.ts +24 -17
- package/dist/runtime/table/components/data-list/DataListDefault.d.vue.ts +2 -0
- package/dist/runtime/table/components/data-list/DataListDefault.vue.d.ts +2 -0
- package/dist/runtime/table/components/data-list/DataListFilterTags.d.vue.ts +2 -0
- package/dist/runtime/table/components/data-list/DataListFilterTags.vue.d.ts +2 -0
- package/dist/runtime/table/components/data-list/DataListInfiniteLoader.d.vue.ts +1 -1
- package/dist/runtime/table/components/data-list/DataListInfiniteLoader.vue.d.ts +1 -1
- package/dist/runtime/table/components/data-list/DataListLayoutSwitch.vue +17 -11
- package/dist/runtime/table/components/data-list/DataListPagination.d.vue.ts +1 -1
- package/dist/runtime/table/components/data-list/DataListPagination.vue.d.ts +1 -1
- package/dist/runtime/table/components/data-list/DataListRoot.vue +2 -46
- package/dist/runtime/table/components/data-list/DataListSortMenu.d.vue.ts +1 -1
- package/dist/runtime/table/components/data-list/DataListSortMenu.vue +6 -0
- package/dist/runtime/table/components/data-list/DataListSortMenu.vue.d.ts +1 -1
- package/dist/runtime/table/components/filters/shared/DynamicFilterPicker.d.vue.ts +5 -0
- package/dist/runtime/table/components/filters/shared/DynamicFilterPicker.vue +182 -59
- package/dist/runtime/table/components/filters/shared/DynamicFilterPicker.vue.d.ts +5 -0
- package/dist/runtime/table/components/filters/shared/FilterMatchModeButton.d.vue.ts +3 -1
- package/dist/runtime/table/components/filters/shared/FilterMatchModeButton.vue +29 -5
- package/dist/runtime/table/components/filters/shared/FilterMatchModeButton.vue.d.ts +3 -1
- package/dist/runtime/table/components/filters/shared/FilterMatchModePanel.d.vue.ts +17 -0
- package/dist/runtime/table/components/filters/shared/FilterMatchModePanel.vue +47 -0
- package/dist/runtime/table/components/filters/shared/FilterMatchModePanel.vue.d.ts +17 -0
- package/dist/runtime/table/components/filters/shared/FilterOptionMultipleList.d.vue.ts +3 -1
- package/dist/runtime/table/components/filters/shared/FilterOptionMultipleList.vue +12 -3
- package/dist/runtime/table/components/filters/shared/FilterOptionMultipleList.vue.d.ts +3 -1
- package/dist/runtime/table/components/filters/shared/FilterOptionPickerContent.d.vue.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterOptionPickerContent.vue +11 -1
- package/dist/runtime/table/components/filters/shared/FilterOptionPickerContent.vue.d.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterOptionRow.d.vue.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterOptionRow.vue +48 -9
- package/dist/runtime/table/components/filters/shared/FilterOptionRow.vue.d.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterOptionSingleList.d.vue.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterOptionSingleList.vue +35 -9
- package/dist/runtime/table/components/filters/shared/FilterOptionSingleList.vue.d.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterOptionTreeContent.d.vue.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterOptionTreeContent.vue +77 -20
- package/dist/runtime/table/components/filters/shared/FilterOptionTreeContent.vue.d.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterPopoverShell.d.vue.ts +27 -0
- package/dist/runtime/table/components/filters/shared/FilterPopoverShell.vue +36 -0
- package/dist/runtime/table/components/filters/shared/FilterPopoverShell.vue.d.ts +27 -0
- package/dist/runtime/table/components/filters/shared/FilterSearchablePanel.d.vue.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterSearchablePanel.vue +40 -10
- package/dist/runtime/table/components/filters/shared/FilterSearchablePanel.vue.d.ts +3 -0
- package/dist/runtime/table/components/filters/shared/FilterStageTransition.d.vue.ts +23 -0
- package/dist/runtime/table/components/filters/shared/FilterStageTransition.vue +21 -0
- package/dist/runtime/table/components/filters/shared/FilterStageTransition.vue.d.ts +23 -0
- package/dist/runtime/table/components/filters/shared/FilterTriggerTag.d.vue.ts +3 -2
- package/dist/runtime/table/components/filters/shared/FilterTriggerTag.vue +26 -25
- package/dist/runtime/table/components/filters/shared/FilterTriggerTag.vue.d.ts +3 -2
- package/dist/runtime/table/components/filters/tags/BooleanFilterTag.d.vue.ts +1 -1
- package/dist/runtime/table/components/filters/tags/BooleanFilterTag.vue +75 -22
- package/dist/runtime/table/components/filters/tags/BooleanFilterTag.vue.d.ts +1 -1
- package/dist/runtime/table/components/filters/tags/DateFilterTag.d.vue.ts +3 -1
- package/dist/runtime/table/components/filters/tags/DateFilterTag.vue +254 -160
- package/dist/runtime/table/components/filters/tags/DateFilterTag.vue.d.ts +3 -1
- package/dist/runtime/table/components/filters/tags/FilterTagsBar.d.vue.ts +7 -6
- package/dist/runtime/table/components/filters/tags/FilterTagsBar.vue +12 -27
- package/dist/runtime/table/components/filters/tags/FilterTagsBar.vue.d.ts +7 -6
- package/dist/runtime/table/components/filters/tags/NumberFilterTag.d.vue.ts +3 -2
- package/dist/runtime/table/components/filters/tags/NumberFilterTag.vue +192 -106
- package/dist/runtime/table/components/filters/tags/NumberFilterTag.vue.d.ts +3 -2
- package/dist/runtime/table/components/filters/tags/OptionFilterTag.d.vue.ts +3 -2
- package/dist/runtime/table/components/filters/tags/OptionFilterTag.vue +110 -48
- package/dist/runtime/table/components/filters/tags/OptionFilterTag.vue.d.ts +3 -2
- package/dist/runtime/table/components/filters/tags/TextFilterTag.d.vue.ts +3 -2
- package/dist/runtime/table/components/filters/tags/TextFilterTag.vue +120 -57
- package/dist/runtime/table/components/filters/tags/TextFilterTag.vue.d.ts +3 -2
- package/dist/runtime/table/components/grid/GridRenderer.vue +1 -1
- package/dist/runtime/table/components/layout/TableFooter.d.vue.ts +1 -1
- package/dist/runtime/table/components/layout/TableFooter.vue +1 -0
- package/dist/runtime/table/components/layout/TableFooter.vue.d.ts +1 -1
- package/dist/runtime/table/components/table/TableCellEllipsis.d.ts +1 -1
- package/dist/runtime/table/components/table/TableRenderer.vue +24 -12
- package/dist/runtime/table/composables/use-filter-tag-session.d.ts +3 -4
- package/dist/runtime/table/composables/use-filter-tag-session.js +12 -32
- package/dist/runtime/table/composables/use-query-state.d.ts +5 -5
- package/dist/runtime/table/composables/use-query-state.js +7 -32
- package/dist/runtime/table/composables/use-table-api.js +2 -2
- package/dist/runtime/table/composables/use-table-columns.d.ts +4 -14
- package/dist/runtime/table/composables/use-table-filter-presentation.d.ts +0 -3
- package/dist/runtime/table/composables/use-table-filter-presentation.js +0 -9
- package/dist/runtime/table/composables/use-table-filters.js +18 -7
- package/dist/runtime/table/composables/use-table-internals.d.ts +24 -63
- package/dist/runtime/table/composables/use-table-pagination.d.ts +2 -2
- package/dist/runtime/table/composables/use-table-state.d.ts +2 -2
- package/dist/runtime/table/types/actions.d.ts +1 -1
- package/dist/runtime/table/types/data-list.d.ts +41 -8
- package/dist/runtime/table/types/filters.d.ts +4 -0
- package/dist/runtime/table/utils/actions.d.ts +1 -1
- package/dist/runtime/table/utils/columns/menu.d.ts +2 -11
- package/dist/runtime/table/utils/columns/render.d.ts +2 -9
- package/dist/runtime/table/utils/columns/render.js +39 -30
- package/dist/runtime/table/utils/columns/state.d.ts +1 -1
- package/dist/runtime/table/utils/data-list-ui.d.ts +3 -1
- package/dist/runtime/table/utils/data-list-ui.js +45 -0
- package/dist/runtime/table/utils/filters/editor-size.d.ts +11 -0
- package/dist/runtime/table/utils/filters/editor-size.js +45 -0
- package/dist/runtime/table/utils/filters/index.d.ts +1 -1
- package/dist/runtime/table/utils/filters/index.js +1 -1
- package/dist/runtime/table/utils/query-state.d.ts +18 -1
- package/dist/runtime/table/utils/query-state.js +109 -0
- package/package.json +4 -2
- package/dist/runtime/table/utils/filters/operators.d.ts +0 -4
- package/dist/runtime/table/utils/filters/operators.js +0 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataListControlSize, DataListFilterEditorUi } from '../../../types/index.js';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
label: string;
|
|
3
4
|
count?: number;
|
|
@@ -6,6 +7,8 @@ type __VLS_Props = {
|
|
|
6
7
|
leadingIcon?: string;
|
|
7
8
|
selectedIcon?: string;
|
|
8
9
|
truncate?: boolean;
|
|
10
|
+
size?: DataListControlSize;
|
|
11
|
+
ui?: DataListFilterEditorUi;
|
|
9
12
|
};
|
|
10
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -2,35 +2,74 @@
|
|
|
2
2
|
import UCheckbox from "@nuxt/ui/components/Checkbox.vue";
|
|
3
3
|
import UIcon from "@nuxt/ui/components/Icon.vue";
|
|
4
4
|
import USkeleton from "@nuxt/ui/components/Skeleton.vue";
|
|
5
|
-
|
|
5
|
+
import { computed } from "vue";
|
|
6
|
+
import { useDataListUi } from "../../../composables/use-data-list-ui";
|
|
7
|
+
import { mergeDataListUiClass, resolveFilterEditorSizeClasses } from "../../../utils";
|
|
8
|
+
const props = defineProps({
|
|
6
9
|
label: { type: String, required: true },
|
|
7
10
|
count: { type: Number, required: false },
|
|
8
11
|
countLoading: { type: Boolean, required: false },
|
|
9
12
|
selected: { type: Boolean, required: true },
|
|
10
13
|
leadingIcon: { type: String, required: false },
|
|
11
14
|
selectedIcon: { type: String, required: false },
|
|
12
|
-
truncate: { type: Boolean, required: false }
|
|
15
|
+
truncate: { type: Boolean, required: false },
|
|
16
|
+
size: { type: String, required: false },
|
|
17
|
+
ui: { type: Object, required: false }
|
|
13
18
|
});
|
|
19
|
+
const dataListUi = useDataListUi();
|
|
20
|
+
const size = computed(
|
|
21
|
+
() => props.size ?? dataListUi.ui.value.filterTags?.size ?? dataListUi.controlSize.value
|
|
22
|
+
);
|
|
23
|
+
const ui = computed(() => props.ui ?? dataListUi.ui.value.filterTags?.ui);
|
|
24
|
+
const sizeClasses = computed(() => resolveFilterEditorSizeClasses(size.value));
|
|
14
25
|
</script>
|
|
15
26
|
|
|
16
27
|
<template>
|
|
17
28
|
<div
|
|
18
|
-
class="
|
|
19
|
-
|
|
29
|
+
:class="
|
|
30
|
+
mergeDataListUiClass(
|
|
31
|
+
`flex w-full items-center rounded-md text-left transition-colors hover:bg-elevated ${sizeClasses.option} ${selected ? 'bg-elevated text-highlighted' : 'text-default'}`,
|
|
32
|
+
void 0,
|
|
33
|
+
ui?.option
|
|
34
|
+
)
|
|
35
|
+
"
|
|
20
36
|
>
|
|
21
37
|
<UCheckbox
|
|
22
38
|
:model-value="selected"
|
|
23
39
|
color="neutral"
|
|
24
|
-
size="
|
|
40
|
+
:size="size"
|
|
25
41
|
tabindex="-1"
|
|
26
42
|
:icon="selectedIcon"
|
|
27
|
-
:ui="{ base:
|
|
43
|
+
:ui="{ base: ui?.optionCheckbox }"
|
|
28
44
|
/>
|
|
29
45
|
|
|
30
|
-
<UIcon
|
|
46
|
+
<UIcon
|
|
47
|
+
v-if="leadingIcon"
|
|
48
|
+
:name="leadingIcon"
|
|
49
|
+
:class="
|
|
50
|
+
mergeDataListUiClass(
|
|
51
|
+
`${sizeClasses.optionIcon} shrink-0 text-muted`,
|
|
52
|
+
void 0,
|
|
53
|
+
ui?.optionIcon
|
|
54
|
+
)
|
|
55
|
+
"
|
|
56
|
+
/>
|
|
31
57
|
|
|
32
|
-
<span
|
|
58
|
+
<span
|
|
59
|
+
:class="
|
|
60
|
+
mergeDataListUiClass(
|
|
61
|
+
`min-w-0 flex-1 ${sizeClasses.optionLabel} ${truncate ?? true ? 'truncate' : ''}`,
|
|
62
|
+
void 0,
|
|
63
|
+
ui?.optionLabel
|
|
64
|
+
)
|
|
65
|
+
"
|
|
66
|
+
>{{ label }}</span
|
|
67
|
+
>
|
|
33
68
|
<USkeleton v-if="countLoading" class="ml-3 h-3.5 w-6 shrink-0" />
|
|
34
|
-
<span
|
|
69
|
+
<span
|
|
70
|
+
v-else-if="count != null"
|
|
71
|
+
:class="mergeDataListUiClass('ml-3 shrink-0 text-muted', void 0, ui?.optionCount)"
|
|
72
|
+
>{{ count }}</span
|
|
73
|
+
>
|
|
35
74
|
</div>
|
|
36
75
|
</template>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataListControlSize, DataListFilterEditorUi } from '../../../types/index.js';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
label: string;
|
|
3
4
|
count?: number;
|
|
@@ -6,6 +7,8 @@ type __VLS_Props = {
|
|
|
6
7
|
leadingIcon?: string;
|
|
7
8
|
selectedIcon?: string;
|
|
8
9
|
truncate?: boolean;
|
|
10
|
+
size?: DataListControlSize;
|
|
11
|
+
ui?: DataListFilterEditorUi;
|
|
9
12
|
};
|
|
10
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataListControlSize, DataListFilterEditorUi } from '../../../types/index.js';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
items: Array<{
|
|
3
4
|
label: string;
|
|
@@ -7,6 +8,8 @@ type __VLS_Props = {
|
|
|
7
8
|
truncate?: boolean;
|
|
8
9
|
}>;
|
|
9
10
|
countLoading: boolean;
|
|
11
|
+
size?: DataListControlSize;
|
|
12
|
+
ui?: DataListFilterEditorUi;
|
|
10
13
|
};
|
|
11
14
|
type __VLS_ModelProps = {
|
|
12
15
|
modelValue?: string | undefined;
|
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
import UIcon from "@nuxt/ui/components/Icon.vue";
|
|
3
3
|
import URadioGroup from "@nuxt/ui/components/RadioGroup.vue";
|
|
4
4
|
import USkeleton from "@nuxt/ui/components/Skeleton.vue";
|
|
5
|
-
|
|
5
|
+
import { computed } from "vue";
|
|
6
|
+
import { useDataListUi } from "../../../composables/use-data-list-ui";
|
|
7
|
+
import { mergeDataListUiClass, resolveFilterEditorSizeClasses } from "../../../utils";
|
|
8
|
+
const props = defineProps({
|
|
6
9
|
items: { type: Array, required: true },
|
|
7
|
-
countLoading: { type: Boolean, required: true }
|
|
10
|
+
countLoading: { type: Boolean, required: true },
|
|
11
|
+
size: { type: String, required: false },
|
|
12
|
+
ui: { type: Object, required: false }
|
|
8
13
|
});
|
|
14
|
+
const dataListUi = useDataListUi();
|
|
15
|
+
const size = computed(
|
|
16
|
+
() => props.size ?? dataListUi.ui.value.filterTags?.size ?? dataListUi.controlSize.value
|
|
17
|
+
);
|
|
18
|
+
const ui = computed(() => props.ui ?? dataListUi.ui.value.filterTags?.ui);
|
|
19
|
+
const sizeClasses = computed(() => resolveFilterEditorSizeClasses(size.value));
|
|
9
20
|
const modelValue = defineModel({ type: null, ...{
|
|
10
21
|
default: void 0
|
|
11
22
|
} });
|
|
@@ -18,22 +29,37 @@ const modelValue = defineModel({ type: null, ...{
|
|
|
18
29
|
:items="items"
|
|
19
30
|
color="neutral"
|
|
20
31
|
variant="list"
|
|
32
|
+
:size="size"
|
|
21
33
|
:ui="{
|
|
22
34
|
root: 'w-full',
|
|
23
|
-
fieldset: 'grid gap-0.5',
|
|
24
|
-
item:
|
|
25
|
-
|
|
35
|
+
fieldset: mergeDataListUiClass('grid gap-0.5', void 0, ui?.list),
|
|
36
|
+
item: mergeDataListUiClass(
|
|
37
|
+
`flex items-center rounded-md transition-colors hover:bg-elevated data-[state=checked]:bg-elevated ${sizeClasses.option}`,
|
|
38
|
+
void 0,
|
|
39
|
+
ui?.option
|
|
40
|
+
),
|
|
41
|
+
container: 'self-center',
|
|
26
42
|
base: 'cursor-pointer',
|
|
27
|
-
wrapper: 'min-w-0 flex-1
|
|
28
|
-
label:
|
|
43
|
+
wrapper: 'min-w-0 flex-1',
|
|
44
|
+
label: mergeDataListUiClass(
|
|
45
|
+
`w-full cursor-pointer text-default ${sizeClasses.optionLabel}`,
|
|
46
|
+
void 0,
|
|
47
|
+
ui?.optionLabel
|
|
48
|
+
)
|
|
29
49
|
}"
|
|
30
50
|
>
|
|
31
51
|
<template #label="{ item }">
|
|
32
|
-
<div class="flex min-w-0 items-center gap-
|
|
52
|
+
<div class="flex min-w-0 items-center gap-2">
|
|
33
53
|
<UIcon
|
|
34
54
|
v-if="typeof item.icon === 'string'"
|
|
35
55
|
:name="item.icon"
|
|
36
|
-
class="
|
|
56
|
+
:class="
|
|
57
|
+
mergeDataListUiClass(
|
|
58
|
+
`${sizeClasses.optionIcon} shrink-0 text-muted`,
|
|
59
|
+
void 0,
|
|
60
|
+
ui?.optionIcon
|
|
61
|
+
)
|
|
62
|
+
"
|
|
37
63
|
/>
|
|
38
64
|
|
|
39
65
|
<span class="min-w-0 flex-1" :class="item.truncate ? 'truncate' : ''">
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataListControlSize, DataListFilterEditorUi } from '../../../types/index.js';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
items: Array<{
|
|
3
4
|
label: string;
|
|
@@ -7,6 +8,8 @@ type __VLS_Props = {
|
|
|
7
8
|
truncate?: boolean;
|
|
8
9
|
}>;
|
|
9
10
|
countLoading: boolean;
|
|
11
|
+
size?: DataListControlSize;
|
|
12
|
+
ui?: DataListFilterEditorUi;
|
|
10
13
|
};
|
|
11
14
|
type __VLS_ModelProps = {
|
|
12
15
|
modelValue?: string | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataListControlSize, DataListFilterEditorUi } from '../../../types/index.js';
|
|
1
2
|
type TreeEntry = {
|
|
2
3
|
id: string;
|
|
3
4
|
label: string;
|
|
@@ -31,6 +32,8 @@ type __VLS_Props = {
|
|
|
31
32
|
multiple: boolean;
|
|
32
33
|
countLoading: boolean;
|
|
33
34
|
selectedIcon?: string;
|
|
35
|
+
size?: DataListControlSize;
|
|
36
|
+
ui?: DataListFilterEditorUi;
|
|
34
37
|
};
|
|
35
38
|
type __VLS_ModelProps = {
|
|
36
39
|
modelValue?: string | undefined;
|
|
@@ -3,14 +3,25 @@ import UCheckbox from "@nuxt/ui/components/Checkbox.vue";
|
|
|
3
3
|
import UIcon from "@nuxt/ui/components/Icon.vue";
|
|
4
4
|
import URadioGroup from "@nuxt/ui/components/RadioGroup.vue";
|
|
5
5
|
import USkeleton from "@nuxt/ui/components/Skeleton.vue";
|
|
6
|
-
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { useDataListUi } from "../../../composables/use-data-list-ui";
|
|
8
|
+
import { mergeDataListUiClass, resolveFilterEditorSizeClasses } from "../../../utils";
|
|
9
|
+
const props = defineProps({
|
|
7
10
|
entries: { type: Array, required: true },
|
|
8
11
|
items: { type: Array, required: true },
|
|
9
12
|
multiple: { type: Boolean, required: true },
|
|
10
13
|
countLoading: { type: Boolean, required: true },
|
|
11
|
-
selectedIcon: { type: String, required: false }
|
|
14
|
+
selectedIcon: { type: String, required: false },
|
|
15
|
+
size: { type: String, required: false },
|
|
16
|
+
ui: { type: Object, required: false }
|
|
12
17
|
});
|
|
13
18
|
const emit = defineEmits(["toggleEntry", "toggleExpanded"]);
|
|
19
|
+
const dataListUi = useDataListUi();
|
|
20
|
+
const size = computed(
|
|
21
|
+
() => props.size ?? dataListUi.ui.value.filterTags?.size ?? dataListUi.controlSize.value
|
|
22
|
+
);
|
|
23
|
+
const ui = computed(() => props.ui ?? dataListUi.ui.value.filterTags?.ui);
|
|
24
|
+
const sizeClasses = computed(() => resolveFilterEditorSizeClasses(size.value));
|
|
14
25
|
const modelValue = defineModel({ type: null, ...{
|
|
15
26
|
default: void 0
|
|
16
27
|
} });
|
|
@@ -22,7 +33,7 @@ function getTreeIndentStyle(depth) {
|
|
|
22
33
|
</script>
|
|
23
34
|
|
|
24
35
|
<template>
|
|
25
|
-
<div v-if="multiple" class="grid gap-0.5">
|
|
36
|
+
<div v-if="multiple" :class="mergeDataListUiClass('grid gap-0.5', void 0, ui?.list)">
|
|
26
37
|
<button
|
|
27
38
|
v-for="entry in entries"
|
|
28
39
|
:key="entry.id"
|
|
@@ -31,44 +42,81 @@ function getTreeIndentStyle(depth) {
|
|
|
31
42
|
@click="emit('toggleEntry', entry.id)"
|
|
32
43
|
>
|
|
33
44
|
<div
|
|
34
|
-
class="
|
|
35
|
-
|
|
45
|
+
:class="
|
|
46
|
+
mergeDataListUiClass(
|
|
47
|
+
`flex items-center rounded-md text-left transition-colors hover:bg-elevated ${sizeClasses.option} ${entry.selected ? 'bg-elevated text-highlighted' : 'text-default'}`,
|
|
48
|
+
void 0,
|
|
49
|
+
ui?.option
|
|
50
|
+
)
|
|
51
|
+
"
|
|
36
52
|
>
|
|
37
53
|
<div
|
|
38
|
-
class="flex min-w-0 flex-1 items-center gap-
|
|
54
|
+
class="flex min-w-0 flex-1 items-center gap-2"
|
|
39
55
|
:style="getTreeIndentStyle(entry.depth)"
|
|
40
56
|
>
|
|
41
57
|
<button
|
|
42
58
|
v-if="entry.expandable"
|
|
43
59
|
type="button"
|
|
44
|
-
class="
|
|
45
|
-
|
|
60
|
+
:class="
|
|
61
|
+
mergeDataListUiClass(
|
|
62
|
+
`flex size-4 shrink-0 items-center justify-center text-muted transition-transform ${entry.expanded ? 'rotate-90' : ''}`,
|
|
63
|
+
void 0,
|
|
64
|
+
ui?.optionExpander
|
|
65
|
+
)
|
|
66
|
+
"
|
|
46
67
|
@click.stop="emit('toggleExpanded', entry.id)"
|
|
47
68
|
>
|
|
48
69
|
<UIcon name="i-lucide-chevron-right" class="size-4" />
|
|
49
70
|
</button>
|
|
50
|
-
<span
|
|
71
|
+
<span
|
|
72
|
+
v-else
|
|
73
|
+
:class="mergeDataListUiClass('size-4 shrink-0', void 0, ui?.optionSpacer)"
|
|
74
|
+
/>
|
|
51
75
|
|
|
52
76
|
<UCheckbox
|
|
53
77
|
v-if="entry.selectable || entry.branchSelectable"
|
|
54
78
|
:model-value="entry.indeterminate ? 'indeterminate' : entry.selected"
|
|
55
79
|
color="neutral"
|
|
56
|
-
size="
|
|
80
|
+
:size="size"
|
|
57
81
|
tabindex="-1"
|
|
58
82
|
:icon="selectedIcon"
|
|
59
|
-
:ui="{ base:
|
|
83
|
+
:ui="{ base: ui?.optionCheckbox }"
|
|
84
|
+
/>
|
|
85
|
+
<span
|
|
86
|
+
v-else
|
|
87
|
+
:class="mergeDataListUiClass('size-5 shrink-0', void 0, ui?.optionSpacer)"
|
|
60
88
|
/>
|
|
61
|
-
<span v-else class="size-5 shrink-0" />
|
|
62
89
|
|
|
63
|
-
<UIcon
|
|
90
|
+
<UIcon
|
|
91
|
+
v-if="entry.icon"
|
|
92
|
+
:name="entry.icon"
|
|
93
|
+
:class="
|
|
94
|
+
mergeDataListUiClass(
|
|
95
|
+
`${sizeClasses.optionIcon} shrink-0 text-muted`,
|
|
96
|
+
void 0,
|
|
97
|
+
ui?.optionIcon
|
|
98
|
+
)
|
|
99
|
+
"
|
|
100
|
+
/>
|
|
64
101
|
|
|
65
|
-
<span
|
|
102
|
+
<span
|
|
103
|
+
:class="
|
|
104
|
+
mergeDataListUiClass(
|
|
105
|
+
`min-w-0 flex-1 ${sizeClasses.optionLabel} ${entry.truncate ? 'truncate' : ''}`,
|
|
106
|
+
void 0,
|
|
107
|
+
ui?.optionLabel
|
|
108
|
+
)
|
|
109
|
+
"
|
|
110
|
+
>
|
|
66
111
|
{{ entry.label }}
|
|
67
112
|
</span>
|
|
68
113
|
</div>
|
|
69
114
|
|
|
70
115
|
<USkeleton v-if="countLoading" class="ml-3 h-3.5 w-6 shrink-0" />
|
|
71
|
-
<span
|
|
116
|
+
<span
|
|
117
|
+
v-else-if="entry.count != null"
|
|
118
|
+
:class="mergeDataListUiClass('ml-3 shrink-0 text-muted', void 0, ui?.optionCount)"
|
|
119
|
+
>
|
|
72
120
|
{{ entry.count }}
|
|
73
121
|
</span>
|
|
74
122
|
</div>
|
|
@@ -81,14 +129,23 @@ function getTreeIndentStyle(depth) {
|
|
|
81
129
|
:items="items"
|
|
82
130
|
color="neutral"
|
|
83
131
|
variant="list"
|
|
132
|
+
:size="size"
|
|
84
133
|
:ui="{
|
|
85
134
|
root: 'w-full',
|
|
86
|
-
fieldset: 'grid gap-0.5',
|
|
87
|
-
item:
|
|
88
|
-
|
|
135
|
+
fieldset: mergeDataListUiClass('grid gap-0.5', void 0, ui?.list),
|
|
136
|
+
item: mergeDataListUiClass(
|
|
137
|
+
`flex items-center rounded-md transition-colors hover:bg-elevated data-[state=checked]:bg-elevated ${sizeClasses.option}`,
|
|
138
|
+
void 0,
|
|
139
|
+
ui?.option
|
|
140
|
+
),
|
|
141
|
+
container: 'self-center',
|
|
89
142
|
base: 'cursor-pointer',
|
|
90
|
-
wrapper: 'min-w-0 flex-1
|
|
91
|
-
label:
|
|
143
|
+
wrapper: 'min-w-0 flex-1',
|
|
144
|
+
label: mergeDataListUiClass(
|
|
145
|
+
`w-full cursor-pointer text-default ${sizeClasses.optionLabel}`,
|
|
146
|
+
void 0,
|
|
147
|
+
ui?.optionLabel
|
|
148
|
+
)
|
|
92
149
|
}"
|
|
93
150
|
>
|
|
94
151
|
<template #label="{ item }">
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataListControlSize, DataListFilterEditorUi } from '../../../types/index.js';
|
|
1
2
|
type TreeEntry = {
|
|
2
3
|
id: string;
|
|
3
4
|
label: string;
|
|
@@ -31,6 +32,8 @@ type __VLS_Props = {
|
|
|
31
32
|
multiple: boolean;
|
|
32
33
|
countLoading: boolean;
|
|
33
34
|
selectedIcon?: string;
|
|
35
|
+
size?: DataListControlSize;
|
|
36
|
+
ui?: DataListFilterEditorUi;
|
|
34
37
|
};
|
|
35
38
|
type __VLS_ModelProps = {
|
|
36
39
|
modelValue?: string | undefined;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
embedded?: boolean;
|
|
4
|
+
contentClass?: string;
|
|
5
|
+
transitioning?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_1: {}, __VLS_12: {}, __VLS_15: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
content?: (props: typeof __VLS_1) => any;
|
|
10
|
+
} & {
|
|
11
|
+
default?: (props: typeof __VLS_12) => any;
|
|
12
|
+
} & {
|
|
13
|
+
content?: (props: typeof __VLS_15) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
updateOpen: (value: boolean) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onUpdateOpen?: ((value: boolean) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UPopover from "@nuxt/ui/components/Popover.vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
open: { type: Boolean, required: true },
|
|
5
|
+
embedded: { type: Boolean, required: false },
|
|
6
|
+
contentClass: { type: String, required: false },
|
|
7
|
+
transitioning: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits(["updateOpen"]);
|
|
10
|
+
function handleFocusOutside(event) {
|
|
11
|
+
if (props.transitioning) event.preventDefault();
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<template v-if="embedded">
|
|
17
|
+
<slot name="content" />
|
|
18
|
+
</template>
|
|
19
|
+
<UPopover
|
|
20
|
+
v-else
|
|
21
|
+
:open="open"
|
|
22
|
+
:content="{
|
|
23
|
+
side: 'bottom',
|
|
24
|
+
align: 'start',
|
|
25
|
+
sideOffset: 8,
|
|
26
|
+
onFocusOutside: handleFocusOutside
|
|
27
|
+
}"
|
|
28
|
+
:ui="{ content: contentClass }"
|
|
29
|
+
@update:open="emit('updateOpen', $event)"
|
|
30
|
+
>
|
|
31
|
+
<slot />
|
|
32
|
+
<template #content>
|
|
33
|
+
<slot name="content" />
|
|
34
|
+
</template>
|
|
35
|
+
</UPopover>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
embedded?: boolean;
|
|
4
|
+
contentClass?: string;
|
|
5
|
+
transitioning?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_1: {}, __VLS_12: {}, __VLS_15: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
content?: (props: typeof __VLS_1) => any;
|
|
10
|
+
} & {
|
|
11
|
+
default?: (props: typeof __VLS_12) => any;
|
|
12
|
+
} & {
|
|
13
|
+
content?: (props: typeof __VLS_15) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
updateOpen: (value: boolean) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onUpdateOpen?: ((value: boolean) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataListControlSize, DataListFilterEditorUi } from '../../../types/index.js';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
searchable?: boolean;
|
|
3
4
|
autofocus?: boolean;
|
|
@@ -6,6 +7,8 @@ type __VLS_Props = {
|
|
|
6
7
|
showEmpty?: boolean;
|
|
7
8
|
emptyLabel?: string;
|
|
8
9
|
maxHeightClass?: string;
|
|
10
|
+
size?: DataListControlSize;
|
|
11
|
+
ui?: DataListFilterEditorUi;
|
|
9
12
|
};
|
|
10
13
|
type __VLS_ModelProps = {
|
|
11
14
|
'searchQuery'?: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import UInput from "@nuxt/ui/components/Input.vue";
|
|
3
3
|
import UScrollArea from "@nuxt/ui/components/ScrollArea.vue";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { mergeDataListUiClass, resolveFilterEditorSizeClasses } from "../../../utils";
|
|
4
6
|
const {
|
|
5
7
|
searchable = false,
|
|
6
8
|
autofocus = false,
|
|
@@ -8,7 +10,9 @@ const {
|
|
|
8
10
|
searchLoading = false,
|
|
9
11
|
showEmpty = false,
|
|
10
12
|
emptyLabel = "No matching options.",
|
|
11
|
-
maxHeightClass = "max-h-80"
|
|
13
|
+
maxHeightClass = "max-h-80",
|
|
14
|
+
size,
|
|
15
|
+
ui
|
|
12
16
|
} = defineProps({
|
|
13
17
|
searchable: { type: Boolean, required: false },
|
|
14
18
|
autofocus: { type: Boolean, required: false },
|
|
@@ -16,37 +20,63 @@ const {
|
|
|
16
20
|
searchLoading: { type: Boolean, required: false },
|
|
17
21
|
showEmpty: { type: Boolean, required: false },
|
|
18
22
|
emptyLabel: { type: String, required: false },
|
|
19
|
-
maxHeightClass: { type: String, required: false }
|
|
23
|
+
maxHeightClass: { type: String, required: false },
|
|
24
|
+
size: { type: String, required: false },
|
|
25
|
+
ui: { type: Object, required: false }
|
|
20
26
|
});
|
|
21
27
|
const searchQuery = defineModel("searchQuery", { type: String, ...{
|
|
22
28
|
default: ""
|
|
23
29
|
} });
|
|
30
|
+
const sizeClasses = computed(() => resolveFilterEditorSizeClasses(size));
|
|
24
31
|
</script>
|
|
25
32
|
|
|
26
33
|
<template>
|
|
27
|
-
<div class="bg-default">
|
|
28
|
-
<div
|
|
34
|
+
<div :class="mergeDataListUiClass('bg-default', void 0, ui?.editor)">
|
|
35
|
+
<div
|
|
36
|
+
v-if="searchable"
|
|
37
|
+
:class="
|
|
38
|
+
mergeDataListUiClass(
|
|
39
|
+
`w-full border-b border-default ${sizeClasses.searchHeader}`,
|
|
40
|
+
void 0,
|
|
41
|
+
ui?.searchHeader
|
|
42
|
+
)
|
|
43
|
+
"
|
|
44
|
+
>
|
|
29
45
|
<UInput
|
|
30
46
|
v-model="searchQuery"
|
|
31
47
|
icon="i-lucide-search"
|
|
32
48
|
:placeholder="searchPlaceholder"
|
|
33
49
|
class="w-full"
|
|
34
50
|
:loading="searchLoading"
|
|
35
|
-
variant="
|
|
51
|
+
variant="none"
|
|
36
52
|
:autofocus="autofocus"
|
|
53
|
+
:size="size"
|
|
54
|
+
:ui="{ root: ui?.search, base: ui?.searchInput }"
|
|
37
55
|
/>
|
|
38
56
|
</div>
|
|
39
57
|
|
|
40
58
|
<UScrollArea
|
|
41
|
-
style="max-height: 320px"
|
|
42
59
|
type="hover"
|
|
43
|
-
class="
|
|
44
|
-
|
|
45
|
-
|
|
60
|
+
:class="
|
|
61
|
+
mergeDataListUiClass(
|
|
62
|
+
`${sizeClasses.scrollArea} ${maxHeightClass}`,
|
|
63
|
+
void 0,
|
|
64
|
+
ui?.scrollArea
|
|
65
|
+
)
|
|
66
|
+
"
|
|
67
|
+
:ui="{
|
|
68
|
+
root: mergeDataListUiClass(maxHeightClass, void 0, ui?.scrollArea),
|
|
69
|
+
viewport: mergeDataListUiClass(maxHeightClass, void 0, ui?.scrollViewport)
|
|
70
|
+
}"
|
|
46
71
|
>
|
|
47
72
|
<slot />
|
|
48
73
|
|
|
49
|
-
<div
|
|
74
|
+
<div
|
|
75
|
+
v-if="showEmpty"
|
|
76
|
+
:class="
|
|
77
|
+
mergeDataListUiClass(`${sizeClasses.empty} text-center text-muted`, void 0, ui?.empty)
|
|
78
|
+
"
|
|
79
|
+
>
|
|
50
80
|
<slot name="empty">
|
|
51
81
|
{{ emptyLabel }}
|
|
52
82
|
</slot>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataListControlSize, DataListFilterEditorUi } from '../../../types/index.js';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
searchable?: boolean;
|
|
3
4
|
autofocus?: boolean;
|
|
@@ -6,6 +7,8 @@ type __VLS_Props = {
|
|
|
6
7
|
showEmpty?: boolean;
|
|
7
8
|
emptyLabel?: string;
|
|
8
9
|
maxHeightClass?: string;
|
|
10
|
+
size?: DataListControlSize;
|
|
11
|
+
ui?: DataListFilterEditorUi;
|
|
9
12
|
};
|
|
10
13
|
type __VLS_ModelProps = {
|
|
11
14
|
'searchQuery'?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
stageKey: string;
|
|
3
|
+
direction?: 'forward' | 'backward';
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_9: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_9) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
settled: () => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onSettled?: (() => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
direction: "forward" | "backward";
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
stageKey: { type: String, required: true },
|
|
4
|
+
direction: { type: String, required: false, default: "forward" }
|
|
5
|
+
});
|
|
6
|
+
const emit = defineEmits(["settled"]);
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div class="grid overflow-hidden">
|
|
11
|
+
<Transition :name="`filter-stage-${direction}`" @after-leave="emit('settled')">
|
|
12
|
+
<div :key="stageKey" class="col-start-1 row-start-1 min-w-0">
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
15
|
+
</Transition>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<style scoped>
|
|
20
|
+
.filter-stage-backward-enter-active,.filter-stage-forward-enter-active{transition:opacity .17s cubic-bezier(.22,1,.36,1),transform .17s cubic-bezier(.22,1,.36,1)}.filter-stage-backward-leave-active,.filter-stage-forward-leave-active{transition:opacity .11s cubic-bezier(.4,0,1,1),transform .11s cubic-bezier(.4,0,1,1)}.filter-stage-backward-leave-to,.filter-stage-forward-enter-from{opacity:0;transform:translateX(6px)}.filter-stage-backward-enter-from,.filter-stage-forward-leave-to{opacity:0;transform:translateX(-4px)}@media (prefers-reduced-motion:reduce){.filter-stage-backward-enter-active,.filter-stage-backward-leave-active,.filter-stage-forward-enter-active,.filter-stage-forward-leave-active{transition:opacity 80ms linear}.filter-stage-backward-enter-from,.filter-stage-backward-leave-to,.filter-stage-forward-enter-from,.filter-stage-forward-leave-to{transform:none}}
|
|
21
|
+
</style>
|