@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,71 @@
|
|
|
1
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { Toggle as Toggle$1 } from 'radix-ui';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var toggleVariants = cva(
|
|
8
|
+
[
|
|
9
|
+
"sa:inline-flex sa:shrink-0 sa:items-center sa:justify-center sa:gap-2 sa:border sa:font-medium sa:whitespace-nowrap sa:select-none sa:text-text-muted",
|
|
10
|
+
"sa:transition-[background-color,border-color,color,box-shadow,border-radius] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
11
|
+
"sa:focus-visible:outline-none sa:disabled:pointer-events-none sa:disabled:text-text-subtle",
|
|
12
|
+
"sa:satin-hover:text-text-default sa:satin-focus:text-text-default sa:data-[state=on]:text-text-default",
|
|
13
|
+
// Figma icons are 1.25px at 16; on Iconoir's 24 grid that is 1.875.
|
|
14
|
+
"sa:[&_svg]:pointer-events-none sa:[&_svg]:size-icon-size sa:[&_svg]:shrink-0 sa:[&_svg]:[stroke-width:1.875]"
|
|
15
|
+
],
|
|
16
|
+
{
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
outline: [
|
|
20
|
+
"sa:rounded-lg sa:border-border-default sa:bg-bg-popover",
|
|
21
|
+
"sa:satin-hover:border-border-strong sa:satin-hover:bg-bg-muted",
|
|
22
|
+
"sa:satin-focus:border-action-primary-bg sa:satin-focus:bg-bg-popover sa:satin-focus:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
23
|
+
"sa:data-[state=on]:border-border-strong sa:data-[state=on]:bg-action-secondary-bg-pressed",
|
|
24
|
+
"sa:data-[state=on]:satin-hover:border-border-strong sa:data-[state=on]:satin-hover:bg-action-secondary-bg-pressed",
|
|
25
|
+
"sa:data-[state=on]:satin-focus:border-action-primary-bg sa:data-[state=on]:satin-focus:bg-action-secondary-bg-pressed",
|
|
26
|
+
"sa:disabled:border-border-default sa:disabled:bg-bg-muted",
|
|
27
|
+
"sa:disabled:data-[state=on]:border-border-default sa:disabled:data-[state=on]:bg-action-secondary-bg-pressed"
|
|
28
|
+
],
|
|
29
|
+
ghost: [
|
|
30
|
+
"sa:rounded-md sa:border-transparent sa:bg-transparent",
|
|
31
|
+
"sa:satin-hover:rounded-lg sa:satin-hover:bg-bg-muted",
|
|
32
|
+
// Figma's ghost focus is the primary border alone (its ring is 0px); pressed + focus has the ring.
|
|
33
|
+
"sa:satin-focus:rounded-lg sa:satin-focus:border-action-primary-bg sa:satin-focus:[box-shadow:none]",
|
|
34
|
+
"sa:data-[state=on]:rounded-lg sa:data-[state=on]:bg-action-secondary-bg-pressed",
|
|
35
|
+
"sa:data-[state=on]:satin-hover:bg-action-secondary-bg-pressed",
|
|
36
|
+
"sa:data-[state=on]:satin-focus:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
37
|
+
"sa:disabled:rounded-md sa:disabled:data-[state=on]:rounded-md"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
md: "sa:h-control-height-lg sa:px-2.5 sa:text-base",
|
|
42
|
+
sm: "sa:h-control-height sa:px-2.5 sa:text-sm sa:leading-[18px]"
|
|
43
|
+
},
|
|
44
|
+
iconOnly: {
|
|
45
|
+
true: "sa:px-0",
|
|
46
|
+
false: ""
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
compoundVariants: [
|
|
50
|
+
{ iconOnly: true, size: "md", className: "sa:w-control-height-lg" },
|
|
51
|
+
{ iconOnly: true, size: "sm", className: "sa:w-control-height" }
|
|
52
|
+
],
|
|
53
|
+
defaultVariants: { variant: "sa:outline", size: "md", iconOnly: false }
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
function Toggle({ className, variant, size, iconOnly, icon, children, ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsxs(
|
|
58
|
+
Toggle$1.Root,
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "toggle",
|
|
61
|
+
className: cn(toggleVariants({ variant, size, iconOnly }), className),
|
|
62
|
+
...props,
|
|
63
|
+
children: [
|
|
64
|
+
icon,
|
|
65
|
+
!iconOnly && children
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { Toggle, toggleVariants };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { cn } from './chunk-
|
|
1
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var badgeVariants = cva(
|
|
7
7
|
[
|
|
8
|
-
"inline-flex shrink-0 items-center gap-1 text-sm leading-4 font-medium tracking-normal whitespace-nowrap text-tone-fg",
|
|
9
|
-
"[&_svg]:pointer-events-none [&_svg]:size-icon-size-sm [&_svg]:shrink-0 [&_svg]:[stroke-width:1.875]"
|
|
8
|
+
"sa:inline-flex sa:shrink-0 sa:items-center sa:gap-1 sa:text-sm sa:leading-4 sa:font-medium sa:tracking-normal sa:whitespace-nowrap sa:text-tone-fg",
|
|
9
|
+
"sa:[&_svg]:pointer-events-none sa:[&_svg]:size-icon-size-sm sa:[&_svg]:shrink-0 sa:[&_svg]:[stroke-width:1.875]"
|
|
10
10
|
],
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
13
13
|
size: {
|
|
14
|
-
lg: "px-2 py-1",
|
|
15
|
-
sm: "px-1.5 py-0.5"
|
|
14
|
+
lg: "sa:px-2 sa:py-1",
|
|
15
|
+
sm: "sa:px-1.5 sa:py-0.5"
|
|
16
16
|
},
|
|
17
17
|
variant: {
|
|
18
|
-
soft: "bg-tone-bg",
|
|
19
|
-
plain: "bg-transparent",
|
|
18
|
+
soft: "sa:bg-tone-bg",
|
|
19
|
+
plain: "sa:bg-transparent",
|
|
20
20
|
// White (bg/card) inside a 1px border/default edge, drawn inset so the size stays put.
|
|
21
|
-
outline: "bg-bg-card [box-shadow:inset_0_0_0_1px_var(--border-default)]"
|
|
21
|
+
outline: "sa:bg-bg-card sa:[box-shadow:inset_0_0_0_1px_var(--border-default)]"
|
|
22
22
|
},
|
|
23
23
|
shape: {
|
|
24
|
-
default: "rounded-sm",
|
|
25
|
-
rounded: "rounded-pill"
|
|
24
|
+
default: "sa:rounded-sm",
|
|
25
|
+
rounded: "sa:rounded-pill"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: { size: "lg", variant: "soft", shape: "default" }
|
|
@@ -41,5 +41,3 @@ function Badge({ className, tone = "neutral", size, variant, shape, ...props })
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export { Badge, badgeVariants };
|
|
44
|
-
//# sourceMappingURL=chunk-O7F3CIDV.js.map
|
|
45
|
-
//# sourceMappingURL=chunk-O7F3CIDV.js.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { CloseIcon } from './chunk-AIMQNLPY.js';
|
|
2
|
+
import { Button } from './chunk-T6L32XXH.js';
|
|
3
|
+
import { useSatinLabels } from './chunk-SSOFFQ5T.js';
|
|
4
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import { Dialog } from 'radix-ui';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
function Sheet({
|
|
10
|
+
open,
|
|
11
|
+
defaultOpen,
|
|
12
|
+
onOpenChange,
|
|
13
|
+
trigger,
|
|
14
|
+
side = "right",
|
|
15
|
+
title,
|
|
16
|
+
description,
|
|
17
|
+
footer,
|
|
18
|
+
children,
|
|
19
|
+
modal = true,
|
|
20
|
+
container,
|
|
21
|
+
onOpenAutoFocus,
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
const labels = useSatinLabels();
|
|
26
|
+
const position = container ? "absolute" : "fixed";
|
|
27
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { open, defaultOpen, onOpenChange, modal, children: [
|
|
28
|
+
trigger && /* @__PURE__ */ jsx(Dialog.Trigger, { asChild: true, children: trigger }),
|
|
29
|
+
/* @__PURE__ */ jsxs(Dialog.Portal, { container, children: [
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
Dialog.Overlay,
|
|
32
|
+
{
|
|
33
|
+
className: cn(
|
|
34
|
+
position,
|
|
35
|
+
"sa:inset-0 sa:z-50 sa:bg-black-a40",
|
|
36
|
+
"sa:data-[state=open]:animate-[satin-fade-in_var(--sa-duration-slow)_var(--sa-ease-out)]",
|
|
37
|
+
"sa:data-[state=closed]:animate-[satin-fade-out_var(--sa-duration-base)_var(--sa-ease-out)]"
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsxs(
|
|
42
|
+
Dialog.Content,
|
|
43
|
+
{
|
|
44
|
+
...description ? {} : { "aria-describedby": void 0 },
|
|
45
|
+
...props,
|
|
46
|
+
"data-slot": "sheet",
|
|
47
|
+
"data-side": side,
|
|
48
|
+
onOpenAutoFocus,
|
|
49
|
+
className: cn(
|
|
50
|
+
position,
|
|
51
|
+
"sa:z-50 sa:flex sa:flex-col sa:gap-4 sa:bg-bg-card sa:p-4 sa:outline-none",
|
|
52
|
+
"sa:[box-shadow:0_4px_6px_-4px_var(--effect-shadow-sm),0_10px_15px_-3px_var(--effect-shadow-sm)]",
|
|
53
|
+
// Flush with its edge: no radius and no border on the side that touches it.
|
|
54
|
+
side === "bottom" && "sa:inset-x-0 sa:bottom-0 sa:max-h-[85%] sa:rounded-t-2xl sa:border-t sa:border-border-subtle sa:pt-6",
|
|
55
|
+
side === "right" && "sa:inset-y-0 sa:right-0 sa:w-[400px] sa:max-w-[calc(100%-32px)] sa:rounded-l-2xl sa:border-l sa:border-border-subtle",
|
|
56
|
+
side === "left" && "sa:inset-y-0 sa:left-0 sa:w-[400px] sa:max-w-[calc(100%-32px)] sa:rounded-r-2xl sa:border-r sa:border-border-subtle",
|
|
57
|
+
side === "bottom" && "sa:data-[state=open]:animate-[satin-sheet-up_var(--sa-duration-slow)_var(--sa-ease-out)] sa:data-[state=closed]:animate-[satin-sheet-down_var(--sa-duration-base)_var(--sa-ease-out)]",
|
|
58
|
+
side === "right" && "sa:data-[state=open]:animate-[satin-sheet-left_var(--sa-duration-slow)_var(--sa-ease-out)] sa:data-[state=closed]:animate-[satin-sheet-right_var(--sa-duration-base)_var(--sa-ease-out)]",
|
|
59
|
+
side === "left" && "sa:data-[state=open]:animate-[satin-sheet-from-left_var(--sa-duration-slow)_var(--sa-ease-out)] sa:data-[state=closed]:animate-[satin-sheet-to-left_var(--sa-duration-base)_var(--sa-ease-out)]",
|
|
60
|
+
className
|
|
61
|
+
),
|
|
62
|
+
children: [
|
|
63
|
+
side === "bottom" && /* @__PURE__ */ jsx(
|
|
64
|
+
Dialog.Close,
|
|
65
|
+
{
|
|
66
|
+
"aria-label": labels.close,
|
|
67
|
+
className: "sa:absolute sa:inset-x-4 sa:top-0 sa:flex sa:h-6 sa:cursor-pointer sa:items-center sa:justify-center sa:rounded-lg sa:outline-none sa:focus-visible:ring-2 sa:focus-visible:ring-action-focus-ring",
|
|
68
|
+
children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:h-1 sa:w-9 sa:rounded-full sa:bg-border-strong" })
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { className: cn("sa:flex sa:flex-col sa:gap-0.5", side !== "bottom" && "sa:pr-8"), children: [
|
|
72
|
+
/* @__PURE__ */ jsx(Dialog.Title, { className: "sa:text-base sa:leading-[21px] sa:font-medium sa:text-text-default", children: title }),
|
|
73
|
+
description ? /* @__PURE__ */ jsx(Dialog.Description, { className: "sa:text-sm sa:text-text-muted", children: description }) : null
|
|
74
|
+
] }),
|
|
75
|
+
children != null && /* @__PURE__ */ jsx("div", { className: "sa:flex sa:min-h-0 sa:flex-1 sa:flex-col sa:overflow-y-auto", children }),
|
|
76
|
+
footer && /* @__PURE__ */ jsx("div", { className: cn("sa:flex sa:shrink-0 sa:items-center sa:justify-end sa:gap-2", side === "bottom" && "sa:*:flex-1"), children: footer }),
|
|
77
|
+
side !== "bottom" && /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "xl", iconOnly: true, "aria-label": labels.close, className: "sa:absolute sa:top-[7px] sa:right-[7px] sa:rounded-lg", children: /* @__PURE__ */ jsx(CloseIcon, {}) }) })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
var SheetClose = Dialog.Close;
|
|
85
|
+
|
|
86
|
+
export { Sheet, SheetClose };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var chipVariants = cva(
|
|
7
|
+
[
|
|
8
|
+
"sa:group/chip sa:relative sa:inline-flex sa:shrink-0 sa:items-center sa:rounded-pill sa:whitespace-nowrap sa:select-none",
|
|
9
|
+
"sa:text-sm sa:leading-(--sa-text-sm--line-height) sa:font-medium",
|
|
10
|
+
"sa:transition-[background-color,border-color,color,box-shadow] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
11
|
+
"sa:focus-visible:outline-none",
|
|
12
|
+
"sa:data-[disabled]:pointer-events-none sa:data-[disabled]:opacity-50 sa:data-[disabled]:[box-shadow:none]"
|
|
13
|
+
],
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
outline: "sa:border",
|
|
18
|
+
subtle: ""
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
md: "sa:h-control-height",
|
|
22
|
+
sm: "sa:h-control-height-xs"
|
|
23
|
+
},
|
|
24
|
+
neutral: { true: "sa:text-text-default", false: "sa:text-tone-fg" }
|
|
25
|
+
},
|
|
26
|
+
compoundVariants: [
|
|
27
|
+
{
|
|
28
|
+
variant: "sa:outline",
|
|
29
|
+
neutral: true,
|
|
30
|
+
className: [
|
|
31
|
+
"sa:border-border-default sa:bg-bg-popover sa:[box-shadow:0_1px_2px_0_var(--effect-shadow-xs)]",
|
|
32
|
+
"sa:satin-hover:border-border-strong sa:satin-hover:bg-bg-hover",
|
|
33
|
+
"sa:satin-focus:border-border-strong sa:satin-focus:bg-bg-popover sa:satin-focus:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
34
|
+
"sa:has-[button:focus-visible]:border-border-strong sa:has-[button:focus-visible]:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
35
|
+
"sa:satin-pressed:border-border-strong sa:satin-pressed:bg-border-input sa:satin-pressed:[box-shadow:none]",
|
|
36
|
+
"sa:data-[disabled]:border-border-strong"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
variant: "sa:outline",
|
|
41
|
+
neutral: false,
|
|
42
|
+
className: [
|
|
43
|
+
"sa:border-tone-border sa:bg-tone-bg sa:[box-shadow:0_1px_2px_0_var(--effect-shadow-xs)]",
|
|
44
|
+
"sa:satin-hover:bg-tone-border",
|
|
45
|
+
"sa:satin-focus:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
46
|
+
"sa:has-[button:focus-visible]:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
47
|
+
"sa:satin-pressed:bg-tone-border sa:satin-pressed:[box-shadow:none]"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
variant: "subtle",
|
|
52
|
+
neutral: true,
|
|
53
|
+
className: [
|
|
54
|
+
"sa:bg-action-secondary-bg",
|
|
55
|
+
"sa:satin-hover:bg-border-input",
|
|
56
|
+
"sa:satin-focus:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
57
|
+
"sa:has-[button:focus-visible]:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
58
|
+
"sa:satin-pressed:bg-border-input sa:satin-pressed:[box-shadow:inset_0_0_0_1px_var(--border-strong)]"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
variant: "subtle",
|
|
63
|
+
neutral: false,
|
|
64
|
+
className: [
|
|
65
|
+
"sa:bg-tone-bg",
|
|
66
|
+
"sa:satin-hover:bg-tone-border",
|
|
67
|
+
"sa:satin-focus:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
68
|
+
"sa:has-[button:focus-visible]:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
69
|
+
"sa:satin-pressed:bg-tone-border"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
defaultVariants: { variant: "subtle", size: "md", neutral: true }
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
function CloseGlyph({ size }) {
|
|
77
|
+
return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx(
|
|
78
|
+
"path",
|
|
79
|
+
{
|
|
80
|
+
d: "M4.50551 11.4951L8.0006 8M8.0006 8L11.4957 4.50491M8.0006 8L4.50551 4.50491M8.0006 8L11.4957 11.4951",
|
|
81
|
+
stroke: "currentColor",
|
|
82
|
+
strokeWidth: "1.25",
|
|
83
|
+
strokeLinecap: "round",
|
|
84
|
+
strokeLinejoin: "round"
|
|
85
|
+
}
|
|
86
|
+
) });
|
|
87
|
+
}
|
|
88
|
+
function Chip({
|
|
89
|
+
className,
|
|
90
|
+
variant = "subtle",
|
|
91
|
+
size = "md",
|
|
92
|
+
tone = "neutral",
|
|
93
|
+
dot = false,
|
|
94
|
+
avatar,
|
|
95
|
+
onRemove,
|
|
96
|
+
removeLabel,
|
|
97
|
+
disabled = false,
|
|
98
|
+
children,
|
|
99
|
+
type,
|
|
100
|
+
...props
|
|
101
|
+
}) {
|
|
102
|
+
const neutral = tone === "neutral";
|
|
103
|
+
const iconSize = size === "sm" ? 14 : 16;
|
|
104
|
+
const classes = cn(chipVariants({ variant, size, neutral }), className);
|
|
105
|
+
const label = typeof children === "string" ? children : void 0;
|
|
106
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
107
|
+
dot && // Dot slot: 4px in, a 16px box with an 8px status dot (status/green fg in Figma).
|
|
108
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "chip-dot", className: "sa:-mr-1 sa:flex sa:shrink-0 sa:items-center sa:pl-1", "aria-hidden": true, children: /* @__PURE__ */ jsx("span", { className: "sa:grid sa:size-4 sa:place-items-center", children: /* @__PURE__ */ jsx("span", { className: "sa:size-2 sa:rounded-full sa:bg-status-green-fg" }) }) }),
|
|
109
|
+
avatar && /* @__PURE__ */ jsx(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
"data-slot": "chip-avatar",
|
|
113
|
+
className: "sa:-mr-1 sa:flex sa:shrink-0 sa:items-center sa:pl-1 sa:[&>*]:size-4 sa:[&>*]:rounded-full",
|
|
114
|
+
children: avatar
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "chip-label", className: cn("sa:flex sa:shrink-0 sa:items-center sa:px-2", onRemove && "sa:-mr-1"), children }),
|
|
118
|
+
onRemove && /* @__PURE__ */ jsx("span", { className: "sa:flex sa:shrink-0 sa:items-center sa:pr-1", children: /* @__PURE__ */ jsx(
|
|
119
|
+
"button",
|
|
120
|
+
{
|
|
121
|
+
type: "button",
|
|
122
|
+
"data-slot": "chip-remove",
|
|
123
|
+
disabled,
|
|
124
|
+
"aria-label": removeLabel ?? (label ? `Remove ${label}` : "Remove"),
|
|
125
|
+
onClick: onRemove,
|
|
126
|
+
className: cn(
|
|
127
|
+
"sa:grid sa:shrink-0 sa:place-items-center sa:rounded-pill sa:focus-visible:outline-none",
|
|
128
|
+
neutral ? "sa:text-text-muted" : "sa:text-tone-fg"
|
|
129
|
+
),
|
|
130
|
+
children: /* @__PURE__ */ jsx(CloseGlyph, { size: iconSize })
|
|
131
|
+
}
|
|
132
|
+
) })
|
|
133
|
+
] });
|
|
134
|
+
if (onRemove) {
|
|
135
|
+
const { "data-force": force } = props;
|
|
136
|
+
return /* @__PURE__ */ jsx(
|
|
137
|
+
"span",
|
|
138
|
+
{
|
|
139
|
+
"data-slot": "chip",
|
|
140
|
+
"data-tone": tone,
|
|
141
|
+
"data-force": force,
|
|
142
|
+
"data-disabled": disabled || void 0,
|
|
143
|
+
className: classes,
|
|
144
|
+
children: content
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
return /* @__PURE__ */ jsx(
|
|
149
|
+
"button",
|
|
150
|
+
{
|
|
151
|
+
"data-slot": "chip",
|
|
152
|
+
"data-tone": tone,
|
|
153
|
+
"data-disabled": disabled || void 0,
|
|
154
|
+
type: type ?? "button",
|
|
155
|
+
disabled,
|
|
156
|
+
className: classes,
|
|
157
|
+
...props,
|
|
158
|
+
children: content
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function ChipAvatar({ initials, tone, className }) {
|
|
163
|
+
return /* @__PURE__ */ jsx(
|
|
164
|
+
"span",
|
|
165
|
+
{
|
|
166
|
+
"data-tone": tone,
|
|
167
|
+
"aria-hidden": true,
|
|
168
|
+
className: cn(
|
|
169
|
+
"sa:grid sa:size-4 sa:shrink-0 sa:place-items-center sa:overflow-hidden sa:rounded-full sa:bg-tone-bg sa:text-[7px] sa:leading-2 sa:font-semibold sa:text-tone-fg",
|
|
170
|
+
className
|
|
171
|
+
),
|
|
172
|
+
children: initials
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export { Chip, ChipAvatar, chipVariants };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { Floating } from './chunk-ZHFIWDGF.js';
|
|
2
|
+
import { Select } from './chunk-UCCNXGLG.js';
|
|
3
|
+
import { Badge } from './chunk-XUOSJMEJ.js';
|
|
4
|
+
import { useSatinLabels } from './chunk-SSOFFQ5T.js';
|
|
5
|
+
import { cn } from './chunk-O46O6LFQ.js';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var defaultFormat = (n) => n.toLocaleString("en-US");
|
|
10
|
+
function ChartCard({
|
|
11
|
+
title,
|
|
12
|
+
range,
|
|
13
|
+
total,
|
|
14
|
+
change,
|
|
15
|
+
periods,
|
|
16
|
+
value,
|
|
17
|
+
onPeriodChange,
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
const titleId = React.useId();
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "chart-card",
|
|
27
|
+
role: "figure",
|
|
28
|
+
"aria-labelledby": titleId,
|
|
29
|
+
className: cn("sa:@container sa:flex sa:flex-col sa:gap-4 sa:overflow-hidden sa:rounded-2xl sa:border sa:border-border-default sa:bg-bg-card sa:p-4", className),
|
|
30
|
+
...props,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:flex sa:flex-col sa:gap-1", children: [
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:flex sa:min-h-7 sa:items-center sa:gap-3", children: [
|
|
34
|
+
/* @__PURE__ */ jsx("p", { id: titleId, className: "sa:min-w-0 sa:flex-1 sa:truncate sa:text-lg sa:leading-6 sa:font-medium sa:text-text-default", children: title }),
|
|
35
|
+
periods && /* @__PURE__ */ jsx(PeriodSelect, { periods, value, onValueChange: onPeriodChange })
|
|
36
|
+
] }),
|
|
37
|
+
total == null && /* @__PURE__ */ jsx("p", { className: "sa:text-sm sa:leading-(--sa-text-sm--line-height) sa:text-text-muted", children: range })
|
|
38
|
+
] }),
|
|
39
|
+
total != null && /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:flex-col sa:gap-0.5", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:flex sa:items-center sa:gap-2", children: [
|
|
41
|
+
/* @__PURE__ */ jsx("span", { className: "sa:text-xl sa:leading-(--sa-text-xl--line-height) sa:font-semibold sa:text-text-default sa:tabular-nums", children: total }),
|
|
42
|
+
change && /* @__PURE__ */ jsx(
|
|
43
|
+
Badge,
|
|
44
|
+
{
|
|
45
|
+
tone: /^[−-]/.test(change) ? "red" : "green",
|
|
46
|
+
size: "sm",
|
|
47
|
+
className: "sa:[box-shadow:inset_0_0_0_1px_var(--tone-border)]",
|
|
48
|
+
children: change
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ jsx("p", { className: "sa:text-sm sa:leading-(--sa-text-sm--line-height) sa:text-text-muted", children: range })
|
|
53
|
+
] }),
|
|
54
|
+
children
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function PeriodSelect({
|
|
60
|
+
periods,
|
|
61
|
+
value,
|
|
62
|
+
onValueChange
|
|
63
|
+
}) {
|
|
64
|
+
const labels = useSatinLabels();
|
|
65
|
+
const groups = Array.isArray(periods[0]) ? periods : [periods];
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
Select,
|
|
68
|
+
{
|
|
69
|
+
size: "sm",
|
|
70
|
+
"aria-label": labels.period,
|
|
71
|
+
options: groups.map((g) => ({ options: g.map((p) => ({ value: p, label: p })) })),
|
|
72
|
+
value,
|
|
73
|
+
onValueChange,
|
|
74
|
+
wrapperClassName: "sa:w-[132px] sa:shrink-0"
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function ChartLegendPill({
|
|
79
|
+
color,
|
|
80
|
+
label,
|
|
81
|
+
value,
|
|
82
|
+
variant = "outline",
|
|
83
|
+
active,
|
|
84
|
+
dimmed,
|
|
85
|
+
className,
|
|
86
|
+
...props
|
|
87
|
+
}) {
|
|
88
|
+
const plain = variant === "plain";
|
|
89
|
+
return /* @__PURE__ */ jsxs(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "chart-legend-pill",
|
|
93
|
+
"data-variant": variant,
|
|
94
|
+
className: cn(
|
|
95
|
+
"sa:inline-flex sa:h-8 sa:items-center sa:gap-1.5 sa:rounded-pill sa:text-sm sa:leading-(--sa-text-sm--line-height) sa:whitespace-nowrap",
|
|
96
|
+
"sa:transition-[border-color,background-color] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
97
|
+
"sa:*:transition-opacity sa:*:duration-(--sa-duration-fast) sa:*:ease-(--sa-ease-out)",
|
|
98
|
+
plain ? "sa:px-2" : "sa:border sa:px-2.5",
|
|
99
|
+
!plain && (active ? "sa:border-border-strong" : "sa:border-border-default"),
|
|
100
|
+
plain && active && "sa:bg-bg-hover",
|
|
101
|
+
dimmed && "sa:*:opacity-45",
|
|
102
|
+
className
|
|
103
|
+
),
|
|
104
|
+
...props,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:size-2 sa:shrink-0 sa:rounded-full", style: { background: color } }),
|
|
107
|
+
/* @__PURE__ */ jsx("span", { className: "sa:min-w-0 sa:truncate sa:text-text-default", children: label }),
|
|
108
|
+
value != null && /* @__PURE__ */ jsx("span", { className: "sa:font-medium sa:text-text-default sa:tabular-nums", children: value })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
var pointerPath = "M1.17721 0.5H13.1772L8.23721 5.62C7.65721 6.22 6.69721 6.22 6.11721 5.62L1.17721 0.5Z";
|
|
114
|
+
var tooltipShadow = "sa:[filter:drop-shadow(0_2px_2px_var(--effect-shadow-sm))_drop-shadow(0_4px_3px_var(--effect-shadow-sm))]";
|
|
115
|
+
function TooltipPill({ label, value }) {
|
|
116
|
+
return /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:items-center sa:gap-1.5 sa:rounded-md sa:bg-text-default sa:px-2.5 sa:py-1.5 sa:text-sm sa:leading-(--sa-text-sm--line-height) sa:whitespace-nowrap sa:text-bg-canvas", children: [
|
|
117
|
+
/* @__PURE__ */ jsx("span", { className: "sa:font-medium", children: label }),
|
|
118
|
+
/* @__PURE__ */ jsx("span", { className: "sa:opacity-72", children: value })
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
function ChartTooltip({
|
|
122
|
+
label,
|
|
123
|
+
value,
|
|
124
|
+
anchor,
|
|
125
|
+
sideOffset = 4,
|
|
126
|
+
className,
|
|
127
|
+
...props
|
|
128
|
+
}) {
|
|
129
|
+
if (anchor !== void 0) {
|
|
130
|
+
return /* @__PURE__ */ jsx(Floating, { anchor, side: "top", sideOffset: sideOffset + 5, className: "sa:pointer-events-none", children: ({ side, arrowRef, arrowStyle }) => /* @__PURE__ */ jsxs("div", { "data-slot": "chart-tooltip", className: cn("sa:relative", tooltipShadow, className), ...props, children: [
|
|
131
|
+
/* @__PURE__ */ jsx(TooltipPill, { label, value }),
|
|
132
|
+
/* @__PURE__ */ jsx(
|
|
133
|
+
"svg",
|
|
134
|
+
{
|
|
135
|
+
ref: arrowRef,
|
|
136
|
+
width: "12",
|
|
137
|
+
height: "6",
|
|
138
|
+
viewBox: "1.17 0.5 12 5.57",
|
|
139
|
+
"aria-hidden": true,
|
|
140
|
+
className: cn("sa:absolute sa:block sa:text-text-default", side === "bottom" ? "sa:bottom-full sa:-mb-px sa:rotate-180" : "sa:top-full sa:-mt-px"),
|
|
141
|
+
style: arrowStyle,
|
|
142
|
+
children: /* @__PURE__ */ jsx("path", { d: pointerPath, fill: "currentColor" })
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
] }) });
|
|
146
|
+
}
|
|
147
|
+
return /* @__PURE__ */ jsxs(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
"data-slot": "chart-tooltip",
|
|
151
|
+
className: cn("sa:pointer-events-none sa:flex sa:flex-col sa:items-center", tooltipShadow, className),
|
|
152
|
+
...props,
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ jsx(TooltipPill, { label, value }),
|
|
155
|
+
/* @__PURE__ */ jsx("svg", { width: "12", height: "6", viewBox: "1.17 0.5 12 5.57", "aria-hidden": true, className: "sa:-mt-px sa:block sa:text-text-default", children: /* @__PURE__ */ jsx("path", { d: pointerPath, fill: "currentColor" }) })
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
function ChartLegendRow({
|
|
161
|
+
color,
|
|
162
|
+
label,
|
|
163
|
+
value,
|
|
164
|
+
note,
|
|
165
|
+
active,
|
|
166
|
+
dimmed,
|
|
167
|
+
className,
|
|
168
|
+
...props
|
|
169
|
+
}) {
|
|
170
|
+
return /* @__PURE__ */ jsxs(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
"data-slot": "chart-legend-row",
|
|
174
|
+
className: cn(
|
|
175
|
+
"sa:flex sa:h-8 sa:items-center sa:gap-2 sa:rounded-md sa:px-2 sa:py-1.5 sa:text-sm sa:leading-(--sa-text-sm--line-height)",
|
|
176
|
+
// The dim fades the row's content, never its ground: on the row itself it would multiply
|
|
177
|
+
// the leaving highlight's fade-out and cut it short.
|
|
178
|
+
"sa:transition-[background-color] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
179
|
+
"sa:*:transition-opacity sa:*:duration-(--sa-duration-fast) sa:*:ease-(--sa-ease-out)",
|
|
180
|
+
active && "sa:bg-bg-muted",
|
|
181
|
+
dimmed && "sa:*:opacity-45",
|
|
182
|
+
className
|
|
183
|
+
),
|
|
184
|
+
...props,
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:size-2 sa:shrink-0 sa:rounded-full", style: { background: color } }),
|
|
187
|
+
/* @__PURE__ */ jsx("span", { className: "sa:min-w-0 sa:flex-1 sa:text-text-default", children: label }),
|
|
188
|
+
/* @__PURE__ */ jsx("span", { className: "sa:shrink-0 sa:font-medium sa:whitespace-nowrap sa:text-text-default", children: value }),
|
|
189
|
+
note && /* @__PURE__ */ jsx("span", { className: "sa:shrink-0 sa:text-right sa:whitespace-nowrap sa:text-text-muted", children: note })
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export { ChartCard, ChartLegendPill, ChartLegendRow, ChartTooltip, defaultFormat };
|
package/components/accordion.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
'use client';export { Accordion, AccordionItem } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
//# sourceMappingURL=accordion.js.map
|
|
4
|
-
//# sourceMappingURL=accordion.js.map
|
|
1
|
+
'use client';export { Accordion, AccordionItem } from '../chunk-GI2SMFZL.js';
|
|
2
|
+
import '../chunk-O46O6LFQ.js';
|
|
@@ -22,6 +22,7 @@ import * as React from 'react';
|
|
|
22
22
|
*/
|
|
23
23
|
export type Glimmer = 'color' | 'neutral';
|
|
24
24
|
/** The tetris mark. Memoised: its 125 animated elements never re-render with their parent. */
|
|
25
|
+
/** @internal Shared by Satin's own components; not part of the public API and may change in any release. */
|
|
25
26
|
export declare const TetrisMark: React.MemoExoticComponent<({ glimmer, className }: {
|
|
26
27
|
glimmer?: Glimmer;
|
|
27
28
|
className?: string;
|
|
@@ -45,6 +46,7 @@ export declare function ShimmerLabel({ children, className }: {
|
|
|
45
46
|
className?: string;
|
|
46
47
|
}): React.JSX.Element;
|
|
47
48
|
/** The flappy bird fitted into a `size` square; `run` plays the run in place. */
|
|
49
|
+
/** @internal Shared by Satin's own components; not part of the public API and may change in any release. */
|
|
48
50
|
export declare function FlappySprite({ size, run, className }: {
|
|
49
51
|
size?: number;
|
|
50
52
|
run?: boolean;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
'use client';export { AgentLoading, FlappySprite, ShimmerLabel, TetrisLabel, TetrisMark, TetrisStill } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
//# sourceMappingURL=agent-loading.js.map
|
|
4
|
-
//# sourceMappingURL=agent-loading.js.map
|
|
1
|
+
'use client';export { AgentLoading, FlappySprite, ShimmerLabel, TetrisLabel, TetrisMark, TetrisStill } from '../chunk-UGIVCXGN.js';
|
|
2
|
+
import '../chunk-O46O6LFQ.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
'use client';export { AgentAvatar, AgentMenuItem, AgentPicker, AgentPickerRow } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
|
|
5
|
-
//# sourceMappingURL=agent-picker.js.map
|
|
1
|
+
'use client';export { AgentAvatar, AgentMenuItem, AgentPicker, AgentPickerRow } from '../chunk-W472DBMT.js';
|
|
2
|
+
import '../chunk-T6L32XXH.js';
|
|
3
|
+
import '../chunk-SSOFFQ5T.js';
|
|
4
|
+
import '../chunk-O46O6LFQ.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
'use client';export { AgentSuggestion, AgentSuggestionChanges, AgentSuggestionDiff, AgentSuggestionMetric, AgentSuggestionQuote } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=agent-suggestion.js.map
|
|
1
|
+
'use client';export { AgentSuggestion, AgentSuggestionChanges, AgentSuggestionDiff, AgentSuggestionMetric, AgentSuggestionQuote } from '../chunk-7Q76HLRQ.js';
|
|
2
|
+
import '../chunk-M2HEVFQ3.js';
|
|
3
|
+
import '../chunk-XUOSJMEJ.js';
|
|
4
|
+
import '../chunk-SSOFFQ5T.js';
|
|
5
|
+
import '../chunk-O46O6LFQ.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
'use client';export { AnnouncementBar } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=announcement-bar.js.map
|
|
1
|
+
'use client';export { AnnouncementBar } from '../chunk-HK6WINL6.js';
|
|
2
|
+
import '../chunk-SDOTDMYG.js';
|
|
3
|
+
import '../chunk-YYFAZQ25.js';
|
|
4
|
+
import '../chunk-T6L32XXH.js';
|
|
5
|
+
import '../chunk-SSOFFQ5T.js';
|
|
6
|
+
import '../chunk-O46O6LFQ.js';
|