@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,67 @@
1
+ import { ButtonDefaultsContext } from './chunk-6DWLTGRQ.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
+ import * as React from 'react';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ function ButtonGroup({
7
+ orientation = "horizontal",
8
+ attached = true,
9
+ variant,
10
+ size,
11
+ shape,
12
+ className,
13
+ children,
14
+ ...props
15
+ }) {
16
+ const defaults = React.useMemo(() => ({ variant, size, shape }), [variant, size, shape]);
17
+ const horizontal = orientation === "horizontal";
18
+ return /* @__PURE__ */ jsx(ButtonDefaultsContext.Provider, { value: defaults, children: /* @__PURE__ */ jsx(
19
+ "div",
20
+ {
21
+ role: "group",
22
+ "data-slot": "button-group",
23
+ "data-orientation": orientation,
24
+ "data-attached": attached || void 0,
25
+ className: cn(
26
+ "sa:inline-flex sa:w-fit",
27
+ horizontal ? "sa:flex-row sa:items-center" : "sa:flex-col sa:items-stretch",
28
+ attached ? [
29
+ "sa:[&>*]:relative sa:[&>*:hover]:z-10 sa:[&>*:focus-visible]:z-20 sa:[&>*:focus-visible]:[clip-path:none]!",
30
+ horizontal ? [
31
+ "sa:[&>*:not(:first-child)]:rounded-l-none sa:[&>*:not(:last-child)]:rounded-r-none sa:[&>*:not(:last-child)]:border-r-0",
32
+ "sa:[&>[data-variant=secondary]:not(:first-child)]:border-l-border-default",
33
+ "sa:[&>*:not(:last-child)]:[clip-path:inset(-12px_0_-12px_-12px)] sa:[&>*:not(:first-child)]:[clip-path:inset(-12px_-12px_-12px_0)]",
34
+ "sa:[&>*:not(:first-child):not(:last-child)]:[clip-path:inset(-12px_0)]"
35
+ ] : [
36
+ "sa:[&>*:not(:first-child)]:rounded-t-none sa:[&>*:not(:last-child)]:rounded-b-none sa:[&>*:not(:last-child)]:border-b-0",
37
+ "sa:[&>[data-variant=secondary]:not(:first-child)]:border-t-border-default",
38
+ "sa:[&>*:not(:last-child)]:[clip-path:inset(-12px_-12px_0_-12px)] sa:[&>*:not(:first-child)]:[clip-path:inset(0_-12px_-12px_-12px)]",
39
+ "sa:[&>*:not(:first-child):not(:last-child)]:[clip-path:inset(0_-12px)]"
40
+ ]
41
+ ] : size === "xs" ? "sa:gap-1" : "sa:gap-2",
42
+ className
43
+ ),
44
+ ...props,
45
+ children
46
+ }
47
+ ) });
48
+ }
49
+ function ButtonGroupSeparator({ className, ...props }) {
50
+ return /* @__PURE__ */ jsx(
51
+ "div",
52
+ {
53
+ role: "separator",
54
+ "aria-orientation": "vertical",
55
+ "data-slot": "button-group-separator",
56
+ className: cn(
57
+ "sa:shrink-0 sa:self-center sa:bg-border-default",
58
+ // Vertical in a row, horizontal in a column.
59
+ "sa:h-4 sa:w-px sa:[[data-orientation=vertical]>&]:h-px sa:[[data-orientation=vertical]>&]:w-full",
60
+ className
61
+ ),
62
+ ...props
63
+ }
64
+ );
65
+ }
66
+
67
+ export { ButtonGroup, ButtonGroupSeparator };
@@ -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 { jsx } from 'react/jsx-runtime';
4
4
 
@@ -0,0 +1,42 @@
1
+ import { Input } from './chunk-L5PPN42A.js';
2
+ import { Button } from './chunk-6DWLTGRQ.js';
3
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
4
+ import * as React from 'react';
5
+ import { EyeClosed, Eye } from 'iconoir-react';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ function PasswordInput({ visible, onVisibleChange, autoComplete = "current-password", disabled, ...props }) {
9
+ const labels = useSatinLabels();
10
+ const [own, setOwn] = React.useState(false);
11
+ const shown = visible ?? own;
12
+ const toggle = () => {
13
+ if (visible === void 0) setOwn(!shown);
14
+ onVisibleChange?.(!shown);
15
+ };
16
+ return /* @__PURE__ */ jsx(
17
+ Input,
18
+ {
19
+ ...props,
20
+ disabled,
21
+ type: shown ? "text" : "password",
22
+ autoComplete,
23
+ trailingIcon: /* @__PURE__ */ jsx(
24
+ Button,
25
+ {
26
+ variant: "tertiary",
27
+ size: "xs",
28
+ iconOnly: true,
29
+ disabled,
30
+ "aria-label": shown ? labels.hidePassword : labels.showPassword,
31
+ "aria-pressed": shown,
32
+ onMouseDown: (e) => e.preventDefault(),
33
+ onClick: toggle,
34
+ className: "sa:-m-1",
35
+ children: shown ? /* @__PURE__ */ jsx(EyeClosed, {}) : /* @__PURE__ */ jsx(Eye, {})
36
+ }
37
+ )
38
+ }
39
+ );
40
+ }
41
+
42
+ export { PasswordInput };
@@ -1,8 +1,8 @@
1
1
  import { SLIDE_MS } from './chunk-XETMIETJ.js';
2
- import { Checkbox } from './chunk-X2GNMNZQ.js';
3
- import { Button } from './chunk-T6L32XXH.js';
4
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
5
- import { cn } from './chunk-O46O6LFQ.js';
2
+ import { Checkbox } from './chunk-W2QQQWNE.js';
3
+ import { Button } from './chunk-6DWLTGRQ.js';
4
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
5
+ import { cn } from './chunk-EHEXE2UV.js';
6
6
  import * as React from 'react';
7
7
  import { RadioGroup } from 'radix-ui';
8
8
  import { Check, NavArrowLeft, NavArrowRight, EditPencil } from 'iconoir-react';
@@ -1,6 +1,6 @@
1
1
  import { bannerMesh } from './chunk-YYFAZQ25.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 'react';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { Xmark } from 'iconoir-react';
@@ -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 { Check, Copy } from 'iconoir-react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { ChartCard, defaultFormat, ChartTooltip, ChartLegendRow } from './chunk-ZBZ3ZQRB.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { ChartCard, defaultFormat, ChartTooltip, ChartLegendRow } from './chunk-LI5VYDLN.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
3
  import * as React from 'react';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
5
 
@@ -0,0 +1,56 @@
1
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
+ import 'react';
4
+ import { Slot } from 'radix-ui';
5
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
+
7
+ var variantClass = {
8
+ default: "sa:text-text-default sa:decoration-border-strong sa:hover:decoration-current",
9
+ brand: "sa:text-status-brand-fg sa:decoration-status-brand-fg/40 sa:hover:decoration-current",
10
+ muted: "sa:text-text-muted sa:decoration-current sa:hover:text-text-default"
11
+ };
12
+ function Link({
13
+ variant = "default",
14
+ underline,
15
+ external,
16
+ asChild = false,
17
+ target,
18
+ rel,
19
+ className,
20
+ children,
21
+ ...props
22
+ }) {
23
+ const labels = useSatinLabels();
24
+ const line = underline ?? (variant === "muted" ? "hover" : "always");
25
+ const isExternal = external ?? target === "_blank";
26
+ const Comp = asChild ? Slot.Root : "a";
27
+ return /* @__PURE__ */ jsx(
28
+ Comp,
29
+ {
30
+ "data-slot": "link",
31
+ "data-variant": variant,
32
+ target: target ?? (isExternal && !asChild ? "_blank" : void 0),
33
+ rel: rel ?? (isExternal ? "noopener noreferrer" : void 0),
34
+ className: cn(
35
+ "sa:rounded-xs sa:font-medium sa:underline-offset-[3px] sa:outline-none sa:[text-decoration-thickness:1px]",
36
+ "sa:transition-[color,text-decoration-color,box-shadow] sa:duration-(--sa-duration-fast) sa:ease-(--sa-ease-out)",
37
+ "sa:focus-visible:[box-shadow:0_0_0_2px_var(--action-focus-ring)]",
38
+ line === "always" && "sa:underline",
39
+ line === "hover" && "sa:no-underline sa:hover:underline",
40
+ line === "none" && "sa:no-underline",
41
+ variantClass[variant],
42
+ className
43
+ ),
44
+ ...props,
45
+ children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
46
+ children,
47
+ isExternal && /* @__PURE__ */ jsxs(Fragment, { children: [
48
+ /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": true, className: "sa:ml-0.5 sa:inline-block sa:align-[-1px]", children: /* @__PURE__ */ jsx("path", { d: "M4 3H9V8M9 3L3 9", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", style: { strokeWidth: 1.1 } }) }),
49
+ /* @__PURE__ */ jsx("span", { className: "sa:sr-only", children: ` ${labels.opensInNewTab}` })
50
+ ] })
51
+ ] })
52
+ }
53
+ );
54
+ }
55
+
56
+ export { Link };
@@ -1,7 +1,7 @@
1
- import { KbdHint, KbdArrowUp, KbdArrowDown, KbdReturn } from './chunk-57QEOCDZ.js';
2
- import { Button } from './chunk-T6L32XXH.js';
3
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
4
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { KbdHint, KbdArrowUp, KbdArrowDown, KbdReturn } from './chunk-XWPH7C2W.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, DropdownMenu } from 'radix-ui';
7
7
  import { Attachment, Globe, Plus, ArrowUp, Search, NavArrowDown, Check, Microphone, Xmark, Page } from 'iconoir-react';
@@ -0,0 +1,25 @@
1
+ import { FieldSizeContext } from './chunk-KITXKIYW.js';
2
+ import { ButtonDefaultsContext } from './chunk-6DWLTGRQ.js';
3
+ import { cn } from './chunk-EHEXE2UV.js';
4
+ import * as React from 'react';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ var buttonSize = { sm: "md", md: "lg", lg: "xl" };
8
+ function InputGroup({ size = "md", className, ...props }) {
9
+ const buttons = React.useMemo(() => ({ size: buttonSize[size], variant: "secondary" }), [size]);
10
+ return /* @__PURE__ */ jsx(FieldSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(ButtonDefaultsContext.Provider, { value: buttons, children: /* @__PURE__ */ jsx(
11
+ "div",
12
+ {
13
+ role: "group",
14
+ "data-slot": "input-group",
15
+ "data-size": size,
16
+ className: cn("sa:flex sa:w-full sa:items-stretch", className),
17
+ ...props
18
+ }
19
+ ) }) });
20
+ }
21
+ function InputGroupAddon({ className, ...props }) {
22
+ return /* @__PURE__ */ jsx("div", { "data-slot": "input-group-addon", className: cn("satin-input-addon", className), ...props });
23
+ }
24
+
25
+ export { InputGroup, InputGroupAddon };
@@ -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 { cva } from 'class-variance-authority';
4
4
  import { jsxs, jsx } 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 { ToggleGroup } from 'radix-ui';
5
5
  import { cva } from 'class-variance-authority';
@@ -1,5 +1,5 @@
1
- import { Kbd } from './chunk-57QEOCDZ.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { Kbd } from './chunk-XWPH7C2W.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
3
  import * as React from 'react';
4
4
  import { Search } from 'iconoir-react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { KbdGroup } from './chunk-57QEOCDZ.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { KbdGroup } from './chunk-XWPH7C2W.js';
2
+ import { cn } from './chunk-EHEXE2UV.js';
3
3
  import * as React from 'react';
4
4
  import { Tooltip as Tooltip$1 } from 'radix-ui';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -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-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 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
@@ -1,5 +1,5 @@
1
- import { useFormField } from './chunk-VUOAPWTF.js';
2
- import { cn } from './chunk-O46O6LFQ.js';
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 = "md",
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;
@@ -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
  ]
@@ -1,7 +1,7 @@
1
1
  import { bannerMesh } from './chunk-YYFAZQ25.js';
2
- import { Button } from './chunk-T6L32XXH.js';
3
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
4
- import { cn } from './chunk-O46O6LFQ.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 'react';
6
6
  import { ArrowRight, Xmark } from 'iconoir-react';
7
7
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1,8 +1,8 @@
1
1
  import { Floating } from './chunk-ZHFIWDGF.js';
2
- import { Select } from './chunk-UCCNXGLG.js';
3
- import { Badge } from './chunk-XUOSJMEJ.js';
4
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
5
- import { cn } from './chunk-O46O6LFQ.js';
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
6
  import * as React from 'react';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
8
8
 
@@ -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 { jsxs, jsx } from 'react/jsx-runtime';
4
4
 
@@ -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-O46O6LFQ.js';
1
+ import { cn } from './chunk-EHEXE2UV.js';
2
2
  import * as React from 'react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -1,9 +1,9 @@
1
- import { Chip } from './chunk-Z7S2KQZS.js';
2
- import { useFieldChrome, FieldChrome, SelectChevron } from './chunk-UCCNXGLG.js';
3
- import { MenuItemContent, menuItemClass, menuSurfaceClass } from './chunk-BR2B4OIT.js';
4
- import { Button } from './chunk-T6L32XXH.js';
5
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
6
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { Chip } from './chunk-6JTSZAGO.js';
2
+ import { useFieldChrome, FieldChrome, SelectChevron } from './chunk-EQAFDIPE.js';
3
+ import { MenuItemContent, menuItemClass, menuSurfaceClass } from './chunk-P36KBUYD.js';
4
+ import { Button } from './chunk-6DWLTGRQ.js';
5
+ import { useSatinLabels } from './chunk-NTSU44FY.js';
6
+ import { cn } from './chunk-EHEXE2UV.js';
7
7
  import * as React from 'react';
8
8
  import { Popover } from 'radix-ui';
9
9
  import { Search } from 'iconoir-react';
@@ -1,6 +1,6 @@
1
- import { useFieldChrome, FieldChrome } from './chunk-UCCNXGLG.js';
2
- import { useSatinLabels } from './chunk-SSOFFQ5T.js';
3
- import { cn } from './chunk-O46O6LFQ.js';
1
+ import { useFieldChrome, FieldChrome } from './chunk-EQAFDIPE.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 { Minus, Plus } from 'iconoir-react';
6
6
  import { jsx, jsxs } from 'react/jsx-runtime';