@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
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Dialog as DialogPrimitive } from 'radix-ui';
3
+ import { CloseIcon, StatusIcon } from './alert.js';
4
+ export { CloseIcon, StatusIcon };
3
5
  /**
4
6
  * Dialog, 1:1 with the uiKit `Dialog` set (465:66873): variant default or destructive.
5
7
  * A 425px popover surface (min 360, max 560, never wider or taller than the screen less 16px a side; the body scrolls), radius-2xl, border/default, the shadcn `lg`
@@ -43,9 +45,6 @@ export interface DialogProps extends Omit<React.ComponentProps<typeof DialogPrim
43
45
  onOpenAutoFocus?: (event: Event) => void;
44
46
  className?: string;
45
47
  }
46
- /** The X from Figma's close button (`icon` 16px, 1.25 stroke). */
47
- /** @internal Shared by Satin's own components; not part of the public API and may change in any release. */
48
- export declare function CloseIcon(): React.JSX.Element;
49
48
  export declare function Dialog({ open, defaultOpen, onOpenChange, trigger, title, description, variant, alert, footer, footerStart, children, closeButton, modal, container, onOpenAutoFocus, className, ...props }: DialogProps): React.JSX.Element;
50
49
  /** Wrap a footer button in this to make it close the dialog: `<DialogClose asChild><Button…/></DialogClose>`. */
51
50
  export declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
@@ -64,8 +63,4 @@ export interface DialogAlertProps extends Omit<React.ComponentProps<'div'>, 'tit
64
63
  /** Shows the close button; called when it is pressed. */
65
64
  onDismiss?: () => void;
66
65
  }
67
- /** The four status glyphs from Figma (16px, 1.25 stroke), drawn in currentColor. */
68
- export declare function StatusIcon({ intent }: {
69
- intent: DialogAlertIntent;
70
- }): React.JSX.Element;
71
66
  export declare function DialogAlert({ intent, title, description, icon, onDismiss, className, ...props }: DialogAlertProps): React.JSX.Element;
@@ -1,4 +1,6 @@
1
- 'use client';export { CloseIcon, Dialog, DialogAlert, DialogClose, StatusIcon } from '../chunk-AIMQNLPY.js';
2
- import '../chunk-T6L32XXH.js';
3
- import '../chunk-SSOFFQ5T.js';
4
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { Dialog, DialogAlert, DialogClose } from '../chunk-WZSLDYUU.js';
2
+ export { CloseIcon, StatusIcon } from '../chunk-RPL6FRVX.js';
3
+ import '../chunk-6DWLTGRQ.js';
4
+ import '../chunk-AKEZCWNW.js';
5
+ import '../chunk-NTSU44FY.js';
6
+ import '../chunk-EHEXE2UV.js';
@@ -1,10 +1,10 @@
1
- 'use client';export { DonutCard } from '../chunk-WLQD5BN2.js';
2
- import '../chunk-ZBZ3ZQRB.js';
1
+ 'use client';export { DonutCard } from '../chunk-PD2KD5OR.js';
2
+ import '../chunk-LI5VYDLN.js';
3
3
  import '../chunk-ZHFIWDGF.js';
4
- import '../chunk-UCCNXGLG.js';
5
- import '../chunk-VUOAPWTF.js';
6
- import '../chunk-BR2B4OIT.js';
7
- import '../chunk-57QEOCDZ.js';
8
- import '../chunk-XUOSJMEJ.js';
9
- import '../chunk-SSOFFQ5T.js';
10
- import '../chunk-O46O6LFQ.js';
4
+ import '../chunk-EQAFDIPE.js';
5
+ import '../chunk-KITXKIYW.js';
6
+ import '../chunk-P36KBUYD.js';
7
+ import '../chunk-XWPH7C2W.js';
8
+ import '../chunk-7NV53EL5.js';
9
+ import '../chunk-NTSU44FY.js';
10
+ import '../chunk-EHEXE2UV.js';
package/components/dot.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use client';export { Dot, dotVariants } from '../chunk-5XTUFBZI.js';
2
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { Dot, dotVariants } from '../chunk-C6WRJ7DG.js';
2
+ import '../chunk-EHEXE2UV.js';
@@ -1,4 +1,4 @@
1
- 'use client';export { DropdownMenu, DropdownMenuGroup, DropdownMenuItem, MenuItemContent, menuGroupClass, menuGroupLabelClass, menuItemClass, menuSurfaceClass } from '../chunk-BR2B4OIT.js';
2
- import '../chunk-57QEOCDZ.js';
3
- import '../chunk-SSOFFQ5T.js';
4
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { DropdownMenu, DropdownMenuGroup, DropdownMenuItem, MenuItemContent, menuGroupClass, menuGroupLabelClass, menuItemClass, menuSurfaceClass } from '../chunk-P36KBUYD.js';
2
+ import '../chunk-XWPH7C2W.js';
3
+ import '../chunk-NTSU44FY.js';
4
+ import '../chunk-EHEXE2UV.js';
@@ -1,2 +1,2 @@
1
- 'use client';export { EmptyState, emptyStateVariants } from '../chunk-FAJ3OVL4.js';
2
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { EmptyState, emptyStateVariants } from '../chunk-JR3VVDV6.js';
2
+ import '../chunk-EHEXE2UV.js';
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * FieldGroup: fields or options that answer one question, under one legend: an address, a date
4
+ * range, "Notify me about" with a list of checkboxes. It is a `<fieldset>`, so the legend names
5
+ * the whole group for screen readers and `disabled` reaches every control in it.
6
+ *
7
+ * - `variant="fields"` (default) is a block of FormFields under a 16px heading; `columns` puts
8
+ * them side by side (City | Postcode) from the `sm` breakpoint up.
9
+ * - `variant="choices"` is a list of Checkboxes, Switches or Radios under a label set like a
10
+ * FormField's, 12px apart, with one description and one error for the whole list.
11
+ * - In a horizontal Form the legend takes the label column and the fields inside stack
12
+ * vertically next to it.
13
+ * - `error` (or the Form's `errors[name]`) shows under the group and marks it invalid.
14
+ */
15
+ export interface FieldGroupProps extends Omit<React.ComponentProps<'fieldset'>, 'children'> {
16
+ legend: React.ReactNode;
17
+ description?: React.ReactNode;
18
+ error?: React.ReactNode;
19
+ /** Picks the group's message out of the Form's `errors`. */
20
+ name?: string;
21
+ required?: boolean;
22
+ variant?: 'fields' | 'choices';
23
+ columns?: 1 | 2 | 3;
24
+ layout?: 'vertical' | 'horizontal';
25
+ children: React.ReactNode;
26
+ }
27
+ export declare function FieldGroup({ legend, description, error: ownError, name, required, variant, columns, layout: ownLayout, disabled: ownDisabled, className, children, ...props }: FieldGroupProps): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ 'use client';export { FieldGroup } from '../chunk-RFSPJECL.js';
2
+ import '../chunk-KITXKIYW.js';
3
+ import '../chunk-EHEXE2UV.js';
@@ -1,6 +1,7 @@
1
- 'use client';export { FileUpload, FileUploadItem, fileIconFor, formatBytes } from '../chunk-73Z7NMQQ.js';
2
- import '../chunk-UUCVRIVP.js';
3
- import '../chunk-M2HEVFQ3.js';
4
- import '../chunk-T6L32XXH.js';
5
- import '../chunk-SSOFFQ5T.js';
6
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { FileUpload, FileUploadItem, fileIconFor, formatBytes } from '../chunk-YXWXSRXG.js';
2
+ import '../chunk-R3DTMBDT.js';
3
+ import '../chunk-6DWLTGRQ.js';
4
+ import '../chunk-AKEZCWNW.js';
5
+ import '../chunk-LKSFTNPF.js';
6
+ import '../chunk-NTSU44FY.js';
7
+ import '../chunk-EHEXE2UV.js';
@@ -9,18 +9,41 @@ import * as React from 'react';
9
9
  * The control is wired through context: Input and Textarea pick up the field's id (so the
10
10
  * label points at them), `aria-describedby` (description or error), `aria-invalid` and
11
11
  * `disabled`. Any other control can read the same values with `useFormField()`.
12
+ *
13
+ * Inside a `Form` (form.tsx) a field takes the form's layout and disabled state, and with a
14
+ * `name` it shows the form's `errors[name]` and names its control, so the form's fields are
15
+ * set in one place. Its own props still win.
12
16
  */
13
17
  export interface FormFieldContextValue {
14
18
  id: string;
19
+ /** The field's `name`, given to Input, Textarea and Select for a native submit. */
20
+ name?: string;
15
21
  describedBy?: string;
16
22
  invalid: boolean;
17
23
  disabled: boolean;
18
24
  required: boolean;
19
25
  }
26
+ /**
27
+ * What a Form (or a FieldGroup inside one) hands the fields in it. Defined here, not in form.tsx,
28
+ * so a FormField works on its own and the form only adds to it.
29
+ */
30
+ export interface FormContextValue {
31
+ layout?: 'vertical' | 'horizontal';
32
+ disabled?: boolean;
33
+ /** Error messages by field `name`. */
34
+ errors?: Partial<Record<string, React.ReactNode>>;
35
+ }
36
+ export declare const FormContext: React.Context<FormContextValue | null>;
37
+ /** The size an InputGroup gives the fields in it (Input, Select), unless they set their own. */
38
+ export declare const FieldSizeContext: React.Context<"lg" | "md" | "sm" | null>;
39
+ /** The layout, disabled state and errors of the surrounding Form, if any. */
40
+ export declare function useFormContext(): FormContextValue | null;
20
41
  /** The id, describedby, invalid, disabled and required of the surrounding FormField, if any. */
21
42
  export declare function useFormField(): FormFieldContextValue | null;
22
43
  export interface FormFieldProps extends Omit<React.ComponentProps<'div'>, 'children'> {
23
44
  label: React.ReactNode;
45
+ /** Names the control and picks this field's message out of the Form's `errors`. */
46
+ name?: string;
24
47
  description?: React.ReactNode;
25
48
  /** An error message. It replaces the description and marks the control invalid. */
26
49
  error?: React.ReactNode;
@@ -32,4 +55,18 @@ export interface FormFieldProps extends Omit<React.ComponentProps<'div'>, 'child
32
55
  htmlFor?: string;
33
56
  children: React.ReactNode;
34
57
  }
35
- export declare function FormField({ label, description, error, layout, disabled, required, htmlFor, className, children, ...props }: FormFieldProps): React.JSX.Element;
58
+ export declare function FormField({ label, description, name, error: ownError, layout: ownLayout, disabled: ownDisabled, required, htmlFor, className, children, ...props }: FormFieldProps): React.JSX.Element;
59
+ /** @internal The required mark from Figma (the `sparkle 2` glyph in _label), 6px, in the label colour. */
60
+ export declare function RequiredMark(): React.JSX.Element;
61
+ /** @internal A field's or a group's error: Figma's 14px warning circle and the message, in red. */
62
+ export declare function FieldError({ id, children, className }: {
63
+ id?: string;
64
+ children: React.ReactNode;
65
+ className?: string;
66
+ }): React.JSX.Element;
67
+ /** @internal A field's or a group's description, muted. */
68
+ export declare function FieldDescription({ id, children, className }: {
69
+ id?: string;
70
+ children: React.ReactNode;
71
+ className?: string;
72
+ }): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- 'use client';export { FormField, useFormField } from '../chunk-VUOAPWTF.js';
2
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { FieldDescription, FieldError, FieldSizeContext, FormContext, FormField, RequiredMark, useFormContext, useFormField } from '../chunk-KITXKIYW.js';
2
+ import '../chunk-EHEXE2UV.js';
@@ -0,0 +1,47 @@
1
+ import * as React from 'react';
2
+ import { type FormContextValue } from './form-field.js';
3
+ /**
4
+ * Form: a `<form>` that lays out FormFields, FieldGroups and FormSections and sets them once.
5
+ *
6
+ * - `layout` places every field's label above its control (vertical) or in a 160px column to the
7
+ * left (horizontal, for settings pages); a field's own `layout` still wins.
8
+ * - `errors` holds messages by field `name` (`{ email: 'Enter an email' }`); each FormField or
9
+ * FieldGroup with that `name` shows its message and marks its control invalid. Feed it from
10
+ * your own validation, a server response, or a form library (`errors.email?.message`).
11
+ * - After a submit, and whenever errors appear where there were none, focus moves to the first
12
+ * invalid control, so a screen reader and the keyboard land on what needs fixing.
13
+ * - `disabled` greys out and disables every field and button inside (a native fieldset), for a
14
+ * form that is saving or read-only.
15
+ * - `onSubmitValues` hands over the values as an object (repeated names become arrays) and
16
+ * prevents the page reload; plain `onSubmit` works as usual.
17
+ */
18
+ export type FormValues = Record<string, FormDataEntryValue | FormDataEntryValue[]>;
19
+ export interface FormProps extends React.ComponentProps<'form'> {
20
+ layout?: 'vertical' | 'horizontal';
21
+ /** Error messages by field `name`. */
22
+ errors?: FormContextValue['errors'];
23
+ disabled?: boolean;
24
+ /** Called on submit with the form's values; the default submit (a page load) is prevented. */
25
+ onSubmitValues?: (values: FormValues, event: React.FormEvent<HTMLFormElement>) => void;
26
+ }
27
+ /** The form's values as an object; a name that appears more than once (checkboxes) becomes an array. */
28
+ export declare function formValues(form: HTMLFormElement): FormValues;
29
+ export declare function Form({ layout, errors, disabled, onSubmit, onSubmitValues, noValidate, className, children, ref, ...props }: FormProps): React.JSX.Element;
30
+ /**
31
+ * A titled part of a longer form (Profile, Notifications): a 16px title, an optional
32
+ * description, then its fields. Sections after the first are set off by a rule.
33
+ */
34
+ export interface FormSectionProps extends Omit<React.ComponentProps<'section'>, 'title'> {
35
+ title: React.ReactNode;
36
+ description?: React.ReactNode;
37
+ }
38
+ export declare function FormSection({ title, description, className, children, ...props }: FormSectionProps): React.JSX.Element;
39
+ /**
40
+ * The form's buttons, usually a ButtonGroup or a Cancel + Submit pair. `align="end"` (default)
41
+ * puts them on the right; `start` lines them up with the controls, past the label column in a
42
+ * horizontal form; `between` pushes the first child left (Delete) and the rest right.
43
+ */
44
+ export interface FormActionsProps extends React.ComponentProps<'div'> {
45
+ align?: 'start' | 'end' | 'between';
46
+ }
47
+ export declare function FormActions({ align, className, ...props }: FormActionsProps): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ 'use client';export { Form, FormActions, FormSection, formValues } from '../chunk-NCIRJ5V2.js';
2
+ import '../chunk-KITXKIYW.js';
3
+ import '../chunk-EHEXE2UV.js';
@@ -1,2 +1,2 @@
1
- 'use client';export { HoverCard, hoverCardClass } from '../chunk-PD6YPFYN.js';
2
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { HoverCard, hoverCardClass } from '../chunk-W2EH6RY5.js';
2
+ import '../chunk-EHEXE2UV.js';
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * InputGroup: a field joined with what belongs to it, in one block: an addon before or after
4
+ * (`https://`, `.satin.dev`, a currency), a Select (country code, unit), or a Button (Copy,
5
+ * Send, Subscribe). The inner corners go square and neighbours share one 1px border; the
6
+ * focused field comes to the front so its ring is whole.
7
+ *
8
+ * `size` sizes every part to the same height: Inputs and Selects take it, Buttons take the
9
+ * matching button size (sm 28 → md, md 32 → lg, lg 36 → xl) and secondary by default. In a
10
+ * group a button draws its outline as a border, like the field, so both read the same height.
11
+ *
12
+ * Text that sits inside the field belongs on the Input itself (`leadingText`, `trailingText`,
13
+ * icons); an addon is for a separate, boxed segment. Wrap the group in a FormField for the
14
+ * label, description and error: the field inside picks them up.
15
+ */
16
+ export interface InputGroupProps extends React.ComponentProps<'div'> {
17
+ size?: 'sm' | 'md' | 'lg';
18
+ }
19
+ export declare function InputGroup({ size, className, ...props }: InputGroupProps): React.JSX.Element;
20
+ /** A boxed segment of an InputGroup: text (`https://`, `€`), an icon, or a Kbd. */
21
+ export declare function InputGroupAddon({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ 'use client';export { InputGroup, InputGroupAddon } from '../chunk-JKOBDLP3.js';
2
+ import '../chunk-KITXKIYW.js';
3
+ import '../chunk-6DWLTGRQ.js';
4
+ import '../chunk-AKEZCWNW.js';
5
+ import '../chunk-NTSU44FY.js';
6
+ import '../chunk-EHEXE2UV.js';
@@ -1,7 +1,7 @@
1
- 'use client';export { InputOTP } from '../chunk-OVKPPXK5.js';
2
- import '../chunk-UCCNXGLG.js';
3
- import '../chunk-VUOAPWTF.js';
4
- import '../chunk-BR2B4OIT.js';
5
- import '../chunk-57QEOCDZ.js';
6
- import '../chunk-SSOFFQ5T.js';
7
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { InputOTP } from '../chunk-PP46SY7M.js';
2
+ import '../chunk-EQAFDIPE.js';
3
+ import '../chunk-KITXKIYW.js';
4
+ import '../chunk-P36KBUYD.js';
5
+ import '../chunk-XWPH7C2W.js';
6
+ import '../chunk-NTSU44FY.js';
7
+ import '../chunk-EHEXE2UV.js';
@@ -20,9 +20,13 @@ export interface InputProps extends Omit<React.ComponentProps<'input'>, 'size'>
20
20
  size?: 'sm' | 'md' | 'lg';
21
21
  leadingIcon?: React.ReactNode;
22
22
  trailingIcon?: React.ReactNode;
23
+ /** Muted text inside the field before the value: `$`, `https://`. */
24
+ leadingText?: React.ReactNode;
25
+ /** Muted text inside the field after the value: `USD`, `.satin.dev`, a counter. */
26
+ trailingText?: React.ReactNode;
23
27
  /** Classes for the outer wrapper (label + field + hint). `className` styles the field. */
24
28
  wrapperClassName?: string;
25
29
  /** Show a state without interacting, for state sheets. */
26
30
  'data-force'?: 'hover' | 'focus';
27
31
  }
28
- export declare function Input({ label, hint, error, size, leadingIcon, trailingIcon, className, wrapperClassName, id, disabled, required, value, defaultValue, onChange, 'aria-describedby': ariaDescribedBy, 'data-force': force, ...props }: InputProps): React.JSX.Element;
32
+ export declare function Input({ label, hint, error, size: ownSize, leadingIcon, trailingIcon, leadingText, trailingText, className, wrapperClassName, id, disabled, required, value, defaultValue, onChange, 'aria-describedby': ariaDescribedBy, 'data-force': force, ...props }: InputProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- 'use client';export { Input } from '../chunk-OURZQM27.js';
2
- import '../chunk-VUOAPWTF.js';
3
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { Input } from '../chunk-L5PPN42A.js';
2
+ import '../chunk-KITXKIYW.js';
3
+ import '../chunk-EHEXE2UV.js';
package/components/kbd.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use client';export { Kbd, KbdArrowDown, KbdArrowUp, KbdGroup, KbdHint, KbdReturn, keysOf } from '../chunk-57QEOCDZ.js';
2
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { Kbd, KbdArrowDown, KbdArrowUp, KbdGroup, KbdHint, KbdReturn, keysOf } from '../chunk-XWPH7C2W.js';
2
+ import '../chunk-EHEXE2UV.js';
@@ -67,6 +67,13 @@ export declare const defaultLabels: {
67
67
  navigate: string;
68
68
  openItem: string;
69
69
  source: string;
70
+ moreOptions: string;
71
+ loading: string;
72
+ submit: string;
73
+ done: string;
74
+ opensInNewTab: string;
75
+ showPassword: string;
76
+ hidePassword: string;
70
77
  };
71
78
  export type SatinLabelSet = typeof defaultLabels;
72
79
  export interface SatinLabelsProps {
@@ -1 +1 @@
1
- 'use client';export { SatinLabels, defaultLabels, useSatinLabels } from '../chunk-SSOFFQ5T.js';
1
+ 'use client';export { SatinLabels, defaultLabels, useSatinLabels } from '../chunk-NTSU44FY.js';
@@ -1,11 +1,11 @@
1
- 'use client';export { AreaCard, LineCard } from '../chunk-JBKBRAC4.js';
2
- import '../chunk-ISYKZCPJ.js';
3
- import '../chunk-ZBZ3ZQRB.js';
1
+ 'use client';export { AreaCard, LineCard } from '../chunk-5663JVE5.js';
2
+ import '../chunk-INJWE2LD.js';
3
+ import '../chunk-LI5VYDLN.js';
4
4
  import '../chunk-ZHFIWDGF.js';
5
- import '../chunk-UCCNXGLG.js';
6
- import '../chunk-VUOAPWTF.js';
7
- import '../chunk-BR2B4OIT.js';
8
- import '../chunk-57QEOCDZ.js';
9
- import '../chunk-XUOSJMEJ.js';
10
- import '../chunk-SSOFFQ5T.js';
11
- import '../chunk-O46O6LFQ.js';
5
+ import '../chunk-EQAFDIPE.js';
6
+ import '../chunk-KITXKIYW.js';
7
+ import '../chunk-P36KBUYD.js';
8
+ import '../chunk-XWPH7C2W.js';
9
+ import '../chunk-7NV53EL5.js';
10
+ import '../chunk-NTSU44FY.js';
11
+ import '../chunk-EHEXE2UV.js';
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Link: text that goes somewhere. Calm by default: the text colour with a border/strong
4
+ * underline that takes the text colour on hover, so a paragraph full of links stays readable.
5
+ * `brand` colours it for the one link that should stand out; `muted` is for footers and meta
6
+ * lines and only underlines on hover. Focus draws the 2px focus ring around it.
7
+ *
8
+ * `external` (on by itself with `target="_blank"`) adds a 12px ↗ after the text, says
9
+ * "(opens in a new tab)" to screen readers and sets `rel="noopener noreferrer"`.
10
+ *
11
+ * For a router's link (Next.js, React Router) pass `asChild` and put it inside: it gets the
12
+ * styles, the router keeps the navigation.
13
+ */
14
+ export interface LinkProps extends React.ComponentProps<'a'> {
15
+ variant?: 'default' | 'brand' | 'muted';
16
+ underline?: 'always' | 'hover' | 'none';
17
+ external?: boolean;
18
+ asChild?: boolean;
19
+ }
20
+ export declare function Link({ variant, underline, external, asChild, target, rel, className, children, ...props }: LinkProps): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ 'use client';export { Link } from '../chunk-J5UQPROI.js';
2
+ import '../chunk-NTSU44FY.js';
3
+ import '../chunk-EHEXE2UV.js';
@@ -0,0 +1,46 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Item: one row of a list. The thing almost every screen repeats: a person, a file, a project,
4
+ * a setting, a search result, a notification. Left to right:
5
+ *
6
+ * - `icon` in a 32px muted tile (28 at sm), or `media` as it is (an Avatar, a thumbnail);
7
+ * - `title` (13px medium) over `description` (13px muted), each on one line, cut with an ellipsis;
8
+ * `children` go under them for anything longer (Chips, a Progress);
9
+ * - `meta` on the right in muted 13px: a time, a size, a Badge, a Kbd;
10
+ * - `actions` at the far right: Buttons, a Switch, a DropdownMenu `⋯`.
11
+ *
12
+ * With `href` (or `onClick`) the row is a link (or a button) and the whole row is its target,
13
+ * with a hover and a focus ring; `actions` stay their own controls on top of it. `selected`
14
+ * marks the current row. Rows go in a `List`, or stand alone with `variant="outline"`.
15
+ */
16
+ export interface ItemProps extends Omit<React.ComponentProps<'div'>, 'title' | 'onClick'> {
17
+ title: React.ReactNode;
18
+ description?: React.ReactNode;
19
+ /** A glyph shown in a muted tile. */
20
+ icon?: React.ReactNode;
21
+ /** Shown as is, in place of the tile: an Avatar, an image. */
22
+ media?: React.ReactNode;
23
+ meta?: React.ReactNode;
24
+ actions?: React.ReactNode;
25
+ href?: string;
26
+ /** Link target, e.g. `_blank`. */
27
+ target?: string;
28
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
29
+ selected?: boolean;
30
+ disabled?: boolean;
31
+ size?: 'sm' | 'md';
32
+ /** `outline` draws a card border, for a row on its own. Rows in a List take the List's look. */
33
+ variant?: 'plain' | 'outline';
34
+ }
35
+ export declare function Item({ title, description, icon, media, meta, actions, href, target, onClick, selected, disabled, size: ownSize, variant, className, children, ...props }: ItemProps): React.JSX.Element;
36
+ /**
37
+ * List: Items under each other. `plain` (default) keeps them apart by 2px with rounded hovers,
38
+ * for menus of links and search results; `divided` runs a rule between rows, edge to edge, for
39
+ * feeds and settings; `card` puts the divided rows in a bordered card. `size` is passed to every
40
+ * Item. It's a `ul`; give it an `aria-label` when the heading above doesn't name it.
41
+ */
42
+ export interface ListProps extends React.ComponentProps<'ul'> {
43
+ variant?: 'plain' | 'divided' | 'card';
44
+ size?: 'sm' | 'md';
45
+ }
46
+ export declare function List({ variant, size, className, ...props }: ListProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ 'use client';export { Item, List } from '../chunk-67CBFB6Y.js';
2
+ import '../chunk-EHEXE2UV.js';
@@ -1,4 +1,5 @@
1
- 'use client';export { MessageActions } from '../chunk-SZJIVBOD.js';
2
- import '../chunk-T6L32XXH.js';
3
- import '../chunk-SSOFFQ5T.js';
4
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { MessageActions } from '../chunk-STYOBAC7.js';
2
+ import '../chunk-6DWLTGRQ.js';
3
+ import '../chunk-AKEZCWNW.js';
4
+ import '../chunk-NTSU44FY.js';
5
+ import '../chunk-EHEXE2UV.js';
@@ -1,7 +1,8 @@
1
- 'use client';export { Message } from '../chunk-S7QHBVPX.js';
2
- import '../chunk-NL574STL.js';
3
- import '../chunk-SZJIVBOD.js';
4
- import '../chunk-UGIVCXGN.js';
5
- import '../chunk-T6L32XXH.js';
6
- import '../chunk-SSOFFQ5T.js';
7
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { Message } from '../chunk-6GNMUJQ4.js';
2
+ import '../chunk-WCUR44O6.js';
3
+ import '../chunk-STYOBAC7.js';
4
+ import '../chunk-R4KPFBMK.js';
5
+ import '../chunk-6DWLTGRQ.js';
6
+ import '../chunk-AKEZCWNW.js';
7
+ import '../chunk-NTSU44FY.js';
8
+ import '../chunk-EHEXE2UV.js';
@@ -1,7 +1,7 @@
1
- 'use client';export { NumberInput } from '../chunk-674SRBZK.js';
2
- import '../chunk-UCCNXGLG.js';
3
- import '../chunk-VUOAPWTF.js';
4
- import '../chunk-BR2B4OIT.js';
5
- import '../chunk-57QEOCDZ.js';
6
- import '../chunk-SSOFFQ5T.js';
7
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { NumberInput } from '../chunk-MOGWOUCN.js';
2
+ import '../chunk-EQAFDIPE.js';
3
+ import '../chunk-KITXKIYW.js';
4
+ import '../chunk-P36KBUYD.js';
5
+ import '../chunk-XWPH7C2W.js';
6
+ import '../chunk-NTSU44FY.js';
7
+ import '../chunk-EHEXE2UV.js';
@@ -1,4 +1,6 @@
1
- 'use client';export { Pagination, paginationRange } from '../chunk-TT2N5752.js';
1
+ 'use client';export { Pagination, paginationRange } from '../chunk-TB3ZRV3Y.js';
2
2
  import '../chunk-XETMIETJ.js';
3
- import '../chunk-T6L32XXH.js';
4
- import '../chunk-O46O6LFQ.js';
3
+ import '../chunk-6DWLTGRQ.js';
4
+ import '../chunk-AKEZCWNW.js';
5
+ import '../chunk-NTSU44FY.js';
6
+ import '../chunk-EHEXE2UV.js';
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { type InputProps } from './input.js';
3
+ /**
4
+ * PasswordInput: an Input of type password with a show / hide button in the trailing slot.
5
+ * The button is an xs tertiary icon button named "Show password" / "Hide password" (from
6
+ * SatinLabels) with `aria-pressed`, and showing the password never moves the caret or the
7
+ * focus. `autoComplete` defaults to `current-password`; pass `new-password` on sign-up.
8
+ *
9
+ * Everything else is Input: sizes, `leadingIcon`, `hint`, `error`, and FormField wiring.
10
+ */
11
+ export interface PasswordInputProps extends Omit<InputProps, 'type' | 'trailingIcon' | 'trailingText'> {
12
+ /** Show the password; leave out to let the button control it. */
13
+ visible?: boolean;
14
+ onVisibleChange?: (visible: boolean) => void;
15
+ }
16
+ export declare function PasswordInput({ visible, onVisibleChange, autoComplete, disabled, ...props }: PasswordInputProps): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ 'use client';export { PasswordInput } from '../chunk-GTFUAA6H.js';
2
+ import '../chunk-L5PPN42A.js';
3
+ import '../chunk-KITXKIYW.js';
4
+ import '../chunk-6DWLTGRQ.js';
5
+ import '../chunk-AKEZCWNW.js';
6
+ import '../chunk-NTSU44FY.js';
7
+ import '../chunk-EHEXE2UV.js';
@@ -1,3 +1,3 @@
1
- 'use client';export { Popover, PopoverClose, PopoverPanel } from '../chunk-LFGUJHFF.js';
2
- import '../chunk-SSOFFQ5T.js';
3
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { Popover, PopoverClose, PopoverPanel } from '../chunk-7SVMERPH.js';
2
+ import '../chunk-NTSU44FY.js';
3
+ import '../chunk-EHEXE2UV.js';
@@ -1,2 +1,2 @@
1
- 'use client';export { Progress } from '../chunk-M2HEVFQ3.js';
2
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { Progress } from '../chunk-LKSFTNPF.js';
2
+ import '../chunk-EHEXE2UV.js';
@@ -1,5 +1,6 @@
1
- 'use client';export { PromptBar, defaultActions } from '../chunk-5725MFGQ.js';
2
- import '../chunk-57QEOCDZ.js';
3
- import '../chunk-T6L32XXH.js';
4
- import '../chunk-SSOFFQ5T.js';
5
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { PromptBar, defaultActions } from '../chunk-JCR5TWTF.js';
2
+ import '../chunk-XWPH7C2W.js';
3
+ import '../chunk-6DWLTGRQ.js';
4
+ import '../chunk-AKEZCWNW.js';
5
+ import '../chunk-NTSU44FY.js';
6
+ import '../chunk-EHEXE2UV.js';
@@ -1,2 +1,2 @@
1
- 'use client';export { Radio, RadioGroup } from '../chunk-LB37KTJH.js';
2
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { Radio, RadioGroup } from '../chunk-EXKSKYG3.js';
2
+ import '../chunk-EHEXE2UV.js';
@@ -1,3 +1,3 @@
1
- 'use client';export { SearchBar } from '../chunk-SPGUZMCC.js';
2
- import '../chunk-57QEOCDZ.js';
3
- import '../chunk-O46O6LFQ.js';
1
+ 'use client';export { SearchBar } from '../chunk-K5G5OEV5.js';
2
+ import '../chunk-XWPH7C2W.js';
3
+ import '../chunk-EHEXE2UV.js';
@@ -1,3 +1,3 @@
1
- 'use client';export { SegmentedControl } from '../chunk-CVNRZ2YV.js';
1
+ 'use client';export { SegmentedControl } from '../chunk-JYGCZWET.js';
2
2
  import '../chunk-XETMIETJ.js';
3
- import '../chunk-O46O6LFQ.js';
3
+ import '../chunk-EHEXE2UV.js';
@@ -82,6 +82,7 @@ export declare function useFieldChrome({ id, disabled, error, hint, }: {
82
82
  disabled: boolean;
83
83
  invalid: boolean;
84
84
  required: boolean | undefined;
85
+ name: string | undefined;
85
86
  describedBy: string | undefined;
86
87
  message: React.ReactNode;
87
88
  messageId: string | undefined;
@@ -102,4 +103,4 @@ export declare function FieldChrome({ label, action, chrome, className, children
102
103
  export declare function SelectChevron({ className }: {
103
104
  className?: string;
104
105
  }): React.JSX.Element;
105
- export declare function Select({ options, value, defaultValue, onValueChange, placeholder, label, hint, error, size, leadingIcon, layout, iconSize, disabled, required, name, id, open, defaultOpen, onOpenChange, container, wrapperClassName, className, 'data-force': force, 'aria-describedby': describedBy, ...props }: SelectProps): React.JSX.Element;
106
+ export declare function Select({ options, value, defaultValue, onValueChange, placeholder, label, hint, error, size: ownSize, leadingIcon, layout, iconSize, disabled, required, name, id, open, defaultOpen, onOpenChange, container, wrapperClassName, className, 'data-force': force, 'aria-describedby': describedBy, ...props }: SelectProps): React.JSX.Element;