@devalok/shilp-sutra 0.18.2 → 0.19.1
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/shell/bottom-navbar.js +4 -4
- package/dist/shell/sidebar.js +2 -2
- package/dist/shell/top-bar.d.ts +45 -20
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +222 -159
- package/dist/tokens/semantic.css +5 -5
- package/dist/ui/alert-dialog.js +28 -28
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +13 -12
- package/dist/ui/dialog.js +4 -4
- package/dist/ui/sidebar.js +11 -11
- package/docs/components/_header.md +7 -5
- package/docs/components/composed/activity-feed.md +4 -4
- package/docs/components/composed/command-palette.md +2 -2
- package/docs/components/composed/confirm-dialog.md +1 -1
- package/docs/components/composed/date-picker.md +13 -13
- package/docs/components/composed/schedule-view.md +2 -2
- package/docs/components/composed/status-badge.md +1 -0
- package/docs/components/shell/bottom-navbar.md +4 -0
- package/docs/components/shell/notification-center.md +15 -15
- package/docs/components/shell/sidebar.md +5 -1
- package/docs/components/shell/top-bar.md +101 -24
- package/docs/components/ui/alert-dialog.md +3 -0
- package/docs/components/ui/autocomplete.md +1 -1
- package/docs/components/ui/banner.md +1 -0
- package/docs/components/ui/chip.md +4 -0
- package/docs/components/ui/combobox.md +2 -2
- package/docs/components/ui/dialog.md +3 -0
- package/docs/components/ui/input.md +1 -1
- package/docs/components/ui/spinner.md +1 -0
- package/docs/components/ui/tabs.md +1 -1
- package/llms-full.txt +173 -73
- package/llms.txt +1 -1
- package/package.json +699 -699
package/dist/ui/alert-dialog.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as a, jsxs as h } from "react/jsx-runtime";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
import { O as p, w as R, x as u, y as g, D as x, A as y, z as b, B as C, E as j } from "../_chunks/primitives.js";
|
|
5
5
|
import { cn as i } from "./lib/utils.js";
|
|
@@ -7,20 +7,20 @@ import { tweens as f, springs as M } from "./lib/motion.js";
|
|
|
7
7
|
import { A as T, m } from "../_chunks/framer.js";
|
|
8
8
|
const v = o.createContext({ open: !1 }), z = () => o.useContext(v), P = ({
|
|
9
9
|
open: t,
|
|
10
|
-
defaultOpen:
|
|
10
|
+
defaultOpen: s,
|
|
11
11
|
onOpenChange: e,
|
|
12
12
|
...r
|
|
13
13
|
}) => {
|
|
14
|
-
const [l, A] = o.useState(
|
|
14
|
+
const [l, A] = o.useState(s ?? !1), n = t !== void 0, d = n ? t : l, D = o.useCallback(
|
|
15
15
|
(c) => {
|
|
16
16
|
n || A(c), e == null || e(c);
|
|
17
17
|
},
|
|
18
18
|
[n, e]
|
|
19
19
|
), w = o.useMemo(() => ({ open: d }), [d]);
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ a(v.Provider, { value: w, children: /* @__PURE__ */ a(C, { open: d, onOpenChange: D, ...r }) });
|
|
21
21
|
};
|
|
22
22
|
P.displayName = "AlertDialog";
|
|
23
|
-
const L = j, F = R, N = o.forwardRef(({ className: t, ...
|
|
23
|
+
const L = j, F = R, N = o.forwardRef(({ className: t, ...s }, e) => /* @__PURE__ */ a(
|
|
24
24
|
p,
|
|
25
25
|
{
|
|
26
26
|
ref: e,
|
|
@@ -29,14 +29,14 @@ const L = j, F = R, N = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__
|
|
|
29
29
|
"fixed inset-0 z-modal bg-overlay",
|
|
30
30
|
t
|
|
31
31
|
),
|
|
32
|
-
...
|
|
32
|
+
...s
|
|
33
33
|
}
|
|
34
34
|
));
|
|
35
35
|
N.displayName = p.displayName;
|
|
36
|
-
const H = o.forwardRef(({ className: t, children:
|
|
36
|
+
const H = o.forwardRef(({ className: t, children: s, ...e }, r) => {
|
|
37
37
|
const { open: l } = z();
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ a(T, { children: l && /* @__PURE__ */ h(F, { forceMount: !0, children: [
|
|
39
|
+
/* @__PURE__ */ a(N, { asChild: !0, children: /* @__PURE__ */ a(
|
|
40
40
|
m.div,
|
|
41
41
|
{
|
|
42
42
|
initial: { opacity: 0 },
|
|
@@ -45,25 +45,25 @@ const H = o.forwardRef(({ className: t, children: a, ...e }, r) => {
|
|
|
45
45
|
transition: f.fade
|
|
46
46
|
}
|
|
47
47
|
) }),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ a(
|
|
49
49
|
u,
|
|
50
50
|
{
|
|
51
51
|
ref: r,
|
|
52
52
|
forceMount: !0,
|
|
53
53
|
asChild: !0,
|
|
54
54
|
...e,
|
|
55
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ a(
|
|
56
56
|
m.div,
|
|
57
57
|
{
|
|
58
|
-
initial: { opacity: 0, scale: 0.95 },
|
|
59
|
-
animate: { opacity: 1, scale: 1 },
|
|
60
|
-
exit: { opacity: 0, scale: 0.95 },
|
|
58
|
+
initial: { opacity: 0, scale: 0.95, x: "-50%", y: "-50%" },
|
|
59
|
+
animate: { opacity: 1, scale: 1, x: "-50%", y: "-50%" },
|
|
60
|
+
exit: { opacity: 0, scale: 0.95, x: "-50%", y: "-50%" },
|
|
61
61
|
transition: { ...M.smooth, opacity: f.fade },
|
|
62
62
|
className: i(
|
|
63
|
-
"fixed left-[50%] top-[50%] z-modal grid w-full max-w-lg
|
|
63
|
+
"fixed left-[50%] top-[50%] z-modal grid w-full max-w-lg gap-ds-05 border border-surface-border-strong bg-surface-1 p-ds-06 shadow-04 rounded-ds-xl",
|
|
64
64
|
t
|
|
65
65
|
),
|
|
66
|
-
children:
|
|
66
|
+
children: s
|
|
67
67
|
}
|
|
68
68
|
)
|
|
69
69
|
}
|
|
@@ -72,7 +72,7 @@ const H = o.forwardRef(({ className: t, children: a, ...e }, r) => {
|
|
|
72
72
|
});
|
|
73
73
|
H.displayName = u.displayName;
|
|
74
74
|
const O = o.forwardRef(
|
|
75
|
-
({ className: t, ...
|
|
75
|
+
({ className: t, ...s }, e) => /* @__PURE__ */ a(
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
78
78
|
ref: e,
|
|
@@ -80,13 +80,13 @@ const O = o.forwardRef(
|
|
|
80
80
|
"flex flex-col space-y-ds-02b text-center sm:text-left",
|
|
81
81
|
t
|
|
82
82
|
),
|
|
83
|
-
...
|
|
83
|
+
...s
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
86
|
);
|
|
87
87
|
O.displayName = "AlertDialogHeader";
|
|
88
88
|
const k = o.forwardRef(
|
|
89
|
-
({ className: t, ...
|
|
89
|
+
({ className: t, ...s }, e) => /* @__PURE__ */ a(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
92
|
ref: e,
|
|
@@ -94,12 +94,12 @@ const k = o.forwardRef(
|
|
|
94
94
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-ds-03",
|
|
95
95
|
t
|
|
96
96
|
),
|
|
97
|
-
...
|
|
97
|
+
...s
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
);
|
|
101
101
|
k.displayName = "AlertDialogFooter";
|
|
102
|
-
const B = o.forwardRef(({ className: t, ...
|
|
102
|
+
const B = o.forwardRef(({ className: t, ...s }, e) => /* @__PURE__ */ a(
|
|
103
103
|
g,
|
|
104
104
|
{
|
|
105
105
|
ref: e,
|
|
@@ -107,20 +107,20 @@ const B = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
|
|
|
107
107
|
"text-ds-lg font-semibold",
|
|
108
108
|
t
|
|
109
109
|
),
|
|
110
|
-
...
|
|
110
|
+
...s
|
|
111
111
|
}
|
|
112
112
|
));
|
|
113
113
|
B.displayName = g.displayName;
|
|
114
|
-
const E = o.forwardRef(({ className: t, ...
|
|
114
|
+
const E = o.forwardRef(({ className: t, ...s }, e) => /* @__PURE__ */ a(
|
|
115
115
|
x,
|
|
116
116
|
{
|
|
117
117
|
ref: e,
|
|
118
118
|
className: i("text-ds-md text-surface-fg-muted", t),
|
|
119
|
-
...
|
|
119
|
+
...s
|
|
120
120
|
}
|
|
121
121
|
));
|
|
122
122
|
E.displayName = x.displayName;
|
|
123
|
-
const I = o.forwardRef(({ className: t, ...
|
|
123
|
+
const I = o.forwardRef(({ className: t, ...s }, e) => /* @__PURE__ */ a(
|
|
124
124
|
y,
|
|
125
125
|
{
|
|
126
126
|
ref: e,
|
|
@@ -128,11 +128,11 @@ const I = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
|
|
|
128
128
|
"inline-flex h-ds-md items-center justify-center rounded-ds-md px-ds-05 text-ds-md font-semibold transition-colors bg-accent-9 text-accent-fg hover:bg-accent-10 active:bg-accent-10 shadow-01 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",
|
|
129
129
|
t
|
|
130
130
|
),
|
|
131
|
-
...
|
|
131
|
+
...s
|
|
132
132
|
}
|
|
133
133
|
));
|
|
134
134
|
I.displayName = y.displayName;
|
|
135
|
-
const S = o.forwardRef(({ className: t, ...
|
|
135
|
+
const S = o.forwardRef(({ className: t, ...s }, e) => /* @__PURE__ */ a(
|
|
136
136
|
b,
|
|
137
137
|
{
|
|
138
138
|
ref: e,
|
|
@@ -140,7 +140,7 @@ const S = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
|
|
|
140
140
|
"inline-flex h-ds-md items-center justify-center rounded-ds-md px-ds-05 text-ds-md font-semibold transition-colors bg-transparent text-surface-fg-muted border border-surface-border-strong hover:bg-surface-2 hover:text-surface-fg 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",
|
|
141
141
|
t
|
|
142
142
|
),
|
|
143
|
-
...
|
|
143
|
+
...s
|
|
144
144
|
}
|
|
145
145
|
));
|
|
146
146
|
S.displayName = b.displayName;
|
package/dist/ui/chip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/ui/chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE,QAAA,MAAM,YAAY;;;;8EA6DjB,CAAA;AAED,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEzJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,KAAK,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,YAAY,CAAC,EAAE,OAAO,CAAC,GAAG;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,QAAA,MAAM,IAAI;;;;;WATD,MAAM;YACL,SAAS;WACV,KAAK,CAAC,SAAS;cACZ,KAAK,CAAC,iBAAiB;gBACrB,MAAM,IAAI;eACX,OAAO;gBACN,MAAM;
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/ui/chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE,QAAA,MAAM,YAAY;;;;8EA6DjB,CAAA;AAED,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEzJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,KAAK,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,YAAY,CAAC,EAAE,OAAO,CAAC,GAAG;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,QAAA,MAAM,IAAI;;;;;WATD,MAAM;YACL,SAAS;WACV,KAAK,CAAC,SAAS;cACZ,KAAK,CAAC,iBAAiB;gBACrB,MAAM,IAAI;eACX,OAAO;gBACN,MAAM;qCA8CnB,CAAA;AAGD,OAAO,EAAE,eAAe,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,CAAA"}
|
package/dist/ui/chip.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as f, jsx as
|
|
2
|
+
import { jsxs as f, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import * as v from "react";
|
|
4
4
|
import { IconX as N } from "@tabler/icons-react";
|
|
5
5
|
import { ag as h } from "../_chunks/vendor-utils.js";
|
|
6
6
|
import { springs as w, motionProps as C } from "./lib/motion.js";
|
|
7
7
|
import { cn as k } from "./lib/utils.js";
|
|
8
8
|
import { m as n } from "../_chunks/framer.js";
|
|
9
|
-
import { A as
|
|
9
|
+
import { A as X } from "../_chunks/framer.js";
|
|
10
10
|
const j = h(
|
|
11
11
|
"inline-flex items-center gap-ds-02 font-sans leading-ds-relaxed rounded-ds-full transition-colors duration-fast-01",
|
|
12
12
|
{
|
|
@@ -69,8 +69,8 @@ const j = h(
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
), R = v.forwardRef(
|
|
72
|
-
({ label: t, variant: i, size: l, color: g, icon: o, onClick: s, onDismiss: c, disabled:
|
|
73
|
-
const
|
|
72
|
+
({ label: t, variant: i, size: l, color: g, icon: o, onClick: s, onDismiss: c, disabled: e, className: d, ...m }, b) => {
|
|
73
|
+
const r = !!s, u = r ? n.button : n.span, y = r && !e ? "cursor-pointer hover:bg-surface-4" : "", x = e ? "opacity-action-disabled cursor-not-allowed" : "";
|
|
74
74
|
return /* @__PURE__ */ f(
|
|
75
75
|
u,
|
|
76
76
|
{
|
|
@@ -78,16 +78,17 @@ const j = h(
|
|
|
78
78
|
layout: !0,
|
|
79
79
|
initial: { opacity: 1, scale: 1 },
|
|
80
80
|
exit: { opacity: 0, scale: 0.8 },
|
|
81
|
+
whileTap: r && !e ? { scale: 0.95 } : void 0,
|
|
81
82
|
transition: w.snappy,
|
|
82
83
|
className: k(j({ variant: i, size: l, color: g }), y, x, d),
|
|
83
|
-
onClick:
|
|
84
|
-
disabled:
|
|
85
|
-
type:
|
|
84
|
+
onClick: r ? s : void 0,
|
|
85
|
+
disabled: r ? e : void 0,
|
|
86
|
+
type: r ? "button" : void 0,
|
|
86
87
|
...C(m),
|
|
87
88
|
children: [
|
|
88
|
-
o && /* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
c && /* @__PURE__ */
|
|
89
|
+
o && /* @__PURE__ */ a("span", { className: "flex-shrink-0 [&>svg]:w-ico-sm [&>svg]:h-ico-sm", children: o }),
|
|
90
|
+
/* @__PURE__ */ a("span", { children: t }),
|
|
91
|
+
c && /* @__PURE__ */ a(
|
|
91
92
|
"button",
|
|
92
93
|
{
|
|
93
94
|
type: "button",
|
|
@@ -96,7 +97,7 @@ const j = h(
|
|
|
96
97
|
onClick: (p) => {
|
|
97
98
|
p.stopPropagation(), c();
|
|
98
99
|
},
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ a(N, { className: "h-ico-sm w-ico-sm" })
|
|
100
101
|
}
|
|
101
102
|
)
|
|
102
103
|
]
|
|
@@ -107,6 +108,6 @@ const j = h(
|
|
|
107
108
|
R.displayName = "Chip";
|
|
108
109
|
export {
|
|
109
110
|
R as Chip,
|
|
110
|
-
|
|
111
|
+
X as ChipGroup,
|
|
111
112
|
j as chipVariants
|
|
112
113
|
};
|
package/dist/ui/dialog.js
CHANGED
|
@@ -56,12 +56,12 @@ const H = t.forwardRef(({ className: a, children: s, ...e }, r) => {
|
|
|
56
56
|
children: /* @__PURE__ */ d(
|
|
57
57
|
g.div,
|
|
58
58
|
{
|
|
59
|
-
initial: { opacity: 0, scale: 0.95 },
|
|
60
|
-
animate: { opacity: 1, scale: 1 },
|
|
61
|
-
exit: { opacity: 0, scale: 0.95 },
|
|
59
|
+
initial: { opacity: 0, scale: 0.95, x: "-50%", y: "-50%" },
|
|
60
|
+
animate: { opacity: 1, scale: 1, x: "-50%", y: "-50%" },
|
|
61
|
+
exit: { opacity: 0, scale: 0.95, x: "-50%", y: "-50%" },
|
|
62
62
|
transition: { ...T.smooth, opacity: p.fade },
|
|
63
63
|
className: i(
|
|
64
|
-
"fixed left-[50%] top-[50%] z-modal grid w-full max-w-lg
|
|
64
|
+
"fixed left-[50%] top-[50%] z-modal grid w-full max-w-lg gap-ds-05 border border-surface-border-strong bg-surface-1 p-ds-06 shadow-04 rounded-ds-xl",
|
|
65
65
|
a
|
|
66
66
|
),
|
|
67
67
|
children: [
|
package/dist/ui/sidebar.js
CHANGED
|
@@ -98,7 +98,7 @@ const te = i(
|
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
100
|
className: r(
|
|
101
|
-
"flex h-full w-[--sidebar-width] flex-col bg-surface-
|
|
101
|
+
"flex h-full w-[--sidebar-width] flex-col bg-surface-2 text-surface-fg",
|
|
102
102
|
d
|
|
103
103
|
),
|
|
104
104
|
ref: u,
|
|
@@ -110,7 +110,7 @@ const te = i(
|
|
|
110
110
|
{
|
|
111
111
|
"data-sidebar": "sidebar",
|
|
112
112
|
"data-mobile": "true",
|
|
113
|
-
className: "w-[--sidebar-width] bg-surface-
|
|
113
|
+
className: "w-[--sidebar-width] bg-surface-2 p-0 text-surface-fg [&>button]:hidden",
|
|
114
114
|
style: {
|
|
115
115
|
"--sidebar-width": Q
|
|
116
116
|
},
|
|
@@ -152,7 +152,7 @@ const te = i(
|
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
154
154
|
"data-sidebar": "sidebar",
|
|
155
|
-
className: "flex h-full w-full flex-col bg-surface-
|
|
155
|
+
className: "flex h-full w-full flex-col bg-surface-2 group-data-[variant=floating]:rounded-ds-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-surface-border group-data-[variant=floating]:shadow",
|
|
156
156
|
children: o
|
|
157
157
|
}
|
|
158
158
|
)
|
|
@@ -202,7 +202,7 @@ const re = i(
|
|
|
202
202
|
"hover:after:bg-surface-border-strong absolute inset-y-0 z-raised hidden w-4 -translate-x-1/2 transition-colors ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
203
203
|
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
204
204
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
205
|
-
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-surface-
|
|
205
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-surface-3",
|
|
206
206
|
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
207
207
|
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
208
208
|
a
|
|
@@ -234,7 +234,7 @@ const de = i(({ className: a, ...e }, t) => /* @__PURE__ */ s(
|
|
|
234
234
|
ref: t,
|
|
235
235
|
"data-sidebar": "input",
|
|
236
236
|
className: r(
|
|
237
|
-
"h-ds-sm w-full bg-surface-
|
|
237
|
+
"h-ds-sm w-full bg-surface-2 shadow-none focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
238
238
|
a
|
|
239
239
|
),
|
|
240
240
|
...e
|
|
@@ -325,7 +325,7 @@ const pe = i(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ s(
|
|
|
325
325
|
ref: d,
|
|
326
326
|
"data-sidebar": "group-action",
|
|
327
327
|
className: r(
|
|
328
|
-
"hover:bg-surface-
|
|
328
|
+
"hover:bg-surface-3 absolute right-ds-04 top-ds-04 flex aspect-square w-5 items-center justify-center rounded-ds-md p-0 text-surface-fg outline-none ring-accent-9 transition-transform hover:text-surface-fg focus-visible:ring-2 [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
|
|
329
329
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
330
330
|
"group-data-[collapsible=icon]:hidden",
|
|
331
331
|
a
|
|
@@ -371,12 +371,12 @@ const ge = i(
|
|
|
371
371
|
);
|
|
372
372
|
ge.displayName = "SidebarMenuItem";
|
|
373
373
|
const he = T(
|
|
374
|
-
"peer/menu-button hover:bg-surface-
|
|
374
|
+
"peer/menu-button hover:bg-surface-3 active:bg-accent-2 data-[active=true]:bg-accent-2 data-[state=open]:hover:bg-surface-3 flex w-full items-center gap-ds-03 overflow-hidden rounded-ds-md p-ds-03 text-left outline-none ring-accent-9 transition-[width,height,padding] hover:text-surface-fg focus-visible:ring-2 active:text-surface-fg disabled:pointer-events-none disabled:opacity-action-disabled group-has-[[data-sidebar=menu-action]]/menu-item:pr-ds-07 aria-disabled:pointer-events-none aria-disabled:opacity-action-disabled data-[active=true]:font-medium data-[active=true]:text-surface-fg data-[state=open]:hover:text-surface-fg group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-ds-03 [&>span:last-child]:truncate [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
|
|
375
375
|
{
|
|
376
376
|
variants: {
|
|
377
377
|
variant: {
|
|
378
|
-
default: "hover:bg-surface-
|
|
379
|
-
outline: "hover:bg-surface-
|
|
378
|
+
default: "hover:bg-surface-3 hover:text-surface-fg",
|
|
379
|
+
outline: "hover:bg-surface-3 bg-surface-2 shadow-[0_0_0_1px_var(--color-surface-border)] hover:text-surface-fg hover:shadow-[0_0_0_1px_var(--color-surface-border-strong)]"
|
|
380
380
|
},
|
|
381
381
|
size: {
|
|
382
382
|
md: "h-ds-sm text-ds-md",
|
|
@@ -445,7 +445,7 @@ const xe = i(({ className: a, asChild: e = !1, showOnHover: t = !1, ...d }, o) =
|
|
|
445
445
|
ref: o,
|
|
446
446
|
"data-sidebar": "menu-action",
|
|
447
447
|
className: r(
|
|
448
|
-
"hover:bg-surface-
|
|
448
|
+
"hover:bg-surface-3 absolute right-ds-02 top-ds-02b flex aspect-square w-5 items-center justify-center rounded-ds-md p-0 text-surface-fg outline-none ring-accent-9 transition-transform hover:text-surface-fg focus-visible:ring-2 peer-hover/menu-button:text-surface-fg [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
|
|
449
449
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
450
450
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
451
451
|
"peer-data-[size=md]/menu-button:top-ds-02b",
|
|
@@ -538,7 +538,7 @@ const Me = i(({ asChild: a = !1, size: e = "md", isActive: t, className: d, ...o
|
|
|
538
538
|
"data-size": e,
|
|
539
539
|
"data-active": t,
|
|
540
540
|
className: r(
|
|
541
|
-
"hover:bg-surface-
|
|
541
|
+
"hover:bg-surface-3 active:bg-accent-2 flex h-ds-xs-plus min-w-0 -translate-x-px items-center gap-ds-03 overflow-hidden rounded-ds-md px-ds-03 text-surface-fg outline-none ring-accent-9 hover:text-surface-fg focus-visible:ring-2 active:text-surface-fg disabled:pointer-events-none disabled:opacity-action-disabled aria-disabled:pointer-events-none aria-disabled:opacity-action-disabled [&>span:last-child]:truncate [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0 [&>svg]:text-surface-fg",
|
|
542
542
|
"data-[active=true]:bg-accent-2 data-[active=true]:text-surface-fg",
|
|
543
543
|
e === "sm" && "text-ds-sm",
|
|
544
544
|
e === "md" && "text-ds-md",
|
|
@@ -42,10 +42,10 @@ Color tokens use OKLCH (perceptually uniform) with 12 functional steps per palet
|
|
|
42
42
|
| 2 | Subtle background | Sidebar, card alt |
|
|
43
43
|
| 3 | Component bg | Input bg, badge bg |
|
|
44
44
|
| 4 | Component bg hover | Button hover state |
|
|
45
|
-
| 5 |
|
|
46
|
-
| 6 | Border
|
|
47
|
-
| 7 | Border
|
|
48
|
-
| 8 | Border
|
|
45
|
+
| 5 | Border subtle | Semantic `surface-border` in light mode |
|
|
46
|
+
| 6 | Border default | Semantic `surface-border-strong` in light mode |
|
|
47
|
+
| 7 | Border strong | Focus rings, emphasis borders |
|
|
48
|
+
| 8 | Border emphasis | High-contrast outlines |
|
|
49
49
|
| 9 | Solid / accent | Button bg, primary CTA |
|
|
50
50
|
| 10 | Solid hover | Button hover bg |
|
|
51
51
|
| 11 | Low-contrast text | Secondary accent text |
|
|
@@ -54,7 +54,9 @@ Color tokens use OKLCH (perceptually uniform) with 12 functional steps per palet
|
|
|
54
54
|
Semantic layer:
|
|
55
55
|
- Accent (swappable): --color-accent-{1-12} + --color-accent-fg
|
|
56
56
|
- Secondary: --color-secondary-{1-12} + --color-secondary-fg
|
|
57
|
-
- Surface: --color-surface-{1-4} + --color-surface-fg / fg-muted / fg-subtle / border
|
|
57
|
+
- Surface: --color-surface-{1-4} + --color-surface-fg / fg-muted / fg-subtle / border / border-strong
|
|
58
|
+
- Border mapping: light mode border=step5, border-strong=step6; dark mode border=step3, border-strong=step4
|
|
59
|
+
- Shell chrome (sidebar, topbar, bottom nav) uses surface-2 for elevation above surface-1 app background
|
|
58
60
|
- Status: --color-{error,success,warning,info}-{3,7,9,11}
|
|
59
61
|
- Category: --color-category-{teal,amber,slate,indigo,cyan,orange,emerald}
|
|
60
62
|
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
## Props
|
|
8
8
|
items: ActivityItem[] (REQUIRED) — { id, actor?: { name, image? }, action: string|ReactNode, timestamp: Date|string, icon?, color?: 'default'|'success'|'warning'|'error'|'info', detail?: ReactNode }
|
|
9
|
-
onLoadMore
|
|
9
|
+
onLoadMore?: () => void — "Load more" button callback
|
|
10
10
|
loading: boolean — skeleton shimmer
|
|
11
|
-
hasMore
|
|
12
|
-
emptyState
|
|
11
|
+
hasMore?: boolean — shows "Load more" button
|
|
12
|
+
emptyState?: ReactNode — empty state content
|
|
13
13
|
compact: boolean — tighter spacing, no avatars, smaller text
|
|
14
14
|
maxInitialItems: number — truncate with "Show all (N)" toggle
|
|
15
15
|
|
|
16
16
|
## Defaults
|
|
17
|
-
loading=false, compact=false
|
|
17
|
+
loading=false, compact=false, hasMore=false
|
|
18
18
|
|
|
19
19
|
## Example
|
|
20
20
|
```jsx
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
- Category: composed
|
|
6
6
|
|
|
7
7
|
## Props
|
|
8
|
-
groups
|
|
8
|
+
groups?: CommandGroup[] (default: []) — { label: string, items: CommandItem[] }
|
|
9
9
|
placeholder: string (default: "Search or jump to...")
|
|
10
10
|
onSearch: (query: string) => void
|
|
11
11
|
emptyMessage: string (default: "No results found.")
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
CommandItem shape: { id, label, description?, icon?, shortcut?, onSelect: () => void }
|
|
14
14
|
|
|
15
15
|
## Defaults
|
|
16
|
-
placeholder="Search or jump to...", emptyMessage="No results found."
|
|
16
|
+
placeholder="Search or jump to...", emptyMessage="No results found.", groups=[]
|
|
17
17
|
|
|
18
18
|
## Example
|
|
19
19
|
```jsx
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
confirmText: string (default: "Confirm")
|
|
13
13
|
cancelText: string (default: "Cancel")
|
|
14
14
|
color: "default" | "error" (controls confirm button color)
|
|
15
|
-
loading: boolean (default: false, disables buttons and
|
|
15
|
+
loading: boolean (default: false, disables buttons and replaces confirm button text with 'Processing...')
|
|
16
16
|
onConfirm: () => void | Promise<void> (REQUIRED)
|
|
17
17
|
|
|
18
18
|
## Defaults
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
## Props
|
|
8
8
|
|
|
9
9
|
### DatePicker
|
|
10
|
-
value
|
|
11
|
-
onChange
|
|
10
|
+
value?: Date | null
|
|
11
|
+
onChange?: (date: Date | null) => void
|
|
12
12
|
placeholder: string (default: "Pick a date")
|
|
13
13
|
formatStr: string (default: "MMM d, yyyy")
|
|
14
14
|
minDate: Date
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
className: string
|
|
18
18
|
|
|
19
19
|
### DateRangePicker
|
|
20
|
-
startDate
|
|
21
|
-
endDate
|
|
22
|
-
onChange
|
|
20
|
+
startDate?: Date | null
|
|
21
|
+
endDate?: Date | null
|
|
22
|
+
onChange?: (range: { start: Date | null, end: Date | null }) => void
|
|
23
23
|
placeholder: string (default: "Pick a date range")
|
|
24
24
|
formatStr: string (default: "MMM d, yyyy")
|
|
25
25
|
minDate: Date
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
className: string
|
|
41
41
|
|
|
42
42
|
### TimePicker
|
|
43
|
-
value
|
|
44
|
-
onChange
|
|
43
|
+
value?: Date | null (time stored as a Date object)
|
|
44
|
+
onChange?: (date: Date) => void
|
|
45
45
|
format: "12h" | "24h" (default: "12h")
|
|
46
46
|
minuteStep: number (default: 1)
|
|
47
47
|
secondStep: number (default: 1)
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
|
|
53
53
|
### CalendarGrid
|
|
54
54
|
currentMonth: Date (REQUIRED)
|
|
55
|
-
selected
|
|
56
|
-
rangeStart
|
|
57
|
-
rangeEnd
|
|
58
|
-
hoverDate
|
|
55
|
+
selected?: Date | null
|
|
56
|
+
rangeStart?: Date | null
|
|
57
|
+
rangeEnd?: Date | null
|
|
58
|
+
hoverDate?: Date | null
|
|
59
59
|
onSelect: (date: Date) => void (REQUIRED)
|
|
60
|
-
onHover
|
|
60
|
+
onHover?: (date: Date | null) => void
|
|
61
61
|
onMonthChange: (date: Date) => void (REQUIRED)
|
|
62
|
-
onHeaderClick
|
|
62
|
+
onHeaderClick?: () => void
|
|
63
63
|
disabledDates: (date: Date) => boolean
|
|
64
64
|
minDate: Date
|
|
65
65
|
maxDate: Date
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
view: "day" | "week" (REQUIRED)
|
|
9
9
|
date: Date (REQUIRED — current day or any date in target week)
|
|
10
10
|
events: ScheduleEvent[] (REQUIRED) — { id, title, start: Date, end: Date, color? }
|
|
11
|
-
onEventClick
|
|
12
|
-
onSlotClick
|
|
11
|
+
onEventClick?: (event: ScheduleEvent) => void
|
|
12
|
+
onSlotClick?: (start: Date, end: Date) => void
|
|
13
13
|
startHour: number (default: 8)
|
|
14
14
|
endHour: number (default: 18, exclusive)
|
|
15
15
|
slotDuration: number (minutes, default: 30)
|
|
@@ -35,6 +35,10 @@ BottomNavbarUser: { name: string, role?: string }
|
|
|
35
35
|
- Requires LinkProvider for framework-specific link components (e.g., Next.js Link)
|
|
36
36
|
|
|
37
37
|
## Changes
|
|
38
|
+
### v0.19.0
|
|
39
|
+
- **Changed** Background elevated from `bg-surface-1` to `bg-surface-2` for visual hierarchy above app background
|
|
40
|
+
- **Changed** "More" menu and interactive items bumped accordingly
|
|
41
|
+
|
|
38
42
|
### v0.18.0
|
|
39
43
|
- **Fixed** Removed incorrect `role="button"` and `tabIndex` from overlay
|
|
40
44
|
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
|
|
7
7
|
## Props
|
|
8
8
|
notifications?: Notification[]
|
|
9
|
-
unreadCount
|
|
10
|
-
open
|
|
11
|
-
onOpenChange
|
|
12
|
-
isLoading
|
|
13
|
-
hasMore
|
|
14
|
-
onFetchMore
|
|
15
|
-
onMarkRead
|
|
16
|
-
onMarkAllRead
|
|
17
|
-
onNavigate
|
|
18
|
-
getNotificationRoute
|
|
19
|
-
footerSlot
|
|
20
|
-
emptyState
|
|
21
|
-
headerActions
|
|
22
|
-
popoverClassName
|
|
23
|
-
onDismiss
|
|
9
|
+
unreadCount?: number (derived from notifications if not provided)
|
|
10
|
+
open?: boolean (controlled mode)
|
|
11
|
+
onOpenChange?: (open: boolean) => void
|
|
12
|
+
isLoading?: boolean
|
|
13
|
+
hasMore?: boolean
|
|
14
|
+
onFetchMore?: () => void
|
|
15
|
+
onMarkRead?: (id: string) => void
|
|
16
|
+
onMarkAllRead?: () => void
|
|
17
|
+
onNavigate?: (path: string) => void — called when a notification with a route is clicked
|
|
18
|
+
getNotificationRoute?: (notification: Notification) => string | null — returns route for a notification; defaults to () => null
|
|
19
|
+
footerSlot?: ReactNode — content rendered in a sticky footer below the scroll area
|
|
20
|
+
emptyState?: ReactNode — replaces default empty state UI
|
|
21
|
+
headerActions?: ReactNode — extra action buttons after "Mark all read"
|
|
22
|
+
popoverClassName?: string — override default popover dimensions
|
|
23
|
+
onDismiss?: (id: string) => void — when provided, each notification shows a dismiss button
|
|
24
24
|
|
|
25
25
|
Notification: { id: string, title: string, body?: string | null, tier: 'INFO' | 'IMPORTANT' | 'CRITICAL', isRead: boolean, createdAt: string, entityType?: string | null, entityId?: string | null, projectId?: string | null, project?: { title: string } | null, actions?: NotificationAction[] }
|
|
26
26
|
NotificationAction: { label: string, variant?: 'primary' | 'default' | 'danger', onClick: (id: string) => void }
|
|
@@ -21,7 +21,7 @@ NavItem: { title: string, href: string, icon: ReactNode, exact?: boolean, badge?
|
|
|
21
21
|
NavSubItem: { title: string, href: string, icon?: ReactNode, exact?: boolean }
|
|
22
22
|
NavGroup: { label: string, items: NavItem[], action?: ReactNode }
|
|
23
23
|
SidebarUser: { name: string, email?: string, image?: string | null, designation?: string, role?: string }
|
|
24
|
-
SidebarFooterConfig: { links
|
|
24
|
+
SidebarFooterConfig: { links?: Array<{ label: string, href: string }>, version?: string | { label: string, href: string }, slot?: ReactNode, promo?: SidebarPromo }
|
|
25
25
|
SidebarPromo: { text: string, icon?: ReactNode, action?: { label: string, href?: string, onClick?: () => void }, onDismiss?: () => void }
|
|
26
26
|
|
|
27
27
|
## Defaults
|
|
@@ -57,6 +57,10 @@ SidebarPromo: { text: string, icon?: ReactNode, action?: { label: string, href?:
|
|
|
57
57
|
- Badge numbers > 99 display as "99+"
|
|
58
58
|
|
|
59
59
|
## Changes
|
|
60
|
+
### v0.19.0
|
|
61
|
+
- **Changed** Background elevated from `bg-surface-1` to `bg-surface-2` for visual hierarchy above app background
|
|
62
|
+
- **Changed** Interactive hover states bumped from `surface-2` to `surface-3`
|
|
63
|
+
|
|
60
64
|
### v0.18.0
|
|
61
65
|
- **Fixed** `bg-interactive-subtle` changed to `bg-accent-2` (OKLCH migration)
|
|
62
66
|
|