@devalok/shilp-sutra 0.22.3 → 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 +37 -37
- 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.js +24 -24
- 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 +2 -2
- 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/llms-full.txt +1 -1
- package/llms.txt +63 -4
- package/package.json +1 -1
|
@@ -12,17 +12,17 @@ function G(t = {}) {
|
|
|
12
12
|
new Set(r ?? [])
|
|
13
13
|
), s = K(
|
|
14
14
|
(n) => {
|
|
15
|
-
w((
|
|
16
|
-
const p = new Set(
|
|
15
|
+
w((c) => {
|
|
16
|
+
const p = new Set(c);
|
|
17
17
|
return p.has(n) ? p.delete(n) : p.add(n), o == null || o(Array.from(p)), p;
|
|
18
18
|
});
|
|
19
19
|
},
|
|
20
20
|
[o]
|
|
21
|
-
),
|
|
22
|
-
(n,
|
|
21
|
+
), i = K(
|
|
22
|
+
(n, c) => {
|
|
23
23
|
N((p) => {
|
|
24
24
|
let m;
|
|
25
|
-
return f && (
|
|
25
|
+
return f && (c != null && c.ctrlKey) ? (m = new Set(p), m.has(n) ? m.delete(n) : m.add(n)) : m = /* @__PURE__ */ new Set([n]), g == null || g(Array.from(m)), m;
|
|
26
26
|
});
|
|
27
27
|
},
|
|
28
28
|
[f, g]
|
|
@@ -31,7 +31,7 @@ function G(t = {}) {
|
|
|
31
31
|
expanded: k,
|
|
32
32
|
selected: C,
|
|
33
33
|
toggle: s,
|
|
34
|
-
select:
|
|
34
|
+
select: i,
|
|
35
35
|
isExpanded: (n) => k.has(n),
|
|
36
36
|
isSelected: (n) => C.has(n),
|
|
37
37
|
expandAll: (n) => w(new Set(n)),
|
|
@@ -50,15 +50,15 @@ const j = d.forwardRef(
|
|
|
50
50
|
depth: w = 0,
|
|
51
51
|
className: C
|
|
52
52
|
}, N) => {
|
|
53
|
-
const s = H(),
|
|
53
|
+
const s = H(), i = d.Children.count(k) > 0, n = s.tree.isExpanded(t), c = s.tree.isSelected(t), p = (e) => {
|
|
54
54
|
o || s.tree.select(t, e);
|
|
55
55
|
}, m = (e) => {
|
|
56
56
|
e.stopPropagation(), !o && s.tree.toggle(t);
|
|
57
57
|
}, D = (e) => {
|
|
58
|
-
o || ((e.key === "Enter" || e.key === " ") && (e.preventDefault(), s.tree.select(t)), e.key === "ArrowRight" &&
|
|
58
|
+
o || ((e.key === "Enter" || e.key === " ") && (e.preventDefault(), s.tree.select(t)), e.key === "ArrowRight" && i && !n && (e.preventDefault(), e.stopPropagation(), s.tree.toggle(t)), e.key === "ArrowLeft" && i && n && (e.preventDefault(), e.stopPropagation(), s.tree.toggle(t)));
|
|
59
59
|
}, x = d.useMemo(() => {
|
|
60
|
-
if (!s.checkboxes || !
|
|
61
|
-
return { checked:
|
|
60
|
+
if (!s.checkboxes || !i)
|
|
61
|
+
return { checked: c, indeterminate: !1 };
|
|
62
62
|
const e = [], u = (E) => {
|
|
63
63
|
d.Children.forEach(E, (v) => {
|
|
64
64
|
d.isValidElement(v) && v.props.itemId && (e.push(v.props.itemId), v.props.children && u(v.props.children));
|
|
@@ -68,15 +68,15 @@ const j = d.forwardRef(
|
|
|
68
68
|
const b = e.filter(
|
|
69
69
|
(E) => s.tree.isSelected(E)
|
|
70
70
|
).length;
|
|
71
|
-
return b === 0 && !
|
|
72
|
-
}, [s.checkboxes,
|
|
71
|
+
return b === 0 && !c ? { checked: !1, indeterminate: !1 } : b === e.length ? { checked: !0, indeterminate: !1 } : { checked: !1, indeterminate: !0 };
|
|
72
|
+
}, [s.checkboxes, i, k, c, s.tree]);
|
|
73
73
|
return /* @__PURE__ */ V(
|
|
74
74
|
"li",
|
|
75
75
|
{
|
|
76
76
|
ref: N,
|
|
77
77
|
role: "treeitem",
|
|
78
|
-
"aria-expanded":
|
|
79
|
-
"aria-selected":
|
|
78
|
+
"aria-expanded": i ? n : void 0,
|
|
79
|
+
"aria-selected": c,
|
|
80
80
|
"aria-level": w + 1,
|
|
81
81
|
"aria-disabled": o || void 0,
|
|
82
82
|
className: "list-none",
|
|
@@ -92,14 +92,14 @@ const j = d.forwardRef(
|
|
|
92
92
|
style: { paddingLeft: w * 20 + 8 },
|
|
93
93
|
className: A(
|
|
94
94
|
"flex items-center gap-ds-02 py-ds-02 px-ds-02 rounded-ds-md cursor-pointer transition-colors duration-fast-01",
|
|
95
|
-
"hover:bg-surface-
|
|
95
|
+
"hover:bg-surface-raised",
|
|
96
96
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
97
|
-
|
|
97
|
+
c && "bg-accent-3 text-accent-11",
|
|
98
98
|
o && "opacity-action-disabled cursor-not-allowed pointer-events-none",
|
|
99
99
|
C
|
|
100
100
|
),
|
|
101
101
|
children: [
|
|
102
|
-
|
|
102
|
+
i ? /* @__PURE__ */ l(
|
|
103
103
|
"button",
|
|
104
104
|
{
|
|
105
105
|
type: "button",
|
|
@@ -148,7 +148,7 @@ const j = d.forwardRef(
|
|
|
148
148
|
]
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
|
|
151
|
+
i && /* @__PURE__ */ l(
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
154
154
|
role: "group",
|
|
@@ -217,15 +217,15 @@ const B = d.forwardRef(
|
|
|
217
217
|
children: C,
|
|
218
218
|
...N
|
|
219
219
|
}, s) => {
|
|
220
|
-
const
|
|
220
|
+
const i = G({
|
|
221
221
|
defaultExpanded: h,
|
|
222
222
|
defaultSelected: r,
|
|
223
223
|
multiSelect: f,
|
|
224
224
|
onSelect: o,
|
|
225
225
|
onExpand: k
|
|
226
|
-
}), n = d.useRef(null),
|
|
226
|
+
}), n = d.useRef(null), c = s ?? n, p = (x) => {
|
|
227
227
|
var E, v, R;
|
|
228
|
-
const e =
|
|
228
|
+
const e = c.current;
|
|
229
229
|
if (!e) return;
|
|
230
230
|
const u = U(e), b = u.findIndex(
|
|
231
231
|
(a) => a === document.activeElement
|
|
@@ -247,7 +247,7 @@ const B = d.forwardRef(
|
|
|
247
247
|
const a = u[b];
|
|
248
248
|
if (a) {
|
|
249
249
|
const S = a.getAttribute("data-tree-item");
|
|
250
|
-
if (S &&
|
|
250
|
+
if (S && i.isExpanded(S)) {
|
|
251
251
|
x.preventDefault();
|
|
252
252
|
const y = u[b + 1];
|
|
253
253
|
y == null || y.focus();
|
|
@@ -261,7 +261,7 @@ const B = d.forwardRef(
|
|
|
261
261
|
const S = a.getAttribute("data-tree-item"), y = a.closest('[role="treeitem"]'), I = (E = y == null ? void 0 : y.parentElement) == null ? void 0 : E.closest(
|
|
262
262
|
'[role="treeitem"]'
|
|
263
263
|
);
|
|
264
|
-
if (S && !
|
|
264
|
+
if (S && !i.isExpanded(S) && I) {
|
|
265
265
|
x.preventDefault();
|
|
266
266
|
const T = I.querySelector(
|
|
267
267
|
"[data-tree-item]"
|
|
@@ -281,13 +281,13 @@ const B = d.forwardRef(
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
}, m = d.useMemo(
|
|
284
|
-
() => ({ tree:
|
|
285
|
-
[
|
|
284
|
+
() => ({ tree: i, checkboxes: g }),
|
|
285
|
+
[i, g]
|
|
286
286
|
), D = t ? q(t) : C;
|
|
287
287
|
return /* @__PURE__ */ l(L.Provider, { value: m, children: /* @__PURE__ */ l(
|
|
288
288
|
"ul",
|
|
289
289
|
{
|
|
290
|
-
ref:
|
|
290
|
+
ref: c,
|
|
291
291
|
role: "tree",
|
|
292
292
|
"aria-multiselectable": f || void 0,
|
|
293
293
|
onKeyDown: p,
|