@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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var FormFieldContext = React.createContext(null);
|
|
6
|
+
var FormContext = React.createContext(null);
|
|
7
|
+
var FieldSizeContext = React.createContext(null);
|
|
8
|
+
function useFormContext() {
|
|
9
|
+
return React.useContext(FormContext);
|
|
10
|
+
}
|
|
11
|
+
function useFormField() {
|
|
12
|
+
return React.useContext(FormFieldContext);
|
|
13
|
+
}
|
|
14
|
+
function FormField({
|
|
15
|
+
label,
|
|
16
|
+
description,
|
|
17
|
+
name,
|
|
18
|
+
error: ownError,
|
|
19
|
+
layout: ownLayout,
|
|
20
|
+
disabled: ownDisabled,
|
|
21
|
+
required = false,
|
|
22
|
+
htmlFor,
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
const form = useFormContext();
|
|
28
|
+
const error = ownError ?? (name ? form?.errors?.[name] : void 0);
|
|
29
|
+
const layout = ownLayout ?? form?.layout ?? "vertical";
|
|
30
|
+
const disabled = ownDisabled ?? form?.disabled ?? false;
|
|
31
|
+
const autoId = React.useId();
|
|
32
|
+
const id = htmlFor ?? autoId;
|
|
33
|
+
const invalid = Boolean(error);
|
|
34
|
+
const messageId = invalid ? `${id}-error` : description ? `${id}-description` : void 0;
|
|
35
|
+
const context = React.useMemo(
|
|
36
|
+
() => ({ id, name, describedBy: messageId, invalid, disabled, required }),
|
|
37
|
+
[id, name, messageId, invalid, disabled, required]
|
|
38
|
+
);
|
|
39
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: context, children: /* @__PURE__ */ jsxs(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "form-field",
|
|
43
|
+
"data-layout": layout,
|
|
44
|
+
"data-invalid": invalid || void 0,
|
|
45
|
+
"data-disabled": disabled || void 0,
|
|
46
|
+
className: cn("sa:flex sa:w-full sa:items-start", layout === "vertical" ? "sa:flex-col sa:gap-2" : "sa:gap-6", className),
|
|
47
|
+
...props,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsxs(
|
|
50
|
+
"label",
|
|
51
|
+
{
|
|
52
|
+
htmlFor: id,
|
|
53
|
+
className: cn(
|
|
54
|
+
"sa:flex sa:items-start sa:gap-0.5 sa:text-sm sa:leading-[18px] sa:font-medium sa:text-text-default",
|
|
55
|
+
layout === "horizontal" && "sa:w-40 sa:shrink-0",
|
|
56
|
+
disabled && "sa:opacity-50"
|
|
57
|
+
),
|
|
58
|
+
children: [
|
|
59
|
+
label,
|
|
60
|
+
required && /* @__PURE__ */ jsx(RequiredMark, {})
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:flex sa:w-full sa:min-w-0 sa:flex-1 sa:flex-col sa:gap-1.5", children: [
|
|
65
|
+
children,
|
|
66
|
+
invalid ? /* @__PURE__ */ jsx(FieldError, { id: messageId, children: error }) : description && /* @__PURE__ */ jsx(FieldDescription, { id: messageId, className: cn(disabled && "sa:opacity-50"), children: description })
|
|
67
|
+
] })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
}
|
|
72
|
+
function RequiredMark() {
|
|
73
|
+
return /* @__PURE__ */ jsx("svg", { width: "6", height: "6", viewBox: "0 0 6 6", fill: "currentColor", "aria-hidden": true, className: "sa:shrink-0", children: /* @__PURE__ */ jsx("path", { d: "M3.63636 2.18023L5.55372 1.41279L6 2.75581L4.04959 3.43605L5.27273 5.14535L4.18182 6L2.95868 4.20349L1.80165 6L0.694215 5.14535L1.91736 3.43605L0 2.75581L0.446281 1.41279L2.31405 2.18023V0H3.63636V2.18023Z" }) });
|
|
74
|
+
}
|
|
75
|
+
function FieldError({ id, children, className }) {
|
|
76
|
+
return /* @__PURE__ */ jsxs("p", { id, className: cn("sa:flex sa:items-start sa:gap-1.5 sa:text-sm sa:text-action-destructive-bg", className), children: [
|
|
77
|
+
/* @__PURE__ */ jsxs(
|
|
78
|
+
"svg",
|
|
79
|
+
{
|
|
80
|
+
width: "14",
|
|
81
|
+
height: "14",
|
|
82
|
+
viewBox: "0 0 14 14",
|
|
83
|
+
fill: "none",
|
|
84
|
+
stroke: "currentColor",
|
|
85
|
+
strokeWidth: "1.09375",
|
|
86
|
+
strokeLinecap: "round",
|
|
87
|
+
strokeLinejoin: "round",
|
|
88
|
+
"aria-hidden": true,
|
|
89
|
+
className: "sa:mt-[2.75px] sa:shrink-0",
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx("path", { d: "M7 4.67613V7.25806" }),
|
|
92
|
+
/* @__PURE__ */ jsx("path", { d: "M7 9.32422L7.0059 9.31766" }),
|
|
93
|
+
/* @__PURE__ */ jsx("path", { d: "M6.99995 12.1638C9.85184 12.1638 12.1638 9.85184 12.1638 6.99995C12.1638 4.14803 9.85184 1.83609 6.99995 1.83609C4.14803 1.83609 1.83609 4.14803 1.83609 6.99995C1.83609 9.85184 4.14803 12.1638 6.99995 12.1638Z" })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ jsx("span", { children })
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
function FieldDescription({ id, children, className }) {
|
|
101
|
+
return /* @__PURE__ */ jsx("p", { id, className: cn("sa:text-sm sa:text-text-muted", className), children });
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { FieldDescription, FieldError, FieldSizeContext, FormContext, FormField, RequiredMark, useFormContext, useFormField };
|
|
@@ -1,5 +1,5 @@
|
|
|
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 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -22,15 +22,15 @@ function CookieConsent({
|
|
|
22
22
|
"data-slot": "cookie-consent",
|
|
23
23
|
"aria-label": ariaLabel,
|
|
24
24
|
className: cn(
|
|
25
|
-
"flex w-fit max-w-full flex-wrap items-center gap-x-5 gap-y-3 rounded-3xl border border-border-subtle bg-bg-popover px-5 py-4 [box-shadow:0_1px_3px_0_var(--effect-shadow-ambient),0_16px_40px_-12px_var(--effect-shadow-lg)]",
|
|
26
|
-
floating && "fixed inset-x-4 bottom-4 z-50 mx-auto max-w-[calc(100vw-32px)]",
|
|
25
|
+
"sa:flex sa:w-fit sa:max-w-full sa:flex-wrap sa:items-center sa:gap-x-5 sa:gap-y-3 sa:rounded-3xl sa:border sa:border-border-subtle sa:bg-bg-popover sa:px-5 sa:py-4 sa:[box-shadow:0_1px_3px_0_var(--effect-shadow-ambient),0_16px_40px_-12px_var(--effect-shadow-lg)]",
|
|
26
|
+
floating && "sa:fixed sa:inset-x-4 sa:bottom-4 sa:z-50 sa:mx-auto sa:max-w-[calc(100vw-32px)]",
|
|
27
27
|
className
|
|
28
28
|
),
|
|
29
29
|
...props,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */ jsx("p", { className: "m-0 w-[280px] max-w-full min-w-0 shrink text-base text-text-muted", children }),
|
|
32
|
-
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
33
|
-
onCustomize && /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "lg", shape: "rounded", className: "text-text-muted", onClick: onCustomize, children: customizeLabel }),
|
|
31
|
+
/* @__PURE__ */ jsx("p", { className: "sa:m-0 sa:w-[280px] sa:max-w-full sa:min-w-0 sa:shrink sa:text-base sa:text-text-muted", children }),
|
|
32
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:ml-auto sa:flex sa:shrink-0 sa:items-center sa:gap-2", children: [
|
|
33
|
+
onCustomize && /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "lg", shape: "rounded", className: "sa:text-text-muted", onClick: onCustomize, children: customizeLabel }),
|
|
34
34
|
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "lg", shape: "rounded", onClick: onReject, children: rejectLabel }),
|
|
35
35
|
/* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", shape: "rounded", onClick: onAccept, children: acceptLabel })
|
|
36
36
|
] })
|
|
@@ -40,5 +40,3 @@ function CookieConsent({
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export { CookieConsent };
|
|
43
|
-
//# sourceMappingURL=chunk-NN6PKJWS.js.map
|
|
44
|
-
//# sourceMappingURL=chunk-NN6PKJWS.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFormField } from './chunk-
|
|
2
|
-
import { cn } from './chunk-
|
|
1
|
+
import { useFormField, FieldSizeContext } from './chunk-KITXKIYW.js';
|
|
2
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -7,9 +7,11 @@ function Input({
|
|
|
7
7
|
label,
|
|
8
8
|
hint,
|
|
9
9
|
error,
|
|
10
|
-
size
|
|
10
|
+
size: ownSize,
|
|
11
11
|
leadingIcon,
|
|
12
12
|
trailingIcon,
|
|
13
|
+
leadingText,
|
|
14
|
+
trailingText,
|
|
13
15
|
className,
|
|
14
16
|
wrapperClassName,
|
|
15
17
|
id,
|
|
@@ -23,6 +25,7 @@ function Input({
|
|
|
23
25
|
...props
|
|
24
26
|
}) {
|
|
25
27
|
const field = useFormField();
|
|
28
|
+
const size = ownSize ?? React.useContext(FieldSizeContext) ?? "md";
|
|
26
29
|
const autoId = React.useId();
|
|
27
30
|
const inputId = id ?? field?.id ?? autoId;
|
|
28
31
|
const isDisabled = disabled ?? field?.disabled ?? false;
|
|
@@ -35,12 +38,12 @@ function Input({
|
|
|
35
38
|
);
|
|
36
39
|
const filled = value != null ? String(value).length > 0 : uncontrolledFilled;
|
|
37
40
|
const inputRef = React.useRef(null);
|
|
38
|
-
return /* @__PURE__ */ jsxs("div", { "data-slot": "input-wrapper", className: cn("grid w-full gap-2", wrapperClassName), children: [
|
|
41
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "input-wrapper", className: cn("sa:grid sa:w-full sa:gap-2", wrapperClassName), children: [
|
|
39
42
|
label && /* @__PURE__ */ jsx(
|
|
40
43
|
"label",
|
|
41
44
|
{
|
|
42
45
|
htmlFor: inputId,
|
|
43
|
-
className: "text-sm leading-[18px] font-medium text-text-default",
|
|
46
|
+
className: "sa:text-sm sa:leading-[18px] sa:font-medium sa:text-text-default",
|
|
44
47
|
children: label
|
|
45
48
|
}
|
|
46
49
|
),
|
|
@@ -63,6 +66,8 @@ function Input({
|
|
|
63
66
|
},
|
|
64
67
|
children: [
|
|
65
68
|
leadingIcon && /* @__PURE__ */ jsx("span", { className: "satin-field-icon", "aria-hidden": true, children: leadingIcon }),
|
|
69
|
+
leadingText && // 2px from the value, not the field's 8: `https://` reads as part of the address.
|
|
70
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "input-text", className: "sa:-mr-1.5 sa:shrink-0 sa:whitespace-nowrap sa:text-text-muted sa:select-none", children: leadingText }),
|
|
66
71
|
/* @__PURE__ */ jsx(
|
|
67
72
|
"input",
|
|
68
73
|
{
|
|
@@ -80,9 +85,11 @@ function Input({
|
|
|
80
85
|
if (value == null) setUncontrolledFilled(e.target.value.length > 0);
|
|
81
86
|
onChange?.(e);
|
|
82
87
|
},
|
|
83
|
-
...props
|
|
88
|
+
...props,
|
|
89
|
+
name: props.name ?? field?.name
|
|
84
90
|
}
|
|
85
91
|
),
|
|
92
|
+
trailingText && /* @__PURE__ */ jsx("span", { "data-slot": "input-text", className: "sa:-ml-1.5 sa:shrink-0 sa:whitespace-nowrap sa:text-text-muted sa:select-none", children: trailingText }),
|
|
86
93
|
trailingIcon && // Not aria-hidden: the trailing slot may hold an action, such as a clear button.
|
|
87
94
|
/* @__PURE__ */ jsx("span", { className: "satin-field-icon", children: trailingIcon })
|
|
88
95
|
]
|
|
@@ -92,7 +99,7 @@ function Input({
|
|
|
92
99
|
"p",
|
|
93
100
|
{
|
|
94
101
|
id: messageId,
|
|
95
|
-
className: cn("text-sm", typeof error === "string" || React.isValidElement(error) ? "text-action-destructive-bg" : "text-text-muted"),
|
|
102
|
+
className: cn("sa:text-sm", typeof error === "string" || React.isValidElement(error) ? "sa:text-action-destructive-bg" : "sa:text-text-muted"),
|
|
96
103
|
children: message
|
|
97
104
|
}
|
|
98
105
|
)
|
|
@@ -100,5 +107,3 @@ function Input({
|
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
export { Input };
|
|
103
|
-
//# sourceMappingURL=chunk-YPNKBE5X.js.map
|
|
104
|
-
//# sourceMappingURL=chunk-YPNKBE5X.js.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { bannerMesh } from './chunk-YYFAZQ25.js';
|
|
2
|
+
import { Button } from './chunk-6DWLTGRQ.js';
|
|
3
|
+
import { useSatinLabels } from './chunk-NTSU44FY.js';
|
|
4
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import { ArrowRight, Xmark } from 'iconoir-react';
|
|
7
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
function AnnouncementBar({
|
|
10
|
+
action,
|
|
11
|
+
onDismiss,
|
|
12
|
+
dismissLabel = "Dismiss announcement",
|
|
13
|
+
sticky,
|
|
14
|
+
tone = "primary",
|
|
15
|
+
background = "plain",
|
|
16
|
+
shimmer = false,
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
const labels = useSatinLabels();
|
|
22
|
+
const toneClass = {
|
|
23
|
+
primary: "sa:bg-action-primary-bg sa:text-action-primary-fg",
|
|
24
|
+
inverse: "sa:bg-action-inverse-bg sa:text-text-on-inverse",
|
|
25
|
+
default: "sa:bg-bg-card sa:text-text-default sa:[box-shadow:inset_0_1px_0_var(--border-subtle),inset_0_-1px_0_var(--border-subtle)]"
|
|
26
|
+
}[tone];
|
|
27
|
+
const closeClass = {
|
|
28
|
+
primary: "sa:text-action-primary-fg sa:opacity-70 sa:hover:bg-action-primary-bg-hover sa:hover:opacity-100",
|
|
29
|
+
inverse: "sa:text-text-on-inverse sa:opacity-70 sa:hover:bg-action-inverse-bg-hover sa:hover:opacity-100",
|
|
30
|
+
default: "sa:text-text-muted sa:hover:bg-bg-hover sa:hover:text-text-default"
|
|
31
|
+
}[tone];
|
|
32
|
+
const label = action && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
|
+
action.label,
|
|
34
|
+
/* @__PURE__ */ jsx(ArrowRight, { "aria-hidden": true })
|
|
35
|
+
] });
|
|
36
|
+
return /* @__PURE__ */ jsxs(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
role: "region",
|
|
40
|
+
"aria-label": labels.announcement,
|
|
41
|
+
"data-slot": "announcement-bar",
|
|
42
|
+
"data-tone": tone,
|
|
43
|
+
className: cn(
|
|
44
|
+
"sa:relative sa:isolate sa:flex sa:min-h-11 sa:w-full sa:items-center sa:justify-center sa:px-12 sa:py-2 sa:text-base",
|
|
45
|
+
toneClass,
|
|
46
|
+
shimmer && "satin-sheen",
|
|
47
|
+
sticky === "top" && "sa:sticky sa:top-0 sa:z-40",
|
|
48
|
+
sticky === "bottom" && "sa:sticky sa:bottom-0 sa:z-40",
|
|
49
|
+
className
|
|
50
|
+
),
|
|
51
|
+
...props,
|
|
52
|
+
children: [
|
|
53
|
+
background === "mesh" && tone === "default" && /* @__PURE__ */ jsx(
|
|
54
|
+
"img",
|
|
55
|
+
{
|
|
56
|
+
src: bannerMesh.horizontal.one.light,
|
|
57
|
+
alt: "",
|
|
58
|
+
"aria-hidden": true,
|
|
59
|
+
className: "sa:pointer-events-none sa:absolute sa:inset-0 sa:-z-10 sa:size-full sa:max-w-none sa:object-cover sa:mix-blend-multiply"
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
background === "mesh" && /* @__PURE__ */ jsx(
|
|
63
|
+
"img",
|
|
64
|
+
{
|
|
65
|
+
src: bannerMesh.horizontal.one.dark,
|
|
66
|
+
alt: "",
|
|
67
|
+
"aria-hidden": true,
|
|
68
|
+
className: "sa:pointer-events-none sa:absolute sa:inset-0 sa:-z-10 sa:size-full sa:max-w-none sa:object-cover sa:mix-blend-screen"
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { className: "sa:flex sa:flex-wrap sa:items-center sa:justify-center sa:gap-x-3 sa:gap-y-1 sa:text-center", children: [
|
|
72
|
+
/* @__PURE__ */ jsx("p", { className: "sa:m-0", children }),
|
|
73
|
+
action && (action.href ? /* @__PURE__ */ jsx(Button, { asChild: true, variant: "secondary", size: "xs", className: "sa:shrink-0 sa:no-underline", children: /* @__PURE__ */ jsx("a", { href: action.href, onClick: action.onClick, children: label }) }) : /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "xs", className: "sa:shrink-0", onClick: action.onClick, children: label }))
|
|
74
|
+
] }),
|
|
75
|
+
onDismiss && /* @__PURE__ */ jsx(
|
|
76
|
+
"button",
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
"aria-label": dismissLabel,
|
|
80
|
+
onClick: onDismiss,
|
|
81
|
+
className: cn(
|
|
82
|
+
"sa:absolute sa:top-1/2 sa:right-3 sa:grid sa:size-7 sa:-translate-y-1/2 sa:place-items-center sa:rounded-md sa:outline-none",
|
|
83
|
+
closeClass,
|
|
84
|
+
"sa:transition-[opacity,background-color] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
|
|
85
|
+
"sa:focus-visible:opacity-100 sa:focus-visible:[box-shadow:0_0_0_2px_var(--action-focus-ring)]"
|
|
86
|
+
),
|
|
87
|
+
children: /* @__PURE__ */ jsx(Xmark, { "aria-hidden": true, className: "sa:size-4 sa:[stroke-width:1.875]" })
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export { AnnouncementBar };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { Floating } from './chunk-ZHFIWDGF.js';
|
|
2
|
+
import { Select } from './chunk-EQAFDIPE.js';
|
|
3
|
+
import { Badge } from './chunk-7NV53EL5.js';
|
|
4
|
+
import { useSatinLabels } from './chunk-NTSU44FY.js';
|
|
5
|
+
import { cn } from './chunk-EHEXE2UV.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 };
|
|
@@ -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 { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -18,10 +18,10 @@ function Progress({
|
|
|
18
18
|
const known = value != null;
|
|
19
19
|
const v = known ? Math.min(max, Math.max(0, value)) : 0;
|
|
20
20
|
const text = known ? formatValue(v, max) : void 0;
|
|
21
|
-
return /* @__PURE__ */ jsxs("div", { "data-slot": "progress", "data-size": size, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
|
|
22
|
-
(label || showValue && known) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 text-sm leading-5", children: [
|
|
23
|
-
label ? /* @__PURE__ */ jsx("span", { id: labelId, className: "min-w-0 truncate font-medium text-text-default", children: label }) : /* @__PURE__ */ jsx("span", {}),
|
|
24
|
-
showValue && known && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-text-muted tabular-nums", children: text })
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "progress", "data-size": size, className: cn("sa:flex sa:w-full sa:flex-col sa:gap-2", className), ...props, children: [
|
|
22
|
+
(label || showValue && known) && /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:items-center sa:justify-between sa:gap-3 sa:text-sm sa:leading-5", children: [
|
|
23
|
+
label ? /* @__PURE__ */ jsx("span", { id: labelId, className: "sa:min-w-0 sa:truncate sa:font-medium sa:text-text-default", children: label }) : /* @__PURE__ */ jsx("span", {}),
|
|
24
|
+
showValue && known && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "sa:shrink-0 sa:text-text-muted sa:tabular-nums", children: text })
|
|
25
25
|
] }),
|
|
26
26
|
/* @__PURE__ */ jsx(
|
|
27
27
|
"div",
|
|
@@ -33,19 +33,17 @@ function Progress({
|
|
|
33
33
|
"aria-valuemax": max,
|
|
34
34
|
"aria-valuenow": known ? v : void 0,
|
|
35
35
|
"aria-valuetext": text,
|
|
36
|
-
className: cn("relative w-full overflow-hidden rounded-full bg-bg-muted", size === "md" ? "h-2" : "h-1"),
|
|
36
|
+
className: cn("sa:relative sa:w-full sa:overflow-hidden sa:rounded-full sa:bg-bg-muted", size === "md" ? "sa:h-2" : "sa:h-1"),
|
|
37
37
|
children: known ? /* @__PURE__ */ jsx(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
|
-
className: "h-full rounded-full bg-action-primary-bg transition-[width] duration-300 ease-(--ease-out)",
|
|
40
|
+
className: "sa:h-full sa:rounded-full sa:bg-action-primary-bg sa:transition-[width] sa:duration-300 sa:ease-(--sa-ease-out)",
|
|
41
41
|
style: { width: `${v / max * 100}%` }
|
|
42
42
|
}
|
|
43
|
-
) : /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 w-1/3 rounded-full bg-action-primary-bg animate-[satin-progress-indeterminate_1.4s_var(--ease-in-out)_infinite]" })
|
|
43
|
+
) : /* @__PURE__ */ jsx("div", { className: "sa:absolute sa:inset-y-0 sa:left-0 sa:w-1/3 sa:rounded-full sa:bg-action-primary-bg sa:animate-[satin-progress-indeterminate_1.4s_var(--sa-ease-in-out)_infinite]" })
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
] });
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export { Progress };
|
|
50
|
-
//# sourceMappingURL=chunk-7TXHCRAG.js.map
|
|
51
|
-
//# sourceMappingURL=chunk-7TXHCRAG.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn } from './chunk-EHEXE2UV.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Separator({ orientation = "horizontal", decorative = true, label, className, ...props }) {
|
|
6
|
+
const semantics = decorative ? { role: "none" } : { role: "separator", "aria-orientation": orientation };
|
|
7
|
+
if (label && orientation === "horizontal")
|
|
8
|
+
return /* @__PURE__ */ jsxs(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "separator",
|
|
12
|
+
"data-orientation": orientation,
|
|
13
|
+
...semantics,
|
|
14
|
+
className: cn("sa:flex sa:w-full sa:items-center sa:gap-3 sa:text-sm sa:text-text-muted", className),
|
|
15
|
+
...props,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx("span", { className: "sa:h-px sa:flex-1 sa:bg-border-default" }),
|
|
18
|
+
/* @__PURE__ */ jsx("span", { className: "sa:shrink-0", children: label }),
|
|
19
|
+
/* @__PURE__ */ jsx("span", { className: "sa:h-px sa:flex-1 sa:bg-border-default" })
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "separator",
|
|
27
|
+
"data-orientation": orientation,
|
|
28
|
+
...semantics,
|
|
29
|
+
className: cn(
|
|
30
|
+
"sa:shrink-0 sa:bg-border-default",
|
|
31
|
+
orientation === "horizontal" ? "sa:h-px sa:w-full" : "sa:w-px sa:self-stretch",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
...props
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { Separator };
|
|
@@ -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 { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -114,7 +114,7 @@ function StreamingText({
|
|
|
114
114
|
"data-slot": "streaming-text",
|
|
115
115
|
"data-reveal": reveal,
|
|
116
116
|
"aria-busy": streaming || void 0,
|
|
117
|
-
className: cn("satin-stream text-body whitespace-pre-wrap text-text-default", className),
|
|
117
|
+
className: cn("satin-stream sa:text-body sa:whitespace-pre-wrap sa:text-text-default", className),
|
|
118
118
|
...props,
|
|
119
119
|
children: units.map((u, i) => /* @__PURE__ */ jsx("span", { className: "satin-stream-unit", children: u }, i))
|
|
120
120
|
}
|
|
@@ -122,5 +122,3 @@ function StreamingText({
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
export { StreamingText };
|
|
125
|
-
//# sourceMappingURL=chunk-RTJ76X5U.js.map
|
|
126
|
-
//# sourceMappingURL=chunk-RTJ76X5U.js.map
|