@calcifer-design/ui 0.5.0 → 0.7.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 (229) hide show
  1. package/dist/components/Alert/Alert.d.ts +5 -2
  2. package/dist/components/Alert/Alert.js +1 -0
  3. package/dist/components/Alert/Alert.module.js +5 -5
  4. package/dist/components/Alert/Alert_module.css +20 -17
  5. package/dist/components/Avatar/Avatar.d.ts +16 -2
  6. package/dist/components/Avatar/Avatar.js +23 -7
  7. package/dist/components/Avatar/Avatar.module.js +3 -3
  8. package/dist/components/Avatar/Avatar_module.css +58 -17
  9. package/dist/components/Avatar/avatarColor.d.ts +12 -0
  10. package/dist/components/Avatar/avatarColor.js +12 -0
  11. package/dist/components/AvatarGroup/AvatarGroup.d.ts +37 -0
  12. package/dist/components/AvatarGroup/AvatarGroup.js +52 -0
  13. package/dist/components/AvatarGroup/AvatarGroup.module.js +8 -0
  14. package/dist/components/AvatarGroup/AvatarGroup_module.css +67 -0
  15. package/dist/components/Breadcrumb/Breadcrumb.module.js +6 -6
  16. package/dist/components/Breadcrumb/Breadcrumb_module.css +7 -7
  17. package/dist/components/Button/Button.d.ts +40 -4
  18. package/dist/components/Button/Button.js +48 -11
  19. package/dist/components/Button/Button.module.js +6 -2
  20. package/dist/components/Button/Button_module.css +143 -17
  21. package/dist/components/Button/LinkButton.d.ts +10 -3
  22. package/dist/components/Button/LinkButton.js +16 -5
  23. package/dist/components/Card/Card.module.js +5 -5
  24. package/dist/components/Card/Card_module.css +15 -9
  25. package/dist/components/CardList/CardList.module.js +3 -3
  26. package/dist/components/CardList/CardList_module.css +5 -3
  27. package/dist/components/Checkbox/Checkbox.module.js +2 -2
  28. package/dist/components/Checkbox/Checkbox_module.css +3 -3
  29. package/dist/components/ChoiceCard/ChoiceCard.d.ts +34 -0
  30. package/dist/components/ChoiceCard/ChoiceCard.js +81 -0
  31. package/dist/components/ChoiceCard/ChoiceCard.module.js +12 -0
  32. package/dist/components/ChoiceCard/ChoiceCard_module.css +161 -0
  33. package/dist/components/Collapsible/Collapsible.d.ts +39 -0
  34. package/dist/components/Collapsible/Collapsible.js +63 -0
  35. package/dist/components/Collapsible/Collapsible.module.js +10 -0
  36. package/dist/components/Collapsible/Collapsible_module.css +80 -0
  37. package/dist/components/DataGrid/DataGrid.d.ts +3 -0
  38. package/dist/components/DataGrid/DataGrid.js +436 -0
  39. package/dist/components/DataGrid/DataGrid.module.js +36 -0
  40. package/dist/components/DataGrid/DataGrid_module.css +372 -0
  41. package/dist/components/DataGrid/GridCardHeader.d.ts +16 -0
  42. package/dist/components/DataGrid/GridCardHeader.js +40 -0
  43. package/dist/components/DataGrid/GridCheckbox.d.ts +15 -0
  44. package/dist/components/DataGrid/GridCheckbox.js +25 -0
  45. package/dist/components/DataGrid/GridHeaderCell.d.ts +14 -0
  46. package/dist/components/DataGrid/GridHeaderCell.js +29 -0
  47. package/dist/components/DataGrid/GridHeaderRow.d.ts +35 -0
  48. package/dist/components/DataGrid/GridHeaderRow.js +56 -0
  49. package/dist/components/DataGrid/GridRow.d.ts +69 -0
  50. package/dist/components/DataGrid/GridRow.js +139 -0
  51. package/dist/components/DataGrid/GridStateRows.d.ts +24 -0
  52. package/dist/components/DataGrid/GridStateRows.js +59 -0
  53. package/dist/components/DataGrid/columns.d.ts +40 -0
  54. package/dist/components/DataGrid/columns.js +37 -0
  55. package/dist/components/DataGrid/labels.d.ts +20 -0
  56. package/dist/components/DataGrid/labels.js +25 -0
  57. package/dist/components/DataGrid/types.d.ts +88 -0
  58. package/dist/components/DataGrid/types.js +0 -0
  59. package/dist/components/DataGrid/useGridEntries.d.ts +17 -0
  60. package/dist/components/DataGrid/useGridEntries.js +40 -0
  61. package/dist/components/DataGrid/useGridHighlight.d.ts +16 -0
  62. package/dist/components/DataGrid/useGridHighlight.js +24 -0
  63. package/dist/components/DataGrid/useGridKeyboard.d.ts +50 -0
  64. package/dist/components/DataGrid/useGridKeyboard.js +242 -0
  65. package/dist/components/DataGrid/useGridMetrics.d.ts +13 -0
  66. package/dist/components/DataGrid/useGridMetrics.js +35 -0
  67. package/dist/components/DataGrid/useLatest.d.ts +7 -0
  68. package/dist/components/DataGrid/useLatest.js +9 -0
  69. package/dist/components/DataGrid/useLoadMore.d.ts +30 -0
  70. package/dist/components/DataGrid/useLoadMore.js +39 -0
  71. package/dist/components/DataGrid/useRowExpansion.d.ts +14 -0
  72. package/dist/components/DataGrid/useRowExpansion.js +21 -0
  73. package/dist/components/DataGrid/useRowSelection.d.ts +43 -0
  74. package/dist/components/DataGrid/useRowSelection.js +107 -0
  75. package/dist/components/DataTable/DataTable.module.js +9 -9
  76. package/dist/components/DataTable/DataTable_module.css +24 -21
  77. package/dist/components/DatePicker/DatePicker.d.ts +15 -1
  78. package/dist/components/DatePicker/DatePicker.js +30 -5
  79. package/dist/components/DatePicker/DatePicker.module.js +10 -10
  80. package/dist/components/DatePicker/DatePicker_module.css +22 -21
  81. package/dist/components/Descriptions/Descriptions.module.js +4 -4
  82. package/dist/components/Descriptions/Descriptions_module.css +12 -8
  83. package/dist/components/Dialog/Dialog.d.ts +30 -2
  84. package/dist/components/Dialog/Dialog.js +52 -11
  85. package/dist/components/Dialog/Dialog.module.js +8 -6
  86. package/dist/components/Dialog/Dialog_module.css +60 -13
  87. package/dist/components/EmptyState/EmptyState.d.ts +41 -0
  88. package/dist/components/EmptyState/EmptyState.js +39 -0
  89. package/dist/components/EmptyState/EmptyState.module.js +9 -0
  90. package/dist/components/EmptyState/EmptyState_module.css +65 -0
  91. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +5 -2
  92. package/dist/components/ErrorBoundary/ErrorBoundary.module.js +1 -1
  93. package/dist/components/ErrorBoundary/ErrorBoundary_module.css +1 -1
  94. package/dist/components/Field/AffixInput.d.ts +28 -0
  95. package/dist/components/Field/AffixInput.js +50 -0
  96. package/dist/components/Field/GroupFrame.d.ts +19 -0
  97. package/dist/components/Field/GroupFrame.js +31 -0
  98. package/dist/components/Field/PickerField.d.ts +8 -2
  99. package/dist/components/Field/PickerField.js +12 -8
  100. package/dist/components/Field/PickerField.module.js +4 -4
  101. package/dist/components/Field/PickerField_module.css +11 -6
  102. package/dist/components/FilterBar/FilterBar.module.js +9 -9
  103. package/dist/components/FilterBar/FilterBar_module.css +13 -13
  104. package/dist/components/Form/Form.d.ts +9 -7
  105. package/dist/components/Form/Form.module.js +1 -1
  106. package/dist/components/Form/Form_module.css +1 -1
  107. package/dist/components/IconButton/IconButton.d.ts +1 -1
  108. package/dist/components/IconButton/IconButton.module.js +2 -2
  109. package/dist/components/IconButton/IconButton_module.css +28 -17
  110. package/dist/components/Menu/Menu.js +3 -0
  111. package/dist/components/Menu/Menu.module.js +2 -2
  112. package/dist/components/Menu/Menu_module.css +5 -4
  113. package/dist/components/NavMenu/NavMenu.d.ts +27 -4
  114. package/dist/components/NavMenu/NavMenu.js +10 -8
  115. package/dist/components/NavMenu/NavMenu.module.js +6 -6
  116. package/dist/components/NavMenu/NavMenu_module.css +37 -19
  117. package/dist/components/NavMenu/currentPath.d.ts +9 -0
  118. package/dist/components/NavMenu/currentPath.js +5 -0
  119. package/dist/components/PageHeading/PageHeading.module.js +3 -3
  120. package/dist/components/PageHeading/PageHeading_module.css +12 -9
  121. package/dist/components/PageShell/PageShell.module.js +5 -5
  122. package/dist/components/PageShell/PageShell_module.css +9 -9
  123. package/dist/components/Popover/Popover.js +3 -0
  124. package/dist/components/Popover/Popover.module.js +2 -2
  125. package/dist/components/Popover/Popover_module.css +6 -3
  126. package/dist/components/ProgressBar/ProgressBar.d.ts +55 -0
  127. package/dist/components/ProgressBar/ProgressBar.js +76 -0
  128. package/dist/components/ProgressBar/ProgressBar.module.js +12 -0
  129. package/dist/components/ProgressBar/ProgressBar_module.css +120 -0
  130. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  131. package/dist/components/RadioGroup/RadioGroup.js +35 -49
  132. package/dist/components/RadioGroup/RadioGroup.module.js +2 -2
  133. package/dist/components/RadioGroup/RadioGroup_module.css +2 -2
  134. package/dist/components/SearchField/SearchField.d.ts +32 -0
  135. package/dist/components/SearchField/SearchField.js +100 -0
  136. package/dist/components/SearchField/SearchField.module.js +8 -0
  137. package/dist/components/SearchField/SearchField_module.css +34 -0
  138. package/dist/components/Segmented/Segmented.d.ts +23 -6
  139. package/dist/components/Segmented/Segmented.js +37 -20
  140. package/dist/components/Segmented/Segmented.module.js +4 -3
  141. package/dist/components/Segmented/Segmented_module.css +46 -20
  142. package/dist/components/Select/Select.js +3 -0
  143. package/dist/components/Select/Select.module.js +5 -5
  144. package/dist/components/Select/Select_module.css +12 -11
  145. package/dist/components/Skeleton/Skeleton.module.js +3 -3
  146. package/dist/components/Skeleton/Skeleton_module.css +9 -9
  147. package/dist/components/SkipLink/SkipLink.module.js +1 -1
  148. package/dist/components/SkipLink/SkipLink_module.css +4 -4
  149. package/dist/components/Spinner/Spinner.module.js +3 -3
  150. package/dist/components/Spinner/Spinner_module.css +7 -7
  151. package/dist/components/StatusDot/StatusDot.module.js +5 -5
  152. package/dist/components/StatusDot/StatusDot_module.css +11 -11
  153. package/dist/components/Steps/Steps.module.js +6 -6
  154. package/dist/components/Steps/Steps_module.css +19 -19
  155. package/dist/components/Switch/Switch.module.js +2 -2
  156. package/dist/components/Switch/Switch_module.css +5 -5
  157. package/dist/components/TabBar/TabBar.d.ts +26 -0
  158. package/dist/components/TabBar/TabBar.js +52 -0
  159. package/dist/components/TabBar/TabBar.module.js +11 -0
  160. package/dist/components/TabBar/TabBar_module.css +100 -0
  161. package/dist/components/Tabs/Tabs.module.js +4 -4
  162. package/dist/components/Tabs/Tabs_module.css +9 -8
  163. package/dist/components/Tag/Tag.module.js +1 -1
  164. package/dist/components/Tag/Tag_module.css +3 -2
  165. package/dist/components/TextArea/TextArea.module.js +1 -1
  166. package/dist/components/TextArea/TextArea_module.css +6 -2
  167. package/dist/components/TextInput/TextInput.d.ts +14 -2
  168. package/dist/components/TextInput/TextInput.js +4 -5
  169. package/dist/components/ThemeScope/PortalContainerContext.d.ts +17 -0
  170. package/dist/components/ThemeScope/PortalContainerContext.js +6 -0
  171. package/dist/components/ThemeScope/ThemeScope.d.ts +23 -0
  172. package/dist/components/ThemeScope/ThemeScope.js +29 -0
  173. package/dist/components/ThemeScope/ThemeScope.module.js +6 -0
  174. package/dist/components/ThemeScope/ThemeScope_module.css +10 -0
  175. package/dist/components/TimePicker/TimePicker.d.ts +15 -2
  176. package/dist/components/TimePicker/TimePicker.js +5 -5
  177. package/dist/components/Timeline/Timeline.module.js +8 -8
  178. package/dist/components/Timeline/Timeline_module.css +15 -13
  179. package/dist/components/ToastRegion/ToastRegion.js +3 -0
  180. package/dist/components/ToastRegion/ToastRegion.module.js +6 -6
  181. package/dist/components/ToastRegion/ToastRegion_module.css +23 -19
  182. package/dist/components/ToggleChip/ToggleChip.d.ts +49 -0
  183. package/dist/components/ToggleChip/ToggleChip.js +45 -0
  184. package/dist/components/ToggleChip/ToggleChip.module.js +9 -0
  185. package/dist/components/ToggleChip/ToggleChipGroup.d.ts +57 -0
  186. package/dist/components/ToggleChip/ToggleChipGroup.js +93 -0
  187. package/dist/components/ToggleChip/ToggleChip_module.css +97 -0
  188. package/dist/components/Toolbar/Toolbar.module.js +3 -3
  189. package/dist/components/Toolbar/Toolbar_module.css +5 -5
  190. package/dist/components/Tooltip/Tooltip.js +3 -0
  191. package/dist/components/Tree/Tree.module.js +8 -8
  192. package/dist/components/Tree/Tree_module.css +20 -20
  193. package/dist/components/TreeSelect/TreeSelect.js +3 -0
  194. package/dist/components/TreeSelect/TreeSelect.module.js +3 -3
  195. package/dist/components/TreeSelect/TreeSelect_module.css +4 -4
  196. package/dist/components/Upload/Upload.module.js +8 -8
  197. package/dist/components/Upload/Upload_module.css +16 -16
  198. package/dist/components/ViewField/ViewField.module.js +2 -2
  199. package/dist/components/ViewField/ViewField_module.css +3 -3
  200. package/dist/hooks/useControllable.d.ts +11 -0
  201. package/dist/hooks/useControllable.js +13 -0
  202. package/dist/hooks/useIndexedToggleGroup.d.ts +30 -0
  203. package/dist/hooks/useIndexedToggleGroup.js +26 -0
  204. package/dist/hooks/useOverflowFocusable.d.ts +17 -0
  205. package/dist/hooks/useOverflowFocusable.js +36 -0
  206. package/dist/icons/ChevronRightIcon.d.ts +6 -0
  207. package/dist/icons/ChevronRightIcon.js +17 -0
  208. package/dist/icons/RefreshIcon.d.ts +6 -0
  209. package/dist/icons/RefreshIcon.js +22 -0
  210. package/dist/icons/SearchIcon.d.ts +9 -0
  211. package/dist/icons/SearchIcon.js +23 -0
  212. package/dist/index.d.ts +31 -0
  213. package/dist/index.js +14 -0
  214. package/dist/styles/a11y.module.js +1 -1
  215. package/dist/styles/a11y_module.css +1 -1
  216. package/dist/styles/base.css +17 -0
  217. package/dist/styles/closeCircle.module.js +5 -0
  218. package/dist/styles/closeCircle_module.css +12 -0
  219. package/dist/styles/field.module.js +14 -11
  220. package/dist/styles/field_module.css +92 -23
  221. package/dist/styles/pair.module.js +2 -2
  222. package/dist/styles/pair_module.css +5 -3
  223. package/dist/styles/popup.module.js +5 -5
  224. package/dist/styles/popup_module.css +35 -28
  225. package/dist/utils/focusInputFromPill.d.ts +12 -0
  226. package/dist/utils/focusInputFromPill.js +7 -0
  227. package/dist/utils/hasContent.d.ts +8 -0
  228. package/dist/utils/hasContent.js +4 -0
  229. package/package.json +4 -3
@@ -1,40 +1,40 @@
1
- .root-qnTXQ {
1
+ .ui0-7-0-root-qnTXQ {
2
2
  gap: var(--space-3);
3
3
  flex-direction: column;
4
4
  min-width: 0;
5
5
  display: flex;
6
6
  }
7
7
 
8
- .controls-UYZLG {
8
+ .ui0-7-0-controls-UYZLG {
9
9
  align-items: flex-end;
10
10
  gap: var(--space-3);
11
11
  flex-wrap: wrap;
12
12
  display: flex;
13
13
  }
14
14
 
15
- .controls-UYZLG > * {
15
+ .ui0-7-0-controls-UYZLG > * {
16
16
  min-width: 0;
17
17
  max-width: 100%;
18
18
  }
19
19
 
20
- .search-tu3RA {
20
+ .ui0-7-0-search-tu3RA {
21
21
  flex: 16rem;
22
22
  }
23
23
 
24
- .summary-CSd_P {
24
+ .ui0-7-0-summary-CSd_P {
25
25
  align-items: center;
26
26
  gap: var(--space-2);
27
27
  flex-wrap: wrap;
28
28
  display: flex;
29
29
  }
30
30
 
31
- .count-dGqXH {
31
+ .ui0-7-0-count-dGqXH {
32
32
  color: var(--color-text-muted);
33
33
  font-size: var(--text-sm);
34
34
  line-height: var(--leading-snug);
35
35
  }
36
36
 
37
- .chips-BHcAD {
37
+ .ui0-7-0-chips-BHcAD {
38
38
  gap: var(--space-2);
39
39
  flex-wrap: wrap;
40
40
  min-width: 0;
@@ -44,19 +44,19 @@
44
44
  display: flex;
45
45
  }
46
46
 
47
- .chip-wCX2N {
47
+ .ui0-7-0-chip-wCX2N {
48
48
  min-width: 0;
49
49
  max-width: 100%;
50
50
  }
51
51
 
52
- .chipLabel-lhx4e {
52
+ .ui0-7-0-chipLabel-lhx4e {
53
53
  min-width: 0;
54
54
  padding-block: var(--space-1);
55
55
  white-space: normal;
56
56
  overflow-wrap: anywhere;
57
57
  }
58
58
 
59
- .remove-RNUMA {
59
+ .ui0-7-0-remove-RNUMA {
60
60
  width: 1.5rem;
61
61
  height: 1.5rem;
62
62
  border-radius: var(--radius-full);
@@ -77,20 +77,20 @@
77
77
  position: relative;
78
78
  }
79
79
 
80
- .remove-RNUMA:after {
80
+ .ui0-7-0-remove-RNUMA:after {
81
81
  --remove-reach: calc(var(--space-2) * -1);
82
82
  content: "";
83
83
  inset: var(--remove-reach);
84
84
  position: absolute;
85
85
  }
86
86
 
87
- .remove-RNUMA > svg {
87
+ .ui0-7-0-remove-RNUMA > svg {
88
88
  width: .875rem;
89
89
  height: .875rem;
90
90
  }
91
91
 
92
92
  @media (hover: hover) {
93
- .remove-RNUMA:hover {
93
+ .ui0-7-0-remove-RNUMA:hover {
94
94
  background: var(--color-surface-3);
95
95
  color: var(--color-text);
96
96
  }
@@ -1,13 +1,15 @@
1
1
  import { type ReactNode } from 'react';
2
2
  export interface FormProps<Values extends object = Record<string, unknown>> {
3
3
  /**
4
- * The values as a plain object keyed by field `name`, once nothing is invalid. A text control
5
- * or a `Select` gives a string, `''` when empty; a `RadioGroup` a string or `null`; `Checkbox`
6
- * and `Switch` a boolean; `DatePicker` a `YYYY-MM-DD` string or `null`; `TreeSelect` a node's `id`
7
- * or `null`; and `Upload` an array of `File`s, empty when none is chosen and an array even without
8
- * `multiple`. A disabled control is left out, as a browser leaves it out, and so is an input that
9
- * is not one of the library's: a raw `<input name>` has no field frame to report through. The
10
- * browser's own submit never happens, so `Form` takes no `action`.
4
+ * The values as a plain object keyed by field `name`, once nothing is invalid. A text control or
5
+ * a `Select` gives a string, `''` when empty; a `RadioGroup` a string or `null`; `Checkbox` and
6
+ * `Switch` a boolean; `DatePicker` a `YYYY-MM-DD` string or `null`; `TreeSelect` a node's `id` or
7
+ * `null`; `ToggleChipGroup` the pressed value or `null` when single, and an array of the pressed
8
+ * values in the options' order, empty when none is, when multiple; and `Upload` an array of
9
+ * `File`s, empty when none is chosen and an array even without `multiple`. A disabled control is
10
+ * left out, as a browser leaves it out, and so is an input that is not one of the library's: a
11
+ * raw `<input name>` has no field frame to report through. The browser's own submit never
12
+ * happens, so `Form` takes no `action`.
11
13
  */
12
14
  onSubmit: (values: Values) => void;
13
15
  /**
@@ -1,5 +1,5 @@
1
1
  import "./Form_module.css";
2
2
  const Form_module = {
3
- root: "root-ontz3"
3
+ root: "ui0-7-0-root-ontz3"
4
4
  };
5
5
  export default Form_module;
@@ -1,4 +1,4 @@
1
- .root-ontz3 {
1
+ .ui0-7-0-root-ontz3 {
2
2
  gap: var(--space-5);
3
3
  flex-direction: column;
4
4
  display: flex;
@@ -1,6 +1,6 @@
1
1
  import { Button as BaseButton } from '@base-ui/react/button';
2
2
  import type { ComponentPropsWithoutRef } from 'react';
3
- export type IconButtonVariant = 'primary' | 'secondary' | 'ghost';
3
+ export type IconButtonVariant = 'primary' | 'secondary' | 'ghost' | 'soft';
4
4
  export type IconButtonSize = 'md' | 'sm';
5
5
  export interface IconButtonProps extends Omit<ComponentPropsWithoutRef<typeof BaseButton>, 'className' | 'aria-label' | 'aria-labelledby'> {
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import "./IconButton_module.css";
2
2
  const IconButton_module = {
3
- root: "root-TzUP5",
4
- icon: "icon-WceXT"
3
+ root: "ui0-7-0-root-TzUP5",
4
+ icon: "ui0-7-0-icon-WceXT"
5
5
  };
6
6
  export default IconButton_module;
@@ -1,6 +1,6 @@
1
- .root-TzUP5 {
2
- min-height: var(--size-touch);
3
- min-width: var(--size-touch);
1
+ .ui0-7-0-root-TzUP5 {
2
+ min-height: var(--size-control);
3
+ min-width: var(--size-control);
4
4
  border-radius: var(--radius-full);
5
5
  color: var(--color-text-muted);
6
6
  cursor: pointer;
@@ -16,57 +16,68 @@
16
16
  display: inline-flex;
17
17
  }
18
18
 
19
- .root-TzUP5[data-size="sm"] {
20
- min-width: 2.5rem;
21
- min-height: 2.5rem;
19
+ .ui0-7-0-root-TzUP5[data-size="sm"] {
20
+ min-height: var(--size-control-sm);
21
+ min-width: var(--size-control-sm);
22
22
  }
23
23
 
24
- .root-TzUP5[data-variant="secondary"] {
25
- border-radius: var(--radius-md);
24
+ .ui0-7-0-root-TzUP5[data-variant="secondary"] {
25
+ border-radius: var(--radius-control);
26
26
  background: var(--color-surface-raised);
27
27
  border-color: var(--color-border-strong);
28
28
  color: var(--color-text);
29
29
  }
30
30
 
31
- .root-TzUP5[data-variant="primary"] {
31
+ .ui0-7-0-root-TzUP5[data-variant="primary"] {
32
32
  background: var(--color-accent);
33
33
  color: var(--color-accent-text);
34
34
  }
35
35
 
36
+ .ui0-7-0-root-TzUP5[data-variant="soft"] {
37
+ background: var(--color-surface-2);
38
+ color: var(--color-text);
39
+ box-shadow: var(--icon-button-shadow, none);
40
+ border-color: #0000;
41
+ }
42
+
36
43
  @media (hover: hover) {
37
- .root-TzUP5[data-variant="ghost"]:hover:not([data-disabled]) {
44
+ .ui0-7-0-root-TzUP5[data-variant="ghost"]:hover:not([data-disabled]) {
38
45
  background: var(--color-surface-2);
39
46
  color: var(--color-text);
40
47
  }
41
48
 
42
- .root-TzUP5[data-variant="secondary"]:hover:not([data-disabled]) {
49
+ .ui0-7-0-root-TzUP5[data-variant="secondary"]:hover:not([data-disabled]) {
43
50
  background: var(--color-surface-2);
44
51
  }
45
52
 
46
- .root-TzUP5[data-variant="primary"]:hover:not([data-disabled]) {
53
+ .ui0-7-0-root-TzUP5[data-variant="primary"]:hover:not([data-disabled]) {
47
54
  background: var(--color-accent-hover);
48
55
  }
56
+
57
+ .ui0-7-0-root-TzUP5[data-variant="soft"]:hover:not([data-disabled]) {
58
+ background: var(--color-surface-3);
59
+ }
49
60
  }
50
61
 
51
- .root-TzUP5:active:not([data-disabled]) {
62
+ .ui0-7-0-root-TzUP5:active:not([data-disabled]) {
52
63
  transform: scale(.96);
53
64
  }
54
65
 
55
- .root-TzUP5[data-disabled] {
66
+ .ui0-7-0-root-TzUP5[data-disabled] {
56
67
  cursor: not-allowed;
57
68
  opacity: .45;
58
69
  }
59
70
 
60
- .icon-WceXT {
71
+ .ui0-7-0-icon-WceXT {
61
72
  display: inline-flex;
62
73
  }
63
74
 
64
- .icon-WceXT > svg {
75
+ .ui0-7-0-icon-WceXT > svg {
65
76
  width: 1.25rem;
66
77
  height: 1.25rem;
67
78
  }
68
79
 
69
- .root-TzUP5[data-size="sm"] .icon-WceXT > svg {
80
+ .ui0-7-0-root-TzUP5[data-size="sm"] .ui0-7-0-icon-WceXT > svg, .ui0-7-0-root-TzUP5[data-variant="soft"] .ui0-7-0-icon-WceXT > svg {
70
81
  width: 1rem;
71
82
  height: 1rem;
72
83
  }
@@ -1,9 +1,11 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Menu } from "@base-ui/react/menu";
3
3
  import { Fragment } from "react";
4
+ import { usePortalContainer } from "../ThemeScope/PortalContainerContext.js";
4
5
  import popup_module from "../../styles/popup.module.js";
5
6
  import Menu_module from "./Menu.module.js";
6
7
  function Menu_Menu({ trigger, items, side = 'bottom', align = 'end', sideOffset = 8, modal = false, open, defaultOpen, onOpenChange }) {
8
+ const container = usePortalContainer();
7
9
  return /*#__PURE__*/ jsxs(Menu.Root, {
8
10
  open: open,
9
11
  defaultOpen: defaultOpen,
@@ -14,6 +16,7 @@ function Menu_Menu({ trigger, items, side = 'bottom', align = 'end', sideOffset
14
16
  render: trigger
15
17
  }),
16
18
  /*#__PURE__*/ jsx(Menu.Portal, {
19
+ container: container,
17
20
  children: /*#__PURE__*/ jsx(Menu.Positioner, {
18
21
  className: popup_module.layer,
19
22
  side: side,
@@ -1,6 +1,6 @@
1
1
  import "./Menu_module.css";
2
2
  const Menu_module = {
3
- item: "item-toMw6",
4
- separator: "separator-mmvmF"
3
+ item: "ui0-7-0-item-toMw6",
4
+ separator: "ui0-7-0-separator-mmvmF"
5
5
  };
6
6
  export default Menu_module;
@@ -1,8 +1,9 @@
1
- .item-toMw6 {
1
+ .ui0-7-0-item-toMw6 {
2
2
  min-height: var(--size-touch);
3
3
  padding-inline: var(--space-3);
4
4
  border-radius: var(--radius-md);
5
5
  color: var(--color-text);
6
+ font-family: var(--font-sans);
6
7
  font-size: var(--text-md);
7
8
  cursor: pointer;
8
9
  -webkit-user-select: none;
@@ -11,17 +12,17 @@
11
12
  display: flex;
12
13
  }
13
14
 
14
- .item-toMw6[data-highlighted] {
15
+ .ui0-7-0-item-toMw6[data-highlighted] {
15
16
  background: var(--color-surface-2);
16
17
  color: var(--color-text);
17
18
  }
18
19
 
19
- .item-toMw6[data-disabled] {
20
+ .ui0-7-0-item-toMw6[data-disabled] {
20
21
  color: var(--color-text-subtle);
21
22
  cursor: not-allowed;
22
23
  }
23
24
 
24
- .separator-mmvmF {
25
+ .ui0-7-0-separator-mmvmF {
25
26
  height: 1px;
26
27
  margin-block: var(--space-1);
27
28
  background: var(--color-border);
@@ -8,12 +8,35 @@ export interface LinkRenderProps {
8
8
  'aria-current'?: 'page';
9
9
  children: ReactNode;
10
10
  }
11
- export interface NavMenuProps {
12
- items: NavItem[];
11
+ /**
12
+ * `Item` is the shape of one entry: anything with an `href` and a `label`. The shell passes its own
13
+ * (a typed route, an icon) and gets the same object back in `renderLink`.
14
+ */
15
+ export interface NavMenuProps<Item extends NavItem = NavItem> {
16
+ items: readonly Item[];
13
17
  currentPath: string;
14
18
  /** Accessible name for the navigation landmark. */
15
19
  label?: string;
16
20
  /** Lets the shell render router links; defaults to a plain anchor. */
17
- renderLink?: (item: NavItem, props: LinkRenderProps) => ReactElement;
21
+ renderLink?: (item: Item, props: LinkRenderProps) => ReactElement;
22
+ /**
23
+ * `'vertical'` stacks the links for a sidebar, each one as wide as the list. It applies to the
24
+ * wide layout only: below `md` the links are already a column inside the menu, so it is ignored.
25
+ */
26
+ orientation?: 'horizontal' | 'vertical';
27
+ /**
28
+ * The menu button's accessible name below `md`, while the menu is closed (`open`, default
29
+ * "Open menu") and while it is open (`close`, default "Close menu").
30
+ */
31
+ labels?: {
32
+ open?: string;
33
+ close?: string;
34
+ };
18
35
  }
19
- export declare function NavMenu({ items, currentPath, label, renderLink, }: NavMenuProps): import("react").JSX.Element;
36
+ /**
37
+ * The plain anchor both `NavMenu` and `TabBar` fall back on when the shell passes no `renderLink`.
38
+ * Shared between the two components, so it is exported from this module, but it is not in the
39
+ * package's exports.
40
+ */
41
+ export declare function defaultRenderLink(item: NavItem, { children, ...linkProps }: LinkRenderProps): ReactElement;
42
+ export declare function NavMenu<Item extends NavItem = NavItem>({ items, currentPath, label, renderLink, orientation, labels, }: NavMenuProps<Item>): import("react").JSX.Element;
@@ -2,7 +2,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Menu } from "@base-ui/react/menu";
3
3
  import { useState } from "react";
4
4
  import { minWidth, useMediaQuery } from "../../hooks/useMediaQuery.js";
5
+ import { usePortalContainer } from "../ThemeScope/PortalContainerContext.js";
5
6
  import popup_module from "../../styles/popup.module.js";
7
+ import { isCurrentPath } from "./currentPath.js";
6
8
  import NavMenu_module from "./NavMenu.module.js";
7
9
  function defaultRenderLink(item, { children, ...linkProps }) {
8
10
  return /*#__PURE__*/ jsx("a", {
@@ -11,19 +13,16 @@ function defaultRenderLink(item, { children, ...linkProps }) {
11
13
  children: children
12
14
  });
13
15
  }
14
- function isCurrent(item, currentPath) {
15
- if ('/' === item.href) return '/' === currentPath;
16
- return currentPath === item.href || currentPath.startsWith(`${item.href}/`);
17
- }
18
16
  function linkPropsFor(item, currentPath) {
19
17
  return {
20
18
  className: NavMenu_module.link,
21
- 'aria-current': isCurrent(item, currentPath) ? 'page' : void 0,
19
+ 'aria-current': isCurrentPath(item.href, currentPath) ? 'page' : void 0,
22
20
  children: item.label
23
21
  };
24
22
  }
25
- function NavMenu({ items, currentPath, label = 'Primary', renderLink = defaultRenderLink }) {
23
+ function NavMenu({ items, currentPath, label = 'Primary', renderLink = defaultRenderLink, orientation = 'horizontal', labels }) {
26
24
  const isWide = useMediaQuery(minWidth('md'));
25
+ const container = usePortalContainer();
27
26
  const [open, setOpen] = useState(false);
28
27
  const [previousPath, setPreviousPath] = useState(currentPath);
29
28
  if (currentPath !== previousPath) {
@@ -33,8 +32,10 @@ function NavMenu({ items, currentPath, label = 'Primary', renderLink = defaultRe
33
32
  if (isWide) return /*#__PURE__*/ jsx("nav", {
34
33
  className: NavMenu_module.root,
35
34
  "aria-label": label,
35
+ "data-orientation": orientation,
36
36
  children: /*#__PURE__*/ jsx("ul", {
37
37
  className: NavMenu_module.list,
38
+ "data-orientation": orientation,
38
39
  children: items.map((item)=>/*#__PURE__*/ jsx("li", {
39
40
  children: renderLink(item, linkPropsFor(item, currentPath))
40
41
  }, item.href))
@@ -50,7 +51,7 @@ function NavMenu({ items, currentPath, label = 'Primary', renderLink = defaultRe
50
51
  children: [
51
52
  /*#__PURE__*/ jsx(Menu.Trigger, {
52
53
  className: NavMenu_module.trigger,
53
- "aria-label": open ? 'Close menu' : 'Open menu',
54
+ "aria-label": open ? labels?.close ?? 'Close menu' : labels?.open ?? 'Open menu',
54
55
  children: /*#__PURE__*/ jsx("svg", {
55
56
  className: NavMenu_module.triggerIcon,
56
57
  viewBox: "0 0 18 18",
@@ -66,6 +67,7 @@ function NavMenu({ items, currentPath, label = 'Primary', renderLink = defaultRe
66
67
  })
67
68
  }),
68
69
  /*#__PURE__*/ jsx(Menu.Portal, {
70
+ container: container,
69
71
  children: /*#__PURE__*/ jsx(Menu.Positioner, {
70
72
  className: popup_module.layer,
71
73
  side: "bottom",
@@ -85,4 +87,4 @@ function NavMenu({ items, currentPath, label = 'Primary', renderLink = defaultRe
85
87
  })
86
88
  });
87
89
  }
88
- export { NavMenu };
90
+ export { NavMenu, defaultRenderLink };
@@ -1,10 +1,10 @@
1
1
  import "./NavMenu_module.css";
2
2
  const NavMenu_module = {
3
- root: "root-wsLiH",
4
- list: "list-hzkjq",
5
- link: "link-R0jaI",
6
- trigger: "trigger-dj75u",
7
- triggerIcon: "triggerIcon-gSo04",
8
- item: "item-yXJoa"
3
+ root: "ui0-7-0-root-wsLiH",
4
+ list: "ui0-7-0-list-hzkjq",
5
+ link: "ui0-7-0-link-R0jaI",
6
+ trigger: "ui0-7-0-trigger-dj75u",
7
+ triggerIcon: "ui0-7-0-triggerIcon-gSo04",
8
+ item: "ui0-7-0-item-yXJoa"
9
9
  };
10
10
  export default NavMenu_module;
@@ -1,9 +1,13 @@
1
- .root-wsLiH {
1
+ .ui0-7-0-root-wsLiH {
2
2
  align-items: center;
3
3
  display: flex;
4
4
  }
5
5
 
6
- .list-hzkjq {
6
+ .ui0-7-0-root-wsLiH[data-orientation="vertical"] {
7
+ align-items: stretch;
8
+ }
9
+
10
+ .ui0-7-0-list-hzkjq {
7
11
  align-items: center;
8
12
  gap: var(--space-5);
9
13
  margin: 0;
@@ -12,36 +16,49 @@
12
16
  display: flex;
13
17
  }
14
18
 
15
- .link-R0jaI {
16
- min-height: var(--size-touch);
17
- border-radius: var(--radius-sm);
18
- color: var(--color-text-muted);
19
+ .ui0-7-0-list-hzkjq[data-orientation="vertical"] {
20
+ align-items: stretch;
21
+ gap: var(--space-2);
22
+ flex-direction: column;
23
+ flex: auto;
24
+ }
25
+
26
+ .ui0-7-0-link-R0jaI {
27
+ min-height: var(--size-control);
28
+ border-radius: var(--radius-option);
29
+ color: var(--color-nav-text);
30
+ font-family: var(--font-sans);
19
31
  font-size: var(--text-sm);
32
+ font-weight: var(--font-weight-nav);
20
33
  white-space: nowrap;
21
34
  transition-property: color;
22
35
  transition-duration: var(--motion-duration-1);
23
36
  transition-timing-function: var(--motion-ease);
24
37
  align-items: center;
25
- font-weight: 400;
26
38
  text-decoration: none;
27
39
  display: inline-flex;
28
40
  }
29
41
 
30
- .link-R0jaI[aria-current="page"] {
31
- color: var(--color-text);
32
- font-weight: 500;
42
+ .ui0-7-0-list-hzkjq[data-orientation="vertical"] .ui0-7-0-link-R0jaI {
43
+ display: flex;
44
+ }
45
+
46
+ .ui0-7-0-link-R0jaI[aria-current="page"] {
47
+ background: var(--color-nav-selected);
48
+ color: var(--color-nav-selected-text);
49
+ font-weight: var(--font-weight-nav-selected);
33
50
  }
34
51
 
35
52
  @media (hover: hover) {
36
- .link-R0jaI:hover {
53
+ .ui0-7-0-link-R0jaI:hover:not([aria-current="page"]) {
37
54
  color: var(--color-text);
38
55
  }
39
56
  }
40
57
 
41
- .trigger-dj75u {
42
- width: var(--size-touch);
43
- height: var(--size-touch);
44
- border-radius: var(--radius-md);
58
+ .ui0-7-0-trigger-dj75u {
59
+ width: var(--size-control);
60
+ height: var(--size-control);
61
+ border-radius: var(--radius-control);
45
62
  color: var(--color-text);
46
63
  cursor: pointer;
47
64
  background: none;
@@ -52,18 +69,19 @@
52
69
  display: inline-flex;
53
70
  }
54
71
 
55
- .triggerIcon-gSo04 {
72
+ .ui0-7-0-triggerIcon-gSo04 {
56
73
  width: 1.125rem;
57
74
  height: 1.125rem;
58
75
  }
59
76
 
60
- .item-yXJoa {
77
+ .ui0-7-0-item-yXJoa {
61
78
  padding-inline: var(--space-3);
62
- border-radius: var(--radius-md);
79
+ border-radius: var(--radius-control);
80
+ font-family: var(--font-sans);
63
81
  font-size: var(--text-md);
64
82
  }
65
83
 
66
- .item-yXJoa[data-highlighted] {
84
+ .ui0-7-0-item-yXJoa[data-highlighted] {
67
85
  background: var(--color-surface-2);
68
86
  color: var(--color-text);
69
87
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Whether `href` is the page the app is on, or an ancestor of it. The root is the exception: `/`
3
+ * is an ancestor of every path, so it matches only itself, or the home link would read as current
4
+ * everywhere. Any other href matches itself and anything beneath it (`/events` holds
5
+ * `/events/e1` and `/events/`) but not a sibling that merely shares the prefix (`/eventsx`).
6
+ *
7
+ * Shared by `NavMenu` and `TabBar`; internal, not part of the package's exports.
8
+ */
9
+ export declare function isCurrentPath(href: string, currentPath: string): boolean;
@@ -0,0 +1,5 @@
1
+ function isCurrentPath(href, currentPath) {
2
+ if ('/' === href) return '/' === currentPath;
3
+ return currentPath === href || currentPath.startsWith(`${href}/`);
4
+ }
5
+ export { isCurrentPath };
@@ -1,7 +1,7 @@
1
1
  import "./PageHeading_module.css";
2
2
  const PageHeading_module = {
3
- root: "root-G6df9",
4
- eyebrow: "eyebrow-N5iEz",
5
- heading: "heading-C4QBU"
3
+ root: "ui0-7-0-root-G6df9",
4
+ eyebrow: "ui0-7-0-eyebrow-N5iEz",
5
+ heading: "ui0-7-0-heading-C4QBU"
6
6
  };
7
7
  export default PageHeading_module;
@@ -1,10 +1,10 @@
1
- .root-G6df9 {
1
+ .ui0-7-0-root-G6df9 {
2
2
  gap: var(--space-2);
3
3
  flex-direction: column;
4
4
  display: flex;
5
5
  }
6
6
 
7
- .eyebrow-N5iEz {
7
+ .ui0-7-0-eyebrow-N5iEz {
8
8
  font-family: var(--font-mono);
9
9
  font-size: var(--text-sm);
10
10
  color: var(--color-text-muted);
@@ -12,16 +12,19 @@
12
12
  letter-spacing: var(--tracking-wide);
13
13
  }
14
14
 
15
- .heading-C4QBU {
15
+ .ui0-7-0-heading-C4QBU {
16
16
  font-size: var(--text-h1);
17
+ font-family: var(--font-display);
18
+ font-weight: var(--font-weight-display);
19
+ font-stretch: var(--font-stretch-display);
20
+ text-transform: var(--text-transform-display);
17
21
  letter-spacing: var(--tracking-h1);
18
- font-weight: 600;
19
22
  line-height: var(--leading-display);
20
23
  text-wrap: balance;
21
24
  outline-offset: var(--space-2);
22
25
  }
23
26
 
24
- .heading-C4QBU[data-size="display"] {
27
+ .ui0-7-0-heading-C4QBU[data-size="display"] {
25
28
  max-width: 12ch;
26
29
  font-size: var(--text-display);
27
30
  letter-spacing: var(--tracking-display);
@@ -29,25 +32,25 @@
29
32
  }
30
33
 
31
34
  @media (width >= 112.5rem) {
32
- .heading-C4QBU[data-size="display"] {
35
+ .ui0-7-0-heading-C4QBU[data-size="display"] {
33
36
  font-size: var(--text-display-wide);
34
37
  }
35
38
  }
36
39
 
37
- .heading-C4QBU[data-size="compact"] {
40
+ .ui0-7-0-heading-C4QBU[data-size="compact"] {
38
41
  font-size: var(--text-h2);
39
42
  letter-spacing: var(--tracking-heading);
40
43
  line-height: var(--leading-tight);
41
44
  }
42
45
 
43
- .heading-C4QBU[data-level="2"] {
46
+ .ui0-7-0-heading-C4QBU[data-level="2"] {
44
47
  max-width: none;
45
48
  font-size: var(--text-h2-feature);
46
49
  letter-spacing: var(--tracking-heading);
47
50
  line-height: var(--leading-tight);
48
51
  }
49
52
 
50
- .heading-C4QBU:focus:not(:focus-visible) {
53
+ .ui0-7-0-heading-C4QBU:focus:not(:focus-visible) {
51
54
  outline: none;
52
55
  }
53
56
 
@@ -1,9 +1,9 @@
1
1
  import "./PageShell_module.css";
2
2
  const PageShell_module = {
3
- root: "root-GtYdg",
4
- header: "header-YzERL",
5
- sidebar: "sidebar-acwxu",
6
- main: "main-A7fFb",
7
- footer: "footer-O0lU7"
3
+ root: "ui0-7-0-root-GtYdg",
4
+ header: "ui0-7-0-header-YzERL",
5
+ sidebar: "ui0-7-0-sidebar-acwxu",
6
+ main: "ui0-7-0-main-A7fFb",
7
+ footer: "ui0-7-0-footer-O0lU7"
8
8
  };
9
9
  export default PageShell_module;