@uisatin/ui 0.2.0 → 0.3.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/CHANGELOG.md +14 -0
- package/README.md +10 -1
- package/chunk-3DHJXU45.js +147 -0
- package/{chunk-6YXUBP27.js → chunk-5725MFGQ.js} +72 -67
- package/{chunk-BKZBWPUH.js → chunk-57QEOCDZ.js} +9 -11
- package/{chunk-RTJ76X5U.js → chunk-5KTBSMQU.js} +2 -4
- package/{chunk-B2K45IUR.js → chunk-5XTUFBZI.js} +5 -7
- package/{chunk-LW3TRU5W.js → chunk-674SRBZK.js} +28 -16
- package/{chunk-XZNHT6MO.js → chunk-6VKV36OK.js} +115 -61
- package/{chunk-GICKPMJU.js → chunk-73Z7NMQQ.js} +31 -31
- package/chunk-7Q76HLRQ.js +128 -0
- package/{chunk-JPNWHWAQ.js → chunk-AIMQNLPY.js} +38 -35
- package/{chunk-MYEZXZZC.js → chunk-BN7FDKCJ.js} +23 -25
- package/{chunk-3DINAQLL.js → chunk-BR2B4OIT.js} +33 -29
- package/{chunk-2HKBZFIK.js → chunk-CGOH5IYX.js} +31 -31
- package/chunk-CVNRZ2YV.js +112 -0
- package/{chunk-QUF2IPOZ.js → chunk-DPYIBFQD.js} +12 -14
- package/chunk-EF5GT4OG.js +87 -0
- package/chunk-FAJ3OVL4.js +37 -0
- package/{chunk-L6NCCSIP.js → chunk-FB5HTCO2.js} +36 -29
- package/chunk-GI2SMFZL.js +55 -0
- package/{chunk-B6V4VSGH.js → chunk-GMETYACH.js} +14 -15
- package/chunk-HK6WINL6.js +95 -0
- package/{chunk-HL42K2NH.js → chunk-IKO3GQFE.js} +17 -17
- package/{chunk-DO3TBNSC.js → chunk-ISYKZCPJ.js} +15 -17
- package/{chunk-YG7JOOLJ.js → chunk-J7RMFN54.js} +5 -7
- package/{chunk-SHDFUXYV.js → chunk-JBKBRAC4.js} +16 -18
- package/{chunk-LZMKSFCF.js → chunk-JCXI7VQL.js} +10 -12
- package/{chunk-NN6PKJWS.js → chunk-JYOZUQNU.js} +7 -9
- package/{chunk-LLHTVIM3.js → chunk-LB37KTJH.js} +7 -9
- package/{chunk-NSRTTYQ4.js → chunk-LB7Z6BSK.js} +42 -35
- package/{chunk-BNZVTLHV.js → chunk-LFGUJHFF.js} +25 -21
- package/{chunk-7TXHCRAG.js → chunk-M2HEVFQ3.js} +8 -10
- package/{chunk-SH6NG6VN.js → chunk-NH3EHMIL.js} +6 -8
- package/chunk-NL574STL.js +88 -0
- package/chunk-NQL6SIIB.js +168 -0
- package/chunk-O46O6LFQ.js +25 -0
- package/{chunk-YPNKBE5X.js → chunk-OURZQM27.js} +5 -7
- package/{chunk-XL75JRUA.js → chunk-OVKPPXK5.js} +42 -22
- package/chunk-PD6YPFYN.js +42 -0
- package/{chunk-XILQ7GXE.js → chunk-PHNR6ZQ7.js} +11 -13
- package/{chunk-BNTPPZCK.js → chunk-PUWSL5XW.js} +37 -39
- package/{chunk-A5XEM3GF.js → chunk-RHQHDYTE.js} +34 -36
- package/chunk-S7QHBVPX.js +45 -0
- package/{chunk-TX3H3QMA.js → chunk-SAYNV7B3.js} +71 -70
- package/{chunk-6QMSWITQ.js → chunk-SDOTDMYG.js} +24 -26
- package/{chunk-UGRSWP6U.js → chunk-SPGUZMCC.js} +10 -12
- package/chunk-SSOFFQ5T.js +74 -0
- package/{chunk-AN2RNJLR.js → chunk-SZJIVBOD.js} +16 -16
- package/chunk-T6L32XXH.js +107 -0
- package/{chunk-QS4N4MNP.js → chunk-TT2N5752.js} +18 -20
- package/{chunk-72OCFAPT.js → chunk-UCCNXGLG.js} +22 -21
- package/{chunk-KNUWZNFV.js → chunk-UGIVCXGN.js} +4 -6
- package/{chunk-H4NU7NPO.js → chunk-UUCVRIVP.js} +62 -61
- package/{chunk-P4O6TGDR.js → chunk-UZ4DXU6W.js} +28 -26
- package/{chunk-UBNHSZSE.js → chunk-VUOAPWTF.js} +10 -12
- package/{chunk-VAGIAREV.js → chunk-W472DBMT.js} +29 -26
- package/{chunk-X3PQANZO.js → chunk-W4RDTP6W.js} +47 -46
- package/{chunk-CL2II6BX.js → chunk-WLQD5BN2.js} +11 -13
- package/{chunk-FDKIX4DC.js → chunk-X2GNMNZQ.js} +7 -9
- package/{chunk-PF3YBUKT.js → chunk-X66KTATQ.js} +16 -15
- package/{chunk-J3NSDRVH.js → chunk-XETMIETJ.js} +0 -2
- package/chunk-XH56JGYC.js +71 -0
- package/{chunk-O7F3CIDV.js → chunk-XUOSJMEJ.js} +10 -12
- package/chunk-YJK4MGSI.js +86 -0
- package/{chunk-YX5VNRJX.js → chunk-YYFAZQ25.js} +0 -2
- package/chunk-Z7S2KQZS.js +177 -0
- package/chunk-ZBZ3ZQRB.js +195 -0
- package/{chunk-Y5AYU7PK.js → chunk-ZHFIWDGF.js} +0 -2
- package/components/accordion.js +2 -4
- package/components/agent-loading.d.ts +2 -0
- package/components/agent-loading.js +2 -4
- package/components/agent-picker.js +4 -5
- package/components/agent-suggestion.js +5 -6
- package/components/announcement-bar.js +6 -7
- package/components/attachment.js +4 -5
- package/components/avatar.js +4 -6
- package/components/badge.js +2 -4
- package/components/banner-mesh.js +1 -3
- package/components/banner.js +4 -6
- package/components/bar-chart.js +10 -11
- package/components/breadcrumb.js +5 -6
- package/components/button.js +2 -4
- package/components/card.js +3 -5
- package/components/channel-chart.js +10 -11
- package/components/chart.js +9 -10
- package/components/checkbox.js +2 -4
- package/components/chip.js +2 -4
- package/components/citations.d.ts +6 -4
- package/components/citations.js +4 -5
- package/components/code-block.js +3 -5
- package/components/combobox.d.ts +12 -3
- package/components/combobox.js +9 -10
- package/components/command-menu.d.ts +6 -2
- package/components/command-menu.js +5 -6
- package/components/context-menu.d.ts +12 -5
- package/components/context-menu.js +5 -6
- package/components/cookie-consent.js +3 -5
- package/components/date-picker.d.ts +26 -14
- package/components/date-picker.js +8 -9
- package/components/decision-card.js +6 -7
- package/components/dialog.d.ts +5 -2
- package/components/dialog.js +4 -5
- package/components/donut-chart.js +10 -11
- package/components/dot.js +2 -4
- package/components/dropdown.d.ts +6 -1
- package/components/dropdown.js +4 -5
- package/components/empty-state.js +2 -4
- package/components/file-upload.js +6 -7
- package/components/floating.js +1 -3
- package/components/form-field.js +2 -4
- package/components/hover-card.d.ts +5 -2
- package/components/hover-card.js +2 -4
- package/components/input-otp.d.ts +4 -2
- package/components/input-otp.js +7 -8
- package/components/input.js +3 -5
- package/components/kbd.js +2 -4
- package/components/labels.d.ts +79 -0
- package/components/labels.js +1 -0
- package/components/line-chart.js +11 -12
- package/components/message-actions.js +4 -5
- package/components/message.js +7 -8
- package/components/number-input.d.ts +4 -2
- package/components/number-input.js +7 -8
- package/components/pagination.js +4 -6
- package/components/popover.d.ts +11 -5
- package/components/popover.js +3 -4
- package/components/progress.js +2 -4
- package/components/prompt-bar.js +5 -6
- package/components/radio.js +2 -4
- package/components/search-bar.js +3 -5
- package/components/segmented-control.d.ts +4 -2
- package/components/segmented-control.js +3 -5
- package/components/select.d.ts +10 -2
- package/components/select.js +6 -7
- package/components/sheet.d.ts +4 -2
- package/components/sheet.js +5 -6
- package/components/sidebar.js +2 -4
- package/components/skeleton.js +2 -4
- package/components/slider.d.ts +6 -2
- package/components/slider.js +7 -8
- package/components/sliding-indicator.js +1 -3
- package/components/streaming-text.js +2 -4
- package/components/switch.js +2 -4
- package/components/table.d.ts +16 -5
- package/components/table.js +4 -5
- package/components/tabs.d.ts +4 -2
- package/components/tabs.js +3 -5
- package/components/textarea.js +3 -5
- package/components/thinking.js +3 -5
- package/components/toast.js +4 -5
- package/components/toggle.js +2 -4
- package/components/tooltip.d.ts +5 -2
- package/components/tooltip.js +3 -5
- package/index.d.ts +1 -0
- package/index.js +67 -231
- package/lib/utils.d.ts +8 -1
- package/lib/utils.js +1 -3
- package/package.json +11 -1
- package/styles.css +1 -1
- package/theme/create-theme.d.ts +6 -2
- package/theme/index.js +1 -0
- package/chunk-2HKBZFIK.js.map +0 -1
- package/chunk-3DINAQLL.js.map +0 -1
- package/chunk-3ERGAHKA.js +0 -179
- package/chunk-3ERGAHKA.js.map +0 -1
- package/chunk-6C7CGJX2.js +0 -86
- package/chunk-6C7CGJX2.js.map +0 -1
- package/chunk-6QMSWITQ.js.map +0 -1
- package/chunk-6YXUBP27.js.map +0 -1
- package/chunk-72OCFAPT.js.map +0 -1
- package/chunk-7TXHCRAG.js.map +0 -1
- package/chunk-A5XEM3GF.js.map +0 -1
- package/chunk-AN2RNJLR.js.map +0 -1
- package/chunk-B2K45IUR.js.map +0 -1
- package/chunk-B6V4VSGH.js.map +0 -1
- package/chunk-BKZBWPUH.js.map +0 -1
- package/chunk-BNTPPZCK.js.map +0 -1
- package/chunk-BNZVTLHV.js.map +0 -1
- package/chunk-CL2II6BX.js.map +0 -1
- package/chunk-D7RZNTFC.js +0 -95
- package/chunk-D7RZNTFC.js.map +0 -1
- package/chunk-DETGJAIC.js +0 -147
- package/chunk-DETGJAIC.js.map +0 -1
- package/chunk-DO3TBNSC.js.map +0 -1
- package/chunk-ESC5JCVQ.js +0 -90
- package/chunk-ESC5JCVQ.js.map +0 -1
- package/chunk-FDKIX4DC.js.map +0 -1
- package/chunk-GICKPMJU.js.map +0 -1
- package/chunk-GQA24FYG.js +0 -57
- package/chunk-GQA24FYG.js.map +0 -1
- package/chunk-H4NU7NPO.js.map +0 -1
- package/chunk-H63FYCMY.js +0 -11
- package/chunk-H63FYCMY.js.map +0 -1
- package/chunk-HL42K2NH.js.map +0 -1
- package/chunk-HNQUX43Z.js +0 -109
- package/chunk-HNQUX43Z.js.map +0 -1
- package/chunk-HRKPV66B.js +0 -32
- package/chunk-HRKPV66B.js.map +0 -1
- package/chunk-J3NSDRVH.js.map +0 -1
- package/chunk-JPNWHWAQ.js.map +0 -1
- package/chunk-KNUWZNFV.js.map +0 -1
- package/chunk-L6NCCSIP.js.map +0 -1
- package/chunk-LLHTVIM3.js.map +0 -1
- package/chunk-LW3TRU5W.js.map +0 -1
- package/chunk-LZMKSFCF.js.map +0 -1
- package/chunk-MR3JDI7E.js +0 -122
- package/chunk-MR3JDI7E.js.map +0 -1
- package/chunk-MYEZXZZC.js.map +0 -1
- package/chunk-NN6PKJWS.js.map +0 -1
- package/chunk-NSRTTYQ4.js.map +0 -1
- package/chunk-O7F3CIDV.js.map +0 -1
- package/chunk-P4O6TGDR.js.map +0 -1
- package/chunk-PF3YBUKT.js.map +0 -1
- package/chunk-PVOLDO4G.js +0 -47
- package/chunk-PVOLDO4G.js.map +0 -1
- package/chunk-QS4N4MNP.js.map +0 -1
- package/chunk-QUF2IPOZ.js.map +0 -1
- package/chunk-RTJ76X5U.js.map +0 -1
- package/chunk-SH6NG6VN.js.map +0 -1
- package/chunk-SHDFUXYV.js.map +0 -1
- package/chunk-TKO44NDI.js +0 -84
- package/chunk-TKO44NDI.js.map +0 -1
- package/chunk-TX3H3QMA.js.map +0 -1
- package/chunk-UBNHSZSE.js.map +0 -1
- package/chunk-UC3ZJWOD.js +0 -73
- package/chunk-UC3ZJWOD.js.map +0 -1
- package/chunk-UGRSWP6U.js.map +0 -1
- package/chunk-VAGIAREV.js.map +0 -1
- package/chunk-WTMZT3IT.js +0 -105
- package/chunk-WTMZT3IT.js.map +0 -1
- package/chunk-WX6BP5ZP.js +0 -39
- package/chunk-WX6BP5ZP.js.map +0 -1
- package/chunk-X3PQANZO.js.map +0 -1
- package/chunk-XILQ7GXE.js.map +0 -1
- package/chunk-XL75JRUA.js.map +0 -1
- package/chunk-XZNHT6MO.js.map +0 -1
- package/chunk-Y5AYU7PK.js.map +0 -1
- package/chunk-YG7JOOLJ.js.map +0 -1
- package/chunk-YPJYW624.js +0 -195
- package/chunk-YPJYW624.js.map +0 -1
- package/chunk-YPNKBE5X.js.map +0 -1
- package/chunk-YX5VNRJX.js.map +0 -1
- package/components/accordion.js.map +0 -1
- package/components/agent-loading.js.map +0 -1
- package/components/agent-picker.js.map +0 -1
- package/components/agent-suggestion.js.map +0 -1
- package/components/announcement-bar.js.map +0 -1
- package/components/attachment.js.map +0 -1
- package/components/avatar.js.map +0 -1
- package/components/badge.js.map +0 -1
- package/components/banner-mesh.js.map +0 -1
- package/components/banner.js.map +0 -1
- package/components/bar-chart.js.map +0 -1
- package/components/breadcrumb.js.map +0 -1
- package/components/button.js.map +0 -1
- package/components/card.js.map +0 -1
- package/components/channel-chart.js.map +0 -1
- package/components/chart.js.map +0 -1
- package/components/checkbox.js.map +0 -1
- package/components/chip.js.map +0 -1
- package/components/citations.js.map +0 -1
- package/components/code-block.js.map +0 -1
- package/components/combobox.js.map +0 -1
- package/components/command-menu.js.map +0 -1
- package/components/context-menu.js.map +0 -1
- package/components/cookie-consent.js.map +0 -1
- package/components/date-picker.js.map +0 -1
- package/components/decision-card.js.map +0 -1
- package/components/dialog.js.map +0 -1
- package/components/donut-chart.js.map +0 -1
- package/components/dot.js.map +0 -1
- package/components/dropdown.js.map +0 -1
- package/components/empty-state.js.map +0 -1
- package/components/file-upload.js.map +0 -1
- package/components/floating.js.map +0 -1
- package/components/form-field.js.map +0 -1
- package/components/hover-card.js.map +0 -1
- package/components/input-otp.js.map +0 -1
- package/components/input.js.map +0 -1
- package/components/kbd.js.map +0 -1
- package/components/line-chart.js.map +0 -1
- package/components/message-actions.js.map +0 -1
- package/components/message.js.map +0 -1
- package/components/number-input.js.map +0 -1
- package/components/pagination.js.map +0 -1
- package/components/popover.js.map +0 -1
- package/components/progress.js.map +0 -1
- package/components/prompt-bar.js.map +0 -1
- package/components/radio.js.map +0 -1
- package/components/search-bar.js.map +0 -1
- package/components/segmented-control.js.map +0 -1
- package/components/select.js.map +0 -1
- package/components/sheet.js.map +0 -1
- package/components/sidebar.js.map +0 -1
- package/components/skeleton.js.map +0 -1
- package/components/slider.js.map +0 -1
- package/components/sliding-indicator.js.map +0 -1
- package/components/streaming-text.js.map +0 -1
- package/components/switch.js.map +0 -1
- package/components/table.js.map +0 -1
- package/components/tabs.js.map +0 -1
- package/components/textarea.js.map +0 -1
- package/components/thinking.js.map +0 -1
- package/components/toast.js.map +0 -1
- package/components/toggle.js.map +0 -1
- package/components/tooltip.js.map +0 -1
- package/index.js.map +0 -1
- package/lib/utils.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
|
|
4
|
+
// src/lib/utils.ts
|
|
5
|
+
var PREFIX = "sa:";
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
const joined = clsx(inputs);
|
|
8
|
+
if (!joined.includes(PREFIX)) return twMerge(joined);
|
|
9
|
+
const tokens = joined.split(/\s+/).filter(Boolean);
|
|
10
|
+
const bare = tokens.map((t) => t.startsWith(PREFIX) ? t.slice(PREFIX.length) : t);
|
|
11
|
+
const kept = twMerge(bare.join(" ")).split(" ");
|
|
12
|
+
const left = /* @__PURE__ */ new Map();
|
|
13
|
+
for (const k of kept) left.set(k, (left.get(k) ?? 0) + 1);
|
|
14
|
+
const out = [];
|
|
15
|
+
for (let i = tokens.length - 1; i >= 0; i--) {
|
|
16
|
+
const n = left.get(bare[i]) ?? 0;
|
|
17
|
+
if (n > 0) {
|
|
18
|
+
left.set(bare[i], n - 1);
|
|
19
|
+
out.push(tokens[i]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return out.reverse().join(" ");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { cn };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFormField } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { useFormField } from './chunk-VUOAPWTF.js';
|
|
2
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -35,12 +35,12 @@ function Input({
|
|
|
35
35
|
);
|
|
36
36
|
const filled = value != null ? String(value).length > 0 : uncontrolledFilled;
|
|
37
37
|
const inputRef = React.useRef(null);
|
|
38
|
-
return /* @__PURE__ */ jsxs("div", { "data-slot": "input-wrapper", className: cn("grid w-full gap-2", wrapperClassName), children: [
|
|
38
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "input-wrapper", className: cn("sa:grid sa:w-full sa:gap-2", wrapperClassName), children: [
|
|
39
39
|
label && /* @__PURE__ */ jsx(
|
|
40
40
|
"label",
|
|
41
41
|
{
|
|
42
42
|
htmlFor: inputId,
|
|
43
|
-
className: "text-sm leading-[18px] font-medium text-text-default",
|
|
43
|
+
className: "sa:text-sm sa:leading-[18px] sa:font-medium sa:text-text-default",
|
|
44
44
|
children: label
|
|
45
45
|
}
|
|
46
46
|
),
|
|
@@ -92,7 +92,7 @@ function Input({
|
|
|
92
92
|
"p",
|
|
93
93
|
{
|
|
94
94
|
id: messageId,
|
|
95
|
-
className: cn("text-sm", typeof error === "string" || React.isValidElement(error) ? "text-action-destructive-bg" : "text-text-muted"),
|
|
95
|
+
className: cn("sa:text-sm", typeof error === "string" || React.isValidElement(error) ? "sa:text-action-destructive-bg" : "sa:text-text-muted"),
|
|
96
96
|
children: message
|
|
97
97
|
}
|
|
98
98
|
)
|
|
@@ -100,5 +100,3 @@ function Input({
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export { Input };
|
|
103
|
-
//# sourceMappingURL=chunk-YPNKBE5X.js.map
|
|
104
|
-
//# sourceMappingURL=chunk-YPNKBE5X.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFieldChrome, FieldChrome } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { useFieldChrome, FieldChrome } from './chunk-UCCNXGLG.js';
|
|
2
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { CheckCircle } from 'iconoir-react';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -21,6 +21,12 @@ function InputOTP({
|
|
|
21
21
|
id,
|
|
22
22
|
name,
|
|
23
23
|
className,
|
|
24
|
+
"aria-describedby": describedByProp,
|
|
25
|
+
ref,
|
|
26
|
+
onChange,
|
|
27
|
+
onFocus,
|
|
28
|
+
onBlur,
|
|
29
|
+
onSelect,
|
|
24
30
|
...props
|
|
25
31
|
}) {
|
|
26
32
|
const chrome = useFieldChrome({ id, disabled, error: error ? true : void 0 });
|
|
@@ -29,11 +35,19 @@ function InputOTP({
|
|
|
29
35
|
const successMessage = isSuccess && success !== true ? success : null;
|
|
30
36
|
const message = isError ? error : successMessage ?? (chrome.invalid ? null : hint);
|
|
31
37
|
const messageId = message ? `${chrome.controlId}-message` : void 0;
|
|
32
|
-
const describedBy = [chrome.describedBy, messageId].filter(Boolean).join(" ") || void 0;
|
|
38
|
+
const describedBy = [describedByProp, chrome.describedBy, messageId].filter(Boolean).join(" ") || void 0;
|
|
33
39
|
const [inner, setInner] = React.useState(defaultValue);
|
|
34
40
|
const value = (valueProp ?? inner).slice(0, length);
|
|
35
41
|
const [focused, setFocused] = React.useState(false);
|
|
36
42
|
const inputRef = React.useRef(null);
|
|
43
|
+
const setInput = React.useCallback(
|
|
44
|
+
(node) => {
|
|
45
|
+
inputRef.current = node;
|
|
46
|
+
if (typeof ref === "function") ref(node);
|
|
47
|
+
else if (ref) ref.current = node;
|
|
48
|
+
},
|
|
49
|
+
[ref]
|
|
50
|
+
);
|
|
37
51
|
const set = (raw) => {
|
|
38
52
|
const next = [...raw].filter((c) => pattern.test(c)).join("").slice(0, length);
|
|
39
53
|
if (valueProp == null) setInner(next);
|
|
@@ -42,33 +56,33 @@ function InputOTP({
|
|
|
42
56
|
};
|
|
43
57
|
const active = Math.min(value.length, length - 1);
|
|
44
58
|
const cells = Array.from({ length }, (_, i) => i);
|
|
45
|
-
return /* @__PURE__ */ jsxs(FieldChrome, { label, chrome, className: cn("w-fit", className), children: [
|
|
59
|
+
return /* @__PURE__ */ jsxs(FieldChrome, { label, chrome, className: cn("sa:w-fit", className), children: [
|
|
46
60
|
/* @__PURE__ */ jsxs(
|
|
47
61
|
"div",
|
|
48
62
|
{
|
|
49
63
|
"data-slot": "input-otp",
|
|
50
64
|
"data-disabled": chrome.disabled || void 0,
|
|
51
|
-
className: cn("relative flex w-fit items-center gap-2", chrome.disabled && "opacity-50"),
|
|
65
|
+
className: cn("sa:relative sa:flex sa:w-fit sa:items-center sa:gap-2", chrome.disabled && "sa:opacity-50"),
|
|
52
66
|
children: [
|
|
53
67
|
cells.map((i) => {
|
|
54
68
|
const isActive = focused && i === active;
|
|
55
69
|
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
56
|
-
groupSize > 0 && i > 0 && i % groupSize === 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-px w-2 shrink-0 bg-border-strong" }),
|
|
70
|
+
groupSize > 0 && i > 0 && i % groupSize === 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:h-px sa:w-2 sa:shrink-0 sa:bg-border-strong" }),
|
|
57
71
|
/* @__PURE__ */ jsxs(
|
|
58
72
|
"span",
|
|
59
73
|
{
|
|
60
74
|
"aria-hidden": true,
|
|
61
75
|
"data-active": isActive || void 0,
|
|
62
76
|
className: cn(
|
|
63
|
-
"relative grid size-9 shrink-0 place-items-center rounded-lg border bg-bg-field text-base leading-[21px] font-medium text-text-default",
|
|
64
|
-
"[box-shadow:0_1px_2px_0_var(--effect-shadow-xs)]",
|
|
65
|
-
"transition-[border-color,box-shadow] duration-(--duration-fast) ease-(--ease-out)",
|
|
66
|
-
chrome.invalid ? "border-action-destructive-bg" : isSuccess ? "border-status-green-fg" : "border-border-default",
|
|
67
|
-
isActive && (chrome.invalid ? "[box-shadow:0_0_0_2px_var(--action-destructive-glow)]" : isSuccess ? "[box-shadow:0_0_0_2px_var(--status-green-border)]" : "border-border-focus [box-shadow:0_0_0_2px_var(--action-focus-ring)]")
|
|
77
|
+
"sa:relative sa:grid sa:size-9 sa:shrink-0 sa:place-items-center sa:rounded-lg sa:border sa:bg-bg-field sa:text-base sa:leading-[21px] sa:font-medium sa:text-text-default",
|
|
78
|
+
"sa:[box-shadow:0_1px_2px_0_var(--effect-shadow-xs)]",
|
|
79
|
+
"sa:transition-[border-color,box-shadow] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
80
|
+
chrome.invalid ? "sa:border-action-destructive-bg" : isSuccess ? "sa:border-status-green-fg" : "sa:border-border-default",
|
|
81
|
+
isActive && (chrome.invalid ? "sa:[box-shadow:0_0_0_2px_var(--action-destructive-glow)]" : isSuccess ? "sa:[box-shadow:0_0_0_2px_var(--status-green-border)]" : "sa:border-border-focus sa:[box-shadow:0_0_0_2px_var(--action-focus-ring)]")
|
|
68
82
|
),
|
|
69
83
|
children: [
|
|
70
84
|
value[i] ?? "",
|
|
71
|
-
isActive && value.length < length && /* @__PURE__ */ jsx("span", { className: "absolute h-[18px] w-px animate-[satin-caret_1s_steps(1)_infinite] bg-text-default" })
|
|
85
|
+
isActive && value.length < length && /* @__PURE__ */ jsx("span", { className: "sa:absolute sa:h-[18px] sa:w-px sa:animate-[satin-caret_1s_steps(1)_infinite] sa:bg-text-default" })
|
|
72
86
|
]
|
|
73
87
|
}
|
|
74
88
|
)
|
|
@@ -77,18 +91,27 @@ function InputOTP({
|
|
|
77
91
|
/* @__PURE__ */ jsx(
|
|
78
92
|
"input",
|
|
79
93
|
{
|
|
80
|
-
|
|
94
|
+
...props,
|
|
95
|
+
ref: setInput,
|
|
81
96
|
id: chrome.controlId,
|
|
82
97
|
name,
|
|
83
98
|
value,
|
|
84
|
-
onChange: (e) =>
|
|
99
|
+
onChange: (e) => {
|
|
100
|
+
onChange?.(e);
|
|
101
|
+
set(e.target.value);
|
|
102
|
+
},
|
|
85
103
|
onFocus: (e) => {
|
|
104
|
+
onFocus?.(e);
|
|
86
105
|
setFocused(true);
|
|
87
106
|
const end = e.currentTarget.value.length;
|
|
88
107
|
requestAnimationFrame(() => inputRef.current?.setSelectionRange(end, end));
|
|
89
108
|
},
|
|
90
|
-
onBlur: () =>
|
|
109
|
+
onBlur: (e) => {
|
|
110
|
+
onBlur?.(e);
|
|
111
|
+
setFocused(false);
|
|
112
|
+
},
|
|
91
113
|
onSelect: (e) => {
|
|
114
|
+
onSelect?.(e);
|
|
92
115
|
const end = e.currentTarget.value.length;
|
|
93
116
|
if (e.currentTarget.selectionStart !== end) e.currentTarget.setSelectionRange(end, end);
|
|
94
117
|
},
|
|
@@ -99,9 +122,8 @@ function InputOTP({
|
|
|
99
122
|
disabled: chrome.disabled,
|
|
100
123
|
"aria-invalid": chrome.invalid || void 0,
|
|
101
124
|
"aria-describedby": describedBy,
|
|
102
|
-
"aria-label": props["aria-label"],
|
|
103
125
|
spellCheck: false,
|
|
104
|
-
className: "absolute inset-0 w-full cursor-text bg-transparent text-transparent caret-transparent outline-none selection:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:[box-shadow:none] disabled:cursor-not-allowed"
|
|
126
|
+
className: "sa:absolute sa:inset-0 sa:w-full sa:cursor-text sa:bg-transparent sa:text-transparent sa:caret-transparent sa:outline-none sa:selection:bg-transparent sa:focus-visible:outline-none sa:focus-visible:ring-0 sa:focus-visible:[box-shadow:none] sa:disabled:cursor-not-allowed"
|
|
105
127
|
}
|
|
106
128
|
)
|
|
107
129
|
]
|
|
@@ -113,11 +135,11 @@ function InputOTP({
|
|
|
113
135
|
id: messageId,
|
|
114
136
|
"aria-live": "polite",
|
|
115
137
|
className: cn(
|
|
116
|
-
"flex min-h-5 w-0 min-w-full items-start gap-1.5 text-sm leading-5",
|
|
117
|
-
isError ? "text-action-destructive-bg" : successMessage ? "text-status-green-fg" : "text-text-muted"
|
|
138
|
+
"sa:flex sa:min-h-5 sa:w-0 sa:min-w-full sa:items-start sa:gap-1.5 sa:text-sm sa:leading-5",
|
|
139
|
+
isError ? "sa:text-action-destructive-bg" : successMessage ? "sa:text-status-green-fg" : "sa:text-text-muted"
|
|
118
140
|
),
|
|
119
141
|
children: [
|
|
120
|
-
successMessage && /* @__PURE__ */ jsx(CheckCircle, { "aria-hidden": true, className: "mt-0.5 size-4 shrink-0 [stroke-width:1.875]" }),
|
|
142
|
+
successMessage && /* @__PURE__ */ jsx(CheckCircle, { "aria-hidden": true, className: "sa:mt-0.5 sa:size-4 sa:shrink-0 sa:[stroke-width:1.875]" }),
|
|
121
143
|
message
|
|
122
144
|
]
|
|
123
145
|
}
|
|
@@ -126,5 +148,3 @@ function InputOTP({
|
|
|
126
148
|
}
|
|
127
149
|
|
|
128
150
|
export { InputOTP };
|
|
129
|
-
//# sourceMappingURL=chunk-XL75JRUA.js.map
|
|
130
|
-
//# sourceMappingURL=chunk-XL75JRUA.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { HoverCard as HoverCard$1 } from 'radix-ui';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function HoverCard({
|
|
7
|
+
trigger,
|
|
8
|
+
children,
|
|
9
|
+
side = "bottom",
|
|
10
|
+
align = "start",
|
|
11
|
+
openDelay = 400,
|
|
12
|
+
closeDelay = 150,
|
|
13
|
+
open,
|
|
14
|
+
defaultOpen,
|
|
15
|
+
onOpenChange,
|
|
16
|
+
container,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(HoverCard$1.Root, { openDelay, closeDelay, open, defaultOpen, onOpenChange, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(HoverCard$1.Trigger, { asChild: true, children: trigger }),
|
|
22
|
+
/* @__PURE__ */ jsx(HoverCard$1.Portal, { container, children: /* @__PURE__ */ jsx(
|
|
23
|
+
HoverCard$1.Content,
|
|
24
|
+
{
|
|
25
|
+
sideOffset: 8,
|
|
26
|
+
collisionPadding: 8,
|
|
27
|
+
...props,
|
|
28
|
+
side,
|
|
29
|
+
align,
|
|
30
|
+
className: cn(hoverCardClass, className),
|
|
31
|
+
children
|
|
32
|
+
}
|
|
33
|
+
) })
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
var hoverCardClass = cn(
|
|
37
|
+
"sa:z-50 sa:flex sa:w-80 sa:max-w-[calc(100vw-16px)] sa:flex-col sa:gap-3 sa:rounded-xl sa:border sa:border-border-default sa:bg-bg-popover sa:p-4 sa:outline-none",
|
|
38
|
+
"sa:[box-shadow:0_4px_6px_-4px_var(--effect-shadow-sm),0_10px_15px_-3px_var(--effect-shadow-sm)]",
|
|
39
|
+
"sa:origin-(--radix-hover-card-content-transform-origin) sa:data-[state=open]:animate-[satin-enter_var(--sa-duration-base)_var(--sa-ease-out)]"
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export { HoverCard, hoverCardClass };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { Button } from './chunk-T6L32XXH.js';
|
|
2
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { Xmark } from 'iconoir-react';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var cardVariants = cva(
|
|
9
|
-
"relative flex w-[405px] max-w-full flex-col overflow-clip rounded-2xl border border-border-default bg-bg-card",
|
|
9
|
+
"sa:relative sa:flex sa:w-[405px] sa:max-w-full sa:flex-col sa:overflow-clip sa:rounded-2xl sa:border sa:border-border-default sa:bg-bg-card",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
13
|
-
md: "[--card-pad:calc(var(--spacing)*4)]",
|
|
14
|
-
sm: "[--card-pad:calc(var(--spacing)*3)]"
|
|
13
|
+
md: "sa:[--card-pad:calc(var(--sa-spacing)*4)]",
|
|
14
|
+
sm: "sa:[--card-pad:calc(var(--sa-spacing)*3)]"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
defaultVariants: { size: "md" }
|
|
@@ -39,12 +39,12 @@ function Card({
|
|
|
39
39
|
className: cn(cardVariants({ size }), className),
|
|
40
40
|
...props,
|
|
41
41
|
children: [
|
|
42
|
-
hasHeader && /* @__PURE__ */ jsxs("div", { "data-slot": "card-header", className: cn("flex flex-col gap-0.5 px-(--card-pad) pt-(--card-pad)", onClose && "pr-10"), children: [
|
|
43
|
-
title != null && /* @__PURE__ */ jsx("div", { id: titleId, className: "text-base leading-[14px] font-medium tracking-normal text-text-default", children: title }),
|
|
44
|
-
description != null && /* @__PURE__ */ jsx("p", { className: "text-body text-text-muted", children: description })
|
|
42
|
+
hasHeader && /* @__PURE__ */ jsxs("div", { "data-slot": "card-header", className: cn("sa:flex sa:flex-col sa:gap-0.5 sa:px-(--card-pad) sa:pt-(--card-pad)", onClose && "sa:pr-10"), children: [
|
|
43
|
+
title != null && /* @__PURE__ */ jsx("div", { id: titleId, className: "sa:text-base sa:leading-[14px] sa:font-medium sa:tracking-normal sa:text-text-default", children: title }),
|
|
44
|
+
description != null && /* @__PURE__ */ jsx("p", { className: "sa:text-body sa:text-text-muted", children: description })
|
|
45
45
|
] }),
|
|
46
|
-
children != null && /* @__PURE__ */ jsx("div", { "data-slot": "card-body", className: "flex flex-col gap-2 p-(--card-pad)", children }),
|
|
47
|
-
footer != null && /* @__PURE__ */ jsx("div", { "data-slot": "card-footer", className: "flex items-center gap-2 p-(--card-pad)", children: footer }),
|
|
46
|
+
children != null && /* @__PURE__ */ jsx("div", { "data-slot": "card-body", className: "sa:flex sa:flex-col sa:gap-2 sa:p-(--card-pad)", children }),
|
|
47
|
+
footer != null && /* @__PURE__ */ jsx("div", { "data-slot": "card-footer", className: "sa:flex sa:items-center sa:gap-2 sa:p-(--card-pad)", children: footer }),
|
|
48
48
|
onClose && /* @__PURE__ */ jsx(
|
|
49
49
|
Button,
|
|
50
50
|
{
|
|
@@ -52,7 +52,7 @@ function Card({
|
|
|
52
52
|
iconOnly: true,
|
|
53
53
|
"aria-label": closeLabel,
|
|
54
54
|
onClick: onClose,
|
|
55
|
-
className: "absolute top-[7px] right-[7px]",
|
|
55
|
+
className: "sa:absolute sa:top-[7px] sa:right-[7px]",
|
|
56
56
|
children: /* @__PURE__ */ jsx(Xmark, { "aria-hidden": true })
|
|
57
57
|
}
|
|
58
58
|
)
|
|
@@ -62,5 +62,3 @@ function Card({
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export { Card, cardVariants };
|
|
65
|
-
//# sourceMappingURL=chunk-XILQ7GXE.js.map
|
|
66
|
-
//# sourceMappingURL=chunk-XILQ7GXE.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { cn } from './chunk-
|
|
1
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Slot, Tooltip, Collapsible } from 'radix-ui';
|
|
4
4
|
import { NavArrowRight } from 'iconoir-react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var rowFocus = "outline-none satin-focus:[box-shadow:inset_0_0_0_1px_var(--border-focus)]";
|
|
7
|
+
var rowFocus = "sa:outline-none sa:satin-focus:[box-shadow:inset_0_0_0_1px_var(--border-focus)]";
|
|
8
8
|
function Sidebar({ className, ...props }) {
|
|
9
|
-
return /* @__PURE__ */ jsx("nav", { "data-slot": "sidebar", className: cn("flex flex-col gap-0.5", className), ...props });
|
|
9
|
+
return /* @__PURE__ */ jsx("nav", { "data-slot": "sidebar", className: cn("sa:flex sa:flex-col sa:gap-0.5", className), ...props });
|
|
10
10
|
}
|
|
11
11
|
function SidebarItem({
|
|
12
12
|
className,
|
|
@@ -34,22 +34,22 @@ function SidebarItem({
|
|
|
34
34
|
href: disabled ? void 0 : href,
|
|
35
35
|
tabIndex: disabled ? -1 : void 0,
|
|
36
36
|
className: cn(
|
|
37
|
-
"flex h-8 shrink-0 items-center gap-2 rounded-lg px-2 text-sm leading-4 font-medium tracking-normal text-text-muted no-underline select-none",
|
|
38
|
-
"transition-[background-color,color,box-shadow] duration-(--duration-fast) ease-(--ease-out)",
|
|
39
|
-
"[&_svg]:size-icon-size-sm [&_svg]:shrink-0 [&_svg]:[stroke-width:1.875]",
|
|
40
|
-
"not-data-active:satin-hover:bg-bg-muted",
|
|
37
|
+
"sa:flex sa:h-8 sa:shrink-0 sa:items-center sa:gap-2 sa:rounded-lg sa:px-2 sa:text-sm sa:leading-4 sa:font-medium sa:tracking-normal sa:text-text-muted sa:no-underline sa:select-none",
|
|
38
|
+
"sa:transition-[background-color,color,box-shadow] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
39
|
+
"sa:[&_svg]:size-icon-size-sm sa:[&_svg]:shrink-0 sa:[&_svg]:[stroke-width:1.875]",
|
|
40
|
+
"sa:not-data-active:satin-hover:bg-bg-muted",
|
|
41
41
|
rowFocus,
|
|
42
|
-
"data-active:bg-border-input data-active:text-text-default",
|
|
43
|
-
"aria-disabled:pointer-events-none aria-disabled:opacity-50",
|
|
44
|
-
iconOnly && "relative size-8 justify-center px-0",
|
|
42
|
+
"sa:data-active:bg-border-input sa:data-active:text-text-default",
|
|
43
|
+
"sa:aria-disabled:pointer-events-none sa:aria-disabled:opacity-50",
|
|
44
|
+
iconOnly && "sa:relative sa:size-8 sa:justify-center sa:px-0",
|
|
45
45
|
className
|
|
46
46
|
),
|
|
47
47
|
...props,
|
|
48
48
|
children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
49
49
|
icon,
|
|
50
|
-
!iconOnly && /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label }),
|
|
50
|
+
!iconOnly && /* @__PURE__ */ jsx("span", { className: "sa:min-w-0 sa:flex-1 sa:truncate", children: label }),
|
|
51
51
|
showCount && !iconOnly && /* @__PURE__ */ jsx(SidebarCount, { count }),
|
|
52
|
-
showCount && iconOnly && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute top-1 right-1 size-1.5 rounded-full bg-action-destructive-bg" })
|
|
52
|
+
showCount && iconOnly && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:absolute sa:top-1 sa:right-1 sa:size-1.5 sa:rounded-full sa:bg-action-destructive-bg" })
|
|
53
53
|
] })
|
|
54
54
|
}
|
|
55
55
|
);
|
|
@@ -62,7 +62,7 @@ function SidebarItem({
|
|
|
62
62
|
side: "right",
|
|
63
63
|
sideOffset: 6,
|
|
64
64
|
collisionPadding: 8,
|
|
65
|
-
className: "z-50 rounded-md bg-action-inverse-bg px-2 py-1 text-xs font-medium text-text-on-inverse [box-shadow:0_1px_2px_0_var(--effect-shadow-xs)]",
|
|
65
|
+
className: "sa:z-50 sa:rounded-md sa:bg-action-inverse-bg sa:px-2 sa:py-1 sa:text-xs sa:font-medium sa:text-text-on-inverse sa:[box-shadow:0_1px_2px_0_var(--effect-shadow-xs)]",
|
|
66
66
|
children: label
|
|
67
67
|
}
|
|
68
68
|
) })
|
|
@@ -71,7 +71,7 @@ function SidebarItem({
|
|
|
71
71
|
function SidebarCount({ count }) {
|
|
72
72
|
return (
|
|
73
73
|
// 11/12 has no type token in the kit; Figma uses it raw for this counter.
|
|
74
|
-
/* @__PURE__ */ jsx("span", { className: "inline-flex h-4 min-w-[18px] shrink-0 items-center justify-center rounded-xs bg-action-destructive-bg px-1 text-[11px] leading-3 font-medium tracking-normal text-text-on-solid tabular-nums", children: count > 99 ? "99+" : count })
|
|
74
|
+
/* @__PURE__ */ jsx("span", { className: "sa:inline-flex sa:h-4 sa:min-w-[18px] sa:shrink-0 sa:items-center sa:justify-center sa:rounded-xs sa:bg-action-destructive-bg sa:px-1 sa:text-[11px] sa:leading-3 sa:font-medium sa:tracking-normal sa:text-text-on-solid sa:tabular-nums", children: count > 99 ? "99+" : count })
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
function SidebarGroup({
|
|
@@ -98,7 +98,7 @@ function SidebarGroup({
|
|
|
98
98
|
if (openProp == null) setUncontrolled(next);
|
|
99
99
|
onOpenChange?.(next);
|
|
100
100
|
},
|
|
101
|
-
className: cn("group/sidebar-group flex flex-col gap-0.5", className),
|
|
101
|
+
className: cn("sa:group/sidebar-group sa:flex sa:flex-col sa:gap-0.5", className),
|
|
102
102
|
...props,
|
|
103
103
|
children: [
|
|
104
104
|
/* @__PURE__ */ jsxs(
|
|
@@ -107,28 +107,28 @@ function SidebarGroup({
|
|
|
107
107
|
"aria-controls": regionId,
|
|
108
108
|
...triggerProps,
|
|
109
109
|
className: cn(
|
|
110
|
-
"flex h-8 w-full shrink-0 items-center gap-2 rounded-lg px-3 text-left text-text-muted",
|
|
111
|
-
"transition-[background-color,box-shadow] duration-(--duration-fast) ease-(--ease-out)",
|
|
112
|
-
"[&_svg]:size-icon-size-sm [&_svg]:shrink-0 [&_svg]:[stroke-width:1.875]",
|
|
113
|
-
"not-data-active:satin-hover:bg-bg-muted",
|
|
110
|
+
"sa:flex sa:h-8 sa:w-full sa:shrink-0 sa:items-center sa:gap-2 sa:rounded-lg sa:px-3 sa:text-left sa:text-text-muted",
|
|
111
|
+
"sa:transition-[background-color,box-shadow] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
112
|
+
"sa:[&_svg]:size-icon-size-sm sa:[&_svg]:shrink-0 sa:[&_svg]:[stroke-width:1.875]",
|
|
113
|
+
"sa:not-data-active:satin-hover:bg-bg-muted",
|
|
114
114
|
rowFocus,
|
|
115
115
|
triggerProps?.className
|
|
116
116
|
),
|
|
117
117
|
children: [
|
|
118
118
|
icon,
|
|
119
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm leading-4 font-medium tracking-normal text-text-default", children: label }),
|
|
120
|
-
typeof count === "number" && /* @__PURE__ */ jsx("span", { className: "shrink-0 px-1.5 py-0.5 text-sm leading-4 font-medium tracking-normal text-tone-fg tabular-nums", children: count }),
|
|
119
|
+
/* @__PURE__ */ jsx("span", { className: "sa:min-w-0 sa:flex-1 sa:truncate sa:text-sm sa:leading-4 sa:font-medium sa:tracking-normal sa:text-text-default", children: label }),
|
|
120
|
+
typeof count === "number" && /* @__PURE__ */ jsx("span", { className: "sa:shrink-0 sa:px-1.5 sa:py-0.5 sa:text-sm sa:leading-4 sa:font-medium sa:tracking-normal sa:text-tone-fg sa:tabular-nums", children: count }),
|
|
121
121
|
/* @__PURE__ */ jsx(
|
|
122
122
|
NavArrowRight,
|
|
123
123
|
{
|
|
124
124
|
"aria-hidden": true,
|
|
125
|
-
className: "transition-transform duration-(--duration-base) ease-(--ease-out) group-data-[state=open]/sidebar-group:rotate-90 motion-reduce:transition-none"
|
|
125
|
+
className: "sa:transition-transform sa:duration-(--sa-duration-base) sa:ease-(--sa-ease-out) sa:group-data-[state=open]/sidebar-group:rotate-90 sa:motion-reduce:transition-none"
|
|
126
126
|
}
|
|
127
127
|
)
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
130
|
),
|
|
131
|
-
/* @__PURE__ */ jsx("div", { id: regionId, "data-state": open ? "open" : "closed", className: "satin-expand", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children }) })
|
|
131
|
+
/* @__PURE__ */ jsx("div", { id: regionId, "data-state": open ? "open" : "closed", className: "satin-expand", children: /* @__PURE__ */ jsx("div", { className: "sa:flex sa:flex-col sa:gap-0.5", children }) })
|
|
132
132
|
]
|
|
133
133
|
}
|
|
134
134
|
);
|
|
@@ -154,16 +154,16 @@ function SidebarSubItem({
|
|
|
154
154
|
href: disabled ? void 0 : href,
|
|
155
155
|
tabIndex: disabled ? -1 : void 0,
|
|
156
156
|
className: cn(
|
|
157
|
-
"flex h-8 shrink-0 items-center rounded-lg pr-3 pl-[34px] text-sm font-normal text-text-muted no-underline select-none",
|
|
158
|
-
"transition-[background-color,color,box-shadow] duration-(--duration-fast) ease-(--ease-out)",
|
|
159
|
-
"not-data-active:satin-hover:bg-bg-muted not-data-active:satin-hover:text-text-default",
|
|
157
|
+
"sa:flex sa:h-8 sa:shrink-0 sa:items-center sa:rounded-lg sa:pr-3 sa:pl-[34px] sa:text-sm sa:font-normal sa:text-text-muted sa:no-underline sa:select-none",
|
|
158
|
+
"sa:transition-[background-color,color,box-shadow] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
159
|
+
"sa:not-data-active:satin-hover:bg-bg-muted sa:not-data-active:satin-hover:text-text-default",
|
|
160
160
|
rowFocus,
|
|
161
|
-
"data-active:bg-bg-selected data-active:text-text-default",
|
|
162
|
-
"aria-disabled:pointer-events-none aria-disabled:opacity-50",
|
|
161
|
+
"sa:data-active:bg-bg-selected sa:data-active:text-text-default",
|
|
162
|
+
"sa:aria-disabled:pointer-events-none sa:aria-disabled:opacity-50",
|
|
163
163
|
className
|
|
164
164
|
),
|
|
165
165
|
...props,
|
|
166
|
-
children: asChild ? children : /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
|
|
166
|
+
children: asChild ? children : /* @__PURE__ */ jsx("span", { className: "sa:min-w-0 sa:flex-1 sa:truncate", children: label })
|
|
167
167
|
}
|
|
168
168
|
);
|
|
169
169
|
}
|
|
@@ -180,7 +180,7 @@ function SidebarSubGroup({
|
|
|
180
180
|
const [uncontrolled, setUncontrolled] = React.useState(defaultOpen ?? active);
|
|
181
181
|
const open = openProp ?? uncontrolled;
|
|
182
182
|
const regionId = React.useId();
|
|
183
|
-
return /* @__PURE__ */ jsxs("div", { "data-slot": "sidebar-sub-group", "data-state": open ? "open" : "closed", className: cn("group/sub-group flex flex-col gap-0.5", className), ...props, children: [
|
|
183
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "sidebar-sub-group", "data-state": open ? "open" : "closed", className: cn("sa:group/sub-group sa:flex sa:flex-col sa:gap-0.5", className), ...props, children: [
|
|
184
184
|
/* @__PURE__ */ jsxs(
|
|
185
185
|
"button",
|
|
186
186
|
{
|
|
@@ -193,28 +193,26 @@ function SidebarSubGroup({
|
|
|
193
193
|
onOpenChange?.(!open);
|
|
194
194
|
},
|
|
195
195
|
className: cn(
|
|
196
|
-
"flex h-8 w-full shrink-0 items-center gap-2 rounded-lg pr-3 pl-[34px] text-left text-sm font-normal text-text-muted select-none",
|
|
197
|
-
"transition-[background-color,color,box-shadow] duration-(--duration-fast) ease-(--ease-out)",
|
|
198
|
-
"satin-hover:bg-bg-muted satin-hover:text-text-default data-active:text-text-default",
|
|
199
|
-
"[&_svg]:size-icon-size-sm [&_svg]:shrink-0 [&_svg]:[stroke-width:1.875]",
|
|
196
|
+
"sa:flex sa:h-8 sa:w-full sa:shrink-0 sa:items-center sa:gap-2 sa:rounded-lg sa:pr-3 sa:pl-[34px] sa:text-left sa:text-sm sa:font-normal sa:text-text-muted sa:select-none",
|
|
197
|
+
"sa:transition-[background-color,color,box-shadow] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
198
|
+
"sa:satin-hover:bg-bg-muted sa:satin-hover:text-text-default sa:data-active:text-text-default",
|
|
199
|
+
"sa:[&_svg]:size-icon-size-sm sa:[&_svg]:shrink-0 sa:[&_svg]:[stroke-width:1.875]",
|
|
200
200
|
rowFocus
|
|
201
201
|
),
|
|
202
202
|
children: [
|
|
203
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label }),
|
|
203
|
+
/* @__PURE__ */ jsx("span", { className: "sa:min-w-0 sa:flex-1 sa:truncate", children: label }),
|
|
204
204
|
/* @__PURE__ */ jsx(
|
|
205
205
|
NavArrowRight,
|
|
206
206
|
{
|
|
207
207
|
"aria-hidden": true,
|
|
208
|
-
className: "text-text-muted transition-transform duration-(--duration-base) ease-(--ease-out) group-data-[state=open]/sub-group:rotate-90 motion-reduce:transition-none"
|
|
208
|
+
className: "sa:text-text-muted sa:transition-transform sa:duration-(--sa-duration-base) sa:ease-(--sa-ease-out) sa:group-data-[state=open]/sub-group:rotate-90 sa:motion-reduce:transition-none"
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
]
|
|
212
212
|
}
|
|
213
213
|
),
|
|
214
|
-
/* @__PURE__ */ jsx("div", { id: regionId, "data-state": open ? "open" : "closed", className: "satin-expand", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5 [&>[data-slot=sidebar-sub-item]]:pl-[46px]", children }) })
|
|
214
|
+
/* @__PURE__ */ jsx("div", { id: regionId, "data-state": open ? "open" : "closed", className: "satin-expand", children: /* @__PURE__ */ jsx("div", { className: "sa:flex sa:flex-col sa:gap-0.5 sa:[&>[data-slot=sidebar-sub-item]]:pl-[46px]", children }) })
|
|
215
215
|
] });
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
export { Sidebar, SidebarGroup, SidebarItem, SidebarSubGroup, SidebarSubItem };
|
|
219
|
-
//# sourceMappingURL=chunk-BNTPPZCK.js.map
|
|
220
|
-
//# sourceMappingURL=chunk-BNTPPZCK.js.map
|