@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,84 +1,201 @@
1
- import SvgClose from "../../vendor/@material-design-icons/svg/outlined/close.js";
2
1
  import { Button as Button$1 } from "../button/button.js";
3
2
  import { AttachmentPreview, useAttachmentPreview } from "./attachment-preview.js";
4
3
  import attachment_tile_module_default from "./attachment-tile.module.js";
5
4
  import { c } from "react/compiler-runtime";
6
- import { useId } from "react";
7
- import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { useRender } from "@base-ui/react/use-render";
8
6
  import { clsx } from "clsx";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { useId } from "react";
9
9
  import { Button, Tag } from "react-aria-components";
10
10
  // src/components/attachment-tile/attachment-tile.tsx
11
11
  /**
12
- * A single staged attachment as a square thumbnail inside a `TagList`: an image
13
- * preview where the file is one, its extension otherwise, and a pointer-only
14
- * remove button in the corner. Removal is owned by the surrounding `TagGroup`.
15
- *
16
- * @example
17
- * <AttachmentTile id={id} file={file} hint={hint} removeLabel={label} invalid={false} disabled={false} />
12
+ * The square frame of a tile. Render it as react-aria's `Tag` inside a
13
+ * `TagList` for a staged file, or as an `<a>` for a download.
18
14
  */
19
- var AttachmentTile = (t0) => {
20
- const $ = c(15);
21
- const { id, file, hint, removeLabel, invalid, disabled } = t0;
22
- const preview = useAttachmentPreview(file);
15
+ var Root = (t0) => {
16
+ const $ = c(16);
17
+ let className;
18
+ let props;
19
+ let ref;
20
+ let render;
21
+ let t1;
22
+ if ($[0] !== t0) {
23
+ ({invalid: t1, className, render, ref, ...props} = t0);
24
+ $[0] = t0;
25
+ $[1] = className;
26
+ $[2] = props;
27
+ $[3] = ref;
28
+ $[4] = render;
29
+ $[5] = t1;
30
+ } else {
31
+ className = $[1];
32
+ props = $[2];
33
+ ref = $[3];
34
+ render = $[4];
35
+ t1 = $[5];
36
+ }
37
+ const invalid = t1 === void 0 ? false : t1;
38
+ let t2;
39
+ if ($[6] !== className) {
40
+ t2 = clsx(attachment_tile_module_default.tile, className);
41
+ $[6] = className;
42
+ $[7] = t2;
43
+ } else t2 = $[7];
44
+ const t3 = invalid || void 0;
45
+ let t4;
46
+ if ($[8] !== props || $[9] !== t2 || $[10] !== t3) {
47
+ t4 = {
48
+ ...props,
49
+ className: t2,
50
+ "data-invalid": t3
51
+ };
52
+ $[8] = props;
53
+ $[9] = t2;
54
+ $[10] = t3;
55
+ $[11] = t4;
56
+ } else t4 = $[11];
57
+ let t5;
58
+ if ($[12] !== ref || $[13] !== render || $[14] !== t4) {
59
+ t5 = {
60
+ defaultTagName: "span",
61
+ render,
62
+ ref,
63
+ props: t4
64
+ };
65
+ $[12] = ref;
66
+ $[13] = render;
67
+ $[14] = t4;
68
+ $[15] = t5;
69
+ } else t5 = $[15];
70
+ return useRender(t5);
71
+ };
72
+ /**
73
+ * The pointer-only remove button in a staged tile's corner, its children the
74
+ * glyph. The surrounding `TagGroup` owns the removal, and the keyboard removes
75
+ * with Delete.
76
+ */
77
+ var Remove = (t0) => {
78
+ const $ = c(11);
79
+ const { label, children, className } = t0;
23
80
  const removeId = useId();
24
- const t1 = invalid || void 0;
81
+ let t1;
82
+ if ($[0] !== className) {
83
+ t1 = clsx(attachment_tile_module_default.remove, className);
84
+ $[0] = className;
85
+ $[1] = t1;
86
+ } else t1 = $[1];
25
87
  let t2;
26
- if ($[0] !== file.name || $[1] !== hint || $[2] !== preview.pending || $[3] !== preview.src) {
27
- t2 = /* @__PURE__ */ jsx(AttachmentPreview, {
28
- name: file.name,
29
- hint,
30
- src: preview.src,
31
- pending: preview.pending
88
+ if ($[2] !== removeId) {
89
+ t2 = /* @__PURE__ */ jsx(Button, {
90
+ slot: "remove",
91
+ id: removeId,
92
+ "aria-labelledby": removeId,
93
+ excludeFromTabOrder: true
32
94
  });
33
- $[0] = file.name;
34
- $[1] = hint;
35
- $[2] = preview.pending;
36
- $[3] = preview.src;
37
- $[4] = t2;
38
- } else t2 = $[4];
95
+ $[2] = removeId;
96
+ $[3] = t2;
97
+ } else t2 = $[3];
39
98
  let t3;
40
- if ($[5] !== removeId || $[6] !== removeLabel) {
41
- t3 = removeLabel === void 0 ? null : /* @__PURE__ */ jsx("span", {
42
- className: attachment_tile_module_default.remove,
43
- children: /* @__PURE__ */ jsx(Button$1, {
44
- variant: "tertiary",
45
- size: "sm",
46
- iconOnly: true,
47
- icon: SvgClose,
48
- label: removeLabel,
49
- render: /* @__PURE__ */ jsx(Button, {
50
- slot: "remove",
51
- id: removeId,
52
- "aria-labelledby": removeId,
53
- excludeFromTabOrder: true
54
- })
55
- })
99
+ if ($[4] !== children || $[5] !== label || $[6] !== t2) {
100
+ t3 = /* @__PURE__ */ jsx(Button$1, {
101
+ variant: "tertiary",
102
+ size: "sm",
103
+ iconOnly: true,
104
+ icon: children,
105
+ label,
106
+ render: t2
56
107
  });
57
- $[5] = removeId;
58
- $[6] = removeLabel;
108
+ $[4] = children;
109
+ $[5] = label;
110
+ $[6] = t2;
59
111
  $[7] = t3;
60
112
  } else t3 = $[7];
61
113
  let t4;
62
- if ($[8] !== disabled || $[9] !== file.name || $[10] !== id || $[11] !== t1 || $[12] !== t2 || $[13] !== t3) {
63
- t4 = /* @__PURE__ */ jsxs(Tag, {
114
+ if ($[8] !== t1 || $[9] !== t3) {
115
+ t4 = /* @__PURE__ */ jsx("span", {
116
+ className: t1,
117
+ children: t3
118
+ });
119
+ $[8] = t1;
120
+ $[9] = t3;
121
+ $[10] = t4;
122
+ } else t4 = $[10];
123
+ return t4;
124
+ };
125
+ var Prefab = (t0) => {
126
+ const $ = c(19);
127
+ const { id, file, hint, removeLabel, removeIcon, invalid, disabled, icon, className } = t0;
128
+ const preview = useAttachmentPreview(file);
129
+ let t1;
130
+ if ($[0] !== disabled || $[1] !== file.name || $[2] !== id) {
131
+ t1 = /* @__PURE__ */ jsx(Tag, {
64
132
  id,
65
133
  textValue: file.name,
66
- isDisabled: disabled,
67
- className: attachment_tile_module_default.tile,
68
- "data-invalid": t1,
134
+ isDisabled: disabled
135
+ });
136
+ $[0] = disabled;
137
+ $[1] = file.name;
138
+ $[2] = id;
139
+ $[3] = t1;
140
+ } else t1 = $[3];
141
+ let t2;
142
+ if ($[4] !== file.name || $[5] !== hint || $[6] !== icon || $[7] !== preview.pending || $[8] !== preview.src) {
143
+ t2 = /* @__PURE__ */ jsx(AttachmentPreview, {
144
+ name: file.name,
145
+ hint,
146
+ src: preview.src,
147
+ pending: preview.pending,
148
+ icon
149
+ });
150
+ $[4] = file.name;
151
+ $[5] = hint;
152
+ $[6] = icon;
153
+ $[7] = preview.pending;
154
+ $[8] = preview.src;
155
+ $[9] = t2;
156
+ } else t2 = $[9];
157
+ let t3;
158
+ if ($[10] !== removeIcon || $[11] !== removeLabel) {
159
+ t3 = removeLabel === void 0 ? null : /* @__PURE__ */ jsx(Remove, {
160
+ label: removeLabel,
161
+ children: removeIcon
162
+ });
163
+ $[10] = removeIcon;
164
+ $[11] = removeLabel;
165
+ $[12] = t3;
166
+ } else t3 = $[12];
167
+ let t4;
168
+ if ($[13] !== className || $[14] !== invalid || $[15] !== t1 || $[16] !== t2 || $[17] !== t3) {
169
+ t4 = /* @__PURE__ */ jsxs(Root, {
170
+ invalid,
171
+ className,
172
+ render: t1,
69
173
  children: [t2, t3]
70
174
  });
71
- $[8] = disabled;
72
- $[9] = file.name;
73
- $[10] = id;
74
- $[11] = t1;
75
- $[12] = t2;
76
- $[13] = t3;
77
- $[14] = t4;
78
- } else t4 = $[14];
175
+ $[13] = className;
176
+ $[14] = invalid;
177
+ $[15] = t1;
178
+ $[16] = t2;
179
+ $[17] = t3;
180
+ $[18] = t4;
181
+ } else t4 = $[18];
79
182
  return t4;
80
183
  };
81
184
  /**
185
+ * A single staged attachment as a square thumbnail inside a `TagList`: an image
186
+ * preview where the file is one, its extension otherwise, and a pointer-only
187
+ * remove button in the corner. Removal is owned by the surrounding `TagGroup`.
188
+ * The parts hanging off it compose a tile by hand.
189
+ *
190
+ * @example
191
+ * <AttachmentTile id={id} file={file} hint={hint} removeLabel="Remove" removeIcon={<CloseIcon />} invalid={false} disabled={false} />
192
+ */
193
+ var AttachmentTile = Object.assign(Prefab, {
194
+ Root,
195
+ Preview: AttachmentPreview,
196
+ Remove
197
+ });
198
+ /**
82
199
  * An attachment on a message that has been sent: the tile the composer stages,
83
200
  * without the remove button, and as a download of the stored file once there is
84
201
  * one.
@@ -87,40 +204,47 @@ var AttachmentTile = (t0) => {
87
204
  * <SentAttachmentTile name="nota.pdf" hint="nota.pdf (12 kB)" src={url} href={url} label="Download nota.pdf" />
88
205
  */
89
206
  var SentAttachmentTile = (props) => {
90
- const $ = c(10);
207
+ const $ = c(14);
91
208
  let t0;
92
- if ($[0] !== props.hint || $[1] !== props.name || $[2] !== props.pending || $[3] !== props.src) {
93
- t0 = /* @__PURE__ */ jsx(AttachmentPreview, {
209
+ if ($[0] !== props.href || $[1] !== props.label || $[2] !== props.name) {
210
+ t0 = props.href === void 0 ? void 0 : /* @__PURE__ */ jsx("a", {
211
+ href: props.href,
212
+ download: props.name,
213
+ "aria-label": props.label
214
+ });
215
+ $[0] = props.href;
216
+ $[1] = props.label;
217
+ $[2] = props.name;
218
+ $[3] = t0;
219
+ } else t0 = $[3];
220
+ let t1;
221
+ if ($[4] !== props.hint || $[5] !== props.icon || $[6] !== props.name || $[7] !== props.pending || $[8] !== props.src) {
222
+ t1 = /* @__PURE__ */ jsx(AttachmentPreview, {
94
223
  name: props.name,
95
224
  hint: props.hint,
96
225
  src: props.src,
97
- pending: props.pending
226
+ pending: props.pending,
227
+ icon: props.icon
98
228
  });
99
- $[0] = props.hint;
100
- $[1] = props.name;
101
- $[2] = props.pending;
102
- $[3] = props.src;
103
- $[4] = t0;
104
- } else t0 = $[4];
105
- const preview = t0;
106
- let t1;
107
- if ($[5] !== preview || $[6] !== props.href || $[7] !== props.label || $[8] !== props.name) {
108
- t1 = props.href === void 0 ? /* @__PURE__ */ jsx("span", {
109
- className: attachment_tile_module_default.tile,
110
- children: preview
111
- }) : /* @__PURE__ */ jsx("a", {
112
- className: clsx(attachment_tile_module_default.tile, attachment_tile_module_default.link),
113
- href: props.href,
114
- download: props.name,
115
- "aria-label": props.label,
116
- children: preview
117
- });
118
- $[5] = preview;
119
- $[6] = props.href;
120
- $[7] = props.label;
121
- $[8] = props.name;
229
+ $[4] = props.hint;
230
+ $[5] = props.icon;
231
+ $[6] = props.name;
232
+ $[7] = props.pending;
233
+ $[8] = props.src;
122
234
  $[9] = t1;
123
235
  } else t1 = $[9];
124
- return t1;
236
+ let t2;
237
+ if ($[10] !== props.className || $[11] !== t0 || $[12] !== t1) {
238
+ t2 = /* @__PURE__ */ jsx(Root, {
239
+ className: props.className,
240
+ render: t0,
241
+ children: t1
242
+ });
243
+ $[10] = props.className;
244
+ $[11] = t0;
245
+ $[12] = t1;
246
+ $[13] = t2;
247
+ } else t2 = $[13];
248
+ return t2;
125
249
  };
126
250
  export { AttachmentTile, SentAttachmentTile };
@@ -1,20 +1,20 @@
1
1
  import './attachment-tile.css';// src/components/attachment-tile/attachment-tile.module.scss
2
- var tile = "_tile_1v5fo_3";
3
- var link = "_link_1v5fo_38";
4
- var preview = "_preview_1v5fo_48";
5
- var image = "_image_1v5fo_59";
6
- var imageSkeleton = "_imageSkeleton_1v5fo_64";
7
- var extension = "_extension_1v5fo_71";
8
- var name = "_name_1v5fo_75";
9
- var remove = "_remove_1v5fo_83";
2
+ var tile = "_tile_gqsrq_3";
3
+ var preview = "_preview_gqsrq_48";
4
+ var image = "_image_gqsrq_59";
5
+ var imageSkeleton = "_imageSkeleton_gqsrq_64";
6
+ var icon = "_icon_gqsrq_71";
7
+ var extension = "_extension_gqsrq_80";
8
+ var name = "_name_gqsrq_84";
9
+ var remove = "_remove_gqsrq_92";
10
10
  var attachment_tile_module_default = {
11
11
  tile,
12
- link,
13
12
  preview,
14
13
  image,
15
14
  imageSkeleton,
15
+ icon,
16
16
  extension,
17
17
  name,
18
18
  remove
19
19
  };
20
- export { attachment_tile_module_default as default, extension, image, imageSkeleton, link, name, preview, remove, tile };
20
+ export { attachment_tile_module_default as default, extension, icon, image, imageSkeleton, name, preview, remove, tile };
@@ -1,2 +1,2 @@
1
- export * from "./attachment-preview.tsx";
1
+ export { type AttachmentPreviewProps, type AttachmentPreviewSource, useAttachmentPreview, } from "./attachment-preview.tsx";
2
2
  export * from "./attachment-tile.tsx";
@@ -1,3 +1,3 @@
1
- import { AttachmentPreview, useAttachmentPreview } from "./attachment-preview.js";
1
+ import { useAttachmentPreview } from "./attachment-preview.js";
2
2
  import { AttachmentTile, SentAttachmentTile } from "./attachment-tile.js";
3
- export { AttachmentPreview, AttachmentTile, SentAttachmentTile, useAttachmentPreview };
3
+ export { AttachmentTile, SentAttachmentTile, useAttachmentPreview };
@@ -1,19 +1,19 @@
1
- import type { ReactNode } from "react";
2
- export type AvatarProps = Readonly<{
1
+ import type { ComponentPropsWithRef, ReactNode } from "react";
2
+ export type AvatarProps = Omit<ComponentPropsWithRef<"span">, "children"> & Readonly<{
3
3
  /** Display name; drives the initials and the (stable) tone. */
4
4
  name: string;
5
5
  /** Portrait to show in place of the initials, where there is one. */
6
6
  src?: string;
7
7
  /** Diameter relative to the surrounding font size (in `em`). @default 2.5 */
8
8
  size?: number;
9
- className?: string;
10
9
  }>;
11
10
  /**
12
11
  * A small circular avatar: the portrait at `src`, falling back to initials over
13
12
  * a colour that stays the same for the same name. Decorative: the name it
14
- * stands for is always beside it, so it is not announced.
13
+ * stands for is always beside it, so it is not announced. Other props go to
14
+ * the `<span>`.
15
15
  *
16
16
  * @example
17
17
  * <Avatar name="Ada Lovelace" src={colleague.portraitUrl} />
18
18
  */
19
- export declare const Avatar: ({ name, src, size, className, }: AvatarProps) => ReactNode;
19
+ export declare const Avatar: ({ name, src, size, className, style: inlineStyle, ...props }: AvatarProps) => ReactNode;
@@ -1,7 +1,7 @@
1
1
  import avatar_module_default from "./avatar.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
  import { Avatar } from "@base-ui/react/avatar";
6
6
  // src/components/avatar/avatar.tsx
7
7
  var TONE_COUNT = 5;
@@ -20,79 +20,106 @@ var toneOf = (name) => {
20
20
  /**
21
21
  * A small circular avatar: the portrait at `src`, falling back to initials over
22
22
  * a colour that stays the same for the same name. Decorative: the name it
23
- * stands for is always beside it, so it is not announced.
23
+ * stands for is always beside it, so it is not announced. Other props go to
24
+ * the `<span>`.
24
25
  *
25
26
  * @example
26
27
  * <Avatar name="Ada Lovelace" src={colleague.portraitUrl} />
27
28
  */
28
29
  var Avatar$1 = (t0) => {
29
- const $ = c(18);
30
- const { name, src, size: t1, className } = t0;
30
+ const $ = c(27);
31
+ let className;
32
+ let inlineStyle;
33
+ let name;
34
+ let props;
35
+ let src;
36
+ let t1;
37
+ if ($[0] !== t0) {
38
+ ({name, src, size: t1, className, style: inlineStyle, ...props} = t0);
39
+ $[0] = t0;
40
+ $[1] = className;
41
+ $[2] = inlineStyle;
42
+ $[3] = name;
43
+ $[4] = props;
44
+ $[5] = src;
45
+ $[6] = t1;
46
+ } else {
47
+ className = $[1];
48
+ inlineStyle = $[2];
49
+ name = $[3];
50
+ props = $[4];
51
+ src = $[5];
52
+ t1 = $[6];
53
+ }
31
54
  const size = t1 === void 0 ? 2.5 : t1;
32
55
  let t2;
33
- if ($[0] !== className) {
56
+ if ($[7] !== className) {
34
57
  t2 = clsx(avatar_module_default.avatar, className);
35
- $[0] = className;
36
- $[1] = t2;
37
- } else t2 = $[1];
58
+ $[7] = className;
59
+ $[8] = t2;
60
+ } else t2 = $[8];
38
61
  const t3 = `${size * INITIALS_RATIO}em`;
39
62
  let t4;
40
- if ($[2] !== t3) {
63
+ if ($[9] !== inlineStyle || $[10] !== t3) {
41
64
  t4 = {
42
65
  fontSize: t3,
43
66
  inlineSize: `${1 / INITIALS_RATIO}em`,
44
- blockSize: `${1 / INITIALS_RATIO}em`
67
+ blockSize: `${1 / INITIALS_RATIO}em`,
68
+ ...inlineStyle
45
69
  };
46
- $[2] = t3;
47
- $[3] = t4;
48
- } else t4 = $[3];
70
+ $[9] = inlineStyle;
71
+ $[10] = t3;
72
+ $[11] = t4;
73
+ } else t4 = $[11];
49
74
  let t5;
50
- if ($[4] !== name) {
75
+ if ($[12] !== name) {
51
76
  t5 = toneOf(name);
52
- $[4] = name;
53
- $[5] = t5;
54
- } else t5 = $[5];
77
+ $[12] = name;
78
+ $[13] = t5;
79
+ } else t5 = $[13];
55
80
  let t6;
56
- if ($[6] !== src) {
81
+ if ($[14] !== src) {
57
82
  t6 = src === void 0 ? null : /* @__PURE__ */ jsx(Avatar.Image, {
58
83
  src,
59
84
  alt: "",
60
85
  className: avatar_module_default.image
61
86
  });
62
- $[6] = src;
63
- $[7] = t6;
64
- } else t6 = $[7];
87
+ $[14] = src;
88
+ $[15] = t6;
89
+ } else t6 = $[15];
65
90
  let t7;
66
- if ($[8] !== name) {
91
+ if ($[16] !== name) {
67
92
  t7 = initialsOf(name);
68
- $[8] = name;
69
- $[9] = t7;
70
- } else t7 = $[9];
93
+ $[16] = name;
94
+ $[17] = t7;
95
+ } else t7 = $[17];
71
96
  let t8;
72
- if ($[10] !== t7) {
97
+ if ($[18] !== t7) {
73
98
  t8 = /* @__PURE__ */ jsx(Avatar.Fallback, {
74
99
  className: avatar_module_default.fallback,
75
100
  children: t7
76
101
  });
77
- $[10] = t7;
78
- $[11] = t8;
79
- } else t8 = $[11];
102
+ $[18] = t7;
103
+ $[19] = t8;
104
+ } else t8 = $[19];
80
105
  let t9;
81
- if ($[12] !== t2 || $[13] !== t4 || $[14] !== t5 || $[15] !== t6 || $[16] !== t8) {
106
+ if ($[20] !== props || $[21] !== t2 || $[22] !== t4 || $[23] !== t5 || $[24] !== t6 || $[25] !== t8) {
82
107
  t9 = /* @__PURE__ */ jsxs(Avatar.Root, {
108
+ ...props,
83
109
  className: t2,
84
110
  style: t4,
85
111
  "data-tone": t5,
86
112
  "aria-hidden": "true",
87
113
  children: [t6, t8]
88
114
  });
89
- $[12] = t2;
90
- $[13] = t4;
91
- $[14] = t5;
92
- $[15] = t6;
93
- $[16] = t8;
94
- $[17] = t9;
95
- } else t9 = $[17];
115
+ $[20] = props;
116
+ $[21] = t2;
117
+ $[22] = t4;
118
+ $[23] = t5;
119
+ $[24] = t6;
120
+ $[25] = t8;
121
+ $[26] = t9;
122
+ } else t9 = $[26];
96
123
  return t9;
97
124
  };
98
125
  export { Avatar$1 as Avatar };
@@ -4,9 +4,9 @@ import { Popover } from "../popover/popover.js";
4
4
  import { AvatarGroupContext, useAvatarGroup } from "./avatar-group-context.js";
5
5
  import avatar_group_module_default from "./avatar-group.module.js";
6
6
  import { c } from "react/compiler-runtime";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
- import { clsx } from "clsx";
9
7
  import { useRender } from "@base-ui/react/use-render";
8
+ import { clsx } from "clsx";
9
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
10
  // src/components/avatar-group/avatar-group.tsx
11
11
  var LIST_AVATAR_SIZE = 1.5;
12
12
  /** The stack: a named group of avatars, overlapping, with no control of its own. */
@@ -1,7 +1,7 @@
1
1
  import badge_module_default from "./badge.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/badge/badge.tsx
6
6
  /**
7
7
  * Small styled leaf for counts and short status labels. Coloured by
@@ -29,28 +29,37 @@ export type BreadcrumbsPageProps = ComponentPropsWithRef<"span">;
29
29
  */
30
30
  declare const Page: ({ className, children, ...props }: BreadcrumbsPageProps) => ReactNode;
31
31
  export type BreadcrumbsSeparatorProps = useRender.ComponentProps<"li">;
32
- /** The decorative mark between two crumbs; a chevron unless given `children`. */
33
- declare const Separator: ({ render, className, children, ref, ...props }: BreadcrumbsSeparatorProps) => ReactElement;
32
+ /**
33
+ * The decorative space between two crumbs, holding the app's mark, such as a
34
+ * chevron, given as `children`. Without one it is spacing alone.
35
+ */
36
+ declare const Separator: ({ render, className, ref, ...props }: BreadcrumbsSeparatorProps) => ReactElement;
34
37
  export type BreadcrumbsOverflowProps = Readonly<{
35
38
  /** Accessible name of the button, such as "Show more", surfaced as its tooltip. */
36
39
  label: string;
40
+ /** The button's glyph, such as the app's ellipsis. */
41
+ icon: ReactNode;
37
42
  /** The folded crumbs, each a `Menu.LinkItem`. */
38
43
  children: ReactNode;
39
44
  }>;
40
45
  /** A button that opens a menu of the crumbs the trail has no room for. */
41
- declare const Overflow: ({ label, children, }: BreadcrumbsOverflowProps) => ReactNode;
46
+ declare const Overflow: ({ label, icon, children, }: BreadcrumbsOverflowProps) => ReactNode;
42
47
  export type BreadcrumbsGaugeProps = Readonly<{
43
48
  /** Every crumb's label, outermost first. */
44
49
  labels: readonly ReactNode[];
45
50
  /** The `Overflow` button's label, so the copy measures the same. */
46
51
  overflowLabel: string;
52
+ /** The `Overflow` button's glyph, so the copy measures the same. */
53
+ overflowIcon: ReactNode;
54
+ /** The mark between crumbs, so the copy measures the same. */
55
+ separator?: ReactNode;
47
56
  ref: Ref<HTMLOListElement>;
48
57
  }>;
49
58
  /**
50
59
  * A hidden copy of the whole trail at its full length, with one separator and
51
60
  * the overflow button, for `useFold` to measure.
52
61
  */
53
- declare const Gauge: ({ labels, overflowLabel, ref, }: BreadcrumbsGaugeProps) => ReactNode;
62
+ declare const Gauge: ({ labels, overflowLabel, overflowIcon, separator, ref, }: BreadcrumbsGaugeProps) => ReactNode;
54
63
  /** One crumb of a trail: its label and, above the current page, the link it renders as. */
55
64
  export type Crumb = Readonly<{
56
65
  /** Stable key, such as the route id. */
@@ -66,6 +75,10 @@ export type BreadcrumbsProps = Readonly<{
66
75
  label: string;
67
76
  /** The overflow button's name, such as "Show more". */
68
77
  overflowLabel: string;
78
+ /** The overflow button's glyph, such as the app's ellipsis. */
79
+ overflowIcon: ReactNode;
80
+ /** The mark between crumbs, such as the app's chevron; without one, crumbs are kept apart by spacing alone. */
81
+ separator?: ReactNode;
69
82
  /** The trail, outermost first; the last crumb is the current page. */
70
83
  crumbs: readonly Crumb[];
71
84
  className?: string;
@@ -75,7 +88,7 @@ export type BreadcrumbsProps = Readonly<{
75
88
  * first fold into an overflow menu, one by one, until it fits. The first crumb
76
89
  * and the current page stay. Renders nothing for a trail of one.
77
90
  */
78
- declare const Trail: ({ label, overflowLabel, crumbs, className, }: BreadcrumbsProps) => ReactNode;
91
+ declare const Trail: ({ label, overflowLabel, overflowIcon, separator, crumbs, className, }: BreadcrumbsProps) => ReactNode;
79
92
  type BreadcrumbsParts = typeof Trail & Readonly<{
80
93
  Root: typeof Root;
81
94
  List: typeof List;
@@ -94,10 +107,12 @@ type BreadcrumbsParts = typeof Trail & Readonly<{
94
107
  * <Breadcrumbs
95
108
  * label="Breadcrumbs"
96
109
  * overflowLabel="Show more"
110
+ * overflowIcon={<MoreIcon />}
111
+ * separator={<ChevronIcon />}
97
112
  * crumbs={[
98
113
  * { id: "home", label: "Home", render: <Link to="/" /> },
99
- * { id: "declarations", label: "Declarations", render: <Link to="/declarations" /> },
100
- * { id: "declaration", label: "Declaration 2041" },
114
+ * { id: "invoices", label: "Invoices", render: <Link to="/invoices" /> },
115
+ * { id: "invoice", label: "Invoice 2041" },
101
116
  * ]}
102
117
  * />
103
118
  */