@devalok/shilp-sutra 0.22.2 → 0.23.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/_chunks/tree-view.js +26 -26
- package/dist/_chunks/use-calendar.js +106 -106
- package/dist/composed/activity-feed.js +10 -10
- package/dist/composed/avatar-group.js +74 -75
- package/dist/composed/command-palette.js +8 -8
- package/dist/composed/content-card.js +10 -10
- package/dist/composed/empty-state.js +6 -6
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/loading-skeleton.js +83 -83
- package/dist/composed/member-picker.js +6 -6
- package/dist/composed/page-skeletons.js +5 -5
- package/dist/composed/rich-text-editor.js +63 -63
- package/dist/composed/schedule-view.js +26 -26
- package/dist/composed/status-badge.js +8 -8
- package/dist/shell/bottom-navbar.js +4 -4
- package/dist/shell/notification-center.js +29 -29
- package/dist/shell/notification-preferences.js +2 -2
- package/dist/shell/sidebar.js +6 -6
- package/dist/shell/top-bar.js +71 -71
- package/dist/tailwind/index.cjs +33 -11
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +33 -11
- package/dist/tokens/primitives.css +2 -0
- package/dist/tokens/semantic.css +83 -14
- package/dist/tokens/typography.css +1 -1
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/alert-dialog.js +32 -32
- package/dist/ui/alert.js +12 -12
- package/dist/ui/autocomplete.js +16 -16
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +81 -74
- package/dist/ui/badge.js +2 -2
- package/dist/ui/banner.js +1 -1
- package/dist/ui/button.js +8 -8
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.js +10 -10
- package/dist/ui/charts/index.js +312 -312
- package/dist/ui/checkbox.js +3 -3
- package/dist/ui/chip.js +4 -4
- package/dist/ui/code.js +2 -2
- package/dist/ui/color-input.js +1 -1
- package/dist/ui/combobox.js +37 -37
- package/dist/ui/context-menu.js +6 -6
- package/dist/ui/data-table-toolbar.js +18 -18
- package/dist/ui/data-table.js +132 -132
- package/dist/ui/dialog.js +12 -12
- package/dist/ui/dropdown-menu.js +67 -67
- package/dist/ui/file-upload.js +3 -3
- package/dist/ui/hover-card.js +13 -13
- package/dist/ui/input-otp.js +9 -9
- package/dist/ui/input.js +10 -10
- package/dist/ui/menubar.js +33 -33
- package/dist/ui/navigation-menu.js +52 -52
- package/dist/ui/number-input.js +14 -14
- package/dist/ui/pagination.js +25 -25
- package/dist/ui/popover.js +17 -17
- package/dist/ui/progress.js +1 -1
- package/dist/ui/radio.js +2 -2
- package/dist/ui/search-input.js +3 -3
- package/dist/ui/segmented-control.d.ts +1 -1
- package/dist/ui/segmented-control.js +16 -16
- package/dist/ui/select.js +17 -17
- package/dist/ui/sheet.js +21 -21
- package/dist/ui/sidebar.js +13 -13
- package/dist/ui/slider.js +2 -2
- package/dist/ui/stat-card.js +52 -52
- package/dist/ui/stepper.js +1 -1
- package/dist/ui/switch.js +11 -11
- package/dist/ui/table.js +19 -19
- package/dist/ui/tabs.js +2 -2
- package/dist/ui/textarea.js +6 -6
- package/dist/ui/toast.js +3 -3
- package/dist/ui/toggle.js +7 -7
- package/dist/ui/tooltip.js +17 -17
- package/docs/components/composed/avatar-group.md +5 -0
- package/docs/components/ui/avatar.md +4 -0
- package/llms-full.txt +10 -1
- package/llms.txt +66 -5
- package/package.json +1 -1
package/dist/ui/menubar.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
import { aW as p, aX as f, aY as b, aZ as y, a_ as g, a$ as N, b0 as x, b1 as h, b2 as v, b3 as M, b4 as w, b5 as R, b6 as j, b7 as G, b8 as P, b9 as T } from "../_chunks/primitives.js";
|
|
5
5
|
import { IconChevronRight as z, IconCheck as A, IconCircle as L } from "@tabler/icons-react";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as d } from "./lib/utils.js";
|
|
7
7
|
import { tweens as C, springs as S } from "./lib/motion.js";
|
|
8
8
|
import { A as U, m as I } from "../_chunks/framer.js";
|
|
9
9
|
const k = o.createContext(!1), W = (e) => /* @__PURE__ */ r(P, { ...e });
|
|
@@ -14,11 +14,11 @@ const re = j, te = g, X = ({
|
|
|
14
14
|
onOpenChange: s,
|
|
15
15
|
...t
|
|
16
16
|
}) => {
|
|
17
|
-
const [
|
|
17
|
+
const [n, c] = o.useState(a), i = e !== void 0, u = i ? e : n, _ = o.useCallback(
|
|
18
18
|
(m) => {
|
|
19
|
-
|
|
19
|
+
i || c(m), s == null || s(m);
|
|
20
20
|
},
|
|
21
|
-
[
|
|
21
|
+
[i, s]
|
|
22
22
|
);
|
|
23
23
|
return /* @__PURE__ */ r(k.Provider, { value: u, children: /* @__PURE__ */ r(T, { open: u, onOpenChange: _, ...t }) });
|
|
24
24
|
};
|
|
@@ -27,8 +27,8 @@ const oe = G, Y = o.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ r(
|
|
|
27
27
|
p,
|
|
28
28
|
{
|
|
29
29
|
ref: s,
|
|
30
|
-
className:
|
|
31
|
-
"flex h-ds-sm-plus items-center space-x-ds-02 rounded-ds-lg border border-surface-border-strong bg-surface-
|
|
30
|
+
className: d(
|
|
31
|
+
"flex h-ds-sm-plus items-center space-x-ds-02 rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 shadow-raised",
|
|
32
32
|
e
|
|
33
33
|
),
|
|
34
34
|
...a
|
|
@@ -39,20 +39,20 @@ const Z = o.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ r(
|
|
|
39
39
|
f,
|
|
40
40
|
{
|
|
41
41
|
ref: s,
|
|
42
|
-
className:
|
|
43
|
-
"flex cursor-default select-none items-center rounded-ds-sm px-ds-04 py-ds-02 text-ds-md font-medium outline-none transition-colors hover:bg-surface-
|
|
42
|
+
className: d(
|
|
43
|
+
"flex cursor-default select-none items-center rounded-ds-sm px-ds-04 py-ds-02 text-ds-md font-medium outline-none transition-colors hover:bg-surface-raised-hover focus-visible:bg-surface-raised-hover data-[state=open]:bg-surface-raised-hover",
|
|
44
44
|
e
|
|
45
45
|
),
|
|
46
46
|
...a
|
|
47
47
|
}
|
|
48
48
|
));
|
|
49
49
|
Z.displayName = f.displayName;
|
|
50
|
-
const $ = o.forwardRef(({ className: e, inset: a, children: s, ...t },
|
|
50
|
+
const $ = o.forwardRef(({ className: e, inset: a, children: s, ...t }, n) => /* @__PURE__ */ l(
|
|
51
51
|
b,
|
|
52
52
|
{
|
|
53
|
-
ref:
|
|
54
|
-
className:
|
|
55
|
-
"flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-none focus:bg-surface-
|
|
53
|
+
ref: n,
|
|
54
|
+
className: d(
|
|
55
|
+
"flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-none focus:bg-surface-raised data-[state=open]:bg-surface-raised [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0",
|
|
56
56
|
a && "pl-ds-07",
|
|
57
57
|
e
|
|
58
58
|
),
|
|
@@ -65,8 +65,8 @@ const $ = o.forwardRef(({ className: e, inset: a, children: s, ...t }, d) => /*
|
|
|
65
65
|
));
|
|
66
66
|
$.displayName = b.displayName;
|
|
67
67
|
const q = o.forwardRef(({ className: e, children: a, ...s }, t) => {
|
|
68
|
-
const
|
|
69
|
-
return /* @__PURE__ */ r(U, { children:
|
|
68
|
+
const n = o.useContext(k);
|
|
69
|
+
return /* @__PURE__ */ r(U, { children: n && /* @__PURE__ */ r(
|
|
70
70
|
y,
|
|
71
71
|
{
|
|
72
72
|
ref: t,
|
|
@@ -80,8 +80,8 @@ const q = o.forwardRef(({ className: e, children: a, ...s }, t) => {
|
|
|
80
80
|
animate: { opacity: 1, scale: 1 },
|
|
81
81
|
exit: { opacity: 0, scale: 0.95 },
|
|
82
82
|
transition: { ...S.snappy, opacity: C.fade },
|
|
83
|
-
className:
|
|
84
|
-
"z-popover min-w-[8rem] overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-
|
|
83
|
+
className: d(
|
|
84
|
+
"z-popover min-w-[8rem] overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 text-surface-fg shadow-floating",
|
|
85
85
|
e
|
|
86
86
|
),
|
|
87
87
|
children: a
|
|
@@ -92,15 +92,15 @@ const q = o.forwardRef(({ className: e, children: a, ...s }, t) => {
|
|
|
92
92
|
});
|
|
93
93
|
q.displayName = y.displayName;
|
|
94
94
|
const B = o.forwardRef(
|
|
95
|
-
({ className: e, align: a = "start", alignOffset: s = -4, sideOffset: t = 8, children:
|
|
95
|
+
({ className: e, align: a = "start", alignOffset: s = -4, sideOffset: t = 8, children: n, ...c }, i) => /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
|
|
96
96
|
N,
|
|
97
97
|
{
|
|
98
|
-
ref:
|
|
98
|
+
ref: i,
|
|
99
99
|
align: a,
|
|
100
100
|
alignOffset: s,
|
|
101
101
|
sideOffset: t,
|
|
102
102
|
asChild: !0,
|
|
103
|
-
...
|
|
103
|
+
...c,
|
|
104
104
|
children: /* @__PURE__ */ r(
|
|
105
105
|
I.div,
|
|
106
106
|
{
|
|
@@ -108,11 +108,11 @@ const B = o.forwardRef(
|
|
|
108
108
|
animate: { opacity: 1, scale: 1 },
|
|
109
109
|
exit: { opacity: 0, scale: 0.95 },
|
|
110
110
|
transition: { ...S.snappy, opacity: C.fade },
|
|
111
|
-
className:
|
|
112
|
-
"z-popover min-w-[12rem] rounded-ds-lg border border-surface-border-strong bg-surface-
|
|
111
|
+
className: d(
|
|
112
|
+
"z-popover min-w-[12rem] rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 text-surface-fg shadow-floating",
|
|
113
113
|
e
|
|
114
114
|
),
|
|
115
|
-
children:
|
|
115
|
+
children: n
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
}
|
|
@@ -123,8 +123,8 @@ const D = o.forwardRef(({ className: e, inset: a, ...s }, t) => /* @__PURE__ */
|
|
|
123
123
|
x,
|
|
124
124
|
{
|
|
125
125
|
ref: t,
|
|
126
|
-
className:
|
|
127
|
-
"relative flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-none transition-colors focus:bg-surface-
|
|
126
|
+
className: d(
|
|
127
|
+
"relative flex cursor-default select-none items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-md outline-none transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
|
|
128
128
|
a && "pl-ds-07",
|
|
129
129
|
e
|
|
130
130
|
),
|
|
@@ -132,12 +132,12 @@ const D = o.forwardRef(({ className: e, inset: a, ...s }, t) => /* @__PURE__ */
|
|
|
132
132
|
}
|
|
133
133
|
));
|
|
134
134
|
D.displayName = x.displayName;
|
|
135
|
-
const E = o.forwardRef(({ className: e, children: a, checked: s, ...t },
|
|
135
|
+
const E = o.forwardRef(({ className: e, children: a, checked: s, ...t }, n) => /* @__PURE__ */ l(
|
|
136
136
|
h,
|
|
137
137
|
{
|
|
138
|
-
ref:
|
|
139
|
-
className:
|
|
140
|
-
"relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-none transition-colors focus:bg-surface-
|
|
138
|
+
ref: n,
|
|
139
|
+
className: d(
|
|
140
|
+
"relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-none transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled",
|
|
141
141
|
e
|
|
142
142
|
),
|
|
143
143
|
checked: s,
|
|
@@ -153,8 +153,8 @@ const F = o.forwardRef(({ className: e, children: a, ...s }, t) => /* @__PURE__
|
|
|
153
153
|
M,
|
|
154
154
|
{
|
|
155
155
|
ref: t,
|
|
156
|
-
className:
|
|
157
|
-
"relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-none transition-colors focus:bg-surface-
|
|
156
|
+
className: d(
|
|
157
|
+
"relative flex cursor-default select-none items-center rounded-ds-md py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-none transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled",
|
|
158
158
|
e
|
|
159
159
|
),
|
|
160
160
|
...s,
|
|
@@ -169,7 +169,7 @@ const H = o.forwardRef(({ className: e, inset: a, ...s }, t) => /* @__PURE__ */
|
|
|
169
169
|
w,
|
|
170
170
|
{
|
|
171
171
|
ref: t,
|
|
172
|
-
className:
|
|
172
|
+
className: d(
|
|
173
173
|
"px-ds-03 py-ds-02b text-ds-md font-semibold",
|
|
174
174
|
a && "pl-ds-07",
|
|
175
175
|
e
|
|
@@ -182,7 +182,7 @@ const J = o.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ r(
|
|
|
182
182
|
R,
|
|
183
183
|
{
|
|
184
184
|
ref: s,
|
|
185
|
-
className:
|
|
185
|
+
className: d("-mx-ds-01 my-ds-02 h-px bg-surface-border", e),
|
|
186
186
|
...a
|
|
187
187
|
}
|
|
188
188
|
));
|
|
@@ -193,7 +193,7 @@ const K = ({
|
|
|
193
193
|
}) => /* @__PURE__ */ r(
|
|
194
194
|
"span",
|
|
195
195
|
{
|
|
196
|
-
className:
|
|
196
|
+
className: d(
|
|
197
197
|
"ml-auto text-ds-sm text-surface-fg-subtle",
|
|
198
198
|
e
|
|
199
199
|
),
|
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as v, jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import * as a from "react";
|
|
4
|
-
import { ba as
|
|
4
|
+
import { ba as h, bb as N, bc as w, bd as x, be as R, bf as M, bg as O, bh as V } from "../_chunks/primitives.js";
|
|
5
5
|
import { IconChevronDown as E } from "@tabler/icons-react";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as d } from "./lib/utils.js";
|
|
7
7
|
import { tweens as y, springs as j } from "./lib/motion.js";
|
|
8
8
|
import { m as g } from "../_chunks/framer.js";
|
|
9
|
-
const L = a.forwardRef(({ className:
|
|
10
|
-
|
|
9
|
+
const L = a.forwardRef(({ className: n, children: o, ...t }, r) => /* @__PURE__ */ v(
|
|
10
|
+
h,
|
|
11
11
|
{
|
|
12
|
-
ref:
|
|
13
|
-
className:
|
|
12
|
+
ref: r,
|
|
13
|
+
className: d(
|
|
14
14
|
"relative z-raised flex max-w-max flex-1 items-center justify-center",
|
|
15
|
-
|
|
15
|
+
n
|
|
16
16
|
),
|
|
17
17
|
...t,
|
|
18
18
|
children: [
|
|
19
|
-
|
|
19
|
+
o,
|
|
20
20
|
/* @__PURE__ */ c(I, {})
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
));
|
|
24
|
-
L.displayName =
|
|
25
|
-
const S = a.forwardRef(({ className:
|
|
26
|
-
|
|
24
|
+
L.displayName = h.displayName;
|
|
25
|
+
const S = a.forwardRef(({ className: n, ...o }, t) => /* @__PURE__ */ c(
|
|
26
|
+
N,
|
|
27
27
|
{
|
|
28
28
|
ref: t,
|
|
29
|
-
className:
|
|
29
|
+
className: d(
|
|
30
30
|
"group flex flex-1 list-none items-center justify-center space-x-ds-02",
|
|
31
|
-
|
|
31
|
+
n
|
|
32
32
|
),
|
|
33
|
-
...
|
|
33
|
+
...o
|
|
34
34
|
}
|
|
35
35
|
));
|
|
36
|
-
S.displayName =
|
|
37
|
-
const J = O, W = a.forwardRef(({ className:
|
|
36
|
+
S.displayName = N.displayName;
|
|
37
|
+
const J = O, W = a.forwardRef(({ className: n, children: o, ...t }, r) => /* @__PURE__ */ v(
|
|
38
38
|
w,
|
|
39
39
|
{
|
|
40
|
-
ref:
|
|
41
|
-
className:
|
|
42
|
-
"group inline-flex h-ds-sm-plus w-max items-center justify-center rounded-ds-md bg-transparent px-ds-05 py-ds-03 text-ds-md font-medium transition-colors hover:bg-surface-
|
|
43
|
-
|
|
40
|
+
ref: r,
|
|
41
|
+
className: d(
|
|
42
|
+
"group inline-flex h-ds-sm-plus w-max items-center justify-center rounded-ds-md bg-transparent px-ds-05 py-ds-03 text-ds-md font-medium transition-colors hover:bg-surface-raised-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 disabled:pointer-events-none disabled:opacity-action-disabled",
|
|
43
|
+
n
|
|
44
44
|
),
|
|
45
45
|
...t,
|
|
46
46
|
children: [
|
|
47
|
-
|
|
47
|
+
o,
|
|
48
48
|
" ",
|
|
49
49
|
/* @__PURE__ */ c(
|
|
50
50
|
E,
|
|
@@ -63,18 +63,18 @@ const b = {
|
|
|
63
63
|
"to-start": { x: "-13rem", opacity: 0 },
|
|
64
64
|
"to-end": { x: "13rem", opacity: 0 },
|
|
65
65
|
center: { x: 0, opacity: 1 }
|
|
66
|
-
}, D = a.forwardRef(({ className:
|
|
67
|
-
const
|
|
66
|
+
}, D = a.forwardRef(({ className: n, ...o }, t) => {
|
|
67
|
+
const r = a.useRef(null), m = a.useCallback(
|
|
68
68
|
(s) => {
|
|
69
|
-
|
|
69
|
+
r.current = s, typeof t == "function" ? t(s) : t && (t.current = s);
|
|
70
70
|
},
|
|
71
71
|
[t]
|
|
72
72
|
), [i, l] = a.useState(null);
|
|
73
73
|
a.useEffect(() => {
|
|
74
|
-
const s =
|
|
74
|
+
const s = r.current;
|
|
75
75
|
if (!s) return;
|
|
76
|
-
const
|
|
77
|
-
|
|
76
|
+
const u = s.getAttribute("data-motion");
|
|
77
|
+
u && l(u);
|
|
78
78
|
const f = new MutationObserver((A) => {
|
|
79
79
|
for (const C of A)
|
|
80
80
|
if (C.attributeName === "data-motion") {
|
|
@@ -89,11 +89,11 @@ const b = {
|
|
|
89
89
|
x,
|
|
90
90
|
{
|
|
91
91
|
ref: m,
|
|
92
|
-
className:
|
|
92
|
+
className: d(
|
|
93
93
|
"left-0 top-0 w-full md:absolute md:w-auto",
|
|
94
|
-
|
|
94
|
+
n
|
|
95
95
|
),
|
|
96
|
-
...
|
|
96
|
+
...o,
|
|
97
97
|
children: /* @__PURE__ */ c(
|
|
98
98
|
g.div,
|
|
99
99
|
{
|
|
@@ -101,7 +101,7 @@ const b = {
|
|
|
101
101
|
animate: p,
|
|
102
102
|
transition: { ...j.smooth, opacity: y.fade },
|
|
103
103
|
style: { width: "100%" },
|
|
104
|
-
children:
|
|
104
|
+
children: o.children
|
|
105
105
|
},
|
|
106
106
|
i
|
|
107
107
|
)
|
|
@@ -109,33 +109,33 @@ const b = {
|
|
|
109
109
|
);
|
|
110
110
|
});
|
|
111
111
|
D.displayName = x.displayName;
|
|
112
|
-
const K = V, I = a.forwardRef(({ className:
|
|
113
|
-
const
|
|
112
|
+
const K = V, I = a.forwardRef(({ className: n, ...o }, t) => {
|
|
113
|
+
const r = a.useRef(null), m = a.useCallback(
|
|
114
114
|
(e) => {
|
|
115
|
-
|
|
115
|
+
r.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
|
|
116
116
|
},
|
|
117
117
|
[t]
|
|
118
118
|
), [i, l] = a.useState(!1);
|
|
119
119
|
return a.useEffect(() => {
|
|
120
|
-
const e =
|
|
120
|
+
const e = r.current;
|
|
121
121
|
if (!e) return;
|
|
122
122
|
const p = e.getAttribute("data-state");
|
|
123
123
|
l(p === "open");
|
|
124
|
-
const s = new MutationObserver((
|
|
125
|
-
for (const f of
|
|
124
|
+
const s = new MutationObserver((u) => {
|
|
125
|
+
for (const f of u)
|
|
126
126
|
f.attributeName === "data-state" && l(e.getAttribute("data-state") === "open");
|
|
127
127
|
});
|
|
128
128
|
return s.observe(e, { attributes: !0, attributeFilter: ["data-state"] }), () => s.disconnect();
|
|
129
|
-
}, []), /* @__PURE__ */ v("div", { className:
|
|
129
|
+
}, []), /* @__PURE__ */ v("div", { className: d("absolute left-0 top-full flex justify-center"), children: [
|
|
130
130
|
/* @__PURE__ */ c(
|
|
131
131
|
R,
|
|
132
132
|
{
|
|
133
|
-
className:
|
|
134
|
-
"origin-top-center relative mt-ds-02b h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-
|
|
135
|
-
|
|
133
|
+
className: d(
|
|
134
|
+
"origin-top-center relative mt-ds-02b h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-overlay shadow-floating md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
135
|
+
n
|
|
136
136
|
),
|
|
137
137
|
ref: m,
|
|
138
|
-
...
|
|
138
|
+
...o
|
|
139
139
|
}
|
|
140
140
|
),
|
|
141
141
|
/* @__PURE__ */ c(
|
|
@@ -155,20 +155,20 @@ const K = V, I = a.forwardRef(({ className: r, ...n }, t) => {
|
|
|
155
155
|
] });
|
|
156
156
|
});
|
|
157
157
|
I.displayName = R.displayName;
|
|
158
|
-
const F = a.forwardRef(({ className:
|
|
159
|
-
const
|
|
158
|
+
const F = a.forwardRef(({ className: n, ...o }, t) => {
|
|
159
|
+
const r = a.useRef(null), m = a.useCallback(
|
|
160
160
|
(e) => {
|
|
161
|
-
|
|
161
|
+
r.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
|
|
162
162
|
},
|
|
163
163
|
[t]
|
|
164
164
|
), [i, l] = a.useState(!1);
|
|
165
165
|
return a.useEffect(() => {
|
|
166
|
-
const e =
|
|
166
|
+
const e = r.current;
|
|
167
167
|
if (!e) return;
|
|
168
168
|
const p = e.getAttribute("data-state");
|
|
169
169
|
l(p === "visible");
|
|
170
|
-
const s = new MutationObserver((
|
|
171
|
-
for (const f of
|
|
170
|
+
const s = new MutationObserver((u) => {
|
|
171
|
+
for (const f of u)
|
|
172
172
|
f.attributeName === "data-state" && l(e.getAttribute("data-state") === "visible");
|
|
173
173
|
});
|
|
174
174
|
return s.observe(e, { attributes: !0, attributeFilter: ["data-state"] }), () => s.disconnect();
|
|
@@ -176,11 +176,11 @@ const F = a.forwardRef(({ className: r, ...n }, t) => {
|
|
|
176
176
|
M,
|
|
177
177
|
{
|
|
178
178
|
ref: m,
|
|
179
|
-
className:
|
|
179
|
+
className: d(
|
|
180
180
|
"top-full z-base flex h-ds-02b items-end justify-center overflow-hidden",
|
|
181
|
-
|
|
181
|
+
n
|
|
182
182
|
),
|
|
183
|
-
...
|
|
183
|
+
...o,
|
|
184
184
|
children: /* @__PURE__ */ c(
|
|
185
185
|
g.div,
|
|
186
186
|
{
|
|
@@ -188,7 +188,7 @@ const F = a.forwardRef(({ className: r, ...n }, t) => {
|
|
|
188
188
|
initial: !1,
|
|
189
189
|
animate: i ? { opacity: 1 } : { opacity: 0 },
|
|
190
190
|
transition: y.fade,
|
|
191
|
-
className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-surface-border shadow-
|
|
191
|
+
className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-surface-border shadow-raised-hover"
|
|
192
192
|
}
|
|
193
193
|
)
|
|
194
194
|
}
|
package/dist/ui/number-input.js
CHANGED
|
@@ -8,7 +8,7 @@ const D = y.forwardRef(
|
|
|
8
8
|
({
|
|
9
9
|
value: s = 0,
|
|
10
10
|
onValueChange: e,
|
|
11
|
-
min:
|
|
11
|
+
min: t = Number.MIN_SAFE_INTEGER,
|
|
12
12
|
max: o = Number.MAX_SAFE_INTEGER,
|
|
13
13
|
step: a = 1,
|
|
14
14
|
disabled: d = !1,
|
|
@@ -17,23 +17,23 @@ const D = y.forwardRef(
|
|
|
17
17
|
...n
|
|
18
18
|
}, l) => {
|
|
19
19
|
const f = k(), p = u ?? (n.id || f.helperTextId ? void 0 : "Numeric value"), N = (c) => {
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
e == null || e(
|
|
20
|
+
const r = c.target.value.trim();
|
|
21
|
+
if (r === "" || r === "-") {
|
|
22
|
+
e == null || e(t >= 0 ? t : 0);
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
const m = Number(
|
|
25
|
+
const m = Number(r);
|
|
26
26
|
if (Number.isNaN(m)) return;
|
|
27
|
-
const w = Math.min(Math.max(m,
|
|
27
|
+
const w = Math.min(Math.max(m, t), o);
|
|
28
28
|
e == null || e(w);
|
|
29
29
|
}, v = (c) => {
|
|
30
30
|
c.preventDefault();
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const r = s + a;
|
|
32
|
+
r <= o && (e == null || e(r));
|
|
33
33
|
}, x = (c) => {
|
|
34
34
|
c.preventDefault();
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const r = s - a;
|
|
36
|
+
r >= t && (e == null || e(r));
|
|
37
37
|
};
|
|
38
38
|
return /* @__PURE__ */ I(
|
|
39
39
|
"div",
|
|
@@ -48,9 +48,9 @@ const D = y.forwardRef(
|
|
|
48
48
|
{
|
|
49
49
|
type: "button",
|
|
50
50
|
onClick: x,
|
|
51
|
-
disabled: d || s <=
|
|
51
|
+
disabled: d || s <= t,
|
|
52
52
|
"aria-label": "Decrease value",
|
|
53
|
-
className: "flex h-ds-sm w-ds-sm items-center justify-center border-0 text-surface-fg-subtle hover:bg-surface-
|
|
53
|
+
className: "flex h-ds-sm w-ds-sm items-center justify-center border-0 text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg-muted active:scale-90 transition-[color,transform] duration-fast-01 ease-productive-standard",
|
|
54
54
|
children: /* @__PURE__ */ i(E, { className: "h-ico-sm w-ico-sm" })
|
|
55
55
|
}
|
|
56
56
|
),
|
|
@@ -61,7 +61,7 @@ const D = y.forwardRef(
|
|
|
61
61
|
type: "number",
|
|
62
62
|
value: s,
|
|
63
63
|
onChange: N,
|
|
64
|
-
min:
|
|
64
|
+
min: t,
|
|
65
65
|
max: o,
|
|
66
66
|
step: a,
|
|
67
67
|
disabled: d,
|
|
@@ -78,7 +78,7 @@ const D = y.forwardRef(
|
|
|
78
78
|
onClick: v,
|
|
79
79
|
disabled: d || s >= o,
|
|
80
80
|
"aria-label": "Increase value",
|
|
81
|
-
className: "flex h-ds-sm w-ds-sm items-center justify-center border-0 text-surface-fg-subtle hover:bg-surface-
|
|
81
|
+
className: "flex h-ds-sm w-ds-sm items-center justify-center border-0 text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg-muted active:scale-90 transition-[color,transform] duration-fast-01 ease-productive-standard",
|
|
82
82
|
children: /* @__PURE__ */ i(j, { className: "h-ico-sm w-ico-sm" })
|
|
83
83
|
}
|
|
84
84
|
)
|
package/dist/ui/pagination.js
CHANGED
|
@@ -3,28 +3,28 @@ import { jsx as a, jsxs as g } from "react/jsx-runtime";
|
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
import { S as R } from "../_chunks/primitives.js";
|
|
5
5
|
import { IconChevronLeft as j, IconChevronRight as k, IconDots as C } from "@tabler/icons-react";
|
|
6
|
-
import { cn as
|
|
7
|
-
const
|
|
6
|
+
import { cn as r } from "./lib/utils.js";
|
|
7
|
+
const v = o.forwardRef(({ className: e, ...i }, s) => /* @__PURE__ */ a(
|
|
8
8
|
"nav",
|
|
9
9
|
{
|
|
10
10
|
ref: s,
|
|
11
11
|
role: "navigation",
|
|
12
12
|
"aria-label": "pagination",
|
|
13
|
-
className:
|
|
13
|
+
className: r("mx-auto flex w-full justify-center", e),
|
|
14
14
|
...i
|
|
15
15
|
}
|
|
16
16
|
));
|
|
17
|
-
|
|
18
|
-
const
|
|
17
|
+
v.displayName = "PaginationRoot";
|
|
18
|
+
const w = o.forwardRef(({ className: e, ...i }, s) => /* @__PURE__ */ a(
|
|
19
19
|
"ul",
|
|
20
20
|
{
|
|
21
21
|
ref: s,
|
|
22
|
-
className:
|
|
22
|
+
className: r("flex flex-row items-center gap-ds-02", e),
|
|
23
23
|
...i
|
|
24
24
|
}
|
|
25
25
|
));
|
|
26
|
-
|
|
27
|
-
const f = o.forwardRef(({ className: e, ...i }, s) => /* @__PURE__ */ a("li", { ref: s, className:
|
|
26
|
+
w.displayName = "PaginationContent";
|
|
27
|
+
const f = o.forwardRef(({ className: e, ...i }, s) => /* @__PURE__ */ a("li", { ref: s, className: r("", e), ...i }));
|
|
28
28
|
f.displayName = "PaginationItem";
|
|
29
29
|
const u = o.forwardRef(
|
|
30
30
|
({ className: e, isActive: i = !1, asChild: s = !1, ...c }, t) => /* @__PURE__ */ a(
|
|
@@ -32,9 +32,9 @@ const u = o.forwardRef(
|
|
|
32
32
|
{
|
|
33
33
|
ref: t,
|
|
34
34
|
"aria-current": i ? "page" : void 0,
|
|
35
|
-
className:
|
|
35
|
+
className: r(
|
|
36
36
|
"inline-flex items-center justify-center h-ds-sm-plus w-ds-sm-plus rounded-ds-md text-ds-md font-medium tabular-nums transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-action-disabled active:scale-95",
|
|
37
|
-
i ? "bg-accent-9 text-accent-fg" : "hover:bg-surface-
|
|
37
|
+
i ? "bg-accent-9 text-accent-fg" : "hover:bg-surface-raised-hover text-surface-fg",
|
|
38
38
|
e
|
|
39
39
|
),
|
|
40
40
|
...c
|
|
@@ -42,12 +42,12 @@ const u = o.forwardRef(
|
|
|
42
42
|
)
|
|
43
43
|
);
|
|
44
44
|
u.displayName = "PaginationLink";
|
|
45
|
-
const
|
|
45
|
+
const x = o.forwardRef(({ className: e, ...i }, s) => /* @__PURE__ */ g(
|
|
46
46
|
u,
|
|
47
47
|
{
|
|
48
48
|
ref: s,
|
|
49
49
|
"aria-label": "Go to previous page",
|
|
50
|
-
className:
|
|
50
|
+
className: r("w-auto gap-ds-02 pl-ds-03 pr-ds-04", e),
|
|
51
51
|
...i,
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ a(j, { className: "h-ico-sm w-ico-sm" }),
|
|
@@ -55,13 +55,13 @@ const v = o.forwardRef(({ className: e, ...i }, s) => /* @__PURE__ */ g(
|
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
));
|
|
58
|
-
|
|
58
|
+
x.displayName = "PaginationPrevious";
|
|
59
59
|
const y = o.forwardRef(({ className: e, ...i }, s) => /* @__PURE__ */ g(
|
|
60
60
|
u,
|
|
61
61
|
{
|
|
62
62
|
ref: s,
|
|
63
63
|
"aria-label": "Go to next page",
|
|
64
|
-
className:
|
|
64
|
+
className: r("w-auto gap-ds-02 pl-ds-04 pr-ds-03", e),
|
|
65
65
|
...i,
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ a("span", { children: "Next" }),
|
|
@@ -75,7 +75,7 @@ const P = o.forwardRef(({ className: e, ...i }, s) => /* @__PURE__ */ g(
|
|
|
75
75
|
{
|
|
76
76
|
ref: s,
|
|
77
77
|
"aria-hidden": "true",
|
|
78
|
-
className:
|
|
78
|
+
className: r(
|
|
79
79
|
"flex h-ds-sm-plus w-ds-sm-plus items-center justify-center text-surface-fg-muted",
|
|
80
80
|
e
|
|
81
81
|
),
|
|
@@ -118,23 +118,23 @@ const M = o.forwardRef(
|
|
|
118
118
|
...d
|
|
119
119
|
}, p) => {
|
|
120
120
|
const h = I(i, e, c);
|
|
121
|
-
return /* @__PURE__ */ a(
|
|
121
|
+
return /* @__PURE__ */ a(v, { ref: p, className: t, ...d, children: /* @__PURE__ */ g(w, { children: [
|
|
122
122
|
/* @__PURE__ */ a(f, { children: /* @__PURE__ */ a(
|
|
123
|
-
|
|
123
|
+
x,
|
|
124
124
|
{
|
|
125
125
|
onClick: () => s(Math.max(1, i - 1)),
|
|
126
126
|
disabled: i <= 1
|
|
127
127
|
}
|
|
128
128
|
) }),
|
|
129
129
|
h.map(
|
|
130
|
-
(
|
|
130
|
+
(l, n) => l === "ellipsis" ? /* @__PURE__ */ a(f, { children: /* @__PURE__ */ a(P, {}) }, `e${n}`) : /* @__PURE__ */ a(f, { children: /* @__PURE__ */ a(
|
|
131
131
|
u,
|
|
132
132
|
{
|
|
133
|
-
isActive:
|
|
134
|
-
onClick: () => s(
|
|
135
|
-
children:
|
|
133
|
+
isActive: l === i,
|
|
134
|
+
onClick: () => s(l),
|
|
135
|
+
children: l
|
|
136
136
|
}
|
|
137
|
-
) },
|
|
137
|
+
) }, l)
|
|
138
138
|
),
|
|
139
139
|
/* @__PURE__ */ a(f, { children: /* @__PURE__ */ a(
|
|
140
140
|
y,
|
|
@@ -148,13 +148,13 @@ const M = o.forwardRef(
|
|
|
148
148
|
);
|
|
149
149
|
M.displayName = "PaginationNav";
|
|
150
150
|
export {
|
|
151
|
-
|
|
151
|
+
w as PaginationContent,
|
|
152
152
|
P as PaginationEllipsis,
|
|
153
153
|
f as PaginationItem,
|
|
154
154
|
u as PaginationLink,
|
|
155
155
|
M as PaginationNav,
|
|
156
156
|
y as PaginationNext,
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
x as PaginationPrevious,
|
|
158
|
+
v as PaginationRoot,
|
|
159
159
|
I as generatePagination
|
|
160
160
|
};
|