@igne-agency/react-web-ui 0.3.1 → 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 (291) hide show
  1. package/README.md +32 -1
  2. package/dist/base.css +3 -0
  3. package/dist/components/accordion/accordion.css +24 -19
  4. package/dist/components/accordion/accordion.d.ts +19 -3
  5. package/dist/components/accordion/accordion.js +86 -32
  6. package/dist/components/accordion/accordion.module.js +8 -8
  7. package/dist/components/active-filters/active-filter-describers.d.ts +1 -1
  8. package/dist/components/active-filters/active-filter-describers.js +1 -1
  9. package/dist/components/active-filters/active-filters.d.ts +35 -2
  10. package/dist/components/active-filters/active-filters.js +57 -52
  11. package/dist/components/active-filters/index.js +2 -2
  12. package/dist/components/attachment-tile/attachment-preview.d.ts +11 -9
  13. package/dist/components/attachment-tile/attachment-preview.js +102 -68
  14. package/dist/components/attachment-tile/attachment-tile.css +22 -13
  15. package/dist/components/attachment-tile/attachment-tile.d.ts +51 -6
  16. package/dist/components/attachment-tile/attachment-tile.js +209 -85
  17. package/dist/components/attachment-tile/attachment-tile.module.js +10 -10
  18. package/dist/components/attachment-tile/index.d.ts +1 -1
  19. package/dist/components/attachment-tile/index.js +2 -2
  20. package/dist/components/avatar/avatar.d.ts +5 -5
  21. package/dist/components/avatar/avatar.js +64 -37
  22. package/dist/components/avatar-group/avatar-group.js +2 -2
  23. package/dist/components/badge/badge.js +1 -1
  24. package/dist/components/breadcrumbs/breadcrumbs.d.ts +22 -7
  25. package/dist/components/breadcrumbs/breadcrumbs.js +189 -170
  26. package/dist/components/button/button.d.ts +2 -3
  27. package/dist/components/button/button.js +58 -77
  28. package/dist/components/button/close-button.d.ts +4 -2
  29. package/dist/components/button/close-button.js +9 -9
  30. package/dist/components/checkbox-field/checkbox-field.d.ts +17 -3
  31. package/dist/components/checkbox-field/checkbox-field.js +108 -131
  32. package/dist/components/checkbox-field/checkbox.css +26 -34
  33. package/dist/components/checkbox-field/checkbox.d.ts +51 -8
  34. package/dist/components/checkbox-field/checkbox.js +221 -57
  35. package/dist/components/checkbox-field/checkbox.module.js +6 -8
  36. package/dist/components/checkbox-field/index.d.ts +0 -1
  37. package/dist/components/checkbox-field/index.js +1 -2
  38. package/dist/components/checkbox-field/tsf-checkbox-field.d.ts +2 -2
  39. package/dist/components/checkbox-group-field/checkbox-group-field.d.ts +4 -1
  40. package/dist/components/checkbox-group-field/checkbox-group-field.js +54 -50
  41. package/dist/components/checkbox-group-field/checkbox-group.d.ts +7 -2
  42. package/dist/components/checkbox-group-field/checkbox-group.js +8 -3
  43. package/dist/components/collapsible/collapsible.css +23 -18
  44. package/dist/components/collapsible/collapsible.d.ts +18 -3
  45. package/dist/components/collapsible/collapsible.js +85 -32
  46. package/dist/components/collapsible/collapsible.module.js +7 -7
  47. package/dist/components/combobox-field/combobox-field.d.ts +9 -1
  48. package/dist/components/combobox-field/combobox-field.js +195 -175
  49. package/dist/components/combobox-field/combobox-items.d.ts +2 -2
  50. package/dist/components/combobox-field/combobox-items.js +4 -4
  51. package/dist/components/combobox-field/combobox.css +99 -96
  52. package/dist/components/combobox-field/combobox.d.ts +94 -15
  53. package/dist/components/combobox-field/combobox.js +484 -159
  54. package/dist/components/combobox-field/combobox.module.js +21 -21
  55. package/dist/components/combobox-field/index.d.ts +0 -1
  56. package/dist/components/combobox-field/selection.d.ts +4 -1
  57. package/dist/components/combobox-field/value-state-view.css +7 -3
  58. package/dist/components/combobox-field/value-state-view.d.ts +4 -2
  59. package/dist/components/combobox-field/value-state-view.js +15 -15
  60. package/dist/components/combobox-field/value-state-view.module.js +6 -4
  61. package/dist/components/composer/composer-attachments.d.ts +11 -3
  62. package/dist/components/composer/composer-attachments.js +61 -47
  63. package/dist/components/composer/composer-editor.d.ts +2 -1
  64. package/dist/components/composer/composer-editor.js +79 -71
  65. package/dist/components/composer/composer-mentions.js +2 -2
  66. package/dist/components/composer/composer.d.ts +42 -21
  67. package/dist/components/composer/composer.js +201 -58
  68. package/dist/components/composer/mention-text.js +3 -3
  69. package/dist/components/confirm-dialog/confirm-dialog.d.ts +8 -7
  70. package/dist/components/confirm-dialog/confirm-dialog.js +10 -9
  71. package/dist/components/conversation/conversation.context.d.ts +0 -5
  72. package/dist/components/conversation/conversation.d.ts +63 -29
  73. package/dist/components/conversation/conversation.js +193 -82
  74. package/dist/components/conversation/index.d.ts +1 -1
  75. package/dist/components/date-field/date-field.d.ts +10 -4
  76. package/dist/components/date-field/date-field.js +57 -43
  77. package/dist/components/date-field/date-input.d.ts +20 -3
  78. package/dist/components/date-field/date-input.js +28 -13
  79. package/dist/components/date-field/index.d.ts +1 -1
  80. package/dist/components/date-field/tsf-date-field.d.ts +1 -1
  81. package/dist/components/date-field/tsf-date-field.js +1 -1
  82. package/dist/components/date-range-field/date-range-field.d.ts +8 -4
  83. package/dist/components/date-range-field/date-range-field.js +57 -45
  84. package/dist/components/date-range-field/date-range-input.d.ts +20 -3
  85. package/dist/components/date-range-field/date-range-input.js +27 -12
  86. package/dist/components/date-range-field/tsf-date-range-field.d.ts +1 -1
  87. package/dist/components/date-range-field/tsf-date-range-field.js +1 -1
  88. package/dist/components/detail-list/detail-list.d.ts +28 -27
  89. package/dist/components/detail-list/detail-list.js +177 -121
  90. package/dist/components/dialog/dialog.d.ts +47 -27
  91. package/dist/components/dialog/dialog.js +101 -38
  92. package/dist/components/divider/divider.js +1 -1
  93. package/dist/components/drawer/drawer.d.ts +48 -30
  94. package/dist/components/drawer/drawer.js +113 -41
  95. package/dist/components/email-field/email-field.d.ts +5 -3
  96. package/dist/components/email-field/email-field.js +1 -3
  97. package/dist/components/email-field/tsf-email-field.d.ts +3 -2
  98. package/dist/components/empty-message/empty-message.d.ts +3 -3
  99. package/dist/components/empty-message/empty-message.js +3 -3
  100. package/dist/components/error-boundary/error-boundary.d.ts +5 -2
  101. package/dist/components/error-boundary/error-boundary.js +2 -3
  102. package/dist/components/error-message/error-message.d.ts +1 -1
  103. package/dist/components/error-message/error-message.js +1 -1
  104. package/dist/components/error-text/error-text.js +3 -3
  105. package/dist/components/field/field.d.ts +5 -5
  106. package/dist/components/field/field.js +9 -9
  107. package/dist/components/field/index.js +2 -2
  108. package/dist/components/field/input-parts.js +1 -1
  109. package/dist/components/field-placeholder/field-placeholder.d.ts +4 -1
  110. package/dist/components/field-placeholder/field-placeholder.js +41 -26
  111. package/dist/components/fieldset/field-group.js +1 -1
  112. package/dist/components/fieldset/fieldset-root.js +1 -1
  113. package/dist/components/fieldset/fieldset.js +1 -1
  114. package/dist/components/file-field/file-field.css +19 -15
  115. package/dist/components/file-field/file-field.d.ts +10 -1
  116. package/dist/components/file-field/file-field.js +130 -109
  117. package/dist/components/file-field/file-field.module.js +6 -4
  118. package/dist/components/file-field/file-input.d.ts +32 -9
  119. package/dist/components/file-field/file-input.js +94 -74
  120. package/dist/components/filter-bar/filter-bar.d.ts +79 -51
  121. package/dist/components/filter-bar/filter-bar.js +552 -216
  122. package/dist/components/form/form.d.ts +4 -6
  123. package/dist/components/form/form.js +6 -8
  124. package/dist/components/icon/icon.d.ts +5 -10
  125. package/dist/components/icon/icon.js +4 -6
  126. package/dist/components/link/link.js +1 -1
  127. package/dist/components/link-button/link-button.d.ts +1 -2
  128. package/dist/components/link-button/link-button.js +12 -22
  129. package/dist/components/loading-message/loading-message.d.ts +2 -2
  130. package/dist/components/loading-message/loading-message.js +1 -1
  131. package/dist/components/locale-provider/locale-provider.js +1 -1
  132. package/dist/components/menu/menu.d.ts +40 -22
  133. package/dist/components/menu/menu.js +100 -40
  134. package/dist/components/nav/nav-context.d.ts +0 -1
  135. package/dist/components/nav/nav-context.js +1 -2
  136. package/dist/components/nav/nav-item-view.d.ts +7 -7
  137. package/dist/components/nav/nav-item-view.js +27 -51
  138. package/dist/components/nav/nav.css +72 -60
  139. package/dist/components/nav/nav.d.ts +15 -8
  140. package/dist/components/nav/nav.js +105 -52
  141. package/dist/components/nav/nav.module.js +14 -14
  142. package/dist/components/number-field/number-field.d.ts +7 -1
  143. package/dist/components/number-field/number-field.js +98 -82
  144. package/dist/components/number-field/number-input.d.ts +53 -4
  145. package/dist/components/number-field/number-input.js +68 -21
  146. package/dist/components/number-field/tsf-number-field.d.ts +1 -1
  147. package/dist/components/number-field/tsf-number-field.js +1 -1
  148. package/dist/components/otp-field/otp-input.d.ts +25 -0
  149. package/dist/components/otp-field/otp-input.js +26 -1
  150. package/dist/components/pagination/pagination.d.ts +82 -23
  151. package/dist/components/pagination/pagination.js +656 -229
  152. package/dist/components/password-field/password-field.d.ts +7 -1
  153. package/dist/components/password-field/password-field.js +117 -126
  154. package/dist/components/password-field/password-strength.js +1 -1
  155. package/dist/components/password-field/tsf-password-field.d.ts +1 -1
  156. package/dist/components/password-field/tsf-password-field.js +1 -1
  157. package/dist/components/photo-field/photo-field.d.ts +17 -3
  158. package/dist/components/photo-field/photo-field.js +168 -89
  159. package/dist/components/photo-field/photo-input-context.d.ts +25 -0
  160. package/dist/components/photo-field/photo-input-context.js +14 -0
  161. package/dist/components/photo-field/photo-input.d.ts +58 -23
  162. package/dist/components/photo-field/photo-input.js +459 -261
  163. package/dist/components/popover/popover.d.ts +55 -23
  164. package/dist/components/popover/popover.js +205 -61
  165. package/dist/components/radio-group-field/radio-group.js +1 -1
  166. package/dist/components/search-field/search-field.d.ts +7 -5
  167. package/dist/components/search-field/search-field.js +4 -6
  168. package/dist/components/search-field/tsf-search-field.d.ts +1 -1
  169. package/dist/components/search-field/tsf-search-field.js +1 -1
  170. package/dist/components/segmented-control-field/segmented-control.js +1 -1
  171. package/dist/components/select-field/select-field.d.ts +7 -1
  172. package/dist/components/select-field/select-field.js +151 -139
  173. package/dist/components/select-field/select.d.ts +28 -6
  174. package/dist/components/select-field/select.js +234 -149
  175. package/dist/components/skeleton/skeleton.js +1 -1
  176. package/dist/components/spinner/spinner.css +47 -1
  177. package/dist/components/spinner/spinner.js +28 -11
  178. package/dist/components/spinner/spinner.module.js +18 -3
  179. package/dist/components/stale/stale.d.ts +17 -21
  180. package/dist/components/stale/stale.js +307 -129
  181. package/dist/components/status-message/status-message.css +22 -21
  182. package/dist/components/status-message/status-message.d.ts +10 -5
  183. package/dist/components/status-message/status-message.js +20 -24
  184. package/dist/components/status-message/status-message.module.js +6 -6
  185. package/dist/components/status-message/status-preset.d.ts +4 -5
  186. package/dist/components/status-message/status-preset.js +3 -3
  187. package/dist/components/switch-field/switch.js +1 -1
  188. package/dist/components/tabs/tabs.d.ts +51 -28
  189. package/dist/components/tabs/tabs.js +219 -144
  190. package/dist/components/tag/tag.css +23 -21
  191. package/dist/components/tag/tag.d.ts +17 -15
  192. package/dist/components/tag/tag.js +140 -65
  193. package/dist/components/tag/tag.module.js +3 -3
  194. package/dist/components/tag-group/tag-group.css +30 -27
  195. package/dist/components/tag-group/tag-group.d.ts +10 -4
  196. package/dist/components/tag-group/tag-group.js +47 -35
  197. package/dist/components/tag-group/tag-group.module.js +4 -4
  198. package/dist/components/text-field/text-field.d.ts +14 -3
  199. package/dist/components/text-field/text-field.js +154 -133
  200. package/dist/components/text-field/text-input.d.ts +89 -3
  201. package/dist/components/text-field/text-input.js +184 -70
  202. package/dist/components/textarea-field/textarea.js +1 -1
  203. package/dist/components/time-field/time-input.d.ts +6 -0
  204. package/dist/components/time-field/time-input.js +6 -0
  205. package/dist/components/time-zone-provider/time-zone-provider.js +1 -1
  206. package/dist/components/toast/index.js +2 -2
  207. package/dist/components/toast/toast-provider.css +38 -34
  208. package/dist/components/toast/toast-provider.d.ts +65 -3
  209. package/dist/components/toast/toast-provider.js +313 -148
  210. package/dist/components/toast/toast-provider.module.js +11 -17
  211. package/dist/components/toast/toast.d.ts +5 -1
  212. package/dist/components/toast/toast.js +2 -1
  213. package/dist/components/toggle-group-field/toggle-group.js +1 -1
  214. package/dist/components/tooltip/tooltip.d.ts +6 -6
  215. package/dist/components/tooltip/tooltip.js +7 -7
  216. package/dist/data-table/data-table-content.d.ts +18 -10
  217. package/dist/data-table/data-table-content.js +145 -290
  218. package/dist/data-table/data-table-context.d.ts +4 -2
  219. package/dist/data-table/data-table-context.js +1 -1
  220. package/dist/data-table/data-table-parts.d.ts +99 -0
  221. package/dist/data-table/data-table-parts.js +1182 -0
  222. package/dist/data-table/data-table-selection.d.ts +7 -3
  223. package/dist/data-table/data-table-selection.js +62 -37
  224. package/dist/data-table/data-table.css +100 -95
  225. package/dist/data-table/data-table.d.ts +49 -25
  226. package/dist/data-table/data-table.js +95 -83
  227. package/dist/data-table/data-table.module.js +34 -34
  228. package/dist/data-table/index.d.ts +2 -1
  229. package/dist/data-table/index.js +2 -1
  230. package/dist/data-view/use-data-view.d.ts +2 -2
  231. package/dist/data-view/use-data-view.js +2 -2
  232. package/dist/index.js +7 -8
  233. package/dist/lib/calendar/calendar-navigation.d.ts +9 -2
  234. package/dist/lib/calendar/calendar-navigation.js +72 -73
  235. package/dist/lib/calendar/calendar-year.d.ts +4 -3
  236. package/dist/lib/calendar/calendar-year.js +137 -156
  237. package/dist/lib/calendar/temporal.d.ts +18 -12
  238. package/dist/lib/calendar/temporal.js +191 -147
  239. package/dist/lib/table-storage.d.ts +2 -2
  240. package/dist/lib/table-storage.js +2 -2
  241. package/dist/lib/unsaved-changes/leave-guard.js +1 -1
  242. package/dist/terrazzo/index.d.ts +20 -3
  243. package/dist/terrazzo/index.js +110 -7
  244. package/dist/tokens.css +94 -71
  245. package/package.json +4 -3
  246. package/tokens/ref.tokens.json +0 -30
  247. package/tokens/sys.tokens.json +0 -7
  248. package/dist/assets/spinner.js +0 -28
  249. package/dist/components/checkbox-field/checkbox-glyph.d.ts +0 -12
  250. package/dist/components/checkbox-field/checkbox-glyph.js +0 -38
  251. package/dist/components/combobox-field/combobox-popup-body.d.ts +0 -34
  252. package/dist/components/combobox-field/combobox-popup-body.js +0 -142
  253. package/dist/components/conversation/conversation.context.js +0 -4
  254. package/dist/vendor/@material-design-icons/svg/outlined/add.js +0 -12
  255. package/dist/vendor/@material-design-icons/svg/outlined/arrow_downward.js +0 -12
  256. package/dist/vendor/@material-design-icons/svg/outlined/arrow_forward.js +0 -12
  257. package/dist/vendor/@material-design-icons/svg/outlined/arrow_upward.js +0 -12
  258. package/dist/vendor/@material-design-icons/svg/outlined/attach_file.js +0 -12
  259. package/dist/vendor/@material-design-icons/svg/outlined/block.js +0 -12
  260. package/dist/vendor/@material-design-icons/svg/outlined/calendar_today.js +0 -12
  261. package/dist/vendor/@material-design-icons/svg/outlined/check.js +0 -12
  262. package/dist/vendor/@material-design-icons/svg/outlined/check_circle.js +0 -12
  263. package/dist/vendor/@material-design-icons/svg/outlined/chevron_left.js +0 -12
  264. package/dist/vendor/@material-design-icons/svg/outlined/chevron_right.js +0 -12
  265. package/dist/vendor/@material-design-icons/svg/outlined/close.js +0 -12
  266. package/dist/vendor/@material-design-icons/svg/outlined/content_copy.js +0 -12
  267. package/dist/vendor/@material-design-icons/svg/outlined/date_range.js +0 -12
  268. package/dist/vendor/@material-design-icons/svg/outlined/description.js +0 -12
  269. package/dist/vendor/@material-design-icons/svg/outlined/download.js +0 -12
  270. package/dist/vendor/@material-design-icons/svg/outlined/error.js +0 -12
  271. package/dist/vendor/@material-design-icons/svg/outlined/error_outline.js +0 -12
  272. package/dist/vendor/@material-design-icons/svg/outlined/expand_less.js +0 -12
  273. package/dist/vendor/@material-design-icons/svg/outlined/expand_more.js +0 -12
  274. package/dist/vendor/@material-design-icons/svg/outlined/filter_alt.js +0 -12
  275. package/dist/vendor/@material-design-icons/svg/outlined/filter_alt_off.js +0 -12
  276. package/dist/vendor/@material-design-icons/svg/outlined/first_page.js +0 -12
  277. package/dist/vendor/@material-design-icons/svg/outlined/info.js +0 -12
  278. package/dist/vendor/@material-design-icons/svg/outlined/keyboard_arrow_down.js +0 -12
  279. package/dist/vendor/@material-design-icons/svg/outlined/last_page.js +0 -12
  280. package/dist/vendor/@material-design-icons/svg/outlined/mail.js +0 -12
  281. package/dist/vendor/@material-design-icons/svg/outlined/more_horiz.js +0 -12
  282. package/dist/vendor/@material-design-icons/svg/outlined/photo_camera.js +0 -12
  283. package/dist/vendor/@material-design-icons/svg/outlined/remove.js +0 -12
  284. package/dist/vendor/@material-design-icons/svg/outlined/restart_alt.js +0 -12
  285. package/dist/vendor/@material-design-icons/svg/outlined/restore.js +0 -12
  286. package/dist/vendor/@material-design-icons/svg/outlined/search.js +0 -12
  287. package/dist/vendor/@material-design-icons/svg/outlined/unfold_more.js +0 -12
  288. package/dist/vendor/@material-design-icons/svg/outlined/upload_file.js +0 -12
  289. package/dist/vendor/@material-design-icons/svg/outlined/visibility.js +0 -12
  290. package/dist/vendor/@material-design-icons/svg/outlined/visibility_off.js +0 -12
  291. package/dist/vendor/@material-design-icons/svg/outlined/warning_amber.js +0 -12
@@ -24,6 +24,10 @@ export type PasswordFieldBaseProps = Omit<TextFieldBaseProps, "type" | "icon" |
24
24
  showPasswordLabel: string;
25
25
  /** The reveal button's accessible name while the password shows, such as "Hide password". */
26
26
  hidePasswordLabel: string;
27
+ /** The reveal button's icon while the password is hidden. */
28
+ showPasswordIcon: ReactNode;
29
+ /** The reveal button's icon while the password shows. */
30
+ hidePasswordIcon: ReactNode;
27
31
  }>;
28
32
  export type PasswordFieldProps = PasswordFieldBaseProps & PasswordFieldStrengthProps;
29
33
  /**
@@ -36,9 +40,11 @@ export type PasswordFieldProps = PasswordFieldBaseProps & PasswordFieldStrengthP
36
40
  * optionalLabel="optional"
37
41
  * showPasswordLabel="Show password"
38
42
  * hidePasswordLabel="Hide password"
43
+ * showPasswordIcon={<VisibilityIcon />}
44
+ * hidePasswordIcon={<VisibilityOffIcon />}
39
45
  * value={password}
40
46
  * onValueChange={setPassword}
41
47
  * autoComplete="current-password"
42
48
  * />
43
49
  */
44
- export declare const PasswordField: ({ label, description, errors, requiredness, optionalLabel, showPasswordLabel, hidePasswordLabel, strength, strengthLabel, scoreLabels, languages, value, onValueChange, disabled, readOnly, dirty, touched, pending, state, className, ...inputProps }: PasswordFieldProps) => ReactNode;
50
+ export declare const PasswordField: ({ label, description, errors, requiredness, optionalLabel, showPasswordLabel, hidePasswordLabel, showPasswordIcon, hidePasswordIcon, strength, strengthLabel, scoreLabels, languages, value, onValueChange, disabled, readOnly, dirty, touched, pending, state, className, ...inputProps }: PasswordFieldProps) => ReactNode;
@@ -1,12 +1,8 @@
1
- import SvgVisibility from "../../vendor/@material-design-icons/svg/outlined/visibility.js";
2
- import SvgVisibilityOff from "../../vendor/@material-design-icons/svg/outlined/visibility_off.js";
3
- import { Button } from "../button/button.js";
4
1
  import { TextInput } from "../text-field/text-input.js";
5
- import text_field_module_default from "../text-field/text-field.module.js";
6
2
  import { PasswordStrength } from "./password-strength.js";
7
3
  import { c } from "react/compiler-runtime";
8
- import { useState } from "react";
9
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { useState } from "react";
10
6
  // src/components/password-field/password-field.tsx
11
7
  /**
12
8
  * A password field with a reveal toggle, and optionally a strength meter fed by
@@ -18,18 +14,21 @@ import { jsx, jsxs } from "react/jsx-runtime";
18
14
  * optionalLabel="optional"
19
15
  * showPasswordLabel="Show password"
20
16
  * hidePasswordLabel="Hide password"
17
+ * showPasswordIcon={<VisibilityIcon />}
18
+ * hidePasswordIcon={<VisibilityOffIcon />}
21
19
  * value={password}
22
20
  * onValueChange={setPassword}
23
21
  * autoComplete="current-password"
24
22
  * />
25
23
  */
26
24
  var PasswordField = (t0) => {
27
- const $ = c(65);
25
+ const $ = c(63);
28
26
  let className;
29
27
  let description;
30
28
  let dirty;
31
29
  let disabled;
32
30
  let errors;
31
+ let hidePasswordIcon;
33
32
  let hidePasswordLabel;
34
33
  let inputProps;
35
34
  let label;
@@ -40,6 +39,7 @@ var PasswordField = (t0) => {
40
39
  let readOnly;
41
40
  let requiredness;
42
41
  let scoreLabels;
42
+ let showPasswordIcon;
43
43
  let showPasswordLabel;
44
44
  let state;
45
45
  let strength;
@@ -47,143 +47,134 @@ var PasswordField = (t0) => {
47
47
  let touched;
48
48
  let value;
49
49
  if ($[0] !== t0) {
50
- ({label, description, errors, requiredness, optionalLabel, showPasswordLabel, hidePasswordLabel, strength, strengthLabel, scoreLabels, languages, value, onValueChange, disabled, readOnly, dirty, touched, pending, state, className, ...inputProps} = t0);
50
+ ({label, description, errors, requiredness, optionalLabel, showPasswordLabel, hidePasswordLabel, showPasswordIcon, hidePasswordIcon, strength, strengthLabel, scoreLabels, languages, value, onValueChange, disabled, readOnly, dirty, touched, pending, state, className, ...inputProps} = t0);
51
51
  $[0] = t0;
52
52
  $[1] = className;
53
53
  $[2] = description;
54
54
  $[3] = dirty;
55
55
  $[4] = disabled;
56
56
  $[5] = errors;
57
- $[6] = hidePasswordLabel;
58
- $[7] = inputProps;
59
- $[8] = label;
60
- $[9] = languages;
61
- $[10] = onValueChange;
62
- $[11] = optionalLabel;
63
- $[12] = pending;
64
- $[13] = readOnly;
65
- $[14] = requiredness;
66
- $[15] = scoreLabels;
67
- $[16] = showPasswordLabel;
68
- $[17] = state;
69
- $[18] = strength;
70
- $[19] = strengthLabel;
71
- $[20] = touched;
72
- $[21] = value;
57
+ $[6] = hidePasswordIcon;
58
+ $[7] = hidePasswordLabel;
59
+ $[8] = inputProps;
60
+ $[9] = label;
61
+ $[10] = languages;
62
+ $[11] = onValueChange;
63
+ $[12] = optionalLabel;
64
+ $[13] = pending;
65
+ $[14] = readOnly;
66
+ $[15] = requiredness;
67
+ $[16] = scoreLabels;
68
+ $[17] = showPasswordIcon;
69
+ $[18] = showPasswordLabel;
70
+ $[19] = state;
71
+ $[20] = strength;
72
+ $[21] = strengthLabel;
73
+ $[22] = touched;
74
+ $[23] = value;
73
75
  } else {
74
76
  className = $[1];
75
77
  description = $[2];
76
78
  dirty = $[3];
77
79
  disabled = $[4];
78
80
  errors = $[5];
79
- hidePasswordLabel = $[6];
80
- inputProps = $[7];
81
- label = $[8];
82
- languages = $[9];
83
- onValueChange = $[10];
84
- optionalLabel = $[11];
85
- pending = $[12];
86
- readOnly = $[13];
87
- requiredness = $[14];
88
- scoreLabels = $[15];
89
- showPasswordLabel = $[16];
90
- state = $[17];
91
- strength = $[18];
92
- strengthLabel = $[19];
93
- touched = $[20];
94
- value = $[21];
81
+ hidePasswordIcon = $[6];
82
+ hidePasswordLabel = $[7];
83
+ inputProps = $[8];
84
+ label = $[9];
85
+ languages = $[10];
86
+ onValueChange = $[11];
87
+ optionalLabel = $[12];
88
+ pending = $[13];
89
+ readOnly = $[14];
90
+ requiredness = $[15];
91
+ scoreLabels = $[16];
92
+ showPasswordIcon = $[17];
93
+ showPasswordLabel = $[18];
94
+ state = $[19];
95
+ strength = $[20];
96
+ strengthLabel = $[21];
97
+ touched = $[22];
98
+ value = $[23];
95
99
  }
96
100
  const [revealed, setRevealed] = useState(false);
97
101
  let t1;
98
- if ($[22] !== label) {
102
+ if ($[24] !== label) {
99
103
  t1 = /* @__PURE__ */ jsx(TextInput.Label, { children: label });
100
- $[22] = label;
101
- $[23] = t1;
102
- } else t1 = $[23];
104
+ $[24] = label;
105
+ $[25] = t1;
106
+ } else t1 = $[25];
103
107
  const t2 = revealed ? "text" : "password";
104
108
  let t3;
105
- if ($[24] !== inputProps || $[25] !== t2) {
109
+ if ($[26] !== inputProps || $[27] !== t2) {
106
110
  t3 = /* @__PURE__ */ jsx(TextInput.Input, {
107
111
  ...inputProps,
108
112
  type: t2
109
113
  });
110
- $[24] = inputProps;
111
- $[25] = t2;
112
- $[26] = t3;
113
- } else t3 = $[26];
114
+ $[26] = inputProps;
115
+ $[27] = t2;
116
+ $[28] = t3;
117
+ } else t3 = $[28];
114
118
  let t4;
115
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
119
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
116
120
  t4 = /* @__PURE__ */ jsx(TextInput.Pending, {});
117
- $[27] = t4;
118
- } else t4 = $[27];
119
- const t5 = revealed ? SvgVisibilityOff : SvgVisibility;
120
- const t6 = revealed ? hidePasswordLabel : showPasswordLabel;
121
+ $[29] = t4;
122
+ } else t4 = $[29];
123
+ const t5 = revealed ? hidePasswordLabel : showPasswordLabel;
124
+ const t6 = revealed ? hidePasswordIcon : showPasswordIcon;
121
125
  let t7;
122
- if ($[28] !== revealed) {
123
- t7 = () => setRevealed(!revealed);
124
- $[28] = revealed;
125
- $[29] = t7;
126
- } else t7 = $[29];
127
- let t8;
128
- if ($[30] !== disabled || $[31] !== revealed || $[32] !== t5 || $[33] !== t6 || $[34] !== t7) {
129
- t8 = /* @__PURE__ */ jsx(Button, {
130
- iconOnly: true,
131
- icon: t5,
132
- label: t6,
133
- variant: "tertiary",
134
- size: "sm",
135
- "aria-pressed": revealed,
136
- disabled,
137
- className: text_field_module_default.action,
138
- onClick: t7
126
+ if ($[30] !== revealed || $[31] !== t5 || $[32] !== t6) {
127
+ t7 = /* @__PURE__ */ jsx(TextInput.Reveal, {
128
+ revealed,
129
+ onRevealedChange: setRevealed,
130
+ label: t5,
131
+ children: t6
139
132
  });
140
- $[30] = disabled;
141
- $[31] = revealed;
142
- $[32] = t5;
143
- $[33] = t6;
144
- $[34] = t7;
145
- $[35] = t8;
146
- } else t8 = $[35];
147
- let t9;
148
- if ($[36] !== t3 || $[37] !== t8) {
149
- t9 = /* @__PURE__ */ jsxs(TextInput.Group, { children: [
133
+ $[30] = revealed;
134
+ $[31] = t5;
135
+ $[32] = t6;
136
+ $[33] = t7;
137
+ } else t7 = $[33];
138
+ let t8;
139
+ if ($[34] !== t3 || $[35] !== t7) {
140
+ t8 = /* @__PURE__ */ jsxs(TextInput.Group, { children: [
150
141
  t3,
151
142
  t4,
152
- t8
143
+ t7
153
144
  ] });
154
- $[36] = t3;
155
- $[37] = t8;
156
- $[38] = t9;
157
- } else t9 = $[38];
158
- let t10;
159
- if ($[39] !== languages || $[40] !== scoreLabels || $[41] !== strength || $[42] !== strengthLabel || $[43] !== value) {
160
- t10 = strength === true && /* @__PURE__ */ jsx(PasswordStrength, {
145
+ $[34] = t3;
146
+ $[35] = t7;
147
+ $[36] = t8;
148
+ } else t8 = $[36];
149
+ let t9;
150
+ if ($[37] !== languages || $[38] !== scoreLabels || $[39] !== strength || $[40] !== strengthLabel || $[41] !== value) {
151
+ t9 = strength === true && /* @__PURE__ */ jsx(PasswordStrength, {
161
152
  password: value,
162
153
  label: strengthLabel,
163
154
  scoreLabels,
164
155
  languages
165
156
  });
166
- $[39] = languages;
167
- $[40] = scoreLabels;
168
- $[41] = strength;
169
- $[42] = strengthLabel;
170
- $[43] = value;
157
+ $[37] = languages;
158
+ $[38] = scoreLabels;
159
+ $[39] = strength;
160
+ $[40] = strengthLabel;
161
+ $[41] = value;
162
+ $[42] = t9;
163
+ } else t9 = $[42];
164
+ let t10;
165
+ if ($[43] !== description) {
166
+ t10 = /* @__PURE__ */ jsx(TextInput.Description, { children: description });
167
+ $[43] = description;
171
168
  $[44] = t10;
172
169
  } else t10 = $[44];
173
170
  let t11;
174
- if ($[45] !== description) {
175
- t11 = /* @__PURE__ */ jsx(TextInput.Description, { children: description });
176
- $[45] = description;
177
- $[46] = t11;
178
- } else t11 = $[46];
171
+ if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
172
+ t11 = /* @__PURE__ */ jsx(TextInput.Error, {});
173
+ $[45] = t11;
174
+ } else t11 = $[45];
179
175
  let t12;
180
- if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
181
- t12 = /* @__PURE__ */ jsx(TextInput.Error, {});
182
- $[47] = t12;
183
- } else t12 = $[47];
184
- let t13;
185
- if ($[48] !== className || $[49] !== dirty || $[50] !== disabled || $[51] !== errors || $[52] !== onValueChange || $[53] !== optionalLabel || $[54] !== pending || $[55] !== readOnly || $[56] !== requiredness || $[57] !== state || $[58] !== t1 || $[59] !== t10 || $[60] !== t11 || $[61] !== t9 || $[62] !== touched || $[63] !== value) {
186
- t13 = /* @__PURE__ */ jsxs(TextInput.Root, {
176
+ if ($[46] !== className || $[47] !== dirty || $[48] !== disabled || $[49] !== errors || $[50] !== onValueChange || $[51] !== optionalLabel || $[52] !== pending || $[53] !== readOnly || $[54] !== requiredness || $[55] !== state || $[56] !== t1 || $[57] !== t10 || $[58] !== t8 || $[59] !== t9 || $[60] !== touched || $[61] !== value) {
177
+ t12 = /* @__PURE__ */ jsxs(TextInput.Root, {
187
178
  value,
188
179
  onValueChange,
189
180
  disabled,
@@ -198,30 +189,30 @@ var PasswordField = (t0) => {
198
189
  className,
199
190
  children: [
200
191
  t1,
192
+ t8,
201
193
  t9,
202
194
  t10,
203
- t11,
204
- t12
195
+ t11
205
196
  ]
206
197
  });
207
- $[48] = className;
208
- $[49] = dirty;
209
- $[50] = disabled;
210
- $[51] = errors;
211
- $[52] = onValueChange;
212
- $[53] = optionalLabel;
213
- $[54] = pending;
214
- $[55] = readOnly;
215
- $[56] = requiredness;
216
- $[57] = state;
217
- $[58] = t1;
218
- $[59] = t10;
219
- $[60] = t11;
220
- $[61] = t9;
221
- $[62] = touched;
222
- $[63] = value;
223
- $[64] = t13;
224
- } else t13 = $[64];
225
- return t13;
198
+ $[46] = className;
199
+ $[47] = dirty;
200
+ $[48] = disabled;
201
+ $[49] = errors;
202
+ $[50] = onValueChange;
203
+ $[51] = optionalLabel;
204
+ $[52] = pending;
205
+ $[53] = readOnly;
206
+ $[54] = requiredness;
207
+ $[55] = state;
208
+ $[56] = t1;
209
+ $[57] = t10;
210
+ $[58] = t8;
211
+ $[59] = t9;
212
+ $[60] = touched;
213
+ $[61] = value;
214
+ $[62] = t12;
215
+ } else t12 = $[62];
216
+ return t12;
226
217
  };
227
218
  export { PasswordField };
@@ -2,8 +2,8 @@ import { usePasswordStrength } from "../../lib/password-strength/password-streng
2
2
  import { useLocale } from "../locale-provider/locale-provider.js";
3
3
  import password_field_module_default from "./password-field.module.js";
4
4
  import { c } from "react/compiler-runtime";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
5
  import { clsx } from "clsx";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { Meter } from "@base-ui/react/meter";
8
8
  // src/components/password-field/password-strength.tsx
9
9
  var MAX_SCORE = 4;
@@ -8,7 +8,7 @@ export type TSFPasswordFieldProps = Omit<PasswordFieldBaseProps, keyof Connected
8
8
  *
9
9
  * @example
10
10
  * <form.AppField name="password">
11
- * {field => <field.PasswordField label="Password" optionalLabel="optional" showPasswordLabel="Show password" hidePasswordLabel="Hide password" />}
11
+ * {field => <field.PasswordField label="Password" optionalLabel="optional" showPasswordLabel="Show password" hidePasswordLabel="Hide password" showPasswordIcon={<VisibilityIcon />} hidePasswordIcon={<VisibilityOffIcon />} />}
12
12
  * </form.AppField>
13
13
  */
14
14
  export declare const TSFPasswordField: (props: TSFPasswordFieldProps) => ReactNode;
@@ -9,7 +9,7 @@ import { jsx } from "react/jsx-runtime";
9
9
  *
10
10
  * @example
11
11
  * <form.AppField name="password">
12
- * {field => <field.PasswordField label="Password" optionalLabel="optional" showPasswordLabel="Show password" hidePasswordLabel="Hide password" />}
12
+ * {field => <field.PasswordField label="Password" optionalLabel="optional" showPasswordLabel="Show password" hidePasswordLabel="Hide password" showPasswordIcon={<VisibilityIcon />} hidePasswordIcon={<VisibilityOffIcon />} />}
13
13
  * </form.AppField>
14
14
  */
15
15
  var TSFPasswordField = (props) => {
@@ -1,7 +1,19 @@
1
1
  import type { ReactNode } from "react";
2
2
  import { type FieldProps } from "../field/index.ts";
3
- import { type PhotoInputPreviewProps, type PhotoInputProps } from "./photo-input.tsx";
4
- export type PhotoFieldProps = Omit<PhotoInputProps, keyof PhotoInputPreviewProps | "labelledBy" | "describedBy" | "invalid" | "pending"> & PhotoInputPreviewProps & FieldProps & Readonly<{
3
+ import { type PhotoInputPreviewProps, type PhotoInputRootProps } from "./photo-input.tsx";
4
+ export type PhotoFieldProps = Pick<PhotoInputRootProps, "value" | "onValueChange" | "accept" | "name" | "readOnly" | "onBlur"> & PhotoInputPreviewProps & FieldProps & Readonly<{
5
+ /** The picked photo's alternative text, such as "Preview". */
6
+ previewLabel: string;
7
+ /** What the control announces while a photo is set, such as "Photo set". */
8
+ photoSetLabel: string;
9
+ /** What the control announces while no photo is set, such as "No photo". */
10
+ noPhotoLabel: string;
11
+ /** Accessible name of the button that removes a picked photo, such as "Remove photo". */
12
+ removeLabel: string;
13
+ /** The remove button's icon, such as a cross. */
14
+ removeIcon: ReactNode;
15
+ /** The badge on the circle's rim, such as a camera icon. */
16
+ icon?: ReactNode;
5
17
  /** Applied to the field, where a caller lays it out itself. */
6
18
  className?: string;
7
19
  }>;
@@ -20,10 +32,12 @@ export type PhotoFieldProps = Omit<PhotoInputProps, keyof PhotoInputPreviewProps
20
32
  * hasStoredImage={user.photo !== null}
21
33
  * defaultPreview={<Avatar name={user.name} />}
22
34
  * accept={["image/png", "image/jpeg"]}
35
+ * icon={<PhotoCameraIcon />}
23
36
  * previewLabel="Preview"
24
37
  * photoSetLabel="Photo set"
25
38
  * noPhotoLabel="No photo"
26
39
  * removeLabel="Remove photo"
40
+ * removeIcon={<CloseIcon />}
27
41
  * />
28
42
  */
29
- export declare const PhotoField: ({ label, description, errors, requiredness, optionalLabel, dirty, touched, pending, readOnly, className, ...controlProps }: PhotoFieldProps) => ReactNode;
43
+ export declare const PhotoField: ({ label, description, errors, requiredness, optionalLabel, dirty, touched, pending, readOnly, className, defaultPreview, hasStoredImage, previewLabel, photoSetLabel, noPhotoLabel, removeLabel, removeIcon, icon, ...controlProps }: PhotoFieldProps) => ReactNode;