@uisatin/ui 0.1.1 → 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 +33 -0
- package/README.md +20 -3
- 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-BN7FDKCJ.js +164 -0
- 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.d.ts +16 -0
- 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 +22 -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-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-TVLGZGYN.js +0 -59
- package/chunk-TVLGZGYN.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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bannerMesh } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
3
|
-
import { cn } from './chunk-
|
|
1
|
+
import { bannerMesh } from './chunk-YYFAZQ25.js';
|
|
2
|
+
import { Button } from './chunk-T6L32XXH.js';
|
|
3
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { Xmark } from 'iconoir-react';
|
|
@@ -8,26 +8,26 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
8
8
|
|
|
9
9
|
var bannerVariants = cva(
|
|
10
10
|
[
|
|
11
|
-
"relative isolate flex max-w-full overflow-clip border border-border-default bg-bg-card",
|
|
12
|
-
"[box-shadow:0_2px_4px_-2px_var(--effect-shadow-sm),0_4px_6px_-1px_var(--effect-shadow-sm)]"
|
|
11
|
+
"sa:relative sa:isolate sa:flex sa:max-w-full sa:overflow-clip sa:border sa:border-border-default sa:bg-bg-card",
|
|
12
|
+
"sa:[box-shadow:0_2px_4px_-2px_var(--effect-shadow-sm),0_4px_6px_-1px_var(--effect-shadow-sm)]"
|
|
13
13
|
],
|
|
14
14
|
{
|
|
15
15
|
variants: {
|
|
16
16
|
layout: {
|
|
17
|
-
horizontal: "w-[450px] items-center gap-2.5 px-3 py-2",
|
|
18
|
-
sidebar: "w-[222px] flex-col items-start gap-3 p-3"
|
|
17
|
+
horizontal: "sa:w-[450px] sa:items-center sa:gap-2.5 sa:px-3 sa:py-2",
|
|
18
|
+
sidebar: "sa:w-[222px] sa:flex-col sa:items-start sa:gap-3 sa:p-3"
|
|
19
19
|
},
|
|
20
20
|
shape: {
|
|
21
|
-
rounded: "rounded-xl",
|
|
22
|
-
pill: "rounded-3xl"
|
|
21
|
+
rounded: "sa:rounded-xl",
|
|
22
|
+
pill: "sa:rounded-3xl"
|
|
23
23
|
},
|
|
24
24
|
lines: {
|
|
25
25
|
one: "",
|
|
26
26
|
two: ""
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
compoundVariants: [{ layout: "horizontal", shape: "pill", lines: "one", className: "rounded-pill" }],
|
|
30
|
-
defaultVariants: { layout: "horizontal", shape: "rounded", lines: "one" }
|
|
29
|
+
compoundVariants: [{ layout: "horizontal", shape: "pill", lines: "one", className: "sa:rounded-pill" }],
|
|
30
|
+
defaultVariants: { layout: "horizontal", shape: "sa:rounded", lines: "one" }
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
function Banner({
|
|
@@ -59,8 +59,8 @@ function Banner({
|
|
|
59
59
|
"aria-label": dismissLabel,
|
|
60
60
|
onClick: onDismiss,
|
|
61
61
|
className: cn(
|
|
62
|
-
sidebar && "absolute top-[3px] right-[3px] z-10",
|
|
63
|
-
primary && "text-action-primary-fg [&_svg]:text-action-primary-fg satin-hover:bg-action-primary-bg-hover"
|
|
62
|
+
sidebar && "sa:absolute sa:top-[3px] sa:right-[3px] sa:z-10",
|
|
63
|
+
primary && "sa:text-action-primary-fg sa:[&_svg]:text-action-primary-fg sa:satin-hover:bg-action-primary-bg-hover"
|
|
64
64
|
),
|
|
65
65
|
children: /* @__PURE__ */ jsx(Xmark, { "aria-hidden": true })
|
|
66
66
|
}
|
|
@@ -74,7 +74,7 @@ function Banner({
|
|
|
74
74
|
"data-tone": tone,
|
|
75
75
|
className: cn(
|
|
76
76
|
bannerVariants({ layout, shape, lines }),
|
|
77
|
-
primary && "border-action-primary-border bg-action-primary-bg",
|
|
77
|
+
primary && "sa:border-action-primary-border sa:bg-action-primary-bg",
|
|
78
78
|
shimmer && "satin-sheen",
|
|
79
79
|
className
|
|
80
80
|
),
|
|
@@ -86,7 +86,7 @@ function Banner({
|
|
|
86
86
|
src: glow.dark,
|
|
87
87
|
alt: "",
|
|
88
88
|
"aria-hidden": true,
|
|
89
|
-
className: "pointer-events-none absolute
|
|
89
|
+
className: "sa:pointer-events-none sa:absolute sa:-inset-px sa:-z-10 sa:size-[calc(100%+2px)] sa:max-w-none sa:object-cover sa:mix-blend-screen"
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
92
|
background === "mesh" && !primary && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -96,7 +96,7 @@ function Banner({
|
|
|
96
96
|
src: glow.light,
|
|
97
97
|
alt: "",
|
|
98
98
|
"aria-hidden": true,
|
|
99
|
-
className: "pointer-events-none absolute
|
|
99
|
+
className: "sa:pointer-events-none sa:absolute sa:-inset-px sa:-z-10 sa:size-[calc(100%+2px)] sa:max-w-none sa:object-cover sa:mix-blend-multiply"
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
102
|
/* @__PURE__ */ jsx(
|
|
@@ -105,7 +105,7 @@ function Banner({
|
|
|
105
105
|
src: glow.dark,
|
|
106
106
|
alt: "",
|
|
107
107
|
"aria-hidden": true,
|
|
108
|
-
className: "pointer-events-none absolute
|
|
108
|
+
className: "sa:pointer-events-none sa:absolute sa:-inset-px sa:-z-10 sa:size-[calc(100%+2px)] sa:max-w-none sa:object-cover sa:mix-blend-screen"
|
|
109
109
|
}
|
|
110
110
|
)
|
|
111
111
|
] }),
|
|
@@ -113,20 +113,20 @@ function Banner({
|
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
className: cn(
|
|
116
|
-
"flex min-w-0 flex-col justify-center text-sm",
|
|
117
|
-
sidebar ? "w-full" : "flex-1",
|
|
118
|
-
description && "gap-0.5"
|
|
116
|
+
"sa:flex sa:min-w-0 sa:flex-col sa:justify-center sa:text-sm",
|
|
117
|
+
sidebar ? "sa:w-full" : "sa:flex-1",
|
|
118
|
+
description && "sa:gap-0.5"
|
|
119
119
|
),
|
|
120
120
|
children: [
|
|
121
|
-
/* @__PURE__ */ jsx("p", { className: cn("truncate text-base leading-[18px] font-medium", primary ? "text-action-primary-fg" : "text-text-default"), children: title }),
|
|
122
|
-
description && /* @__PURE__ */ jsx("p", { className: cn("text-body", primary ? "text-action-primary-fg/80" : "text-text-muted", !sidebar && "truncate"), children: description })
|
|
121
|
+
/* @__PURE__ */ jsx("p", { className: cn("sa:truncate sa:text-base sa:leading-[18px] sa:font-medium", primary ? "sa:text-action-primary-fg" : "sa:text-text-default"), children: title }),
|
|
122
|
+
description && /* @__PURE__ */ jsx("p", { className: cn("sa:text-body", primary ? "sa:text-action-primary-fg/80" : "sa:text-text-muted", !sidebar && "sa:truncate"), children: description })
|
|
123
123
|
]
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
sidebar ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
127
|
-
action && /* @__PURE__ */ jsx("div", { className: "flex w-full items-center
|
|
127
|
+
action && /* @__PURE__ */ jsx("div", { className: "sa:flex sa:w-full sa:items-center sa:*:flex-1", children: action }),
|
|
128
128
|
close
|
|
129
|
-
] }) : (action || close) && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
129
|
+
] }) : (action || close) && /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:shrink-0 sa:items-center sa:gap-1", children: [
|
|
130
130
|
action,
|
|
131
131
|
close
|
|
132
132
|
] })
|
|
@@ -136,5 +136,3 @@ function Banner({
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
export { Banner, bannerVariants };
|
|
139
|
-
//# sourceMappingURL=chunk-6QMSWITQ.js.map
|
|
140
|
-
//# sourceMappingURL=chunk-6QMSWITQ.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Kbd } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { Kbd } from './chunk-57QEOCDZ.js';
|
|
2
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Search } from 'iconoir-react';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -24,14 +24,14 @@ var SearchBar = React.forwardRef(function SearchBar2({ shortcut = true, hotkey =
|
|
|
24
24
|
{
|
|
25
25
|
"data-slot": "search-bar",
|
|
26
26
|
className: cn(
|
|
27
|
-
"flex h-control-height-lg w-full cursor-text items-center gap-2 rounded-lg border border-border-default bg-bg-card px-2",
|
|
28
|
-
"[box-shadow:0_1px_1px_0_var(--effect-shadow-xs)] transition-[border-color,box-shadow] duration-(--duration-fast) ease-(--ease-out)",
|
|
29
|
-
"hover:border-border-strong",
|
|
30
|
-
"has-[input:focus-visible]:border-border-focus has-[input:focus-visible]:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
27
|
+
"sa:flex sa:h-control-height-lg sa:w-full sa:cursor-text sa:items-center sa:gap-2 sa:rounded-lg sa:border sa:border-border-default sa:bg-bg-card sa:px-2",
|
|
28
|
+
"sa:[box-shadow:0_1px_1px_0_var(--effect-shadow-xs)] sa:transition-[border-color,box-shadow] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
29
|
+
"sa:hover:border-border-strong",
|
|
30
|
+
"sa:has-[input:focus-visible]:border-border-focus sa:has-[input:focus-visible]:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
31
31
|
wrapperClassName
|
|
32
32
|
),
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */ jsx(Search, { "aria-hidden": true, className: "size-4 shrink-0 text-text-muted [stroke-width:1.875]" }),
|
|
34
|
+
/* @__PURE__ */ jsx(Search, { "aria-hidden": true, className: "sa:size-4 sa:shrink-0 sa:text-text-muted sa:[stroke-width:1.875]" }),
|
|
35
35
|
/* @__PURE__ */ jsx(
|
|
36
36
|
"input",
|
|
37
37
|
{
|
|
@@ -48,14 +48,14 @@ var SearchBar = React.forwardRef(function SearchBar2({ shortcut = true, hotkey =
|
|
|
48
48
|
onKeyDown?.(e);
|
|
49
49
|
},
|
|
50
50
|
className: cn(
|
|
51
|
-
"min-w-0 flex-1 bg-transparent text-sm text-text-default outline-none placeholder:text-text-muted focus-visible:ring-0",
|
|
52
|
-
"[&::-webkit-search-cancel-button]:appearance-none",
|
|
51
|
+
"sa:min-w-0 sa:flex-1 sa:bg-transparent sa:text-sm sa:text-text-default sa:outline-none sa:placeholder:text-text-muted sa:focus-visible:ring-0",
|
|
52
|
+
"sa:[&::-webkit-search-cancel-button]:appearance-none",
|
|
53
53
|
className
|
|
54
54
|
),
|
|
55
55
|
...props
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
|
-
shortcut && /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "flex shrink-0 items-center gap-0.5", children: [
|
|
58
|
+
shortcut && /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "sa:flex sa:shrink-0 sa:items-center sa:gap-0.5", children: [
|
|
59
59
|
/* @__PURE__ */ jsx(Kbd, { children: "\u2318" }),
|
|
60
60
|
/* @__PURE__ */ jsx(Kbd, { children: "K" })
|
|
61
61
|
] })
|
|
@@ -65,5 +65,3 @@ var SearchBar = React.forwardRef(function SearchBar2({ shortcut = true, hotkey =
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
export { SearchBar };
|
|
68
|
-
//# sourceMappingURL=chunk-UGRSWP6U.js.map
|
|
69
|
-
//# sourceMappingURL=chunk-UGRSWP6U.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/components/labels.tsx
|
|
5
|
+
var defaultLabels = {
|
|
6
|
+
close: "Close",
|
|
7
|
+
dismiss: "Dismiss",
|
|
8
|
+
announcement: "Announcement",
|
|
9
|
+
increase: "Increase",
|
|
10
|
+
decrease: "Decrease",
|
|
11
|
+
previous: "Previous",
|
|
12
|
+
next: "Next",
|
|
13
|
+
previousSection: "Previous section",
|
|
14
|
+
nextSection: "Next section",
|
|
15
|
+
previousQuestion: "Previous question",
|
|
16
|
+
nextQuestion: "Next question",
|
|
17
|
+
previousMonth: "Previous month",
|
|
18
|
+
nextMonth: "Next month",
|
|
19
|
+
year: "Year",
|
|
20
|
+
month: "Month",
|
|
21
|
+
sheets: "Sheets",
|
|
22
|
+
hiddenPages: "Hidden pages",
|
|
23
|
+
period: "Period",
|
|
24
|
+
commandMenu: "Command menu",
|
|
25
|
+
searchCommands: "Search commands",
|
|
26
|
+
commands: "Commands",
|
|
27
|
+
draft: "Draft",
|
|
28
|
+
files: "Files",
|
|
29
|
+
attachedFiles: "Attached files",
|
|
30
|
+
goodResponse: "Good response",
|
|
31
|
+
badResponse: "Bad response",
|
|
32
|
+
copy: "Copy",
|
|
33
|
+
attachments: "Attachments",
|
|
34
|
+
addToConversation: "Add to conversation",
|
|
35
|
+
message: "Message",
|
|
36
|
+
send: "Send",
|
|
37
|
+
stop: "Stop",
|
|
38
|
+
searchAgentsAndTools: "Search agents and tools",
|
|
39
|
+
addAgent: "Add an agent",
|
|
40
|
+
agentsAndTools: "Agents and tools",
|
|
41
|
+
model: "Model",
|
|
42
|
+
agent: "Agent",
|
|
43
|
+
remove: "Remove",
|
|
44
|
+
add: "Add",
|
|
45
|
+
selectAllRows: "Select all rows",
|
|
46
|
+
selectRow: "Select row",
|
|
47
|
+
select: "Select\u2026",
|
|
48
|
+
search: "Search\u2026",
|
|
49
|
+
noResults: "No results",
|
|
50
|
+
clear: "Clear",
|
|
51
|
+
apply: "Apply",
|
|
52
|
+
cancel: "Cancel",
|
|
53
|
+
pickDate: "Pick a date",
|
|
54
|
+
pickDates: "Pick dates",
|
|
55
|
+
from: "From",
|
|
56
|
+
to: "To",
|
|
57
|
+
value: "Value",
|
|
58
|
+
selected: "selected",
|
|
59
|
+
commandPlaceholder: "Type a command or search\u2026",
|
|
60
|
+
navigate: "Navigate",
|
|
61
|
+
openItem: "Open",
|
|
62
|
+
source: "Source"
|
|
63
|
+
};
|
|
64
|
+
var LabelsContext = React.createContext(defaultLabels);
|
|
65
|
+
function SatinLabels({ labels, children }) {
|
|
66
|
+
const parent = React.useContext(LabelsContext);
|
|
67
|
+
const value = React.useMemo(() => ({ ...parent, ...labels }), [parent, labels]);
|
|
68
|
+
return /* @__PURE__ */ jsx(LabelsContext.Provider, { value, children });
|
|
69
|
+
}
|
|
70
|
+
function useSatinLabels() {
|
|
71
|
+
return React.useContext(LabelsContext);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { SatinLabels, defaultLabels, useSatinLabels };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
2
|
-
import {
|
|
1
|
+
import { Button } from './chunk-T6L32XXH.js';
|
|
2
|
+
import { useSatinLabels } from './chunk-SSOFFQ5T.js';
|
|
3
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { Clock, DoubleCheck, ThumbsUp, ThumbsDown, Copy, Link } from 'iconoir-react';
|
|
5
6
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
6
7
|
|
|
7
|
-
var divider = /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-3 w-px shrink-0 rounded-full bg-border-default" });
|
|
8
|
+
var divider = /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:h-3 sa:w-px sa:shrink-0 sa:rounded-full sa:bg-border-default" });
|
|
8
9
|
function MessageActions({
|
|
9
10
|
timestamp,
|
|
10
11
|
status = "delivered",
|
|
@@ -16,6 +17,7 @@ function MessageActions({
|
|
|
16
17
|
className,
|
|
17
18
|
...props
|
|
18
19
|
}) {
|
|
20
|
+
const labels = useSatinLabels();
|
|
19
21
|
const [feedback, setFeedback] = React.useState(feedbackProp);
|
|
20
22
|
React.useEffect(() => setFeedback(feedbackProp), [feedbackProp]);
|
|
21
23
|
const toggle = (value) => {
|
|
@@ -23,26 +25,26 @@ function MessageActions({
|
|
|
23
25
|
setFeedback(next);
|
|
24
26
|
onFeedback?.(next);
|
|
25
27
|
};
|
|
26
|
-
const thumb = "aria-pressed:bg-border-input aria-pressed:[&_svg]:text-text-subtle";
|
|
27
|
-
return /* @__PURE__ */ jsxs("div", { "data-slot": "message-actions", className: cn("flex items-center gap-2", className), ...props, children: [
|
|
28
|
+
const thumb = "sa:aria-pressed:bg-border-input sa:aria-pressed:[&_svg]:text-text-subtle";
|
|
29
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "message-actions", className: cn("sa:flex sa:items-center sa:gap-2", className), ...props, children: [
|
|
28
30
|
timestamp && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5", children: [
|
|
30
|
-
/* @__PURE__ */ jsxs("span", { className: "flex size-6 items-center justify-center text-text-muted", children: [
|
|
31
|
-
status === "sending" ? /* @__PURE__ */ jsx(Clock, { "aria-hidden": true, className: "size-icon-size [stroke-width:1.875]" }) : /* @__PURE__ */ jsx(DoubleCheck, { "aria-hidden": true, className: "size-icon-size [stroke-width:1.875]" }),
|
|
32
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: status === "sending" ? "Sending" : "Delivered" })
|
|
31
|
+
/* @__PURE__ */ jsxs("span", { className: "sa:flex sa:items-center sa:gap-0.5", children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("span", { className: "sa:flex sa:size-6 sa:items-center sa:justify-center sa:text-text-muted", children: [
|
|
33
|
+
status === "sending" ? /* @__PURE__ */ jsx(Clock, { "aria-hidden": true, className: "sa:size-icon-size sa:[stroke-width:1.875]" }) : /* @__PURE__ */ jsx(DoubleCheck, { "aria-hidden": true, className: "sa:size-icon-size sa:[stroke-width:1.875]" }),
|
|
34
|
+
/* @__PURE__ */ jsx("span", { className: "sa:sr-only", children: status === "sending" ? "Sending" : "Delivered" })
|
|
33
35
|
] }),
|
|
34
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium whitespace-nowrap text-text-muted", children: timestamp })
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: "sa:text-sm sa:font-medium sa:whitespace-nowrap sa:text-text-muted", children: timestamp })
|
|
35
37
|
] }),
|
|
36
38
|
divider
|
|
37
39
|
] }),
|
|
38
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("span", { className: "sa:flex sa:items-center sa:gap-0.5", children: [
|
|
39
41
|
/* @__PURE__ */ jsx(
|
|
40
42
|
Button,
|
|
41
43
|
{
|
|
42
44
|
variant: "tertiary",
|
|
43
45
|
size: "xs",
|
|
44
46
|
iconOnly: true,
|
|
45
|
-
"aria-label":
|
|
47
|
+
"aria-label": labels.goodResponse,
|
|
46
48
|
"aria-pressed": feedback === "like",
|
|
47
49
|
onClick: () => toggle("like"),
|
|
48
50
|
className: thumb,
|
|
@@ -55,14 +57,14 @@ function MessageActions({
|
|
|
55
57
|
variant: "tertiary",
|
|
56
58
|
size: "xs",
|
|
57
59
|
iconOnly: true,
|
|
58
|
-
"aria-label":
|
|
60
|
+
"aria-label": labels.badResponse,
|
|
59
61
|
"aria-pressed": feedback === "dislike",
|
|
60
62
|
onClick: () => toggle("dislike"),
|
|
61
63
|
className: thumb,
|
|
62
64
|
children: /* @__PURE__ */ jsx(ThumbsDown, {})
|
|
63
65
|
}
|
|
64
66
|
),
|
|
65
|
-
/* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "xs", iconOnly: true, "aria-label":
|
|
67
|
+
/* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "xs", iconOnly: true, "aria-label": labels.copy, onClick: onCopy, children: /* @__PURE__ */ jsx(Copy, {}) })
|
|
66
68
|
] }),
|
|
67
69
|
showShare && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
70
|
divider,
|
|
@@ -75,5 +77,3 @@ function MessageActions({
|
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
export { MessageActions };
|
|
78
|
-
//# sourceMappingURL=chunk-AN2RNJLR.js.map
|
|
79
|
-
//# sourceMappingURL=chunk-AN2RNJLR.js.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { Slot } from 'radix-ui';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var buttonVariants = cva(
|
|
8
|
+
[
|
|
9
|
+
"sa:inline-flex sa:shrink-0 sa:items-center sa:justify-center sa:overflow-clip sa:font-medium sa:whitespace-nowrap sa:select-none",
|
|
10
|
+
"sa:transition-[background-color,border-color,color,box-shadow,transform] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
11
|
+
// A menu or popover trigger snaps back to full size the moment it opens (no scale, no
|
|
12
|
+
// transform transition), so the menu measures the button's real edge and never jumps.
|
|
13
|
+
"sa:not-aria-expanded:active:scale-[0.97] sa:aria-expanded:[transition-property:background-color,border-color,color,box-shadow]",
|
|
14
|
+
"sa:disabled:pointer-events-none sa:disabled:opacity-50",
|
|
15
|
+
"sa:focus-visible:outline-none sa:[&_svg]:pointer-events-none sa:[&_svg]:shrink-0",
|
|
16
|
+
// Figma icons are 1.25px at 16 and 1.09px at 14; on Iconoir's 24 grid both are 1.875.
|
|
17
|
+
"sa:[&_svg]:[stroke-width:1.875]"
|
|
18
|
+
],
|
|
19
|
+
{
|
|
20
|
+
variants: {
|
|
21
|
+
variant: {
|
|
22
|
+
primary: [
|
|
23
|
+
"sa:border sa:border-action-primary-border sa:bg-action-primary-bg sa:text-action-primary-fg",
|
|
24
|
+
"sa:[box-shadow:0_0_0_1px_var(--action-primary-bg),0_3px_6px_0_var(--action-primary-shadow)]",
|
|
25
|
+
"sa:satin-hover:bg-action-primary-bg-hover sa:satin-hover:[box-shadow:0_0_0_1px_var(--action-primary-bg-hover),0_3px_6px_0_var(--action-primary-shadow)]",
|
|
26
|
+
"sa:satin-focus:[box-shadow:0_0_0_1px_var(--action-primary-bg),0_3px_6px_0_var(--action-primary-shadow),0_0_0_2px_var(--action-focus-ring)]",
|
|
27
|
+
"sa:satin-pressed:bg-action-primary-bg-pressed sa:satin-pressed:[box-shadow:0_0_0_1px_var(--action-primary-bg-pressed)]",
|
|
28
|
+
"sa:[&[aria-haspopup][aria-expanded=true]:focus-visible]:[box-shadow:0_0_0_1px_var(--action-primary-bg-pressed),0_0_0_2px_var(--action-focus-ring)]"
|
|
29
|
+
],
|
|
30
|
+
destructive: [
|
|
31
|
+
"sa:border sa:border-action-destructive-border sa:bg-action-destructive-bg sa:text-text-on-solid",
|
|
32
|
+
"sa:[box-shadow:0_0_0_1px_var(--action-destructive-bg),0_3px_6px_0_var(--action-primary-shadow)]",
|
|
33
|
+
"sa:satin-hover:bg-action-destructive-bg-hover sa:satin-hover:[box-shadow:0_0_0_1px_var(--action-destructive-bg-hover),0_3px_6px_0_var(--action-primary-shadow)]",
|
|
34
|
+
"sa:satin-focus:[box-shadow:0_0_0_1px_var(--action-destructive-bg),0_3px_6px_0_var(--action-primary-shadow),0_0_0_2px_var(--action-focus-ring)]",
|
|
35
|
+
"sa:satin-pressed:bg-action-destructive-bg-pressed sa:satin-pressed:[box-shadow:0_0_0_1px_var(--action-destructive-bg-pressed)]",
|
|
36
|
+
"sa:[&[aria-haspopup][aria-expanded=true]:focus-visible]:[box-shadow:0_0_0_1px_var(--action-destructive-bg-pressed),0_0_0_2px_var(--action-focus-ring)]"
|
|
37
|
+
],
|
|
38
|
+
inverse: [
|
|
39
|
+
"sa:border sa:border-action-inverse-border sa:bg-action-inverse-bg sa:text-text-on-inverse",
|
|
40
|
+
"sa:[box-shadow:0_0_0_1px_var(--action-inverse-bg),0_3px_6px_0_var(--action-primary-shadow)]",
|
|
41
|
+
"sa:satin-hover:bg-action-inverse-bg-hover sa:satin-hover:[box-shadow:0_0_0_1px_var(--action-inverse-bg-hover),0_3px_6px_0_var(--action-primary-shadow)]",
|
|
42
|
+
"sa:satin-focus:[box-shadow:0_0_0_1px_var(--action-inverse-bg),0_3px_6px_0_var(--action-primary-shadow),0_0_0_2px_var(--action-focus-ring)]",
|
|
43
|
+
"sa:satin-pressed:bg-action-inverse-bg-pressed sa:satin-pressed:[box-shadow:0_0_0_1px_var(--action-inverse-bg-pressed)]",
|
|
44
|
+
"sa:[&[aria-haspopup][aria-expanded=true]:focus-visible]:[box-shadow:0_0_0_1px_var(--action-inverse-bg-pressed),0_0_0_2px_var(--action-focus-ring)]"
|
|
45
|
+
],
|
|
46
|
+
// The outline is a 1px ring outside the box, like the filled variants' ring, so all of
|
|
47
|
+
// them read the same height; the border underneath takes the fill.
|
|
48
|
+
secondary: [
|
|
49
|
+
"sa:border sa:border-transparent sa:bg-bg-popover sa:text-text-default sa:[&_svg]:text-text-muted",
|
|
50
|
+
"sa:[box-shadow:0_0_0_1px_var(--border-default),0_1px_2px_1px_var(--effect-shadow-xs)]",
|
|
51
|
+
"sa:disabled:[box-shadow:0_0_0_1px_var(--border-strong)]",
|
|
52
|
+
"sa:satin-hover:bg-action-secondary-bg-hover sa:satin-hover:[box-shadow:0_0_0_1px_var(--border-strong),0_1px_2px_1px_var(--effect-shadow-xs)]",
|
|
53
|
+
"sa:satin-focus:bg-bg-popover sa:satin-focus:[box-shadow:0_0_0_1px_var(--border-strong),0_0_0_2px_var(--action-focus-ring)]",
|
|
54
|
+
"sa:satin-pressed:bg-action-secondary-bg-pressed sa:satin-pressed:[box-shadow:0_0_0_1px_var(--border-strong)]",
|
|
55
|
+
"sa:[&[aria-haspopup][aria-expanded=true]:focus-visible]:[box-shadow:0_0_0_1px_var(--border-strong),0_0_0_2px_var(--action-focus-ring)]"
|
|
56
|
+
],
|
|
57
|
+
tertiary: [
|
|
58
|
+
"sa:bg-transparent sa:text-text-default sa:[&_svg]:text-text-muted",
|
|
59
|
+
"sa:satin-hover:bg-bg-hover",
|
|
60
|
+
"sa:satin-focus:bg-bg-hover sa:satin-focus:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
61
|
+
"sa:satin-pressed:bg-border-input",
|
|
62
|
+
"sa:[&[aria-haspopup][aria-expanded=true]:focus-visible]:[box-shadow:0_0_0_2px_var(--action-focus-ring)]"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
xs: "sa:h-control-height-xs sa:gap-1 sa:px-2 sa:text-sm sa:[&_svg]:size-icon-size-sm",
|
|
67
|
+
md: "sa:h-control-height sa:gap-1.5 sa:px-2.5 sa:text-sm sa:[&_svg]:size-icon-size",
|
|
68
|
+
lg: "sa:h-control-height-lg sa:gap-1.5 sa:px-3 sa:text-sm sa:[&_svg]:size-icon-size",
|
|
69
|
+
xl: "sa:h-control-height-xl sa:gap-2 sa:px-3 sa:text-base sa:[&_svg]:size-icon-size"
|
|
70
|
+
},
|
|
71
|
+
shape: {
|
|
72
|
+
default: "",
|
|
73
|
+
rounded: "sa:rounded-pill"
|
|
74
|
+
},
|
|
75
|
+
iconOnly: {
|
|
76
|
+
true: "sa:px-0",
|
|
77
|
+
false: ""
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
compoundVariants: [
|
|
81
|
+
// Default shape: the radius grows with the size (8 / 10 / 10 / 12).
|
|
82
|
+
{ shape: "default", size: "xs", className: "sa:rounded-md" },
|
|
83
|
+
{ shape: "default", size: "md", className: "sa:rounded-lg" },
|
|
84
|
+
{ shape: "default", size: "lg", className: "sa:rounded-lg" },
|
|
85
|
+
{ shape: "default", size: "xl", className: "sa:rounded-xl" },
|
|
86
|
+
{ iconOnly: true, size: "xs", className: "sa:w-control-height-xs" },
|
|
87
|
+
{ iconOnly: true, size: "md", className: "sa:w-control-height" },
|
|
88
|
+
{ iconOnly: true, size: "lg", className: "sa:w-control-height-lg" },
|
|
89
|
+
{ iconOnly: true, size: "xl", className: "sa:w-control-height-xl" }
|
|
90
|
+
],
|
|
91
|
+
defaultVariants: { variant: "primary", size: "md", shape: "default", iconOnly: false }
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
function Button({ className, variant, size, shape, iconOnly, asChild = false, type, ...props }) {
|
|
95
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
Comp,
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "button",
|
|
100
|
+
type: asChild ? void 0 : type ?? "button",
|
|
101
|
+
className: cn(buttonVariants({ variant, size, shape, iconOnly }), className),
|
|
102
|
+
...props
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { Button, buttonVariants };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useSlidingIndicator, SLIDE_MS } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
3
|
-
import { cn } from './chunk-
|
|
1
|
+
import { useSlidingIndicator, SLIDE_MS } from './chunk-XETMIETJ.js';
|
|
2
|
+
import { Button } from './chunk-T6L32XXH.js';
|
|
3
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { NavArrowLeft, NavArrowRight } from 'iconoir-react';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -18,10 +18,10 @@ function paginationRange(page, pageCount, siblings = 1) {
|
|
|
18
18
|
return [1, "gap", ...span(left, right), "gap", pageCount];
|
|
19
19
|
}
|
|
20
20
|
var pageClass = cn(
|
|
21
|
-
"relative z-10 grid h-control-height min-w-control-height place-items-center overflow-hidden rounded-lg px-1.5 text-sm text-text-muted tabular-nums",
|
|
22
|
-
"transition-colors duration-(--duration-fast) ease-(--ease-out) outline-none focus-visible:shadow-border-focus",
|
|
23
|
-
"hover:bg-bg-hover hover:text-text-default",
|
|
24
|
-
"aria-[current=page]:font-medium aria-[current=page]:text-text-default aria-[current=page]:hover:bg-transparent"
|
|
21
|
+
"sa:relative sa:z-10 sa:grid sa:h-control-height sa:min-w-control-height sa:place-items-center sa:overflow-hidden sa:rounded-lg sa:px-1.5 sa:text-sm sa:text-text-muted sa:tabular-nums",
|
|
22
|
+
"sa:transition-colors sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out) sa:outline-none sa:focus-visible:shadow-border-focus",
|
|
23
|
+
"sa:hover:bg-bg-hover sa:hover:text-text-default",
|
|
24
|
+
"sa:aria-[current=page]:font-medium sa:aria-[current=page]:text-text-default sa:aria-[current=page]:hover:bg-transparent"
|
|
25
25
|
);
|
|
26
26
|
var STRIP_MS = SLIDE_MS;
|
|
27
27
|
var STEP_PX = 32;
|
|
@@ -32,7 +32,7 @@ function PageText({ text, dir, motion }) {
|
|
|
32
32
|
return (
|
|
33
33
|
// Clipped to the wider number, so in the compact "Page 5 of 12" a moving number never runs
|
|
34
34
|
// into the words around it.
|
|
35
|
-
/* @__PURE__ */ jsxs("span", { className: "inline-grid overflow-hidden align-bottom", children: [
|
|
35
|
+
/* @__PURE__ */ jsxs("span", { className: "sa:inline-grid sa:overflow-hidden sa:align-bottom", children: [
|
|
36
36
|
state.old != null && /* @__PURE__ */ jsx(
|
|
37
37
|
"span",
|
|
38
38
|
{
|
|
@@ -40,7 +40,7 @@ function PageText({ text, dir, motion }) {
|
|
|
40
40
|
"data-motion": motion,
|
|
41
41
|
"data-phase": "out",
|
|
42
42
|
"data-dir": state.dir,
|
|
43
|
-
className: "satin-page-text col-start-1 row-start-1 text-center",
|
|
43
|
+
className: "satin-page-text sa:col-start-1 sa:row-start-1 sa:text-center",
|
|
44
44
|
onAnimationEnd: () => setState((s) => ({ ...s, old: null })),
|
|
45
45
|
children: state.old
|
|
46
46
|
},
|
|
@@ -52,7 +52,7 @@ function PageText({ text, dir, motion }) {
|
|
|
52
52
|
"data-motion": animate ? motion : void 0,
|
|
53
53
|
"data-phase": animate ? "in" : void 0,
|
|
54
54
|
"data-dir": state.dir,
|
|
55
|
-
className: "satin-page-text col-start-1 row-start-1 text-center",
|
|
55
|
+
className: "satin-page-text sa:col-start-1 sa:row-start-1 sa:text-center",
|
|
56
56
|
children: state.text
|
|
57
57
|
},
|
|
58
58
|
`n${state.n}`
|
|
@@ -143,7 +143,7 @@ function Pagination({
|
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
}, [page, motion, layout, dir]);
|
|
146
|
-
const target = (p, className2, children, extra) => getHref ? /* @__PURE__ */ jsx("a", { href: getHref(p), className: className2, onClick: () => go(p), ...extra, children }) : /* @__PURE__ */ jsx("button", { type: "button", className: cn("cursor-pointer", className2), onClick: () => go(p), ...extra, children });
|
|
146
|
+
const target = (p, className2, children, extra) => getHref ? /* @__PURE__ */ jsx("a", { href: getHref(p), className: className2, onClick: () => go(p), ...extra, children }) : /* @__PURE__ */ jsx("button", { type: "button", className: cn("sa:cursor-pointer", className2), onClick: () => go(p), ...extra, children });
|
|
147
147
|
const step = (dir2) => {
|
|
148
148
|
const to = page + dir2;
|
|
149
149
|
const disabled = to < 1 || to > pageCount;
|
|
@@ -159,32 +159,32 @@ function Pagination({
|
|
|
159
159
|
] });
|
|
160
160
|
return getHref && !disabled ? /* @__PURE__ */ jsx(Button, { asChild: true, variant: "tertiary", iconOnly: compact, "aria-label": compact ? label : void 0, children: /* @__PURE__ */ jsx("a", { href: getHref(to), rel: dir2 < 0 ? "prev" : "next", onClick: () => go(to), children: content }) }) : /* @__PURE__ */ jsx(Button, { variant: "tertiary", iconOnly: compact, "aria-label": compact ? label : void 0, disabled, onClick: () => go(to), children: content });
|
|
161
161
|
};
|
|
162
|
-
return /* @__PURE__ */ jsx("nav", { "data-slot": "pagination", "data-layout": layout, "aria-label": ariaLabel, className: cn("flex items-center", className), ...props, children: layout === "compact" ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
162
|
+
return /* @__PURE__ */ jsx("nav", { "data-slot": "pagination", "data-layout": layout, "aria-label": ariaLabel, className: cn("sa:flex sa:items-center", className), ...props, children: layout === "compact" ? /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:items-center sa:gap-2", children: [
|
|
163
163
|
step(-1),
|
|
164
|
-
/* @__PURE__ */ jsxs("span", { className: "text-sm text-text-muted tabular-nums", "aria-live": "polite", children: [
|
|
164
|
+
/* @__PURE__ */ jsxs("span", { className: "sa:text-sm sa:text-text-muted sa:tabular-nums", "aria-live": "polite", children: [
|
|
165
165
|
"Page ",
|
|
166
166
|
/* @__PURE__ */ jsx(PageText, { text: String(page), dir, motion: motion === "scroll" ? "scroll" : textMotion }),
|
|
167
167
|
" of ",
|
|
168
168
|
pageCount
|
|
169
169
|
] }),
|
|
170
170
|
step(1)
|
|
171
|
-
] }) : /* @__PURE__ */ jsxs("ul", { ref: listRef, className: "relative flex items-center gap-1", children: [
|
|
171
|
+
] }) : /* @__PURE__ */ jsxs("ul", { ref: listRef, className: "sa:relative sa:flex sa:items-center sa:gap-1", children: [
|
|
172
172
|
/* @__PURE__ */ jsx(
|
|
173
173
|
"li",
|
|
174
174
|
{
|
|
175
175
|
ref: pill.ref,
|
|
176
176
|
"aria-hidden": true,
|
|
177
177
|
role: "presentation",
|
|
178
|
-
className: "pointer-events-none absolute top-0 left-0 h-control-height rounded-lg bg-bg-selected opacity-0"
|
|
178
|
+
className: "sa:pointer-events-none sa:absolute sa:top-0 sa:left-0 sa:h-control-height sa:rounded-lg sa:bg-bg-selected sa:opacity-0"
|
|
179
179
|
}
|
|
180
180
|
),
|
|
181
|
-
/* @__PURE__ */ jsx("li", { ref: ghostRef, "aria-hidden": true, role: "presentation", className: "pointer-events-none absolute inset-0 overflow-visible" }),
|
|
181
|
+
/* @__PURE__ */ jsx("li", { ref: ghostRef, "aria-hidden": true, role: "presentation", className: "sa:pointer-events-none sa:absolute sa:inset-0 sa:overflow-visible" }),
|
|
182
182
|
/* @__PURE__ */ jsx("li", { children: step(-1) }),
|
|
183
183
|
motion === "scroll" ? (
|
|
184
184
|
// The strip: pages keyed by their number, the two ellipses by their side.
|
|
185
185
|
paginationRange(page, pageCount, siblings).map((p, i, all) => {
|
|
186
186
|
const key = p === "gap" ? i < all.length / 2 ? "gap-start" : "gap-end" : `p${p}`;
|
|
187
|
-
return /* @__PURE__ */ jsx("li", { "data-cell": key, className: "relative", children: p === "gap" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn(pageClass, "pointer-events-none"), children: "\u2026" }) : target(p, pageClass, p, {
|
|
187
|
+
return /* @__PURE__ */ jsx("li", { "data-cell": key, className: "sa:relative", children: p === "gap" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn(pageClass, "sa:pointer-events-none"), children: "\u2026" }) : target(p, pageClass, p, {
|
|
188
188
|
"aria-current": p === page ? "page" : void 0,
|
|
189
189
|
"aria-label": `Page ${p}`
|
|
190
190
|
}) }, key);
|
|
@@ -195,7 +195,7 @@ function Pagination({
|
|
|
195
195
|
const gap = p === "gap";
|
|
196
196
|
const text = /* @__PURE__ */ jsx(PageText, { text: gap ? "\u2026" : String(p), dir, motion: textMotion });
|
|
197
197
|
return /* @__PURE__ */ jsx("li", { children: gap ? React.createElement(getHref ? "a" : "button", {
|
|
198
|
-
className: cn(pageClass, "pointer-events-none"),
|
|
198
|
+
className: cn(pageClass, "sa:pointer-events-none"),
|
|
199
199
|
"aria-hidden": true,
|
|
200
200
|
tabIndex: -1,
|
|
201
201
|
...getHref ? {} : { type: "button", disabled: true },
|
|
@@ -211,5 +211,3 @@ function Pagination({
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
export { Pagination, paginationRange };
|
|
214
|
-
//# sourceMappingURL=chunk-QS4N4MNP.js.map
|
|
215
|
-
//# sourceMappingURL=chunk-QS4N4MNP.js.map
|