@uisatin/ui 0.2.0 → 0.4.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 +27 -0
- package/README.md +10 -1
- package/{chunk-P4O6TGDR.js → chunk-3VVO5MY5.js} +28 -26
- package/chunk-47DDBME3.js +87 -0
- package/{chunk-SHDFUXYV.js → chunk-5663JVE5.js} +16 -18
- package/chunk-67CBFB6Y.js +99 -0
- package/chunk-6DWLTGRQ.js +130 -0
- package/chunk-6GNMUJQ4.js +45 -0
- package/chunk-6JTSZAGO.js +177 -0
- package/chunk-6RLSRMB5.js +14 -0
- package/chunk-6Y6CY2DP.js +55 -0
- package/{chunk-O7F3CIDV.js → chunk-7NV53EL5.js} +10 -12
- package/{chunk-BNZVTLHV.js → chunk-7SVMERPH.js} +25 -21
- package/chunk-A52HUWVM.js +24 -0
- package/chunk-AKEZCWNW.js +29 -0
- package/{chunk-SH6NG6VN.js → chunk-APRVUOD6.js} +6 -8
- package/{chunk-QUF2IPOZ.js → chunk-C435UD7V.js} +14 -15
- package/{chunk-B2K45IUR.js → chunk-C6WRJ7DG.js} +5 -7
- package/{chunk-PF3YBUKT.js → chunk-CQFAMWZI.js} +16 -15
- package/chunk-DAKVTPYZ.js +86 -0
- package/{chunk-VAGIAREV.js → chunk-DMZW4LGU.js} +29 -26
- package/chunk-EBZHGRM5.js +46 -0
- package/chunk-EHEXE2UV.js +44 -0
- package/{chunk-72OCFAPT.js → chunk-EQAFDIPE.js} +26 -23
- package/{chunk-LLHTVIM3.js → chunk-EXKSKYG3.js} +7 -9
- package/chunk-FB6DG3LR.js +35 -0
- package/chunk-GH2DEOGO.js +67 -0
- package/{chunk-YG7JOOLJ.js → chunk-GKDMCY2S.js} +5 -7
- package/chunk-GTFUAA6H.js +42 -0
- package/{chunk-TX3H3QMA.js → chunk-HI6QIG55.js} +71 -70
- package/{chunk-6QMSWITQ.js → chunk-HZV7EXGU.js} +24 -26
- package/{chunk-A5XEM3GF.js → chunk-IKJIR6VL.js} +34 -36
- package/{chunk-DO3TBNSC.js → chunk-INJWE2LD.js} +15 -17
- package/chunk-J5UQPROI.js +56 -0
- package/{chunk-6YXUBP27.js → chunk-JCR5TWTF.js} +72 -67
- package/chunk-JKOBDLP3.js +25 -0
- package/chunk-JR3VVDV6.js +37 -0
- package/chunk-JYGCZWET.js +112 -0
- package/{chunk-UGRSWP6U.js → chunk-K5G5OEV5.js} +10 -12
- package/{chunk-B6V4VSGH.js → chunk-KDU7AT2T.js} +14 -15
- package/chunk-KITXKIYW.js +104 -0
- package/{chunk-NN6PKJWS.js → chunk-KQNA22D3.js} +7 -9
- package/{chunk-YPNKBE5X.js → chunk-L5PPN42A.js} +14 -9
- package/chunk-LAOE6Y57.js +95 -0
- package/chunk-LI5VYDLN.js +195 -0
- package/{chunk-7TXHCRAG.js → chunk-LKSFTNPF.js} +8 -10
- package/chunk-LLW3X4ZJ.js +39 -0
- package/{chunk-RTJ76X5U.js → chunk-LWRB4DED.js} +2 -4
- package/{chunk-NSRTTYQ4.js → chunk-M7RILZVW.js} +42 -35
- package/{chunk-LW3TRU5W.js → chunk-MOGWOUCN.js} +28 -16
- package/chunk-NCIRJ5V2.js +108 -0
- package/chunk-NQL6SIIB.js +168 -0
- package/chunk-NTSU44FY.js +81 -0
- package/{chunk-3DINAQLL.js → chunk-P36KBUYD.js} +33 -29
- package/chunk-P6RHT2VM.js +147 -0
- package/{chunk-CL2II6BX.js → chunk-PD2KD5OR.js} +11 -13
- package/{chunk-XL75JRUA.js → chunk-PP46SY7M.js} +42 -22
- package/{chunk-L6NCCSIP.js → chunk-PTK4QAOQ.js} +36 -29
- package/{chunk-HL42K2NH.js → chunk-Q7KVC5B4.js} +17 -17
- package/{chunk-H4NU7NPO.js → chunk-R3DTMBDT.js} +62 -61
- package/{chunk-KNUWZNFV.js → chunk-R4KPFBMK.js} +4 -6
- package/chunk-R5TQ3HNB.js +71 -0
- package/chunk-RFSPJECL.js +84 -0
- package/chunk-RPL6FRVX.js +88 -0
- package/{chunk-AN2RNJLR.js → chunk-STYOBAC7.js} +16 -16
- package/{chunk-X3PQANZO.js → chunk-SVUWR3HD.js} +47 -46
- package/chunk-T7P3OEBP.js +128 -0
- package/{chunk-QS4N4MNP.js → chunk-TB3ZRV3Y.js} +18 -20
- package/{chunk-MYEZXZZC.js → chunk-TOY6YPTG.js} +23 -25
- package/{chunk-XILQ7GXE.js → chunk-U6X6ODDJ.js} +11 -13
- package/{chunk-XZNHT6MO.js → chunk-UAJ6M34K.js} +115 -61
- package/chunk-W2EH6RY5.js +42 -0
- package/{chunk-FDKIX4DC.js → chunk-W2QQQWNE.js} +7 -9
- package/{chunk-LZMKSFCF.js → chunk-WALANB3V.js} +10 -12
- package/chunk-WCUR44O6.js +88 -0
- package/{chunk-BNTPPZCK.js → chunk-WJYJMX5S.js} +37 -39
- package/chunk-WZSLDYUU.js +131 -0
- package/{chunk-J3NSDRVH.js → chunk-XETMIETJ.js} +0 -2
- package/chunk-XU6JJDMZ.js +117 -0
- package/{chunk-BKZBWPUH.js → chunk-XWPH7C2W.js} +9 -11
- package/{chunk-GICKPMJU.js → chunk-YXWXSRXG.js} +31 -31
- package/{chunk-2HKBZFIK.js → chunk-YY236ZSJ.js} +31 -31
- package/{chunk-YX5VNRJX.js → chunk-YYFAZQ25.js} +0 -2
- package/{chunk-Y5AYU7PK.js → chunk-ZHFIWDGF.js} +0 -2
- package/components/accordion.js +2 -4
- package/components/action-button.d.ts +37 -0
- package/components/action-button.js +5 -0
- package/components/agent-loading.d.ts +2 -0
- package/components/agent-loading.js +2 -4
- package/components/agent-picker.js +5 -5
- package/components/agent-suggestion.js +5 -6
- package/components/alert.d.ts +37 -0
- package/components/alert.js +5 -0
- package/components/announcement-bar.js +7 -7
- package/components/attachment.js +5 -5
- package/components/avatar.js +4 -6
- package/components/badge.js +2 -4
- package/components/banner-mesh.js +1 -3
- package/components/banner.js +6 -6
- package/components/bar-chart.js +10 -11
- package/components/breadcrumb.js +5 -6
- package/components/button-group.d.ts +26 -0
- package/components/button-group.js +5 -0
- package/components/button.d.ts +13 -1
- package/components/button.js +4 -4
- package/components/card.js +5 -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 +5 -5
- package/components/combobox.d.ts +12 -3
- package/components/combobox.js +10 -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 +5 -5
- package/components/date-picker.d.ts +26 -14
- package/components/date-picker.js +9 -9
- package/components/decision-card.js +7 -7
- package/components/dialog.d.ts +6 -8
- package/components/dialog.js +6 -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/field-group.d.ts +27 -0
- package/components/field-group.js +3 -0
- package/components/file-upload.js +7 -7
- package/components/floating.js +1 -3
- package/components/form-field.d.ts +38 -1
- package/components/form-field.js +2 -4
- package/components/form.d.ts +47 -0
- package/components/form.js +3 -0
- package/components/hover-card.d.ts +5 -2
- package/components/hover-card.js +2 -4
- package/components/input-group.d.ts +21 -0
- package/components/input-group.js +6 -0
- package/components/input-otp.d.ts +4 -2
- package/components/input-otp.js +7 -8
- package/components/input.d.ts +5 -1
- package/components/input.js +3 -5
- package/components/kbd.js +2 -4
- package/components/labels.d.ts +86 -0
- package/components/labels.js +1 -0
- package/components/line-chart.js +11 -12
- package/components/link.d.ts +20 -0
- package/components/link.js +3 -0
- package/components/list.d.ts +46 -0
- package/components/list.js +2 -0
- package/components/message-actions.js +5 -5
- package/components/message.js +8 -8
- package/components/number-input.d.ts +4 -2
- package/components/number-input.js +7 -8
- package/components/pagination.js +6 -6
- package/components/password-input.d.ts +16 -0
- package/components/password-input.js +7 -0
- package/components/popover.d.ts +11 -5
- package/components/popover.js +3 -4
- package/components/progress.js +2 -4
- package/components/prompt-bar.js +6 -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 +11 -2
- package/components/select.js +6 -7
- package/components/selectable-card.d.ts +37 -0
- package/components/selectable-card.js +2 -0
- package/components/selectable-checkbox.d.ts +14 -0
- package/components/selectable-checkbox.js +4 -0
- package/components/selectable-radio.d.ts +16 -0
- package/components/selectable-radio.js +3 -0
- package/components/separator.d.ts +18 -0
- package/components/separator.js +2 -0
- package/components/sheet.d.ts +4 -2
- package/components/sheet.js +7 -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/spinner.d.ts +18 -0
- package/components/spinner.js +3 -0
- package/components/split-button.d.ts +24 -0
- package/components/split-button.js +8 -0
- 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 +5 -5
- package/components/toggle.js +2 -4
- package/components/tooltip.d.ts +5 -2
- package/components/tooltip.js +3 -5
- package/index.d.ts +17 -2
- package/index.js +82 -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 +0 -151
- 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 +0 -88
- 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,34 +1,34 @@
|
|
|
1
|
-
import { Tooltip, TooltipBubble } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { Tooltip, TooltipBubble } from './chunk-KDU7AT2T.js';
|
|
2
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var avatarVariants = cva(
|
|
9
|
-
"inline-flex shrink-0 items-center justify-center overflow-clip bg-tone-bg text-center whitespace-nowrap text-tone-fg select-none",
|
|
9
|
+
"sa:inline-flex sa:shrink-0 sa:items-center sa:justify-center sa:overflow-clip sa:bg-tone-bg sa:text-center sa:whitespace-nowrap sa:text-tone-fg sa:select-none",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
13
|
-
16: "size-4 text-[7px] leading-[8px] font-semibold tracking-normal",
|
|
14
|
-
20: "size-5 text-[9px] leading-[10px] font-semibold tracking-normal",
|
|
15
|
-
24: "size-6 text-2xs font-semibold",
|
|
16
|
-
32: "size-8 text-sm leading-4 font-medium tracking-normal",
|
|
17
|
-
40: "size-10 text-base leading-[14px] font-medium tracking-normal",
|
|
18
|
-
48: "size-12 text-lg font-medium"
|
|
13
|
+
16: "sa:size-4 sa:text-[7px] sa:leading-[8px] sa:font-semibold sa:tracking-normal",
|
|
14
|
+
20: "sa:size-5 sa:text-[9px] sa:leading-[10px] sa:font-semibold sa:tracking-normal",
|
|
15
|
+
24: "sa:size-6 sa:text-2xs sa:font-semibold",
|
|
16
|
+
32: "sa:size-8 sa:text-sm sa:leading-4 sa:font-medium sa:tracking-normal",
|
|
17
|
+
40: "sa:size-10 sa:text-base sa:leading-[14px] sa:font-medium sa:tracking-normal",
|
|
18
|
+
48: "sa:size-12 sa:text-lg sa:font-medium"
|
|
19
19
|
},
|
|
20
20
|
shape: {
|
|
21
|
-
circle: "rounded-full",
|
|
21
|
+
circle: "sa:rounded-full",
|
|
22
22
|
rounded: ""
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
compoundVariants: [
|
|
26
|
-
{ shape: "rounded", size: 16, className: "rounded-xs" },
|
|
27
|
-
{ shape: "rounded", size: 20, className: "rounded-xs" },
|
|
28
|
-
{ shape: "rounded", size: 24, className: "rounded-sm" },
|
|
29
|
-
{ shape: "rounded", size: 32, className: "rounded-md" },
|
|
30
|
-
{ shape: "rounded", size: 40, className: "rounded-lg" },
|
|
31
|
-
{ shape: "rounded", size: 48, className: "rounded-xl" }
|
|
26
|
+
{ shape: "sa:rounded", size: 16, className: "sa:rounded-xs" },
|
|
27
|
+
{ shape: "sa:rounded", size: 20, className: "sa:rounded-xs" },
|
|
28
|
+
{ shape: "sa:rounded", size: 24, className: "sa:rounded-sm" },
|
|
29
|
+
{ shape: "sa:rounded", size: 32, className: "sa:rounded-md" },
|
|
30
|
+
{ shape: "sa:rounded", size: 40, className: "sa:rounded-lg" },
|
|
31
|
+
{ shape: "sa:rounded", size: 48, className: "sa:rounded-xl" }
|
|
32
32
|
],
|
|
33
33
|
defaultVariants: { size: 32, shape: "circle" }
|
|
34
34
|
}
|
|
@@ -47,7 +47,7 @@ function Avatar({ className, initials, tone = "neutral", size = 32, shape, name,
|
|
|
47
47
|
...name ? { role: "img", "aria-label": name, tabIndex: 0 } : {},
|
|
48
48
|
className: cn(
|
|
49
49
|
avatarVariants({ size, shape }),
|
|
50
|
-
name && "outline-none focus-visible:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
50
|
+
name && "sa:outline-none sa:focus-visible:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
51
51
|
className
|
|
52
52
|
),
|
|
53
53
|
...props,
|
|
@@ -101,7 +101,7 @@ function AvatarGroup({ className, side = "top", children, ...props }) {
|
|
|
101
101
|
[]
|
|
102
102
|
);
|
|
103
103
|
return /* @__PURE__ */ jsxs(AvatarGroupContext.Provider, { value: api, children: [
|
|
104
|
-
/* @__PURE__ */ jsx("div", { "data-slot": "avatar-group", role: "group", className: cn("flex items-center gap-2", className), ...props, children }),
|
|
104
|
+
/* @__PURE__ */ jsx("div", { "data-slot": "avatar-group", role: "group", className: cn("sa:flex sa:items-center sa:gap-2", className), ...props, children }),
|
|
105
105
|
open && target && /* @__PURE__ */ jsx(GroupTooltip, { anchor: target.el, name: target.name, side })
|
|
106
106
|
] });
|
|
107
107
|
}
|
|
@@ -136,21 +136,21 @@ function GroupTooltip({ anchor, name, side }) {
|
|
|
136
136
|
{
|
|
137
137
|
"aria-hidden": true,
|
|
138
138
|
"data-side": side,
|
|
139
|
-
className: "pointer-events-none fixed top-0 left-0 z-50 transition-transform duration-(--duration-base) ease-(--ease-out) motion-reduce:transition-none",
|
|
139
|
+
className: "sa:pointer-events-none sa:fixed sa:top-0 sa:left-0 sa:z-50 sa:transition-transform sa:duration-(--sa-duration-base) sa:ease-(--sa-ease-out) sa:motion-reduce:transition-none",
|
|
140
140
|
style: { transform: `translate(${point.x}px, ${point.y}px)` },
|
|
141
141
|
children: /* @__PURE__ */ jsx(
|
|
142
142
|
"div",
|
|
143
143
|
{
|
|
144
144
|
className: cn(
|
|
145
|
-
"
|
|
146
|
-
side === "top" ? "
|
|
145
|
+
"sa:-translate-x-1/2 sa:transition-[opacity,translate] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out) sa:starting:opacity-0",
|
|
146
|
+
side === "top" ? "sa:-translate-y-full sa:starting:-translate-y-[calc(100%-4px)]" : "sa:starting:translate-y-[-4px]"
|
|
147
147
|
),
|
|
148
148
|
children: /* @__PURE__ */ jsx(
|
|
149
149
|
TooltipBubble,
|
|
150
150
|
{
|
|
151
|
-
className: "overflow-hidden transition-[width] duration-(--duration-base) ease-(--ease-out) motion-reduce:transition-none",
|
|
151
|
+
className: "sa:overflow-hidden sa:transition-[width] sa:duration-(--sa-duration-base) sa:ease-(--sa-ease-out) sa:motion-reduce:transition-none",
|
|
152
152
|
style: { width },
|
|
153
|
-
label: /* @__PURE__ */ jsx("span", { ref: label, className: "inline-block shrink-0 transition-opacity duration-(--duration-fast) ease-(--ease-out) starting:opacity-0", children: name }, name)
|
|
153
|
+
label: /* @__PURE__ */ jsx("span", { ref: label, className: "sa:inline-block sa:shrink-0 sa:transition-opacity sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out) sa:starting:opacity-0", children: name }, name)
|
|
154
154
|
}
|
|
155
155
|
)
|
|
156
156
|
}
|
|
@@ -162,5 +162,3 @@ function GroupTooltip({ anchor, name, side }) {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
export { AVATAR_TOOLTIP_DELAY, Avatar, AvatarGroup, avatarVariants };
|
|
165
|
-
//# sourceMappingURL=chunk-MYEZXZZC.js.map
|
|
166
|
-
//# sourceMappingURL=chunk-MYEZXZZC.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { Button } from './chunk-6DWLTGRQ.js';
|
|
2
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { Xmark } from 'iconoir-react';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var cardVariants = cva(
|
|
9
|
-
"relative flex w-[405px] max-w-full flex-col overflow-clip rounded-2xl border border-border-default bg-bg-card",
|
|
9
|
+
"sa:relative sa:flex sa:w-[405px] sa:max-w-full sa:flex-col sa:overflow-clip sa:rounded-2xl sa:border sa:border-border-default sa:bg-bg-card",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
13
|
-
md: "[--card-pad:calc(var(--spacing)*4)]",
|
|
14
|
-
sm: "[--card-pad:calc(var(--spacing)*3)]"
|
|
13
|
+
md: "sa:[--card-pad:calc(var(--sa-spacing)*4)]",
|
|
14
|
+
sm: "sa:[--card-pad:calc(var(--sa-spacing)*3)]"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
defaultVariants: { size: "md" }
|
|
@@ -39,12 +39,12 @@ function Card({
|
|
|
39
39
|
className: cn(cardVariants({ size }), className),
|
|
40
40
|
...props,
|
|
41
41
|
children: [
|
|
42
|
-
hasHeader && /* @__PURE__ */ jsxs("div", { "data-slot": "card-header", className: cn("flex flex-col gap-0.5 px-(--card-pad) pt-(--card-pad)", onClose && "pr-10"), children: [
|
|
43
|
-
title != null && /* @__PURE__ */ jsx("div", { id: titleId, className: "text-base leading-[14px] font-medium tracking-normal text-text-default", children: title }),
|
|
44
|
-
description != null && /* @__PURE__ */ jsx("p", { className: "text-body text-text-muted", children: description })
|
|
42
|
+
hasHeader && /* @__PURE__ */ jsxs("div", { "data-slot": "card-header", className: cn("sa:flex sa:flex-col sa:gap-0.5 sa:px-(--card-pad) sa:pt-(--card-pad)", onClose && "sa:pr-10"), children: [
|
|
43
|
+
title != null && /* @__PURE__ */ jsx("div", { id: titleId, className: "sa:text-base sa:leading-[14px] sa:font-medium sa:tracking-normal sa:text-text-default", children: title }),
|
|
44
|
+
description != null && /* @__PURE__ */ jsx("p", { className: "sa:text-body sa:text-text-muted", children: description })
|
|
45
45
|
] }),
|
|
46
|
-
children != null && /* @__PURE__ */ jsx("div", { "data-slot": "card-body", className: "flex flex-col gap-2 p-(--card-pad)", children }),
|
|
47
|
-
footer != null && /* @__PURE__ */ jsx("div", { "data-slot": "card-footer", className: "flex items-center gap-2 p-(--card-pad)", children: footer }),
|
|
46
|
+
children != null && /* @__PURE__ */ jsx("div", { "data-slot": "card-body", className: "sa:flex sa:flex-col sa:gap-2 sa:p-(--card-pad)", children }),
|
|
47
|
+
footer != null && /* @__PURE__ */ jsx("div", { "data-slot": "card-footer", className: "sa:flex sa:items-center sa:gap-2 sa:p-(--card-pad)", children: footer }),
|
|
48
48
|
onClose && /* @__PURE__ */ jsx(
|
|
49
49
|
Button,
|
|
50
50
|
{
|
|
@@ -52,7 +52,7 @@ function Card({
|
|
|
52
52
|
iconOnly: true,
|
|
53
53
|
"aria-label": closeLabel,
|
|
54
54
|
onClick: onClose,
|
|
55
|
-
className: "absolute top-[7px] right-[7px]",
|
|
55
|
+
className: "sa:absolute sa:top-[7px] sa:right-[7px]",
|
|
56
56
|
children: /* @__PURE__ */ jsx(Xmark, { "aria-hidden": true })
|
|
57
57
|
}
|
|
58
58
|
)
|
|
@@ -62,5 +62,3 @@ function Card({
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export { Card, cardVariants };
|
|
65
|
-
//# sourceMappingURL=chunk-XILQ7GXE.js.map
|
|
66
|
-
//# sourceMappingURL=chunk-XILQ7GXE.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useFieldChrome, FieldChrome, Select } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { useFieldChrome, FieldChrome, Select } from './chunk-EQAFDIPE.js';
|
|
2
|
+
import { Button } from './chunk-6DWLTGRQ.js';
|
|
3
|
+
import { useSatinLabels } from './chunk-NTSU44FY.js';
|
|
4
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import { Popover } from 'radix-ui';
|
|
6
7
|
import { Calendar as Calendar$1, NavArrowDown, NavArrowLeft, NavArrowRight } from 'iconoir-react';
|
|
@@ -40,8 +41,12 @@ function Calendar({
|
|
|
40
41
|
min,
|
|
41
42
|
max,
|
|
42
43
|
today: todayProp,
|
|
43
|
-
className
|
|
44
|
+
className,
|
|
45
|
+
ref,
|
|
46
|
+
onPointerLeave,
|
|
47
|
+
...props
|
|
44
48
|
}) {
|
|
49
|
+
const labels = useSatinLabels();
|
|
45
50
|
const today = startOfDay(todayProp ?? /* @__PURE__ */ new Date());
|
|
46
51
|
const anchor = mode === "range" ? range?.from : value;
|
|
47
52
|
const [innerMonth, setInnerMonth] = React.useState(() => addMonths(anchor ?? today, 0));
|
|
@@ -53,6 +58,14 @@ function Calendar({
|
|
|
53
58
|
const [focus, setFocus] = React.useState(() => startOfDay(anchor ?? today));
|
|
54
59
|
const [hover, setHover] = React.useState(null);
|
|
55
60
|
const gridRef = React.useRef(null);
|
|
61
|
+
const setRoot = React.useCallback(
|
|
62
|
+
(node) => {
|
|
63
|
+
gridRef.current = node;
|
|
64
|
+
if (typeof ref === "function") ref(node);
|
|
65
|
+
else if (ref) ref.current = node;
|
|
66
|
+
},
|
|
67
|
+
[ref]
|
|
68
|
+
);
|
|
56
69
|
const disabled = (d) => min && d < startOfDay(min) || max && d > startOfDay(max) || false;
|
|
57
70
|
const picking = mode === "range" && !!range?.from && !range?.to;
|
|
58
71
|
const pick = (d) => {
|
|
@@ -95,46 +108,46 @@ function Calendar({
|
|
|
95
108
|
const lo = range?.from && end ? end < range.from ? end : range.from : null;
|
|
96
109
|
const hi = range?.from && end ? end < range.from ? range.from : end : null;
|
|
97
110
|
const titleId = `cal-${m.getFullYear()}-${m.getMonth()}`;
|
|
98
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex w-[280px] shrink-0 flex-col gap-2", children: [
|
|
99
|
-
header === "picker" && months === 1 ? /* @__PURE__ */ jsxs("div", { className: "flex h-8 items-center gap-1", children: [
|
|
100
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
101
|
-
navBtn(-1,
|
|
102
|
-
/* @__PURE__ */ jsx("span", { id: titleId, className: "min-w-[72px] text-center text-sm leading-5 font-medium text-text-default", children: MONTHS[m.getMonth()] }),
|
|
103
|
-
navBtn(1,
|
|
111
|
+
return /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:w-[280px] sa:shrink-0 sa:flex-col sa:gap-2", children: [
|
|
112
|
+
header === "picker" && months === 1 ? /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:h-8 sa:items-center sa:gap-1", children: [
|
|
113
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:flex sa:items-center sa:gap-1", children: [
|
|
114
|
+
navBtn(-1, labels.previousMonth, () => setMonth(addMonths(month, -1))),
|
|
115
|
+
/* @__PURE__ */ jsx("span", { id: titleId, className: "sa:min-w-[72px] sa:text-center sa:text-sm sa:leading-5 sa:font-medium sa:text-text-default", children: MONTHS[m.getMonth()] }),
|
|
116
|
+
navBtn(1, labels.nextMonth, () => setMonth(addMonths(month, 1)))
|
|
104
117
|
] }),
|
|
105
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1" }),
|
|
118
|
+
/* @__PURE__ */ jsx("span", { className: "sa:flex-1" }),
|
|
106
119
|
/* @__PURE__ */ jsx(
|
|
107
120
|
Select,
|
|
108
121
|
{
|
|
109
122
|
size: "sm",
|
|
110
|
-
"aria-label":
|
|
123
|
+
"aria-label": labels.year,
|
|
111
124
|
value: String(m.getFullYear()),
|
|
112
125
|
onValueChange: (y) => setMonth(new Date(Number(y), m.getMonth(), 1)),
|
|
113
126
|
options: yearOptions(m.getFullYear(), today.getFullYear(), min, max),
|
|
114
|
-
wrapperClassName: "w-auto shrink-0",
|
|
115
|
-
className: "w-[92px]"
|
|
127
|
+
wrapperClassName: "sa:w-auto sa:shrink-0",
|
|
128
|
+
className: "sa:w-[92px]"
|
|
116
129
|
}
|
|
117
130
|
)
|
|
118
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "flex h-8 items-center gap-1", children: [
|
|
119
|
-
months === 2 && (i === 0 ? navBtn(-1,
|
|
120
|
-
/* @__PURE__ */ jsxs("span", { id: titleId, className: cn("flex-1 text-sm leading-5 font-medium text-text-default", months === 2 && "text-center"), children: [
|
|
131
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:h-8 sa:items-center sa:gap-1", children: [
|
|
132
|
+
months === 2 && (i === 0 ? navBtn(-1, labels.previousMonth, () => setMonth(addMonths(month, -1))) : /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:size-6 sa:shrink-0" })),
|
|
133
|
+
/* @__PURE__ */ jsxs("span", { id: titleId, className: cn("sa:flex-1 sa:text-sm sa:leading-5 sa:font-medium sa:text-text-default", months === 2 && "sa:text-center"), children: [
|
|
121
134
|
MONTHS[m.getMonth()],
|
|
122
135
|
" ",
|
|
123
136
|
m.getFullYear()
|
|
124
137
|
] }),
|
|
125
|
-
months === 1 && navBtn(-1,
|
|
126
|
-
months === 2 && i === 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "size-6 shrink-0" }),
|
|
127
|
-
(months === 1 || i === 1) && navBtn(1,
|
|
138
|
+
months === 1 && navBtn(-1, labels.previousMonth, () => setMonth(addMonths(month, -1))),
|
|
139
|
+
months === 2 && i === 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:size-6 sa:shrink-0" }),
|
|
140
|
+
(months === 1 || i === 1) && navBtn(1, labels.nextMonth, () => setMonth(addMonths(month, 1)))
|
|
128
141
|
] }),
|
|
129
|
-
/* @__PURE__ */ jsxs("div", { role: "grid", "aria-labelledby": titleId, className: "flex flex-col gap-1", onKeyDown, children: [
|
|
130
|
-
/* @__PURE__ */ jsx("div", { role: "row", className: "flex", children: DOW.map((d, k) => /* @__PURE__ */ jsx("span", { role: "columnheader", "aria-label": DOW_FULL[k], className: "grid h-6 w-10 place-items-center text-xs text-text-muted", children: d }, k)) }),
|
|
131
|
-
weeksOf(m).map((week, w) => /* @__PURE__ */ jsx("div", { role: "row", className: "flex", children: week.map((d) => {
|
|
142
|
+
/* @__PURE__ */ jsxs("div", { role: "grid", "aria-labelledby": titleId, className: "sa:flex sa:flex-col sa:gap-1", onKeyDown, children: [
|
|
143
|
+
/* @__PURE__ */ jsx("div", { role: "row", className: "sa:flex", children: DOW.map((d, k) => /* @__PURE__ */ jsx("span", { role: "columnheader", "aria-label": DOW_FULL[k], className: "sa:grid sa:h-6 sa:w-10 sa:place-items-center sa:text-xs sa:text-text-muted", children: d }, k)) }),
|
|
144
|
+
weeksOf(m).map((week, w) => /* @__PURE__ */ jsx("div", { role: "row", className: "sa:flex", children: week.map((d) => {
|
|
132
145
|
const out = d.getMonth() !== m.getMonth();
|
|
133
146
|
const isSingle = mode === "single" && sameDay(d, value);
|
|
134
147
|
const isEnd = mode === "range" && !out && (sameDay(d, range?.from) || sameDay(d, range?.to));
|
|
135
148
|
const inBand = mode === "range" && !out && lo && hi && !sameDay(lo, hi) && d >= lo && d <= hi;
|
|
136
|
-
const bandFrom = inBand && sameDay(d, lo) ? "left-1/2" : "left-0";
|
|
137
|
-
const bandTo = inBand && sameDay(d, hi) ? "right-1/2" : "right-0";
|
|
149
|
+
const bandFrom = inBand && sameDay(d, lo) ? "sa:left-1/2" : "sa:left-0";
|
|
150
|
+
const bandTo = inBand && sameDay(d, hi) ? "sa:right-1/2" : "sa:right-0";
|
|
138
151
|
const isHoverEnd = picking && !out && sameDay(d, hover) && !isEnd;
|
|
139
152
|
const isToday = sameDay(d, today);
|
|
140
153
|
const off = disabled(d);
|
|
@@ -145,9 +158,9 @@ function Calendar({
|
|
|
145
158
|
role: "gridcell",
|
|
146
159
|
"aria-selected": isSingle || isEnd || void 0,
|
|
147
160
|
onPointerEnter: () => picking && !out && !off && setHover(d),
|
|
148
|
-
className: "relative grid size-10 place-items-center",
|
|
161
|
+
className: "sa:relative sa:grid sa:size-10 sa:place-items-center",
|
|
149
162
|
children: [
|
|
150
|
-
inBand && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("absolute inset-y-0.5 bg-status-brand-bg", bandFrom, bandTo) }),
|
|
163
|
+
inBand && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("sa:absolute sa:inset-y-0.5 sa:bg-status-brand-bg", bandFrom, bandTo) }),
|
|
151
164
|
/* @__PURE__ */ jsxs(
|
|
152
165
|
"button",
|
|
153
166
|
{
|
|
@@ -163,17 +176,17 @@ function Calendar({
|
|
|
163
176
|
},
|
|
164
177
|
onFocus: () => setFocus(d),
|
|
165
178
|
className: cn(
|
|
166
|
-
"relative grid size-9 place-items-center text-sm leading-5 font-medium outline-none",
|
|
179
|
+
"sa:relative sa:grid sa:size-9 sa:place-items-center sa:text-sm sa:leading-5 sa:font-medium sa:outline-none",
|
|
167
180
|
// While the end is being picked the band and the end circle move together,
|
|
168
181
|
// so neither fades: a fade here would trail the pointer.
|
|
169
|
-
!picking && "transition-[background-color,color] duration-(--duration-fast) ease-(--ease-out)",
|
|
170
|
-
"focus-visible:[box-shadow:0_0_0_2px_var(--action-focus-ring)] disabled:pointer-events-none disabled:opacity-40",
|
|
171
|
-
isEnd ? "rounded-md" : "rounded-full",
|
|
172
|
-
isSingle || isEnd ? "bg-action-primary-bg text-text-on-solid" : cn(out ? "text-text-subtle" : "text-text-default", isHoverEnd ? "bg-bg-hover" : !inBand && "hover:bg-bg-hover")
|
|
182
|
+
!picking && "sa:transition-[background-color,color] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
183
|
+
"sa:focus-visible:[box-shadow:0_0_0_2px_var(--action-focus-ring)] sa:disabled:pointer-events-none sa:disabled:opacity-40",
|
|
184
|
+
isEnd ? "sa:rounded-md" : "sa:rounded-full",
|
|
185
|
+
isSingle || isEnd ? "sa:bg-action-primary-bg sa:text-text-on-solid" : cn(out ? "sa:text-text-subtle" : "sa:text-text-default", isHoverEnd ? "sa:bg-bg-hover" : !inBand && "sa:hover:bg-bg-hover")
|
|
173
186
|
),
|
|
174
187
|
children: [
|
|
175
188
|
d.getDate(),
|
|
176
|
-
isToday && !isSingle && !isEnd && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute bottom-1 left-1/2 h-0.5 w-3
|
|
189
|
+
isToday && !isSingle && !isEnd && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:absolute sa:bottom-1 sa:left-1/2 sa:h-0.5 sa:w-3 sa:-translate-x-1/2 sa:rounded-full sa:bg-action-primary-bg" })
|
|
177
190
|
]
|
|
178
191
|
}
|
|
179
192
|
)
|
|
@@ -185,7 +198,20 @@ function Calendar({
|
|
|
185
198
|
] })
|
|
186
199
|
] }, i);
|
|
187
200
|
};
|
|
188
|
-
return /* @__PURE__ */ jsx(
|
|
201
|
+
return /* @__PURE__ */ jsx(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
...props,
|
|
205
|
+
ref: setRoot,
|
|
206
|
+
"data-slot": "calendar",
|
|
207
|
+
className: cn("sa:flex sa:gap-6", className),
|
|
208
|
+
onPointerLeave: (e) => {
|
|
209
|
+
onPointerLeave?.(e);
|
|
210
|
+
setHover(null);
|
|
211
|
+
},
|
|
212
|
+
children: Array.from({ length: months }, (_, i) => renderMonth(addMonths(month, i), i))
|
|
213
|
+
}
|
|
214
|
+
);
|
|
189
215
|
}
|
|
190
216
|
function yearOptions(shown, thisYear, min, max) {
|
|
191
217
|
const from = min ? min.getFullYear() : Math.min(shown, thisYear - 100);
|
|
@@ -196,12 +222,12 @@ function yearOptions(shown, thisYear, min, max) {
|
|
|
196
222
|
});
|
|
197
223
|
}
|
|
198
224
|
var surfaceClass = cn(
|
|
199
|
-
"rounded-xl border border-border-default bg-bg-popover",
|
|
200
|
-
"[box-shadow:0_4px_6px_-4px_var(--effect-shadow-sm),0_10px_15px_-3px_var(--effect-shadow-sm)]"
|
|
225
|
+
"sa:rounded-xl sa:border sa:border-border-default sa:bg-bg-popover",
|
|
226
|
+
"sa:[box-shadow:0_4px_6px_-4px_var(--effect-shadow-sm),0_10px_15px_-3px_var(--effect-shadow-sm)]"
|
|
201
227
|
);
|
|
202
228
|
var popClass = cn(
|
|
203
|
-
"z-50 outline-none",
|
|
204
|
-
"origin-(--radix-popover-content-transform-origin) data-[state=open]:animate-[satin-enter_var(--duration-base)_var(--ease-out)]"
|
|
229
|
+
"sa:z-50 sa:outline-none",
|
|
230
|
+
"sa:origin-(--radix-popover-content-transform-origin) sa:data-[state=open]:animate-[satin-enter_var(--sa-duration-base)_var(--sa-ease-out)]"
|
|
205
231
|
);
|
|
206
232
|
function Trigger({ text, placeholder, chrome, size, open, className, ...props }) {
|
|
207
233
|
return /* @__PURE__ */ jsxs(
|
|
@@ -218,18 +244,18 @@ function Trigger({ text, placeholder, chrome, size, open, className, ...props })
|
|
|
218
244
|
disabled: chrome.disabled,
|
|
219
245
|
"aria-invalid": chrome.invalid || void 0,
|
|
220
246
|
"aria-describedby": chrome.describedBy,
|
|
221
|
-
className: cn("satin-field cursor-pointer text-left", className),
|
|
247
|
+
className: cn("satin-field sa:cursor-pointer sa:text-left", className),
|
|
222
248
|
...props,
|
|
223
249
|
children: [
|
|
224
250
|
/* @__PURE__ */ jsx("span", { className: "satin-field-icon", "aria-hidden": true, children: /* @__PURE__ */ jsx(Calendar$1, {}) }),
|
|
225
|
-
/* @__PURE__ */ jsx("span", { className: cn("min-w-0 flex-1 truncate", text ? "text-text-default" : "text-text-placeholder"), children: text || placeholder }),
|
|
226
|
-
/* @__PURE__ */ jsx("span", { className: "satin-field-icon", "aria-hidden": true, children: /* @__PURE__ */ jsx(NavArrowDown, { className: cn("transition-transform duration-(--duration-fast) ease-(--ease-out)", open && "rotate-180") }) })
|
|
251
|
+
/* @__PURE__ */ jsx("span", { className: cn("sa:min-w-0 sa:flex-1 sa:truncate", text ? "sa:text-text-default" : "sa:text-text-placeholder"), children: text || placeholder }),
|
|
252
|
+
/* @__PURE__ */ jsx("span", { className: "satin-field-icon", "aria-hidden": true, children: /* @__PURE__ */ jsx(NavArrowDown, { className: cn("sa:transition-transform sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)", open && "sa:rotate-180") }) })
|
|
227
253
|
]
|
|
228
254
|
}
|
|
229
255
|
);
|
|
230
256
|
}
|
|
231
|
-
function DatePickerPanel({ value, onValueChange, min, max, today, className }) {
|
|
232
|
-
return /* @__PURE__ */ jsx("div", { "data-slot": "date-picker-panel", className: cn(surfaceClass, "w-fit p-3", className), children: /* @__PURE__ */ jsx(Calendar, { header: "picker", value, onValueChange, min, max, today }) });
|
|
257
|
+
function DatePickerPanel({ value, onValueChange, min, max, today, className, ...props }) {
|
|
258
|
+
return /* @__PURE__ */ jsx("div", { ...props, "data-slot": "date-picker-panel", className: cn(surfaceClass, "sa:w-fit sa:p-3", className), children: /* @__PURE__ */ jsx(Calendar, { header: "picker", value, onValueChange, min, max, today }) });
|
|
233
259
|
}
|
|
234
260
|
function DatePicker({
|
|
235
261
|
value: valueProp,
|
|
@@ -241,20 +267,34 @@ function DatePicker({
|
|
|
241
267
|
label,
|
|
242
268
|
hint,
|
|
243
269
|
error,
|
|
244
|
-
placeholder
|
|
270
|
+
placeholder,
|
|
245
271
|
disabled,
|
|
246
272
|
id,
|
|
247
273
|
size = "md",
|
|
248
274
|
container,
|
|
249
275
|
wrapperClassName,
|
|
250
|
-
className
|
|
276
|
+
className,
|
|
277
|
+
"aria-describedby": describedBy,
|
|
278
|
+
...props
|
|
251
279
|
}) {
|
|
252
280
|
const chrome = useFieldChrome({ id, disabled, error, hint });
|
|
281
|
+
const labels = useSatinLabels();
|
|
253
282
|
const [inner, setInner] = React.useState(defaultValue);
|
|
254
283
|
const value = valueProp !== void 0 ? valueProp : inner;
|
|
255
284
|
const [open, setOpen] = React.useState(false);
|
|
256
285
|
return /* @__PURE__ */ jsx(FieldChrome, { label, chrome, className: wrapperClassName, children: /* @__PURE__ */ jsxs(Popover.Root, { open, onOpenChange: setOpen, children: [
|
|
257
|
-
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
286
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, ...props, children: /* @__PURE__ */ jsx(
|
|
287
|
+
Trigger,
|
|
288
|
+
{
|
|
289
|
+
text: value ? formatDate(value) : "",
|
|
290
|
+
placeholder: placeholder ?? labels.pickDate,
|
|
291
|
+
chrome,
|
|
292
|
+
size,
|
|
293
|
+
open,
|
|
294
|
+
"aria-describedby": [describedBy, chrome.describedBy].filter(Boolean).join(" ") || void 0,
|
|
295
|
+
className
|
|
296
|
+
}
|
|
297
|
+
) }),
|
|
258
298
|
/* @__PURE__ */ jsx(Popover.Portal, { container, children: /* @__PURE__ */ jsx(Popover.Content, { "data-slot": "date-picker", align: "start", sideOffset: 4, collisionPadding: 8, className: popClass, children: /* @__PURE__ */ jsx(
|
|
259
299
|
DatePickerPanel,
|
|
260
300
|
{
|
|
@@ -282,17 +322,20 @@ function DateRangePicker({
|
|
|
282
322
|
label,
|
|
283
323
|
hint,
|
|
284
324
|
error,
|
|
285
|
-
placeholder
|
|
325
|
+
placeholder,
|
|
286
326
|
disabled,
|
|
287
327
|
id,
|
|
288
328
|
size = "md",
|
|
289
|
-
applyLabel
|
|
290
|
-
cancelLabel
|
|
329
|
+
applyLabel,
|
|
330
|
+
cancelLabel,
|
|
291
331
|
container,
|
|
292
332
|
wrapperClassName,
|
|
293
|
-
className
|
|
333
|
+
className,
|
|
334
|
+
"aria-describedby": describedBy,
|
|
335
|
+
...props
|
|
294
336
|
}) {
|
|
295
337
|
const chrome = useFieldChrome({ id, disabled, error, hint });
|
|
338
|
+
const labels = useSatinLabels();
|
|
296
339
|
const [inner, setInner] = React.useState(defaultValue);
|
|
297
340
|
const value = valueProp ?? inner;
|
|
298
341
|
const [open, setOpen] = React.useState(false);
|
|
@@ -302,7 +345,18 @@ function DateRangePicker({
|
|
|
302
345
|
setOpen(false);
|
|
303
346
|
};
|
|
304
347
|
return /* @__PURE__ */ jsx(FieldChrome, { label, chrome, className: wrapperClassName, children: /* @__PURE__ */ jsxs(Popover.Root, { open, onOpenChange: setOpen, children: [
|
|
305
|
-
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
348
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, ...props, children: /* @__PURE__ */ jsx(
|
|
349
|
+
Trigger,
|
|
350
|
+
{
|
|
351
|
+
text: formatRange(value),
|
|
352
|
+
placeholder: placeholder ?? labels.pickDates,
|
|
353
|
+
chrome,
|
|
354
|
+
size,
|
|
355
|
+
open,
|
|
356
|
+
"aria-describedby": [describedBy, chrome.describedBy].filter(Boolean).join(" ") || void 0,
|
|
357
|
+
className
|
|
358
|
+
}
|
|
359
|
+
) }),
|
|
306
360
|
/* @__PURE__ */ jsx(Popover.Portal, { container, children: /* @__PURE__ */ jsx(Popover.Content, { "data-slot": "date-range-picker", align: "start", sideOffset: 4, collisionPadding: 8, className: popClass, children: /* @__PURE__ */ jsx(
|
|
307
361
|
DateRangePickerPanel,
|
|
308
362
|
{
|
|
@@ -325,24 +379,24 @@ function DateRangePickerPanel({
|
|
|
325
379
|
min,
|
|
326
380
|
max,
|
|
327
381
|
today,
|
|
328
|
-
applyLabel
|
|
329
|
-
cancelLabel
|
|
330
|
-
className
|
|
382
|
+
applyLabel,
|
|
383
|
+
cancelLabel,
|
|
384
|
+
className,
|
|
385
|
+
...props
|
|
331
386
|
}) {
|
|
387
|
+
const labels = useSatinLabels();
|
|
332
388
|
const [draft, setDraft] = React.useState(value);
|
|
333
389
|
const [month, setMonth] = React.useState(() => addMonths(value.from ?? today ?? todayDate(), 0));
|
|
334
|
-
return /* @__PURE__ */ jsxs("div", { "data-slot": "date-range-picker-panel", className: cn(surfaceClass, "flex w-fit shrink-0 flex-col overflow-hidden", className), children: [
|
|
335
|
-
/* @__PURE__ */ jsx("div", { className: "p-3", children: /* @__PURE__ */ jsx(Calendar, { mode: "range", months: 2, range: draft, onRangeChange: setDraft, month, onMonthChange: setMonth, min, max, today }) }),
|
|
336
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-2 border-t border-border-subtle px-3 py-2", children: [
|
|
390
|
+
return /* @__PURE__ */ jsxs("div", { ...props, "data-slot": "date-range-picker-panel", className: cn(surfaceClass, "sa:flex sa:w-fit sa:shrink-0 sa:flex-col sa:overflow-hidden", className), children: [
|
|
391
|
+
/* @__PURE__ */ jsx("div", { className: "sa:p-3", children: /* @__PURE__ */ jsx(Calendar, { mode: "range", months: 2, range: draft, onRangeChange: setDraft, month, onMonthChange: setMonth, min, max, today }) }),
|
|
392
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:flex sa:items-center sa:justify-end sa:gap-2 sa:border-t sa:border-border-subtle sa:px-3 sa:py-2", children: [
|
|
337
393
|
/* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: () => {
|
|
338
394
|
setDraft(value);
|
|
339
395
|
onCancel?.();
|
|
340
|
-
}, children: cancelLabel }),
|
|
341
|
-
/* @__PURE__ */ jsx(Button, { disabled: !draft.from || !draft.to, onClick: () => onApply?.(draft), children: applyLabel })
|
|
396
|
+
}, children: cancelLabel ?? labels.cancel }),
|
|
397
|
+
/* @__PURE__ */ jsx(Button, { disabled: !draft.from || !draft.to, onClick: () => onApply?.(draft), children: applyLabel ?? labels.apply })
|
|
342
398
|
] })
|
|
343
399
|
] });
|
|
344
400
|
}
|
|
345
401
|
|
|
346
402
|
export { Calendar, DatePicker, DatePickerPanel, DateRangePicker, DateRangePickerPanel, formatDate, formatRange };
|
|
347
|
-
//# sourceMappingURL=chunk-XZNHT6MO.js.map
|
|
348
|
-
//# sourceMappingURL=chunk-XZNHT6MO.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { HoverCard as HoverCard$1 } from 'radix-ui';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function HoverCard({
|
|
7
|
+
trigger,
|
|
8
|
+
children,
|
|
9
|
+
side = "bottom",
|
|
10
|
+
align = "start",
|
|
11
|
+
openDelay = 400,
|
|
12
|
+
closeDelay = 150,
|
|
13
|
+
open,
|
|
14
|
+
defaultOpen,
|
|
15
|
+
onOpenChange,
|
|
16
|
+
container,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(HoverCard$1.Root, { openDelay, closeDelay, open, defaultOpen, onOpenChange, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(HoverCard$1.Trigger, { asChild: true, children: trigger }),
|
|
22
|
+
/* @__PURE__ */ jsx(HoverCard$1.Portal, { container, children: /* @__PURE__ */ jsx(
|
|
23
|
+
HoverCard$1.Content,
|
|
24
|
+
{
|
|
25
|
+
sideOffset: 8,
|
|
26
|
+
collisionPadding: 8,
|
|
27
|
+
...props,
|
|
28
|
+
side,
|
|
29
|
+
align,
|
|
30
|
+
className: cn(hoverCardClass, className),
|
|
31
|
+
children
|
|
32
|
+
}
|
|
33
|
+
) })
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
var hoverCardClass = cn(
|
|
37
|
+
"sa:z-50 sa:flex sa:w-80 sa:max-w-[calc(100vw-16px)] sa:flex-col sa:gap-3 sa:rounded-xl sa:border sa:border-border-default sa:bg-bg-popover sa:p-4 sa:outline-none",
|
|
38
|
+
"sa:[box-shadow:0_4px_6px_-4px_var(--effect-shadow-sm),0_10px_15px_-3px_var(--effect-shadow-sm)]",
|
|
39
|
+
"sa:origin-(--radix-hover-card-content-transform-origin) sa:data-[state=open]:animate-[satin-enter_var(--sa-duration-base)_var(--sa-ease-out)]"
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export { HoverCard, hoverCardClass };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from './chunk-
|
|
1
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Checkbox as Checkbox$1 } from 'radix-ui';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -15,9 +15,9 @@ function Checkbox({ className, label, description, placement = "left", id, ...pr
|
|
|
15
15
|
"data-slot": "checkbox",
|
|
16
16
|
"aria-labelledby": labelId,
|
|
17
17
|
"aria-describedby": descriptionId,
|
|
18
|
-
className: cn("peer satin-checkbox", className),
|
|
18
|
+
className: cn("sa:peer satin-checkbox", className),
|
|
19
19
|
...props,
|
|
20
|
-
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, { className: "
|
|
20
|
+
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, { className: "sa:-m-px sa:grid sa:size-4 sa:place-items-center", children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: props.checked === "indeterminate" ? /* @__PURE__ */ jsx("path", { d: "M3.6 8H12.4", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round" }) : /* @__PURE__ */ jsx(
|
|
21
21
|
"path",
|
|
22
22
|
{
|
|
23
23
|
d: "M3.33333 8.66667L6 11.3333L12.6667 4.66667",
|
|
@@ -37,12 +37,12 @@ function Checkbox({ className, label, description, placement = "left", id, ...pr
|
|
|
37
37
|
{
|
|
38
38
|
htmlFor: boxId,
|
|
39
39
|
"data-slot": "checkbox-field",
|
|
40
|
-
className: cn("flex cursor-pointer items-start gap-2 has-disabled:cursor-not-allowed has-data-disabled:cursor-not-allowed [&>:first-child]:mt-0.5", placement === "right" && "flex-row-reverse justify-between"),
|
|
40
|
+
className: cn("sa:flex sa:cursor-pointer sa:items-start sa:gap-2 sa:has-disabled:cursor-not-allowed sa:has-data-disabled:cursor-not-allowed sa:[&>:first-child]:mt-0.5", placement === "right" && "sa:flex-row-reverse sa:justify-between"),
|
|
41
41
|
children: [
|
|
42
42
|
box,
|
|
43
|
-
/* @__PURE__ */ jsxs("div", { className: "grid gap-0.5 text-base", children: [
|
|
44
|
-
label && /* @__PURE__ */ jsx("span", { id: labelId, className: "block leading-5 font-medium text-text-default", children: label }),
|
|
45
|
-
description && /* @__PURE__ */ jsx("span", { id: descriptionId, className: "block leading-5 text-text-muted", children: description })
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:grid sa:gap-0.5 sa:text-base sa:peer-disabled:*:text-text-subtle", children: [
|
|
44
|
+
label && /* @__PURE__ */ jsx("span", { id: labelId, className: "sa:block sa:leading-5 sa:font-medium sa:text-text-default", children: label }),
|
|
45
|
+
description && /* @__PURE__ */ jsx("span", { id: descriptionId, className: "sa:block sa:leading-5 sa:text-text-muted", children: description })
|
|
46
46
|
] })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
@@ -51,5 +51,3 @@ function Checkbox({ className, label, description, placement = "left", id, ...pr
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export { Checkbox };
|
|
54
|
-
//# sourceMappingURL=chunk-FDKIX4DC.js.map
|
|
55
|
-
//# sourceMappingURL=chunk-FDKIX4DC.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChartCard, ChartTooltip, defaultFormat, ChartLegendRow } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { ChartCard, ChartTooltip, defaultFormat, ChartLegendRow } from './chunk-LI5VYDLN.js';
|
|
2
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -16,12 +16,12 @@ function ChannelCard({
|
|
|
16
16
|
const active = hovered ?? highlight ?? null;
|
|
17
17
|
const sum = data.reduce((n, d) => n + d.value, 0);
|
|
18
18
|
const last = data.length - 1;
|
|
19
|
-
return /* @__PURE__ */ jsx(ChartCard, { total: total ?? formatValue(sum), ...props, children: /* @__PURE__ */ jsxs("div", { className: "relative flex flex-col gap-4", onPointerLeave: () => setHovered(null), children: [
|
|
19
|
+
return /* @__PURE__ */ jsx(ChartCard, { total: total ?? formatValue(sum), ...props, children: /* @__PURE__ */ jsxs("div", { className: "sa:relative sa:flex sa:flex-col sa:gap-4", onPointerLeave: () => setHovered(null), children: [
|
|
20
20
|
/* @__PURE__ */ jsx(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
"aria-hidden": true,
|
|
24
|
-
className: "relative grid h-3.5 gap-x-0.5",
|
|
24
|
+
className: "sa:relative sa:grid sa:h-3.5 sa:gap-x-0.5",
|
|
25
25
|
style: { gridTemplateColumns: data.map((d) => `minmax(0, ${Math.max(d.value, 0)}fr)`).join(" ") },
|
|
26
26
|
children: data.map((d, i) => /* @__PURE__ */ jsx(
|
|
27
27
|
"span",
|
|
@@ -29,10 +29,10 @@ function ChannelCard({
|
|
|
29
29
|
ref: active === i ? setAnchor : void 0,
|
|
30
30
|
onPointerEnter: () => setHovered(i),
|
|
31
31
|
className: cn(
|
|
32
|
-
"relative rounded-[1.5px] transition-opacity duration-(--duration-fast) ease-(--ease-out)",
|
|
33
|
-
i === 0 && "rounded-l-[4px]",
|
|
34
|
-
i === last && "rounded-r-[4px]",
|
|
35
|
-
active !== null && active !== i && "opacity-15"
|
|
32
|
+
"sa:relative sa:rounded-[1.5px] sa:transition-opacity sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
33
|
+
i === 0 && "sa:rounded-l-[4px]",
|
|
34
|
+
i === last && "sa:rounded-r-[4px]",
|
|
35
|
+
active !== null && active !== i && "sa:opacity-15"
|
|
36
36
|
),
|
|
37
37
|
style: { background: seriesColor(i) },
|
|
38
38
|
children: active === i && /* @__PURE__ */ jsx(ChartTooltip, { anchor, sideOffset: 8, label: d.tooltipLabel ?? d.label, value: formatValue(d.value) })
|
|
@@ -44,7 +44,7 @@ function ChannelCard({
|
|
|
44
44
|
/* @__PURE__ */ jsx(
|
|
45
45
|
"ul",
|
|
46
46
|
{
|
|
47
|
-
className: "flex flex-col gap-0.5
|
|
47
|
+
className: "sa:flex sa:flex-col sa:gap-0.5 sa:@min-[560px]:grid sa:@min-[560px]:grid-flow-col sa:@min-[560px]:auto-cols-fr sa:@min-[560px]:gap-x-6",
|
|
48
48
|
style: { gridTemplateRows: `repeat(${Math.ceil(data.length / 2)}, auto)` },
|
|
49
49
|
"aria-label": props.title,
|
|
50
50
|
children: data.map((d, i) => /* @__PURE__ */ jsx(
|
|
@@ -55,7 +55,7 @@ function ChannelCard({
|
|
|
55
55
|
onFocus: () => setHovered(i),
|
|
56
56
|
onBlur: () => setHovered(null),
|
|
57
57
|
"aria-label": `${d.label}: ${formatValue(d.value)}, ${Math.round(d.value / (sum || 1) * 100)}%`,
|
|
58
|
-
className: "rounded-md focus-visible:outline-none focus-visible:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
58
|
+
className: "sa:rounded-md sa:focus-visible:outline-none sa:focus-visible:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
|
|
59
59
|
children: /* @__PURE__ */ jsx(
|
|
60
60
|
ChartLegendRow,
|
|
61
61
|
{
|
|
@@ -75,5 +75,3 @@ function ChannelCard({
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export { ChannelCard };
|
|
78
|
-
//# sourceMappingURL=chunk-LZMKSFCF.js.map
|
|
79
|
-
//# sourceMappingURL=chunk-LZMKSFCF.js.map
|