@uisatin/ui 0.3.0 → 0.5.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.
Files changed (187) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/{chunk-NQL6SIIB.js → chunk-2643HEXD.js} +1 -1
  3. package/{chunk-UZ4DXU6W.js → chunk-3VVO5MY5.js} +4 -4
  4. package/{chunk-EF5GT4OG.js → chunk-47DDBME3.js} +3 -3
  5. package/{chunk-JBKBRAC4.js → chunk-5663JVE5.js} +3 -3
  6. package/chunk-67CBFB6Y.js +99 -0
  7. package/{chunk-T6L32XXH.js → chunk-6DWLTGRQ.js} +30 -7
  8. package/{chunk-S7QHBVPX.js → chunk-6GNMUJQ4.js} +3 -3
  9. package/{chunk-Z7S2KQZS.js → chunk-6JTSZAGO.js} +1 -1
  10. package/chunk-6RLSRMB5.js +14 -0
  11. package/{chunk-GI2SMFZL.js → chunk-6Y6CY2DP.js} +1 -1
  12. package/{chunk-XUOSJMEJ.js → chunk-7NV53EL5.js} +1 -1
  13. package/{chunk-LFGUJHFF.js → chunk-7SVMERPH.js} +2 -2
  14. package/chunk-A52HUWVM.js +24 -0
  15. package/chunk-AKEZCWNW.js +29 -0
  16. package/{chunk-NH3EHMIL.js → chunk-APRVUOD6.js} +1 -1
  17. package/{chunk-DPYIBFQD.js → chunk-C435UD7V.js} +4 -3
  18. package/{chunk-5XTUFBZI.js → chunk-C6WRJ7DG.js} +1 -1
  19. package/{chunk-X66KTATQ.js → chunk-CQFAMWZI.js} +2 -2
  20. package/{chunk-YJK4MGSI.js → chunk-DAKVTPYZ.js} +4 -4
  21. package/{chunk-W472DBMT.js → chunk-DMZW4LGU.js} +3 -3
  22. package/chunk-EBZHGRM5.js +46 -0
  23. package/{chunk-O46O6LFQ.js → chunk-EHEXE2UV.js} +20 -1
  24. package/{chunk-UCCNXGLG.js → chunk-EQAFDIPE.js} +9 -7
  25. package/{chunk-LB37KTJH.js → chunk-EXKSKYG3.js} +2 -2
  26. package/chunk-FB6DG3LR.js +35 -0
  27. package/chunk-GH2DEOGO.js +67 -0
  28. package/{chunk-J7RMFN54.js → chunk-GKDMCY2S.js} +1 -1
  29. package/chunk-GTFUAA6H.js +42 -0
  30. package/{chunk-SAYNV7B3.js → chunk-HI6QIG55.js} +4 -4
  31. package/{chunk-SDOTDMYG.js → chunk-HZV7EXGU.js} +2 -2
  32. package/{chunk-RHQHDYTE.js → chunk-IKJIR6VL.js} +2 -2
  33. package/{chunk-ISYKZCPJ.js → chunk-INJWE2LD.js} +2 -2
  34. package/chunk-J5UQPROI.js +56 -0
  35. package/{chunk-5725MFGQ.js → chunk-JCR5TWTF.js} +4 -4
  36. package/chunk-JKOBDLP3.js +25 -0
  37. package/{chunk-FAJ3OVL4.js → chunk-JR3VVDV6.js} +1 -1
  38. package/{chunk-CVNRZ2YV.js → chunk-JYGCZWET.js} +1 -1
  39. package/{chunk-SPGUZMCC.js → chunk-K5G5OEV5.js} +2 -2
  40. package/{chunk-GMETYACH.js → chunk-KDU7AT2T.js} +2 -2
  41. package/chunk-KITXKIYW.js +104 -0
  42. package/{chunk-JYOZUQNU.js → chunk-KQNA22D3.js} +2 -2
  43. package/{chunk-OURZQM27.js → chunk-L5PPN42A.js} +11 -4
  44. package/{chunk-HK6WINL6.js → chunk-LAOE6Y57.js} +3 -3
  45. package/{chunk-ZBZ3ZQRB.js → chunk-LI5VYDLN.js} +4 -4
  46. package/{chunk-M2HEVFQ3.js → chunk-LKSFTNPF.js} +1 -1
  47. package/chunk-LLW3X4ZJ.js +39 -0
  48. package/{chunk-5KTBSMQU.js → chunk-LWRB4DED.js} +1 -1
  49. package/{chunk-LB7Z6BSK.js → chunk-M7RILZVW.js} +6 -6
  50. package/{chunk-674SRBZK.js → chunk-MOGWOUCN.js} +3 -3
  51. package/chunk-NCIRJ5V2.js +108 -0
  52. package/{chunk-SSOFFQ5T.js → chunk-NTSU44FY.js} +8 -1
  53. package/{chunk-BR2B4OIT.js → chunk-P36KBUYD.js} +3 -3
  54. package/{chunk-3DHJXU45.js → chunk-P6RHT2VM.js} +1 -1
  55. package/{chunk-WLQD5BN2.js → chunk-PD2KD5OR.js} +1 -1
  56. package/{chunk-OVKPPXK5.js → chunk-PP46SY7M.js} +2 -2
  57. package/{chunk-FB5HTCO2.js → chunk-PTK4QAOQ.js} +4 -4
  58. package/{chunk-IKO3GQFE.js → chunk-Q7KVC5B4.js} +3 -3
  59. package/{chunk-UUCVRIVP.js → chunk-R3DTMBDT.js} +3 -3
  60. package/{chunk-UGIVCXGN.js → chunk-R4KPFBMK.js} +1 -1
  61. package/{chunk-XH56JGYC.js → chunk-R5TQ3HNB.js} +1 -1
  62. package/chunk-RFSPJECL.js +84 -0
  63. package/chunk-RPL6FRVX.js +88 -0
  64. package/{chunk-SZJIVBOD.js → chunk-STYOBAC7.js} +3 -3
  65. package/{chunk-W4RDTP6W.js → chunk-SVUWR3HD.js} +3 -3
  66. package/{chunk-7Q76HLRQ.js → chunk-T7P3OEBP.js} +4 -4
  67. package/{chunk-TT2N5752.js → chunk-TB3ZRV3Y.js} +2 -2
  68. package/{chunk-BN7FDKCJ.js → chunk-TOY6YPTG.js} +2 -2
  69. package/{chunk-PHNR6ZQ7.js → chunk-U6X6ODDJ.js} +2 -2
  70. package/{chunk-6VKV36OK.js → chunk-UAJ6M34K.js} +4 -4
  71. package/{chunk-PD6YPFYN.js → chunk-W2EH6RY5.js} +1 -1
  72. package/{chunk-X2GNMNZQ.js → chunk-W2QQQWNE.js} +2 -2
  73. package/{chunk-JCXI7VQL.js → chunk-WALANB3V.js} +2 -2
  74. package/{chunk-NL574STL.js → chunk-WCUR44O6.js} +2 -2
  75. package/{chunk-PUWSL5XW.js → chunk-WJYJMX5S.js} +1 -1
  76. package/{chunk-AIMQNLPY.js → chunk-WZSLDYUU.js} +6 -29
  77. package/chunk-XU6JJDMZ.js +117 -0
  78. package/{chunk-57QEOCDZ.js → chunk-XWPH7C2W.js} +1 -1
  79. package/{chunk-73Z7NMQQ.js → chunk-YXWXSRXG.js} +5 -5
  80. package/{chunk-CGOH5IYX.js → chunk-YY236ZSJ.js} +3 -3
  81. package/components/accordion.js +2 -2
  82. package/components/action-button.d.ts +37 -0
  83. package/components/action-button.js +5 -0
  84. package/components/agent-loading.js +2 -2
  85. package/components/agent-picker.js +5 -4
  86. package/components/agent-suggestion.js +5 -5
  87. package/components/alert.d.ts +37 -0
  88. package/components/alert.js +5 -0
  89. package/components/announcement-bar.js +6 -5
  90. package/components/attachment.js +5 -4
  91. package/components/avatar.js +4 -4
  92. package/components/badge.js +2 -2
  93. package/components/banner.d.ts +3 -2
  94. package/components/banner.js +5 -3
  95. package/components/bar-chart.js +9 -9
  96. package/components/breadcrumb.js +5 -5
  97. package/components/button-group.d.ts +26 -0
  98. package/components/button-group.js +5 -0
  99. package/components/button.d.ts +13 -1
  100. package/components/button.js +4 -2
  101. package/components/card.js +5 -3
  102. package/components/channel-chart.js +9 -9
  103. package/components/chart.js +8 -8
  104. package/components/checkbox.js +2 -2
  105. package/components/chip.js +2 -2
  106. package/components/citations.js +4 -4
  107. package/components/code-block.js +5 -3
  108. package/components/combobox.js +10 -9
  109. package/components/command-menu.js +5 -5
  110. package/components/context-menu.js +5 -5
  111. package/components/cookie-consent.js +5 -3
  112. package/components/date-picker.js +9 -8
  113. package/components/decision-card.js +6 -5
  114. package/components/dialog.d.ts +2 -7
  115. package/components/dialog.js +6 -4
  116. package/components/donut-chart.js +9 -9
  117. package/components/dot.js +2 -2
  118. package/components/dropdown.js +4 -4
  119. package/components/empty-state.js +2 -2
  120. package/components/field-group.d.ts +27 -0
  121. package/components/field-group.js +3 -0
  122. package/components/file-upload.js +7 -6
  123. package/components/form-field.d.ts +38 -1
  124. package/components/form-field.js +2 -2
  125. package/components/form.d.ts +47 -0
  126. package/components/form.js +3 -0
  127. package/components/hover-card.js +2 -2
  128. package/components/input-group.d.ts +21 -0
  129. package/components/input-group.js +6 -0
  130. package/components/input-otp.js +7 -7
  131. package/components/input.d.ts +5 -1
  132. package/components/input.js +3 -3
  133. package/components/kbd.js +2 -2
  134. package/components/labels.d.ts +7 -0
  135. package/components/labels.js +1 -1
  136. package/components/line-chart.js +10 -10
  137. package/components/link.d.ts +20 -0
  138. package/components/link.js +3 -0
  139. package/components/list.d.ts +46 -0
  140. package/components/list.js +2 -0
  141. package/components/message-actions.js +5 -4
  142. package/components/message.js +8 -7
  143. package/components/number-input.js +7 -7
  144. package/components/pagination.js +5 -3
  145. package/components/password-input.d.ts +16 -0
  146. package/components/password-input.js +7 -0
  147. package/components/popover.js +3 -3
  148. package/components/progress.js +2 -2
  149. package/components/prompt-bar.js +6 -5
  150. package/components/radio.js +2 -2
  151. package/components/search-bar.js +3 -3
  152. package/components/segmented-control.js +2 -2
  153. package/components/select.d.ts +2 -1
  154. package/components/select.js +6 -6
  155. package/components/selectable-card.d.ts +37 -0
  156. package/components/selectable-card.js +2 -0
  157. package/components/selectable-checkbox.d.ts +14 -0
  158. package/components/selectable-checkbox.js +4 -0
  159. package/components/selectable-radio.d.ts +16 -0
  160. package/components/selectable-radio.js +3 -0
  161. package/components/separator.d.ts +18 -0
  162. package/components/separator.js +2 -0
  163. package/components/sheet.js +7 -5
  164. package/components/sidebar.js +2 -2
  165. package/components/skeleton.js +2 -2
  166. package/components/slider.js +7 -7
  167. package/components/spinner.d.ts +18 -0
  168. package/components/spinner.js +3 -0
  169. package/components/split-button.d.ts +24 -0
  170. package/components/split-button.js +8 -0
  171. package/components/streaming-text.js +2 -2
  172. package/components/switch.js +2 -2
  173. package/components/table.js +4 -4
  174. package/components/tabs.js +2 -2
  175. package/components/textarea.js +3 -3
  176. package/components/thinking.js +3 -3
  177. package/components/toast.js +5 -4
  178. package/components/toggle.js +2 -2
  179. package/components/tooltip.js +3 -3
  180. package/index.d.ts +16 -2
  181. package/index.js +80 -65
  182. package/lib/utils.js +1 -1
  183. package/package.json +1 -1
  184. package/styles.css +1 -1
  185. package/theme/create-theme.d.ts +2 -1
  186. package/theme/index.js +1 -1
  187. package/chunk-VUOAPWTF.js +0 -86
@@ -0,0 +1,108 @@
1
+ import { FormContext, FieldDescription, useFormContext } from './chunk-KITXKIYW.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
+ import * as React from 'react';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+
6
+ function formValues(form) {
7
+ const values = {};
8
+ for (const [key, value] of new FormData(form)) {
9
+ const prev = values[key];
10
+ values[key] = prev === void 0 ? value : Array.isArray(prev) ? [...prev, value] : [prev, value];
11
+ }
12
+ return values;
13
+ }
14
+ var hasErrors = (errors) => !!errors && Object.values(errors).some(Boolean);
15
+ function Form({
16
+ layout = "vertical",
17
+ errors,
18
+ disabled,
19
+ onSubmit,
20
+ onSubmitValues,
21
+ noValidate = true,
22
+ className,
23
+ children,
24
+ ref,
25
+ ...props
26
+ }) {
27
+ const formRef = React.useRef(null);
28
+ const [submits, setSubmits] = React.useState(0);
29
+ const context = React.useMemo(() => ({ layout, disabled, errors }), [layout, disabled, errors]);
30
+ const hadErrors = React.useRef(false);
31
+ const lastSubmit = React.useRef(0);
32
+ React.useEffect(() => {
33
+ const now = hasErrors(errors);
34
+ const submitted = submits !== lastSubmit.current;
35
+ if (now && (submitted || !hadErrors.current)) {
36
+ const first = formRef.current?.querySelector('[aria-invalid="true"]');
37
+ if (submits > 0) first?.focus();
38
+ }
39
+ hadErrors.current = now;
40
+ lastSubmit.current = submits;
41
+ }, [errors, submits]);
42
+ const setRefs = (node) => {
43
+ formRef.current = node;
44
+ if (typeof ref === "function") ref(node);
45
+ else if (ref) ref.current = node;
46
+ };
47
+ return /* @__PURE__ */ jsx(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
48
+ "form",
49
+ {
50
+ ref: setRefs,
51
+ "data-slot": "form",
52
+ "data-layout": layout,
53
+ noValidate,
54
+ onSubmit: (event) => {
55
+ setSubmits((n) => n + 1);
56
+ if (onSubmitValues) {
57
+ event.preventDefault();
58
+ onSubmitValues(formValues(event.currentTarget), event);
59
+ }
60
+ onSubmit?.(event);
61
+ },
62
+ className: cn("sa:w-full", className),
63
+ ...props,
64
+ children: /* @__PURE__ */ jsx("fieldset", { disabled, className: "sa:m-0 sa:grid sa:min-w-0 sa:gap-6 sa:border-0 sa:p-0", children })
65
+ }
66
+ ) });
67
+ }
68
+ function FormSection({ title, description, className, children, ...props }) {
69
+ const id = React.useId();
70
+ return /* @__PURE__ */ jsxs(
71
+ "section",
72
+ {
73
+ "aria-labelledby": `${id}-title`,
74
+ "data-slot": "form-section",
75
+ className: cn(
76
+ "sa:grid sa:gap-5 sa:not-first:border-t sa:not-first:border-border-default sa:not-first:pt-6",
77
+ className
78
+ ),
79
+ ...props,
80
+ children: [
81
+ /* @__PURE__ */ jsxs("header", { className: "sa:grid sa:gap-1", children: [
82
+ /* @__PURE__ */ jsx("h3", { id: `${id}-title`, className: "sa:text-base sa:font-medium sa:text-text-default", children: title }),
83
+ description && /* @__PURE__ */ jsx(FieldDescription, { children: description })
84
+ ] }),
85
+ /* @__PURE__ */ jsx("div", { className: "sa:grid sa:gap-5", children })
86
+ ]
87
+ }
88
+ );
89
+ }
90
+ function FormActions({ align = "end", className, ...props }) {
91
+ const form = useFormContext();
92
+ return /* @__PURE__ */ jsx(
93
+ "div",
94
+ {
95
+ "data-slot": "form-actions",
96
+ className: cn(
97
+ "sa:flex sa:flex-wrap sa:items-center sa:gap-2",
98
+ align === "end" && "sa:justify-end",
99
+ align === "between" && "sa:justify-end sa:[&>:first-child]:mr-auto",
100
+ align === "start" && form?.layout === "horizontal" && "sa:pl-46",
101
+ className
102
+ ),
103
+ ...props
104
+ }
105
+ );
106
+ }
107
+
108
+ export { Form, FormActions, FormSection, formValues };
@@ -59,7 +59,14 @@ var defaultLabels = {
59
59
  commandPlaceholder: "Type a command or search\u2026",
60
60
  navigate: "Navigate",
61
61
  openItem: "Open",
62
- source: "Source"
62
+ source: "Source",
63
+ moreOptions: "More options",
64
+ loading: "Loading",
65
+ submit: "Submit",
66
+ done: "Done",
67
+ opensInNewTab: "(opens in a new tab)",
68
+ showPassword: "Show password",
69
+ hidePassword: "Hide password"
63
70
  };
64
71
  var LabelsContext = React.createContext(defaultLabels);
65
72
  function SatinLabels({ labels, children }) {
@@ -1,6 +1,6 @@
1
- import { KbdGroup } from './chunk-57QEOCDZ.js';
2
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
3
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { KbdGroup } from './chunk-XWPH7C2W.js';
2
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
3
+ import { cn } from './chunk-EHEXE2UV.js';
4
4
  import 'react';
5
5
  import { DropdownMenu as DropdownMenu$1 } from 'radix-ui';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { useSlidingIndicator } from './chunk-XETMIETJ.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
3
  import * as React from 'react';
4
4
  import { Tabs as Tabs$1 } from 'radix-ui';
5
5
  import { cva } from 'class-variance-authority';
@@ -1,4 +1,4 @@
1
- import { ChartCard, defaultFormat, ChartLegendPill } from './chunk-ZBZ3ZQRB.js';
1
+ import { ChartCard, defaultFormat, ChartLegendPill } from './chunk-LI5VYDLN.js';
2
2
  import * as React from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
@@ -1,5 +1,5 @@
1
- import { useFieldChrome, FieldChrome } from './chunk-UCCNXGLG.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { useFieldChrome, FieldChrome } from './chunk-EQAFDIPE.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
3
  import * as React from 'react';
4
4
  import { CheckCircle } from 'iconoir-react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
- import { Input } from './chunk-OURZQM27.js';
2
- import { TooltipBubble } from './chunk-GMETYACH.js';
3
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
4
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { Input } from './chunk-L5PPN42A.js';
2
+ import { TooltipBubble } from './chunk-KDU7AT2T.js';
3
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
4
+ import { cn } from './chunk-EHEXE2UV.js';
5
5
  import * as React from 'react';
6
6
  import { Slider as Slider$1 } from 'radix-ui';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { DropdownMenu, DropdownMenuItem } from './chunk-BR2B4OIT.js';
2
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
3
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { DropdownMenu, DropdownMenuItem } from './chunk-P36KBUYD.js';
2
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
3
+ import { cn } from './chunk-EHEXE2UV.js';
4
4
  import * as React from 'react';
5
5
  import { MoreHoriz, NavArrowRight } from 'iconoir-react';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { Button } from './chunk-T6L32XXH.js';
2
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
3
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { Button } from './chunk-6DWLTGRQ.js';
2
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
3
+ import { cn } from './chunk-EHEXE2UV.js';
4
4
  import 'react';
5
5
  import { HoverCard } from 'radix-ui';
6
6
  import { Xmark, ArrowUpRight, NavArrowUp, NavArrowDown } from 'iconoir-react';
@@ -1,4 +1,4 @@
1
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { cn } from './chunk-EHEXE2UV.js';
2
2
  import * as React from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
@@ -1,4 +1,4 @@
1
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { cn } from './chunk-EHEXE2UV.js';
2
2
  import 'react';
3
3
  import { Toggle as Toggle$1 } from 'radix-ui';
4
4
  import { cva } from 'class-variance-authority';
@@ -0,0 +1,84 @@
1
+ import { useFormContext, RequiredMark, FieldDescription, FormContext, FieldError } from './chunk-KITXKIYW.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
+ import * as React from 'react';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var columnClass = { 1: "", 2: "sa:sm:grid-cols-2", 3: "sa:sm:grid-cols-3" };
7
+ function FieldGroup({
8
+ legend,
9
+ description,
10
+ error: ownError,
11
+ name,
12
+ required,
13
+ variant = "fields",
14
+ columns = 1,
15
+ layout: ownLayout,
16
+ disabled: ownDisabled,
17
+ className,
18
+ children,
19
+ ...props
20
+ }) {
21
+ const form = useFormContext();
22
+ const id = React.useId();
23
+ const error = ownError ?? (name ? form?.errors?.[name] : void 0);
24
+ const layout = ownLayout ?? form?.layout ?? "vertical";
25
+ const disabled = ownDisabled ?? form?.disabled;
26
+ const invalid = Boolean(error);
27
+ const horizontal = layout === "horizontal";
28
+ const choices = variant === "choices";
29
+ const descriptionId = description ? `${id}-description` : void 0;
30
+ const errorId = invalid ? `${id}-error` : void 0;
31
+ const inner = React.useMemo(
32
+ () => ({ ...form, layout: "vertical", disabled }),
33
+ [form, disabled]
34
+ );
35
+ return /* @__PURE__ */ jsxs(
36
+ "fieldset",
37
+ {
38
+ "data-slot": "field-group",
39
+ "data-variant": variant,
40
+ "data-layout": layout,
41
+ "data-invalid": invalid || void 0,
42
+ disabled,
43
+ "aria-describedby": [descriptionId, errorId].filter(Boolean).join(" ") || void 0,
44
+ className: cn("sa:m-0 sa:min-w-0 sa:border-0 sa:p-0", className),
45
+ ...props,
46
+ children: [
47
+ /* @__PURE__ */ jsxs(
48
+ "legend",
49
+ {
50
+ className: cn(
51
+ "sa:float-left sa:p-0 sa:text-text-default",
52
+ horizontal ? "sa:w-40" : "sa:w-full",
53
+ choices ? "sa:text-sm sa:leading-[18px] sa:font-medium" : "sa:text-base sa:font-medium",
54
+ disabled && "sa:opacity-50"
55
+ ),
56
+ children: [
57
+ /* @__PURE__ */ jsxs("span", { className: "sa:flex sa:items-start sa:gap-0.5", children: [
58
+ legend,
59
+ required && /* @__PURE__ */ jsx(RequiredMark, {})
60
+ ] }),
61
+ description && /* @__PURE__ */ jsx(FieldDescription, { id: descriptionId, className: "sa:mt-1 sa:font-normal", children: description })
62
+ ]
63
+ }
64
+ ),
65
+ /* @__PURE__ */ jsxs(
66
+ "div",
67
+ {
68
+ className: cn(
69
+ "sa:grid sa:min-w-0",
70
+ horizontal ? "sa:ml-46" : cn("sa:clear-both", choices ? "sa:pt-2" : "sa:pt-4"),
71
+ choices ? "sa:gap-3" : cn("sa:gap-5", columnClass[columns])
72
+ ),
73
+ children: [
74
+ /* @__PURE__ */ jsx(FormContext.Provider, { value: inner, children }),
75
+ invalid && /* @__PURE__ */ jsx(FieldError, { id: errorId, className: cn(columns > 1 && "sa:sm:col-span-full"), children: error })
76
+ ]
77
+ }
78
+ )
79
+ ]
80
+ }
81
+ );
82
+ }
83
+
84
+ export { FieldGroup };
@@ -0,0 +1,88 @@
1
+ import { Button } from './chunk-6DWLTGRQ.js';
2
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
3
+ import { cn } from './chunk-EHEXE2UV.js';
4
+ import 'react';
5
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
+
7
+ var soft = {
8
+ neutral: "sa:bg-status-neutral-bg",
9
+ info: "sa:bg-status-sky-bg",
10
+ success: "sa:bg-status-green-bg",
11
+ warning: "sa:bg-status-amber-bg",
12
+ error: "sa:bg-status-red-bg"
13
+ };
14
+ var iconColor = {
15
+ neutral: "sa:text-status-neutral-fg",
16
+ info: "sa:text-status-sky-fg",
17
+ success: "sa:text-status-green-fg",
18
+ warning: "sa:text-status-amber-fg",
19
+ error: "sa:text-status-red-fg"
20
+ };
21
+ function Alert({
22
+ intent = "neutral",
23
+ variant = "soft",
24
+ title,
25
+ description,
26
+ icon = true,
27
+ action,
28
+ onDismiss,
29
+ className,
30
+ children,
31
+ ...props
32
+ }) {
33
+ const labels = useSatinLabels();
34
+ const body = description ?? children;
35
+ const actionBelow = action && body;
36
+ return /* @__PURE__ */ jsxs(
37
+ "div",
38
+ {
39
+ role: intent === "error" || intent === "warning" ? "alert" : "status",
40
+ "data-slot": "alert",
41
+ "data-intent": intent,
42
+ "data-variant": variant,
43
+ className: cn(
44
+ "sa:flex sa:w-full sa:items-start sa:gap-2.5 sa:rounded-xl sa:px-4 sa:py-3",
45
+ variant === "soft" ? soft[intent] : "sa:border sa:border-border-default sa:bg-bg-card sa:[box-shadow:0_1px_2px_0_var(--effect-shadow-xs)]",
46
+ className
47
+ ),
48
+ ...props,
49
+ children: [
50
+ icon !== false && // 16px on the middle of the title's 20px line.
51
+ /* @__PURE__ */ jsx("span", { className: cn("sa:mt-0.5 sa:grid sa:shrink-0 sa:place-items-center sa:[&_svg]:size-4", iconColor[intent]), children: icon === true ? /* @__PURE__ */ jsx(StatusIcon, { intent }) : icon }),
52
+ /* @__PURE__ */ jsxs("div", { className: "sa:flex sa:min-w-0 sa:flex-1 sa:flex-col", children: [
53
+ title && /* @__PURE__ */ jsx("p", { className: "sa:text-base sa:leading-5 sa:font-medium sa:text-text-default", children: title }),
54
+ body && /* @__PURE__ */ jsx("div", { className: "sa:text-body sa:text-text-muted", children: body }),
55
+ actionBelow && /* @__PURE__ */ jsx("div", { className: "sa:mt-2.5 sa:flex sa:flex-wrap sa:items-center sa:gap-2", children: action })
56
+ ] }),
57
+ action && !actionBelow && /* @__PURE__ */ jsx("div", { className: "sa:-my-1 sa:flex sa:shrink-0 sa:items-center sa:gap-2", children: action }),
58
+ onDismiss && /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "xs", iconOnly: true, "aria-label": labels.dismiss, onClick: onDismiss, className: "sa:-my-0.5 sa:-mr-1.5", children: /* @__PURE__ */ jsx(CloseIcon, {}) })
59
+ ]
60
+ }
61
+ );
62
+ }
63
+ function StatusIcon({ intent }) {
64
+ return /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, className: "sa:shrink-0", children: /* @__PURE__ */ jsx("g", { stroke: "currentColor", style: { strokeWidth: 1.25 }, strokeLinecap: "round", strokeLinejoin: "round", children: intent === "success" ? /* @__PURE__ */ jsx("path", { d: "M3.33333 8.66667L6 11.3333L12.6667 4.66667" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
65
+ intent === "info" ? /* @__PURE__ */ jsxs(Fragment, { children: [
66
+ /* @__PURE__ */ jsx("path", { d: "M8 7.70494V10.6557" }),
67
+ /* @__PURE__ */ jsx("path", { d: "M8 5.35022L8.0059 5.34366" })
68
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
69
+ /* @__PURE__ */ jsx("path", { d: "M8 5.34428V8.29506" }),
70
+ /* @__PURE__ */ jsx("path", { d: "M8 10.6563L8.0059 10.6498" })
71
+ ] }),
72
+ /* @__PURE__ */ jsx("path", { d: "M8 13.9015C11.2593 13.9015 13.9015 11.2593 13.9015 8C13.9015 4.74066 11.2593 2.09845 8 2.09845C4.74066 2.09845 2.09845 4.74066 2.09845 8C2.09845 11.2593 4.74066 13.9015 8 13.9015Z" })
73
+ ] }) }) });
74
+ }
75
+ function CloseIcon() {
76
+ return /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx(
77
+ "path",
78
+ {
79
+ d: "M4.50551 11.4951L8.0006 8M8.0006 8L11.4957 4.50491M8.0006 8L4.50551 4.50491M8.0006 8L11.4957 11.4951",
80
+ stroke: "currentColor",
81
+ strokeWidth: "1.25",
82
+ strokeLinecap: "round",
83
+ strokeLinejoin: "round"
84
+ }
85
+ ) });
86
+ }
87
+
88
+ export { Alert, CloseIcon, StatusIcon };
@@ -1,6 +1,6 @@
1
- import { Button } from './chunk-T6L32XXH.js';
2
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
3
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { Button } from './chunk-6DWLTGRQ.js';
2
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
3
+ import { cn } from './chunk-EHEXE2UV.js';
4
4
  import * as React from 'react';
5
5
  import { Clock, DoubleCheck, ThumbsUp, ThumbsDown, Copy, Link } from 'iconoir-react';
6
6
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { Checkbox } from './chunk-X2GNMNZQ.js';
2
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
3
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { Checkbox } from './chunk-W2QQQWNE.js';
2
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
3
+ import { cn } from './chunk-EHEXE2UV.js';
4
4
  import * as React from 'react';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
6
 
@@ -1,7 +1,7 @@
1
- import { Progress } from './chunk-M2HEVFQ3.js';
2
- import { Badge } from './chunk-XUOSJMEJ.js';
3
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
4
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { Progress } from './chunk-LKSFTNPF.js';
2
+ import { Badge } from './chunk-7NV53EL5.js';
3
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
4
+ import { cn } from './chunk-EHEXE2UV.js';
5
5
  import * as React from 'react';
6
6
  import { ArrowRight } from 'iconoir-react';
7
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import { useSlidingIndicator, SLIDE_MS } from './chunk-XETMIETJ.js';
2
- import { Button } from './chunk-T6L32XXH.js';
3
- import { cn } from './chunk-O46O6LFQ.js';
2
+ import { Button } from './chunk-6DWLTGRQ.js';
3
+ import { cn } from './chunk-EHEXE2UV.js';
4
4
  import * as React from 'react';
5
5
  import { NavArrowLeft, NavArrowRight } from 'iconoir-react';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { Tooltip, TooltipBubble } from './chunk-GMETYACH.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
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';
@@ -1,5 +1,5 @@
1
- import { Button } from './chunk-T6L32XXH.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
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';
@@ -1,7 +1,7 @@
1
- import { useFieldChrome, FieldChrome, Select } from './chunk-UCCNXGLG.js';
2
- import { Button } from './chunk-T6L32XXH.js';
3
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
4
- import { cn } from './chunk-O46O6LFQ.js';
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';
5
5
  import * as React from 'react';
6
6
  import { Popover } from 'radix-ui';
7
7
  import { Calendar as Calendar$1, NavArrowDown, NavArrowLeft, NavArrowRight } from 'iconoir-react';
@@ -1,4 +1,4 @@
1
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { cn } from './chunk-EHEXE2UV.js';
2
2
  import 'react';
3
3
  import { HoverCard as HoverCard$1 } from 'radix-ui';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { cn } from './chunk-O46O6LFQ.js';
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';
@@ -40,7 +40,7 @@ function Checkbox({ className, label, description, placement = "left", id, ...pr
40
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: "sa:grid sa:gap-0.5 sa:text-base", children: [
43
+ /* @__PURE__ */ jsxs("div", { className: "sa:grid sa:gap-0.5 sa:text-base sa:peer-disabled:*:text-text-subtle", children: [
44
44
  label && /* @__PURE__ */ jsx("span", { id: labelId, className: "sa:block sa:leading-5 sa:font-medium sa:text-text-default", children: label }),
45
45
  description && /* @__PURE__ */ jsx("span", { id: descriptionId, className: "sa:block sa:leading-5 sa:text-text-muted", children: description })
46
46
  ] })
@@ -1,5 +1,5 @@
1
- import { ChartCard, ChartTooltip, defaultFormat, ChartLegendRow } from './chunk-ZBZ3ZQRB.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
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
 
@@ -1,5 +1,5 @@
1
- import { FlappySprite, TetrisStill } from './chunk-UGIVCXGN.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { FlappySprite, TetrisStill } from './chunk-R4KPFBMK.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
3
  import * as React from 'react';
4
4
  import { NavArrowDown, Check, EditPencil } from 'iconoir-react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { cn } from './chunk-EHEXE2UV.js';
2
2
  import * as React from 'react';
3
3
  import { Slot, Tooltip, Collapsible } from 'radix-ui';
4
4
  import { NavArrowRight } from 'iconoir-react';
@@ -1,22 +1,11 @@
1
- import { Button } from './chunk-T6L32XXH.js';
2
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
3
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { CloseIcon, StatusIcon } from './chunk-RPL6FRVX.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 'react';
5
6
  import { Dialog as Dialog$1 } from 'radix-ui';
6
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
8
 
8
- function CloseIcon() {
9
- return /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx(
10
- "path",
11
- {
12
- d: "M4.50551 11.4951L8.0006 8M8.0006 8L11.4957 4.50491M8.0006 8L4.50551 4.50491M8.0006 8L11.4957 11.4951",
13
- stroke: "currentColor",
14
- strokeWidth: "1.25",
15
- strokeLinecap: "round",
16
- strokeLinejoin: "round"
17
- }
18
- ) });
19
- }
20
9
  function Dialog({
21
10
  open,
22
11
  defaultOpen,
@@ -107,18 +96,6 @@ var alertTint = {
107
96
  warning: "sa:bg-status-amber-bg sa:text-status-amber-fg",
108
97
  error: "sa:bg-status-red-bg sa:text-status-red-fg"
109
98
  };
110
- function StatusIcon({ intent }) {
111
- return /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, className: "sa:shrink-0", children: /* @__PURE__ */ jsx("g", { stroke: "currentColor", style: { strokeWidth: 1.25 }, strokeLinecap: "round", strokeLinejoin: "round", children: intent === "success" ? /* @__PURE__ */ jsx("path", { d: "M3.33333 8.66667L6 11.3333L12.6667 4.66667" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
112
- intent === "info" ? /* @__PURE__ */ jsxs(Fragment, { children: [
113
- /* @__PURE__ */ jsx("path", { d: "M8 7.70494V10.6557" }),
114
- /* @__PURE__ */ jsx("path", { d: "M8 5.35022L8.0059 5.34366" })
115
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
116
- /* @__PURE__ */ jsx("path", { d: "M8 5.34428V8.29506" }),
117
- /* @__PURE__ */ jsx("path", { d: "M8 10.6563L8.0059 10.6498" })
118
- ] }),
119
- /* @__PURE__ */ jsx("path", { d: "M8 13.9015C11.2593 13.9015 13.9015 11.2593 13.9015 8C13.9015 4.74066 11.2593 2.09845 8 2.09845C4.74066 2.09845 2.09845 4.74066 2.09845 8C2.09845 11.2593 4.74066 13.9015 8 13.9015Z" })
120
- ] }) }) });
121
- }
122
99
  function DialogAlert({
123
100
  intent = "info",
124
101
  title,
@@ -151,4 +128,4 @@ function DialogAlert({
151
128
  );
152
129
  }
153
130
 
154
- export { CloseIcon, Dialog, DialogAlert, DialogClose, StatusIcon };
131
+ export { Dialog, DialogAlert, DialogClose };