@devalok/shilp-sutra 0.1.0 → 0.2.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/dist/composed/avatar-group.d.ts +1 -0
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +1 -0
- package/dist/composed/command-palette.d.ts +1 -0
- package/dist/composed/command-palette.js +4 -3
- package/dist/composed/date-picker/calendar-grid.d.ts +1 -0
- package/dist/composed/date-picker/calendar-grid.js +1 -0
- package/dist/composed/date-picker/date-picker.d.ts +1 -0
- package/dist/composed/date-picker/date-picker.js +1 -0
- package/dist/composed/date-picker/date-range-picker.d.ts +1 -0
- package/dist/composed/date-picker/date-range-picker.js +1 -0
- package/dist/composed/date-picker/date-time-picker.d.ts +1 -0
- package/dist/composed/date-picker/date-time-picker.js +1 -0
- package/dist/composed/date-picker/index.d.ts +1 -0
- package/dist/composed/date-picker/month-picker.d.ts +1 -0
- package/dist/composed/date-picker/month-picker.js +1 -0
- package/dist/composed/date-picker/presets.d.ts +1 -0
- package/dist/composed/date-picker/presets.js +1 -0
- package/dist/composed/date-picker/time-picker.d.ts +1 -0
- package/dist/composed/date-picker/time-picker.js +2 -1
- package/dist/composed/date-picker/use-calendar.d.ts +1 -0
- package/dist/composed/date-picker/use-calendar.d.ts.map +1 -1
- package/dist/composed/date-picker/use-calendar.js +1 -0
- package/dist/composed/date-picker/year-picker.d.ts +1 -0
- package/dist/composed/date-picker/year-picker.js +1 -0
- package/dist/composed/empty-state.js +1 -1
- package/dist/composed/error-boundary.d.ts +1 -0
- package/dist/composed/error-boundary.js +2 -1
- package/dist/composed/global-loading.d.ts +1 -0
- package/dist/composed/global-loading.js +1 -0
- package/dist/composed/index.d.ts +15 -0
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +1 -0
- package/dist/composed/lib/string-utils.d.ts +1 -0
- package/dist/composed/lib/string-utils.d.ts.map +1 -1
- package/dist/composed/lib/string-utils.js +7 -4
- package/dist/composed/loading-skeleton.js +32 -32
- package/dist/composed/member-picker.d.ts +1 -0
- package/dist/composed/member-picker.js +1 -0
- package/dist/composed/page-skeletons.js +38 -38
- package/dist/composed/rich-text-editor.d.ts +1 -0
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +47 -44
- package/dist/composed/status-badge.js +6 -6
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/use-color-mode.d.ts +1 -0
- package/dist/hooks/use-color-mode.d.ts.map +1 -1
- package/dist/hooks/use-color-mode.js +9 -8
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +1 -0
- package/dist/hooks/use-toast.d.ts +1 -0
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +3 -2
- package/dist/primitives/react-accordion.d.ts +114 -0
- package/dist/primitives/react-alert-dialog.d.ts +51 -0
- package/dist/primitives/react-aspect-ratio.d.ts +11 -0
- package/dist/primitives/react-avatar.d.ts +24 -0
- package/dist/primitives/react-checkbox.d.ts +50 -0
- package/dist/primitives/react-collapsible.d.ts +33 -0
- package/dist/primitives/react-context-menu.d.ts +96 -0
- package/dist/primitives/react-dialog.d.ts +103 -0
- package/dist/primitives/react-dropdown-menu.d.ts +97 -0
- package/dist/primitives/react-hover-card.d.ts +79 -0
- package/dist/primitives/react-label.d.ts +10 -0
- package/dist/primitives/react-menu.d.ts +169 -0
- package/dist/primitives/react-menubar.d.ts +115 -0
- package/dist/primitives/react-navigation-menu.d.ts +126 -0
- package/dist/primitives/react-popover.d.ts +85 -0
- package/dist/primitives/react-progress.d.ts +19 -0
- package/dist/primitives/react-radio-group.d.ts +58 -0
- package/dist/primitives/react-roving-focus.d.ts +49 -0
- package/dist/primitives/react-select.d.ts +137 -0
- package/dist/primitives/react-separator.d.ts +21 -0
- package/dist/primitives/react-slider.d.ts +75 -0
- package/dist/primitives/react-switch.d.ts +21 -0
- package/dist/primitives/react-tabs.d.ts +56 -0
- package/dist/primitives/react-toast.d.ts +120 -0
- package/dist/primitives/react-toggle-group.d.ts +75 -0
- package/dist/primitives/react-toggle.d.ts +24 -0
- package/dist/primitives/react-tooltip.d.ts +101 -0
- package/dist/primitives/react-visually-hidden.d.ts +22 -0
- package/dist/shell/app-command-palette.d.ts +3 -3
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +2 -1
- package/dist/shell/bottom-navbar.d.ts +1 -0
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +40 -37
- package/dist/shell/index.d.ts +14 -2
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +16 -12
- package/dist/shell/link-context.d.ts +12 -0
- package/dist/shell/link-context.d.ts.map +1 -0
- package/dist/shell/link-context.js +19 -0
- package/dist/shell/notification-center.d.ts +1 -0
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +21 -19
- package/dist/shell/notification-preferences.d.ts +3 -3
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +14 -13
- package/dist/shell/sidebar.d.ts +1 -0
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js +32 -30
- package/dist/shell/top-bar.d.ts +1 -0
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +35 -30
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +32 -2
- package/dist/ui/accordion.d.ts +2 -1
- package/dist/ui/accordion.js +1 -0
- package/dist/ui/alert-dialog.d.ts +2 -1
- package/dist/ui/alert-dialog.js +1 -0
- package/dist/ui/alert.d.ts +1 -0
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +2 -1
- package/dist/ui/aspect-ratio.d.ts +2 -1
- package/dist/ui/aspect-ratio.js +1 -0
- package/dist/ui/autocomplete.d.ts +1 -0
- package/dist/ui/autocomplete.js +35 -34
- package/dist/ui/avatar.d.ts +2 -1
- package/dist/ui/avatar.js +13 -12
- package/dist/ui/badge.d.ts +1 -0
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +4 -3
- package/dist/ui/banner.d.ts +1 -0
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +1 -0
- package/dist/ui/breadcrumb.d.ts +1 -0
- package/dist/ui/breadcrumb.js +1 -0
- package/dist/ui/button-group.d.ts +1 -0
- package/dist/ui/button-group.js +1 -0
- package/dist/ui/button.d.ts +1 -0
- package/dist/ui/button.js +2 -1
- package/dist/ui/card.d.ts +1 -0
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +2 -1
- package/dist/ui/charts/_internal/animation.d.ts +1 -0
- package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
- package/dist/ui/charts/_internal/animation.js +1 -0
- package/dist/ui/charts/_internal/axes.d.ts +1 -0
- package/dist/ui/charts/_internal/axes.d.ts.map +1 -1
- package/dist/ui/charts/_internal/axes.js +1 -0
- package/dist/ui/charts/_internal/colors.d.ts +1 -0
- package/dist/ui/charts/_internal/colors.js +1 -0
- package/dist/ui/charts/_internal/grid-lines.d.ts +1 -0
- package/dist/ui/charts/_internal/grid-lines.js +1 -0
- package/dist/ui/charts/_internal/legend.d.ts +1 -0
- package/dist/ui/charts/_internal/legend.js +1 -0
- package/dist/ui/charts/_internal/scales.d.ts +1 -0
- package/dist/ui/charts/_internal/tooltip.d.ts +1 -0
- package/dist/ui/charts/_internal/tooltip.d.ts.map +1 -1
- package/dist/ui/charts/_internal/tooltip.js +1 -0
- package/dist/ui/charts/_internal/types.d.ts +1 -0
- package/dist/ui/charts/_internal/types.js +1 -0
- package/dist/ui/charts/area-chart.d.ts +1 -0
- package/dist/ui/charts/area-chart.js +1 -0
- package/dist/ui/charts/bar-chart.d.ts +1 -0
- package/dist/ui/charts/bar-chart.js +2 -1
- package/dist/ui/charts/chart-container.d.ts +1 -0
- package/dist/ui/charts/chart-container.js +12 -11
- package/dist/ui/charts/gauge-chart.d.ts +1 -0
- package/dist/ui/charts/gauge-chart.js +1 -0
- package/dist/ui/charts/index.d.ts +1 -0
- package/dist/ui/charts/line-chart.d.ts +1 -0
- package/dist/ui/charts/line-chart.js +2 -1
- package/dist/ui/charts/pie-chart.d.ts +1 -0
- package/dist/ui/charts/pie-chart.js +1 -0
- package/dist/ui/charts/radar-chart.d.ts +1 -0
- package/dist/ui/charts/radar-chart.js +21 -20
- package/dist/ui/charts/sparkline.d.ts +1 -0
- package/dist/ui/charts/sparkline.js +1 -0
- package/dist/ui/checkbox.d.ts +2 -1
- package/dist/ui/checkbox.js +1 -0
- package/dist/ui/chip.d.ts +1 -0
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +35 -36
- package/dist/ui/code.js +13 -13
- package/dist/ui/collapsible.d.ts +2 -1
- package/dist/ui/collapsible.js +1 -0
- package/dist/ui/combobox.d.ts +1 -0
- package/dist/ui/combobox.js +2 -1
- package/dist/ui/context-menu.d.ts +2 -1
- package/dist/ui/context-menu.js +2 -1
- package/dist/ui/data-table-toolbar.d.ts +1 -0
- package/dist/ui/data-table-toolbar.js +1 -0
- package/dist/ui/data-table.d.ts +1 -0
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +79 -78
- package/dist/ui/dialog.d.ts +2 -1
- package/dist/ui/dialog.js +1 -0
- package/dist/ui/dropdown-menu.d.ts +2 -1
- package/dist/ui/dropdown-menu.js +23 -22
- package/dist/ui/file-upload.d.ts +1 -0
- package/dist/ui/file-upload.js +60 -59
- package/dist/ui/form.d.ts +1 -0
- package/dist/ui/form.js +1 -0
- package/dist/ui/hover-card.d.ts +2 -1
- package/dist/ui/hover-card.js +1 -0
- package/dist/ui/icon-button.d.ts +1 -0
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-button.js +1 -0
- package/dist/ui/index.d.ts +18 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/input-otp.d.ts +1 -0
- package/dist/ui/input-otp.js +2 -1
- package/dist/ui/input.d.ts +2 -1
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +1 -0
- package/dist/ui/label.d.ts +2 -1
- package/dist/ui/label.js +1 -0
- package/dist/ui/lib/slot.d.ts +1 -0
- package/dist/ui/lib/use-reduced-motion.d.ts +1 -0
- package/dist/ui/lib/use-reduced-motion.js +1 -0
- package/dist/ui/lib/use-ripple.d.ts +1 -0
- package/dist/ui/lib/use-ripple.js +1 -0
- package/dist/ui/link.d.ts +1 -0
- package/dist/ui/link.js +1 -0
- package/dist/ui/menubar.d.ts +2 -1
- package/dist/ui/menubar.js +23 -22
- package/dist/ui/navigation-menu.d.ts +2 -1
- package/dist/ui/navigation-menu.js +7 -6
- package/dist/ui/number-input.d.ts +1 -0
- package/dist/ui/number-input.js +2 -1
- package/dist/ui/pagination.d.ts +1 -0
- package/dist/ui/pagination.js +1 -0
- package/dist/ui/popover.d.ts +2 -1
- package/dist/ui/popover.js +1 -0
- package/dist/ui/progress.d.ts +2 -1
- package/dist/ui/progress.js +1 -0
- package/dist/ui/radio.d.ts +2 -1
- package/dist/ui/radio.js +1 -0
- package/dist/ui/search-input.d.ts +6 -5
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +11 -10
- package/dist/ui/segmented-control.d.ts +1 -0
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +4 -4
- package/dist/ui/select.d.ts +2 -1
- package/dist/ui/select.js +3 -2
- package/dist/ui/separator.d.ts +2 -1
- package/dist/ui/separator.js +1 -0
- package/dist/ui/sheet.d.ts +2 -1
- package/dist/ui/sheet.js +1 -0
- package/dist/ui/sidebar.d.ts +1 -0
- package/dist/ui/sidebar.js +53 -52
- package/dist/ui/slider.d.ts +2 -1
- package/dist/ui/slider.js +1 -0
- package/dist/ui/stack.d.ts +2 -2
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js +51 -21
- package/dist/ui/stat-card.d.ts +4 -1
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +22 -21
- package/dist/ui/stepper.d.ts +1 -0
- package/dist/ui/stepper.js +26 -25
- package/dist/ui/switch.d.ts +2 -1
- package/dist/ui/switch.js +1 -0
- package/dist/ui/table.js +12 -12
- package/dist/ui/tabs.d.ts +2 -1
- package/dist/ui/tabs.js +1 -0
- package/dist/ui/text.d.ts +1 -1
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/textarea.d.ts +1 -0
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +2 -0
- package/dist/ui/toast.d.ts +2 -1
- package/dist/ui/toast.js +2 -1
- package/dist/ui/toaster.d.ts +1 -0
- package/dist/ui/toaster.js +1 -0
- package/dist/ui/toggle-group.d.ts +2 -1
- package/dist/ui/toggle-group.js +1 -0
- package/dist/ui/toggle.d.ts +2 -1
- package/dist/ui/toggle.js +1 -0
- package/dist/ui/tooltip.d.ts +2 -1
- package/dist/ui/tooltip.js +1 -0
- package/dist/ui/transitions.d.ts +1 -0
- package/dist/ui/transitions.js +1 -0
- package/dist/ui/tree-view/index.d.ts +1 -0
- package/dist/ui/tree-view/tree-item.d.ts +1 -0
- package/dist/ui/tree-view/tree-item.js +2 -1
- package/dist/ui/tree-view/tree-view.d.ts +1 -0
- package/dist/ui/tree-view/tree-view.js +1 -0
- package/dist/ui/tree-view/use-tree.d.ts +1 -0
- package/dist/ui/tree-view/use-tree.js +1 -0
- package/package.json +97 -24
package/dist/ui/chip.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as v from "react";
|
|
4
|
+
import { IconX as p } from "@tabler/icons-react";
|
|
3
5
|
import { cva as N } from "class-variance-authority";
|
|
4
6
|
import { cn as h } from "./lib/utils.js";
|
|
5
7
|
const w = N(
|
|
6
|
-
"inline-flex items-center gap-ds-02 font-sans leading-
|
|
8
|
+
"inline-flex items-center gap-ds-02 font-sans leading-ds-relaxed rounded-ds-full transition-colors duration-fast-01",
|
|
7
9
|
{
|
|
8
10
|
variants: {
|
|
9
11
|
variant: {
|
|
@@ -63,43 +65,40 @@ const w = N(
|
|
|
63
65
|
color: "default"
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
|
-
),
|
|
67
|
-
({ label: t, variant:
|
|
68
|
-
const
|
|
69
|
-
return
|
|
70
|
-
|
|
68
|
+
), C = v.forwardRef(
|
|
69
|
+
({ label: t, variant: l, size: i, color: n, icon: o, onClick: s, onDelete: c, disabled: a, className: d, ...g }, b) => {
|
|
70
|
+
const r = !!s, m = r ? "button" : "span", x = r && !a ? "cursor-pointer hover:bg-field-hover" : "", y = a ? "opacity-action-disabled cursor-not-allowed" : "";
|
|
71
|
+
return /* @__PURE__ */ u(
|
|
72
|
+
m,
|
|
71
73
|
{
|
|
72
|
-
ref:
|
|
73
|
-
className: h(w({ variant:
|
|
74
|
-
onClick:
|
|
75
|
-
disabled:
|
|
76
|
-
type:
|
|
77
|
-
...
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
] })
|
|
74
|
+
ref: b,
|
|
75
|
+
className: h(w({ variant: l, size: i, color: n }), x, y, d),
|
|
76
|
+
onClick: r ? s : void 0,
|
|
77
|
+
disabled: r ? a : void 0,
|
|
78
|
+
type: r ? "button" : void 0,
|
|
79
|
+
...g,
|
|
80
|
+
children: [
|
|
81
|
+
o && /* @__PURE__ */ e("span", { className: "flex-shrink-0 [&>svg]:w-ico-sm [&>svg]:h-ico-sm", children: o }),
|
|
82
|
+
/* @__PURE__ */ e("span", { children: t }),
|
|
83
|
+
c && /* @__PURE__ */ e(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
type: "button",
|
|
87
|
+
"aria-label": `Remove ${t}`,
|
|
88
|
+
className: "flex-shrink-0 rounded-ds-full p-ds-01 hover:bg-layer-03 transition-colors duration-fast-01 [&>svg]:w-ico-sm [&>svg]:h-ico-sm",
|
|
89
|
+
onClick: (f) => {
|
|
90
|
+
f.stopPropagation(), c();
|
|
91
|
+
},
|
|
92
|
+
children: /* @__PURE__ */ e(p, { className: "h-ico-sm w-ico-sm" })
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
]
|
|
96
|
+
}
|
|
98
97
|
);
|
|
99
98
|
}
|
|
100
99
|
);
|
|
101
|
-
|
|
100
|
+
C.displayName = "Chip";
|
|
102
101
|
export {
|
|
103
|
-
|
|
102
|
+
C as Chip,
|
|
104
103
|
w as chipVariants
|
|
105
104
|
};
|
package/dist/ui/code.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as s } from "./lib/utils.js";
|
|
4
4
|
const n = a.forwardRef(
|
|
5
|
-
({ className:
|
|
5
|
+
({ className: r, variant: m = "inline", children: o, ...d }, t) => m === "block" ? /* @__PURE__ */ e(
|
|
6
6
|
"pre",
|
|
7
7
|
{
|
|
8
|
-
ref:
|
|
9
|
-
className:
|
|
10
|
-
"overflow-x-auto rounded-ds-md border border-border-subtle bg-layer-02 p-ds-05 font-mono text-ds-sm leading-
|
|
11
|
-
|
|
8
|
+
ref: t,
|
|
9
|
+
className: s(
|
|
10
|
+
"overflow-x-auto rounded-ds-md border border-border-subtle bg-layer-02 p-ds-05 font-mono text-ds-sm leading-ds-relaxed text-text-primary",
|
|
11
|
+
r
|
|
12
12
|
),
|
|
13
|
-
...
|
|
14
|
-
children: /* @__PURE__ */ e("code", { children:
|
|
13
|
+
...d,
|
|
14
|
+
children: /* @__PURE__ */ e("code", { children: o })
|
|
15
15
|
}
|
|
16
16
|
) : /* @__PURE__ */ e(
|
|
17
17
|
"code",
|
|
18
18
|
{
|
|
19
|
-
ref:
|
|
20
|
-
className:
|
|
19
|
+
ref: t,
|
|
20
|
+
className: s(
|
|
21
21
|
"rounded-ds-sm bg-layer-03 px-ds-02 py-ds-01 font-mono text-ds-sm text-text-primary",
|
|
22
|
-
|
|
22
|
+
r
|
|
23
23
|
),
|
|
24
|
-
...
|
|
25
|
-
children:
|
|
24
|
+
...d,
|
|
25
|
+
children: o
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
);
|
package/dist/ui/collapsible.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import * as React from 'react';
|
|
2
|
-
import * as CollapsiblePrimitive from '
|
|
3
|
+
import * as CollapsiblePrimitive from '../primitives/react-collapsible';
|
|
3
4
|
declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
5
|
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
6
|
declare const CollapsibleContent: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/ui/collapsible.js
CHANGED
package/dist/ui/combobox.d.ts
CHANGED
package/dist/ui/combobox.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as r, jsxs as d, Fragment as F } from "react/jsx-runtime";
|
|
2
3
|
import * as a from "react";
|
|
3
4
|
import { Root as V, Trigger as B, Portal as G, Content as U } from "../primitives/react-popover.js";
|
|
@@ -187,7 +188,7 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
187
188
|
),
|
|
188
189
|
children: [
|
|
189
190
|
X(),
|
|
190
|
-
/* @__PURE__ */ r(q, { className: x("ml-ds-02 h-ico-sm w-ico-sm shrink-0 opacity-
|
|
191
|
+
/* @__PURE__ */ r(q, { className: x("ml-ds-02 h-ico-sm w-ico-sm shrink-0 opacity-[0.5] transition-transform duration-fast-01", h && "rotate-180"), "aria-hidden": "true" })
|
|
191
192
|
]
|
|
192
193
|
}
|
|
193
194
|
) }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import * as React from "react";
|
|
2
|
-
import * as ContextMenuPrimitive from "
|
|
3
|
+
import * as ContextMenuPrimitive from "../primitives/react-context-menu";
|
|
3
4
|
declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
4
5
|
declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
5
6
|
declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/ui/context-menu.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
3
|
import * as n from "react";
|
|
3
4
|
import { Root as N, Group as C, Portal as l, RadioGroup as g, Sub as w, Trigger as R, CheckboxItem as m, ItemIndicator as c, Content as p, Item as u, Label as f, RadioItem as x, Separator as b, SubContent as y, SubTrigger as h } from "../primitives/react-context-menu.js";
|
|
@@ -107,7 +108,7 @@ const P = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ o(
|
|
|
107
108
|
b,
|
|
108
109
|
{
|
|
109
110
|
ref: a,
|
|
110
|
-
className: d("-mx-
|
|
111
|
+
className: d("-mx-ds-01 my-ds-02 h-px bg-border-subtle", e),
|
|
111
112
|
...t
|
|
112
113
|
}
|
|
113
114
|
));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
3
|
import { IconSearch as x, IconColumns3 as C, IconTextResize as y, IconDownload as v } from "@tabler/icons-react";
|
|
3
4
|
import { DropdownMenu as w, DropdownMenuTrigger as D, DropdownMenuContent as N, DropdownMenuLabel as T, DropdownMenuSeparator as k, DropdownMenuCheckboxItem as I } from "./dropdown-menu.js";
|
package/dist/ui/data-table.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/ui/data-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAA;AACvE,OAAO,EACL,KAAK,SAAS,EAiBf,MAAM,uBAAuB,CAAA;AAqB9B,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAWrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,WAAW,cAAc,CAAC,KAAK,EAAE,MAAM;IAC3C,kDAAkD;IAClD,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAA;IACnC,eAAe;IACf,IAAI,EAAE,KAAK,EAAE,CAAA;IACb,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iDAAiD;IACjD,SAAS,CAAC,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client";
|
|
1
2
|
import { jsxs as r, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { useReactTable as De, getExpandedRowModel as Ie, getPaginationRowModel as Re, getFilteredRowModel as Fe, getSortedRowModel as
|
|
4
|
-
import { useVirtualizer as
|
|
5
|
-
import { IconArrowUp as
|
|
6
|
-
import { Table as He, TableHeader as je, TableRow as y, TableHead as U, TableBody as
|
|
3
|
+
import Ne, { useState as d, useRef as J, useEffect as Q, useCallback as ve } from "react";
|
|
4
|
+
import { useReactTable as De, getExpandedRowModel as Ie, getPaginationRowModel as Re, getFilteredRowModel as Fe, getSortedRowModel as Pe, getCoreRowModel as ke, flexRender as M } from "@tanstack/react-table";
|
|
5
|
+
import { useVirtualizer as Ee } from "@tanstack/react-virtual";
|
|
6
|
+
import { IconArrowUp as ze, IconArrowDown as Me, IconArrowsSort as Te, IconSearch as Ve, IconChevronLeft as $e, IconChevronRight as L } from "@tabler/icons-react";
|
|
7
|
+
import { Table as He, TableHeader as je, TableRow as y, TableHead as U, TableBody as T, TableCell as V } from "./table.js";
|
|
7
8
|
import { Checkbox as q } from "./checkbox.js";
|
|
8
9
|
import { cn as i } from "./lib/utils.js";
|
|
9
10
|
import { DataTableToolbar as _e } from "./data-table-toolbar.js";
|
|
@@ -59,25 +60,25 @@ function Ge({
|
|
|
59
60
|
pageSize: C,
|
|
60
61
|
pageSizeOptions: W,
|
|
61
62
|
selectable: I = !1,
|
|
62
|
-
onSelectionChange:
|
|
63
|
+
onSelectionChange: R,
|
|
63
64
|
toolbar: $ = !1,
|
|
64
65
|
density: X = "standard",
|
|
65
66
|
columnPinning: p,
|
|
66
67
|
editable: Z = !1,
|
|
67
|
-
onCellEdit:
|
|
68
|
-
expandable:
|
|
68
|
+
onCellEdit: F,
|
|
69
|
+
expandable: w = !1,
|
|
69
70
|
renderExpanded: H,
|
|
70
71
|
virtualRows: m = !1,
|
|
71
72
|
virtualRowHeight: ee = 48,
|
|
72
73
|
maxHeight: te = 600
|
|
73
74
|
}) {
|
|
74
|
-
const [le, ne] = d([]), [oe, ae] = d([]), [
|
|
75
|
+
const [le, ne] = d([]), [oe, ae] = d([]), [P, k] = d(""), [se, re] = d({
|
|
75
76
|
pageIndex: 0,
|
|
76
77
|
pageSize: C ?? 10
|
|
77
78
|
}), [j, de] = d({}), [ie, ce] = d({}), [_, ue] = d({
|
|
78
79
|
left: (p == null ? void 0 : p.left) ?? [],
|
|
79
80
|
right: (p == null ? void 0 : p.right) ?? []
|
|
80
|
-
}), [A, me] = d(X), [b,
|
|
81
|
+
}), [A, me] = d(X), [b, E] = d(null), [ge, fe] = d({}), B = J(null), pe = {
|
|
81
82
|
id: "_select",
|
|
82
83
|
header: ({ table: e }) => /* @__PURE__ */ l(
|
|
83
84
|
q,
|
|
@@ -108,13 +109,13 @@ function Ge({
|
|
|
108
109
|
type: "button",
|
|
109
110
|
onClick: () => e.toggleExpanded(),
|
|
110
111
|
"aria-label": e.getIsExpanded() ? "Collapse row" : "Expand row",
|
|
111
|
-
className: "flex items-center justify-center p-ds-01 rounded hover:bg-layer-02 transition-colors",
|
|
112
|
+
className: "flex items-center justify-center p-ds-01 rounded-ds-sm hover:bg-layer-02 transition-colors",
|
|
112
113
|
children: /* @__PURE__ */ l(
|
|
113
114
|
L,
|
|
114
115
|
{
|
|
115
116
|
size: 16,
|
|
116
117
|
className: i(
|
|
117
|
-
"transition-transform duration-
|
|
118
|
+
"transition-transform duration-moderate-02",
|
|
118
119
|
e.getIsExpanded() && "rotate-90"
|
|
119
120
|
),
|
|
120
121
|
"aria-hidden": "true"
|
|
@@ -125,29 +126,29 @@ function Ge({
|
|
|
125
126
|
enableSorting: !1,
|
|
126
127
|
enableColumnFilter: !1,
|
|
127
128
|
enableHiding: !1
|
|
128
|
-
},
|
|
129
|
+
}, z = [
|
|
129
130
|
...I ? [pe] : [],
|
|
130
|
-
...
|
|
131
|
+
...w ? [be] : [],
|
|
131
132
|
...v
|
|
132
133
|
], g = {
|
|
133
134
|
columnVisibility: ie,
|
|
134
135
|
columnPinning: _
|
|
135
136
|
};
|
|
136
|
-
h && (g.sorting = le), (c || u) && (g.columnFilters = oe, g.globalFilter =
|
|
137
|
-
const
|
|
137
|
+
h && (g.sorting = le), (c || u) && (g.columnFilters = oe, g.globalFilter = P), s && (g.pagination = se), I && (g.rowSelection = j), w && (g.expanded = ge);
|
|
138
|
+
const n = De({
|
|
138
139
|
data: S,
|
|
139
|
-
columns:
|
|
140
|
+
columns: z,
|
|
140
141
|
state: g,
|
|
141
142
|
onColumnVisibilityChange: ce,
|
|
142
143
|
onColumnPinningChange: ue,
|
|
143
|
-
getCoreRowModel:
|
|
144
|
+
getCoreRowModel: ke(),
|
|
144
145
|
...h && {
|
|
145
146
|
onSortingChange: ne,
|
|
146
|
-
getSortedRowModel:
|
|
147
|
+
getSortedRowModel: Pe()
|
|
147
148
|
},
|
|
148
149
|
...(c || u) && {
|
|
149
150
|
onColumnFiltersChange: ae,
|
|
150
|
-
onGlobalFilterChange:
|
|
151
|
+
onGlobalFilterChange: k,
|
|
151
152
|
getFilteredRowModel: Fe()
|
|
152
153
|
},
|
|
153
154
|
...s && {
|
|
@@ -158,20 +159,20 @@ function Ge({
|
|
|
158
159
|
onRowSelectionChange: de,
|
|
159
160
|
enableRowSelection: !0
|
|
160
161
|
},
|
|
161
|
-
...
|
|
162
|
+
...w && {
|
|
162
163
|
onExpandedChange: fe,
|
|
163
164
|
getExpandedRowModel: Ie()
|
|
164
165
|
}
|
|
165
166
|
});
|
|
166
167
|
Q(() => {
|
|
167
|
-
if (
|
|
168
|
-
const e =
|
|
169
|
-
|
|
168
|
+
if (R) {
|
|
169
|
+
const e = n.getFilteredSelectedRowModel().rows.map((t) => t.original);
|
|
170
|
+
R(e);
|
|
170
171
|
}
|
|
171
|
-
}, [j]);
|
|
172
|
+
}, [j, R, n]);
|
|
172
173
|
function G(e) {
|
|
173
|
-
const { left: t = [], right: a = [] } = _,
|
|
174
|
-
return
|
|
174
|
+
const { left: t = [], right: a = [] } = _, o = t.indexOf(e), f = a.indexOf(e);
|
|
175
|
+
return o !== -1 ? {
|
|
175
176
|
className: "sticky bg-layer-01 z-raised",
|
|
176
177
|
style: { left: 0 }
|
|
177
178
|
} : f !== -1 ? {
|
|
@@ -181,13 +182,13 @@ function Ge({
|
|
|
181
182
|
}
|
|
182
183
|
function xe(e) {
|
|
183
184
|
if (!Z || e === "_select" || e === "_expand") return !1;
|
|
184
|
-
const t =
|
|
185
|
+
const t = n.getColumn(e);
|
|
185
186
|
if (!t) return !1;
|
|
186
187
|
const a = t.columnDef.meta;
|
|
187
188
|
return (a == null ? void 0 : a.enableEditing) !== !1;
|
|
188
189
|
}
|
|
189
|
-
const he = Ae[A],
|
|
190
|
-
count: m ?
|
|
190
|
+
const he = Ae[A], N = n.getRowModel().rows, O = Ee({
|
|
191
|
+
count: m ? N.length : 0,
|
|
191
192
|
getScrollElement: () => B.current,
|
|
192
193
|
estimateSize: () => ee,
|
|
193
194
|
overscan: 10
|
|
@@ -200,10 +201,10 @@ function Ge({
|
|
|
200
201
|
"data-state": e.getIsSelected() && "selected",
|
|
201
202
|
style: t,
|
|
202
203
|
className: m ? "absolute w-full flex" : void 0,
|
|
203
|
-
children: a.map((
|
|
204
|
-
const f = G(
|
|
204
|
+
children: a.map((o) => {
|
|
205
|
+
const f = G(o.column.id), Ce = (b == null ? void 0 : b.rowIndex) === e.index && (b == null ? void 0 : b.columnId) === o.column.id;
|
|
205
206
|
return /* @__PURE__ */ l(
|
|
206
|
-
|
|
207
|
+
V,
|
|
207
208
|
{
|
|
208
209
|
className: i(
|
|
209
210
|
he,
|
|
@@ -212,23 +213,23 @@ function Ge({
|
|
|
212
213
|
),
|
|
213
214
|
style: f.style,
|
|
214
215
|
onDoubleClick: () => {
|
|
215
|
-
xe(
|
|
216
|
+
xe(o.column.id) && E({
|
|
216
217
|
rowIndex: e.index,
|
|
217
|
-
columnId:
|
|
218
|
+
columnId: o.column.id
|
|
218
219
|
});
|
|
219
220
|
},
|
|
220
221
|
children: Ce ? /* @__PURE__ */ l(
|
|
221
222
|
Be,
|
|
222
223
|
{
|
|
223
|
-
initialValue: String(
|
|
224
|
-
onSave: (
|
|
225
|
-
|
|
224
|
+
initialValue: String(o.getValue() ?? ""),
|
|
225
|
+
onSave: (we) => {
|
|
226
|
+
F == null || F(e.index, o.column.id, we), E(null);
|
|
226
227
|
},
|
|
227
|
-
onCancel: () =>
|
|
228
|
+
onCancel: () => E(null)
|
|
228
229
|
}
|
|
229
|
-
) :
|
|
230
|
+
) : M(o.column.columnDef.cell, o.getContext())
|
|
230
231
|
},
|
|
231
|
-
|
|
232
|
+
o.id
|
|
232
233
|
);
|
|
233
234
|
})
|
|
234
235
|
},
|
|
@@ -236,15 +237,15 @@ function Ge({
|
|
|
236
237
|
);
|
|
237
238
|
}
|
|
238
239
|
function ye(e, t) {
|
|
239
|
-
return !
|
|
240
|
+
return !w || !e.getIsExpanded() || !H ? null : /* @__PURE__ */ l(
|
|
240
241
|
y,
|
|
241
242
|
{
|
|
242
243
|
style: t,
|
|
243
244
|
className: m ? "absolute w-full flex" : void 0,
|
|
244
245
|
children: /* @__PURE__ */ l(
|
|
245
|
-
|
|
246
|
+
V,
|
|
246
247
|
{
|
|
247
|
-
colSpan:
|
|
248
|
+
colSpan: z.length,
|
|
248
249
|
className: i(
|
|
249
250
|
"bg-layer-02 p-ds-05",
|
|
250
251
|
m && "flex-1"
|
|
@@ -257,11 +258,11 @@ function Ge({
|
|
|
257
258
|
);
|
|
258
259
|
}
|
|
259
260
|
function Se() {
|
|
260
|
-
if (!
|
|
261
|
-
return /* @__PURE__ */ l(
|
|
262
|
-
|
|
261
|
+
if (!N.length)
|
|
262
|
+
return /* @__PURE__ */ l(T, { children: /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
263
|
+
V,
|
|
263
264
|
{
|
|
264
|
-
colSpan:
|
|
265
|
+
colSpan: z.length,
|
|
265
266
|
className: "h-24 text-center text-text-tertiary",
|
|
266
267
|
children: x || "No results."
|
|
267
268
|
}
|
|
@@ -269,15 +270,15 @@ function Ge({
|
|
|
269
270
|
if (m) {
|
|
270
271
|
const e = O.getVirtualItems(), t = O.getTotalSize();
|
|
271
272
|
return /* @__PURE__ */ l(
|
|
272
|
-
|
|
273
|
+
T,
|
|
273
274
|
{
|
|
274
275
|
style: {
|
|
275
276
|
height: `${t}px`,
|
|
276
277
|
position: "relative"
|
|
277
278
|
},
|
|
278
279
|
children: e.map((a) => {
|
|
279
|
-
const
|
|
280
|
-
return Y(
|
|
280
|
+
const o = N[a.index];
|
|
281
|
+
return Y(o, {
|
|
281
282
|
position: "absolute",
|
|
282
283
|
top: 0,
|
|
283
284
|
left: 0,
|
|
@@ -289,15 +290,15 @@ function Ge({
|
|
|
289
290
|
}
|
|
290
291
|
);
|
|
291
292
|
}
|
|
292
|
-
return /* @__PURE__ */ l(
|
|
293
|
+
return /* @__PURE__ */ l(T, { children: N.map((e) => /* @__PURE__ */ r(Ne.Fragment, { children: [
|
|
293
294
|
Y(e),
|
|
294
295
|
ye(e)
|
|
295
296
|
] }, e.id)) });
|
|
296
297
|
}
|
|
297
298
|
const K = /* @__PURE__ */ r(He, { children: [
|
|
298
299
|
/* @__PURE__ */ r(je, { children: [
|
|
299
|
-
|
|
300
|
-
const a = h && t.column.getCanSort(),
|
|
300
|
+
n.getHeaderGroups().map((e) => /* @__PURE__ */ l(y, { children: e.headers.map((t) => {
|
|
301
|
+
const a = h && t.column.getCanSort(), o = t.column.getIsSorted(), f = G(t.column.id);
|
|
301
302
|
return /* @__PURE__ */ l(
|
|
302
303
|
U,
|
|
303
304
|
{
|
|
@@ -310,38 +311,38 @@ function Ge({
|
|
|
310
311
|
className: i(
|
|
311
312
|
"flex items-center gap-ds-01 font-medium",
|
|
312
313
|
"cursor-pointer select-none",
|
|
313
|
-
"-ml-ds-01 rounded px-ds-01 py-ds-01",
|
|
314
|
+
"-ml-ds-01 rounded-ds-sm px-ds-01 py-ds-01",
|
|
314
315
|
"hover:bg-layer-02 transition-colors"
|
|
315
316
|
),
|
|
316
317
|
onClick: t.column.getToggleSortingHandler(),
|
|
317
318
|
"aria-label": `Sort by ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : t.column.id}`,
|
|
318
319
|
children: [
|
|
319
|
-
|
|
320
|
+
M(
|
|
320
321
|
t.column.columnDef.header,
|
|
321
322
|
t.getContext()
|
|
322
323
|
),
|
|
323
|
-
|
|
324
|
-
|
|
324
|
+
o === "asc" ? /* @__PURE__ */ l(
|
|
325
|
+
ze,
|
|
325
326
|
{
|
|
326
|
-
className: "
|
|
327
|
+
className: "h-ico-sm w-ico-sm text-text-secondary",
|
|
327
328
|
"aria-hidden": "true"
|
|
328
329
|
}
|
|
329
|
-
) :
|
|
330
|
+
) : o === "desc" ? /* @__PURE__ */ l(
|
|
330
331
|
Me,
|
|
331
332
|
{
|
|
332
|
-
className: "
|
|
333
|
+
className: "h-ico-sm w-ico-sm text-text-secondary",
|
|
333
334
|
"aria-hidden": "true"
|
|
334
335
|
}
|
|
335
336
|
) : /* @__PURE__ */ l(
|
|
336
337
|
Te,
|
|
337
338
|
{
|
|
338
|
-
className: "
|
|
339
|
+
className: "h-ico-sm w-ico-sm text-text-tertiary",
|
|
339
340
|
"aria-hidden": "true"
|
|
340
341
|
}
|
|
341
342
|
)
|
|
342
343
|
]
|
|
343
344
|
}
|
|
344
|
-
) :
|
|
345
|
+
) : M(
|
|
345
346
|
t.column.columnDef.header,
|
|
346
347
|
t.getContext()
|
|
347
348
|
)
|
|
@@ -349,7 +350,7 @@ function Ge({
|
|
|
349
350
|
t.id
|
|
350
351
|
);
|
|
351
352
|
}) }, e.id)),
|
|
352
|
-
c &&
|
|
353
|
+
c && n.getHeaderGroups().map((e) => /* @__PURE__ */ l(y, { children: e.headers.map((t) => /* @__PURE__ */ l(U, { className: "py-ds-01", children: t.isPlaceholder || t.column.columnDef.enableColumnFilter === !1 ? null : /* @__PURE__ */ l(
|
|
353
354
|
"input",
|
|
354
355
|
{
|
|
355
356
|
type: "text",
|
|
@@ -373,10 +374,10 @@ function Ge({
|
|
|
373
374
|
$ && /* @__PURE__ */ l(
|
|
374
375
|
_e,
|
|
375
376
|
{
|
|
376
|
-
table:
|
|
377
|
+
table: n,
|
|
377
378
|
globalFilter: u,
|
|
378
|
-
globalFilterValue:
|
|
379
|
-
onGlobalFilterChange:
|
|
379
|
+
globalFilterValue: P,
|
|
380
|
+
onGlobalFilterChange: k,
|
|
380
381
|
density: A,
|
|
381
382
|
onDensityChange: me
|
|
382
383
|
}
|
|
@@ -394,8 +395,8 @@ function Ge({
|
|
|
394
395
|
"input",
|
|
395
396
|
{
|
|
396
397
|
type: "text",
|
|
397
|
-
value:
|
|
398
|
-
onChange: (e) =>
|
|
398
|
+
value: P,
|
|
399
|
+
onChange: (e) => k(e.target.value),
|
|
399
400
|
placeholder: "Search all columns...",
|
|
400
401
|
"aria-label": "Search all columns",
|
|
401
402
|
className: i(
|
|
@@ -416,16 +417,16 @@ function Ge({
|
|
|
416
417
|
) : K,
|
|
417
418
|
s && /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-ds-03 py-ds-04 border-t border-border-subtle", children: [
|
|
418
419
|
/* @__PURE__ */ r("span", { className: "text-ds-sm text-text-secondary", children: [
|
|
419
|
-
|
|
420
|
+
n.getFilteredRowModel().rows.length,
|
|
420
421
|
" total rows"
|
|
421
422
|
] }),
|
|
422
423
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-03", children: [
|
|
423
424
|
/* @__PURE__ */ l(
|
|
424
425
|
"select",
|
|
425
426
|
{
|
|
426
|
-
value:
|
|
427
|
+
value: n.getState().pagination.pageSize,
|
|
427
428
|
onChange: (e) => {
|
|
428
|
-
|
|
429
|
+
n.setPageSize(Number(e.target.value));
|
|
429
430
|
},
|
|
430
431
|
"aria-label": "Rows per page",
|
|
431
432
|
className: i(
|
|
@@ -444,8 +445,8 @@ function Ge({
|
|
|
444
445
|
"button",
|
|
445
446
|
{
|
|
446
447
|
type: "button",
|
|
447
|
-
disabled: !
|
|
448
|
-
onClick: () =>
|
|
448
|
+
disabled: !n.getCanPreviousPage(),
|
|
449
|
+
onClick: () => n.previousPage(),
|
|
449
450
|
"aria-label": "Previous page",
|
|
450
451
|
className: i(
|
|
451
452
|
"h-ds-sm w-ds-sm flex items-center justify-center",
|
|
@@ -459,17 +460,17 @@ function Ge({
|
|
|
459
460
|
),
|
|
460
461
|
/* @__PURE__ */ r("span", { className: "text-ds-sm text-text-secondary", children: [
|
|
461
462
|
"Page ",
|
|
462
|
-
|
|
463
|
+
n.getState().pagination.pageIndex + 1,
|
|
463
464
|
" of",
|
|
464
465
|
" ",
|
|
465
|
-
|
|
466
|
+
n.getPageCount()
|
|
466
467
|
] }),
|
|
467
468
|
/* @__PURE__ */ l(
|
|
468
469
|
"button",
|
|
469
470
|
{
|
|
470
471
|
type: "button",
|
|
471
|
-
disabled: !
|
|
472
|
-
onClick: () =>
|
|
472
|
+
disabled: !n.getCanNextPage(),
|
|
473
|
+
onClick: () => n.nextPage(),
|
|
473
474
|
"aria-label": "Next page",
|
|
474
475
|
className: i(
|
|
475
476
|
"h-ds-sm w-ds-sm flex items-center justify-center",
|
package/dist/ui/dialog.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import * as React from 'react';
|
|
2
|
-
import * as DialogPrimitive from '
|
|
3
|
+
import * as DialogPrimitive from '../primitives/react-dialog';
|
|
3
4
|
/**
|
|
4
5
|
* Dialog compound component — accessible modal overlay with focus trap and Escape dismissal.
|
|
5
6
|
*
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import * as React from 'react';
|
|
2
|
-
import * as DropdownMenuPrimitive from '
|
|
3
|
+
import * as DropdownMenuPrimitive from '../primitives/react-dropdown-menu';
|
|
3
4
|
/**
|
|
4
5
|
* DropdownMenu compound component — accessible floating menu triggered by a button, with full
|
|
5
6
|
* keyboard navigation and focus management.
|