@gears-frontx/ui-kit 0.4.3 → 0.4.5
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/README.md +4 -1
- package/dist/chunks/data-grid.DYrZEU-F.css +1 -0
- package/dist/chunks/debounce.js +17 -0
- package/dist/chunks/debounce.js.map +1 -0
- package/dist/chunks/dialog.CIR9bQoU.css +1 -0
- package/dist/chunks/dropdown-menu.DT1_JLqL.css +1 -0
- package/dist/chunks/empty.Cfg5lE0n.css +1 -0
- package/dist/chunks/filters.DcFdZpNG.css +1 -0
- package/dist/chunks/hooked.js +52 -0
- package/dist/chunks/hooked.js.map +1 -0
- package/dist/chunks/messages.js +18 -3
- package/dist/chunks/messages.js.map +1 -1
- package/dist/chunks/pagination.DPVITj_D.css +1 -0
- package/dist/chunks/{select.BFwI5rhI.css → select.C3sLDoZI.css} +1 -1
- package/dist/chunks/sidebar.Dw_e0Jqw.css +1 -0
- package/dist/chunks/tabs.BqhiMRUP.css +1 -0
- package/dist/components/data-grid/components/filter-chip.d.ts +21 -0
- package/dist/components/data-grid/components/filter-chip.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-control-area.d.ts +9 -0
- package/dist/components/data-grid/components/filter-control-area.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-options-search-input.d.ts +11 -0
- package/dist/components/data-grid/components/filter-options-search-input.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-popover-content.d.ts +8 -0
- package/dist/components/data-grid/components/filter-popover-content.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-reset-button.d.ts +8 -0
- package/dist/components/data-grid/components/filter-reset-button.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts +8 -0
- package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts.map +1 -0
- package/dist/components/data-grid/messages.d.ts +15 -0
- package/dist/components/data-grid/messages.d.ts.map +1 -1
- package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts +9 -0
- package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts +9 -0
- package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts +17 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts +16 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts +19 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts +16 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/entities.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/entities.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts +10 -0
- package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts +14 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts +11 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts +10 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts +8 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts +13 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts +8 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/filters-types.d.ts +141 -0
- package/dist/components/data-grid/plugins/filters/filters-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/public.d.ts +11 -0
- package/dist/components/data-grid/plugins/filters/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-actions.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-actions.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-content.d.ts +3 -0
- package/dist/components/data-grid/tree/components/tree-content.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts +9 -0
- package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-left-slot.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-left-slot.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-list-item.d.ts +10 -0
- package/dist/components/data-grid/tree/components/tree-list-item.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-main.d.ts +3 -0
- package/dist/components/data-grid/tree/components/tree-main.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-content.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-content.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-nodes.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-nodes.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-placeholder.d.ts +6 -0
- package/dist/components/data-grid/tree/components/tree-placeholder.d.ts.map +1 -0
- package/dist/components/data-grid/tree/create-tree.d.ts +5 -0
- package/dist/components/data-grid/tree/create-tree.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/core/tree-context.d.ts +21 -0
- package/dist/components/data-grid/tree/services/core/tree-context.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/focus-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/focus/focus-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/focus-types.d.ts +25 -0
- package/dist/components/data-grid/tree/services/focus/focus-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts +27 -0
- package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts +8 -0
- package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/hooked/hooked.d.ts +3 -0
- package/dist/components/data-grid/tree/services/hooked/hooked.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts +2 -0
- package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/layout/layout-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/layout/layout-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/layout/layout-types.d.ts +124 -0
- package/dist/components/data-grid/tree/services/layout/layout-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts +50 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts +43 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/settings/settings-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/settings/settings-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/settings/settings-types.d.ts +73 -0
- package/dist/components/data-grid/tree/services/settings/settings-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/tree-types.d.ts +44 -0
- package/dist/components/data-grid/tree/tree-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/tree.d.ts +4 -0
- package/dist/components/data-grid/tree/tree.d.ts.map +1 -0
- package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts +89 -0
- package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree-structure/tree-structure.d.ts +19 -0
- package/dist/components/data-grid/tree-structure/tree-structure.d.ts.map +1 -0
- package/dist/components/data-grid/utils/components-stack.d.ts +12 -0
- package/dist/components/data-grid/utils/components-stack.d.ts.map +1 -0
- package/dist/components/data-grid/utils/use-is-tablet-up.d.ts +3 -0
- package/dist/components/data-grid/utils/use-is-tablet-up.d.ts.map +1 -0
- package/dist/data-grid/filters.d.ts +1 -0
- package/dist/data-grid/filters.js +1633 -0
- package/dist/data-grid/filters.js.map +1 -0
- package/dist/data-grid/pagination.js +39 -38
- package/dist/data-grid/pagination.js.map +1 -1
- package/dist/data-grid/text-search.js +55 -67
- package/dist/data-grid/text-search.js.map +1 -1
- package/dist/data-grid.js +578 -618
- package/dist/data-grid.js.map +1 -1
- package/dist/dialog.js +38 -38
- package/dist/docs/data-grid.md +172 -4
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/questionnaire.md +1 -1
- package/dist/dropdown-menu.js +56 -56
- package/dist/empty.js +34 -34
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +392 -382
- package/dist/index.js.map +1 -1
- package/dist/select.js +45 -45
- package/dist/sidebar.js +112 -112
- package/dist/tabs.js +14 -14
- package/llms.txt +2 -2
- package/package.json +1 -4
- package/dist/chunks/data-grid.DIkpRRaf.css +0 -1
- package/dist/chunks/dialog.Cpo8vChK.css +0 -1
- package/dist/chunks/dropdown-menu.TU3FHXbJ.css +0 -1
- package/dist/chunks/empty.DWqLrSfF.css +0 -1
- package/dist/chunks/pagination.Cn8tIWMX.css +0 -1
- package/dist/chunks/sidebar.CIuN--7U.css +0 -1
- package/dist/chunks/tabs.DFa0OYMo.css +0 -1
package/dist/dialog.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { Dialog as r } from "@base-ui/react/dialog";
|
|
3
|
-
import { cx as
|
|
4
|
-
import { XIcon as
|
|
3
|
+
import { cx as n } from "class-variance-authority";
|
|
4
|
+
import { XIcon as _ } from "lucide-react";
|
|
5
5
|
import { Button as g } from "./button.js";
|
|
6
|
-
import './chunks/dialog.
|
|
6
|
+
import './chunks/dialog.CIR9bQoU.css';const m = "_backdrop_audd_6", f = "_popup_audd_22", D = "_closeButton_audd_164", N = "_header_audd_152", h = "_footer_audd_152", v = "_title_audd_273", B = "_description_audd_281", b = "_svgIcon_audd_288", a = {
|
|
7
7
|
backdrop: m,
|
|
8
8
|
popup: f,
|
|
9
9
|
closeButton: D,
|
|
10
|
-
header:
|
|
11
|
-
footer:
|
|
12
|
-
title:
|
|
13
|
-
description:
|
|
14
|
-
svgIcon:
|
|
15
|
-
},
|
|
16
|
-
function
|
|
10
|
+
header: N,
|
|
11
|
+
footer: h,
|
|
12
|
+
title: v,
|
|
13
|
+
description: B,
|
|
14
|
+
svgIcon: b
|
|
15
|
+
}, j = r.Root;
|
|
16
|
+
function P({ className: o, ...t }) {
|
|
17
17
|
return /* @__PURE__ */ e(r.Trigger, { className: o, ...t });
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function y({ className: o, ...t }) {
|
|
20
20
|
return /* @__PURE__ */ e(r.Close, { className: o, ...t });
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function z({
|
|
23
23
|
className: o,
|
|
24
24
|
children: t,
|
|
25
|
-
container:
|
|
26
|
-
showCloseButton:
|
|
25
|
+
container: i,
|
|
26
|
+
showCloseButton: c = !0,
|
|
27
27
|
showBackdrop: l = !0,
|
|
28
|
-
closeLabel:
|
|
28
|
+
closeLabel: d = "Close",
|
|
29
29
|
size: u = "default",
|
|
30
|
-
...
|
|
30
|
+
...p
|
|
31
31
|
}) {
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
l && /* @__PURE__ */ e(r.Backdrop, { className:
|
|
34
|
-
/* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ s(r.Portal, { container: i, children: [
|
|
33
|
+
l && /* @__PURE__ */ e(r.Backdrop, { className: a.backdrop }),
|
|
34
|
+
/* @__PURE__ */ s(r.Popup, { "data-size": u, className: n(a.popup, o), ...p, children: [
|
|
35
35
|
t,
|
|
36
|
-
|
|
36
|
+
c && /* @__PURE__ */ e(
|
|
37
37
|
r.Close,
|
|
38
38
|
{
|
|
39
|
-
"aria-label":
|
|
40
|
-
className:
|
|
41
|
-
render: /* @__PURE__ */ e(g, { variant: "ghost", icon: /* @__PURE__ */ e(
|
|
39
|
+
"aria-label": d,
|
|
40
|
+
className: a.closeButton,
|
|
41
|
+
render: /* @__PURE__ */ e(g, { variant: "ghost", icon: /* @__PURE__ */ e(_, { className: a.svgIcon }) })
|
|
42
42
|
}
|
|
43
43
|
)
|
|
44
44
|
] })
|
|
45
45
|
] });
|
|
46
46
|
}
|
|
47
|
-
function z({ className: o, ...t }) {
|
|
48
|
-
return /* @__PURE__ */ e("div", { className: s(n.header, o), ...t });
|
|
49
|
-
}
|
|
50
47
|
function F({ className: o, ...t }) {
|
|
51
|
-
return /* @__PURE__ */ e("div", { className:
|
|
48
|
+
return /* @__PURE__ */ e("div", { className: n(a.header, o), ...t });
|
|
52
49
|
}
|
|
53
50
|
function H({ className: o, ...t }) {
|
|
54
|
-
return /* @__PURE__ */ e(
|
|
51
|
+
return /* @__PURE__ */ e("div", { className: n(a.footer, o), ...t });
|
|
55
52
|
}
|
|
56
53
|
function R({ className: o, ...t }) {
|
|
57
|
-
return /* @__PURE__ */ e(r.
|
|
54
|
+
return /* @__PURE__ */ e(r.Title, { className: n(a.title, o), ...t });
|
|
55
|
+
}
|
|
56
|
+
function X({ className: o, ...t }) {
|
|
57
|
+
return /* @__PURE__ */ e(r.Description, { className: n(a.description, o), ...t });
|
|
58
58
|
}
|
|
59
59
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
j as Dialog,
|
|
61
|
+
y as DialogClose,
|
|
62
|
+
z as DialogContent,
|
|
63
|
+
X as DialogDescription,
|
|
64
|
+
H as DialogFooter,
|
|
65
|
+
F as DialogHeader,
|
|
66
|
+
R as DialogTitle,
|
|
67
|
+
P as DialogTrigger
|
|
68
68
|
};
|
|
69
69
|
//# sourceMappingURL=dialog.js.map
|
package/dist/docs/data-grid.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
A server-driven data grid: a `DataGrid` that renders rows through the kit's
|
|
4
4
|
`Table`, a `load(ctx)` callback that fetches them, a slot-based layout around
|
|
5
|
-
the table, and plugins that add behavior (paging, search, sorting, a
|
|
6
|
-
empty state) by registering into those slots and hooking the load. Each concern
|
|
5
|
+
the table, and plugins that add behavior (paging, search, sorting, filters, a
|
|
6
|
+
custom empty state) by registering into those slots and hooking the load. Each concern
|
|
7
7
|
(load, layout, table, storage, persistence) is a service with its own store, and
|
|
8
8
|
a plugin reaches all of them through one context object.
|
|
9
9
|
|
|
10
|
-
Built-in plugins: pagination, text search, order and empty state, each
|
|
11
|
-
entry (see below).
|
|
10
|
+
Built-in plugins: pagination, text search, order, filters and empty state, each
|
|
11
|
+
its own entry (see below).
|
|
12
12
|
|
|
13
13
|
## When to use
|
|
14
14
|
|
|
@@ -35,6 +35,7 @@ code or CSS:
|
|
|
35
35
|
| `@gears-frontx/ui-kit/data-grid/pagination` | `DataGridPaginationPlugin` |
|
|
36
36
|
| `@gears-frontx/ui-kit/data-grid/text-search` | `DataGridTextSearchPlugin` |
|
|
37
37
|
| `@gears-frontx/ui-kit/data-grid/order` | `DataGridOrderPlugin`, `createDataGridOrderOption` |
|
|
38
|
+
| `@gears-frontx/ui-kit/data-grid/filters` | `DataGridFiltersPlugin`, the entity factories `filterSearch`, `filterToggle`, `filterCheckboxGroup`, `filterTagGroup`, `filterTree` and `filterDateRange`, `createDataGridTreeStructure` and `useDataGridTreeStructure` (the tree `filterTree` takes), and the types |
|
|
38
39
|
| `@gears-frontx/ui-kit/data-grid/empty-state` | `DataGridEmptyStatePlugin` |
|
|
39
40
|
|
|
40
41
|
The package root re-exports all of them, so
|
|
@@ -295,6 +296,11 @@ them with `registerSlot(name, { id, component, order? })`:
|
|
|
295
296
|
| `bottom` | The footer (pagination); hidden while the grid has no records |
|
|
296
297
|
| `empty` | Replaces the built-in empty state |
|
|
297
298
|
|
|
299
|
+
The toolbar fits itself to the grid's width. What `top-start` holds flows onto
|
|
300
|
+
further lines when it is too wide for one, and `top-end` goes on to a line of its
|
|
301
|
+
own, at its end, when it would not fit beside `top-start` on a single line. A
|
|
302
|
+
toolbar that fits on one line has everything centred on it.
|
|
303
|
+
|
|
298
304
|
With two or more `main` views (for example the table and a cards view) the grid
|
|
299
305
|
adds a view switch to `top-end` by itself. Read or set the active view with
|
|
300
306
|
`useDataGridActiveView()` and `DATA_GRID_VIEW`:
|
|
@@ -351,6 +357,8 @@ Draws a pager in the `bottom` slot and fills `DataGridLoadContext.pagination`.
|
|
|
351
357
|
A page change updates the page, stores it and reloads. A limit change goes back to
|
|
352
358
|
page 1, stores the limit and reloads. A refresh resets the page to 1. The page
|
|
353
359
|
count comes from `total`. The loading treatment is the grid's, not the pager's.
|
|
360
|
+
In a container too narrow for one row, the page buttons wrap to a centred line
|
|
361
|
+
under the page-size selector and the page text.
|
|
354
362
|
|
|
355
363
|
### `DataGridTextSearchPlugin`
|
|
356
364
|
|
|
@@ -392,6 +400,143 @@ again.
|
|
|
392
400
|
The plugin compares `options` and `excludedColumns` by content, so an inline
|
|
393
401
|
array does not count as a change.
|
|
394
402
|
|
|
403
|
+
### `DataGridFiltersPlugin`
|
|
404
|
+
|
|
405
|
+
A bar of quick filters in `top-start`, and an "All filters" panel that edits the
|
|
406
|
+
same filters in one go. Each active filter reaches your `load` as
|
|
407
|
+
`filters[filterKey] = { value }`.
|
|
408
|
+
|
|
409
|
+
```tsx
|
|
410
|
+
import {
|
|
411
|
+
DataGridFiltersPlugin,
|
|
412
|
+
filterCheckboxGroup,
|
|
413
|
+
filterDateRange,
|
|
414
|
+
filterToggle,
|
|
415
|
+
} from '@gears-frontx/ui-kit/data-grid/filters';
|
|
416
|
+
|
|
417
|
+
const ENTITIES = [
|
|
418
|
+
filterToggle({ id: 'only_active', label: 'Only active' }),
|
|
419
|
+
filterCheckboxGroup({
|
|
420
|
+
id: 'role',
|
|
421
|
+
label: 'Role',
|
|
422
|
+
options: [
|
|
423
|
+
{ label: 'Admin', value: 'admin' },
|
|
424
|
+
{ label: 'Member', value: 'member' },
|
|
425
|
+
],
|
|
426
|
+
}),
|
|
427
|
+
filterDateRange({ id: 'created_at', label: 'Created' }),
|
|
428
|
+
];
|
|
429
|
+
|
|
430
|
+
async function loadUsers({ filters }: DataGridLoadContext) {
|
|
431
|
+
const roles = filters?.role?.value; // ['admin'], when the Role filter holds a choice
|
|
432
|
+
const range = filters?.created_at?.value; // { from?: '2026-03-01', to?: '2026-03-31' }
|
|
433
|
+
// ...
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
<DataGrid name="users" load={loadUsers} columns={columns}>
|
|
437
|
+
<DataGridFiltersPlugin entities={ENTITIES} />
|
|
438
|
+
</DataGrid>;
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
| Prop | Type | Default |
|
|
442
|
+
|------|------|---------|
|
|
443
|
+
| `entities` | `DataGridFilterEntity[]` | required; keep the array referentially stable (module scope, or `useMemo`) |
|
|
444
|
+
| `isAllFiltersOptionVisible` | `boolean` | `true`; the "All filters" chip is drawn when this is on and at least one entity has a panel section |
|
|
445
|
+
|
|
446
|
+
**Entities.** Each factory returns one filter. They share `id`, `filterKey`
|
|
447
|
+
(defaults to `id`: the key your `load` reads) and `label`. With no `label`, the
|
|
448
|
+
chip is named after the column whose id equals `id`; an entity with neither a
|
|
449
|
+
label nor a matching column throws when it renders. `popover` (`{ minInlineSize,
|
|
450
|
+
maxInlineSize? }`, in px) sizes the popover of a filter that has one.
|
|
451
|
+
|
|
452
|
+
| Factory | Value in `load` | Quick filter | Panel section |
|
|
453
|
+
|---------|-----------------|--------------|---------------|
|
|
454
|
+
| `filterSearch({ id })` | `{ value: string }` | A text box in a popover, applied 1 s after typing stops | no |
|
|
455
|
+
| `filterToggle({ id })` | `{ value: true }` | A chip that switches the filter on and off | no |
|
|
456
|
+
| `filterCheckboxGroup({ id, options, search?, searchDebounce? })` | `{ value: (string \| number)[] }` | A popover of checkboxes | yes |
|
|
457
|
+
| `filterTagGroup({ id, options, mode?, search? })` | `{ value: (string \| number)[] }` | A popover of selectable tags; `mode: 'radio'` allows one | yes |
|
|
458
|
+
| `filterTree({ id, tree, treeLabel, filterValue?, search? })` | `{ value: string \| number }` | A popover with a tree of radios | yes |
|
|
459
|
+
| `filterDateRange({ id, modelDateFormat? })` | `{ value: { from?: string, to?: string } }` | A popover with a range calendar | yes |
|
|
460
|
+
|
|
461
|
+
An option is `{ label, value, component? }`; `component` draws the option in
|
|
462
|
+
place of its label. The search box of a checkbox group and a tree shows above 5
|
|
463
|
+
options (5 nodes), and of a tag group above 10; `search` forces it on or off.
|
|
464
|
+
`filterCheckboxGroup` takes a function for `options` when the list is too long
|
|
465
|
+
to load up front: it is called with the trimmed search term, once when the list
|
|
466
|
+
opens (with an empty string) and again `searchDebounce` ms (default 300) after
|
|
467
|
+
each change of the term, and only the latest answer is shown. A failure shows "No
|
|
468
|
+
options found".
|
|
469
|
+
|
|
470
|
+
**Quick filters** apply at once: each change updates the value, stores it and
|
|
471
|
+
reloads from page 1. A chip shows a count when its value is a list, a dot when it
|
|
472
|
+
holds any other value, and its popover has a Reset button.
|
|
473
|
+
|
|
474
|
+
**The "All filters" panel** opens a sheet (from the side from 720 px wide, from the
|
|
475
|
+
bottom edge below it) with a section for each entity that has one. Its choices
|
|
476
|
+
are a draft: nothing loads until **Apply**, which commits all of them at once.
|
|
477
|
+
Leaving the panel without Apply (its close button, Escape, a click outside)
|
|
478
|
+
discards the draft, and the next opening starts from what is applied. The count tag in a section's
|
|
479
|
+
header clears that section of the draft. The chip's count is the number of active
|
|
480
|
+
filters that have a section.
|
|
481
|
+
|
|
482
|
+
The same width decides how a quick filter opens: as a popover beside its chip,
|
|
483
|
+
or as a panel from the bottom edge.
|
|
484
|
+
|
|
485
|
+
**Active values.** A filter is active unless its value is `undefined`, `null`,
|
|
486
|
+
`''` or an empty array, so `false` and `0` are values like any other. Inactive
|
|
487
|
+
filters are left out of the load context. (The grid's own `hasActiveFilters`,
|
|
488
|
+
which the empty state reads, agrees except for one value: it treats `0` as
|
|
489
|
+
inactive.)
|
|
490
|
+
|
|
491
|
+
**Persistence.** All filters are stored under one key, `dataGrid:${name}:filters`,
|
|
492
|
+
as `{ [filterKey]: { value } }`. A refresh that resets filters clears them. The
|
|
493
|
+
stored value can be edited by the user, so what the controls show is guarded: a
|
|
494
|
+
checkbox group or a tag group reads a stored value that is not a list as no
|
|
495
|
+
selection, and a date range reads a bound that is not a date in `modelDateFormat`
|
|
496
|
+
as unset. The guards change only what the controls show. Every stored value,
|
|
497
|
+
whatever its shape, still reaches `load` as long as it is stored (a list filter's
|
|
498
|
+
wrongly shaped value, a date range's, a value for a filter that is no longer in
|
|
499
|
+
`entities`), so read `filters` defensively there (check `Array.isArray` before
|
|
500
|
+
using a list).
|
|
501
|
+
|
|
502
|
+
**`filterDateRange`.** The bounds are strings in `modelDateFormat`, which takes
|
|
503
|
+
[date-fns format tokens](https://date-fns.org/docs/format) and defaults to
|
|
504
|
+
`'yyyy-MM-dd'`: `'dd.MM.yyyy'`, not `'DD.MM.YYYY'`. Either bound may be missing
|
|
505
|
+
(`{ from }` means "from then on"). The first click on a day starts a range, the
|
|
506
|
+
second ends it (in either order), and a click after that starts a new one.
|
|
507
|
+
|
|
508
|
+
**`filterTree`.** `tree` is a tree structure, made in the same entry:
|
|
509
|
+
|
|
510
|
+
```tsx
|
|
511
|
+
import { filterTree, useDataGridTreeStructure } from '@gears-frontx/ui-kit/data-grid/filters';
|
|
512
|
+
|
|
513
|
+
const tree = useDataGridTreeStructure({
|
|
514
|
+
items: departments,
|
|
515
|
+
itemKey: 'id', // the default; a function is allowed
|
|
516
|
+
parentKey: 'parent_id', // the default; or `childrenKey` for nested items
|
|
517
|
+
isLeaf: (department) => !department.has_children, // without it every node can be expanded
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
filterTree({ id: 'department', tree, treeLabel: 'name', filterValue: 'code' });
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
`createDataGridTreeStructure` makes the same thing outside a component; either
|
|
524
|
+
returns a structure you can fill later with `tree.setItems(items)` or reshape with
|
|
525
|
+
`tree.move(...)` (which throws for a move under the node itself or one of its
|
|
526
|
+
descendants), and an open filter follows. `treeLabel` is a property name or a
|
|
527
|
+
function returning the node's text; search matches on it, keeps the matching
|
|
528
|
+
nodes, the path down to each one and the nodes under it, and starts 300 ms after
|
|
529
|
+
typing stops. By default `load` receives the id of the chosen node; `filterValue`
|
|
530
|
+
(a property name or a function of the item) sends something else, such as a
|
|
531
|
+
code, while the id is what is stored. A tree keeps its items' `id` property as
|
|
532
|
+
their key: use the default `itemKey`.
|
|
533
|
+
|
|
534
|
+
The plugin's API (`getPlugin<DataGridFiltersPluginApi>('filters')`) offers
|
|
535
|
+
`useState(filterKey)`, `setState`, `removeState`, `useDraftState`,
|
|
536
|
+
`setDraftState`, `applyDraftState`, `resetDraftState`, `useActiveCount(filterKeys)`,
|
|
537
|
+
`isFilterValueActive` and `useFilterEntities`, for a custom filter or a control
|
|
538
|
+
of your own.
|
|
539
|
+
|
|
395
540
|
### `DataGridEmptyStatePlugin`
|
|
396
541
|
|
|
397
542
|
Renders your component in place of the built-in empty state, whenever the grid has
|
|
@@ -542,6 +687,17 @@ columns' minimum content widths.
|
|
|
542
687
|
- `aria-busy` is set on the content region while a loader is on screen.
|
|
543
688
|
- The order popover's items are menu items without a menu popup, so they take
|
|
544
689
|
focus and Enter and Space, but arrow keys do not move between them.
|
|
690
|
+
- A filter chip is a native `button`; the toggle chip does not say whether it is on
|
|
691
|
+
(no `aria-pressed`), only by its look. The text box of a `filterSearch` filter has
|
|
692
|
+
no placeholder and no accessible name, and the search box inside a list filter
|
|
693
|
+
has a placeholder ("Search...") and no accessible name. A tag is a label over a
|
|
694
|
+
native checkbox or radio, so the input carries the state.
|
|
695
|
+
- In a tree filter each row holds a radio and the tree moves its own focus: Arrow
|
|
696
|
+
keys move between rows, Right and Left open and close a directory, Home and End
|
|
697
|
+
go to the ends, and Enter toggles a directory. A node is chosen with the mouse,
|
|
698
|
+
or by Tab to its radio and Space.
|
|
699
|
+
- The "All filters" panel is a dialog; it is left with its close button (named
|
|
700
|
+
"Close dialog"), Escape or a click outside.
|
|
545
701
|
- Strings are English and live in one module; the kit has no i18n layer yet.
|
|
546
702
|
|
|
547
703
|
## Known limitations
|
|
@@ -573,6 +729,18 @@ columns' minimum content widths.
|
|
|
573
729
|
it also drops `history.state` and the `#hash` when it writes the URL, and it does
|
|
574
730
|
not work during server rendering.
|
|
575
731
|
- A new `columns` array identity resets user pins and visibility.
|
|
732
|
+
- A filter's quick popover is not kept in step with what resets it from outside:
|
|
733
|
+
a tree filter's radio stays checked after its Reset button until the popover is
|
|
734
|
+
opened again, although the filter is cleared.
|
|
735
|
+
- `filterTree` reads each item's `id` property for its search and its radios. With
|
|
736
|
+
an `itemKey` other than `id` every radio shows as checked, a click selects
|
|
737
|
+
nothing, and a search hides every node.
|
|
738
|
+
- In a tree filter with a search, the arrow keys also step onto the rows the search
|
|
739
|
+
hides. Once the focus is on a hidden row, no row shown is a tab stop, so the
|
|
740
|
+
arrow keys are lost until that row is shown again or another row is clicked;
|
|
741
|
+
each row's radio can still be reached with Tab.
|
|
742
|
+
- A key in `filters` that no entity owns any more, and any stored value of the
|
|
743
|
+
wrong shape (see Persistence), still reach `load`.
|
|
576
744
|
- There is no plugin unregister.
|
|
577
745
|
|
|
578
746
|
## Anti-patterns
|
package/dist/docs/drawer.md
CHANGED
|
@@ -92,7 +92,7 @@ exemption list, which is what keeps them out of that file's
|
|
|
92
92
|
The enter/exit slide itself is a plain CSS transition between the
|
|
93
93
|
`[data-starting-style]`/`[data-ending-style]` transform (`--closed-transform`,
|
|
94
94
|
the panel parked one full panel-length past its own edge) and the resting
|
|
95
|
-
transform on `.popup`. Measured
|
|
95
|
+
transform on `.popup`. Measured in a browser at a 900x513 viewport, a bottom
|
|
96
96
|
drawer travels `y: 515 → 308` on open and `308 → 515` on close, a right one
|
|
97
97
|
`x: 902 → 516` and back — monotonic, with the backdrop's opacity crossing
|
|
98
98
|
`0 → 1` on the same curve. Nominal duration is upstream's own
|
|
@@ -99,7 +99,7 @@ Shortcuts and arrow navigation pause while typing in a text field.
|
|
|
99
99
|
`QuestionnaireProgress`: renders `Question {current} of {total}` as text in
|
|
100
100
|
a `role="progressbar"` — it is **not** a bar by default. Pass `children` to
|
|
101
101
|
replace the copy, or `render={(props, state) => ...}` to draw a real bar
|
|
102
|
-
from `state.current`/`state.total
|
|
102
|
+
from `state.current`/`state.total`, for example one segment per question.
|
|
103
103
|
|
|
104
104
|
`QuestionnaireItem`: `name` (matches an `items` entry), `required`,
|
|
105
105
|
`multiple` (renders every child `QuestionnaireChoice` as a checkbox
|
package/dist/dropdown-menu.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { Menu as r } from "@base-ui/react/menu";
|
|
4
|
-
import { cx as
|
|
5
|
-
import { CheckIcon as
|
|
6
|
-
import { useContext as
|
|
7
|
-
import './chunks/dropdown-menu.
|
|
8
|
-
positioner:
|
|
9
|
-
popup:
|
|
10
|
-
subPopup:
|
|
11
|
-
label:
|
|
12
|
-
item:
|
|
13
|
-
variantDefault:
|
|
14
|
-
variantDestructive:
|
|
15
|
-
checkboxItem:
|
|
16
|
-
radioItem:
|
|
17
|
-
itemIndicator:
|
|
4
|
+
import { cx as a, cva as h } from "class-variance-authority";
|
|
5
|
+
import { CheckIcon as g, ChevronRightIcon as D } from "lucide-react";
|
|
6
|
+
import { useContext as M, createContext as S } from "react";
|
|
7
|
+
import './chunks/dropdown-menu.DT1_JLqL.css';const N = "_positioner_s67g2_14", w = "_popup_s67g2_6", x = "_subPopup_s67g2_32", C = "_label_s67g2_123", T = "_item_s67g2_120", k = "_variantDefault_s67g2_165", P = "_variantDestructive_s67g2_192", R = "_checkboxItem_s67g2_120", G = "_radioItem_s67g2_120", j = "_itemIndicator_s67g2_234", L = "_indicatorSideStart_s67g2_253", V = "_separator_s67g2_271", y = "_shortcut_s67g2_278", q = "_subTrigger_s67g2_121", z = "_subTriggerIcon_s67g2_336", A = "_svgIcon_s67g2_343", e = {
|
|
8
|
+
positioner: N,
|
|
9
|
+
popup: w,
|
|
10
|
+
subPopup: x,
|
|
11
|
+
label: C,
|
|
12
|
+
item: T,
|
|
13
|
+
variantDefault: k,
|
|
14
|
+
variantDestructive: P,
|
|
15
|
+
checkboxItem: R,
|
|
16
|
+
radioItem: G,
|
|
17
|
+
itemIndicator: j,
|
|
18
18
|
indicatorSideStart: L,
|
|
19
19
|
separator: V,
|
|
20
20
|
shortcut: y,
|
|
21
21
|
subTrigger: q,
|
|
22
22
|
subTriggerIcon: z,
|
|
23
23
|
svgIcon: A
|
|
24
|
-
}, m =
|
|
24
|
+
}, m = S(void 0), Q = r.Root;
|
|
25
25
|
function U({ className: t, ...o }) {
|
|
26
26
|
return /* @__PURE__ */ n(r.Trigger, { className: t, ...o });
|
|
27
27
|
}
|
|
28
28
|
function B({
|
|
29
29
|
className: t,
|
|
30
30
|
children: o,
|
|
31
|
-
container:
|
|
32
|
-
side:
|
|
33
|
-
sideOffset:
|
|
31
|
+
container: s,
|
|
32
|
+
side: i = "bottom",
|
|
33
|
+
sideOffset: c = 4,
|
|
34
34
|
align: u = "start",
|
|
35
|
-
alignOffset:
|
|
36
|
-
positionMethod:
|
|
37
|
-
collisionBoundary:
|
|
35
|
+
alignOffset: _ = 0,
|
|
36
|
+
positionMethod: l,
|
|
37
|
+
collisionBoundary: I,
|
|
38
38
|
collisionPadding: b,
|
|
39
|
-
...
|
|
39
|
+
...v
|
|
40
40
|
}) {
|
|
41
|
-
const
|
|
41
|
+
const f = M(m), d = s ?? f;
|
|
42
42
|
return /* @__PURE__ */ n(m.Provider, { value: d, children: /* @__PURE__ */ n(r.Portal, { container: d, children: /* @__PURE__ */ n(
|
|
43
43
|
r.Positioner,
|
|
44
44
|
{
|
|
45
|
-
side:
|
|
46
|
-
sideOffset:
|
|
45
|
+
side: i,
|
|
46
|
+
sideOffset: c,
|
|
47
47
|
align: u,
|
|
48
|
-
alignOffset:
|
|
49
|
-
positionMethod:
|
|
50
|
-
collisionBoundary:
|
|
48
|
+
alignOffset: _,
|
|
49
|
+
positionMethod: l,
|
|
50
|
+
collisionBoundary: I,
|
|
51
51
|
collisionPadding: b,
|
|
52
52
|
className: e.positioner,
|
|
53
|
-
children: /* @__PURE__ */ n(r.Popup, { className:
|
|
53
|
+
children: /* @__PURE__ */ n(r.Popup, { className: a(e.popup, t), ...v, children: o })
|
|
54
54
|
}
|
|
55
55
|
) }) });
|
|
56
56
|
}
|
|
@@ -58,9 +58,9 @@ function W({ className: t, ...o }) {
|
|
|
58
58
|
return /* @__PURE__ */ n(r.Group, { className: t, ...o });
|
|
59
59
|
}
|
|
60
60
|
function X({ className: t, ...o }) {
|
|
61
|
-
return /* @__PURE__ */ n(r.GroupLabel, { className:
|
|
61
|
+
return /* @__PURE__ */ n(r.GroupLabel, { className: a(e.label, t), ...o });
|
|
62
62
|
}
|
|
63
|
-
const E =
|
|
63
|
+
const E = h(e.item, {
|
|
64
64
|
variants: {
|
|
65
65
|
variant: {
|
|
66
66
|
default: e.variantDefault,
|
|
@@ -71,17 +71,17 @@ const E = f(e.item, {
|
|
|
71
71
|
variant: "default"
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
function Y({ className: t, variant: o, ...
|
|
75
|
-
return /* @__PURE__ */ n(r.Item, { className: E({ variant: o, className: t }), ...
|
|
74
|
+
function Y({ className: t, variant: o, ...s }) {
|
|
75
|
+
return /* @__PURE__ */ n(r.Item, { className: E({ variant: o, className: t }), ...s });
|
|
76
76
|
}
|
|
77
77
|
function Z({
|
|
78
78
|
className: t,
|
|
79
79
|
children: o,
|
|
80
|
-
...
|
|
80
|
+
...s
|
|
81
81
|
}) {
|
|
82
|
-
return /* @__PURE__ */ p(r.CheckboxItem, { className:
|
|
82
|
+
return /* @__PURE__ */ p(r.CheckboxItem, { className: a(e.checkboxItem, t), ...s, children: [
|
|
83
83
|
o,
|
|
84
|
-
/* @__PURE__ */ n(r.CheckboxItemIndicator, { className: e.itemIndicator, children: /* @__PURE__ */ n(
|
|
84
|
+
/* @__PURE__ */ n(r.CheckboxItemIndicator, { className: e.itemIndicator, children: /* @__PURE__ */ n(g, { className: e.svgIcon }) })
|
|
85
85
|
] });
|
|
86
86
|
}
|
|
87
87
|
function $({ className: t, ...o }) {
|
|
@@ -90,58 +90,58 @@ function $({ className: t, ...o }) {
|
|
|
90
90
|
function tt({
|
|
91
91
|
className: t,
|
|
92
92
|
children: o,
|
|
93
|
-
indicatorSide:
|
|
94
|
-
...
|
|
93
|
+
indicatorSide: s = "end",
|
|
94
|
+
...i
|
|
95
95
|
}) {
|
|
96
96
|
return /* @__PURE__ */ p(
|
|
97
97
|
r.RadioItem,
|
|
98
98
|
{
|
|
99
|
-
className:
|
|
99
|
+
className: a(
|
|
100
100
|
e.radioItem,
|
|
101
|
-
|
|
101
|
+
s === "start" && e.indicatorSideStart,
|
|
102
102
|
t
|
|
103
103
|
),
|
|
104
|
-
...
|
|
104
|
+
...i,
|
|
105
105
|
children: [
|
|
106
106
|
o,
|
|
107
|
-
/* @__PURE__ */ n(r.RadioItemIndicator, { className: e.itemIndicator, children: /* @__PURE__ */ n(
|
|
107
|
+
/* @__PURE__ */ n(r.RadioItemIndicator, { className: e.itemIndicator, children: /* @__PURE__ */ n(g, { className: e.svgIcon }) })
|
|
108
108
|
]
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
function ot({ className: t, ...o }) {
|
|
113
|
-
return /* @__PURE__ */ n(r.Separator, { className:
|
|
113
|
+
return /* @__PURE__ */ n(r.Separator, { className: a(e.separator, t), ...o });
|
|
114
114
|
}
|
|
115
115
|
function et({ className: t, ...o }) {
|
|
116
|
-
return /* @__PURE__ */ n("span", { className:
|
|
116
|
+
return /* @__PURE__ */ n("span", { className: a(e.shortcut, t), ...o });
|
|
117
117
|
}
|
|
118
118
|
const nt = r.SubmenuRoot;
|
|
119
119
|
function rt({
|
|
120
120
|
className: t,
|
|
121
121
|
children: o,
|
|
122
|
-
...
|
|
122
|
+
...s
|
|
123
123
|
}) {
|
|
124
|
-
return /* @__PURE__ */ p(r.SubmenuTrigger, { className:
|
|
124
|
+
return /* @__PURE__ */ p(r.SubmenuTrigger, { className: a(e.subTrigger, t), ...s, children: [
|
|
125
125
|
o,
|
|
126
|
-
/* @__PURE__ */ n(
|
|
126
|
+
/* @__PURE__ */ n(D, { className: a(e.svgIcon, e.subTriggerIcon) })
|
|
127
127
|
] });
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function st({
|
|
130
130
|
className: t,
|
|
131
131
|
side: o = "right",
|
|
132
|
-
align:
|
|
133
|
-
sideOffset:
|
|
134
|
-
alignOffset:
|
|
132
|
+
align: s = "start",
|
|
133
|
+
sideOffset: i = 0,
|
|
134
|
+
alignOffset: c = -3,
|
|
135
135
|
...u
|
|
136
136
|
}) {
|
|
137
137
|
return /* @__PURE__ */ n(
|
|
138
138
|
B,
|
|
139
139
|
{
|
|
140
|
-
className:
|
|
140
|
+
className: a(e.subPopup, t),
|
|
141
141
|
side: o,
|
|
142
|
-
align:
|
|
143
|
-
sideOffset:
|
|
144
|
-
alignOffset:
|
|
142
|
+
align: s,
|
|
143
|
+
sideOffset: i,
|
|
144
|
+
alignOffset: c,
|
|
145
145
|
...u
|
|
146
146
|
}
|
|
147
147
|
);
|
|
@@ -158,7 +158,7 @@ export {
|
|
|
158
158
|
ot as DropdownMenuSeparator,
|
|
159
159
|
et as DropdownMenuShortcut,
|
|
160
160
|
nt as DropdownMenuSub,
|
|
161
|
-
|
|
161
|
+
st as DropdownMenuSubContent,
|
|
162
162
|
rt as DropdownMenuSubTrigger,
|
|
163
163
|
U as DropdownMenuTrigger
|
|
164
164
|
};
|