@bridge-ui/vue 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/skills/bridge-ui-components/SKILL.md +2 -2
- package/dist/Adapters/I18n/useI18nAdapter.d.ts +1 -1
- package/dist/Adapters/I18n/useI18nAdapter.js +4 -1
- package/dist/Components/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Accordion/accordion.types.d.ts +2 -2
- package/dist/Components/Alert/alertDefaultIcons.js +1 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +2 -2
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +150 -145
- package/dist/Components/BaseField/BaseField.vue_vue_type_script_setup_true_lang.js +33 -28
- package/dist/Components/BaseField/BaseFieldCorner.js +5 -0
- package/dist/Components/BaseField/BaseFieldCorner.vue.d.ts +17 -0
- package/dist/Components/BaseField/BaseFieldCorner.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/BaseField/baseField.types.d.ts +4 -2
- package/dist/Components/BaseField/composables/useBaseField.d.ts +1 -1
- package/dist/Components/BaseField/composables/useBaseField.js +11 -8
- package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Button/button.types.d.ts +6 -0
- package/dist/Components/Button/composables/useButton.d.ts +4 -1
- package/dist/Components/Button/composables/useButton.js +88 -69
- package/dist/Components/ButtonGroup/ButtonGroup.js +5 -0
- package/dist/Components/ButtonGroup/ButtonGroup.vue.d.ts +14 -0
- package/dist/Components/ButtonGroup/ButtonGroup.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/Components/ButtonGroup/buttonGroup.types.d.ts +93 -0
- package/dist/Components/ButtonGroup/buttonGroupInjectionKey.d.ts +7 -0
- package/dist/Components/ButtonGroup/buttonGroupInjectionKey.js +4 -0
- package/dist/Components/ButtonGroup/composables/useButtonGroup.d.ts +16 -0
- package/dist/Components/ButtonGroup/composables/useButtonGroup.js +66 -0
- package/dist/Components/ButtonGroup/index.d.ts +4 -0
- package/dist/Components/ButtonGroup/index.js +4 -0
- package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Checkbox/composables/useCheckbox.js +1 -1
- package/dist/Components/ColorField/composables/useColorField.d.ts +1 -1
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +180 -158
- package/dist/Components/DataTable/DataTableColumnsMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DataTable/DataTableFilterOptions.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DataTable/DataTablePagination.js +5 -0
- package/dist/Components/DataTable/DataTablePagination.vue.d.ts +24 -0
- package/dist/Components/DataTable/DataTablePagination.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/Components/DataTable/DataTableSortButton.vue.d.ts +5 -11
- package/dist/Components/DataTable/DataTableSortButton.vue_vue_type_script_setup_true_lang.js +22 -26
- package/dist/Components/DataTable/composables/useDataTable.d.ts +8 -6
- package/dist/Components/DataTable/composables/useDataTable.js +268 -263
- package/dist/Components/DataTable/composables/useDataTablePagination.d.ts +69 -0
- package/dist/Components/DataTable/composables/useDataTablePagination.js +130 -0
- package/dist/Components/DataTable/dataTable.types.d.ts +27 -12
- package/dist/Components/DataTable/dataTablePagination.types.d.ts +169 -0
- package/dist/Components/DataTable/index.d.ts +2 -1
- package/dist/Components/DateField/composables/useDateField.d.ts +1 -1
- package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +1 -1
- package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +1 -1
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +1 -1
- package/dist/Components/FieldOverlay/composables/useFieldOverlay.js +4 -1
- package/dist/Components/FormField/FilledFormField.vue.d.ts +7 -7
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +32 -27
- package/dist/Components/FormField/FormFieldCorner.js +5 -0
- package/dist/Components/FormField/FormFieldCorner.vue.d.ts +17 -0
- package/dist/Components/FormField/FormFieldCorner.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/FormField/NotchedFormField.vue.d.ts +7 -7
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/Components/FormField/OutlinedFormField.vue.d.ts +7 -7
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +32 -27
- package/dist/Components/FormField/StackedFormField.vue.d.ts +6 -6
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +34 -29
- package/dist/Components/FormField/UnderlinedFormField.vue.d.ts +7 -7
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +32 -27
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
- package/dist/Components/FormField/composables/useFormField.js +15 -9
- package/dist/Components/FormField/formField.types.d.ts +4 -2
- package/dist/Components/List/composables/useList.js +1 -1
- package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.d.ts +2 -2
- package/dist/Components/ListItem/composables/useListItem.js +101 -86
- package/dist/Components/ListSection/composables/useListSection.js +34 -31
- package/dist/Components/ListSection/listSection.types.d.ts +2 -1
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/Components/Listbox/collectComposedListboxOptions.d.ts +5 -0
- package/dist/Components/Listbox/collectComposedListboxOptions.js +27 -0
- package/dist/Components/NumberField/composables/useNumberField.d.ts +1 -1
- package/dist/Components/OtpField/composables/useOtpField.d.ts +1 -1
- package/dist/Components/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/Components/Pagination/composables/usePagination.d.ts +4 -2
- package/dist/Components/Pagination/composables/usePagination.js +125 -127
- package/dist/Components/Pagination/pagination.types.d.ts +5 -5
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +1 -1
- package/dist/Components/Radio/composables/useRadio.js +2 -1
- package/dist/Components/Select/composables/useSelect.d.ts +2 -2
- package/dist/Components/Select/composables/useSelect.js +104 -99
- package/dist/Components/Sidebar/composables/useSidebarListItem.js +29 -28
- package/dist/Components/Sidebar/composables/useSidebarTrigger.js +14 -14
- package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
- package/dist/Components/Slider/composables/useSlider.js +53 -53
- package/dist/Components/Snackbar/snackbarDefaultIcons.js +1 -0
- package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +13 -12
- package/dist/Components/Tabs/composables/useTabs.js +16 -10
- package/dist/Components/Tabs/tabs.types.d.ts +3 -3
- package/dist/Components/TextField/composables/useTextField.d.ts +1 -1
- package/dist/Components/Textarea/composables/useTextarea.d.ts +1 -1
- package/dist/Components/TimeField/composables/useTimeField.d.ts +1 -1
- package/dist/Components/TimePanel/composables/useTimePanel.js +106 -106
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +1 -1
- package/dist/augments.d.ts +5 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +150 -147
- package/docs/README.md +1 -0
- package/docs/components/Accordion.md +1 -1
- package/docs/components/Badge.md +2 -0
- package/docs/components/Button.md +5 -1
- package/docs/components/ButtonGroup.md +124 -0
- package/docs/components/DataTable.md +9 -11
- package/docs/components/Divider.md +1 -0
- package/docs/components/I18n.md +65 -24
- package/docs/components/Pagination.md +5 -3
- package/docs/components/Table.md +2 -2
- package/docs/components/Tabs.md +24 -6
- package/docs/components/ToggleGroup.md +1 -1
- package/docs/examples/i18n-dictionary.ts +31 -10
- package/docs/examples/i18n-vue-i18n.ts +7 -6
- package/docs/examples/icon-fontawesome.ts +4 -0
- package/docs/examples/icon-heroicons.ts +5 -1
- package/docs/examples/icon-lucide.ts +4 -0
- package/docs/examples/icon-phosphor.ts +4 -0
- package/docs/examples/icon-tabler.ts +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { BUTTON_GROUP_INJECTION_KEY as r } from "../buttonGroupInjectionKey.js";
|
|
3
|
+
import { computed as i, inject as a, provide as o, useAttrs as s } from "vue";
|
|
4
|
+
import { get as c } from "es-toolkit/compat";
|
|
5
|
+
import { buttonGroupOrientationProps as l } from "@bridge-ui/core/Tokens";
|
|
6
|
+
import { cn as u, mergeBridgeUILayeredClasses as d, splitComponentProps as f } from "@bridge-ui/core/Utils";
|
|
7
|
+
//#region src/Components/ButtonGroup/composables/useButtonGroup.ts
|
|
8
|
+
var p = [
|
|
9
|
+
"full",
|
|
10
|
+
"size",
|
|
11
|
+
"color",
|
|
12
|
+
"classes",
|
|
13
|
+
"density",
|
|
14
|
+
"rounded",
|
|
15
|
+
"variant",
|
|
16
|
+
"separator",
|
|
17
|
+
"customProps",
|
|
18
|
+
"orientation"
|
|
19
|
+
];
|
|
20
|
+
function m(m, h) {
|
|
21
|
+
let g = s(), _ = a(r, null), v = i(() => f({
|
|
22
|
+
props: {
|
|
23
|
+
...g,
|
|
24
|
+
...m
|
|
25
|
+
},
|
|
26
|
+
bridgeKeys: p
|
|
27
|
+
})), { merged: y, entry: b } = t({
|
|
28
|
+
libDefaults: h,
|
|
29
|
+
componentName: "ButtonGroup",
|
|
30
|
+
props: () => v.value.componentProps
|
|
31
|
+
}), x = n({
|
|
32
|
+
entry: b,
|
|
33
|
+
props: () => v.value.componentProps
|
|
34
|
+
}), S = i(() => y.value.customProps), C = i(() => {
|
|
35
|
+
let e = d(l, b.value?.tokens?.orientation);
|
|
36
|
+
return c(e, y.value.orientation);
|
|
37
|
+
}), w = i(() => {
|
|
38
|
+
let e = v.value.componentProps, t = b.value?.defaultProps, n = _?.value;
|
|
39
|
+
return {
|
|
40
|
+
size: e.size ?? t?.size ?? n?.size,
|
|
41
|
+
color: e.color ?? t?.color ?? n?.color,
|
|
42
|
+
density: e.density ?? t?.density ?? n?.density,
|
|
43
|
+
rounded: e.rounded ?? t?.rounded ?? n?.rounded,
|
|
44
|
+
variant: e.variant ?? t?.variant ?? n?.variant
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
return o(r, w), {
|
|
48
|
+
merged: y,
|
|
49
|
+
rootBind: i(() => {
|
|
50
|
+
let t = y.value.separator === !0;
|
|
51
|
+
return e(S.value?.root, v.value.inheritedAttrs, {
|
|
52
|
+
role: "group",
|
|
53
|
+
"data-slot": "button-group",
|
|
54
|
+
class: u({
|
|
55
|
+
[c(C.value, "root") ?? ""]: !0,
|
|
56
|
+
[c(C.value, "join") ?? ""]: !t,
|
|
57
|
+
[c(C.value, "separator") ?? ""]: t,
|
|
58
|
+
[x.value.root ?? ""]: !0,
|
|
59
|
+
"w-full [&>*]:flex-1": y.value.full === !0
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
})
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { m as useButtonGroup };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { ButtonGroupClasses, ButtonGroupCustomProps, ButtonGroupOrientationOverrides, ButtonGroupOwnProps, ButtonGroupProps, ButtonGroupSlots, } from './buttonGroup.types';
|
|
2
|
+
export { default as ButtonGroup } from './ButtonGroup.vue';
|
|
3
|
+
export { BUTTON_GROUP_INJECTION_KEY, type ButtonGroupContextValue, } from './buttonGroupInjectionKey';
|
|
4
|
+
export { useButtonGroup } from './composables/useButtonGroup';
|
|
@@ -74,7 +74,7 @@ var ee = { class: "flex w-full min-w-0 items-center gap-x-2" }, C = {
|
|
|
74
74
|
size: "sm",
|
|
75
75
|
icon: "chevronLeft"
|
|
76
76
|
}, y(B)), null, 16)], 16),
|
|
77
|
-
c("button", m(f(y(K))), [...d[1] ||= [c("span", { class: "size-2 rounded-full bg-
|
|
77
|
+
c("button", m(f(y(K))), [...d[1] ||= [c("span", { class: "size-2 rounded-full bg-dark-600 dark:bg-dark-300" }, null, -1)]], 16),
|
|
78
78
|
c("button", m(f(y(G))), [u(y(e), p({
|
|
79
79
|
size: "sm",
|
|
80
80
|
icon: "chevronRight"
|
|
@@ -74,7 +74,7 @@ var ie = {
|
|
|
74
74
|
size: "sm",
|
|
75
75
|
icon: "chevronLeft"
|
|
76
76
|
}, v(R)), null, 16)], 16),
|
|
77
|
-
o("button", p(u(v(G))), [...l[0] ||= [o("span", { class: "size-2 rounded-full bg-
|
|
77
|
+
o("button", p(u(v(G))), [...l[0] ||= [o("span", { class: "size-2 rounded-full bg-dark-600 dark:bg-dark-300" }, null, -1)]], 16),
|
|
78
78
|
o("button", p(u(v(W))), [c(v(e), d({
|
|
79
79
|
size: "sm",
|
|
80
80
|
icon: "chevronRight"
|
|
@@ -94,7 +94,7 @@ var ie = {
|
|
|
94
94
|
size: "sm",
|
|
95
95
|
icon: "chevronLeft"
|
|
96
96
|
}, v(R)), null, 16)], 16),
|
|
97
|
-
o("button", p(u(v(G))), [...l[1] ||= [o("span", { class: "size-2 rounded-full bg-
|
|
97
|
+
o("button", p(u(v(G))), [...l[1] ||= [o("span", { class: "size-2 rounded-full bg-dark-600 dark:bg-dark-300" }, null, -1)]], 16),
|
|
98
98
|
o("button", p(u(v(W))), [c(v(e), d({
|
|
99
99
|
size: "sm",
|
|
100
100
|
icon: "chevronRight"
|
|
@@ -442,7 +442,6 @@ export declare function useColorField(props: ColorFieldOwnProps, model: Ref<null
|
|
|
442
442
|
isNotched: import('vue').ComputedRef<boolean>;
|
|
443
443
|
isStacked: import('vue').ComputedRef<boolean>;
|
|
444
444
|
startBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
445
|
-
cornerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
446
445
|
headerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
447
446
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
448
447
|
isReadonly: import('vue').ComputedRef<boolean>;
|
|
@@ -460,6 +459,7 @@ export declare function useColorField(props: ColorFieldOwnProps, model: Ref<null
|
|
|
460
459
|
ariaDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
461
460
|
descriptionBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
462
461
|
stackedBodyBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, {}>>;
|
|
462
|
+
fieldCornerProps: import('vue').ComputedRef<import('../../Label').LabelProps>;
|
|
463
463
|
hasInsetLabelRow: import('vue').ComputedRef<boolean>;
|
|
464
464
|
insetLabelRowBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
465
465
|
stackedInputRowBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, {}>>;
|
|
@@ -3,12 +3,12 @@ import { hasNamedSlot as t } from "../../Utils/slotOrProp.js";
|
|
|
3
3
|
import n from "../Icon/Icon.js";
|
|
4
4
|
import ee from "../Progress/Progress.js";
|
|
5
5
|
import te from "../EmptyState/EmptyState.js";
|
|
6
|
-
import ne from "../
|
|
7
|
-
import re from "../Select/Select.js";
|
|
6
|
+
import ne from "../Select/Select.js";
|
|
8
7
|
import { useDataTable as r } from "./composables/useDataTable.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
8
|
+
import re from "./DataTableCellContent.js";
|
|
9
|
+
import ie from "./DataTableColumnsMenu.js";
|
|
10
|
+
import ae from "./DataTableFilterMenu.js";
|
|
11
|
+
import oe from "./DataTablePagination.js";
|
|
12
12
|
import se from "./DataTableSearch.js";
|
|
13
13
|
import i from "./DataTableSelection.js";
|
|
14
14
|
import ce from "./DataTableSortButton.js";
|
|
@@ -19,16 +19,26 @@ import de from "../Table/TableFooter.js";
|
|
|
19
19
|
import fe from "../Table/TableHead.js";
|
|
20
20
|
import pe from "../Table/TableHeader.js";
|
|
21
21
|
import o from "../Table/TableRow.js";
|
|
22
|
-
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, guardReactiveProps as h, mergeModels as g, mergeProps as _, normalizeClass as v, normalizeProps as y, openBlock as b, renderList as x, renderSlot as S, toDisplayString as
|
|
23
|
-
import { cn as
|
|
22
|
+
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as me, createVNode as p, defineComponent as m, guardReactiveProps as h, mergeModels as g, mergeProps as _, normalizeClass as v, normalizeProps as y, openBlock as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useId as he, useModel as T, useSlots as ge, withCtx as E } from "vue";
|
|
23
|
+
import { cn as D } from "@bridge-ui/core/Utils";
|
|
24
24
|
//#region src/Components/DataTable/DataTable.vue?vue&type=script&setup=true&lang.ts
|
|
25
25
|
var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center gap-2" }, ye = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "inline-flex items-center rounded-lg border border-dark-200 bg-white p-0.5 dark:border-dark-700 dark:bg-dark-900"
|
|
28
|
-
}, be = { class: "relative" },
|
|
28
|
+
}, be = { class: "relative" }, xe = {
|
|
29
29
|
key: 1,
|
|
30
30
|
class: "flex w-full min-w-0 items-center gap-1.5 leading-none"
|
|
31
|
-
}, O =
|
|
31
|
+
}, O = { class: "min-w-0 truncate leading-none" }, k = [
|
|
32
|
+
"aria-expanded",
|
|
33
|
+
"aria-label",
|
|
34
|
+
"onClick"
|
|
35
|
+
], A = ["aria-hidden"], j = { class: "min-h-0 overflow-hidden" }, M = { class: "p-3" }, Se = ["aria-hidden"], Ce = ["aria-label"], we = { class: "flex shrink-0 items-center gap-2" }, Te = { class: "text-sm whitespace-nowrap" }, Ee = {
|
|
36
|
+
key: 2,
|
|
37
|
+
class: "flex shrink-0 items-center gap-3"
|
|
38
|
+
}, De = {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "text-sm font-medium whitespace-nowrap"
|
|
41
|
+
}, N = /*@__PURE__*/ m({
|
|
32
42
|
inheritAttrs: !1,
|
|
33
43
|
__name: "DataTable",
|
|
34
44
|
props: /*@__PURE__*/ g({
|
|
@@ -103,7 +113,7 @@ var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center
|
|
|
103
113
|
"update:columnSearch"
|
|
104
114
|
],
|
|
105
115
|
setup(m) {
|
|
106
|
-
let g = m,
|
|
116
|
+
let g = m, N = ge(), P = e(), F = T(m, "page"), I = T(m, "perPage"), L = T(m, "search"), Oe = T(m, "expanded"), ke = T(m, "selection"), Ae = T(m, "filters"), je = T(m, "sorting"), Me = T(m, "hiddenColumns"), Ne = T(m, "columnSearch"), { merged: R, rowViews: Pe, rootBind: Fe, emptyBind: Ie, showEmpty: z, frameBind: Le, showPager: Re, tableProps: ze, footerBind: Be, loadingBar: B, showSearch: Ve, getHeadBind: He, headerViews: Ue, loadingBind: We, onToggleRow: Ge, toolbarBind: Ke, getCellBind: V, columnCount: H, showPerPage: qe, showToolbar: Je, selectedBind: Ye, showSelected: Xe, getHeadAlign: Ze, getCellAlign: U, onTogglePage: Qe, onToggleSort: $e, summaryCells: W, showFooterBar: et, expandEnabled: tt, loadingBarBind: nt, paginationBind: rt, selectAllState: G, onChangeSearch: it, onToggleExpand: at, visibilityItems: ot, perPageSlotProps: K, selectedSlotProps: q, resolvedPageCount: J, selectionMultiple: Y, visibilityEnabled: st, paginationSlotProps: X, onCommitColumnFilter: ct, onHiddenColumnsChange: lt } = r(g, {
|
|
107
117
|
size: "md",
|
|
108
118
|
full: !0,
|
|
109
119
|
rounded: "lg",
|
|
@@ -117,18 +127,24 @@ var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center
|
|
|
117
127
|
selectionMode: "multiple",
|
|
118
128
|
loadingVariant: "overlay"
|
|
119
129
|
}, {
|
|
120
|
-
page:
|
|
130
|
+
page: F,
|
|
121
131
|
search: L,
|
|
122
|
-
perPage:
|
|
123
|
-
filters:
|
|
124
|
-
sorting:
|
|
125
|
-
expanded:
|
|
126
|
-
selection:
|
|
127
|
-
columnSearch:
|
|
128
|
-
hiddenColumns:
|
|
129
|
-
}), Z = c(() => R.value.size === "lg" ? "md" : "sm")
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
perPage: I,
|
|
133
|
+
filters: Ae,
|
|
134
|
+
sorting: je,
|
|
135
|
+
expanded: Oe,
|
|
136
|
+
selection: ke,
|
|
137
|
+
columnSearch: Ne,
|
|
138
|
+
hiddenColumns: Me
|
|
139
|
+
}), Z = c(() => R.value.size === "lg" ? "md" : "sm"), ut = c(() => P("{{selected}} of {{total}} row(s) selected.", q.value.selectedCount, {
|
|
140
|
+
total: q.value.totalCount,
|
|
141
|
+
selected: q.value.selectedCount
|
|
142
|
+
})), dt = c(() => P("Page {{page}} of {{count}}", {
|
|
143
|
+
page: X.value.page,
|
|
144
|
+
count: X.value.count
|
|
145
|
+
}));
|
|
146
|
+
function ft(e, t) {
|
|
147
|
+
let n = N[`item.${t.id}`] ?? N.item;
|
|
132
148
|
return n ? n({
|
|
133
149
|
id: t.id,
|
|
134
150
|
row: e.original,
|
|
@@ -136,14 +152,19 @@ var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center
|
|
|
136
152
|
}) : t.content;
|
|
137
153
|
}
|
|
138
154
|
let Q = c({
|
|
139
|
-
get: () =>
|
|
155
|
+
get: () => F.value ?? 1,
|
|
140
156
|
set: (e) => {
|
|
141
|
-
|
|
157
|
+
F.value = e;
|
|
142
158
|
}
|
|
143
|
-
}),
|
|
159
|
+
}), pt = c(() => K.value.options.map((e) => ({
|
|
144
160
|
value: e,
|
|
145
161
|
label: String(e)
|
|
146
|
-
})))
|
|
162
|
+
})));
|
|
163
|
+
function mt(e) {
|
|
164
|
+
let t = Number(e);
|
|
165
|
+
!Number.isFinite(t) || t < 1 || K.value.onPerPageChange(t);
|
|
166
|
+
}
|
|
167
|
+
let ht = c(() => {
|
|
147
168
|
let e = R.value.customProps?.perPage?.customProps;
|
|
148
169
|
return {
|
|
149
170
|
...e,
|
|
@@ -159,13 +180,13 @@ var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center
|
|
|
159
180
|
}
|
|
160
181
|
}
|
|
161
182
|
};
|
|
162
|
-
}),
|
|
163
|
-
return (e, r) => (b(), d("div", y(h(
|
|
164
|
-
|
|
165
|
-
items:
|
|
166
|
-
overlay:
|
|
167
|
-
onChange:
|
|
168
|
-
"show-footer":
|
|
183
|
+
}), gt = he(), $ = (e) => e.node ?? null;
|
|
184
|
+
return (e, r) => (b(), d("div", y(h(w(Fe))), [w(Je) ? (b(), d("div", y(_({ key: 0 }, w(Ke))), [f("div", _e, [S(e.$slots, "toolbar")]), f("div", ve, [
|
|
185
|
+
w(st) ? (b(), d("div", ye, [p(ie, {
|
|
186
|
+
items: w(ot),
|
|
187
|
+
overlay: w(R).columnsOverlay,
|
|
188
|
+
onChange: w(lt),
|
|
189
|
+
"show-footer": w(R).columnsShowFooter
|
|
169
190
|
}, null, 8, [
|
|
170
191
|
"items",
|
|
171
192
|
"overlay",
|
|
@@ -173,120 +194,119 @@ var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center
|
|
|
173
194
|
"show-footer"
|
|
174
195
|
])])) : u("", !0),
|
|
175
196
|
S(e.$slots, "toolbarActions"),
|
|
176
|
-
|
|
197
|
+
w(Ve) ? S(e.$slots, "search", {}, () => [p(se, {
|
|
177
198
|
"model-value": L.value ?? "",
|
|
178
|
-
"onUpdate:modelValue":
|
|
179
|
-
"field-props":
|
|
199
|
+
"onUpdate:modelValue": w(it),
|
|
200
|
+
"field-props": w(R).customProps?.search
|
|
180
201
|
}, null, 8, [
|
|
181
202
|
"model-value",
|
|
182
203
|
"onUpdate:modelValue",
|
|
183
204
|
"field-props"
|
|
184
205
|
])], void 0, 1) : u("", !0)
|
|
185
|
-
])], 16)) : u("", !0), f("div", y(h(
|
|
186
|
-
f("div", be, [p(
|
|
187
|
-
default:
|
|
188
|
-
p(
|
|
189
|
-
default:
|
|
190
|
-
default:
|
|
206
|
+
])], 16)) : u("", !0), f("div", y(h(w(Le))), [
|
|
207
|
+
f("div", be, [p(w(le), y(h(w(ze))), {
|
|
208
|
+
default: E(() => [
|
|
209
|
+
p(w(pe), y(h(w(R).customProps?.header)), {
|
|
210
|
+
default: E(() => [p(w(o), y(h(w(R).customProps?.row)), {
|
|
211
|
+
default: E(() => [(b(!0), d(s, null, x(w(Ue), (e) => (b(), l(w(fe), _({
|
|
191
212
|
key: e.id,
|
|
192
|
-
align:
|
|
193
|
-
}, { ref_for: !0 },
|
|
194
|
-
default:
|
|
213
|
+
align: w(Ze)(e)
|
|
214
|
+
}, { ref_for: !0 }, w(He)(e)), {
|
|
215
|
+
default: E(() => [e.isSelection && w(Y) ? (b(), l(i, {
|
|
195
216
|
key: 0,
|
|
196
217
|
kind: "page",
|
|
197
218
|
size: Z.value,
|
|
198
|
-
onChange:
|
|
199
|
-
checked:
|
|
200
|
-
indeterminate:
|
|
201
|
-
"checkbox-props":
|
|
219
|
+
onChange: w(Qe),
|
|
220
|
+
checked: w(G).checked,
|
|
221
|
+
indeterminate: w(G).indeterminate,
|
|
222
|
+
"checkbox-props": w(R).customProps?.checkbox
|
|
202
223
|
}, null, 8, [
|
|
203
224
|
"size",
|
|
204
225
|
"onChange",
|
|
205
226
|
"checked",
|
|
206
227
|
"indeterminate",
|
|
207
228
|
"checkbox-props"
|
|
208
|
-
])) : !e.isSelection && !e.isExpand ? (b(), d("div",
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"
|
|
237
|
-
|
|
238
|
-
])) : u("", !0)])) : u("", !0)]),
|
|
229
|
+
])) : !e.isSelection && !e.isExpand ? (b(), d("div", xe, [
|
|
230
|
+
f("span", O, [p($, { node: e.header }, null, 8, ["node"])]),
|
|
231
|
+
e.sortable ? (b(), l(ce, {
|
|
232
|
+
key: 0,
|
|
233
|
+
sort: e.ariaSort,
|
|
234
|
+
onClick: (t) => w($e)(e.id)
|
|
235
|
+
}, null, 8, ["sort", "onClick"])) : u("", !0),
|
|
236
|
+
e.filterable ? (b(), l(ae, {
|
|
237
|
+
key: 1,
|
|
238
|
+
"column-id": e.id,
|
|
239
|
+
active: e.filterActive,
|
|
240
|
+
values: e.filterValues,
|
|
241
|
+
overlay: w(R).filterOverlay,
|
|
242
|
+
options: e.filterOptions,
|
|
243
|
+
searchable: e.searchable,
|
|
244
|
+
multiple: e.filterMultiple,
|
|
245
|
+
"search-value": e.searchQuery,
|
|
246
|
+
onApply: (t, n) => w(ct)(e.id, t, n)
|
|
247
|
+
}, null, 8, [
|
|
248
|
+
"column-id",
|
|
249
|
+
"active",
|
|
250
|
+
"values",
|
|
251
|
+
"overlay",
|
|
252
|
+
"options",
|
|
253
|
+
"searchable",
|
|
254
|
+
"multiple",
|
|
255
|
+
"search-value",
|
|
256
|
+
"onApply"
|
|
257
|
+
])) : u("", !0)
|
|
258
|
+
])) : u("", !0)]),
|
|
239
259
|
_: 2
|
|
240
260
|
}, 1040, ["align"]))), 128))]),
|
|
241
261
|
_: 1
|
|
242
|
-
}, 16),
|
|
262
|
+
}, 16), w(R).loading && w(B) ? (b(), l(w(o), {
|
|
243
263
|
key: 0,
|
|
244
264
|
classes: { root: "h-0" }
|
|
245
265
|
}, {
|
|
246
|
-
default:
|
|
247
|
-
colspan:
|
|
266
|
+
default: E(() => [p(w(a), {
|
|
267
|
+
colspan: w(H),
|
|
248
268
|
classes: { root: "relative h-0 border-0 p-0 after:hidden" }
|
|
249
269
|
}, {
|
|
250
|
-
default:
|
|
270
|
+
default: E(() => [f("div", y(h(w(nt))), [S(e.$slots, "loading", {}, () => [p(w(ee), _({
|
|
251
271
|
size: "xs",
|
|
252
272
|
rounded: "none"
|
|
253
|
-
},
|
|
273
|
+
}, w(R).customProps?.progress), null, 16)])], 16)]),
|
|
254
274
|
_: 3
|
|
255
275
|
}, 8, ["colspan"])]),
|
|
256
276
|
_: 3
|
|
257
277
|
})) : u("", !0)]),
|
|
258
278
|
_: 3
|
|
259
279
|
}, 16),
|
|
260
|
-
p(
|
|
261
|
-
default:
|
|
262
|
-
default:
|
|
280
|
+
p(w(ue), y(h(w(R).customProps?.body)), {
|
|
281
|
+
default: E(() => [w(z) ? (b(), l(w(o), { key: 0 }, {
|
|
282
|
+
default: E(() => [p(w(a), {
|
|
263
283
|
align: "center",
|
|
264
|
-
colspan:
|
|
284
|
+
colspan: w(H)
|
|
265
285
|
}, {
|
|
266
|
-
default:
|
|
286
|
+
default: E(() => [f("div", y(h(w(Ie))), [S(e.$slots, "empty", {}, () => [p(w(te), {
|
|
267
287
|
icon: "inbox",
|
|
268
|
-
size:
|
|
269
|
-
title:
|
|
288
|
+
size: w(R).size,
|
|
289
|
+
title: w(P)("No data")
|
|
270
290
|
}, null, 8, ["size", "title"])])], 16)]),
|
|
271
291
|
_: 3
|
|
272
292
|
}, 8, ["colspan"])]),
|
|
273
293
|
_: 3
|
|
274
|
-
})) : u("", !0),
|
|
275
|
-
default:
|
|
294
|
+
})) : u("", !0), w(z) ? u("", !0) : (b(!0), d(s, { key: 1 }, x(w(Pe), (t) => (b(), d(s, { key: t.id }, [p(w(o), _({ ref_for: !0 }, w(R).customProps?.row), {
|
|
295
|
+
default: E(() => [(b(!0), d(s, null, x(t.cells, (e) => (b(), l(w(a), _({
|
|
276
296
|
key: e.id,
|
|
277
|
-
align:
|
|
278
|
-
}, { ref_for: !0 },
|
|
279
|
-
default:
|
|
297
|
+
align: w(U)(e)
|
|
298
|
+
}, { ref_for: !0 }, w(V)(e)), {
|
|
299
|
+
default: E(() => [e.isSelection ? (b(), l(i, {
|
|
280
300
|
key: 0,
|
|
281
301
|
kind: "row",
|
|
282
302
|
value: t.id,
|
|
283
303
|
size: Z.value,
|
|
284
|
-
name:
|
|
304
|
+
name: w(gt),
|
|
285
305
|
checked: t.selected,
|
|
286
|
-
multiple:
|
|
287
|
-
"radio-props":
|
|
288
|
-
"checkbox-props":
|
|
289
|
-
onChange: (e) =>
|
|
306
|
+
multiple: w(Y),
|
|
307
|
+
"radio-props": w(R).customProps?.radio,
|
|
308
|
+
"checkbox-props": w(R).customProps?.checkbox,
|
|
309
|
+
onChange: (e) => w(Ge)(t.id, e)
|
|
290
310
|
}, null, 8, [
|
|
291
311
|
"value",
|
|
292
312
|
"size",
|
|
@@ -299,53 +319,53 @@ var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center
|
|
|
299
319
|
])) : e.isExpand ? (b(), d("button", {
|
|
300
320
|
key: 1,
|
|
301
321
|
type: "button",
|
|
302
|
-
"aria-label": "Expand row",
|
|
303
322
|
"aria-expanded": t.expanded,
|
|
304
|
-
|
|
323
|
+
"aria-label": w(P)("Expand row"),
|
|
324
|
+
onClick: (e) => w(at)(t.id, !t.expanded),
|
|
305
325
|
class: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm leading-none hover:bg-dark-500/10 dark:hover:bg-dark-500/15"
|
|
306
|
-
}, [f("span", { class: v([{ "rotate-90": t.expanded }, "inline-flex transition-transform duration-200 motion-reduce:transition-none"]) }, [p(
|
|
326
|
+
}, [f("span", { class: v([{ "rotate-90": t.expanded }, "inline-flex transition-transform duration-200 motion-reduce:transition-none"]) }, [p(w(n), {
|
|
307
327
|
size: "sm",
|
|
308
328
|
icon: "chevronRight"
|
|
309
|
-
})], 2)], 8,
|
|
329
|
+
})], 2)], 8, k)) : (b(), l(re, {
|
|
310
330
|
key: 2,
|
|
311
331
|
tooltip: e.tooltip,
|
|
312
332
|
ellipsis: e.ellipsis
|
|
313
333
|
}, {
|
|
314
|
-
default:
|
|
334
|
+
default: E(() => [p($, { node: ft(t, e) }, null, 8, ["node"])]),
|
|
315
335
|
_: 2
|
|
316
336
|
}, 1032, ["tooltip", "ellipsis"]))]),
|
|
317
337
|
_: 2
|
|
318
338
|
}, 1040, ["align"]))), 128))]),
|
|
319
339
|
_: 2
|
|
320
|
-
}, 1040),
|
|
321
|
-
default:
|
|
322
|
-
colspan:
|
|
323
|
-
classes: { root:
|
|
340
|
+
}, 1040), w(tt) ? (b(), l(w(o), { key: 0 }, {
|
|
341
|
+
default: E(() => [p(w(a), {
|
|
342
|
+
colspan: w(H),
|
|
343
|
+
classes: { root: w(D)({
|
|
324
344
|
"p-0": !0,
|
|
325
345
|
"border-0": !t.expanded
|
|
326
346
|
}) }
|
|
327
347
|
}, {
|
|
328
|
-
default:
|
|
348
|
+
default: E(() => [f("div", {
|
|
329
349
|
"aria-hidden": !t.expanded,
|
|
330
|
-
class: v(
|
|
350
|
+
class: v(w(D)({
|
|
331
351
|
"grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none": !0,
|
|
332
352
|
"grid-rows-[1fr]": t.expanded,
|
|
333
353
|
"grid-rows-[0fr]": !t.expanded
|
|
334
354
|
}))
|
|
335
|
-
}, [f("div",
|
|
355
|
+
}, [f("div", j, [f("div", M, [S(e.$slots, "expanded", { row: t.original })])])], 10, A)]),
|
|
336
356
|
_: 2
|
|
337
357
|
}, 1032, ["colspan", "classes"])]),
|
|
338
358
|
_: 2
|
|
339
359
|
}, 1024)) : u("", !0)], 64))), 128))]),
|
|
340
360
|
_: 3
|
|
341
361
|
}, 16),
|
|
342
|
-
|
|
343
|
-
default:
|
|
344
|
-
default:
|
|
362
|
+
w(W) ? (b(), l(w(de), { key: 0 }, {
|
|
363
|
+
default: E(() => [p(w(o), y(h(w(R).customProps?.row)), {
|
|
364
|
+
default: E(() => [(b(!0), d(s, null, x(w(W), (e) => (b(), l(w(a), _({
|
|
345
365
|
key: e.id,
|
|
346
|
-
align:
|
|
347
|
-
}, { ref_for: !0 },
|
|
348
|
-
default:
|
|
366
|
+
align: w(U)(e)
|
|
367
|
+
}, { ref_for: !0 }, w(V)(e)), {
|
|
368
|
+
default: E(() => [p($, { node: e.content }, null, 8, ["node"])]),
|
|
349
369
|
_: 2
|
|
350
370
|
}, 1040, ["align"]))), 128))]),
|
|
351
371
|
_: 1
|
|
@@ -354,48 +374,50 @@ var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center
|
|
|
354
374
|
})) : u("", !0)
|
|
355
375
|
]),
|
|
356
376
|
_: 3
|
|
357
|
-
}, 16),
|
|
377
|
+
}, 16), w(R).loading ? (b(), d("div", _({ key: 0 }, w(We), { "aria-hidden": w(B) || void 0 }), [w(B) ? u("", !0) : S(e.$slots, "loading", {}, () => [f("span", {
|
|
358
378
|
role: "status",
|
|
359
|
-
"aria-label": "Loading",
|
|
379
|
+
"aria-label": w(P)("Loading"),
|
|
360
380
|
class: "relative inline-block size-5 animate-spin motion-reduce:animate-none"
|
|
361
|
-
}, [
|
|
362
|
-
f("span", { class: "absolute inset-s-0 top-0 size-2 rounded-full bg-primary-500 opacity-30 dark:bg-primary-400" }),
|
|
363
|
-
f("span", { class: "absolute inset-e-0 top-0 size-2 rounded-full bg-primary-500 opacity-50 dark:bg-primary-400" }),
|
|
364
|
-
f("span", { class: "absolute inset-e-0 bottom-0 size-2 rounded-full bg-primary-500 dark:bg-primary-400" }),
|
|
365
|
-
f("span", { class: "absolute inset-s-0 bottom-0 size-2 rounded-full bg-primary-500 opacity-70 dark:bg-primary-400" })
|
|
366
|
-
],
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
381
|
+
}, [...r[1] ||= [
|
|
382
|
+
f("span", { class: "absolute inset-s-0 top-0 size-2 rounded-full bg-primary-500 opacity-30 dark:bg-primary-400" }, null, -1),
|
|
383
|
+
f("span", { class: "absolute inset-e-0 top-0 size-2 rounded-full bg-primary-500 opacity-50 dark:bg-primary-400" }, null, -1),
|
|
384
|
+
f("span", { class: "absolute inset-e-0 bottom-0 size-2 rounded-full bg-primary-500 dark:bg-primary-400" }, null, -1),
|
|
385
|
+
f("span", { class: "absolute inset-s-0 bottom-0 size-2 rounded-full bg-primary-500 opacity-70 dark:bg-primary-400" }, null, -1)
|
|
386
|
+
]], 8, Ce)], void 0, 0)], 16, Se)) : u("", !0)]),
|
|
387
|
+
w(t)(w(N), "footer") ? (b(), d("div", y(_({ key: 0 }, w(Be))), [S(e.$slots, "footer")], 16)) : u("", !0),
|
|
388
|
+
w(et) ? (b(), d("div", y(_({ key: 1 }, w(rt))), [
|
|
389
|
+
w(Xe) ? (b(), d("div", y(_({ key: 0 }, w(Ye))), [S(e.$slots, "selected", y(h(w(q))), () => [me(C(ut.value), 1)])], 16)) : u("", !0),
|
|
390
|
+
w(qe) ? S(e.$slots, "perPage", y(h(w(K))), () => [f("div", we, [f("span", Te, C(w(P)("Rows per page")), 1), p(w(ne), _({ size: "sm" }, w(R).customProps?.perPage, {
|
|
391
|
+
overlay: "menu",
|
|
392
|
+
clearable: !1,
|
|
393
|
+
"hide-error-message": "",
|
|
394
|
+
options: pt.value,
|
|
395
|
+
"custom-props": ht.value,
|
|
396
|
+
"model-value": w(K).perPage,
|
|
397
|
+
"onUpdate:modelValue": mt,
|
|
398
|
+
"aria-label": w(P)("Rows per page"),
|
|
399
|
+
classes: {
|
|
400
|
+
...w(R).customProps?.perPage?.classes,
|
|
401
|
+
root: w(D)("w-20", w(R).customProps?.perPage?.classes?.root)
|
|
402
|
+
}
|
|
403
|
+
}), null, 16, [
|
|
404
|
+
"options",
|
|
405
|
+
"custom-props",
|
|
406
|
+
"model-value",
|
|
407
|
+
"aria-label",
|
|
408
|
+
"classes"
|
|
409
|
+
])])], void 0, 1) : u("", !0),
|
|
410
|
+
w(Re) ? (b(), d("div", Ee, [w(J) !== void 0 && !w(t)(w(N), "pagination") ? (b(), d("span", De, C(dt.value), 1)) : u("", !0), S(e.$slots, "pagination", y(h(w(X))), () => [w(J) === void 0 ? u("", !0) : (b(), l(oe, _({
|
|
411
|
+
key: 0,
|
|
412
|
+
size: "sm"
|
|
413
|
+
}, w(R).customProps?.pagination, {
|
|
414
|
+
modelValue: Q.value,
|
|
415
|
+
"onUpdate:modelValue": r[0] ||= (e) => Q.value = e,
|
|
416
|
+
count: w(J)
|
|
417
|
+
}), null, 16, ["modelValue", "count"]))])])) : u("", !0)
|
|
418
|
+
], 16)) : u("", !0)
|
|
397
419
|
], 16)], 16));
|
|
398
420
|
}
|
|
399
421
|
});
|
|
400
422
|
//#endregion
|
|
401
|
-
export {
|
|
423
|
+
export { N as default };
|