@igne-agency/react-web-ui 0.3.1 → 0.4.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 (290) hide show
  1. package/README.md +32 -1
  2. package/dist/components/accordion/accordion.css +24 -19
  3. package/dist/components/accordion/accordion.d.ts +19 -3
  4. package/dist/components/accordion/accordion.js +86 -32
  5. package/dist/components/accordion/accordion.module.js +8 -8
  6. package/dist/components/active-filters/active-filter-describers.d.ts +1 -1
  7. package/dist/components/active-filters/active-filter-describers.js +1 -1
  8. package/dist/components/active-filters/active-filters.d.ts +35 -2
  9. package/dist/components/active-filters/active-filters.js +57 -52
  10. package/dist/components/active-filters/index.js +2 -2
  11. package/dist/components/attachment-tile/attachment-preview.d.ts +11 -9
  12. package/dist/components/attachment-tile/attachment-preview.js +102 -68
  13. package/dist/components/attachment-tile/attachment-tile.css +22 -13
  14. package/dist/components/attachment-tile/attachment-tile.d.ts +51 -6
  15. package/dist/components/attachment-tile/attachment-tile.js +209 -85
  16. package/dist/components/attachment-tile/attachment-tile.module.js +10 -10
  17. package/dist/components/attachment-tile/index.d.ts +1 -1
  18. package/dist/components/attachment-tile/index.js +2 -2
  19. package/dist/components/avatar/avatar.d.ts +5 -5
  20. package/dist/components/avatar/avatar.js +64 -37
  21. package/dist/components/avatar-group/avatar-group.js +2 -2
  22. package/dist/components/badge/badge.js +1 -1
  23. package/dist/components/breadcrumbs/breadcrumbs.d.ts +22 -7
  24. package/dist/components/breadcrumbs/breadcrumbs.js +189 -170
  25. package/dist/components/button/button.d.ts +2 -3
  26. package/dist/components/button/button.js +58 -77
  27. package/dist/components/button/close-button.d.ts +4 -2
  28. package/dist/components/button/close-button.js +9 -9
  29. package/dist/components/checkbox-field/checkbox-field.d.ts +17 -3
  30. package/dist/components/checkbox-field/checkbox-field.js +108 -131
  31. package/dist/components/checkbox-field/checkbox.css +26 -34
  32. package/dist/components/checkbox-field/checkbox.d.ts +51 -8
  33. package/dist/components/checkbox-field/checkbox.js +221 -57
  34. package/dist/components/checkbox-field/checkbox.module.js +6 -8
  35. package/dist/components/checkbox-field/index.d.ts +0 -1
  36. package/dist/components/checkbox-field/index.js +1 -2
  37. package/dist/components/checkbox-field/tsf-checkbox-field.d.ts +2 -2
  38. package/dist/components/checkbox-group-field/checkbox-group-field.d.ts +4 -1
  39. package/dist/components/checkbox-group-field/checkbox-group-field.js +54 -50
  40. package/dist/components/checkbox-group-field/checkbox-group.d.ts +7 -2
  41. package/dist/components/checkbox-group-field/checkbox-group.js +8 -3
  42. package/dist/components/collapsible/collapsible.css +23 -18
  43. package/dist/components/collapsible/collapsible.d.ts +18 -3
  44. package/dist/components/collapsible/collapsible.js +85 -32
  45. package/dist/components/collapsible/collapsible.module.js +7 -7
  46. package/dist/components/combobox-field/combobox-field.d.ts +9 -1
  47. package/dist/components/combobox-field/combobox-field.js +195 -175
  48. package/dist/components/combobox-field/combobox-items.d.ts +2 -2
  49. package/dist/components/combobox-field/combobox-items.js +4 -4
  50. package/dist/components/combobox-field/combobox.css +99 -96
  51. package/dist/components/combobox-field/combobox.d.ts +94 -15
  52. package/dist/components/combobox-field/combobox.js +484 -159
  53. package/dist/components/combobox-field/combobox.module.js +21 -21
  54. package/dist/components/combobox-field/index.d.ts +0 -1
  55. package/dist/components/combobox-field/selection.d.ts +4 -1
  56. package/dist/components/combobox-field/value-state-view.css +7 -3
  57. package/dist/components/combobox-field/value-state-view.d.ts +4 -2
  58. package/dist/components/combobox-field/value-state-view.js +15 -15
  59. package/dist/components/combobox-field/value-state-view.module.js +6 -4
  60. package/dist/components/composer/composer-attachments.d.ts +11 -3
  61. package/dist/components/composer/composer-attachments.js +61 -47
  62. package/dist/components/composer/composer-editor.d.ts +2 -1
  63. package/dist/components/composer/composer-editor.js +79 -71
  64. package/dist/components/composer/composer-mentions.js +2 -2
  65. package/dist/components/composer/composer.d.ts +42 -21
  66. package/dist/components/composer/composer.js +201 -58
  67. package/dist/components/composer/mention-text.js +3 -3
  68. package/dist/components/confirm-dialog/confirm-dialog.d.ts +8 -7
  69. package/dist/components/confirm-dialog/confirm-dialog.js +10 -9
  70. package/dist/components/conversation/conversation.context.d.ts +0 -5
  71. package/dist/components/conversation/conversation.d.ts +63 -29
  72. package/dist/components/conversation/conversation.js +193 -82
  73. package/dist/components/conversation/index.d.ts +1 -1
  74. package/dist/components/date-field/date-field.d.ts +10 -4
  75. package/dist/components/date-field/date-field.js +57 -43
  76. package/dist/components/date-field/date-input.d.ts +20 -3
  77. package/dist/components/date-field/date-input.js +28 -13
  78. package/dist/components/date-field/index.d.ts +1 -1
  79. package/dist/components/date-field/tsf-date-field.d.ts +1 -1
  80. package/dist/components/date-field/tsf-date-field.js +1 -1
  81. package/dist/components/date-range-field/date-range-field.d.ts +8 -4
  82. package/dist/components/date-range-field/date-range-field.js +57 -45
  83. package/dist/components/date-range-field/date-range-input.d.ts +20 -3
  84. package/dist/components/date-range-field/date-range-input.js +27 -12
  85. package/dist/components/date-range-field/tsf-date-range-field.d.ts +1 -1
  86. package/dist/components/date-range-field/tsf-date-range-field.js +1 -1
  87. package/dist/components/detail-list/detail-list.d.ts +28 -27
  88. package/dist/components/detail-list/detail-list.js +177 -121
  89. package/dist/components/dialog/dialog.d.ts +47 -27
  90. package/dist/components/dialog/dialog.js +101 -38
  91. package/dist/components/divider/divider.js +1 -1
  92. package/dist/components/drawer/drawer.d.ts +48 -30
  93. package/dist/components/drawer/drawer.js +113 -41
  94. package/dist/components/email-field/email-field.d.ts +5 -3
  95. package/dist/components/email-field/email-field.js +1 -3
  96. package/dist/components/email-field/tsf-email-field.d.ts +3 -2
  97. package/dist/components/empty-message/empty-message.d.ts +3 -3
  98. package/dist/components/empty-message/empty-message.js +3 -3
  99. package/dist/components/error-boundary/error-boundary.d.ts +5 -2
  100. package/dist/components/error-boundary/error-boundary.js +2 -3
  101. package/dist/components/error-message/error-message.d.ts +1 -1
  102. package/dist/components/error-message/error-message.js +1 -1
  103. package/dist/components/error-text/error-text.js +3 -3
  104. package/dist/components/field/field.d.ts +5 -5
  105. package/dist/components/field/field.js +9 -9
  106. package/dist/components/field/index.js +2 -2
  107. package/dist/components/field/input-parts.js +1 -1
  108. package/dist/components/field-placeholder/field-placeholder.d.ts +4 -1
  109. package/dist/components/field-placeholder/field-placeholder.js +41 -26
  110. package/dist/components/fieldset/field-group.js +1 -1
  111. package/dist/components/fieldset/fieldset-root.js +1 -1
  112. package/dist/components/fieldset/fieldset.js +1 -1
  113. package/dist/components/file-field/file-field.css +19 -15
  114. package/dist/components/file-field/file-field.d.ts +10 -1
  115. package/dist/components/file-field/file-field.js +130 -109
  116. package/dist/components/file-field/file-field.module.js +6 -4
  117. package/dist/components/file-field/file-input.d.ts +32 -9
  118. package/dist/components/file-field/file-input.js +94 -74
  119. package/dist/components/filter-bar/filter-bar.d.ts +79 -51
  120. package/dist/components/filter-bar/filter-bar.js +552 -216
  121. package/dist/components/form/form.d.ts +4 -6
  122. package/dist/components/form/form.js +6 -8
  123. package/dist/components/icon/icon.d.ts +5 -10
  124. package/dist/components/icon/icon.js +4 -6
  125. package/dist/components/link/link.js +1 -1
  126. package/dist/components/link-button/link-button.d.ts +1 -2
  127. package/dist/components/link-button/link-button.js +12 -22
  128. package/dist/components/loading-message/loading-message.d.ts +2 -2
  129. package/dist/components/loading-message/loading-message.js +1 -1
  130. package/dist/components/locale-provider/locale-provider.js +1 -1
  131. package/dist/components/menu/menu.d.ts +40 -22
  132. package/dist/components/menu/menu.js +100 -40
  133. package/dist/components/nav/nav-context.d.ts +0 -1
  134. package/dist/components/nav/nav-context.js +1 -2
  135. package/dist/components/nav/nav-item-view.d.ts +7 -7
  136. package/dist/components/nav/nav-item-view.js +27 -51
  137. package/dist/components/nav/nav.css +72 -60
  138. package/dist/components/nav/nav.d.ts +15 -8
  139. package/dist/components/nav/nav.js +105 -52
  140. package/dist/components/nav/nav.module.js +14 -14
  141. package/dist/components/number-field/number-field.d.ts +7 -1
  142. package/dist/components/number-field/number-field.js +98 -82
  143. package/dist/components/number-field/number-input.d.ts +53 -4
  144. package/dist/components/number-field/number-input.js +68 -21
  145. package/dist/components/number-field/tsf-number-field.d.ts +1 -1
  146. package/dist/components/number-field/tsf-number-field.js +1 -1
  147. package/dist/components/otp-field/otp-input.d.ts +25 -0
  148. package/dist/components/otp-field/otp-input.js +26 -1
  149. package/dist/components/pagination/pagination.d.ts +82 -23
  150. package/dist/components/pagination/pagination.js +656 -229
  151. package/dist/components/password-field/password-field.d.ts +7 -1
  152. package/dist/components/password-field/password-field.js +117 -126
  153. package/dist/components/password-field/password-strength.js +1 -1
  154. package/dist/components/password-field/tsf-password-field.d.ts +1 -1
  155. package/dist/components/password-field/tsf-password-field.js +1 -1
  156. package/dist/components/photo-field/photo-field.d.ts +17 -3
  157. package/dist/components/photo-field/photo-field.js +168 -89
  158. package/dist/components/photo-field/photo-input-context.d.ts +25 -0
  159. package/dist/components/photo-field/photo-input-context.js +14 -0
  160. package/dist/components/photo-field/photo-input.d.ts +58 -23
  161. package/dist/components/photo-field/photo-input.js +459 -261
  162. package/dist/components/popover/popover.d.ts +55 -23
  163. package/dist/components/popover/popover.js +205 -61
  164. package/dist/components/radio-group-field/radio-group.js +1 -1
  165. package/dist/components/search-field/search-field.d.ts +7 -5
  166. package/dist/components/search-field/search-field.js +4 -6
  167. package/dist/components/search-field/tsf-search-field.d.ts +1 -1
  168. package/dist/components/search-field/tsf-search-field.js +1 -1
  169. package/dist/components/segmented-control-field/segmented-control.js +1 -1
  170. package/dist/components/select-field/select-field.d.ts +7 -1
  171. package/dist/components/select-field/select-field.js +151 -139
  172. package/dist/components/select-field/select.d.ts +28 -6
  173. package/dist/components/select-field/select.js +234 -149
  174. package/dist/components/skeleton/skeleton.js +1 -1
  175. package/dist/components/spinner/spinner.css +47 -1
  176. package/dist/components/spinner/spinner.js +28 -11
  177. package/dist/components/spinner/spinner.module.js +18 -3
  178. package/dist/components/stale/stale.d.ts +17 -21
  179. package/dist/components/stale/stale.js +307 -129
  180. package/dist/components/status-message/status-message.css +22 -21
  181. package/dist/components/status-message/status-message.d.ts +10 -5
  182. package/dist/components/status-message/status-message.js +20 -24
  183. package/dist/components/status-message/status-message.module.js +6 -6
  184. package/dist/components/status-message/status-preset.d.ts +4 -5
  185. package/dist/components/status-message/status-preset.js +3 -3
  186. package/dist/components/switch-field/switch.js +1 -1
  187. package/dist/components/tabs/tabs.d.ts +51 -28
  188. package/dist/components/tabs/tabs.js +219 -144
  189. package/dist/components/tag/tag.css +23 -21
  190. package/dist/components/tag/tag.d.ts +17 -15
  191. package/dist/components/tag/tag.js +140 -65
  192. package/dist/components/tag/tag.module.js +3 -3
  193. package/dist/components/tag-group/tag-group.css +30 -27
  194. package/dist/components/tag-group/tag-group.d.ts +10 -4
  195. package/dist/components/tag-group/tag-group.js +47 -35
  196. package/dist/components/tag-group/tag-group.module.js +4 -4
  197. package/dist/components/text-field/text-field.d.ts +14 -3
  198. package/dist/components/text-field/text-field.js +154 -133
  199. package/dist/components/text-field/text-input.d.ts +89 -3
  200. package/dist/components/text-field/text-input.js +184 -70
  201. package/dist/components/textarea-field/textarea.js +1 -1
  202. package/dist/components/time-field/time-input.d.ts +6 -0
  203. package/dist/components/time-field/time-input.js +6 -0
  204. package/dist/components/time-zone-provider/time-zone-provider.js +1 -1
  205. package/dist/components/toast/index.js +2 -2
  206. package/dist/components/toast/toast-provider.css +38 -34
  207. package/dist/components/toast/toast-provider.d.ts +65 -3
  208. package/dist/components/toast/toast-provider.js +313 -148
  209. package/dist/components/toast/toast-provider.module.js +11 -17
  210. package/dist/components/toast/toast.d.ts +5 -1
  211. package/dist/components/toast/toast.js +2 -1
  212. package/dist/components/toggle-group-field/toggle-group.js +1 -1
  213. package/dist/components/tooltip/tooltip.d.ts +6 -6
  214. package/dist/components/tooltip/tooltip.js +7 -7
  215. package/dist/data-table/data-table-content.d.ts +18 -10
  216. package/dist/data-table/data-table-content.js +145 -290
  217. package/dist/data-table/data-table-context.d.ts +4 -2
  218. package/dist/data-table/data-table-context.js +1 -1
  219. package/dist/data-table/data-table-parts.d.ts +99 -0
  220. package/dist/data-table/data-table-parts.js +1182 -0
  221. package/dist/data-table/data-table-selection.d.ts +7 -3
  222. package/dist/data-table/data-table-selection.js +62 -37
  223. package/dist/data-table/data-table.css +100 -95
  224. package/dist/data-table/data-table.d.ts +49 -25
  225. package/dist/data-table/data-table.js +95 -83
  226. package/dist/data-table/data-table.module.js +34 -34
  227. package/dist/data-table/index.d.ts +2 -1
  228. package/dist/data-table/index.js +2 -1
  229. package/dist/data-view/use-data-view.d.ts +2 -2
  230. package/dist/data-view/use-data-view.js +2 -2
  231. package/dist/index.js +7 -8
  232. package/dist/lib/calendar/calendar-navigation.d.ts +9 -2
  233. package/dist/lib/calendar/calendar-navigation.js +72 -73
  234. package/dist/lib/calendar/calendar-year.d.ts +4 -3
  235. package/dist/lib/calendar/calendar-year.js +137 -156
  236. package/dist/lib/calendar/temporal.d.ts +18 -12
  237. package/dist/lib/calendar/temporal.js +191 -147
  238. package/dist/lib/table-storage.d.ts +2 -2
  239. package/dist/lib/table-storage.js +2 -2
  240. package/dist/lib/unsaved-changes/leave-guard.js +1 -1
  241. package/dist/terrazzo/index.d.ts +16 -0
  242. package/dist/terrazzo/index.js +94 -2
  243. package/dist/tokens.css +71 -69
  244. package/package.json +3 -2
  245. package/tokens/ref.tokens.json +0 -30
  246. package/tokens/sys.tokens.json +0 -7
  247. package/dist/assets/spinner.js +0 -28
  248. package/dist/components/checkbox-field/checkbox-glyph.d.ts +0 -12
  249. package/dist/components/checkbox-field/checkbox-glyph.js +0 -38
  250. package/dist/components/combobox-field/combobox-popup-body.d.ts +0 -34
  251. package/dist/components/combobox-field/combobox-popup-body.js +0 -142
  252. package/dist/components/conversation/conversation.context.js +0 -4
  253. package/dist/vendor/@material-design-icons/svg/outlined/add.js +0 -12
  254. package/dist/vendor/@material-design-icons/svg/outlined/arrow_downward.js +0 -12
  255. package/dist/vendor/@material-design-icons/svg/outlined/arrow_forward.js +0 -12
  256. package/dist/vendor/@material-design-icons/svg/outlined/arrow_upward.js +0 -12
  257. package/dist/vendor/@material-design-icons/svg/outlined/attach_file.js +0 -12
  258. package/dist/vendor/@material-design-icons/svg/outlined/block.js +0 -12
  259. package/dist/vendor/@material-design-icons/svg/outlined/calendar_today.js +0 -12
  260. package/dist/vendor/@material-design-icons/svg/outlined/check.js +0 -12
  261. package/dist/vendor/@material-design-icons/svg/outlined/check_circle.js +0 -12
  262. package/dist/vendor/@material-design-icons/svg/outlined/chevron_left.js +0 -12
  263. package/dist/vendor/@material-design-icons/svg/outlined/chevron_right.js +0 -12
  264. package/dist/vendor/@material-design-icons/svg/outlined/close.js +0 -12
  265. package/dist/vendor/@material-design-icons/svg/outlined/content_copy.js +0 -12
  266. package/dist/vendor/@material-design-icons/svg/outlined/date_range.js +0 -12
  267. package/dist/vendor/@material-design-icons/svg/outlined/description.js +0 -12
  268. package/dist/vendor/@material-design-icons/svg/outlined/download.js +0 -12
  269. package/dist/vendor/@material-design-icons/svg/outlined/error.js +0 -12
  270. package/dist/vendor/@material-design-icons/svg/outlined/error_outline.js +0 -12
  271. package/dist/vendor/@material-design-icons/svg/outlined/expand_less.js +0 -12
  272. package/dist/vendor/@material-design-icons/svg/outlined/expand_more.js +0 -12
  273. package/dist/vendor/@material-design-icons/svg/outlined/filter_alt.js +0 -12
  274. package/dist/vendor/@material-design-icons/svg/outlined/filter_alt_off.js +0 -12
  275. package/dist/vendor/@material-design-icons/svg/outlined/first_page.js +0 -12
  276. package/dist/vendor/@material-design-icons/svg/outlined/info.js +0 -12
  277. package/dist/vendor/@material-design-icons/svg/outlined/keyboard_arrow_down.js +0 -12
  278. package/dist/vendor/@material-design-icons/svg/outlined/last_page.js +0 -12
  279. package/dist/vendor/@material-design-icons/svg/outlined/mail.js +0 -12
  280. package/dist/vendor/@material-design-icons/svg/outlined/more_horiz.js +0 -12
  281. package/dist/vendor/@material-design-icons/svg/outlined/photo_camera.js +0 -12
  282. package/dist/vendor/@material-design-icons/svg/outlined/remove.js +0 -12
  283. package/dist/vendor/@material-design-icons/svg/outlined/restart_alt.js +0 -12
  284. package/dist/vendor/@material-design-icons/svg/outlined/restore.js +0 -12
  285. package/dist/vendor/@material-design-icons/svg/outlined/search.js +0 -12
  286. package/dist/vendor/@material-design-icons/svg/outlined/unfold_more.js +0 -12
  287. package/dist/vendor/@material-design-icons/svg/outlined/upload_file.js +0 -12
  288. package/dist/vendor/@material-design-icons/svg/outlined/visibility.js +0 -12
  289. package/dist/vendor/@material-design-icons/svg/outlined/visibility_off.js +0 -12
  290. package/dist/vendor/@material-design-icons/svg/outlined/warning_amber.js +0 -12
@@ -1,9 +1,8 @@
1
- import { Icon } from "../icon/icon.js";
2
1
  import { Tooltip } from "../tooltip/tooltip.js";
3
2
  import { buttonAttributes } from "./button-attributes.js";
4
3
  import { c } from "react/compiler-runtime";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
4
  import { useRender } from "@base-ui/react/use-render";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
7
6
  // src/components/button/button.tsx
8
7
  var ButtonElement = (t0) => {
9
8
  const $ = c(6);
@@ -41,7 +40,7 @@ var ButtonElement = (t0) => {
41
40
  * <Button variant="primary" size="md" onClick={apply}>Apply</Button>
42
41
  */
43
42
  var Button = (props) => {
44
- const $ = c(49);
43
+ const $ = c(45);
45
44
  if (props.iconOnly) {
46
45
  let className;
47
46
  let icon;
@@ -90,44 +89,35 @@ var Button = (props) => {
90
89
  $[14] = t0;
91
90
  } else t0 = $[14];
92
91
  let t1;
93
- if ($[15] !== icon) {
94
- t1 = /* @__PURE__ */ jsx(Icon, {
95
- svg: icon,
96
- label: ""
97
- });
98
- $[15] = icon;
99
- $[16] = t1;
100
- } else t1 = $[16];
101
- let t2;
102
- if ($[17] !== iconOnly || $[18] !== label || $[19] !== nativeProps || $[20] !== render || $[21] !== t0 || $[22] !== t1) {
103
- t2 = /* @__PURE__ */ jsx(ButtonElement, {
92
+ if ($[15] !== icon || $[16] !== iconOnly || $[17] !== label || $[18] !== nativeProps || $[19] !== render || $[20] !== t0) {
93
+ t1 = /* @__PURE__ */ jsx(ButtonElement, {
104
94
  render,
105
95
  type: "button",
106
96
  "aria-label": label,
107
97
  ...t0,
108
98
  "data-icon-only": iconOnly,
109
99
  ...nativeProps,
110
- children: t1
100
+ children: icon
111
101
  });
112
- $[17] = iconOnly;
113
- $[18] = label;
114
- $[19] = nativeProps;
115
- $[20] = render;
116
- $[21] = t0;
117
- $[22] = t1;
118
- $[23] = t2;
119
- } else t2 = $[23];
120
- let t3;
121
- if ($[24] !== label || $[25] !== t2) {
122
- t3 = /* @__PURE__ */ jsx(Tooltip, {
102
+ $[15] = icon;
103
+ $[16] = iconOnly;
104
+ $[17] = label;
105
+ $[18] = nativeProps;
106
+ $[19] = render;
107
+ $[20] = t0;
108
+ $[21] = t1;
109
+ } else t1 = $[21];
110
+ let t2;
111
+ if ($[22] !== label || $[23] !== t1) {
112
+ t2 = /* @__PURE__ */ jsx(Tooltip, {
123
113
  content: label,
124
- children: t2
114
+ children: t1
125
115
  });
126
- $[24] = label;
127
- $[25] = t2;
128
- $[26] = t3;
129
- } else t3 = $[26];
130
- return t3;
116
+ $[22] = label;
117
+ $[23] = t1;
118
+ $[24] = t2;
119
+ } else t2 = $[24];
120
+ return t2;
131
121
  }
132
122
  let children;
133
123
  let className_0;
@@ -137,7 +127,7 @@ var Button = (props) => {
137
127
  let size_0;
138
128
  let tone_0;
139
129
  let variant_0;
140
- if ($[27] !== props) {
130
+ if ($[25] !== props) {
141
131
  const { variant: t0, size: t1, tone: t2, className: t3, iconOnly: _iconOnly, icon: t4, children: t5, render: t6, ...t7 } = props;
142
132
  variant_0 = t0;
143
133
  size_0 = t1;
@@ -147,64 +137,55 @@ var Button = (props) => {
147
137
  children = t5;
148
138
  render_0 = t6;
149
139
  nativeProps_0 = t7;
150
- $[27] = props;
151
- $[28] = children;
152
- $[29] = className_0;
153
- $[30] = icon_0;
154
- $[31] = nativeProps_0;
155
- $[32] = render_0;
156
- $[33] = size_0;
157
- $[34] = tone_0;
158
- $[35] = variant_0;
140
+ $[25] = props;
141
+ $[26] = children;
142
+ $[27] = className_0;
143
+ $[28] = icon_0;
144
+ $[29] = nativeProps_0;
145
+ $[30] = render_0;
146
+ $[31] = size_0;
147
+ $[32] = tone_0;
148
+ $[33] = variant_0;
159
149
  } else {
160
- children = $[28];
161
- className_0 = $[29];
162
- icon_0 = $[30];
163
- nativeProps_0 = $[31];
164
- render_0 = $[32];
165
- size_0 = $[33];
166
- tone_0 = $[34];
167
- variant_0 = $[35];
150
+ children = $[26];
151
+ className_0 = $[27];
152
+ icon_0 = $[28];
153
+ nativeProps_0 = $[29];
154
+ render_0 = $[30];
155
+ size_0 = $[31];
156
+ tone_0 = $[32];
157
+ variant_0 = $[33];
168
158
  }
169
159
  let t0;
170
- if ($[36] !== className_0 || $[37] !== size_0 || $[38] !== tone_0 || $[39] !== variant_0) {
160
+ if ($[34] !== className_0 || $[35] !== size_0 || $[36] !== tone_0 || $[37] !== variant_0) {
171
161
  t0 = buttonAttributes({
172
162
  variant: variant_0,
173
163
  size: size_0,
174
164
  tone: tone_0,
175
165
  className: className_0
176
166
  });
177
- $[36] = className_0;
178
- $[37] = size_0;
179
- $[38] = tone_0;
180
- $[39] = variant_0;
181
- $[40] = t0;
182
- } else t0 = $[40];
167
+ $[34] = className_0;
168
+ $[35] = size_0;
169
+ $[36] = tone_0;
170
+ $[37] = variant_0;
171
+ $[38] = t0;
172
+ } else t0 = $[38];
183
173
  let t1;
184
- if ($[41] !== icon_0) {
185
- t1 = icon_0 ? /* @__PURE__ */ jsx(Icon, {
186
- svg: icon_0,
187
- label: ""
188
- }) : null;
189
- $[41] = icon_0;
190
- $[42] = t1;
191
- } else t1 = $[42];
192
- let t2;
193
- if ($[43] !== children || $[44] !== nativeProps_0 || $[45] !== render_0 || $[46] !== t0 || $[47] !== t1) {
194
- t2 = /* @__PURE__ */ jsxs(ButtonElement, {
174
+ if ($[39] !== children || $[40] !== icon_0 || $[41] !== nativeProps_0 || $[42] !== render_0 || $[43] !== t0) {
175
+ t1 = /* @__PURE__ */ jsxs(ButtonElement, {
195
176
  render: render_0,
196
177
  type: "button",
197
178
  ...t0,
198
179
  ...nativeProps_0,
199
- children: [t1, children]
180
+ children: [icon_0, children]
200
181
  });
201
- $[43] = children;
202
- $[44] = nativeProps_0;
203
- $[45] = render_0;
204
- $[46] = t0;
205
- $[47] = t1;
206
- $[48] = t2;
207
- } else t2 = $[48];
208
- return t2;
182
+ $[39] = children;
183
+ $[40] = icon_0;
184
+ $[41] = nativeProps_0;
185
+ $[42] = render_0;
186
+ $[43] = t0;
187
+ $[44] = t1;
188
+ } else t1 = $[44];
189
+ return t1;
209
190
  };
210
191
  export { Button };
@@ -2,6 +2,8 @@ import type { ReactElement, ReactNode } from "react";
2
2
  export type CloseButtonProps = Readonly<{
3
3
  /** Accessible name, surfaced as the tooltip hint and the `aria-label`. */
4
4
  closeLabel: string;
5
+ /** The app's close glyph, drawn in `currentColor` at `1em`. */
6
+ icon: ReactNode;
5
7
  /** The library part that closes, such as `<BaseDialog.Close />`. */
6
8
  render: ReactElement;
7
9
  }>;
@@ -9,6 +11,6 @@ export type CloseButtonProps = Readonly<{
9
11
  * The icon-only way out of an overlay, rendered as the overlay's own close part.
10
12
  *
11
13
  * @example
12
- * <CloseButton closeLabel="Close" render={<BaseDialog.Close />} />
14
+ * <CloseButton closeLabel="Close" icon={<CloseIcon />} render={<BaseDialog.Close />} />
13
15
  */
14
- export declare const CloseButton: ({ closeLabel, render, }: CloseButtonProps) => ReactNode;
16
+ export declare const CloseButton: ({ closeLabel, icon, render, }: CloseButtonProps) => ReactNode;
@@ -1,4 +1,3 @@
1
- import SvgClose from "../../vendor/@material-design-icons/svg/outlined/close.js";
2
1
  import { Button } from "./button.js";
3
2
  import { c } from "react/compiler-runtime";
4
3
  import { jsx } from "react/jsx-runtime";
@@ -7,24 +6,25 @@ import { jsx } from "react/jsx-runtime";
7
6
  * The icon-only way out of an overlay, rendered as the overlay's own close part.
8
7
  *
9
8
  * @example
10
- * <CloseButton closeLabel="Close" render={<BaseDialog.Close />} />
9
+ * <CloseButton closeLabel="Close" icon={<CloseIcon />} render={<BaseDialog.Close />} />
11
10
  */
12
11
  var CloseButton = (t0) => {
13
- const $ = c(3);
14
- const { closeLabel, render } = t0;
12
+ const $ = c(4);
13
+ const { closeLabel, icon, render } = t0;
15
14
  let t1;
16
- if ($[0] !== closeLabel || $[1] !== render) {
15
+ if ($[0] !== closeLabel || $[1] !== icon || $[2] !== render) {
17
16
  t1 = /* @__PURE__ */ jsx(Button, {
18
17
  variant: "tertiary",
19
18
  iconOnly: true,
20
- icon: SvgClose,
19
+ icon,
21
20
  label: closeLabel,
22
21
  render
23
22
  });
24
23
  $[0] = closeLabel;
25
- $[1] = render;
26
- $[2] = t1;
27
- } else t1 = $[2];
24
+ $[1] = icon;
25
+ $[2] = render;
26
+ $[3] = t1;
27
+ } else t1 = $[3];
28
28
  return t1;
29
29
  };
30
30
  export { CloseButton };
@@ -1,11 +1,24 @@
1
1
  import type { ReactNode } from "react";
2
2
  import { type FieldBlurHandler, type FieldProps } from "../field/index.ts";
3
- import { type CheckboxProps } from "./checkbox.tsx";
4
- export type CheckboxFieldProps = FieldProps & Omit<CheckboxProps, "className" | "onBlur"> & Readonly<{
3
+ import { type CheckboxControlProps } from "./checkbox.tsx";
4
+ export type CheckboxFieldBaseProps = FieldProps & Omit<CheckboxControlProps, "className" | "onBlur" | "children" | "indeterminate"> & Readonly<{
5
5
  onBlur?: FieldBlurHandler;
6
+ /** The mark the box shows while checked, such as a tick. */
7
+ checkIcon: ReactNode;
6
8
  /** Applied to the field wrapper, so callers can place the row. */
7
9
  className?: string;
8
10
  }>;
11
+ /** The indeterminate state, with the mark it needs only when it is used. */
12
+ export type CheckboxFieldIndeterminateProps = Readonly<{
13
+ /** The box shows neither checked nor unchecked, for a parent over a mixed set. */
14
+ indeterminate: boolean;
15
+ /** The mark the box shows while indeterminate, such as a dash. */
16
+ indeterminateIcon: ReactNode;
17
+ }> | Readonly<{
18
+ indeterminate?: undefined;
19
+ indeterminateIcon?: undefined;
20
+ }>;
21
+ export type CheckboxFieldProps = CheckboxFieldBaseProps & CheckboxFieldIndeterminateProps;
9
22
  /**
10
23
  * The assembled checkbox: the label beside the box, which also toggles it, then
11
24
  * the description and the error.
@@ -14,8 +27,9 @@ export type CheckboxFieldProps = FieldProps & Omit<CheckboxProps, "className" |
14
27
  * <CheckboxField
15
28
  * label="I agree to the terms"
16
29
  * optionalLabel="optional"
30
+ * checkIcon={<CheckIcon />}
17
31
  * checked={agreed}
18
32
  * onCheckedChange={setAgreed}
19
33
  * />
20
34
  */
21
- export declare const CheckboxField: ({ label, description, errors, requiredness, optionalLabel, dirty, touched, pending, name, className, ...props }: CheckboxFieldProps) => ReactNode;
35
+ export declare const CheckboxField: ({ label, description, errors, requiredness, optionalLabel, dirty, touched, pending, name, className, checkIcon, indeterminateIcon, ...props }: CheckboxFieldProps) => ReactNode;
@@ -1,13 +1,8 @@
1
- import { Field as Field$1 } from "../field/field.js";
2
- import { fieldStateAttributes } from "../field/field-state.js";
3
- import { useFieldState } from "../field/use-field-state.js";
1
+ import { Field } from "../field/field.js";
4
2
  import { detachHiddenInput } from "../field/hidden-input.js";
5
3
  import { Checkbox } from "./checkbox.js";
6
- import checkbox_module_default from "./checkbox.module.js";
7
4
  import { c } from "react/compiler-runtime";
8
5
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { clsx } from "clsx";
10
- import { Field } from "@base-ui/react/field";
11
6
  // src/components/checkbox-field/checkbox-field.tsx
12
7
  /**
13
8
  * The assembled checkbox: the label beside the box, which also toggles it, then
@@ -17,16 +12,19 @@ import { Field } from "@base-ui/react/field";
17
12
  * <CheckboxField
18
13
  * label="I agree to the terms"
19
14
  * optionalLabel="optional"
15
+ * checkIcon={<CheckIcon />}
20
16
  * checked={agreed}
21
17
  * onCheckedChange={setAgreed}
22
18
  * />
23
19
  */
24
20
  var CheckboxField = (t0) => {
25
- const $ = c(51);
21
+ const $ = c(46);
22
+ let checkIcon;
26
23
  let className;
27
24
  let description;
28
25
  let dirty;
29
26
  let errors;
27
+ let indeterminateIcon;
30
28
  let label;
31
29
  let name;
32
30
  let optionalLabel;
@@ -35,147 +33,126 @@ var CheckboxField = (t0) => {
35
33
  let requiredness;
36
34
  let touched;
37
35
  if ($[0] !== t0) {
38
- ({label, description, errors, requiredness, optionalLabel, dirty, touched, pending, name, className, ...props} = t0);
36
+ ({label, description, errors, requiredness, optionalLabel, dirty, touched, pending, name, className, checkIcon, indeterminateIcon, ...props} = t0);
39
37
  $[0] = t0;
40
- $[1] = className;
41
- $[2] = description;
42
- $[3] = dirty;
43
- $[4] = errors;
44
- $[5] = label;
45
- $[6] = name;
46
- $[7] = optionalLabel;
47
- $[8] = pending;
48
- $[9] = props;
49
- $[10] = requiredness;
50
- $[11] = touched;
38
+ $[1] = checkIcon;
39
+ $[2] = className;
40
+ $[3] = description;
41
+ $[4] = dirty;
42
+ $[5] = errors;
43
+ $[6] = indeterminateIcon;
44
+ $[7] = label;
45
+ $[8] = name;
46
+ $[9] = optionalLabel;
47
+ $[10] = pending;
48
+ $[11] = props;
49
+ $[12] = requiredness;
50
+ $[13] = touched;
51
51
  } else {
52
- className = $[1];
53
- description = $[2];
54
- dirty = $[3];
55
- errors = $[4];
56
- label = $[5];
57
- name = $[6];
58
- optionalLabel = $[7];
59
- pending = $[8];
60
- props = $[9];
61
- requiredness = $[10];
62
- touched = $[11];
52
+ checkIcon = $[1];
53
+ className = $[2];
54
+ description = $[3];
55
+ dirty = $[4];
56
+ errors = $[5];
57
+ indeterminateIcon = $[6];
58
+ label = $[7];
59
+ name = $[8];
60
+ optionalLabel = $[9];
61
+ pending = $[10];
62
+ props = $[11];
63
+ requiredness = $[12];
64
+ touched = $[13];
63
65
  }
64
- const ids = Field$1.useIds();
66
+ const ids = Field.useIds();
65
67
  const t1 = props.checked === true;
66
- let t2;
67
- if ($[12] !== dirty || $[13] !== errors || $[14] !== pending || $[15] !== props.disabled || $[16] !== props.readOnly || $[17] !== requiredness || $[18] !== t1 || $[19] !== touched) {
68
- t2 = {
69
- errors,
70
- requiredness,
71
- dirty,
72
- touched,
73
- pending,
74
- disabled: props.disabled,
75
- readOnly: props.readOnly,
76
- filled: t1
77
- };
78
- $[12] = dirty;
79
- $[13] = errors;
80
- $[14] = pending;
81
- $[15] = props.disabled;
82
- $[16] = props.readOnly;
83
- $[17] = requiredness;
84
- $[18] = t1;
85
- $[19] = touched;
86
- $[20] = t2;
87
- } else t2 = $[20];
88
- const field = useFieldState(t2);
89
- let t3;
90
- if ($[21] !== className) {
91
- t3 = clsx(checkbox_module_default.root, className);
92
- $[21] = className;
93
- $[22] = t3;
94
- } else t3 = $[22];
95
- const t4 = field.disabled;
96
- const t5 = field.invalid;
97
- let t6;
98
- if ($[23] !== field.state) {
99
- t6 = fieldStateAttributes(field.state);
100
- $[23] = field.state;
101
- $[24] = t6;
102
- } else t6 = $[24];
103
- const t7 = requiredness === "required";
104
- let t8;
105
- if ($[25] !== ids.controlId || $[26] !== props || $[27] !== t7) {
106
- t8 = /* @__PURE__ */ jsx(Checkbox, {
68
+ const t2 = requiredness === "required";
69
+ const t3 = props.indeterminate === true ? indeterminateIcon : checkIcon;
70
+ let t4;
71
+ if ($[14] !== t3) {
72
+ t4 = /* @__PURE__ */ jsx(Checkbox.Indicator, { children: t3 });
73
+ $[14] = t3;
74
+ $[15] = t4;
75
+ } else t4 = $[15];
76
+ let t5;
77
+ if ($[16] !== ids.controlId || $[17] !== props || $[18] !== t2 || $[19] !== t4) {
78
+ t5 = /* @__PURE__ */ jsx(Checkbox.Control, {
107
79
  name: ids.controlId,
108
80
  inputRef: detachHiddenInput,
109
- required: t7,
110
- ...props
81
+ required: t2,
82
+ ...props,
83
+ children: t4
111
84
  });
112
- $[25] = ids.controlId;
113
- $[26] = props;
114
- $[27] = t7;
115
- $[28] = t8;
116
- } else t8 = $[28];
117
- let t9;
118
- if ($[29] !== label || $[30] !== optionalLabel || $[31] !== requiredness) {
119
- t9 = /* @__PURE__ */ jsx(Field$1.InlineLabelText, {
85
+ $[16] = ids.controlId;
86
+ $[17] = props;
87
+ $[18] = t2;
88
+ $[19] = t4;
89
+ $[20] = t5;
90
+ } else t5 = $[20];
91
+ let t6;
92
+ if ($[21] !== label || $[22] !== optionalLabel || $[23] !== requiredness) {
93
+ t6 = /* @__PURE__ */ jsx(Field.InlineLabelText, {
120
94
  label,
121
95
  requiredness,
122
96
  optionalLabel
123
97
  });
124
- $[29] = label;
125
- $[30] = optionalLabel;
126
- $[31] = requiredness;
127
- $[32] = t9;
128
- } else t9 = $[32];
98
+ $[21] = label;
99
+ $[22] = optionalLabel;
100
+ $[23] = requiredness;
101
+ $[24] = t6;
102
+ } else t6 = $[24];
103
+ let t7;
104
+ if ($[25] !== t5 || $[26] !== t6) {
105
+ t7 = /* @__PURE__ */ jsxs(Checkbox.Label, { children: [t5, t6] });
106
+ $[25] = t5;
107
+ $[26] = t6;
108
+ $[27] = t7;
109
+ } else t7 = $[27];
110
+ let t8;
111
+ if ($[28] !== description) {
112
+ t8 = /* @__PURE__ */ jsx(Checkbox.Description, { children: description });
113
+ $[28] = description;
114
+ $[29] = t8;
115
+ } else t8 = $[29];
116
+ let t9;
117
+ if ($[30] !== errors) {
118
+ t9 = /* @__PURE__ */ jsx(Checkbox.Error, { children: errors });
119
+ $[30] = errors;
120
+ $[31] = t9;
121
+ } else t9 = $[31];
129
122
  let t10;
130
- if ($[33] !== t8 || $[34] !== t9) {
131
- t10 = /* @__PURE__ */ jsxs(Field.Label, {
132
- className: checkbox_module_default.label,
133
- children: [t8, t9]
134
- });
135
- $[33] = t8;
136
- $[34] = t9;
137
- $[35] = t10;
138
- } else t10 = $[35];
139
- let t11;
140
- if ($[36] !== description) {
141
- t11 = /* @__PURE__ */ jsx(Field$1.Description, { children: description });
142
- $[36] = description;
143
- $[37] = t11;
144
- } else t11 = $[37];
145
- let t12;
146
- if ($[38] !== errors) {
147
- t12 = /* @__PURE__ */ jsx(Field$1.Error, { children: errors });
148
- $[38] = errors;
149
- $[39] = t12;
150
- } else t12 = $[39];
151
- let t13;
152
- if ($[40] !== dirty || $[41] !== field.disabled || $[42] !== field.invalid || $[43] !== name || $[44] !== t10 || $[45] !== t11 || $[46] !== t12 || $[47] !== t3 || $[48] !== t6 || $[49] !== touched) {
153
- t13 = /* @__PURE__ */ jsxs(Field$1.Root, {
123
+ if ($[32] !== className || $[33] !== dirty || $[34] !== errors || $[35] !== name || $[36] !== pending || $[37] !== props.disabled || $[38] !== props.readOnly || $[39] !== requiredness || $[40] !== t1 || $[41] !== t7 || $[42] !== t8 || $[43] !== t9 || $[44] !== touched) {
124
+ t10 = /* @__PURE__ */ jsxs(Checkbox.Root, {
154
125
  name,
155
- className: t3,
156
- disabled: t4,
157
- invalid: t5,
126
+ className,
127
+ disabled: props.disabled,
128
+ readOnly: props.readOnly,
129
+ errors,
130
+ requiredness,
158
131
  dirty,
159
132
  touched,
160
- ...t6,
133
+ pending,
134
+ filled: t1,
161
135
  children: [
162
- t10,
163
- t11,
164
- t12
136
+ t7,
137
+ t8,
138
+ t9
165
139
  ]
166
140
  });
167
- $[40] = dirty;
168
- $[41] = field.disabled;
169
- $[42] = field.invalid;
170
- $[43] = name;
171
- $[44] = t10;
172
- $[45] = t11;
173
- $[46] = t12;
174
- $[47] = t3;
175
- $[48] = t6;
176
- $[49] = touched;
177
- $[50] = t13;
178
- } else t13 = $[50];
179
- return t13;
141
+ $[32] = className;
142
+ $[33] = dirty;
143
+ $[34] = errors;
144
+ $[35] = name;
145
+ $[36] = pending;
146
+ $[37] = props.disabled;
147
+ $[38] = props.readOnly;
148
+ $[39] = requiredness;
149
+ $[40] = t1;
150
+ $[41] = t7;
151
+ $[42] = t8;
152
+ $[43] = t9;
153
+ $[44] = touched;
154
+ $[45] = t10;
155
+ } else t10 = $[45];
156
+ return t10;
180
157
  };
181
158
  export { CheckboxField };