@igne-agency/react-web-ui 0.4.0 → 0.6.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 (257) hide show
  1. package/dist/base.css +3 -0
  2. package/dist/components/accordion/accordion.css +21 -21
  3. package/dist/components/accordion/accordion.d.ts +17 -4
  4. package/dist/components/accordion/accordion.js +83 -36
  5. package/dist/components/accordion/accordion.module.js +6 -6
  6. package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
  7. package/dist/components/attachment-tile/attachment-preview.js +388 -119
  8. package/dist/components/attachment-tile/attachment-tile.css +31 -25
  9. package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
  10. package/dist/components/attachment-tile/attachment-tile.js +160 -43
  11. package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
  12. package/dist/components/attachment-tile/index.d.ts +1 -1
  13. package/dist/components/avatar/avatar.css +9 -9
  14. package/dist/components/avatar/avatar.d.ts +50 -5
  15. package/dist/components/avatar/avatar.js +178 -64
  16. package/dist/components/avatar/avatar.module.js +3 -3
  17. package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
  18. package/dist/components/avatar-group/avatar-group-context.js +2 -2
  19. package/dist/components/avatar-group/avatar-group.css +26 -20
  20. package/dist/components/avatar-group/avatar-group.d.ts +85 -27
  21. package/dist/components/avatar-group/avatar-group.js +400 -246
  22. package/dist/components/avatar-group/avatar-group.module.js +8 -8
  23. package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
  24. package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
  25. package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
  26. package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
  27. package/dist/components/button/button.css +29 -31
  28. package/dist/components/button/button.d.ts +20 -16
  29. package/dist/components/button/button.js +140 -145
  30. package/dist/components/button/button.module.js +1 -1
  31. package/dist/components/button/index.js +1 -1
  32. package/dist/components/checkbox-field/checkbox-field.js +63 -49
  33. package/dist/components/checkbox-field/checkbox.css +105 -56
  34. package/dist/components/checkbox-field/checkbox.d.ts +3 -2
  35. package/dist/components/checkbox-field/checkbox.js +12 -9
  36. package/dist/components/checkbox-field/checkbox.module.js +4 -4
  37. package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
  38. package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
  39. package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
  40. package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
  41. package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
  42. package/dist/components/collapsible/collapsible.css +20 -20
  43. package/dist/components/collapsible/collapsible.d.ts +17 -4
  44. package/dist/components/collapsible/collapsible.js +83 -36
  45. package/dist/components/collapsible/collapsible.module.js +5 -5
  46. package/dist/components/combobox-field/combobox-field.js +206 -158
  47. package/dist/components/combobox-field/combobox.css +492 -277
  48. package/dist/components/combobox-field/combobox.d.ts +148 -39
  49. package/dist/components/combobox-field/combobox.js +506 -206
  50. package/dist/components/combobox-field/combobox.module.js +21 -21
  51. package/dist/components/combobox-field/value-state-view.css +5 -5
  52. package/dist/components/combobox-field/value-state-view.module.js +4 -4
  53. package/dist/components/composer/composer-attachments.d.ts +30 -11
  54. package/dist/components/composer/composer-attachments.js +45 -40
  55. package/dist/components/composer/composer-editor.css +40 -35
  56. package/dist/components/composer/composer-editor.d.ts +14 -4
  57. package/dist/components/composer/composer-editor.js +134 -44
  58. package/dist/components/composer/composer-editor.module.js +5 -5
  59. package/dist/components/composer/composer.css +22 -22
  60. package/dist/components/composer/composer.d.ts +13 -2
  61. package/dist/components/composer/composer.js +78 -63
  62. package/dist/components/composer/composer.module.js +5 -5
  63. package/dist/components/composer/index.d.ts +2 -2
  64. package/dist/components/composer/mention-text.css +5 -5
  65. package/dist/components/composer/mention-text.module.js +1 -1
  66. package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
  67. package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
  68. package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
  69. package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
  70. package/dist/components/conversation/conversation.css +52 -52
  71. package/dist/components/conversation/conversation.d.ts +43 -18
  72. package/dist/components/conversation/conversation.js +120 -78
  73. package/dist/components/conversation/conversation.module.js +15 -15
  74. package/dist/components/date-field/date-field.d.ts +1 -1
  75. package/dist/components/date-field/date-field.js +202 -100
  76. package/dist/components/date-field/date-input.d.ts +73 -37
  77. package/dist/components/date-field/date-input.js +72 -45
  78. package/dist/components/date-field/index.d.ts +1 -1
  79. package/dist/components/date-range-field/date-range-field.d.ts +1 -1
  80. package/dist/components/date-range-field/date-range-field.js +219 -107
  81. package/dist/components/date-range-field/date-range-input.d.ts +84 -40
  82. package/dist/components/date-range-field/date-range-input.js +83 -48
  83. package/dist/components/dialog/dialog.css +32 -32
  84. package/dist/components/dialog/dialog.d.ts +8 -7
  85. package/dist/components/dialog/dialog.js +8 -26
  86. package/dist/components/dialog/dialog.module.js +6 -6
  87. package/dist/components/divider/divider.css +6 -6
  88. package/dist/components/divider/divider.d.ts +36 -2
  89. package/dist/components/divider/divider.js +195 -29
  90. package/dist/components/divider/divider.module.js +3 -3
  91. package/dist/components/drawer/drawer.css +55 -56
  92. package/dist/components/drawer/drawer.d.ts +8 -7
  93. package/dist/components/drawer/drawer.js +8 -26
  94. package/dist/components/drawer/drawer.module.js +6 -6
  95. package/dist/components/field/field.css +34 -24
  96. package/dist/components/field/field.d.ts +60 -37
  97. package/dist/components/field/field.js +242 -157
  98. package/dist/components/field/field.module.js +12 -10
  99. package/dist/components/field/input-parts.d.ts +11 -13
  100. package/dist/components/field/input-parts.js +23 -42
  101. package/dist/components/field-placeholder/field-placeholder.css +6 -6
  102. package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
  103. package/dist/components/fieldset/field-group.d.ts +1 -1
  104. package/dist/components/fieldset/field-group.js +48 -42
  105. package/dist/components/fieldset/fieldset-root.d.ts +1 -1
  106. package/dist/components/fieldset/fieldset-root.js +19 -17
  107. package/dist/components/fieldset/fieldset.d.ts +2 -2
  108. package/dist/components/fieldset/fieldset.js +2 -2
  109. package/dist/components/file-field/file-field.css +126 -60
  110. package/dist/components/file-field/file-field.js +201 -109
  111. package/dist/components/file-field/file-field.module.js +4 -4
  112. package/dist/components/file-field/file-input.d.ts +66 -40
  113. package/dist/components/file-field/file-input.js +188 -132
  114. package/dist/components/filter-bar/filter-bar.css +8 -8
  115. package/dist/components/filter-bar/filter-bar.d.ts +12 -3
  116. package/dist/components/filter-bar/filter-bar.js +23 -25
  117. package/dist/components/filter-bar/filter-bar.module.js +5 -5
  118. package/dist/components/form/form.d.ts +19 -7
  119. package/dist/components/form/form.js +80 -29
  120. package/dist/components/icon/icon.css +2 -2
  121. package/dist/components/icon/icon.module.js +1 -1
  122. package/dist/components/link/link.css +6 -5
  123. package/dist/components/link/link.module.js +1 -1
  124. package/dist/components/menu/menu.css +52 -47
  125. package/dist/components/menu/menu.d.ts +32 -25
  126. package/dist/components/menu/menu.js +75 -124
  127. package/dist/components/menu/menu.module.js +8 -8
  128. package/dist/components/nav/nav-context.d.ts +1 -1
  129. package/dist/components/nav/nav-item-view.d.ts +10 -13
  130. package/dist/components/nav/nav-item-view.js +42 -54
  131. package/dist/components/nav/nav.css +150 -119
  132. package/dist/components/nav/nav.d.ts +61 -17
  133. package/dist/components/nav/nav.js +271 -176
  134. package/dist/components/nav/nav.module.js +17 -15
  135. package/dist/components/number-field/number-field.css +153 -64
  136. package/dist/components/number-field/number-field.d.ts +2 -2
  137. package/dist/components/number-field/number-field.js +112 -91
  138. package/dist/components/number-field/number-field.module.js +6 -6
  139. package/dist/components/number-field/number-input.d.ts +43 -23
  140. package/dist/components/number-field/number-input.js +179 -125
  141. package/dist/components/otp-field/otp-field.css +153 -60
  142. package/dist/components/otp-field/otp-field.d.ts +2 -2
  143. package/dist/components/otp-field/otp-field.js +62 -46
  144. package/dist/components/otp-field/otp-field.module.js +4 -4
  145. package/dist/components/otp-field/otp-input.d.ts +8 -6
  146. package/dist/components/otp-field/otp-input.js +92 -92
  147. package/dist/components/pagination/pagination.d.ts +46 -15
  148. package/dist/components/pagination/pagination.js +217 -224
  149. package/dist/components/password-field/password-field.css +23 -23
  150. package/dist/components/password-field/password-field.js +107 -85
  151. package/dist/components/password-field/password-field.module.js +8 -8
  152. package/dist/components/password-field/password-strength.d.ts +107 -3
  153. package/dist/components/password-field/password-strength.js +569 -92
  154. package/dist/components/photo-field/photo-field.js +137 -112
  155. package/dist/components/photo-field/photo-input.css +67 -44
  156. package/dist/components/photo-field/photo-input.d.ts +59 -15
  157. package/dist/components/photo-field/photo-input.js +173 -86
  158. package/dist/components/photo-field/photo-input.module.js +10 -8
  159. package/dist/components/popover/popover.css +41 -41
  160. package/dist/components/popover/popover.d.ts +66 -25
  161. package/dist/components/popover/popover.js +332 -217
  162. package/dist/components/popover/popover.module.js +15 -19
  163. package/dist/components/radio-group-field/radio-group-field.js +80 -71
  164. package/dist/components/radio-group-field/radio-group.css +112 -60
  165. package/dist/components/radio-group-field/radio-group.d.ts +19 -3
  166. package/dist/components/radio-group-field/radio-group.js +66 -23
  167. package/dist/components/radio-group-field/radio-group.module.js +4 -4
  168. package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
  169. package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
  170. package/dist/components/segmented-control-field/segmented-control.css +132 -79
  171. package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
  172. package/dist/components/segmented-control-field/segmented-control.js +124 -41
  173. package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
  174. package/dist/components/select-field/select.css +214 -101
  175. package/dist/components/select-field/select.d.ts +43 -11
  176. package/dist/components/select-field/select.js +194 -109
  177. package/dist/components/select-field/select.module.js +14 -14
  178. package/dist/components/skeleton/skeleton.css +4 -4
  179. package/dist/components/skeleton/skeleton.module.js +3 -3
  180. package/dist/components/stale/stale.css +15 -15
  181. package/dist/components/stale/stale.d.ts +27 -3
  182. package/dist/components/stale/stale.js +147 -66
  183. package/dist/components/stale/stale.module.js +6 -6
  184. package/dist/components/status-message/status-message.css +22 -22
  185. package/dist/components/status-message/status-message.module.js +6 -6
  186. package/dist/components/switch-field/switch-field.js +77 -57
  187. package/dist/components/switch-field/switch.css +112 -63
  188. package/dist/components/switch-field/switch.d.ts +20 -3
  189. package/dist/components/switch-field/switch.js +70 -27
  190. package/dist/components/switch-field/switch.module.js +4 -4
  191. package/dist/components/tabs/tabs.css +32 -32
  192. package/dist/components/tabs/tabs.d.ts +21 -7
  193. package/dist/components/tabs/tabs.js +73 -14
  194. package/dist/components/tabs/tabs.module.js +7 -7
  195. package/dist/components/tag/tag.css +84 -84
  196. package/dist/components/tag/tag.module.js +3 -3
  197. package/dist/components/tag-group/tag-group.css +94 -94
  198. package/dist/components/tag-group/tag-group.module.js +4 -4
  199. package/dist/components/text-field/text-field.css +159 -82
  200. package/dist/components/text-field/text-field.d.ts +1 -1
  201. package/dist/components/text-field/text-field.js +139 -110
  202. package/dist/components/text-field/text-field.module.js +9 -9
  203. package/dist/components/text-field/text-input.d.ts +81 -45
  204. package/dist/components/text-field/text-input.js +366 -217
  205. package/dist/components/textarea-field/textarea-field.css +7 -2
  206. package/dist/components/textarea-field/textarea-field.js +72 -56
  207. package/dist/components/textarea-field/textarea-field.module.js +2 -2
  208. package/dist/components/time-field/time-field.js +153 -60
  209. package/dist/components/time-field/time-input.d.ts +21 -10
  210. package/dist/components/time-field/time-input.js +22 -11
  211. package/dist/components/toast/toast-provider.css +34 -31
  212. package/dist/components/toast/toast-provider.d.ts +63 -14
  213. package/dist/components/toast/toast-provider.js +174 -111
  214. package/dist/components/toast/toast-provider.module.js +7 -7
  215. package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
  216. package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
  217. package/dist/components/toggle-group-field/toggle-group.css +117 -67
  218. package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
  219. package/dist/components/toggle-group-field/toggle-group.js +2 -2
  220. package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
  221. package/dist/components/tooltip/tooltip.css +4 -4
  222. package/dist/components/tooltip/tooltip.module.js +1 -1
  223. package/dist/data-table/data-table-content.js +6 -5
  224. package/dist/data-table/data-table-parts.d.ts +41 -13
  225. package/dist/data-table/data-table-parts.js +213 -172
  226. package/dist/data-table/data-table-selection.d.ts +105 -3
  227. package/dist/data-table/data-table-selection.js +654 -145
  228. package/dist/data-table/data-table.css +125 -128
  229. package/dist/data-table/data-table.d.ts +21 -26
  230. package/dist/data-table/data-table.js +20 -23
  231. package/dist/data-table/data-table.module.js +32 -34
  232. package/dist/data-table/index.d.ts +2 -2
  233. package/dist/index.js +3 -3
  234. package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
  235. package/dist/lib/calendar/calendar-navigation.js +185 -118
  236. package/dist/lib/calendar/calendar-parts.d.ts +143 -0
  237. package/dist/lib/calendar/calendar-parts.js +540 -0
  238. package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
  239. package/dist/lib/calendar/calendar-prefab.js +311 -0
  240. package/dist/lib/calendar/calendar-year.d.ts +3 -1
  241. package/dist/lib/calendar/calendar-year.js +139 -131
  242. package/dist/lib/calendar/temporal.css +325 -232
  243. package/dist/lib/calendar/temporal.d.ts +67 -82
  244. package/dist/lib/calendar/temporal.js +258 -569
  245. package/dist/lib/calendar/temporal.module.js +38 -38
  246. package/dist/lib/forms/use-connected-field.d.ts +1 -1
  247. package/dist/lib/forms/use-connected-field.js +1 -1
  248. package/dist/lib/render-as.d.ts +13 -0
  249. package/dist/lib/render-as.js +46 -0
  250. package/dist/terrazzo/index.d.ts +4 -3
  251. package/dist/terrazzo/index.js +17 -6
  252. package/dist/tokens.css +28 -4
  253. package/package.json +2 -2
  254. package/tokens/dark.tokens.json +6 -0
  255. package/tokens/sys.tokens.json +7 -0
  256. package/dist/components/button/close-button.d.ts +0 -16
  257. package/dist/components/button/close-button.js +0 -30
@@ -1,8 +1,9 @@
1
1
  import { type InputProps as BaseInputProps } from "@base-ui/react/input";
2
- import { type ComponentProps, type ReactNode } from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ import { type ComponentProps, type ComponentPropsWithRef, type ReactElement, type ReactNode } from "react";
3
4
  import { Field, type FieldProps, type FieldState } from "../field/index.ts";
4
5
  import { InputError, type InputErrorProps, InputLabel, type InputLabelProps, InputPending, type InputPendingProps } from "../field/input-parts.tsx";
5
- export type TextInputRootProps = Omit<FieldProps, "label" | "description"> & Readonly<{
6
+ export type TextInputRootProps = Omit<FieldProps, "label" | "description" | "optionalLabel"> & Readonly<{
6
7
  value: string;
7
8
  onValueChange: (value: string) => void;
8
9
  disabled?: boolean;
@@ -19,9 +20,9 @@ export type TextInputRootProps = Omit<FieldProps, "label" | "description"> & Rea
19
20
  * state onto every part.
20
21
  *
21
22
  * @example
22
- * <TextInput.Root value={value} onValueChange={setValue} optionalLabel="optional">…</TextInput.Root>
23
+ * <TextInput.Root value={value} onValueChange={setValue}>…</TextInput.Root>
23
24
  */
24
- declare const TextInputRoot: ({ value, onValueChange, disabled, readOnly, requiredness, optionalLabel, errors, dirty, touched, pending, maxLength, state, className, children, }: TextInputRootProps) => ReactNode;
25
+ declare const TextInputRoot: ({ value, onValueChange, disabled, readOnly, requiredness, errors, dirty, touched, pending, maxLength, state, className, children, }: TextInputRootProps) => ReactNode;
25
26
  export type TextInputLabelProps = InputLabelProps;
26
27
  /**
27
28
  * The bordered box holding the control and its inlays.
@@ -59,61 +60,90 @@ export type TextInputInputProps = Omit<BaseInputProps, "value" | "defaultValue"
59
60
  * <TextInput.Input type="email" />
60
61
  */
61
62
  declare const TextInputInput: ({ type, className, ...props }: TextInputInputProps) => ReactNode;
62
- export type TextInputClearProps = Readonly<{
63
- /** Accessible name and tooltip hint, such as "Clear". */
64
- label: string;
65
- className?: string;
66
- /** The icon the button shows. */
67
- children: ReactNode;
63
+ /** The props of a button part: the button's own, but the click, which the part owns. */
64
+ type InlayButtonProps = Omit<ComponentPropsWithRef<"button">, "onClick" | "type" | "children">;
65
+ export type TextInputClearProps = InlayButtonProps & Readonly<{
66
+ /** The button to render, such as `<IconButton label="Clear"><CloseIcon /></IconButton>`. */
67
+ render: useRender.RenderProp;
68
+ }>;
69
+ /**
70
+ * The button that empties the control, shown once it holds a value. It renders
71
+ * whichever button it is given.
72
+ *
73
+ * @example
74
+ * <TextInput.Clear render={<IconButton label="Clear" variant="tertiary" size="sm"><CloseIcon /></IconButton>} />
75
+ */
76
+ declare const TextInputClear: ({ render, className, ...props }: TextInputClearProps) => ReactNode;
77
+ export type TextInputActionProps = Omit<ComponentPropsWithRef<"button">, "children"> & Readonly<{
78
+ /** The button to render, such as `<Button variant="tertiary" size="sm">Search</Button>`. */
79
+ render: useRender.RenderProp;
68
80
  }>;
69
81
  /**
70
- * The icon-only button that empties the control, shown once it holds a value.
82
+ * Any button inside the group, in the place an inlay that acts takes, such as
83
+ * a search field's trailing "Search" button. It renders whichever button it is
84
+ * given, disabled while the field is.
71
85
  *
72
86
  * @example
73
- * <TextInput.Clear label="Clear"><CloseIcon /></TextInput.Clear>
87
+ * <TextInput.Action render={<Button variant="tertiary" size="sm" type="submit">Search</Button>} />
74
88
  */
75
- declare const TextInputClear: ({ label, className, children, }: TextInputClearProps) => ReactNode;
76
- export type TextInputCopyProps = Readonly<{
77
- /** Accessible name and tooltip hint, such as "Copy". */
78
- label: string;
79
- /** Accessible name and announcement while the confirmation shows, such as "Copied". */
89
+ declare const TextInputAction: ({ render, className, ...props }: TextInputActionProps) => ReactElement;
90
+ /** Where a copy stands: not tried, landed, or refused and selected instead. */
91
+ export type TextInputCopyOutcome = "idle" | "copied" | "failed";
92
+ /** The state a `Copy` part renders from, also set as `data-outcome`. */
93
+ export type TextInputCopyState = Readonly<{
94
+ outcome: TextInputCopyOutcome;
95
+ }>;
96
+ export type TextInputCopyProps = InlayButtonProps & Readonly<{
97
+ /** Announced once the value is on the clipboard, such as "Copied". */
80
98
  copiedLabel: string;
81
- /** Accessible name and announcement once copying failed and the text is selected instead. */
99
+ /** Announced once copying failed and the text is selected instead. */
82
100
  failedLabel: string;
83
- /** The icon while the confirmation shows. Left out, the button keeps its own. */
84
- copiedIcon?: ReactNode;
85
- /** The icon once copying failed. Left out, the button keeps its own. */
86
- failedIcon?: ReactNode;
87
- className?: string;
88
- /** The icon the button shows. */
89
- children: ReactNode;
101
+ /** The button to render, or a function of the copy's state that returns one. */
102
+ render: useRender.RenderProp<TextInputCopyState>;
90
103
  }>;
91
104
  /**
92
- * The icon-only button that copies the value to the clipboard, shown once it
93
- * holds one, and announces whether the copy landed.
105
+ * The button that copies the value to the clipboard, shown once it holds one,
106
+ * and announces whether the copy landed. It renders whichever button it is
107
+ * given, and a render function can follow the outcome.
94
108
  *
95
109
  * @example
96
- * <TextInput.Copy label="Copy" copiedLabel="Copied" failedLabel="Copy failed, text selected"><CopyIcon /></TextInput.Copy>
110
+ * <TextInput.Copy
111
+ * copiedLabel="Copied"
112
+ * failedLabel="Copy failed, text selected"
113
+ * render={(props, { outcome }) => (
114
+ * <IconButton {...props} label="Copy" variant="tertiary" size="sm">
115
+ * {outcome === "copied" ? <CheckIcon /> : <CopyIcon />}
116
+ * </IconButton>
117
+ * )}
118
+ * />
97
119
  */
98
- declare const TextInputCopy: ({ label, copiedLabel, failedLabel, copiedIcon, failedIcon, className, children, }: TextInputCopyProps) => ReactNode;
99
- export type TextInputRevealProps = Readonly<{
120
+ declare const TextInputCopy: ({ copiedLabel, failedLabel, render, className, ...props }: TextInputCopyProps) => ReactNode;
121
+ /** The state a `Reveal` part renders from, also set as `data-revealed`. */
122
+ export type TextInputRevealState = Readonly<{
123
+ revealed: boolean;
124
+ }>;
125
+ export type TextInputRevealProps = InlayButtonProps & Readonly<{
100
126
  /** Whether the concealed value shows as text. */
101
127
  revealed: boolean;
102
128
  onRevealedChange: (revealed: boolean) => void;
103
- /** Accessible name and tooltip hint, such as "Show password". */
104
- label: string;
105
- className?: string;
106
- /** The icon the button shows. */
107
- children: ReactNode;
129
+ /** The button to render, or a function of `revealed` that returns one. */
130
+ render: useRender.RenderProp<TextInputRevealState>;
108
131
  }>;
109
132
  /**
110
- * The icon-only toggle that shows a concealed value, such as a password, as
111
- * text. The caller switches the `Input`'s `type` with `revealed`.
133
+ * The toggle that shows a concealed value, such as a password, as text. The
134
+ * caller switches the `Input`'s `type` with `revealed`, and names the button for
135
+ * what a press will do.
112
136
  *
113
137
  * @example
114
- * <TextInput.Reveal revealed={revealed} onRevealedChange={setRevealed} label="Show password"><VisibilityIcon /></TextInput.Reveal>
138
+ * <TextInput.Reveal
139
+ * revealed={revealed}
140
+ * onRevealedChange={setRevealed}
141
+ * render={
142
+ * <Button variant="tertiary" size="sm">{revealed ? "Hide" : "Show"}</Button>
143
+ * }
144
+ * />
115
145
  */
116
- declare const TextInputReveal: ({ revealed, onRevealedChange, label, className, children, }: TextInputRevealProps) => ReactNode;
146
+ declare const TextInputReveal: ({ revealed, onRevealedChange, render, className, ...props }: TextInputRevealProps) => ReactNode;
117
147
  /**
118
148
  * The value's length against `Root`'s `maxLength`, toned as it nears the limit.
119
149
  * Renders nothing without a `maxLength`.
@@ -133,6 +163,7 @@ export type TextInputParts = Readonly<{
133
163
  Inlay: typeof TextInputInlay;
134
164
  Affix: typeof TextInputAffix;
135
165
  Input: typeof TextInputInput;
166
+ Action: typeof TextInputAction;
136
167
  Clear: typeof TextInputClear;
137
168
  Copy: typeof TextInputCopy;
138
169
  Reveal: typeof TextInputReveal;
@@ -144,19 +175,24 @@ export type TextInputParts = Readonly<{
144
175
  /**
145
176
  * The parts of a text input: the field frame, a group carrying the border and
146
177
  * its inlays, and the bare control inside it. A `Bar` is a strip of inlays along
147
- * the bottom edge of the group, for a control the inlays cannot sit beside. For
178
+ * the bottom edge of the group, for a control the inlays cannot sit beside, and
179
+ * an `Action` is any button placed in the group. For
148
180
  * the ordinary case, use the `TextField` shorthand, which is assembled from
149
181
  * exactly these parts. An `Affix` is decoration, so its meaning belongs in the
150
182
  * label or description too. `Error` renders the errors `Root` was given.
151
183
  *
152
184
  * @example
153
- * <TextInput.Root value={value} onValueChange={setValue} errors={errors} optionalLabel="optional">
154
- * <TextInput.Label>Email</TextInput.Label>
185
+ * <TextInput.Root value={value} onValueChange={setValue} errors={errors} requiredness="optional">
186
+ * <TextInput.Label>Email <Field.Requiredness optionalLabel="optional" /></TextInput.Label>
155
187
  * <TextInput.Group>
156
188
  * <TextInput.Input type="email" />
157
- * <TextInput.Clear label="Clear">
158
- * <CloseIcon />
159
- * </TextInput.Clear>
189
+ * <TextInput.Clear
190
+ * render={
191
+ * <IconButton label="Clear" variant="tertiary" size="sm">
192
+ * <CloseIcon />
193
+ * </IconButton>
194
+ * }
195
+ * />
160
196
  * </TextInput.Group>
161
197
  * <TextInput.Error />
162
198
  * </TextInput.Root>