@igne-agency/react-web-ui 0.3.0 → 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 (292) 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.css +4 -3
  113. package/dist/components/fieldset/fieldset.js +1 -1
  114. package/dist/components/fieldset/fieldset.module.js +2 -2
  115. package/dist/components/file-field/file-field.css +19 -15
  116. package/dist/components/file-field/file-field.d.ts +10 -1
  117. package/dist/components/file-field/file-field.js +130 -109
  118. package/dist/components/file-field/file-field.module.js +6 -4
  119. package/dist/components/file-field/file-input.d.ts +32 -9
  120. package/dist/components/file-field/file-input.js +94 -74
  121. package/dist/components/filter-bar/filter-bar.d.ts +79 -51
  122. package/dist/components/filter-bar/filter-bar.js +552 -216
  123. package/dist/components/form/form.d.ts +4 -6
  124. package/dist/components/form/form.js +6 -8
  125. package/dist/components/icon/icon.d.ts +5 -10
  126. package/dist/components/icon/icon.js +4 -6
  127. package/dist/components/link/link.js +1 -1
  128. package/dist/components/link-button/link-button.d.ts +1 -2
  129. package/dist/components/link-button/link-button.js +12 -22
  130. package/dist/components/loading-message/loading-message.d.ts +2 -2
  131. package/dist/components/loading-message/loading-message.js +1 -1
  132. package/dist/components/locale-provider/locale-provider.js +1 -1
  133. package/dist/components/menu/menu.d.ts +40 -22
  134. package/dist/components/menu/menu.js +100 -40
  135. package/dist/components/nav/nav-context.d.ts +0 -1
  136. package/dist/components/nav/nav-context.js +1 -2
  137. package/dist/components/nav/nav-item-view.d.ts +7 -7
  138. package/dist/components/nav/nav-item-view.js +27 -51
  139. package/dist/components/nav/nav.css +72 -60
  140. package/dist/components/nav/nav.d.ts +15 -8
  141. package/dist/components/nav/nav.js +105 -52
  142. package/dist/components/nav/nav.module.js +14 -14
  143. package/dist/components/number-field/number-field.d.ts +7 -1
  144. package/dist/components/number-field/number-field.js +98 -82
  145. package/dist/components/number-field/number-input.d.ts +53 -4
  146. package/dist/components/number-field/number-input.js +68 -21
  147. package/dist/components/number-field/tsf-number-field.d.ts +1 -1
  148. package/dist/components/number-field/tsf-number-field.js +1 -1
  149. package/dist/components/otp-field/otp-input.d.ts +25 -0
  150. package/dist/components/otp-field/otp-input.js +26 -1
  151. package/dist/components/pagination/pagination.d.ts +82 -23
  152. package/dist/components/pagination/pagination.js +656 -229
  153. package/dist/components/password-field/password-field.d.ts +7 -1
  154. package/dist/components/password-field/password-field.js +117 -126
  155. package/dist/components/password-field/password-strength.js +1 -1
  156. package/dist/components/password-field/tsf-password-field.d.ts +1 -1
  157. package/dist/components/password-field/tsf-password-field.js +1 -1
  158. package/dist/components/photo-field/photo-field.d.ts +17 -3
  159. package/dist/components/photo-field/photo-field.js +168 -89
  160. package/dist/components/photo-field/photo-input-context.d.ts +25 -0
  161. package/dist/components/photo-field/photo-input-context.js +14 -0
  162. package/dist/components/photo-field/photo-input.d.ts +58 -23
  163. package/dist/components/photo-field/photo-input.js +459 -261
  164. package/dist/components/popover/popover.d.ts +55 -23
  165. package/dist/components/popover/popover.js +205 -61
  166. package/dist/components/radio-group-field/radio-group.js +1 -1
  167. package/dist/components/search-field/search-field.d.ts +7 -5
  168. package/dist/components/search-field/search-field.js +4 -6
  169. package/dist/components/search-field/tsf-search-field.d.ts +1 -1
  170. package/dist/components/search-field/tsf-search-field.js +1 -1
  171. package/dist/components/segmented-control-field/segmented-control.js +1 -1
  172. package/dist/components/select-field/select-field.d.ts +7 -1
  173. package/dist/components/select-field/select-field.js +151 -139
  174. package/dist/components/select-field/select.d.ts +28 -6
  175. package/dist/components/select-field/select.js +234 -149
  176. package/dist/components/skeleton/skeleton.js +1 -1
  177. package/dist/components/spinner/spinner.css +47 -1
  178. package/dist/components/spinner/spinner.js +28 -11
  179. package/dist/components/spinner/spinner.module.js +18 -3
  180. package/dist/components/stale/stale.d.ts +17 -21
  181. package/dist/components/stale/stale.js +307 -129
  182. package/dist/components/status-message/status-message.css +22 -21
  183. package/dist/components/status-message/status-message.d.ts +10 -5
  184. package/dist/components/status-message/status-message.js +20 -24
  185. package/dist/components/status-message/status-message.module.js +6 -6
  186. package/dist/components/status-message/status-preset.d.ts +4 -5
  187. package/dist/components/status-message/status-preset.js +3 -3
  188. package/dist/components/switch-field/switch.js +1 -1
  189. package/dist/components/tabs/tabs.d.ts +51 -28
  190. package/dist/components/tabs/tabs.js +219 -144
  191. package/dist/components/tag/tag.css +23 -21
  192. package/dist/components/tag/tag.d.ts +17 -15
  193. package/dist/components/tag/tag.js +140 -65
  194. package/dist/components/tag/tag.module.js +3 -3
  195. package/dist/components/tag-group/tag-group.css +30 -27
  196. package/dist/components/tag-group/tag-group.d.ts +10 -4
  197. package/dist/components/tag-group/tag-group.js +47 -35
  198. package/dist/components/tag-group/tag-group.module.js +4 -4
  199. package/dist/components/text-field/text-field.d.ts +14 -3
  200. package/dist/components/text-field/text-field.js +154 -133
  201. package/dist/components/text-field/text-input.d.ts +89 -3
  202. package/dist/components/text-field/text-input.js +184 -70
  203. package/dist/components/textarea-field/textarea.js +1 -1
  204. package/dist/components/time-field/time-input.d.ts +6 -0
  205. package/dist/components/time-field/time-input.js +6 -0
  206. package/dist/components/time-zone-provider/time-zone-provider.js +1 -1
  207. package/dist/components/toast/index.js +2 -2
  208. package/dist/components/toast/toast-provider.css +38 -34
  209. package/dist/components/toast/toast-provider.d.ts +65 -3
  210. package/dist/components/toast/toast-provider.js +313 -148
  211. package/dist/components/toast/toast-provider.module.js +11 -17
  212. package/dist/components/toast/toast.d.ts +5 -1
  213. package/dist/components/toast/toast.js +2 -1
  214. package/dist/components/toggle-group-field/toggle-group.js +1 -1
  215. package/dist/components/tooltip/tooltip.d.ts +6 -6
  216. package/dist/components/tooltip/tooltip.js +7 -7
  217. package/dist/data-table/data-table-content.d.ts +18 -10
  218. package/dist/data-table/data-table-content.js +145 -290
  219. package/dist/data-table/data-table-context.d.ts +4 -2
  220. package/dist/data-table/data-table-context.js +1 -1
  221. package/dist/data-table/data-table-parts.d.ts +99 -0
  222. package/dist/data-table/data-table-parts.js +1182 -0
  223. package/dist/data-table/data-table-selection.d.ts +7 -3
  224. package/dist/data-table/data-table-selection.js +62 -37
  225. package/dist/data-table/data-table.css +100 -95
  226. package/dist/data-table/data-table.d.ts +49 -25
  227. package/dist/data-table/data-table.js +95 -83
  228. package/dist/data-table/data-table.module.js +34 -34
  229. package/dist/data-table/index.d.ts +2 -1
  230. package/dist/data-table/index.js +2 -1
  231. package/dist/data-view/use-data-view.d.ts +2 -2
  232. package/dist/data-view/use-data-view.js +2 -2
  233. package/dist/index.js +7 -8
  234. package/dist/lib/calendar/calendar-navigation.d.ts +9 -2
  235. package/dist/lib/calendar/calendar-navigation.js +72 -73
  236. package/dist/lib/calendar/calendar-year.d.ts +4 -3
  237. package/dist/lib/calendar/calendar-year.js +137 -156
  238. package/dist/lib/calendar/temporal.d.ts +18 -12
  239. package/dist/lib/calendar/temporal.js +191 -147
  240. package/dist/lib/table-storage.d.ts +2 -2
  241. package/dist/lib/table-storage.js +2 -2
  242. package/dist/lib/unsaved-changes/leave-guard.js +1 -1
  243. package/dist/terrazzo/index.d.ts +16 -0
  244. package/dist/terrazzo/index.js +94 -2
  245. package/dist/tokens.css +71 -69
  246. package/package.json +3 -2
  247. package/tokens/ref.tokens.json +0 -30
  248. package/tokens/sys.tokens.json +0 -7
  249. package/dist/assets/spinner.js +0 -28
  250. package/dist/components/checkbox-field/checkbox-glyph.d.ts +0 -12
  251. package/dist/components/checkbox-field/checkbox-glyph.js +0 -38
  252. package/dist/components/combobox-field/combobox-popup-body.d.ts +0 -34
  253. package/dist/components/combobox-field/combobox-popup-body.js +0 -142
  254. package/dist/components/conversation/conversation.context.js +0 -4
  255. package/dist/vendor/@material-design-icons/svg/outlined/add.js +0 -12
  256. package/dist/vendor/@material-design-icons/svg/outlined/arrow_downward.js +0 -12
  257. package/dist/vendor/@material-design-icons/svg/outlined/arrow_forward.js +0 -12
  258. package/dist/vendor/@material-design-icons/svg/outlined/arrow_upward.js +0 -12
  259. package/dist/vendor/@material-design-icons/svg/outlined/attach_file.js +0 -12
  260. package/dist/vendor/@material-design-icons/svg/outlined/block.js +0 -12
  261. package/dist/vendor/@material-design-icons/svg/outlined/calendar_today.js +0 -12
  262. package/dist/vendor/@material-design-icons/svg/outlined/check.js +0 -12
  263. package/dist/vendor/@material-design-icons/svg/outlined/check_circle.js +0 -12
  264. package/dist/vendor/@material-design-icons/svg/outlined/chevron_left.js +0 -12
  265. package/dist/vendor/@material-design-icons/svg/outlined/chevron_right.js +0 -12
  266. package/dist/vendor/@material-design-icons/svg/outlined/close.js +0 -12
  267. package/dist/vendor/@material-design-icons/svg/outlined/content_copy.js +0 -12
  268. package/dist/vendor/@material-design-icons/svg/outlined/date_range.js +0 -12
  269. package/dist/vendor/@material-design-icons/svg/outlined/description.js +0 -12
  270. package/dist/vendor/@material-design-icons/svg/outlined/download.js +0 -12
  271. package/dist/vendor/@material-design-icons/svg/outlined/error.js +0 -12
  272. package/dist/vendor/@material-design-icons/svg/outlined/error_outline.js +0 -12
  273. package/dist/vendor/@material-design-icons/svg/outlined/expand_less.js +0 -12
  274. package/dist/vendor/@material-design-icons/svg/outlined/expand_more.js +0 -12
  275. package/dist/vendor/@material-design-icons/svg/outlined/filter_alt.js +0 -12
  276. package/dist/vendor/@material-design-icons/svg/outlined/filter_alt_off.js +0 -12
  277. package/dist/vendor/@material-design-icons/svg/outlined/first_page.js +0 -12
  278. package/dist/vendor/@material-design-icons/svg/outlined/info.js +0 -12
  279. package/dist/vendor/@material-design-icons/svg/outlined/keyboard_arrow_down.js +0 -12
  280. package/dist/vendor/@material-design-icons/svg/outlined/last_page.js +0 -12
  281. package/dist/vendor/@material-design-icons/svg/outlined/mail.js +0 -12
  282. package/dist/vendor/@material-design-icons/svg/outlined/more_horiz.js +0 -12
  283. package/dist/vendor/@material-design-icons/svg/outlined/photo_camera.js +0 -12
  284. package/dist/vendor/@material-design-icons/svg/outlined/remove.js +0 -12
  285. package/dist/vendor/@material-design-icons/svg/outlined/restart_alt.js +0 -12
  286. package/dist/vendor/@material-design-icons/svg/outlined/restore.js +0 -12
  287. package/dist/vendor/@material-design-icons/svg/outlined/search.js +0 -12
  288. package/dist/vendor/@material-design-icons/svg/outlined/unfold_more.js +0 -12
  289. package/dist/vendor/@material-design-icons/svg/outlined/upload_file.js +0 -12
  290. package/dist/vendor/@material-design-icons/svg/outlined/visibility.js +0 -12
  291. package/dist/vendor/@material-design-icons/svg/outlined/visibility_off.js +0 -12
  292. package/dist/vendor/@material-design-icons/svg/outlined/warning_amber.js +0 -12
@@ -1,6 +1,3 @@
1
- import SvgCheck from "../../vendor/@material-design-icons/svg/outlined/check.js";
2
- import SvgExpandMore from "../../vendor/@material-design-icons/svg/outlined/expand_more.js";
3
- import { Icon } from "../../components/icon/icon.js";
4
1
  import { useLocale } from "../../components/locale-provider/locale-provider.js";
5
2
  import { useTimeZone } from "../../components/time-zone-provider/time-zone-provider.js";
6
3
  import { usePopupEdgePadding } from "../popup-edge-padding.js";
@@ -9,8 +6,8 @@ import { CalendarYear } from "./calendar-year.js";
9
6
  import { dayToPlainDate } from "./temporal-value.js";
10
7
  import temporal_module_default from "./temporal.module.js";
11
8
  import { c } from "react/compiler-runtime";
12
- import { useRef } from "react";
13
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { useRef } from "react";
14
11
  import { Field } from "@base-ui/react/field";
15
12
  import { Intl } from "temporal-polyfill";
16
13
  import { startOfYear } from "@internationalized/date";
@@ -31,8 +28,8 @@ var OwnField = (t0) => {
31
28
  return t1;
32
29
  };
33
30
  var CalendarMonthSelect = (t0) => {
34
- const $ = c(26);
35
- const { state, label } = t0;
31
+ const $ = c(29);
32
+ const { state, label, checkIcon, expandIcon } = t0;
36
33
  const locale = useLocale();
37
34
  const timeZone = useTimeZone();
38
35
  const { ref, collisionPadding } = usePopupEdgePadding();
@@ -84,38 +81,46 @@ var CalendarMonthSelect = (t0) => {
84
81
  $[9] = t5;
85
82
  } else t5 = $[9];
86
83
  let t6;
87
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
88
- t6 = /* @__PURE__ */ jsx(Select.Icon, {
84
+ if ($[10] !== expandIcon) {
85
+ t6 = expandIcon !== void 0 && /* @__PURE__ */ jsx(Select.Icon, {
89
86
  className: temporal_module_default.navIcon,
90
- children: /* @__PURE__ */ jsx(Icon, {
91
- svg: SvgExpandMore,
92
- label: ""
93
- })
87
+ children: expandIcon
94
88
  });
95
- $[10] = t6;
96
- } else t6 = $[10];
89
+ $[10] = expandIcon;
90
+ $[11] = t6;
91
+ } else t6 = $[11];
97
92
  let t7;
98
- if ($[11] !== label || $[12] !== t5) {
93
+ if ($[12] !== label || $[13] !== t5 || $[14] !== t6) {
99
94
  t7 = /* @__PURE__ */ jsxs(Select.Trigger, {
100
95
  "aria-label": label,
101
96
  className: temporal_module_default.navTrigger,
102
97
  children: [t5, t6]
103
98
  });
104
- $[11] = label;
105
- $[12] = t5;
106
- $[13] = t7;
107
- } else t7 = $[13];
99
+ $[12] = label;
100
+ $[13] = t5;
101
+ $[14] = t6;
102
+ $[15] = t7;
103
+ } else t7 = $[15];
108
104
  let t8;
109
- if ($[14] !== options) {
105
+ if ($[16] !== checkIcon || $[17] !== options) {
110
106
  t8 = /* @__PURE__ */ jsx(Select.Popup, {
111
107
  className: temporal_module_default.navPopup,
112
- children: /* @__PURE__ */ jsx(Select.List, { children: options.map(_temp2) })
108
+ children: /* @__PURE__ */ jsx(Select.List, { children: options.map((option_0) => /* @__PURE__ */ jsxs(Select.Item, {
109
+ value: option_0.value,
110
+ className: temporal_module_default.navItem,
111
+ children: [/* @__PURE__ */ jsx("span", {
112
+ className: temporal_module_default.navItemIndicator,
113
+ "aria-hidden": "true",
114
+ children: /* @__PURE__ */ jsx(Select.ItemIndicator, { children: checkIcon })
115
+ }), /* @__PURE__ */ jsx(Select.ItemText, { children: option_0.label })]
116
+ }, option_0.value)) })
113
117
  });
114
- $[14] = options;
115
- $[15] = t8;
116
- } else t8 = $[15];
118
+ $[16] = checkIcon;
119
+ $[17] = options;
120
+ $[18] = t8;
121
+ } else t8 = $[18];
117
122
  let t9;
118
- if ($[16] !== collisionPadding || $[17] !== ref || $[18] !== t8) {
123
+ if ($[19] !== collisionPadding || $[20] !== ref || $[21] !== t8) {
119
124
  t9 = /* @__PURE__ */ jsx(Select.Positioner, {
120
125
  ref,
121
126
  className: temporal_module_default.navPositioner,
@@ -124,26 +129,26 @@ var CalendarMonthSelect = (t0) => {
124
129
  collisionPadding,
125
130
  children: t8
126
131
  });
127
- $[16] = collisionPadding;
128
- $[17] = ref;
129
- $[18] = t8;
130
- $[19] = t9;
131
- } else t9 = $[19];
132
+ $[19] = collisionPadding;
133
+ $[20] = ref;
134
+ $[21] = t8;
135
+ $[22] = t9;
136
+ } else t9 = $[22];
132
137
  let t10;
133
- if ($[20] !== options || $[21] !== t2 || $[22] !== t3 || $[23] !== t7 || $[24] !== t9) {
138
+ if ($[23] !== options || $[24] !== t2 || $[25] !== t3 || $[26] !== t7 || $[27] !== t9) {
134
139
  t10 = /* @__PURE__ */ jsxs(Select.Root, {
135
140
  items: options,
136
141
  value: t2,
137
142
  onValueChange: t3,
138
143
  children: [t7, t9]
139
144
  });
140
- $[20] = options;
141
- $[21] = t2;
142
- $[22] = t3;
143
- $[23] = t7;
144
- $[24] = t9;
145
- $[25] = t10;
146
- } else t10 = $[25];
145
+ $[23] = options;
146
+ $[24] = t2;
147
+ $[25] = t3;
148
+ $[26] = t7;
149
+ $[27] = t9;
150
+ $[28] = t10;
151
+ } else t10 = $[28];
147
152
  return t10;
148
153
  };
149
154
  /**
@@ -152,65 +157,59 @@ var CalendarMonthSelect = (t0) => {
152
157
  * year actually has; the year list is every year in its era.
153
158
  *
154
159
  * @example
155
- * <CalendarNavigation monthLabel="Month" yearLabel="Year" noMatchingYearLabel="No matching year." />
160
+ * <CalendarNavigation monthLabel="Month" yearLabel="Year" noMatchingYearLabel="No matching year." checkIcon={<CheckIcon />} />
156
161
  */
157
162
  var CalendarNavigation = (t0) => {
158
- const $ = c(10);
159
- const { monthLabel, yearLabel, noMatchingYearLabel } = t0;
163
+ const $ = c(14);
164
+ const { monthLabel, yearLabel, noMatchingYearLabel, checkIcon, expandIcon } = t0;
160
165
  const containerRef = useRef(null);
161
166
  const state = useCalendarNavigationState();
162
167
  if (state === null) return null;
163
168
  let t1;
164
- if ($[0] !== monthLabel || $[1] !== state) {
169
+ if ($[0] !== checkIcon || $[1] !== expandIcon || $[2] !== monthLabel || $[3] !== state) {
165
170
  t1 = /* @__PURE__ */ jsx(OwnField, { children: /* @__PURE__ */ jsx(CalendarMonthSelect, {
166
171
  state,
167
- label: monthLabel
172
+ label: monthLabel,
173
+ checkIcon,
174
+ expandIcon
168
175
  }) });
169
- $[0] = monthLabel;
170
- $[1] = state;
171
- $[2] = t1;
172
- } else t1 = $[2];
176
+ $[0] = checkIcon;
177
+ $[1] = expandIcon;
178
+ $[2] = monthLabel;
179
+ $[3] = state;
180
+ $[4] = t1;
181
+ } else t1 = $[4];
173
182
  let t2;
174
- if ($[3] !== noMatchingYearLabel || $[4] !== state || $[5] !== yearLabel) {
183
+ if ($[5] !== checkIcon || $[6] !== expandIcon || $[7] !== noMatchingYearLabel || $[8] !== state || $[9] !== yearLabel) {
175
184
  t2 = /* @__PURE__ */ jsx(OwnField, { children: /* @__PURE__ */ jsx(CalendarYear, {
176
185
  state,
177
186
  container: containerRef,
178
187
  label: yearLabel,
179
- noMatchLabel: noMatchingYearLabel
188
+ noMatchLabel: noMatchingYearLabel,
189
+ checkIcon,
190
+ expandIcon
180
191
  }) });
181
- $[3] = noMatchingYearLabel;
182
- $[4] = state;
183
- $[5] = yearLabel;
184
- $[6] = t2;
185
- } else t2 = $[6];
192
+ $[5] = checkIcon;
193
+ $[6] = expandIcon;
194
+ $[7] = noMatchingYearLabel;
195
+ $[8] = state;
196
+ $[9] = yearLabel;
197
+ $[10] = t2;
198
+ } else t2 = $[10];
186
199
  let t3;
187
- if ($[7] !== t1 || $[8] !== t2) {
200
+ if ($[11] !== t1 || $[12] !== t2) {
188
201
  t3 = /* @__PURE__ */ jsxs("div", {
189
202
  ref: containerRef,
190
203
  className: temporal_module_default.navigation,
191
204
  children: [t1, t2]
192
205
  });
193
- $[7] = t1;
194
- $[8] = t2;
195
- $[9] = t3;
196
- } else t3 = $[9];
206
+ $[11] = t1;
207
+ $[12] = t2;
208
+ $[13] = t3;
209
+ } else t3 = $[13];
197
210
  return t3;
198
211
  };
199
212
  function _temp(option) {
200
213
  return /* @__PURE__ */ jsx("span", { children: option.label }, option.value);
201
214
  }
202
- function _temp2(option_0) {
203
- return /* @__PURE__ */ jsxs(Select.Item, {
204
- value: option_0.value,
205
- className: temporal_module_default.navItem,
206
- children: [/* @__PURE__ */ jsx("span", {
207
- className: temporal_module_default.navItemIndicator,
208
- "aria-hidden": "true",
209
- children: /* @__PURE__ */ jsx(Select.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
210
- svg: SvgCheck,
211
- label: ""
212
- }) })
213
- }), /* @__PURE__ */ jsx(Select.ItemText, { children: option_0.label })]
214
- }, option_0.value);
215
- }
216
215
  export { CalendarNavigation };
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode, type RefObject } from "react";
2
+ import type { CalendarNavigationIcons } from "./calendar-navigation.tsx";
2
3
  import { type CalendarNavigationState } from "./calendar-state.ts";
3
- export type CalendarYearProps = Readonly<{
4
+ export type CalendarYearProps = CalendarNavigationIcons & Readonly<{
4
5
  state: CalendarNavigationState;
5
6
  /** Holds the popup, so it stays inside the calendar's own popover. */
6
7
  container: RefObject<HTMLDivElement | null>;
@@ -15,6 +16,6 @@ export type CalendarYearProps = Readonly<{
15
16
  * and filtered by typing.
16
17
  *
17
18
  * @example
18
- * <CalendarYear state={state} container={containerRef} label="Year" noMatchLabel="No matching year." />
19
+ * <CalendarYear state={state} container={containerRef} label="Year" noMatchLabel="No matching year." checkIcon={<CheckIcon />} />
19
20
  */
20
- export declare const CalendarYear: ({ state, container, label, noMatchLabel, }: CalendarYearProps) => ReactNode;
21
+ export declare const CalendarYear: ({ state, container, label, noMatchLabel, checkIcon, expandIcon, }: CalendarYearProps) => ReactNode;
@@ -1,13 +1,10 @@
1
- import SvgCheck from "../../vendor/@material-design-icons/svg/outlined/check.js";
2
- import SvgExpandMore from "../../vendor/@material-design-icons/svg/outlined/expand_more.js";
3
- import { Icon } from "../../components/icon/icon.js";
4
1
  import { useLocale } from "../../components/locale-provider/locale-provider.js";
5
2
  import { usePopupEdgePadding } from "../popup-edge-padding.js";
6
3
  import { eraYears } from "./calendar-state.js";
7
4
  import temporal_module_default from "./temporal.module.js";
8
5
  import { c } from "react/compiler-runtime";
9
- import { useEffectEvent, useLayoutEffect, useRef, useState } from "react";
10
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { useEffectEvent, useLayoutEffect, useRef, useState } from "react";
11
8
  import { Combobox } from "@base-ui/react/combobox";
12
9
  import { useVirtualizer } from "@tanstack/react-virtual";
13
10
  // src/lib/calendar/calendar-year.tsx
@@ -34,11 +31,11 @@ var useYearRows = (count, list) => {
34
31
  * and filtered by typing.
35
32
  *
36
33
  * @example
37
- * <CalendarYear state={state} container={containerRef} label="Year" noMatchLabel="No matching year." />
34
+ * <CalendarYear state={state} container={containerRef} label="Year" noMatchLabel="No matching year." checkIcon={<CheckIcon />} />
38
35
  */
39
36
  var CalendarYear = (t0) => {
40
- const $ = c(74);
41
- const { state, container, label, noMatchLabel } = t0;
37
+ const $ = c(72);
38
+ const { state, container, label, noMatchLabel, checkIcon, expandIcon } = t0;
42
39
  const locale = useLocale();
43
40
  const { ref, collisionPadding } = usePopupEdgePadding();
44
41
  const inputRef = useRef(null);
@@ -131,83 +128,70 @@ var CalendarYear = (t0) => {
131
128
  $[19] = t13;
132
129
  } else t13 = $[19];
133
130
  let t14;
134
- if ($[20] !== open) {
135
- t14 = (event_0) => {
136
- event_0.preventDefault();
137
- event_0.stopPropagation();
138
- inputRef.current?.focus();
139
- setOpen(!open);
140
- };
141
- $[20] = open;
142
- $[21] = t14;
143
- } else t14 = $[21];
144
- let t15;
145
- if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
146
- t15 = /* @__PURE__ */ jsx(Icon, {
147
- svg: SvgExpandMore,
148
- label: ""
149
- });
150
- $[22] = t15;
151
- } else t15 = $[22];
152
- let t16;
153
- if ($[23] !== t14) {
154
- t16 = /* @__PURE__ */ jsx(Combobox.Icon, {
131
+ if ($[20] !== expandIcon || $[21] !== open) {
132
+ t14 = expandIcon !== void 0 && /* @__PURE__ */ jsx(Combobox.Icon, {
155
133
  className: temporal_module_default.navChevron,
156
- onMouseDown: t14,
157
- children: t15
134
+ onMouseDown: (event_0) => {
135
+ event_0.preventDefault();
136
+ event_0.stopPropagation();
137
+ inputRef.current?.focus();
138
+ setOpen(!open);
139
+ },
140
+ children: expandIcon
158
141
  });
159
- $[23] = t14;
160
- $[24] = t16;
161
- } else t16 = $[24];
162
- let t17;
163
- if ($[25] !== t13 || $[26] !== t16) {
164
- t17 = /* @__PURE__ */ jsxs(Combobox.InputGroup, {
142
+ $[20] = expandIcon;
143
+ $[21] = open;
144
+ $[22] = t14;
145
+ } else t14 = $[22];
146
+ let t15;
147
+ if ($[23] !== t13 || $[24] !== t14) {
148
+ t15 = /* @__PURE__ */ jsxs(Combobox.InputGroup, {
165
149
  className: temporal_module_default.navControl,
166
- children: [t13, t16]
150
+ children: [t13, t14]
167
151
  });
168
- $[25] = t13;
169
- $[26] = t16;
170
- $[27] = t17;
171
- } else t17 = $[27];
152
+ $[23] = t13;
153
+ $[24] = t14;
154
+ $[25] = t15;
155
+ } else t15 = $[25];
156
+ const t16 = Combobox;
157
+ const t17 = temporal_module_default;
172
158
  const t18 = Combobox;
173
159
  const t19 = temporal_module_default;
174
- const t20 = Combobox;
175
- const t21 = temporal_module_default;
176
- const t22 = 4;
177
- const t23 = Combobox;
178
- const t24 = temporal_module_default;
179
- let t25;
180
- if ($[28] !== noMatchLabel) {
181
- t25 = /* @__PURE__ */ jsx(Combobox.Empty, {
160
+ const t20 = 4;
161
+ const t21 = Combobox;
162
+ const t22 = temporal_module_default;
163
+ let t23;
164
+ if ($[26] !== noMatchLabel) {
165
+ t23 = /* @__PURE__ */ jsx(Combobox.Empty, {
182
166
  className: temporal_module_default.yearEmpty,
183
167
  children: noMatchLabel
184
168
  });
185
- $[28] = noMatchLabel;
186
- $[29] = t25;
187
- } else t25 = $[29];
188
- const t26 = Combobox;
189
- const t27 = temporal_module_default;
190
- const t28 = `${totalSize}px`;
191
- let t29;
192
- if ($[30] !== t28) {
193
- t29 = { blockSize: t28 };
194
- $[30] = t28;
195
- $[31] = t29;
196
- } else t29 = $[31];
169
+ $[26] = noMatchLabel;
170
+ $[27] = t23;
171
+ } else t23 = $[27];
172
+ const t24 = Combobox;
173
+ const t25 = temporal_module_default;
174
+ const t26 = `${totalSize}px`;
175
+ let t27;
176
+ if ($[28] !== t26) {
177
+ t27 = { blockSize: t26 };
178
+ $[28] = t26;
179
+ $[29] = t27;
180
+ } else t27 = $[29];
181
+ let t28;
182
+ if ($[30] !== rows) {
183
+ t28 = rows.at(0)?.start ?? 0;
184
+ $[30] = rows;
185
+ $[31] = t28;
186
+ } else t28 = $[31];
187
+ const t29 = `translateY(${t28}px)`;
197
188
  let t30;
198
- if ($[32] !== rows) {
199
- t30 = rows.at(0)?.start ?? 0;
200
- $[32] = rows;
189
+ if ($[32] !== t29) {
190
+ t30 = { transform: t29 };
191
+ $[32] = t29;
201
192
  $[33] = t30;
202
193
  } else t30 = $[33];
203
- const t31 = `translateY(${t30}px)`;
204
- let t32;
205
- if ($[34] !== t31) {
206
- t32 = { transform: t31 };
207
- $[34] = t31;
208
- $[35] = t32;
209
- } else t32 = $[35];
210
- const t33 = rows.map((row) => {
194
+ const t31 = rows.map((row) => {
211
195
  const year_2 = matches[row.index];
212
196
  if (year_2 === void 0) return null;
213
197
  return /* @__PURE__ */ jsxs(Combobox.Item, {
@@ -219,92 +203,89 @@ var CalendarYear = (t0) => {
219
203
  children: [/* @__PURE__ */ jsx("span", {
220
204
  className: temporal_module_default.yearIndicator,
221
205
  "aria-hidden": "true",
222
- children: /* @__PURE__ */ jsx(Combobox.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
223
- svg: SvgCheck,
224
- label: ""
225
- }) })
206
+ children: /* @__PURE__ */ jsx(Combobox.ItemIndicator, { children: checkIcon })
226
207
  }), /* @__PURE__ */ jsx("span", {
227
208
  className: temporal_module_default.yearValue,
228
209
  children: yearLabel(year_2)
229
210
  })]
230
211
  }, row.key);
231
212
  });
232
- let t34;
233
- if ($[36] !== t32 || $[37] !== t33) {
234
- t34 = /* @__PURE__ */ jsx("div", {
235
- style: t32,
236
- children: t33
213
+ let t32;
214
+ if ($[34] !== t30 || $[35] !== t31) {
215
+ t32 = /* @__PURE__ */ jsx("div", {
216
+ style: t30,
217
+ children: t31
237
218
  });
219
+ $[34] = t30;
220
+ $[35] = t31;
238
221
  $[36] = t32;
239
- $[37] = t33;
240
- $[38] = t34;
241
- } else t34 = $[38];
242
- let t35;
243
- if ($[39] !== t29 || $[40] !== t34) {
244
- t35 = /* @__PURE__ */ jsx("div", {
245
- style: t29,
246
- children: t34
222
+ } else t32 = $[36];
223
+ let t33;
224
+ if ($[37] !== t27 || $[38] !== t32) {
225
+ t33 = /* @__PURE__ */ jsx("div", {
226
+ style: t27,
227
+ children: t32
247
228
  });
248
- $[39] = t29;
249
- $[40] = t34;
250
- $[41] = t35;
251
- } else t35 = $[41];
252
- let t36;
253
- if ($[42] !== t26.List || $[43] !== t27.yearList || $[44] !== t35) {
254
- t36 = /* @__PURE__ */ jsx(t26.List, {
229
+ $[37] = t27;
230
+ $[38] = t32;
231
+ $[39] = t33;
232
+ } else t33 = $[39];
233
+ let t34;
234
+ if ($[40] !== t24.List || $[41] !== t25.yearList || $[42] !== t33) {
235
+ t34 = /* @__PURE__ */ jsx(t24.List, {
255
236
  ref: setList,
256
- className: t27.yearList,
257
- children: t35
237
+ className: t25.yearList,
238
+ children: t33
258
239
  });
259
- $[42] = t26.List;
260
- $[43] = t27.yearList;
261
- $[44] = t35;
262
- $[45] = t36;
263
- } else t36 = $[45];
264
- let t37;
265
- if ($[46] !== t23.Popup || $[47] !== t24.yearPopup || $[48] !== t25 || $[49] !== t36) {
266
- t37 = /* @__PURE__ */ jsxs(t23.Popup, {
267
- className: t24.yearPopup,
268
- children: [t25, t36]
240
+ $[40] = t24.List;
241
+ $[41] = t25.yearList;
242
+ $[42] = t33;
243
+ $[43] = t34;
244
+ } else t34 = $[43];
245
+ let t35;
246
+ if ($[44] !== t21.Popup || $[45] !== t22.yearPopup || $[46] !== t23 || $[47] !== t34) {
247
+ t35 = /* @__PURE__ */ jsxs(t21.Popup, {
248
+ className: t22.yearPopup,
249
+ children: [t23, t34]
269
250
  });
270
- $[46] = t23.Popup;
271
- $[47] = t24.yearPopup;
272
- $[48] = t25;
273
- $[49] = t36;
274
- $[50] = t37;
275
- } else t37 = $[50];
276
- let t38;
277
- if ($[51] !== collisionPadding || $[52] !== ref || $[53] !== t20.Positioner || $[54] !== t21.navPositioner || $[55] !== t37) {
278
- t38 = /* @__PURE__ */ jsx(t20.Positioner, {
251
+ $[44] = t21.Popup;
252
+ $[45] = t22.yearPopup;
253
+ $[46] = t23;
254
+ $[47] = t34;
255
+ $[48] = t35;
256
+ } else t35 = $[48];
257
+ let t36;
258
+ if ($[49] !== collisionPadding || $[50] !== ref || $[51] !== t18.Positioner || $[52] !== t19.navPositioner || $[53] !== t35) {
259
+ t36 = /* @__PURE__ */ jsx(t18.Positioner, {
279
260
  ref,
280
- className: t21.navPositioner,
281
- sideOffset: t22,
261
+ className: t19.navPositioner,
262
+ sideOffset: t20,
282
263
  collisionPadding,
283
- children: t37
264
+ children: t35
284
265
  });
285
- $[51] = collisionPadding;
286
- $[52] = ref;
287
- $[53] = t20.Positioner;
288
- $[54] = t21.navPositioner;
289
- $[55] = t37;
290
- $[56] = t38;
291
- } else t38 = $[56];
292
- let t39;
293
- if ($[57] !== container || $[58] !== t18.Portal || $[59] !== t19.navPortal || $[60] !== t38) {
294
- t39 = /* @__PURE__ */ jsx(t18.Portal, {
266
+ $[49] = collisionPadding;
267
+ $[50] = ref;
268
+ $[51] = t18.Positioner;
269
+ $[52] = t19.navPositioner;
270
+ $[53] = t35;
271
+ $[54] = t36;
272
+ } else t36 = $[54];
273
+ let t37;
274
+ if ($[55] !== container || $[56] !== t16.Portal || $[57] !== t17.navPortal || $[58] !== t36) {
275
+ t37 = /* @__PURE__ */ jsx(t16.Portal, {
295
276
  container,
296
- className: t19.navPortal,
297
- children: t38
277
+ className: t17.navPortal,
278
+ children: t36
298
279
  });
299
- $[57] = container;
300
- $[58] = t18.Portal;
301
- $[59] = t19.navPortal;
302
- $[60] = t38;
303
- $[61] = t39;
304
- } else t39 = $[61];
305
- let t40;
306
- if ($[62] !== focused.year || $[63] !== matches || $[64] !== open || $[65] !== t10 || $[66] !== t11 || $[67] !== t12 || $[68] !== t17 || $[69] !== t39 || $[70] !== t5.Root || $[71] !== t9 || $[72] !== yearLabel) {
307
- t40 = /* @__PURE__ */ jsxs(t5.Root, {
280
+ $[55] = container;
281
+ $[56] = t16.Portal;
282
+ $[57] = t17.navPortal;
283
+ $[58] = t36;
284
+ $[59] = t37;
285
+ } else t37 = $[59];
286
+ let t38;
287
+ if ($[60] !== focused.year || $[61] !== matches || $[62] !== open || $[63] !== t10 || $[64] !== t11 || $[65] !== t12 || $[66] !== t15 || $[67] !== t37 || $[68] !== t5.Root || $[69] !== t9 || $[70] !== yearLabel) {
288
+ t38 = /* @__PURE__ */ jsxs(t5.Root, {
308
289
  virtualized: t6,
309
290
  items: matches,
310
291
  filter: t7,
@@ -316,22 +297,22 @@ var CalendarYear = (t0) => {
316
297
  onOpenChange: setOpen,
317
298
  onInputValueChange: t11,
318
299
  onOpenChangeComplete: t12,
319
- children: [t17, t39]
300
+ children: [t15, t37]
320
301
  });
321
- $[62] = focused.year;
322
- $[63] = matches;
323
- $[64] = open;
324
- $[65] = t10;
325
- $[66] = t11;
326
- $[67] = t12;
327
- $[68] = t17;
328
- $[69] = t39;
329
- $[70] = t5.Root;
330
- $[71] = t9;
331
- $[72] = yearLabel;
332
- $[73] = t40;
333
- } else t40 = $[73];
334
- return t40;
302
+ $[60] = focused.year;
303
+ $[61] = matches;
304
+ $[62] = open;
305
+ $[63] = t10;
306
+ $[64] = t11;
307
+ $[65] = t12;
308
+ $[66] = t15;
309
+ $[67] = t37;
310
+ $[68] = t5.Root;
311
+ $[69] = t9;
312
+ $[70] = yearLabel;
313
+ $[71] = t38;
314
+ } else t38 = $[71];
315
+ return t38;
335
316
  };
336
317
  function _temp(year_1) {
337
318
  return String(year_1);