@igne-agency/react-web-ui 0.5.0 → 0.6.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 (254) hide show
  1. package/dist/components/accordion/accordion.css +21 -21
  2. package/dist/components/accordion/accordion.d.ts +17 -4
  3. package/dist/components/accordion/accordion.js +83 -36
  4. package/dist/components/accordion/accordion.module.js +6 -6
  5. package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
  6. package/dist/components/attachment-tile/attachment-preview.js +388 -119
  7. package/dist/components/attachment-tile/attachment-tile.css +31 -25
  8. package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
  9. package/dist/components/attachment-tile/attachment-tile.js +160 -43
  10. package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
  11. package/dist/components/attachment-tile/index.d.ts +1 -1
  12. package/dist/components/avatar/avatar.css +9 -9
  13. package/dist/components/avatar/avatar.d.ts +50 -5
  14. package/dist/components/avatar/avatar.js +178 -64
  15. package/dist/components/avatar/avatar.module.js +3 -3
  16. package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
  17. package/dist/components/avatar-group/avatar-group-context.js +2 -2
  18. package/dist/components/avatar-group/avatar-group.css +26 -20
  19. package/dist/components/avatar-group/avatar-group.d.ts +85 -27
  20. package/dist/components/avatar-group/avatar-group.js +400 -246
  21. package/dist/components/avatar-group/avatar-group.module.js +8 -8
  22. package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
  23. package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
  24. package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
  25. package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
  26. package/dist/components/button/button.css +29 -31
  27. package/dist/components/button/button.d.ts +20 -16
  28. package/dist/components/button/button.js +140 -145
  29. package/dist/components/button/button.module.js +1 -1
  30. package/dist/components/button/index.js +1 -1
  31. package/dist/components/checkbox-field/checkbox-field.js +63 -49
  32. package/dist/components/checkbox-field/checkbox.css +105 -56
  33. package/dist/components/checkbox-field/checkbox.d.ts +3 -2
  34. package/dist/components/checkbox-field/checkbox.js +12 -9
  35. package/dist/components/checkbox-field/checkbox.module.js +4 -4
  36. package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
  37. package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
  38. package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
  39. package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
  40. package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
  41. package/dist/components/collapsible/collapsible.css +20 -20
  42. package/dist/components/collapsible/collapsible.d.ts +17 -4
  43. package/dist/components/collapsible/collapsible.js +83 -36
  44. package/dist/components/collapsible/collapsible.module.js +5 -5
  45. package/dist/components/combobox-field/combobox-field.js +206 -158
  46. package/dist/components/combobox-field/combobox.css +492 -277
  47. package/dist/components/combobox-field/combobox.d.ts +148 -39
  48. package/dist/components/combobox-field/combobox.js +506 -206
  49. package/dist/components/combobox-field/combobox.module.js +21 -21
  50. package/dist/components/combobox-field/value-state-view.css +5 -5
  51. package/dist/components/combobox-field/value-state-view.module.js +4 -4
  52. package/dist/components/composer/composer-attachments.d.ts +30 -11
  53. package/dist/components/composer/composer-attachments.js +45 -40
  54. package/dist/components/composer/composer-editor.css +40 -35
  55. package/dist/components/composer/composer-editor.d.ts +14 -4
  56. package/dist/components/composer/composer-editor.js +134 -44
  57. package/dist/components/composer/composer-editor.module.js +5 -5
  58. package/dist/components/composer/composer.css +22 -22
  59. package/dist/components/composer/composer.d.ts +13 -2
  60. package/dist/components/composer/composer.js +78 -63
  61. package/dist/components/composer/composer.module.js +5 -5
  62. package/dist/components/composer/index.d.ts +2 -2
  63. package/dist/components/composer/mention-text.css +5 -5
  64. package/dist/components/composer/mention-text.module.js +1 -1
  65. package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
  66. package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
  67. package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
  68. package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
  69. package/dist/components/conversation/conversation.css +52 -52
  70. package/dist/components/conversation/conversation.d.ts +43 -18
  71. package/dist/components/conversation/conversation.js +120 -78
  72. package/dist/components/conversation/conversation.module.js +15 -15
  73. package/dist/components/date-field/date-field.d.ts +1 -1
  74. package/dist/components/date-field/date-field.js +202 -100
  75. package/dist/components/date-field/date-input.d.ts +73 -37
  76. package/dist/components/date-field/date-input.js +72 -45
  77. package/dist/components/date-field/index.d.ts +1 -1
  78. package/dist/components/date-range-field/date-range-field.d.ts +1 -1
  79. package/dist/components/date-range-field/date-range-field.js +219 -107
  80. package/dist/components/date-range-field/date-range-input.d.ts +84 -40
  81. package/dist/components/date-range-field/date-range-input.js +83 -48
  82. package/dist/components/dialog/dialog.css +32 -32
  83. package/dist/components/dialog/dialog.d.ts +8 -7
  84. package/dist/components/dialog/dialog.js +8 -26
  85. package/dist/components/dialog/dialog.module.js +6 -6
  86. package/dist/components/divider/divider.css +6 -6
  87. package/dist/components/divider/divider.d.ts +36 -2
  88. package/dist/components/divider/divider.js +195 -29
  89. package/dist/components/divider/divider.module.js +3 -3
  90. package/dist/components/drawer/drawer.css +55 -56
  91. package/dist/components/drawer/drawer.d.ts +8 -7
  92. package/dist/components/drawer/drawer.js +8 -26
  93. package/dist/components/drawer/drawer.module.js +6 -6
  94. package/dist/components/field/field.css +34 -24
  95. package/dist/components/field/field.d.ts +60 -37
  96. package/dist/components/field/field.js +242 -157
  97. package/dist/components/field/field.module.js +12 -10
  98. package/dist/components/field/input-parts.d.ts +11 -13
  99. package/dist/components/field/input-parts.js +23 -42
  100. package/dist/components/field-placeholder/field-placeholder.css +6 -6
  101. package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
  102. package/dist/components/fieldset/field-group.d.ts +1 -1
  103. package/dist/components/fieldset/field-group.js +48 -42
  104. package/dist/components/fieldset/fieldset-root.d.ts +1 -1
  105. package/dist/components/fieldset/fieldset-root.js +19 -17
  106. package/dist/components/fieldset/fieldset.d.ts +2 -2
  107. package/dist/components/fieldset/fieldset.js +2 -2
  108. package/dist/components/file-field/file-field.css +126 -60
  109. package/dist/components/file-field/file-field.js +201 -109
  110. package/dist/components/file-field/file-field.module.js +4 -4
  111. package/dist/components/file-field/file-input.d.ts +66 -40
  112. package/dist/components/file-field/file-input.js +188 -132
  113. package/dist/components/filter-bar/filter-bar.css +8 -8
  114. package/dist/components/filter-bar/filter-bar.d.ts +12 -3
  115. package/dist/components/filter-bar/filter-bar.js +23 -25
  116. package/dist/components/filter-bar/filter-bar.module.js +5 -5
  117. package/dist/components/form/form.d.ts +19 -7
  118. package/dist/components/form/form.js +80 -29
  119. package/dist/components/icon/icon.css +2 -2
  120. package/dist/components/icon/icon.module.js +1 -1
  121. package/dist/components/link/link.css +6 -5
  122. package/dist/components/link/link.module.js +1 -1
  123. package/dist/components/menu/menu.css +52 -47
  124. package/dist/components/menu/menu.d.ts +32 -25
  125. package/dist/components/menu/menu.js +75 -124
  126. package/dist/components/menu/menu.module.js +8 -8
  127. package/dist/components/nav/nav-context.d.ts +1 -1
  128. package/dist/components/nav/nav-item-view.d.ts +10 -13
  129. package/dist/components/nav/nav-item-view.js +42 -54
  130. package/dist/components/nav/nav.css +150 -119
  131. package/dist/components/nav/nav.d.ts +61 -17
  132. package/dist/components/nav/nav.js +271 -176
  133. package/dist/components/nav/nav.module.js +17 -15
  134. package/dist/components/number-field/number-field.css +153 -64
  135. package/dist/components/number-field/number-field.d.ts +2 -2
  136. package/dist/components/number-field/number-field.js +112 -91
  137. package/dist/components/number-field/number-field.module.js +6 -6
  138. package/dist/components/number-field/number-input.d.ts +43 -23
  139. package/dist/components/number-field/number-input.js +179 -125
  140. package/dist/components/otp-field/otp-field.css +153 -60
  141. package/dist/components/otp-field/otp-field.d.ts +2 -2
  142. package/dist/components/otp-field/otp-field.js +62 -46
  143. package/dist/components/otp-field/otp-field.module.js +4 -4
  144. package/dist/components/otp-field/otp-input.d.ts +8 -6
  145. package/dist/components/otp-field/otp-input.js +92 -92
  146. package/dist/components/pagination/pagination.d.ts +46 -15
  147. package/dist/components/pagination/pagination.js +217 -224
  148. package/dist/components/password-field/password-field.css +23 -23
  149. package/dist/components/password-field/password-field.js +107 -85
  150. package/dist/components/password-field/password-field.module.js +8 -8
  151. package/dist/components/password-field/password-strength.d.ts +107 -3
  152. package/dist/components/password-field/password-strength.js +569 -92
  153. package/dist/components/photo-field/photo-field.js +137 -112
  154. package/dist/components/photo-field/photo-input.css +67 -44
  155. package/dist/components/photo-field/photo-input.d.ts +59 -15
  156. package/dist/components/photo-field/photo-input.js +173 -86
  157. package/dist/components/photo-field/photo-input.module.js +10 -8
  158. package/dist/components/popover/popover.css +41 -41
  159. package/dist/components/popover/popover.d.ts +66 -25
  160. package/dist/components/popover/popover.js +332 -217
  161. package/dist/components/popover/popover.module.js +15 -19
  162. package/dist/components/radio-group-field/radio-group-field.js +80 -71
  163. package/dist/components/radio-group-field/radio-group.css +112 -60
  164. package/dist/components/radio-group-field/radio-group.d.ts +19 -3
  165. package/dist/components/radio-group-field/radio-group.js +66 -23
  166. package/dist/components/radio-group-field/radio-group.module.js +4 -4
  167. package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
  168. package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
  169. package/dist/components/segmented-control-field/segmented-control.css +132 -79
  170. package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
  171. package/dist/components/segmented-control-field/segmented-control.js +124 -41
  172. package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
  173. package/dist/components/select-field/select.css +214 -101
  174. package/dist/components/select-field/select.d.ts +43 -11
  175. package/dist/components/select-field/select.js +194 -109
  176. package/dist/components/select-field/select.module.js +14 -14
  177. package/dist/components/skeleton/skeleton.css +4 -4
  178. package/dist/components/skeleton/skeleton.module.js +3 -3
  179. package/dist/components/stale/stale.css +15 -15
  180. package/dist/components/stale/stale.d.ts +27 -3
  181. package/dist/components/stale/stale.js +147 -66
  182. package/dist/components/stale/stale.module.js +6 -6
  183. package/dist/components/status-message/status-message.css +22 -22
  184. package/dist/components/status-message/status-message.module.js +6 -6
  185. package/dist/components/switch-field/switch-field.js +77 -57
  186. package/dist/components/switch-field/switch.css +112 -63
  187. package/dist/components/switch-field/switch.d.ts +20 -3
  188. package/dist/components/switch-field/switch.js +70 -27
  189. package/dist/components/switch-field/switch.module.js +4 -4
  190. package/dist/components/tabs/tabs.css +32 -32
  191. package/dist/components/tabs/tabs.d.ts +21 -7
  192. package/dist/components/tabs/tabs.js +73 -14
  193. package/dist/components/tabs/tabs.module.js +7 -7
  194. package/dist/components/tag/tag.css +84 -84
  195. package/dist/components/tag/tag.module.js +3 -3
  196. package/dist/components/tag-group/tag-group.css +94 -94
  197. package/dist/components/tag-group/tag-group.module.js +4 -4
  198. package/dist/components/text-field/text-field.css +159 -82
  199. package/dist/components/text-field/text-field.d.ts +1 -1
  200. package/dist/components/text-field/text-field.js +139 -110
  201. package/dist/components/text-field/text-field.module.js +9 -9
  202. package/dist/components/text-field/text-input.d.ts +81 -45
  203. package/dist/components/text-field/text-input.js +366 -217
  204. package/dist/components/textarea-field/textarea-field.css +7 -2
  205. package/dist/components/textarea-field/textarea-field.js +72 -56
  206. package/dist/components/textarea-field/textarea-field.module.js +2 -2
  207. package/dist/components/time-field/time-field.js +153 -60
  208. package/dist/components/time-field/time-input.d.ts +21 -10
  209. package/dist/components/time-field/time-input.js +22 -11
  210. package/dist/components/toast/toast-provider.css +34 -31
  211. package/dist/components/toast/toast-provider.d.ts +63 -14
  212. package/dist/components/toast/toast-provider.js +174 -111
  213. package/dist/components/toast/toast-provider.module.js +7 -7
  214. package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
  215. package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
  216. package/dist/components/toggle-group-field/toggle-group.css +117 -67
  217. package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
  218. package/dist/components/toggle-group-field/toggle-group.js +2 -2
  219. package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
  220. package/dist/components/tooltip/tooltip.css +4 -4
  221. package/dist/components/tooltip/tooltip.module.js +1 -1
  222. package/dist/data-table/data-table-content.js +6 -5
  223. package/dist/data-table/data-table-parts.d.ts +41 -13
  224. package/dist/data-table/data-table-parts.js +213 -172
  225. package/dist/data-table/data-table-selection.d.ts +105 -3
  226. package/dist/data-table/data-table-selection.js +654 -145
  227. package/dist/data-table/data-table.css +125 -128
  228. package/dist/data-table/data-table.d.ts +21 -26
  229. package/dist/data-table/data-table.js +20 -23
  230. package/dist/data-table/data-table.module.js +32 -34
  231. package/dist/data-table/index.d.ts +2 -2
  232. package/dist/index.js +3 -3
  233. package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
  234. package/dist/lib/calendar/calendar-navigation.js +185 -118
  235. package/dist/lib/calendar/calendar-parts.d.ts +143 -0
  236. package/dist/lib/calendar/calendar-parts.js +540 -0
  237. package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
  238. package/dist/lib/calendar/calendar-prefab.js +311 -0
  239. package/dist/lib/calendar/calendar-year.d.ts +3 -1
  240. package/dist/lib/calendar/calendar-year.js +139 -131
  241. package/dist/lib/calendar/temporal.css +325 -232
  242. package/dist/lib/calendar/temporal.d.ts +67 -82
  243. package/dist/lib/calendar/temporal.js +258 -569
  244. package/dist/lib/calendar/temporal.module.js +38 -38
  245. package/dist/lib/forms/use-connected-field.d.ts +1 -1
  246. package/dist/lib/forms/use-connected-field.js +1 -1
  247. package/dist/lib/render-as.d.ts +13 -0
  248. package/dist/lib/render-as.js +46 -0
  249. package/dist/tokens.css +6 -3
  250. package/package.json +1 -1
  251. package/tokens/dark.tokens.json +6 -0
  252. package/tokens/sys.tokens.json +7 -0
  253. package/dist/components/button/close-button.d.ts +0 -16
  254. package/dist/components/button/close-button.js +0 -30
@@ -1,5 +1,5 @@
1
1
  import { useSlidingIndicator } from "../../lib/sliding-indicator/use-sliding-indicator.js";
2
- import { Button } from "../button/button.js";
2
+ import { useRequiredContext } from "../../lib/use-required-context.js";
3
3
  import { Tooltip as Tooltip$1 } from "../tooltip/tooltip.js";
4
4
  import { NavContext } from "./nav-context.js";
5
5
  import { EntryShell, entryAttributes } from "./nav-item-view.js";
@@ -7,14 +7,18 @@ import nav_module_default from "./nav.module.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import { useRender } from "@base-ui/react/use-render";
9
9
  import { clsx } from "clsx";
10
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
+ import { jsx } from "react/jsx-runtime";
11
11
  import { use, useState } from "react";
12
12
  import { Tooltip } from "@base-ui/react/tooltip";
13
13
  import { Collapsible } from "@base-ui/react/collapsible";
14
14
  // src/components/nav/nav.tsx
15
15
  var useOrientation = () => use(NavContext)?.orientation ?? "vertical";
16
+ var useNav = () => {
17
+ return useRequiredContext(NavContext, "Nav.Hint must be rendered inside <Nav.Root>.");
18
+ };
19
+ /** The `<nav>`, holding the one hint its entries share. */
16
20
  var Root = (t0) => {
17
- const $ = c(24);
21
+ const $ = c(18);
18
22
  let children;
19
23
  let className;
20
24
  let props;
@@ -65,70 +69,201 @@ var Root = (t0) => {
65
69
  $[14] = t4;
66
70
  } else t4 = $[14];
67
71
  let t5;
68
- if ($[15] !== orientation) {
69
- t5 = (t6) => {
70
- const { payload } = t6;
72
+ if ($[15] !== t2 || $[16] !== t4) {
73
+ t5 = /* @__PURE__ */ jsx(NavContext, {
74
+ value: t2,
75
+ children: t4
76
+ });
77
+ $[15] = t2;
78
+ $[16] = t4;
79
+ $[17] = t5;
80
+ } else t5 = $[17];
81
+ return t5;
82
+ };
83
+ /**
84
+ * The one tooltip every entry with a `label` names itself through, so the hint
85
+ * travels between entries rather than one closing as the next opens. Mount it
86
+ * inside `Root` where the entries show no label, such as a collapsed rail.
87
+ *
88
+ * @example
89
+ * <Nav.Root aria-label="Main">
90
+ * <Nav.List>…</Nav.List>
91
+ * {collapsed ? <Nav.Hint /> : null}
92
+ * </Nav.Root>
93
+ */
94
+ var Hint = (t0) => {
95
+ const $ = c(6);
96
+ const { className } = t0;
97
+ const { orientation, hint } = useNav();
98
+ let t1;
99
+ if ($[0] !== className || $[1] !== orientation) {
100
+ t1 = (t2) => {
101
+ const { payload } = t2;
71
102
  return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
72
103
  side: orientation === "vertical" ? "right" : "bottom",
73
104
  className: nav_module_default.hintPositioner,
74
- children: /* @__PURE__ */ jsx(Tooltip$1.Popup, { children: /* @__PURE__ */ jsx(Tooltip$1.Viewport, {
75
- className: nav_module_default.hintViewport,
76
- children: payload
77
- }) })
105
+ children: /* @__PURE__ */ jsx(Tooltip$1.Popup, {
106
+ className,
107
+ children: /* @__PURE__ */ jsx(Tooltip$1.Viewport, {
108
+ className: nav_module_default.hintViewport,
109
+ children: payload
110
+ })
111
+ })
78
112
  }) });
79
113
  };
80
- $[15] = orientation;
81
- $[16] = t5;
82
- } else t5 = $[16];
83
- let t6;
84
- if ($[17] !== hint || $[18] !== t5) {
85
- t6 = /* @__PURE__ */ jsx(Tooltip$1.Root, {
114
+ $[0] = className;
115
+ $[1] = orientation;
116
+ $[2] = t1;
117
+ } else t1 = $[2];
118
+ let t2;
119
+ if ($[3] !== hint || $[4] !== t1) {
120
+ t2 = /* @__PURE__ */ jsx(Tooltip$1.Root, {
86
121
  handle: hint,
87
- children: t5
88
- });
89
- $[17] = hint;
90
- $[18] = t5;
91
- $[19] = t6;
92
- } else t6 = $[19];
93
- let t7;
94
- if ($[20] !== t2 || $[21] !== t4 || $[22] !== t6) {
95
- t7 = /* @__PURE__ */ jsxs(NavContext, {
96
- value: t2,
97
- children: [t4, t6]
122
+ children: t1
98
123
  });
99
- $[20] = t2;
100
- $[21] = t4;
101
- $[22] = t6;
102
- $[23] = t7;
103
- } else t7 = $[23];
104
- return t7;
124
+ $[3] = hint;
125
+ $[4] = t1;
126
+ $[5] = t2;
127
+ } else t2 = $[5];
128
+ return t2;
105
129
  };
106
- var ACTIVE_ENTRY = ":scope > li:has(> [aria-current=\"page\"]), :scope > li:has(> [data-active=\"true\"])";
107
130
  /**
108
- * The entries. In a horizontal nav a pill slides to the entry marked
109
- * `aria-current="page"` or `data-active="true"`.
131
+ * Lets a horizontal `List` scroll sideways once it outgrows its room.
132
+ *
133
+ * @example
134
+ * <Nav.Scroller>
135
+ * <Nav.List>…</Nav.List>
136
+ * </Nav.Scroller>
110
137
  */
138
+ var Scroller = (t0) => {
139
+ const $ = c(14);
140
+ let className;
141
+ let props;
142
+ let ref;
143
+ let render;
144
+ if ($[0] !== t0) {
145
+ ({render, className, ref, ...props} = t0);
146
+ $[0] = t0;
147
+ $[1] = className;
148
+ $[2] = props;
149
+ $[3] = ref;
150
+ $[4] = render;
151
+ } else {
152
+ className = $[1];
153
+ props = $[2];
154
+ ref = $[3];
155
+ render = $[4];
156
+ }
157
+ let t1;
158
+ if ($[5] !== className) {
159
+ t1 = clsx(nav_module_default.scroller, className);
160
+ $[5] = className;
161
+ $[6] = t1;
162
+ } else t1 = $[6];
163
+ let t2;
164
+ if ($[7] !== props || $[8] !== t1) {
165
+ t2 = {
166
+ ...props,
167
+ className: t1
168
+ };
169
+ $[7] = props;
170
+ $[8] = t1;
171
+ $[9] = t2;
172
+ } else t2 = $[9];
173
+ let t3;
174
+ if ($[10] !== ref || $[11] !== render || $[12] !== t2) {
175
+ t3 = {
176
+ defaultTagName: "div",
177
+ render,
178
+ ref,
179
+ props: t2
180
+ };
181
+ $[10] = ref;
182
+ $[11] = render;
183
+ $[12] = t2;
184
+ $[13] = t3;
185
+ } else t3 = $[13];
186
+ return useRender(t3);
187
+ };
188
+ /** The entries, laid out along the nav's orientation. */
111
189
  var List = (t0) => {
112
- const $ = c(25);
113
- let children;
190
+ const $ = c(13);
114
191
  let className;
115
192
  let props;
116
193
  let ref;
117
194
  if ($[0] !== t0) {
118
- ({className, children, ref, ...props} = t0);
195
+ ({className, ref, ...props} = t0);
119
196
  $[0] = t0;
120
- $[1] = children;
121
- $[2] = className;
122
- $[3] = props;
123
- $[4] = ref;
197
+ $[1] = className;
198
+ $[2] = props;
199
+ $[3] = ref;
124
200
  } else {
125
- children = $[1];
126
- className = $[2];
127
- props = $[3];
128
- ref = $[4];
201
+ className = $[1];
202
+ props = $[2];
203
+ ref = $[3];
129
204
  }
130
205
  const orientation = useOrientation();
131
- const horizontal = orientation === "horizontal";
206
+ let t1;
207
+ if ($[4] !== className) {
208
+ t1 = clsx(nav_module_default.list, className);
209
+ $[4] = className;
210
+ $[5] = t1;
211
+ } else t1 = $[5];
212
+ let t2;
213
+ if ($[6] !== orientation || $[7] !== props || $[8] !== t1) {
214
+ t2 = {
215
+ "data-orientation": orientation,
216
+ className: t1,
217
+ ...props
218
+ };
219
+ $[6] = orientation;
220
+ $[7] = props;
221
+ $[8] = t1;
222
+ $[9] = t2;
223
+ } else t2 = $[9];
224
+ let t3;
225
+ if ($[10] !== ref || $[11] !== t2) {
226
+ t3 = {
227
+ defaultTagName: "ul",
228
+ ref,
229
+ props: t2
230
+ };
231
+ $[10] = ref;
232
+ $[11] = t2;
233
+ $[12] = t3;
234
+ } else t3 = $[12];
235
+ return useRender(t3);
236
+ };
237
+ var ACTIVE_ENTRY = ":scope > li:has(> [aria-current=\"page\"]), :scope > li:has(> [data-active=\"true\"])";
238
+ /**
239
+ * The pill that slides to the entry marked `aria-current="page"` or
240
+ * `data-active="true"`, inside a horizontal `List`.
241
+ *
242
+ * @example
243
+ * <Nav.List>
244
+ * <Nav.Indicator />
245
+ * <Nav.Item>…</Nav.Item>
246
+ * </Nav.List>
247
+ */
248
+ var Indicator = (t0) => {
249
+ const $ = c(18);
250
+ let className;
251
+ let props;
252
+ let ref;
253
+ let render;
254
+ if ($[0] !== t0) {
255
+ ({render, className, ref, ...props} = t0);
256
+ $[0] = t0;
257
+ $[1] = className;
258
+ $[2] = props;
259
+ $[3] = ref;
260
+ $[4] = render;
261
+ } else {
262
+ className = $[1];
263
+ props = $[2];
264
+ ref = $[3];
265
+ render = $[4];
266
+ }
132
267
  let t1;
133
268
  if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
134
269
  t1 = {
@@ -140,66 +275,43 @@ var List = (t0) => {
140
275
  } else t1 = $[5];
141
276
  const indicator = useSlidingIndicator(t1);
142
277
  let t2;
143
- if ($[6] !== className) {
144
- t2 = clsx(nav_module_default.list, className);
145
- $[6] = className;
146
- $[7] = t2;
147
- } else t2 = $[7];
278
+ if ($[6] !== indicator || $[7] !== ref) {
279
+ t2 = ref === void 0 ? indicator : [indicator, ref];
280
+ $[6] = indicator;
281
+ $[7] = ref;
282
+ $[8] = t2;
283
+ } else t2 = $[8];
148
284
  let t3;
149
- if ($[8] !== horizontal || $[9] !== indicator) {
150
- t3 = horizontal ? /* @__PURE__ */ jsx("li", {
151
- ref: indicator,
152
- "aria-hidden": "true",
153
- className: nav_module_default.indicator
154
- }) : null;
155
- $[8] = horizontal;
156
- $[9] = indicator;
285
+ if ($[9] !== className) {
286
+ t3 = clsx(nav_module_default.indicator, className);
287
+ $[9] = className;
157
288
  $[10] = t3;
158
289
  } else t3 = $[10];
159
290
  let t4;
160
- if ($[11] !== children || $[12] !== t3) {
161
- t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t3, children] });
162
- $[11] = children;
291
+ if ($[11] !== props || $[12] !== t3) {
292
+ t4 = {
293
+ "aria-hidden": true,
294
+ ...props,
295
+ className: t3
296
+ };
297
+ $[11] = props;
163
298
  $[12] = t3;
164
299
  $[13] = t4;
165
300
  } else t4 = $[13];
166
301
  let t5;
167
- if ($[14] !== orientation || $[15] !== props || $[16] !== t2 || $[17] !== t4) {
302
+ if ($[14] !== render || $[15] !== t2 || $[16] !== t4) {
168
303
  t5 = {
169
- "data-orientation": orientation,
170
- className: t2,
171
- ...props,
172
- children: t4
304
+ defaultTagName: "li",
305
+ render,
306
+ ref: t2,
307
+ props: t4
173
308
  };
174
- $[14] = orientation;
175
- $[15] = props;
176
- $[16] = t2;
177
- $[17] = t4;
178
- $[18] = t5;
179
- } else t5 = $[18];
180
- let t6;
181
- if ($[19] !== ref || $[20] !== t5) {
182
- t6 = {
183
- defaultTagName: "ul",
184
- ref,
185
- props: t5
186
- };
187
- $[19] = ref;
188
- $[20] = t5;
189
- $[21] = t6;
190
- } else t6 = $[21];
191
- const list = useRender(t6);
192
- let t7;
193
- if ($[22] !== horizontal || $[23] !== list) {
194
- t7 = horizontal ? /* @__PURE__ */ jsx("div", {
195
- className: nav_module_default.scroller,
196
- children: list
197
- }) : list;
198
- $[22] = horizontal;
199
- $[23] = list;
200
- $[24] = t7;
201
- } else t7 = $[24];
202
- return t7;
309
+ $[14] = render;
310
+ $[15] = t2;
311
+ $[16] = t4;
312
+ $[17] = t5;
313
+ } else t5 = $[17];
314
+ return useRender(t5);
203
315
  };
204
316
  var Item = (props) => {
205
317
  const $ = c(2);
@@ -217,74 +329,65 @@ var Item = (props) => {
217
329
  * `aria-current="page"` marks the current one.
218
330
  */
219
331
  var Link = (t0) => {
220
- const $ = c(22);
332
+ const $ = c(18);
221
333
  let className;
222
334
  let label;
223
- let labelled;
224
335
  let layout;
225
336
  let props;
226
337
  if ($[0] !== t0) {
227
- ({layout, labelled, label, className, ...props} = t0);
338
+ ({layout, label, className, ...props} = t0);
228
339
  $[0] = t0;
229
340
  $[1] = className;
230
341
  $[2] = label;
231
- $[3] = labelled;
232
- $[4] = layout;
233
- $[5] = props;
342
+ $[3] = layout;
343
+ $[4] = props;
234
344
  } else {
235
345
  className = $[1];
236
346
  label = $[2];
237
- labelled = $[3];
238
- layout = $[4];
239
- props = $[5];
347
+ layout = $[3];
348
+ props = $[4];
240
349
  }
241
350
  const orientation = useOrientation();
242
351
  let t1;
243
- if ($[6] !== label || $[7] !== labelled || $[8] !== layout) {
352
+ if ($[5] !== label || $[6] !== layout) {
244
353
  t1 = entryAttributes({
245
354
  layout,
246
- labelled,
247
355
  label
248
356
  });
249
- $[6] = label;
250
- $[7] = labelled;
251
- $[8] = layout;
252
- $[9] = t1;
253
- } else t1 = $[9];
357
+ $[5] = label;
358
+ $[6] = layout;
359
+ $[7] = t1;
360
+ } else t1 = $[7];
254
361
  const t2 = orientation === "horizontal" ? nav_module_default.tab : nav_module_default.item;
255
362
  let t3;
256
- if ($[10] !== className || $[11] !== t2) {
363
+ if ($[8] !== className || $[9] !== t2) {
257
364
  t3 = clsx(t2, className);
258
- $[10] = className;
259
- $[11] = t2;
260
- $[12] = t3;
261
- } else t3 = $[12];
365
+ $[8] = className;
366
+ $[9] = t2;
367
+ $[10] = t3;
368
+ } else t3 = $[10];
262
369
  let t4;
263
- if ($[13] !== props || $[14] !== t1 || $[15] !== t3) {
370
+ if ($[11] !== props || $[12] !== t1 || $[13] !== t3) {
264
371
  t4 = /* @__PURE__ */ jsx("a", {
265
372
  ...t1,
266
373
  className: t3,
267
374
  ...props
268
375
  });
269
- $[13] = props;
270
- $[14] = t1;
271
- $[15] = t3;
272
- $[16] = t4;
273
- } else t4 = $[16];
376
+ $[11] = props;
377
+ $[12] = t1;
378
+ $[13] = t3;
379
+ $[14] = t4;
380
+ } else t4 = $[14];
274
381
  let t5;
275
- if ($[17] !== label || $[18] !== labelled || $[19] !== layout || $[20] !== t4) {
382
+ if ($[15] !== label || $[16] !== t4) {
276
383
  t5 = /* @__PURE__ */ jsx(EntryShell, {
277
- layout,
278
- labelled,
279
384
  label,
280
385
  element: t4
281
386
  });
282
- $[17] = label;
283
- $[18] = labelled;
284
- $[19] = layout;
285
- $[20] = t4;
286
- $[21] = t5;
287
- } else t5 = $[21];
387
+ $[15] = label;
388
+ $[16] = t4;
389
+ $[17] = t5;
390
+ } else t5 = $[17];
288
391
  return t5;
289
392
  };
290
393
  /**
@@ -383,55 +486,43 @@ var GroupHeader = (t0) => {
383
486
  } else t2 = $[7];
384
487
  return t2;
385
488
  };
386
- /** The icon-only button that folds the group's subpages open and shut; its children are the chevron. */
489
+ /**
490
+ * The trigger that folds the group's subpages open and shut, rendered as the
491
+ * button it is given.
492
+ *
493
+ * @example
494
+ * <Nav.GroupToggle render={<IconButton label="Show subpages" variant="tertiary"><ExpandIcon /></IconButton>} />
495
+ */
387
496
  var GroupToggle = (t0) => {
388
- const $ = c(13);
389
- let children;
497
+ const $ = c(8);
390
498
  let className;
391
- let label;
392
499
  let props;
393
500
  if ($[0] !== t0) {
394
- ({label, children, className, ...props} = t0);
501
+ ({className, ...props} = t0);
395
502
  $[0] = t0;
396
- $[1] = children;
397
- $[2] = className;
398
- $[3] = label;
399
- $[4] = props;
503
+ $[1] = className;
504
+ $[2] = props;
400
505
  } else {
401
- children = $[1];
402
- className = $[2];
403
- label = $[3];
404
- props = $[4];
506
+ className = $[1];
507
+ props = $[2];
405
508
  }
406
509
  let t1;
407
- if ($[5] !== className) {
510
+ if ($[3] !== className) {
408
511
  t1 = clsx(nav_module_default.groupToggle, className);
409
- $[5] = className;
410
- $[6] = t1;
411
- } else t1 = $[6];
512
+ $[3] = className;
513
+ $[4] = t1;
514
+ } else t1 = $[4];
412
515
  let t2;
413
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
414
- t2 = /* @__PURE__ */ jsx(Collapsible.Trigger, {});
415
- $[7] = t2;
416
- } else t2 = $[7];
417
- let t3;
418
- if ($[8] !== children || $[9] !== label || $[10] !== props || $[11] !== t1) {
419
- t3 = /* @__PURE__ */ jsx(Button, {
420
- ...props,
421
- variant: "tertiary",
422
- iconOnly: true,
516
+ if ($[5] !== props || $[6] !== t1) {
517
+ t2 = /* @__PURE__ */ jsx(Collapsible.Trigger, {
423
518
  className: t1,
424
- icon: children,
425
- label,
426
- render: t2
519
+ ...props
427
520
  });
428
- $[8] = children;
429
- $[9] = label;
430
- $[10] = props;
431
- $[11] = t1;
432
- $[12] = t3;
433
- } else t3 = $[12];
434
- return t3;
521
+ $[5] = props;
522
+ $[6] = t1;
523
+ $[7] = t2;
524
+ } else t2 = $[7];
525
+ return t2;
435
526
  };
436
527
  /** The fold that opens and shuts the group's `GroupList`. */
437
528
  var GroupPanel = (t0) => {
@@ -498,10 +589,11 @@ var GroupList = (t0) => {
498
589
  return t2;
499
590
  };
500
591
  /**
501
- * Navigation between pages as `nav > ul > li > a`: a horizontal bar of tabs
502
- * with a pill that slides to the current page, or the app's vertical rail,
503
- * whose destinations with subpages fold them open in a `Group`. An entry that
504
- * is not a link is a `NavItemView.Root`.
592
+ * Navigation between pages as `nav > ul > li > a`: a horizontal bar of tabs,
593
+ * in a `Scroller` with an `Indicator` that slides to the current page, or the
594
+ * app's vertical rail, whose destinations with subpages fold them open in a
595
+ * `Group` and whose entries without a visible label are named by the `Hint`.
596
+ * An entry that is not a link is a `NavItemView.Root`.
505
597
  *
506
598
  * @example
507
599
  * const NavLink = createLink(Nav.Link);
@@ -509,7 +601,7 @@ var GroupList = (t0) => {
509
601
  * <Nav.Root aria-label="Main">
510
602
  * <Nav.List>
511
603
  * <Nav.Item>
512
- * <NavLink to="/" label="Home" activeOptions={{ exact: true }}>
604
+ * <NavLink to="/" activeOptions={{ exact: true }}>
513
605
  * <NavItemView.Icon><HomeIcon /></NavItemView.Icon>
514
606
  * <NavItemView.Label>Home</NavItemView.Label>
515
607
  * </NavLink>
@@ -519,7 +611,10 @@ var GroupList = (t0) => {
519
611
  */
520
612
  var Nav = {
521
613
  Root,
614
+ Hint,
615
+ Scroller,
522
616
  List,
617
+ Indicator,
523
618
  Item,
524
619
  Link,
525
620
  Group,
@@ -1,19 +1,21 @@
1
1
  import './nav.css';// src/components/nav/nav.module.scss
2
- var scroller = "_scroller_9ce88_3";
3
- var list = "_list_9ce88_7";
4
- var indicator = "_indicator_9ce88_21";
5
- var tab = "_tab_9ce88_59";
6
- var iconSlot = "_iconSlot_9ce88_103";
7
- var item = "_item_9ce88_110";
8
- var label = "_label_9ce88_166";
9
- var hintPositioner = "_hintPositioner_9ce88_215";
10
- var hintViewport = "_hintViewport_9ce88_224";
11
- var group = "_group_9ce88_237";
12
- var groupHeader = "_groupHeader_9ce88_241";
13
- var groupToggle = "_groupToggle_9ce88_257";
14
- var groupPanel = "_groupPanel_9ce88_268";
15
- var groupList = "_groupList_9ce88_283";
2
+ var root = "_root_1hb8v_3";
3
+ var scroller = "_scroller_1hb8v_9";
4
+ var list = "_list_1hb8v_13";
5
+ var indicator = "_indicator_1hb8v_27";
6
+ var tab = "_tab_1hb8v_65";
7
+ var iconSlot = "_iconSlot_1hb8v_109";
8
+ var item = "_item_1hb8v_116";
9
+ var label = "_label_1hb8v_216";
10
+ var hintPositioner = "_hintPositioner_1hb8v_222";
11
+ var hintViewport = "_hintViewport_1hb8v_231";
12
+ var group = "_group_1hb8v_244";
13
+ var groupHeader = "_groupHeader_1hb8v_248";
14
+ var groupToggle = "_groupToggle_1hb8v_264";
15
+ var groupPanel = "_groupPanel_1hb8v_278";
16
+ var groupList = "_groupList_1hb8v_293";
16
17
  var nav_module_default = {
18
+ root,
17
19
  scroller,
18
20
  list,
19
21
  indicator,
@@ -29,4 +31,4 @@ var nav_module_default = {
29
31
  groupPanel,
30
32
  groupList
31
33
  };
32
- export { nav_module_default as default, group, groupHeader, groupList, groupPanel, groupToggle, hintPositioner, hintViewport, iconSlot, indicator, item, label, list, scroller, tab };
34
+ export { nav_module_default as default, group, groupHeader, groupList, groupPanel, groupToggle, hintPositioner, hintViewport, iconSlot, indicator, item, label, list, root, scroller, tab };