@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
@@ -12,11 +12,9 @@ export type FormRootProps = Omit<ComponentPropsWithRef<"form">, "onSubmit" | "ch
12
12
  children: ReactNode;
13
13
  }>;
14
14
  /**
15
- * The `<form>`: submits through the form instance, leaves validation to it,
16
- * disables and inerts its fields while busy, and focuses the first invalid
17
- * control after a failed submit. While its `leaveGuard` policy holds, it
18
- * reports unsaved changes to the page's leave guards. Its parts read the
19
- * form from it.
15
+ * The `<form>`: it submits through the form instance, disables its fields while
16
+ * busy, focuses the first invalid control after a failed submit, and reports
17
+ * unsaved changes to the page's leave guards while `leaveGuard` holds.
20
18
  *
21
19
  * @example
22
20
  * <Form.Root form={form}>…</Form.Root>
@@ -40,7 +38,7 @@ export type FormSubmitProps = Omit<Extract<ButtonProps, Readonly<{
40
38
  busyLabel: string;
41
39
  }>;
42
40
  /**
43
- * The form's submit button. A wait that lasts 150 ms shows a spinner and is
41
+ * The form's submit button. A wait that lasts 150 ms shows a spinner, is
44
42
  * announced as `busyLabel`, and stays shown at least 200 ms.
45
43
  *
46
44
  * @example
@@ -12,17 +12,15 @@ import { focusFirstInvalid } from "./first-invalid.js";
12
12
  import { FormDisabledProvider, FormStatusProvider, useFormDisabled, useFormStatus } from "./form-context.js";
13
13
  import form_module_default from "./form.module.js";
14
14
  import { c } from "react/compiler-runtime";
15
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
16
  import { useEffect, useRef, useState } from "react";
16
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
17
17
  import { useStore } from "@tanstack/react-form";
18
18
  import { createPortal } from "react-dom";
19
19
  // src/components/form/form.tsx
20
20
  /**
21
- * The `<form>`: submits through the form instance, leaves validation to it,
22
- * disables and inerts its fields while busy, and focuses the first invalid
23
- * control after a failed submit. While its `leaveGuard` policy holds, it
24
- * reports unsaved changes to the page's leave guards. Its parts read the
25
- * form from it.
21
+ * The `<form>`: it submits through the form instance, disables its fields while
22
+ * busy, focuses the first invalid control after a failed submit, and reports
23
+ * unsaved changes to the page's leave guards while `leaveGuard` holds.
26
24
  *
27
25
  * @example
28
26
  * <Form.Root form={form}>…</Form.Root>
@@ -205,7 +203,7 @@ var FormErrors = (t0) => {
205
203
  return t2;
206
204
  };
207
205
  /**
208
- * The form's submit button. A wait that lasts 150 ms shows a spinner and is
206
+ * The form's submit button. A wait that lasts 150 ms shows a spinner, is
209
207
  * announced as `busyLabel`, and stays shown at least 200 ms.
210
208
  *
211
209
  * @example
@@ -279,7 +277,7 @@ var FormSubmit = (t0) => {
279
277
  } else t7 = $[20];
280
278
  let t8;
281
279
  if ($[21] !== t6 || $[22] !== t7) {
282
- t8 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t6, t7] });
280
+ t8 = /* @__PURE__ */ jsxs(Fragment, { children: [t6, t7] });
283
281
  $[21] = t6;
284
282
  $[22] = t7;
285
283
  $[23] = t8;
@@ -1,11 +1,8 @@
1
1
  import type { FunctionComponent, ReactNode, SVGProps } from "react";
2
- /**
3
- * The component type produced by SVGR's `?react` imports
4
- * (e.g. `import Close from "@material-design-icons/svg/outlined/close.svg?react"`).
5
- */
2
+ /** An SVG as a React component, such as an SVGR `?react` import from the app's icon set. */
6
3
  export type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
7
4
  export type IconProps = Readonly<{
8
- /** The SVG component to render, from a SVGR `?react` import. */
5
+ /** The app's SVG component to render. */
9
6
  svg: SvgComponent;
10
7
  /**
11
8
  * Size relative to the current font size (in `em`). Defaults to `1`
@@ -20,12 +17,10 @@ export type IconProps = Readonly<{
20
17
  className?: string;
21
18
  }>;
22
19
  /**
23
- * Renders an SVG icon with a consistent size and accessibility treatment.
24
- * Decorative icons (`label=""`) are hidden from assistive tech; labelled icons
25
- * expose `role="img"` with an accessible name.
20
+ * Sizes, colours and labels the app's SVG, from any icon set. `label=""` hides
21
+ * it from assistive tech; a label names it as an image.
26
22
  *
27
23
  * @example
28
- * import Close from "@material-design-icons/svg/outlined/close.svg?react";
29
- * <Icon svg={Close} label="Close" />
24
+ * <Icon svg={CloseIcon} label="Close" />
30
25
  */
31
26
  export declare const Icon: ({ svg: Svg, size, label, className, }: IconProps) => ReactNode;
@@ -1,16 +1,14 @@
1
1
  import icon_module_default from "./icon.module.js";
2
2
  import { c } from "react/compiler-runtime";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
4
+ import { jsx } from "react/jsx-runtime";
5
5
  // src/components/icon/icon.tsx
6
6
  /**
7
- * Renders an SVG icon with a consistent size and accessibility treatment.
8
- * Decorative icons (`label=""`) are hidden from assistive tech; labelled icons
9
- * expose `role="img"` with an accessible name.
7
+ * Sizes, colours and labels the app's SVG, from any icon set. `label=""` hides
8
+ * it from assistive tech; a label names it as an image.
10
9
  *
11
10
  * @example
12
- * import Close from "@material-design-icons/svg/outlined/close.svg?react";
13
- * <Icon svg={Close} label="Close" />
11
+ * <Icon svg={CloseIcon} label="Close" />
14
12
  */
15
13
  var Icon = (t0) => {
16
14
  const $ = c(12);
@@ -1,7 +1,7 @@
1
1
  import link_module_default from "./link.module.js";
2
2
  import { c } from "react/compiler-runtime";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
4
+ import { jsx } from "react/jsx-runtime";
5
5
  // src/components/link/link.tsx
6
6
  /**
7
7
  * The one text link: brand-coloured and underlined. It spreads every prop onto
@@ -1,6 +1,5 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from "react";
2
2
  import type { ButtonSize, ButtonTone, ButtonVariant } from "../button/button.tsx";
3
- import { type SvgComponent } from "../icon/icon.tsx";
4
3
  export type LinkButtonProps = ComponentPropsWithRef<"a"> & Readonly<{
5
4
  /** Visual tier. @default "secondary" */
6
5
  variant?: ButtonVariant;
@@ -9,7 +8,7 @@ export type LinkButtonProps = ComponentPropsWithRef<"a"> & Readonly<{
9
8
  /** Colour role. @default "brand" */
10
9
  tone?: ButtonTone;
11
10
  /** Optional leading icon rendered before the label. */
12
- icon?: SvgComponent;
11
+ icon?: ReactNode;
13
12
  children: ReactNode;
14
13
  }>;
15
14
  /**
@@ -1,7 +1,6 @@
1
1
  import { buttonAttributes } from "../button/button-attributes.js";
2
- import { Icon } from "../icon/icon.js";
3
2
  import { c } from "react/compiler-runtime";
4
- import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { jsxs } from "react/jsx-runtime";
5
4
  // src/components/link-button/link-button.tsx
6
5
  /**
7
6
  * A link that looks and sizes exactly like a `Button`. It spreads every other
@@ -12,7 +11,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
12
11
  * <RouterLinkButton to="/" variant="primary">Go to home page</RouterLinkButton>
13
12
  */
14
13
  var LinkButton = (t0) => {
15
- const $ = c(20);
14
+ const $ = c(18);
16
15
  let anchorProps;
17
16
  let children;
18
17
  let className;
@@ -54,27 +53,18 @@ var LinkButton = (t0) => {
54
53
  $[12] = t1;
55
54
  } else t1 = $[12];
56
55
  let t2;
57
- if ($[13] !== icon) {
58
- t2 = icon ? /* @__PURE__ */ jsx(Icon, {
59
- svg: icon,
60
- label: ""
61
- }) : null;
62
- $[13] = icon;
63
- $[14] = t2;
64
- } else t2 = $[14];
65
- let t3;
66
- if ($[15] !== anchorProps || $[16] !== children || $[17] !== t1 || $[18] !== t2) {
67
- t3 = /* @__PURE__ */ jsxs("a", {
56
+ if ($[13] !== anchorProps || $[14] !== children || $[15] !== icon || $[16] !== t1) {
57
+ t2 = /* @__PURE__ */ jsxs("a", {
68
58
  ...t1,
69
59
  ...anchorProps,
70
- children: [t2, children]
60
+ children: [icon, children]
71
61
  });
72
- $[15] = anchorProps;
73
- $[16] = children;
74
- $[17] = t1;
75
- $[18] = t2;
76
- $[19] = t3;
77
- } else t3 = $[19];
78
- return t3;
62
+ $[13] = anchorProps;
63
+ $[14] = children;
64
+ $[15] = icon;
65
+ $[16] = t1;
66
+ $[17] = t2;
67
+ } else t2 = $[17];
68
+ return t2;
79
69
  };
80
70
  export { LinkButton };
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  export type LoadingMessageProps = Readonly<{
3
- /** What the wait says and is announced as, such as "Loading your declarations". */
3
+ /** What the wait says and is announced as, such as "Loading your invoices". */
4
4
  title: string;
5
5
  /** A line under the title, such as what the wait is for. */
6
6
  description?: string;
@@ -17,6 +17,6 @@ export type LoadingMessageProps = Readonly<{
17
17
  * announced once.
18
18
  *
19
19
  * @example
20
- * <LoadingMessage title="Loading your declarations" illustration={<Logo />} />
20
+ * <LoadingMessage title="Loading your invoices" illustration={<Logo />} />
21
21
  */
22
22
  export declare const LoadingMessage: ({ title, description, illustration, busyAfter, className, }: LoadingMessageProps) => ReactNode;
@@ -11,7 +11,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  * announced once.
12
12
  *
13
13
  * @example
14
- * <LoadingMessage title="Loading your declarations" illustration={<Logo />} />
14
+ * <LoadingMessage title="Loading your invoices" illustration={<Logo />} />
15
15
  */
16
16
  var LoadingMessage = (t0) => {
17
17
  const $ = c(10);
@@ -1,7 +1,7 @@
1
1
  import { useRequiredContext } from "../../lib/use-required-context.js";
2
2
  import { c } from "react/compiler-runtime";
3
- import { createContext } from "react";
4
3
  import { jsx } from "react/jsx-runtime";
4
+ import { createContext } from "react";
5
5
  import { I18nProvider } from "react-aria-components";
6
6
  // src/components/locale-provider/locale-provider.tsx
7
7
  var LocaleContext = createContext(void 0);
@@ -1,16 +1,29 @@
1
1
  import { Menu as BaseMenu } from "@base-ui/react/menu";
2
2
  import type { ComponentProps, ReactNode } from "react";
3
- import { type SvgComponent } from "../icon/icon.tsx";
3
+ export type MenuRootProps<Payload = unknown> = Omit<BaseMenu.Root.Props<Payload>, "open" | "defaultOpen" | "onOpenChange" | "modal" | "children"> & Readonly<{
4
+ /** Whether the menu is open. Leave it out for a menu that keeps its own state. */
5
+ open?: boolean;
6
+ /** Whether the menu starts open, when it keeps its own state. @default false */
7
+ defaultOpen?: boolean;
8
+ /** Called with the new open state when the menu opens or closes. */
9
+ onOpenChange?: BaseMenu.Root.Props<Payload>["onOpenChange"];
10
+ /** Whether the page behind the menu is inert while it is open. @default true */
11
+ modal?: BaseMenu.Root.Props<Payload>["modal"];
12
+ /** The trigger and the menu's content. */
13
+ children?: BaseMenu.Root.Props<Payload>["children"];
14
+ }>;
15
+ /** Holds the menu's open state for its parts. It renders no element of its own. */
16
+ declare const Root: <Payload>(props: MenuRootProps<Payload>) => ReactNode;
4
17
  type TriggerBaseProps = Omit<ComponentProps<typeof BaseMenu.Trigger>, "children" | "render">;
5
18
  type IconTriggerProps = TriggerBaseProps & Readonly<{
6
- icon: SvgComponent;
19
+ icon: ReactNode;
7
20
  /** Accessible name, surfaced as the tooltip hint and the `aria-label`. */
8
21
  label: string;
9
22
  children?: never;
10
23
  }>;
11
24
  type TextTriggerProps = TriggerBaseProps & Readonly<{
12
25
  /** Optional leading icon rendered before the label. */
13
- icon?: SvgComponent;
26
+ icon?: ReactNode;
14
27
  children: ReactNode;
15
28
  label?: never;
16
29
  }>;
@@ -21,13 +34,23 @@ export type MenuTriggerProps = IconTriggerProps | TextTriggerProps;
21
34
  */
22
35
  declare const Trigger: (props: MenuTriggerProps) => ReactNode;
23
36
  export type MenuPositionerProps = Omit<ComponentProps<typeof BaseMenu.Positioner>, "ref">;
37
+ /** Places the popup against its trigger, clear of the viewport's edges. */
24
38
  declare const Positioner: ({ className, ...props }: MenuPositionerProps) => ReactNode;
39
+ /** The menu's surface, holding its items. */
25
40
  declare const Popup: ({ className, ...props }: ComponentProps<typeof BaseMenu.Popup>) => ReactNode;
41
+ export type MenuContentProps = ComponentProps<typeof BaseMenu.Popup> & Readonly<Pick<MenuPositionerProps, "side" | "sideOffset" | "align" | "alignOffset"> & {
42
+ /** The element the menu is portalled into. @default document.body */
43
+ container?: BaseMenu.Portal.Props["container"];
44
+ }>;
45
+ /** `Portal`, `Positioner` and `Popup` in one: the menu's surface, placed against its trigger. */
46
+ declare const Content: ({ container, side, sideOffset, align, alignOffset, ...props }: MenuContentProps) => ReactNode;
47
+ /** The arrow pointing from the popup at its trigger. */
26
48
  declare const Arrow: ({ className, ...props }: ComponentProps<typeof BaseMenu.Arrow>) => ReactNode;
27
49
  export type MenuItemProps = ComponentProps<typeof BaseMenu.Item> & Readonly<{
28
50
  /** Optional leading icon, rendered decoratively before the label. */
29
- icon?: SvgComponent;
51
+ icon?: ReactNode;
30
52
  }>;
53
+ /** An action, with an optional leading icon. */
31
54
  declare const Item: ({ icon, className, children, ...props }: MenuItemProps) => ReactNode;
32
55
  export type MenuLinkItemProps = ComponentProps<typeof BaseMenu.LinkItem>;
33
56
  /**
@@ -35,14 +58,17 @@ export type MenuLinkItemProps = ComponentProps<typeof BaseMenu.LinkItem>;
35
58
  * forwards its ref, so a router's `createLink` can wrap it.
36
59
  */
37
60
  declare const LinkItem: ({ className, ...props }: MenuLinkItemProps) => ReactNode;
61
+ /** A line between groups of items. */
38
62
  declare const Separator: ({ className, ...props }: ComponentProps<typeof BaseMenu.Separator>) => ReactNode;
63
+ /** The heading that names a `Group`. */
39
64
  declare const GroupLabel: ({ className, ...props }: ComponentProps<typeof BaseMenu.GroupLabel>) => ReactNode;
40
65
  type MenuParts = Readonly<{
41
- Root: typeof BaseMenu.Root;
66
+ Root: typeof Root;
42
67
  Trigger: typeof Trigger;
43
68
  Portal: typeof BaseMenu.Portal;
44
69
  Positioner: typeof Positioner;
45
70
  Popup: typeof Popup;
71
+ Content: typeof Content;
46
72
  Arrow: typeof Arrow;
47
73
  Item: typeof Item;
48
74
  LinkItem: typeof LinkItem;
@@ -52,26 +78,18 @@ type MenuParts = Readonly<{
52
78
  createHandle: typeof BaseMenu.createHandle;
53
79
  }>;
54
80
  /**
55
- * Dropdown menu over base-ui's Menu, with an arrow pointing at the trigger.
56
- * `Menu.Item` accepts an optional leading `icon`. The positioner keeps
57
- * `--popup-edge-padding` from the viewport's edges.
81
+ * A dropdown menu over base-ui's `Menu`. `Content` bundles the portal,
82
+ * positioner and popup; the unbundled parts stay. Icons are the app's own.
58
83
  *
59
84
  * @example
60
- * import RowActionsIcon from "@material-design-icons/svg/outlined/more_vert.svg?react";
61
- * import DownloadIcon from "@material-design-icons/svg/outlined/download.svg?react";
62
- *
63
85
  * <Menu.Root>
64
- * <Menu.Trigger icon={RowActionsIcon} label="Row actions" />
65
- * <Menu.Portal>
66
- * <Menu.Positioner sideOffset={8}>
67
- * <Menu.Popup>
68
- * <Menu.Arrow />
69
- * <Menu.Item icon={DownloadIcon} onClick={download}>
70
- * Download
71
- * </Menu.Item>
72
- * </Menu.Popup>
73
- * </Menu.Positioner>
74
- * </Menu.Portal>
86
+ * <Menu.Trigger icon={<MoreIcon />} label="Row actions" />
87
+ * <Menu.Content sideOffset={8}>
88
+ * <Menu.Arrow />
89
+ * <Menu.Item icon={<DownloadIcon />} onClick={download}>
90
+ * Download
91
+ * </Menu.Item>
92
+ * </Menu.Content>
75
93
  * </Menu.Root>
76
94
  */
77
95
  export declare const Menu: MenuParts;
@@ -1,12 +1,22 @@
1
1
  import { usePopupEdgePadding } from "../../lib/popup-edge-padding.js";
2
2
  import { Button } from "../button/button.js";
3
- import { Icon } from "../icon/icon.js";
4
3
  import menu_module_default from "./menu.module.js";
5
4
  import { c } from "react/compiler-runtime";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
5
  import { clsx } from "clsx";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
8
7
  import { Menu } from "@base-ui/react/menu";
9
8
  // src/components/menu/menu.tsx
9
+ /** Holds the menu's open state for its parts. It renders no element of its own. */
10
+ var Root = (props) => {
11
+ const $ = c(2);
12
+ let t0;
13
+ if ($[0] !== props) {
14
+ t0 = /* @__PURE__ */ jsx(Menu.Root, { ...props });
15
+ $[0] = props;
16
+ $[1] = t0;
17
+ } else t0 = $[1];
18
+ return t0;
19
+ };
10
20
  /**
11
21
  * The button that opens a menu: `icon` + `label` for the icon form, `children`
12
22
  * for a labelled one. Always a {@link Button}.
@@ -85,6 +95,7 @@ var Trigger = (props) => {
85
95
  } else t1 = $[19];
86
96
  return t1;
87
97
  };
98
+ /** Places the popup against its trigger, clear of the viewport's edges. */
88
99
  var Positioner = (t0) => {
89
100
  const $ = c(9);
90
101
  let className;
@@ -119,6 +130,7 @@ var Positioner = (t0) => {
119
130
  } else t3 = $[8];
120
131
  return t3;
121
132
  };
133
+ /** The menu's surface, holding its items. */
122
134
  var Popup = (t0) => {
123
135
  const $ = c(8);
124
136
  let className;
@@ -150,6 +162,67 @@ var Popup = (t0) => {
150
162
  } else t2 = $[7];
151
163
  return t2;
152
164
  };
165
+ /** `Portal`, `Positioner` and `Popup` in one: the menu's surface, placed against its trigger. */
166
+ var Content = (t0) => {
167
+ const $ = c(18);
168
+ let align;
169
+ let alignOffset;
170
+ let container;
171
+ let props;
172
+ let side;
173
+ let sideOffset;
174
+ if ($[0] !== t0) {
175
+ ({container, side, sideOffset, align, alignOffset, ...props} = t0);
176
+ $[0] = t0;
177
+ $[1] = align;
178
+ $[2] = alignOffset;
179
+ $[3] = container;
180
+ $[4] = props;
181
+ $[5] = side;
182
+ $[6] = sideOffset;
183
+ } else {
184
+ align = $[1];
185
+ alignOffset = $[2];
186
+ container = $[3];
187
+ props = $[4];
188
+ side = $[5];
189
+ sideOffset = $[6];
190
+ }
191
+ let t1;
192
+ if ($[7] !== props) {
193
+ t1 = /* @__PURE__ */ jsx(Popup, { ...props });
194
+ $[7] = props;
195
+ $[8] = t1;
196
+ } else t1 = $[8];
197
+ let t2;
198
+ if ($[9] !== align || $[10] !== alignOffset || $[11] !== side || $[12] !== sideOffset || $[13] !== t1) {
199
+ t2 = /* @__PURE__ */ jsx(Positioner, {
200
+ side,
201
+ sideOffset,
202
+ align,
203
+ alignOffset,
204
+ children: t1
205
+ });
206
+ $[9] = align;
207
+ $[10] = alignOffset;
208
+ $[11] = side;
209
+ $[12] = sideOffset;
210
+ $[13] = t1;
211
+ $[14] = t2;
212
+ } else t2 = $[14];
213
+ let t3;
214
+ if ($[15] !== container || $[16] !== t2) {
215
+ t3 = /* @__PURE__ */ jsx(Menu.Portal, {
216
+ container,
217
+ children: t2
218
+ });
219
+ $[15] = container;
220
+ $[16] = t2;
221
+ $[17] = t3;
222
+ } else t3 = $[17];
223
+ return t3;
224
+ };
225
+ /** The arrow pointing from the popup at its trigger. */
153
226
  var Arrow = (t0) => {
154
227
  const $ = c(9);
155
228
  let className;
@@ -196,8 +269,9 @@ var Arrow = (t0) => {
196
269
  } else t3 = $[8];
197
270
  return t3;
198
271
  };
272
+ /** An action, with an optional leading icon. */
199
273
  var Item = (t0) => {
200
- const $ = c(14);
274
+ const $ = c(12);
201
275
  let children;
202
276
  let className;
203
277
  let icon;
@@ -222,28 +296,19 @@ var Item = (t0) => {
222
296
  $[6] = t1;
223
297
  } else t1 = $[6];
224
298
  let t2;
225
- if ($[7] !== icon) {
226
- t2 = icon && /* @__PURE__ */ jsx(Icon, {
227
- svg: icon,
228
- label: ""
229
- });
230
- $[7] = icon;
231
- $[8] = t2;
232
- } else t2 = $[8];
233
- let t3;
234
- if ($[9] !== children || $[10] !== props || $[11] !== t1 || $[12] !== t2) {
235
- t3 = /* @__PURE__ */ jsxs(Menu.Item, {
299
+ if ($[7] !== children || $[8] !== icon || $[9] !== props || $[10] !== t1) {
300
+ t2 = /* @__PURE__ */ jsxs(Menu.Item, {
236
301
  className: t1,
237
302
  ...props,
238
- children: [t2, children]
303
+ children: [icon, children]
239
304
  });
240
- $[9] = children;
241
- $[10] = props;
242
- $[11] = t1;
243
- $[12] = t2;
244
- $[13] = t3;
245
- } else t3 = $[13];
246
- return t3;
305
+ $[7] = children;
306
+ $[8] = icon;
307
+ $[9] = props;
308
+ $[10] = t1;
309
+ $[11] = t2;
310
+ } else t2 = $[11];
311
+ return t2;
247
312
  };
248
313
  /**
249
314
  * An item that leads to a page. It spreads every other prop onto the `<a>` and
@@ -280,6 +345,7 @@ var LinkItem = (t0) => {
280
345
  } else t2 = $[7];
281
346
  return t2;
282
347
  };
348
+ /** A line between groups of items. */
283
349
  var Separator = (t0) => {
284
350
  const $ = c(8);
285
351
  let className;
@@ -311,6 +377,7 @@ var Separator = (t0) => {
311
377
  } else t2 = $[7];
312
378
  return t2;
313
379
  };
380
+ /** The heading that names a `Group`. */
314
381
  var GroupLabel = (t0) => {
315
382
  const $ = c(8);
316
383
  let className;
@@ -343,34 +410,27 @@ var GroupLabel = (t0) => {
343
410
  return t2;
344
411
  };
345
412
  /**
346
- * Dropdown menu over base-ui's Menu, with an arrow pointing at the trigger.
347
- * `Menu.Item` accepts an optional leading `icon`. The positioner keeps
348
- * `--popup-edge-padding` from the viewport's edges.
413
+ * A dropdown menu over base-ui's `Menu`. `Content` bundles the portal,
414
+ * positioner and popup; the unbundled parts stay. Icons are the app's own.
349
415
  *
350
416
  * @example
351
- * import RowActionsIcon from "@material-design-icons/svg/outlined/more_vert.svg?react";
352
- * import DownloadIcon from "@material-design-icons/svg/outlined/download.svg?react";
353
- *
354
417
  * <Menu.Root>
355
- * <Menu.Trigger icon={RowActionsIcon} label="Row actions" />
356
- * <Menu.Portal>
357
- * <Menu.Positioner sideOffset={8}>
358
- * <Menu.Popup>
359
- * <Menu.Arrow />
360
- * <Menu.Item icon={DownloadIcon} onClick={download}>
361
- * Download
362
- * </Menu.Item>
363
- * </Menu.Popup>
364
- * </Menu.Positioner>
365
- * </Menu.Portal>
418
+ * <Menu.Trigger icon={<MoreIcon />} label="Row actions" />
419
+ * <Menu.Content sideOffset={8}>
420
+ * <Menu.Arrow />
421
+ * <Menu.Item icon={<DownloadIcon />} onClick={download}>
422
+ * Download
423
+ * </Menu.Item>
424
+ * </Menu.Content>
366
425
  * </Menu.Root>
367
426
  */
368
427
  var Menu$1 = {
369
- Root: Menu.Root,
428
+ Root,
370
429
  Trigger,
371
430
  Portal: Menu.Portal,
372
431
  Positioner,
373
432
  Popup,
433
+ Content,
374
434
  Arrow,
375
435
  Item,
376
436
  LinkItem,
@@ -14,4 +14,3 @@ export type NavContextValue = Readonly<{
14
14
  hint: BaseTooltip.Handle<string>;
15
15
  }>;
16
16
  export declare const NavContext: Context<NavContextValue | null>;
17
- export declare const NavItemLayoutContext: Context<NavLayout>;
@@ -1,5 +1,4 @@
1
1
  import { createContext } from "react";
2
2
  // src/components/nav/nav-context.ts
3
3
  var NavContext = createContext(null);
4
- var NavItemLayoutContext = createContext("row");
5
- export { NavContext, NavItemLayoutContext };
4
+ export { NavContext };
@@ -1,6 +1,5 @@
1
1
  import { useRender } from "@base-ui/react/use-render";
2
2
  import { type ComponentPropsWithRef, type ReactElement, type ReactNode } from "react";
3
- import { type SvgComponent } from "../icon/icon.tsx";
4
3
  import { type NavLayout } from "./nav-context.ts";
5
4
  /** What every nav entry takes besides its element's own props. */
6
5
  export type NavEntryProps = Readonly<{
@@ -18,7 +17,7 @@ type EntryShellProps = NavEntryProps & Readonly<{
18
17
  * Hangs an entry's element off the nav's one tooltip, which names it while it
19
18
  * is unlabelled. Outside a `Nav.Root` the element stands alone.
20
19
  */
21
- export declare const EntryShell: ({ layout, labelled, label, element, }: EntryShellProps) => ReactNode;
20
+ export declare const EntryShell: ({ labelled, label, element, }: EntryShellProps) => ReactNode;
22
21
  /** The attributes an entry's element carries for its layout and label. */
23
22
  export declare const entryAttributes: ({ layout, labelled, label, }: NavEntryProps) => Readonly<{
24
23
  "data-layout": NavLayout;
@@ -33,14 +32,15 @@ export type NavItemRootProps = useRender.ComponentProps<"button"> & NavEntryProp
33
32
  */
34
33
  declare const Root: ({ layout, labelled, label, className, ...props }: NavItemRootProps) => ReactNode;
35
34
  export type NavItemIconProps = Readonly<{
36
- svg: SvgComponent;
37
35
  className?: string;
36
+ /** The app's icon, drawn at `1em` in `currentColor`; the slot sizes it. */
37
+ children: ReactNode;
38
38
  }>;
39
39
  /**
40
- * The entry's glyph. A stacked entry's icon carries the destination on its own,
41
- * so it takes 24px over the row's text-matched 16px.
40
+ * The entry's icon slot. A stacked entry's icon carries the destination on its
41
+ * own, so it takes 1.5em over the row's text-matched 1em.
42
42
  */
43
- declare const NavItemIcon: ({ svg, className, }: NavItemIconProps) => ReactNode;
43
+ declare const NavItemIcon: ({ className, children, }: NavItemIconProps) => ReactNode;
44
44
  /** The entry's text. Fades out where the entry is named by its tooltip instead. */
45
45
  declare const Label: ({ className, ...props }: ComponentPropsWithRef<"span">) => ReactNode;
46
46
  type NavItemViewParts = Readonly<{
@@ -55,7 +55,7 @@ type NavItemViewParts = Readonly<{
55
55
  *
56
56
  * @example
57
57
  * <NavItemView.Root render={<Drawer.Trigger />} label="More" layout="stack">
58
- * <NavItemView.Icon svg={MoreIcon} />
58
+ * <NavItemView.Icon><MoreIcon /></NavItemView.Icon>
59
59
  * <NavItemView.Label>More</NavItemView.Label>
60
60
  * </NavItemView.Root>
61
61
  */