@devalok/shilp-sutra 0.33.1 → 0.34.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/badge-group.js +9 -9
- package/dist/_chunks/date-time-picker.js +6 -6
- package/dist/_chunks/document-preview.js +6 -6
- package/dist/_chunks/file-preview.js +1 -1
- package/dist/_chunks/image-preview.js +4 -4
- package/dist/_chunks/tree-view.js +1 -1
- package/dist/_chunks/typing-indicator.js +2 -2
- package/dist/_chunks/use-calendar.js +2 -2
- package/dist/ai/blocks/block-table.d.ts +1 -1
- package/dist/ai/blocks/block-table.d.ts.map +1 -1
- package/dist/ai/blocks/confirm.d.ts +1 -1
- package/dist/ai/blocks/confirm.d.ts.map +1 -1
- package/dist/ai/blocks/divider.d.ts +1 -1
- package/dist/ai/blocks/divider.d.ts.map +1 -1
- package/dist/ai/blocks/error.d.ts +1 -1
- package/dist/ai/blocks/error.d.ts.map +1 -1
- package/dist/ai/blocks/info.d.ts +2 -2
- package/dist/ai/blocks/info.d.ts.map +1 -1
- package/dist/ai/blocks/loading.d.ts +1 -1
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/blocks/stat-row.d.ts +1 -1
- package/dist/ai/blocks/stat-row.d.ts.map +1 -1
- package/dist/ai/blocks/success.d.ts +1 -1
- package/dist/ai/blocks/success.d.ts.map +1 -1
- package/dist/ai/blocks/text.d.ts +2 -2
- package/dist/ai/blocks/text.d.ts.map +1 -1
- package/dist/ai/command-bar.js +2 -2
- package/dist/ai/devadoot-icon.d.ts +1 -1
- package/dist/ai/devadoot-icon.d.ts.map +1 -1
- package/dist/composed/command-palette.js +1 -1
- package/dist/composed/inline-edit.js +5 -5
- package/dist/composed/master-detail.js +30 -30
- package/dist/composed/multi-select-popover.js +1 -1
- package/dist/composed/page-header.js +9 -9
- package/dist/composed/rich-chat-input.js +8 -8
- package/dist/composed/rich-text-editor.js +16 -16
- package/dist/shell/top-bar.js +29 -29
- package/dist/tailwind/index.cjs +2 -11
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +2 -11
- package/dist/ui/accordion.js +11 -11
- package/dist/ui/alert-dialog.js +5 -5
- package/dist/ui/alert.js +1 -1
- package/dist/ui/autocomplete.js +1 -1
- package/dist/ui/banner.js +4 -4
- package/dist/ui/breadcrumb.js +10 -10
- package/dist/ui/button.js +1 -1
- package/dist/ui/checkbox.js +9 -9
- package/dist/ui/color-input.js +27 -27
- package/dist/ui/combobox.js +4 -4
- package/dist/ui/context-menu.js +9 -9
- package/dist/ui/data-table-body.js +8 -8
- package/dist/ui/data-table-header.js +1 -1
- package/dist/ui/data-table-toolbar.js +1 -1
- package/dist/ui/data-table.js +1 -1
- package/dist/ui/dialog.js +7 -7
- package/dist/ui/dropdown-menu.js +46 -46
- package/dist/ui/hover-card.js +3 -3
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input.js +8 -8
- package/dist/ui/link.js +4 -4
- package/dist/ui/menubar.js +52 -52
- package/dist/ui/navigation-menu.js +15 -15
- package/dist/ui/number-input.js +5 -5
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/popover.js +32 -32
- package/dist/ui/radio.js +6 -6
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.js +2 -2
- package/dist/ui/sheet.js +8 -8
- package/dist/ui/sidebar.js +5 -5
- package/dist/ui/slider.js +4 -4
- package/dist/ui/split-button.js +3 -3
- package/dist/ui/switch.js +4 -4
- package/dist/ui/tabs.js +2 -2
- package/dist/ui/textarea.js +4 -4
- package/dist/ui/toast.js +2 -2
- package/dist/ui/toggle.js +4 -4
- package/llms-full.txt +1 -1
- package/llms.txt +12 -0
- package/package.json +5 -5
|
@@ -81,8 +81,8 @@ const J = I(
|
|
|
81
81
|
className: n,
|
|
82
82
|
variant: d,
|
|
83
83
|
color: e,
|
|
84
|
-
size:
|
|
85
|
-
asChild:
|
|
84
|
+
size: h,
|
|
85
|
+
asChild: x,
|
|
86
86
|
startIcon: s,
|
|
87
87
|
endIcon: i,
|
|
88
88
|
dot: g,
|
|
@@ -97,7 +97,7 @@ const J = I(
|
|
|
97
97
|
style: G,
|
|
98
98
|
...w
|
|
99
99
|
}, K) => {
|
|
100
|
-
const k = X(), u = d ?? "subtle", C = e ?? "default", f =
|
|
100
|
+
const k = X(), u = d ?? "subtle", C = e ?? "default", f = h ?? "md", m = x ? T : r && t ? "div" : r ? "button" : "span", M = C === "custom" ? {
|
|
101
101
|
...u === "subtle" && {
|
|
102
102
|
backgroundColor: "color-mix(in oklch, var(--badge-color) 15%, transparent)",
|
|
103
103
|
color: "var(--badge-color)",
|
|
@@ -130,7 +130,7 @@ const J = I(
|
|
|
130
130
|
H(u, C),
|
|
131
131
|
P && Q[f],
|
|
132
132
|
V && U[f],
|
|
133
|
-
r && "cursor-pointer hover:brightness-[0.97] focus-visible:outline-
|
|
133
|
+
r && "cursor-pointer hover:brightness-[0.97] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-1 transition-[color,background-color,border-color,transform,filter] duration-moderate-01 ease-productive-exit hover:duration-fast-02 hover:ease-productive-entrance active:scale-[0.95] active:brightness-[0.92] active:duration-[0ms]",
|
|
134
134
|
l && "ring-1 ring-current/20 transition-shadow duration-fast-02",
|
|
135
135
|
p && "opacity-action-disabled pointer-events-none saturate-[0.3]",
|
|
136
136
|
j && "justify-center px-0 aspect-square",
|
|
@@ -196,7 +196,7 @@ const J = I(
|
|
|
196
196
|
c.stopPropagation(), t();
|
|
197
197
|
},
|
|
198
198
|
className: a(
|
|
199
|
-
"shrink-0 rounded-full text-current/60 hover:text-current hover:bg-current/10 transition-colors focus-visible:outline-
|
|
199
|
+
"shrink-0 rounded-full text-current/60 hover:text-current hover:bg-current/10 transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent-9",
|
|
200
200
|
f === "xs" ? "p-0 -mr-0.5 min-w-[16px] min-h-[16px]" : "p-px"
|
|
201
201
|
),
|
|
202
202
|
"aria-label": `Remove ${typeof b == "string" ? b : ""}`.trim() || "Remove",
|
|
@@ -221,12 +221,12 @@ function B({
|
|
|
221
221
|
max: n,
|
|
222
222
|
gap: d = "default",
|
|
223
223
|
size: e,
|
|
224
|
-
onOverflowClick:
|
|
225
|
-
className:
|
|
224
|
+
onOverflowClick: h,
|
|
225
|
+
className: x,
|
|
226
226
|
children: s
|
|
227
227
|
}) {
|
|
228
228
|
const i = R.Children.toArray(s), g = i.length, t = n !== void 0 && g > n, r = t ? i.slice(0, n) : i, l = t ? g - n : 0;
|
|
229
|
-
return /* @__PURE__ */ v("div", { className: a("flex flex-wrap items-center", Y[d],
|
|
229
|
+
return /* @__PURE__ */ v("div", { className: a("flex flex-wrap items-center", Y[d], x), children: [
|
|
230
230
|
r,
|
|
231
231
|
t && /* @__PURE__ */ v(
|
|
232
232
|
W,
|
|
@@ -234,7 +234,7 @@ function B({
|
|
|
234
234
|
variant: "outline",
|
|
235
235
|
color: "neutral",
|
|
236
236
|
size: e ?? "sm",
|
|
237
|
-
onClick:
|
|
237
|
+
onClick: h,
|
|
238
238
|
children: [
|
|
239
239
|
"+",
|
|
240
240
|
l
|
|
@@ -240,7 +240,7 @@ const ke = d.forwardRef(
|
|
|
240
240
|
className: N(
|
|
241
241
|
"inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
|
|
242
242
|
"hover:border-surface-border-strong",
|
|
243
|
-
"focus-visible:outline-
|
|
243
|
+
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
|
|
244
244
|
h
|
|
245
245
|
),
|
|
246
246
|
children: [
|
|
@@ -337,7 +337,7 @@ const Ne = {
|
|
|
337
337
|
"h-ds-sm w-full rounded-ds-md px-ds-03 text-left text-ds-sm",
|
|
338
338
|
"text-surface-fg transition-colors",
|
|
339
339
|
"hover:bg-surface-raised-hover",
|
|
340
|
-
"focus-visible:outline-
|
|
340
|
+
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9"
|
|
341
341
|
),
|
|
342
342
|
children: y.label
|
|
343
343
|
},
|
|
@@ -463,7 +463,7 @@ const Se = d.forwardRef(
|
|
|
463
463
|
className: N(
|
|
464
464
|
"inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
|
|
465
465
|
"hover:border-surface-border-strong",
|
|
466
|
-
"focus-visible:outline-
|
|
466
|
+
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
|
|
467
467
|
S
|
|
468
468
|
),
|
|
469
469
|
children: [
|
|
@@ -557,7 +557,7 @@ const ve = d.forwardRef(
|
|
|
557
557
|
className: N(
|
|
558
558
|
"inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
|
|
559
559
|
"hover:border-surface-border-strong",
|
|
560
|
-
"focus-visible:outline-
|
|
560
|
+
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
|
|
561
561
|
Y && "opacity-action-disabled pointer-events-none",
|
|
562
562
|
C
|
|
563
563
|
),
|
|
@@ -751,7 +751,7 @@ const Ce = d.forwardRef(
|
|
|
751
751
|
}
|
|
752
752
|
);
|
|
753
753
|
}
|
|
754
|
-
}, p = "h-ds-sm rounded-ds-md border border-surface-border-strong bg-surface-overlay px-ds-02 text-ds-md text-surface-fg transition-colors duration-fast-01 ease-productive-standard hover:border-surface-border-strong focus-visible:outline-
|
|
754
|
+
}, p = "h-ds-sm rounded-ds-md border border-surface-border-strong bg-surface-overlay px-ds-02 text-ds-md text-surface-fg transition-colors duration-fast-01 ease-productive-standard hover:border-surface-border-strong focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 cursor-pointer appearance-none";
|
|
755
755
|
return /* @__PURE__ */ M(X, { open: k, onOpenChange: R, children: [
|
|
756
756
|
/* @__PURE__ */ t(Z, { asChild: !0, children: /* @__PURE__ */ M(
|
|
757
757
|
"button",
|
|
@@ -762,7 +762,7 @@ const Ce = d.forwardRef(
|
|
|
762
762
|
className: N(
|
|
763
763
|
"inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
|
|
764
764
|
"hover:border-surface-border-strong",
|
|
765
|
-
"focus-visible:outline-
|
|
765
|
+
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
|
|
766
766
|
Y
|
|
767
767
|
),
|
|
768
768
|
"aria-label": D ? `Selected: ${D}` : C,
|
|
@@ -9,7 +9,7 @@ import { IconChevronLeft as N, IconChevronRight as I } from "@tabler/icons-react
|
|
|
9
9
|
import { pdfjs as b, Document as A, Page as F } from "react-pdf";
|
|
10
10
|
import { E as k, T as C } from "./file-preview.js";
|
|
11
11
|
import { A as M, m as j } from "./framer.js";
|
|
12
|
-
function $({ url:
|
|
12
|
+
function $({ url: d, initialPage: u, onError: w }) {
|
|
13
13
|
n.useEffect(() => {
|
|
14
14
|
b.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${b.version}/build/pdf.worker.min.mjs`;
|
|
15
15
|
}, []);
|
|
@@ -19,7 +19,7 @@ function $({ url: l, initialPage: u, onError: w }) {
|
|
|
19
19
|
}, [o]), n.useEffect(() => {
|
|
20
20
|
function t(r) {
|
|
21
21
|
const h = f.current;
|
|
22
|
-
!h || !h.contains(document.activeElement) && !p || (r.key === "ArrowRight" || r.key === "ArrowDown" ? (r.preventDefault(), s((
|
|
22
|
+
!h || !h.contains(document.activeElement) && !p || (r.key === "ArrowRight" || r.key === "ArrowDown" ? (r.preventDefault(), s((l) => Math.min(a, l + 1))) : (r.key === "ArrowLeft" || r.key === "ArrowUp") && (r.preventDefault(), s((l) => Math.max(1, l - 1))));
|
|
23
23
|
}
|
|
24
24
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
25
25
|
}, [a, p]);
|
|
@@ -29,7 +29,7 @@ function $({ url: l, initialPage: u, onError: w }) {
|
|
|
29
29
|
r >= 1 && r <= a ? s(r) : i(String(o));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
return P ? /* @__PURE__ */ e(k, { message: "Could not load PDF", url:
|
|
32
|
+
return P ? /* @__PURE__ */ e(k, { message: "Could not load PDF", url: d }) : /* @__PURE__ */ c(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
ref: f,
|
|
@@ -41,13 +41,13 @@ function $({ url: l, initialPage: u, onError: w }) {
|
|
|
41
41
|
/* @__PURE__ */ e("div", { className: "overflow-auto max-h-[70vh] rounded-ds-md bg-surface-sunken border border-surface-border", children: /* @__PURE__ */ e(
|
|
42
42
|
A,
|
|
43
43
|
{
|
|
44
|
-
file:
|
|
44
|
+
file: d,
|
|
45
45
|
onLoadSuccess: ({ numPages: t }) => y(t),
|
|
46
46
|
onLoadError: () => {
|
|
47
47
|
S(!0), w?.("PDF failed to load");
|
|
48
48
|
},
|
|
49
49
|
loading: /* @__PURE__ */ e(L, { className: "h-[500px] w-[400px]" }),
|
|
50
|
-
error: /* @__PURE__ */ e(k, { message: "Failed to load PDF", url:
|
|
50
|
+
error: /* @__PURE__ */ e(k, { message: "Failed to load PDF", url: d }),
|
|
51
51
|
children: /* @__PURE__ */ e(M, { mode: "wait", children: /* @__PURE__ */ e(
|
|
52
52
|
j.div,
|
|
53
53
|
{
|
|
@@ -72,7 +72,7 @@ function $({ url: l, initialPage: u, onError: w }) {
|
|
|
72
72
|
onChange: (t) => i(t.target.value),
|
|
73
73
|
onKeyDown: E,
|
|
74
74
|
onBlur: () => i(String(o)),
|
|
75
|
-
className: "w-8 bg-transparent text-center font-mono text-surface-fg outline-
|
|
75
|
+
className: "w-8 bg-transparent text-center font-mono text-surface-fg outline-hidden focus:bg-surface-raised-hover rounded-ds-sm",
|
|
76
76
|
"aria-label": "Page number"
|
|
77
77
|
}
|
|
78
78
|
),
|
|
@@ -27,7 +27,7 @@ function pe({ children: t, className: o }) {
|
|
|
27
27
|
animate: { opacity: 1, y: 0 },
|
|
28
28
|
transition: j.fade,
|
|
29
29
|
className: D(
|
|
30
|
-
"flex items-center gap-ds-01 rounded-ds-md border border-surface-border bg-surface-overlay/95 px-ds-02 py-ds-01 shadow-floating backdrop-blur-
|
|
30
|
+
"flex items-center gap-ds-01 rounded-ds-md border border-surface-border bg-surface-overlay/95 px-ds-02 py-ds-01 shadow-floating backdrop-blur-xs",
|
|
31
31
|
o
|
|
32
32
|
),
|
|
33
33
|
children: t
|
|
@@ -24,7 +24,7 @@ function Y({ url: d, alt: g, onError: z }) {
|
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
26
|
ref: p,
|
|
27
|
-
className: o ? "fixed inset-0 z-50 flex flex-col items-center justify-center bg-black/90 backdrop-blur-
|
|
27
|
+
className: o ? "fixed inset-0 z-50 flex flex-col items-center justify-center bg-black/90 backdrop-blur-xs" : "relative flex flex-col items-center gap-ds-03",
|
|
28
28
|
onMouseEnter: () => x(!0),
|
|
29
29
|
onMouseLeave: () => x(!1),
|
|
30
30
|
tabIndex: -1,
|
|
@@ -36,7 +36,7 @@ function Y({ url: d, alt: g, onError: z }) {
|
|
|
36
36
|
maxScale: 8,
|
|
37
37
|
centerOnInit: !0,
|
|
38
38
|
doubleClick: { mode: "toggle", step: 2 },
|
|
39
|
-
|
|
39
|
+
onTransform: (s, e) => I(Math.round(e.scale * 100)),
|
|
40
40
|
children: ({ zoomIn: s, zoomOut: e, resetTransform: a, centerView: b }) => (v.current = { zoomIn: s, zoomOut: e, resetTransform: a, centerView: b }, /* @__PURE__ */ c(S, { children: [
|
|
41
41
|
/* @__PURE__ */ c("div", { className: u(
|
|
42
42
|
"overflow-hidden rounded-ds-md bg-surface-sunken",
|
|
@@ -46,8 +46,8 @@ function Y({ url: d, alt: g, onError: z }) {
|
|
|
46
46
|
/* @__PURE__ */ t(
|
|
47
47
|
O,
|
|
48
48
|
{
|
|
49
|
-
wrapperClass: u("
|
|
50
|
-
contentClass: "
|
|
49
|
+
wrapperClass: u("w-full!", o && "h-full!"),
|
|
50
|
+
contentClass: "w-full! flex! items-center! justify-center!",
|
|
51
51
|
children: /* @__PURE__ */ t(
|
|
52
52
|
K.img,
|
|
53
53
|
{
|
|
@@ -94,7 +94,7 @@ const R = l.forwardRef(
|
|
|
94
94
|
className: E(
|
|
95
95
|
"flex items-center gap-ds-02 py-ds-02 px-ds-02 rounded-ds-md cursor-pointer transition-colors duration-fast-01",
|
|
96
96
|
"hover:bg-surface-raised",
|
|
97
|
-
"focus-visible:outline-
|
|
97
|
+
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
98
98
|
d && "bg-accent-3 text-accent-11",
|
|
99
99
|
c && "opacity-action-disabled cursor-not-allowed pointer-events-none",
|
|
100
100
|
y
|
|
@@ -278,7 +278,7 @@ function Y({
|
|
|
278
278
|
onChange: (c) => h(c.target.value),
|
|
279
279
|
onKeyDown: v,
|
|
280
280
|
onBlur: b,
|
|
281
|
-
className: "w-full resize-none rounded-ds-sm border border-surface-border-strong bg-surface-raised-hover px-ds-02 py-ds-01 text-[13px] leading-relaxed text-surface-fg focus-visible:outline-
|
|
281
|
+
className: "w-full resize-none rounded-ds-sm border border-surface-border-strong bg-surface-raised-hover px-ds-02 py-ds-01 text-[13px] leading-relaxed text-surface-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
282
282
|
rows: 2
|
|
283
283
|
}
|
|
284
284
|
),
|
|
@@ -488,7 +488,7 @@ const de = n.forwardRef(
|
|
|
488
488
|
placeholder: s,
|
|
489
489
|
disabled: r,
|
|
490
490
|
rows: 1,
|
|
491
|
-
className: "flex-1 resize-none bg-transparent px-ds-02 py-ds-01 text-ds-sm text-surface-fg placeholder:text-surface-fg-subtle/50 focus:outline-
|
|
491
|
+
className: "flex-1 resize-none bg-transparent px-ds-02 py-ds-01 text-ds-sm text-surface-fg placeholder:text-surface-fg-subtle/50 focus:outline-hidden disabled:opacity-50",
|
|
492
492
|
style: { maxHeight: 160 }
|
|
493
493
|
}
|
|
494
494
|
),
|
|
@@ -95,7 +95,7 @@ const be = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], he = w.forwardRef(
|
|
|
95
95
|
{
|
|
96
96
|
type: "button",
|
|
97
97
|
onClick: () => u(z(c, 1)),
|
|
98
|
-
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors duration-fast-01 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-
|
|
98
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors duration-fast-01 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
99
99
|
"aria-label": "Previous month",
|
|
100
100
|
children: /* @__PURE__ */ i(P, { icon: me, size: "sm", stroke: "light" })
|
|
101
101
|
}
|
|
@@ -118,7 +118,7 @@ const be = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], he = w.forwardRef(
|
|
|
118
118
|
{
|
|
119
119
|
type: "button",
|
|
120
120
|
onClick: () => u(B(c, 1)),
|
|
121
|
-
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors duration-fast-01 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-
|
|
121
|
+
className: "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors duration-fast-01 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
122
122
|
"aria-label": "Next month",
|
|
123
123
|
children: /* @__PURE__ */ i(P, { icon: pe, size: "sm", stroke: "light" })
|
|
124
124
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps, BlockTableData } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const BlockTable: React.
|
|
4
|
+
declare const BlockTable: React.MemoExoticComponent<({ data, confidence, }: BlockComponentProps<BlockTableData>) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
export { BlockTable };
|
|
6
6
|
//# sourceMappingURL=block-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-table.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/block-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAe9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAoB,MAAM,UAAU,CAAA;AAiDrF,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"block-table.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/block-table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAe9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAoB,MAAM,UAAU,CAAA;AAiDrF,QAAA,MAAM,UAAU,oDAGb,mBAAmB,CAAC,cAAc,CAAC,6CA+HpC,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps, ConfirmBlockData } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const ConfirmBlock: React.
|
|
4
|
+
declare const ConfirmBlock: React.MemoExoticComponent<({ data, confidence, onAction, }: BlockComponentProps<ConfirmBlockData>) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
export { ConfirmBlock };
|
|
6
6
|
//# sourceMappingURL=confirm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/confirm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAErE,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"confirm.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/confirm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAErE,QAAA,MAAM,YAAY,8DAIf,mBAAmB,CAAC,gBAAgB,CAAC,6CAqDtC,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const DividerBlock: React.
|
|
4
|
+
declare const DividerBlock: React.MemoExoticComponent<(_props: BlockComponentProps<Record<string, never>>) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
export { DividerBlock };
|
|
6
6
|
//# sourceMappingURL=divider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/divider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/divider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,QAAA,MAAM,YAAY,qCACR,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,6CAkBlD,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps, ErrorBlockData } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const ErrorBlock: React.
|
|
4
|
+
declare const ErrorBlock: React.MemoExoticComponent<({ data, confidence, }: BlockComponentProps<ErrorBlockData>) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
export { ErrorBlock };
|
|
6
6
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/error.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEnE,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/error.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEnE,QAAA,MAAM,UAAU,oDAGb,mBAAmB,CAAC,cAAc,CAAC,6CAmBpC,CAAA;AAIF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/ai/blocks/info.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const InfoBlock: React.
|
|
4
|
+
declare const InfoBlock: React.MemoExoticComponent<({ data, }: BlockComponentProps<{
|
|
5
5
|
message: string;
|
|
6
|
-
}
|
|
6
|
+
}>) => import("react/jsx-runtime").JSX.Element>;
|
|
7
7
|
export { InfoBlock };
|
|
8
8
|
//# sourceMappingURL=info.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/info.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,QAAA,MAAM,SAAS;
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/info.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,QAAA,MAAM,SAAS,wCAEZ,mBAAmB,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,6CAMzC,CAAA;AAIF,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps, LoadingBlockData } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const LoadingBlock: React.
|
|
4
|
+
declare const LoadingBlock: React.MemoExoticComponent<({ data, }: BlockComponentProps<LoadingBlockData>) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
export { LoadingBlock };
|
|
6
6
|
//# sourceMappingURL=loading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/loading.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAkB,MAAM,UAAU,CAAA;AA0CrF,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/loading.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAkB,MAAM,UAAU,CAAA;AA0CrF,QAAA,MAAM,YAAY,wCAEf,mBAAmB,CAAC,gBAAgB,CAAC,6CA0EtC,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps, StatRowBlockData } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const StatRowBlock: React.
|
|
4
|
+
declare const StatRowBlock: React.MemoExoticComponent<({ data, }: BlockComponentProps<StatRowBlockData>) => import("react/jsx-runtime").JSX.Element | null>;
|
|
5
5
|
export { StatRowBlock };
|
|
6
6
|
//# sourceMappingURL=stat-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-row.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/stat-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAErE,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"stat-row.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/stat-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAErE,QAAA,MAAM,YAAY,wCAEf,mBAAmB,CAAC,gBAAgB,CAAC,oDA8CtC,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps, SuccessBlockData } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const SuccessBlock: React.
|
|
4
|
+
declare const SuccessBlock: React.MemoExoticComponent<({ data, blockId, confidence, onAction, }: BlockComponentProps<SuccessBlockData>) => import("react/jsx-runtime").JSX.Element>;
|
|
5
5
|
export { SuccessBlock };
|
|
6
6
|
//# sourceMappingURL=success.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/success.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAIrE,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/success.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAIrE,QAAA,MAAM,YAAY,uEAKf,mBAAmB,CAAC,gBAAgB,CAAC,6CA0GtC,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/ai/blocks/text.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { BlockComponentProps } from '../types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
declare const TextBlock: React.
|
|
4
|
+
declare const TextBlock: React.MemoExoticComponent<({ data, confidence, }: BlockComponentProps<{
|
|
5
5
|
content: string;
|
|
6
|
-
}
|
|
6
|
+
}>) => import("react/jsx-runtime").JSX.Element>;
|
|
7
7
|
export { TextBlock };
|
|
8
8
|
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,QAAA,MAAM,SAAS;
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/ai/blocks/text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,QAAA,MAAM,SAAS,oDAGZ,mBAAmB,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,6CAgBzC,CAAA;AAIF,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
package/dist/ai/command-bar.js
CHANGED
|
@@ -264,7 +264,7 @@ const Ue = s.forwardRef(
|
|
|
264
264
|
"aria-autocomplete": c ? "list" : void 0,
|
|
265
265
|
"aria-label": te ? `Ask ${te}` : "AI Command Bar",
|
|
266
266
|
className: u(
|
|
267
|
-
"flex-1 bg-transparent text-surface-fg outline-
|
|
267
|
+
"flex-1 bg-transparent text-surface-fg outline-hidden",
|
|
268
268
|
"placeholder:text-surface-fg-subtle",
|
|
269
269
|
D ? "h-9 text-ds-sm" : "h-12 text-ds-base",
|
|
270
270
|
A && "cursor-wait",
|
|
@@ -290,7 +290,7 @@ const Ue = s.forwardRef(
|
|
|
290
290
|
{
|
|
291
291
|
type: "button",
|
|
292
292
|
onClick: Ce,
|
|
293
|
-
className: "shrink-0 rounded-ds-sm p-ds-01 text-surface-fg-subtle transition-colors duration-fast-01 hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-
|
|
293
|
+
className: "shrink-0 rounded-ds-sm p-ds-01 text-surface-fg-subtle transition-colors duration-fast-01 hover:bg-surface-raised-hover hover:text-surface-fg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
294
294
|
"aria-label": "Clear",
|
|
295
295
|
title: "Clear",
|
|
296
296
|
children: /* @__PURE__ */ e(
|
|
@@ -18,6 +18,6 @@ export interface DevadootIconProps {
|
|
|
18
18
|
size?: number;
|
|
19
19
|
className?: string;
|
|
20
20
|
}
|
|
21
|
-
declare const DevadootIcon: React.
|
|
21
|
+
declare const DevadootIcon: React.MemoExoticComponent<({ state, size, className, }: DevadootIconProps) => import("react/jsx-runtime").JSX.Element>;
|
|
22
22
|
export { DevadootIcon };
|
|
23
23
|
//# sourceMappingURL=devadoot-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devadoot-icon.d.ts","sourceRoot":"","sources":["../../src/ai/devadoot-icon.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAA;AAEzE,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAiCD,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"devadoot-icon.d.ts","sourceRoot":"","sources":["../../src/ai/devadoot-icon.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAA;AAEzE,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAiCD,QAAA,MAAM,YAAY,0DAIf,iBAAiB,6CAoJlB,CAAA;AAIF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -174,7 +174,7 @@ const ke = r.forwardRef(
|
|
|
174
174
|
"aria-activedescendant": y[f] ? `command-item-${I}-${y[f].id}` : void 0,
|
|
175
175
|
"aria-autocomplete": "list",
|
|
176
176
|
className: N(
|
|
177
|
-
"flex-1 bg-transparent text-ds-base text-surface-fg outline-
|
|
177
|
+
"flex-1 bg-transparent text-ds-base text-surface-fg outline-hidden",
|
|
178
178
|
"placeholder:text-surface-fg-subtle"
|
|
179
179
|
),
|
|
180
180
|
autoComplete: "off",
|
|
@@ -7,9 +7,9 @@ import { cn as C } from "../ui/lib/utils.js";
|
|
|
7
7
|
import { Spinner as z } from "../ui/spinner.js";
|
|
8
8
|
const K = i.forwardRef(({
|
|
9
9
|
value: r,
|
|
10
|
-
onSave:
|
|
10
|
+
onSave: h,
|
|
11
11
|
placeholder: d = "Click to edit",
|
|
12
|
-
textClassName:
|
|
12
|
+
textClassName: R,
|
|
13
13
|
readOnly: o = !1,
|
|
14
14
|
maxLength: a,
|
|
15
15
|
saving: b = !1,
|
|
@@ -34,7 +34,7 @@ const K = i.forwardRef(({
|
|
|
34
34
|
f(!1);
|
|
35
35
|
const n = (t.current.textContent ?? "").trim(), c = a ? n.slice(0, a) : n;
|
|
36
36
|
if (t.current.textContent = c || r, c === r) return;
|
|
37
|
-
const g =
|
|
37
|
+
const g = h(c);
|
|
38
38
|
if (g instanceof Promise) {
|
|
39
39
|
m(!0);
|
|
40
40
|
try {
|
|
@@ -84,8 +84,8 @@ const K = i.forwardRef(({
|
|
|
84
84
|
onPaste: F,
|
|
85
85
|
spellCheck: s,
|
|
86
86
|
className: C(
|
|
87
|
-
"font-sans text-surface-fg outline-
|
|
88
|
-
|
|
87
|
+
"font-sans text-surface-fg outline-hidden",
|
|
88
|
+
R,
|
|
89
89
|
// Idle: subtle hover hint
|
|
90
90
|
!o && !s && "cursor-text rounded-ds-sm -mx-ds-01 px-ds-01 hover:bg-surface-raised-hover transition-colors duration-fast-01",
|
|
91
91
|
// Focused: subtle underline to indicate editing
|
|
@@ -12,15 +12,15 @@ const E = {
|
|
|
12
12
|
md: "768px",
|
|
13
13
|
lg: "1024px"
|
|
14
14
|
};
|
|
15
|
-
function N(
|
|
15
|
+
function N(o) {
|
|
16
16
|
const [i, c] = e.useState(!1);
|
|
17
17
|
return e.useEffect(() => {
|
|
18
18
|
if (typeof window > "u") return;
|
|
19
|
-
const
|
|
20
|
-
c(
|
|
19
|
+
const s = window.matchMedia(o);
|
|
20
|
+
c(s.matches);
|
|
21
21
|
const t = (a) => c(a.matches);
|
|
22
|
-
return
|
|
23
|
-
}, [
|
|
22
|
+
return s.addEventListener("change", t), () => s.removeEventListener("change", t);
|
|
23
|
+
}, [o]), i;
|
|
24
24
|
}
|
|
25
25
|
const y = e.createContext({
|
|
26
26
|
selected: null,
|
|
@@ -34,26 +34,26 @@ const y = e.createContext({
|
|
|
34
34
|
setItemCount: () => {
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
function K({ children:
|
|
38
|
-
const { selected:
|
|
37
|
+
function K({ children: o, className: i, ...c }) {
|
|
38
|
+
const { selected: s, isMobile: t, onNavigate: a, activeIndex: l, setActiveIndex: m, registerItemRef: u, setItemCount: x } = e.useContext(y), f = e.useRef([]), p = e.Children.count(o);
|
|
39
39
|
if (e.useEffect(() => {
|
|
40
40
|
x(p);
|
|
41
|
-
}, [p, x]), t &&
|
|
41
|
+
}, [p, x]), t && s) return null;
|
|
42
42
|
function h(n) {
|
|
43
43
|
if (n.key === "ArrowDown") {
|
|
44
44
|
n.preventDefault();
|
|
45
|
-
const
|
|
46
|
-
m(
|
|
45
|
+
const r = Math.min(l + 1, p - 1);
|
|
46
|
+
m(r), f.current[r]?.focus(), a?.("down");
|
|
47
47
|
} else if (n.key === "ArrowUp") {
|
|
48
48
|
n.preventDefault();
|
|
49
|
-
const
|
|
50
|
-
m(
|
|
49
|
+
const r = Math.max(l - 1, 0);
|
|
50
|
+
m(r), f.current[r]?.focus(), a?.("up");
|
|
51
51
|
} else if (n.key === "Home")
|
|
52
52
|
n.preventDefault(), m(0), f.current[0]?.focus();
|
|
53
53
|
else if (n.key === "End") {
|
|
54
54
|
n.preventDefault();
|
|
55
|
-
const
|
|
56
|
-
m(
|
|
55
|
+
const r = p - 1;
|
|
56
|
+
m(r), f.current[r]?.focus();
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
return /* @__PURE__ */ d(
|
|
@@ -62,24 +62,24 @@ function K({ children: s, className: i, ...c }) {
|
|
|
62
62
|
role: "listbox",
|
|
63
63
|
tabIndex: -1,
|
|
64
64
|
className: b(
|
|
65
|
-
"overflow-y-auto focus-visible:outline-
|
|
65
|
+
"overflow-y-auto focus-visible:outline-hidden",
|
|
66
66
|
!t && "border-r border-surface-border",
|
|
67
67
|
i
|
|
68
68
|
),
|
|
69
69
|
onKeyDown: h,
|
|
70
70
|
...c,
|
|
71
|
-
children: e.Children.map(
|
|
71
|
+
children: e.Children.map(o, (n, r) => e.isValidElement(n) ? e.cloneElement(n, {
|
|
72
72
|
ref: (v) => {
|
|
73
|
-
f.current[
|
|
73
|
+
f.current[r] = v, u(r, v);
|
|
74
74
|
},
|
|
75
|
-
tabIndex:
|
|
75
|
+
tabIndex: r === l ? 0 : -1
|
|
76
76
|
}) : n)
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
|
-
function S({ children:
|
|
81
|
-
const { selected:
|
|
82
|
-
return t && !
|
|
80
|
+
function S({ children: o, className: i, ...c }) {
|
|
81
|
+
const { selected: s, isMobile: t, onBack: a, emptyState: l } = e.useContext(y);
|
|
82
|
+
return t && !s ? null : /* @__PURE__ */ D("div", { className: b("flex-1 overflow-y-auto", i), ...c, children: [
|
|
83
83
|
t && a && /* @__PURE__ */ d("div", { className: "border-b border-surface-border px-ds-04 py-ds-03", children: /* @__PURE__ */ d(C, { variant: "ghost", size: "xs", onClick: a, startIcon: /* @__PURE__ */ d(k, { icon: M }), children: "Back" }) }),
|
|
84
84
|
/* @__PURE__ */ d(L, { mode: "wait", children: /* @__PURE__ */ d(
|
|
85
85
|
A.div,
|
|
@@ -88,14 +88,14 @@ function S({ children: s, className: i, ...c }) {
|
|
|
88
88
|
animate: { x: 0, opacity: 1 },
|
|
89
89
|
exit: t ? { x: -20, opacity: 0 } : void 0,
|
|
90
90
|
transition: R.snappy,
|
|
91
|
-
children:
|
|
91
|
+
children: s ? o : l ?? o
|
|
92
92
|
},
|
|
93
|
-
|
|
93
|
+
s ?? "empty"
|
|
94
94
|
) })
|
|
95
95
|
] });
|
|
96
96
|
}
|
|
97
97
|
const j = e.forwardRef(
|
|
98
|
-
function({ active: i = !1, children: c, className:
|
|
98
|
+
function({ active: i = !1, children: c, className: s, onKeyDown: t, ...a }, l) {
|
|
99
99
|
function m(u) {
|
|
100
100
|
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), u.target.click()), t?.(u);
|
|
101
101
|
}
|
|
@@ -112,9 +112,9 @@ const j = e.forwardRef(
|
|
|
112
112
|
"flex w-full items-center px-ds-04 py-ds-03 text-left text-ds-md font-sans text-surface-fg",
|
|
113
113
|
"transition-colors duration-fast-01 ease-productive-standard",
|
|
114
114
|
"hover:bg-surface-raised-hover",
|
|
115
|
-
"focus-visible:outline-
|
|
115
|
+
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-7 focus-visible:ring-inset",
|
|
116
116
|
i && "bg-accent-2 text-accent-11 border-l-2 border-accent-9",
|
|
117
|
-
|
|
117
|
+
s
|
|
118
118
|
),
|
|
119
119
|
...a,
|
|
120
120
|
children: c
|
|
@@ -123,10 +123,10 @@ const j = e.forwardRef(
|
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
125
|
function B({
|
|
126
|
-
selected:
|
|
126
|
+
selected: o = null,
|
|
127
127
|
onBack: i,
|
|
128
128
|
masterWidth: c = "280px",
|
|
129
|
-
breakpoint:
|
|
129
|
+
breakpoint: s = "md",
|
|
130
130
|
emptyState: t,
|
|
131
131
|
onNavigate: a,
|
|
132
132
|
children: l,
|
|
@@ -134,10 +134,10 @@ function B({
|
|
|
134
134
|
style: u,
|
|
135
135
|
...x
|
|
136
136
|
}) {
|
|
137
|
-
const f = N(`(max-width: ${E[
|
|
137
|
+
const f = N(`(max-width: ${E[s]})`), [p, h] = e.useState(0), [n, r] = e.useState(0), v = e.useRef([]), I = e.useCallback((g, w) => {
|
|
138
138
|
v.current[g] = w;
|
|
139
139
|
}, []);
|
|
140
|
-
return /* @__PURE__ */ d(y.Provider, { value: { selected:
|
|
140
|
+
return /* @__PURE__ */ d(y.Provider, { value: { selected: o, isMobile: f, onBack: i, emptyState: t, onNavigate: a, activeIndex: p, setActiveIndex: h, registerItemRef: I, itemCount: n, setItemCount: r }, children: /* @__PURE__ */ d(
|
|
141
141
|
"div",
|
|
142
142
|
{
|
|
143
143
|
className: b(
|