@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
@@ -1,10 +1,22 @@
1
1
  import { CloseButton as CloseButton$1 } from "../button/close-button.js";
2
2
  import dialog_module_default from "./dialog.module.js";
3
3
  import { c } from "react/compiler-runtime";
4
- import { jsx } from "react/jsx-runtime";
5
4
  import { clsx } from "clsx";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Dialog } from "@base-ui/react/dialog";
7
7
  // src/components/dialog/dialog.tsx
8
+ /** Holds the dialog's open state for its parts. It renders no element of its own. */
9
+ var Root = (props) => {
10
+ const $ = c(2);
11
+ let t0;
12
+ if ($[0] !== props) {
13
+ t0 = /* @__PURE__ */ jsx(Dialog.Root, { ...props });
14
+ $[0] = props;
15
+ $[1] = t0;
16
+ } else t0 = $[1];
17
+ return t0;
18
+ };
19
+ /** The dimmed layer behind a modal dialog. */
8
20
  var Backdrop = (t0) => {
9
21
  const $ = c(8);
10
22
  let className;
@@ -36,6 +48,7 @@ var Backdrop = (t0) => {
36
48
  } else t2 = $[7];
37
49
  return t2;
38
50
  };
51
+ /** The dialog's surface. */
39
52
  var Popup = (t0) => {
40
53
  const $ = c(8);
41
54
  let className;
@@ -67,6 +80,7 @@ var Popup = (t0) => {
67
80
  } else t2 = $[7];
68
81
  return t2;
69
82
  };
83
+ /** The dialog's heading, which names it. */
70
84
  var Title = (t0) => {
71
85
  const $ = c(8);
72
86
  let className;
@@ -100,46 +114,96 @@ var Title = (t0) => {
100
114
  };
101
115
  /** The title's line. Put a `Dialog.CloseButton` in it to trail a way out. */
102
116
  var Header = (t0) => {
103
- const $ = c(5);
104
- const { children, className } = t0;
117
+ const $ = c(8);
118
+ let className;
119
+ let props;
120
+ if ($[0] !== t0) {
121
+ ({className, ...props} = t0);
122
+ $[0] = t0;
123
+ $[1] = className;
124
+ $[2] = props;
125
+ } else {
126
+ className = $[1];
127
+ props = $[2];
128
+ }
105
129
  let t1;
106
- if ($[0] !== className) {
130
+ if ($[3] !== className) {
107
131
  t1 = clsx(dialog_module_default.header, className);
108
- $[0] = className;
109
- $[1] = t1;
110
- } else t1 = $[1];
132
+ $[3] = className;
133
+ $[4] = t1;
134
+ } else t1 = $[4];
111
135
  let t2;
112
- if ($[2] !== children || $[3] !== t1) {
136
+ if ($[5] !== props || $[6] !== t1) {
113
137
  t2 = /* @__PURE__ */ jsx("div", {
114
138
  className: t1,
115
- children
139
+ ...props
116
140
  });
117
- $[2] = children;
118
- $[3] = t1;
119
- $[4] = t2;
120
- } else t2 = $[4];
141
+ $[5] = props;
142
+ $[6] = t1;
143
+ $[7] = t2;
144
+ } else t2 = $[7];
121
145
  return t2;
122
146
  };
123
- /** The icon-only way out, for a header or a footer. */
147
+ /** The icon-only way out, for a header or a footer, drawn with the app's `icon`. */
124
148
  var CloseButton = (t0) => {
125
- const $ = c(3);
126
- const { closeLabel } = t0;
149
+ const $ = c(4);
150
+ const { closeLabel, icon } = t0;
127
151
  let t1;
128
152
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
129
153
  t1 = /* @__PURE__ */ jsx(Dialog.Close, {});
130
154
  $[0] = t1;
131
155
  } else t1 = $[0];
132
156
  let t2;
133
- if ($[1] !== closeLabel) {
157
+ if ($[1] !== closeLabel || $[2] !== icon) {
134
158
  t2 = /* @__PURE__ */ jsx(CloseButton$1, {
135
159
  closeLabel,
160
+ icon,
136
161
  render: t1
137
162
  });
138
163
  $[1] = closeLabel;
139
- $[2] = t2;
140
- } else t2 = $[2];
164
+ $[2] = icon;
165
+ $[3] = t2;
166
+ } else t2 = $[3];
141
167
  return t2;
142
168
  };
169
+ /** `Portal`, `Backdrop` and `Popup` in one: the dialog's surface, above the page. */
170
+ var Content = (t0) => {
171
+ const $ = c(9);
172
+ let container;
173
+ let props;
174
+ if ($[0] !== t0) {
175
+ ({container, ...props} = t0);
176
+ $[0] = t0;
177
+ $[1] = container;
178
+ $[2] = props;
179
+ } else {
180
+ container = $[1];
181
+ props = $[2];
182
+ }
183
+ let t1;
184
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
185
+ t1 = /* @__PURE__ */ jsx(Backdrop, {});
186
+ $[3] = t1;
187
+ } else t1 = $[3];
188
+ let t2;
189
+ if ($[4] !== props) {
190
+ t2 = /* @__PURE__ */ jsx(Popup, { ...props });
191
+ $[4] = props;
192
+ $[5] = t2;
193
+ } else t2 = $[5];
194
+ let t3;
195
+ if ($[6] !== container || $[7] !== t2) {
196
+ t3 = /* @__PURE__ */ jsxs(Dialog.Portal, {
197
+ container,
198
+ children: [t1, t2]
199
+ });
200
+ $[6] = container;
201
+ $[7] = t2;
202
+ $[8] = t3;
203
+ } else t3 = $[8];
204
+ return t3;
205
+ };
206
+ /** The dialog's content, scrolling when it outgrows the surface. */
143
207
  var Body = (t0) => {
144
208
  const $ = c(8);
145
209
  let className;
@@ -171,6 +235,7 @@ var Body = (t0) => {
171
235
  } else t2 = $[7];
172
236
  return t2;
173
237
  };
238
+ /** The row the dialog's actions sit on. */
174
239
  var Footer = (t0) => {
175
240
  const $ = c(8);
176
241
  let className;
@@ -203,36 +268,34 @@ var Footer = (t0) => {
203
268
  return t2;
204
269
  };
205
270
  /**
206
- * Dialog chrome over base-ui's Dialog. Provides `Header` / `Body` / `Footer`
207
- * regions plus a styled `Backdrop` and `Popup`. Footer actions are a slot.
271
+ * A dialog over base-ui's `Dialog`, in `Header`, `Body` and `Footer` regions.
272
+ * `Content` bundles the portal, backdrop and popup; the unbundled parts stay.
208
273
  *
209
274
  * @example
210
275
  * <Dialog.Root>
211
276
  * <Dialog.Trigger>Edit</Dialog.Trigger>
212
- * <Dialog.Portal>
213
- * <Dialog.Backdrop />
214
- * <Dialog.Popup>
215
- * <Dialog.Header>
216
- * <Dialog.Title>Discard changes?</Dialog.Title>
217
- * <Dialog.CloseButton closeLabel="Close" />
218
- * </Dialog.Header>
219
- * <Dialog.Body>
220
- * <Dialog.Description>Your edits will be lost.</Dialog.Description>
221
- * </Dialog.Body>
222
- * <Dialog.Footer>
223
- * <Dialog.Close>Keep editing</Dialog.Close>
224
- * <button onClick={discard}>Discard</button>
225
- * </Dialog.Footer>
226
- * </Dialog.Popup>
227
- * </Dialog.Portal>
277
+ * <Dialog.Content>
278
+ * <Dialog.Header>
279
+ * <Dialog.Title>Discard changes?</Dialog.Title>
280
+ * <Dialog.CloseButton closeLabel="Close" icon={<CloseIcon />} />
281
+ * </Dialog.Header>
282
+ * <Dialog.Body>
283
+ * <Dialog.Description>Your edits will be lost.</Dialog.Description>
284
+ * </Dialog.Body>
285
+ * <Dialog.Footer>
286
+ * <Dialog.Close>Keep editing</Dialog.Close>
287
+ * <button onClick={discard}>Discard</button>
288
+ * </Dialog.Footer>
289
+ * </Dialog.Content>
228
290
  * </Dialog.Root>
229
291
  */
230
292
  var Dialog$1 = {
231
- Root: Dialog.Root,
293
+ Root,
232
294
  Trigger: Dialog.Trigger,
233
295
  Portal: Dialog.Portal,
234
296
  Backdrop,
235
297
  Popup,
298
+ Content,
236
299
  Title,
237
300
  Description: Dialog.Description,
238
301
  Close: Dialog.Close,
@@ -1,7 +1,7 @@
1
1
  import divider_module_default from "./divider.module.js";
2
2
  import { c } from "react/compiler-runtime";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  // src/components/divider/divider.tsx
6
6
  /**
7
7
  * A horizontal rule between two groups, with an optional subtitle under it.
@@ -1,7 +1,25 @@
1
1
  import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
2
2
  import type { ComponentProps, ReactNode } from "react";
3
3
  import { type CloseButtonProps } from "../button/close-button.tsx";
4
+ export type DrawerRootProps<Payload = unknown> = Omit<BaseDrawer.Root.Props<Payload>, "open" | "defaultOpen" | "onOpenChange" | "modal" | "children" | "swipeDirection"> & Readonly<{
5
+ /** Whether the drawer is open. Leave it out for a drawer that keeps its own state. */
6
+ open?: boolean;
7
+ /** Whether the drawer starts open, when it keeps its own state. @default false */
8
+ defaultOpen?: boolean;
9
+ /** Called with the new open state when the drawer opens or closes. */
10
+ onOpenChange?: BaseDrawer.Root.Props<Payload>["onOpenChange"];
11
+ /** Whether focus stays inside the drawer and the page behind it is inert while it is open. @default true */
12
+ modal?: BaseDrawer.Root.Props<Payload>["modal"];
13
+ /** The edge the drawer slides in from, and the way a swipe dismisses it. @default "down" */
14
+ swipeDirection?: BaseDrawer.Root.Props<Payload>["swipeDirection"];
15
+ /** The trigger and the drawer's content. */
16
+ children?: BaseDrawer.Root.Props<Payload>["children"];
17
+ }>;
18
+ /** Holds the drawer's open state for its parts. It renders no element of its own. */
19
+ declare const Root: <Payload>(props: DrawerRootProps<Payload>) => ReactNode;
20
+ /** The dimmed layer behind a modal drawer. */
4
21
  declare const Backdrop: ({ className, ...props }: ComponentProps<typeof BaseDrawer.Backdrop>) => ReactNode;
22
+ /** The fixed frame the popup slides within. */
5
23
  declare const Viewport: ({ className, ...props }: ComponentProps<typeof BaseDrawer.Viewport>) => ReactNode;
6
24
  export type DrawerPopupProps = ComponentProps<typeof BaseDrawer.Popup> & Readonly<{
7
25
  /**
@@ -10,25 +28,34 @@ export type DrawerPopupProps = ComponentProps<typeof BaseDrawer.Popup> & Readonl
10
28
  */
11
29
  filled?: boolean;
12
30
  }>;
31
+ /** The drawer's surface: a side panel, or a bottom sheet when swiped down. */
13
32
  declare const Popup: ({ className, filled, ...props }: DrawerPopupProps) => ReactNode;
33
+ /** The drawer's heading, which names it. */
14
34
  declare const Title: ({ className, ...props }: ComponentProps<typeof BaseDrawer.Title>) => ReactNode;
15
- export type DrawerHeaderProps = Readonly<{
16
- children?: ReactNode;
17
- className?: string;
18
- }>;
35
+ export type DrawerHeaderProps = ComponentProps<"div">;
19
36
  /** The title's line. Put a `Drawer.CloseButton` in it to trail a way out. */
20
- declare const Header: ({ children, className, }: DrawerHeaderProps) => ReactNode;
21
- export type DrawerCloseButtonProps = Pick<CloseButtonProps, "closeLabel">;
22
- /** The icon-only way out, for a header or a footer. */
23
- declare const CloseButton: ({ closeLabel, }: DrawerCloseButtonProps) => ReactNode;
37
+ declare const Header: ({ className, ...props }: DrawerHeaderProps) => ReactNode;
38
+ export type DrawerCloseButtonProps = Pick<CloseButtonProps, "closeLabel" | "icon">;
39
+ /** The icon-only way out, for a header or a footer, drawn with the app's `icon`. */
40
+ declare const CloseButton: ({ closeLabel, icon, }: DrawerCloseButtonProps) => ReactNode;
41
+ export type DrawerSheetProps = DrawerPopupProps & Readonly<{
42
+ /** The element the drawer is portalled into. @default document.body */
43
+ container?: BaseDrawer.Portal.Props["container"];
44
+ }>;
45
+ /**
46
+ * `Portal`, `Backdrop`, `Viewport`, `Popup` and `Content` in one: the drawer's
47
+ * surface, above the page, holding its children.
48
+ */
49
+ declare const Sheet: ({ container, children, ...props }: DrawerSheetProps) => ReactNode;
24
50
  type DrawerParts = Readonly<{
25
- Root: typeof BaseDrawer.Root;
51
+ Root: typeof Root;
26
52
  Trigger: typeof BaseDrawer.Trigger;
27
53
  Portal: typeof BaseDrawer.Portal;
28
54
  Backdrop: typeof Backdrop;
29
55
  Viewport: typeof Viewport;
30
56
  Popup: typeof Popup;
31
57
  Content: typeof BaseDrawer.Content;
58
+ Sheet: typeof Sheet;
32
59
  Header: typeof Header;
33
60
  Title: typeof Title;
34
61
  Close: typeof BaseDrawer.Close;
@@ -36,29 +63,20 @@ type DrawerParts = Readonly<{
36
63
  createHandle: typeof BaseDrawer.createHandle;
37
64
  }>;
38
65
  /**
39
- * Shared wrapper over base-ui's Drawer, mirroring its parts. Its look follows
40
- * `swipeDirection` on `Drawer.Root`: `"right"` slides a side panel in from the
41
- * right, `"down"` raises a bottom sheet up to 85dvh tall. The caller picks the
42
- * direction, for example from its own viewport query.
66
+ * A drawer over base-ui's `Drawer`: `swipeDirection="right"` slides in a side
67
+ * panel, `"down"` raises a bottom sheet. `Sheet` bundles the portal, backdrop,
68
+ * viewport, popup and content; the unbundled parts stay.
43
69
  *
44
70
  * @example
45
- * const handle = Drawer.createHandle();
46
- * const narrow = useMediaQuery("(width < 40rem)");
47
- *
48
- * <Drawer.Root handle={handle} swipeDirection={narrow ? "down" : "right"}>
49
- * <Drawer.Trigger handle={handle}>Open</Drawer.Trigger>
50
- * <Drawer.Portal>
51
- * <Drawer.Backdrop />
52
- * <Drawer.Viewport>
53
- * <Drawer.Popup>
54
- * <Drawer.Content>
55
- * <Drawer.Title>Filters</Drawer.Title>
56
- * ...
57
- * <Drawer.Close>Done</Drawer.Close>
58
- * </Drawer.Content>
59
- * </Drawer.Popup>
60
- * </Drawer.Viewport>
61
- * </Drawer.Portal>
71
+ * <Drawer.Root swipeDirection={narrow ? "down" : "right"}>
72
+ * <Drawer.Trigger>Open</Drawer.Trigger>
73
+ * <Drawer.Sheet>
74
+ * <Drawer.Header>
75
+ * <Drawer.Title>Filters</Drawer.Title>
76
+ * <Drawer.CloseButton closeLabel="Close" icon={<CloseIcon />} />
77
+ * </Drawer.Header>
78
+ * <Drawer.Close>Done</Drawer.Close>
79
+ * </Drawer.Sheet>
62
80
  * </Drawer.Root>
63
81
  */
64
82
  export declare const Drawer: DrawerParts;
@@ -1,10 +1,22 @@
1
1
  import { CloseButton as CloseButton$1 } from "../button/close-button.js";
2
2
  import drawer_module_default from "./drawer.module.js";
3
3
  import { c } from "react/compiler-runtime";
4
- import { jsx } from "react/jsx-runtime";
5
4
  import { clsx } from "clsx";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Drawer } from "@base-ui/react/drawer";
7
7
  // src/components/drawer/drawer.tsx
8
+ /** Holds the drawer's open state for its parts. It renders no element of its own. */
9
+ var Root = (props) => {
10
+ const $ = c(2);
11
+ let t0;
12
+ if ($[0] !== props) {
13
+ t0 = /* @__PURE__ */ jsx(Drawer.Root, { ...props });
14
+ $[0] = props;
15
+ $[1] = t0;
16
+ } else t0 = $[1];
17
+ return t0;
18
+ };
19
+ /** The dimmed layer behind a modal drawer. */
8
20
  var Backdrop = (t0) => {
9
21
  const $ = c(8);
10
22
  let className;
@@ -36,6 +48,7 @@ var Backdrop = (t0) => {
36
48
  } else t2 = $[7];
37
49
  return t2;
38
50
  };
51
+ /** The fixed frame the popup slides within. */
39
52
  var Viewport = (t0) => {
40
53
  const $ = c(8);
41
54
  let className;
@@ -67,6 +80,7 @@ var Viewport = (t0) => {
67
80
  } else t2 = $[7];
68
81
  return t2;
69
82
  };
83
+ /** The drawer's surface: a side panel, or a bottom sheet when swiped down. */
70
84
  var Popup = (t0) => {
71
85
  const $ = c(10);
72
86
  let className;
@@ -103,6 +117,7 @@ var Popup = (t0) => {
103
117
  } else t3 = $[9];
104
118
  return t3;
105
119
  };
120
+ /** The drawer's heading, which names it. */
106
121
  var Title = (t0) => {
107
122
  const $ = c(8);
108
123
  let className;
@@ -136,80 +151,137 @@ var Title = (t0) => {
136
151
  };
137
152
  /** The title's line. Put a `Drawer.CloseButton` in it to trail a way out. */
138
153
  var Header = (t0) => {
139
- const $ = c(5);
140
- const { children, className } = t0;
154
+ const $ = c(8);
155
+ let className;
156
+ let props;
157
+ if ($[0] !== t0) {
158
+ ({className, ...props} = t0);
159
+ $[0] = t0;
160
+ $[1] = className;
161
+ $[2] = props;
162
+ } else {
163
+ className = $[1];
164
+ props = $[2];
165
+ }
141
166
  let t1;
142
- if ($[0] !== className) {
167
+ if ($[3] !== className) {
143
168
  t1 = clsx(drawer_module_default.header, className);
144
- $[0] = className;
145
- $[1] = t1;
146
- } else t1 = $[1];
169
+ $[3] = className;
170
+ $[4] = t1;
171
+ } else t1 = $[4];
147
172
  let t2;
148
- if ($[2] !== children || $[3] !== t1) {
173
+ if ($[5] !== props || $[6] !== t1) {
149
174
  t2 = /* @__PURE__ */ jsx("div", {
150
175
  className: t1,
151
- children
176
+ ...props
152
177
  });
153
- $[2] = children;
154
- $[3] = t1;
155
- $[4] = t2;
156
- } else t2 = $[4];
178
+ $[5] = props;
179
+ $[6] = t1;
180
+ $[7] = t2;
181
+ } else t2 = $[7];
157
182
  return t2;
158
183
  };
159
- /** The icon-only way out, for a header or a footer. */
184
+ /** The icon-only way out, for a header or a footer, drawn with the app's `icon`. */
160
185
  var CloseButton = (t0) => {
161
- const $ = c(3);
162
- const { closeLabel } = t0;
186
+ const $ = c(4);
187
+ const { closeLabel, icon } = t0;
163
188
  let t1;
164
189
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
165
190
  t1 = /* @__PURE__ */ jsx(Drawer.Close, {});
166
191
  $[0] = t1;
167
192
  } else t1 = $[0];
168
193
  let t2;
169
- if ($[1] !== closeLabel) {
194
+ if ($[1] !== closeLabel || $[2] !== icon) {
170
195
  t2 = /* @__PURE__ */ jsx(CloseButton$1, {
171
196
  closeLabel,
197
+ icon,
172
198
  render: t1
173
199
  });
174
200
  $[1] = closeLabel;
175
- $[2] = t2;
176
- } else t2 = $[2];
201
+ $[2] = icon;
202
+ $[3] = t2;
203
+ } else t2 = $[3];
177
204
  return t2;
178
205
  };
179
206
  /**
180
- * Shared wrapper over base-ui's Drawer, mirroring its parts. Its look follows
181
- * `swipeDirection` on `Drawer.Root`: `"right"` slides a side panel in from the
182
- * right, `"down"` raises a bottom sheet up to 85dvh tall. The caller picks the
183
- * direction, for example from its own viewport query.
207
+ * `Portal`, `Backdrop`, `Viewport`, `Popup` and `Content` in one: the drawer's
208
+ * surface, above the page, holding its children.
209
+ */
210
+ var Sheet = (t0) => {
211
+ const $ = c(13);
212
+ let children;
213
+ let container;
214
+ let props;
215
+ if ($[0] !== t0) {
216
+ ({container, children, ...props} = t0);
217
+ $[0] = t0;
218
+ $[1] = children;
219
+ $[2] = container;
220
+ $[3] = props;
221
+ } else {
222
+ children = $[1];
223
+ container = $[2];
224
+ props = $[3];
225
+ }
226
+ let t1;
227
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
228
+ t1 = /* @__PURE__ */ jsx(Backdrop, {});
229
+ $[4] = t1;
230
+ } else t1 = $[4];
231
+ let t2;
232
+ if ($[5] !== children) {
233
+ t2 = /* @__PURE__ */ jsx(Drawer.Content, { children });
234
+ $[5] = children;
235
+ $[6] = t2;
236
+ } else t2 = $[6];
237
+ let t3;
238
+ if ($[7] !== props || $[8] !== t2) {
239
+ t3 = /* @__PURE__ */ jsx(Viewport, { children: /* @__PURE__ */ jsx(Popup, {
240
+ ...props,
241
+ children: t2
242
+ }) });
243
+ $[7] = props;
244
+ $[8] = t2;
245
+ $[9] = t3;
246
+ } else t3 = $[9];
247
+ let t4;
248
+ if ($[10] !== container || $[11] !== t3) {
249
+ t4 = /* @__PURE__ */ jsxs(Drawer.Portal, {
250
+ container,
251
+ children: [t1, t3]
252
+ });
253
+ $[10] = container;
254
+ $[11] = t3;
255
+ $[12] = t4;
256
+ } else t4 = $[12];
257
+ return t4;
258
+ };
259
+ /**
260
+ * A drawer over base-ui's `Drawer`: `swipeDirection="right"` slides in a side
261
+ * panel, `"down"` raises a bottom sheet. `Sheet` bundles the portal, backdrop,
262
+ * viewport, popup and content; the unbundled parts stay.
184
263
  *
185
264
  * @example
186
- * const handle = Drawer.createHandle();
187
- * const narrow = useMediaQuery("(width < 40rem)");
188
- *
189
- * <Drawer.Root handle={handle} swipeDirection={narrow ? "down" : "right"}>
190
- * <Drawer.Trigger handle={handle}>Open</Drawer.Trigger>
191
- * <Drawer.Portal>
192
- * <Drawer.Backdrop />
193
- * <Drawer.Viewport>
194
- * <Drawer.Popup>
195
- * <Drawer.Content>
196
- * <Drawer.Title>Filters</Drawer.Title>
197
- * ...
198
- * <Drawer.Close>Done</Drawer.Close>
199
- * </Drawer.Content>
200
- * </Drawer.Popup>
201
- * </Drawer.Viewport>
202
- * </Drawer.Portal>
265
+ * <Drawer.Root swipeDirection={narrow ? "down" : "right"}>
266
+ * <Drawer.Trigger>Open</Drawer.Trigger>
267
+ * <Drawer.Sheet>
268
+ * <Drawer.Header>
269
+ * <Drawer.Title>Filters</Drawer.Title>
270
+ * <Drawer.CloseButton closeLabel="Close" icon={<CloseIcon />} />
271
+ * </Drawer.Header>
272
+ * <Drawer.Close>Done</Drawer.Close>
273
+ * </Drawer.Sheet>
203
274
  * </Drawer.Root>
204
275
  */
205
276
  var Drawer$1 = {
206
- Root: Drawer.Root,
277
+ Root,
207
278
  Trigger: Drawer.Trigger,
208
279
  Portal: Drawer.Portal,
209
280
  Backdrop,
210
281
  Viewport,
211
282
  Popup,
212
283
  Content: Drawer.Content,
284
+ Sheet,
213
285
  Header,
214
286
  Title,
215
287
  Close: Drawer.Close,
@@ -1,11 +1,13 @@
1
1
  import type { ReactNode } from "react";
2
- import { type TextFieldClearProps, type TextPresetProps } from "../text-field/index.ts";
3
- export type EmailFieldProps = TextPresetProps & TextFieldClearProps;
2
+ import { type TextFieldBaseProps, type TextFieldClearProps, type TextPresetProps } from "../text-field/index.ts";
3
+ /** What an email field takes beside the preset props: its leading icon, and the clear button. */
4
+ export type EmailFieldExtraProps = Pick<TextFieldBaseProps, "icon"> & TextFieldClearProps;
5
+ export type EmailFieldProps = TextPresetProps & EmailFieldExtraProps;
4
6
  /**
5
7
  * An email address field, with the keyboard that carries an `@` and the
6
8
  * platform's own address autofill.
7
9
  *
8
10
  * @example
9
- * <EmailField label="Email address" optionalLabel="optional" value={email} onValueChange={setEmail} />
11
+ * <EmailField label="Email address" optionalLabel="optional" icon={<MailIcon />} value={email} onValueChange={setEmail} />
10
12
  */
11
13
  export declare const EmailField: ({ enterKeyHint, ...props }: EmailFieldProps) => ReactNode;
@@ -1,4 +1,3 @@
1
- import SvgMail from "../../vendor/@material-design-icons/svg/outlined/mail.js";
2
1
  import { TextField } from "../text-field/text-field.js";
3
2
  import { c } from "react/compiler-runtime";
4
3
  import { jsx } from "react/jsx-runtime";
@@ -8,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
8
7
  * platform's own address autofill.
9
8
  *
10
9
  * @example
11
- * <EmailField label="Email address" optionalLabel="optional" value={email} onValueChange={setEmail} />
10
+ * <EmailField label="Email address" optionalLabel="optional" icon={<MailIcon />} value={email} onValueChange={setEmail} />
12
11
  */
13
12
  var EmailField = (t0) => {
14
13
  const $ = c(6);
@@ -29,7 +28,6 @@ var EmailField = (t0) => {
29
28
  t2 = /* @__PURE__ */ jsx(TextField, {
30
29
  ...props,
31
30
  enterKeyHint,
32
- icon: SvgMail,
33
31
  type: "email",
34
32
  inputMode: "email",
35
33
  autoComplete: "email",
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
- import { type TextFieldClearProps, type TSFTextPresetProps } from "../text-field/index.ts";
3
- export type TSFEmailFieldProps = TSFTextPresetProps<TextFieldClearProps>;
2
+ import { type TSFTextPresetProps } from "../text-field/index.ts";
3
+ import { type EmailFieldExtraProps } from "./email-field.tsx";
4
+ export type TSFEmailFieldProps = TSFTextPresetProps<EmailFieldExtraProps>;
4
5
  /**
5
6
  * `EmailField` bound to the TanStack Form field it renders in. Registered as
6
7
  * `field.EmailField`.
@@ -8,9 +8,9 @@ export type EmptyMessageProps = StatusPresetProps;
8
8
  *
9
9
  * @example
10
10
  * <EmptyMessage
11
- * icon={InboxIcon}
12
- * title="No declarations yet"
13
- * description="Declarations you send show up here."
11
+ * icon={<InboxIcon />}
12
+ * title="No invoices yet"
13
+ * description="Invoices you send show up here."
14
14
  * />
15
15
  */
16
16
  export declare const EmptyMessage: (props: EmptyMessageProps) => ReactNode;
@@ -9,9 +9,9 @@ import { jsx } from "react/jsx-runtime";
9
9
  *
10
10
  * @example
11
11
  * <EmptyMessage
12
- * icon={InboxIcon}
13
- * title="No declarations yet"
14
- * description="Declarations you send show up here."
12
+ * icon={<InboxIcon />}
13
+ * title="No invoices yet"
14
+ * description="Invoices you send show up here."
15
15
  * />
16
16
  */
17
17
  var EmptyMessage = (props) => {
@@ -1,6 +1,6 @@
1
1
  import type { ErrorInfo, ReactNode } from "react";
2
2
  import { type ErrorBoundaryPropsWithRender, type FallbackProps } from "react-error-boundary";
3
- import type { SvgComponent } from "../icon/icon.tsx";
3
+ import { type ErrorMessageProps } from "../error-message/error-message.tsx";
4
4
  type SharedProps = Readonly<{
5
5
  children: ReactNode;
6
6
  /** Called with what was thrown, such as to log it. */
@@ -16,9 +16,11 @@ type DefaultFallbackProps = SharedProps & Readonly<{
16
16
  /** The fallback's description: what to do next, or who can help. */
17
17
  description?: string;
18
18
  /** A glyph on the fallback's error disc. */
19
- icon?: SvgComponent;
19
+ icon?: ErrorMessageProps["icon"];
20
20
  /** The retry button's label; without it, the fallback offers no retry. */
21
21
  retryLabel?: string;
22
+ /** The retry button's leading glyph, such as the app's restart icon. */
23
+ retryIcon?: ReactNode;
22
24
  fallbackRender?: never;
23
25
  }>;
24
26
  type CustomFallbackProps = SharedProps & Readonly<{
@@ -28,6 +30,7 @@ type CustomFallbackProps = SharedProps & Readonly<{
28
30
  description?: never;
29
31
  icon?: never;
30
32
  retryLabel?: never;
33
+ retryIcon?: never;
31
34
  }>;
32
35
  export type ErrorBoundaryProps = DefaultFallbackProps | CustomFallbackProps;
33
36
  /**