@dbcdk/react-components 0.0.96 → 0.0.97

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 (223) hide show
  1. package/dist/components/table/Table.d.ts +1 -1
  2. package/dist/components/table/Table.types.d.ts +3 -0
  3. package/dist/components/table/components/TableHeader.d.ts +2 -1
  4. package/dist/index.cjs +12750 -0
  5. package/dist/index.css +7149 -0
  6. package/dist/index.js +12641 -79
  7. package/dist/tanstack.cjs +2674 -0
  8. package/dist/tanstack.css +1267 -0
  9. package/dist/tanstack.js +2650 -3
  10. package/dist/themes/dbc.css +3 -0
  11. package/dist/themes/forfatterweb.css +2 -0
  12. package/package.json +11 -10
  13. package/dist/assets/logo.js +0 -2
  14. package/dist/components/__stories__/_data/table.d.ts +0 -15
  15. package/dist/components/__stories__/_data/table.js +0 -55
  16. package/dist/components/__stories__/_data/tabs.d.ts +0 -9
  17. package/dist/components/__stories__/_data/tabs.js +0 -31
  18. package/dist/components/__stories__/story-components/Colors.d.ts +0 -11
  19. package/dist/components/__stories__/story-components/Colors.js +0 -96
  20. package/dist/components/__stories__/story-components/Colors.module.css +0 -27
  21. package/dist/components/__stories__/story-components/ComponentSizes.d.ts +0 -2
  22. package/dist/components/__stories__/story-components/ComponentSizes.js +0 -26
  23. package/dist/components/__stories__/story-components/Elevation.d.ts +0 -2
  24. package/dist/components/__stories__/story-components/Elevation.js +0 -49
  25. package/dist/components/__stories__/story-components/Flex.d.ts +0 -2
  26. package/dist/components/__stories__/story-components/Flex.js +0 -177
  27. package/dist/components/__stories__/story-components/Flex.module.css +0 -317
  28. package/dist/components/__stories__/story-components/Spacing.d.ts +0 -6
  29. package/dist/components/__stories__/story-components/Spacing.js +0 -76
  30. package/dist/components/__stories__/story-components/Spacing.module.css +0 -154
  31. package/dist/components/accordion/Accordion.js +0 -70
  32. package/dist/components/accordion/Accordion.module.css +0 -28
  33. package/dist/components/accordion/components/AccordionRow.js +0 -53
  34. package/dist/components/accordion/components/AccordionRow.module.css +0 -90
  35. package/dist/components/alert/Alert.js +0 -17
  36. package/dist/components/alert/Alert.module.css +0 -98
  37. package/dist/components/app-header/AppHeader.js +0 -5
  38. package/dist/components/app-header/AppHeader.module.css +0 -74
  39. package/dist/components/attribute-chip/AttributeChip.js +0 -5
  40. package/dist/components/attribute-chip/AttributeChip.module.css +0 -65
  41. package/dist/components/avatar/Avatar.js +0 -48
  42. package/dist/components/avatar/Avatar.module.css +0 -91
  43. package/dist/components/breadcrumbs/Breadcrumbs.js +0 -6
  44. package/dist/components/breadcrumbs/Breadcrumbs.module.css +0 -80
  45. package/dist/components/button/Button.js +0 -81
  46. package/dist/components/button/Button.module.css +0 -249
  47. package/dist/components/button-select/ButtonSelect.js +0 -7
  48. package/dist/components/button-select/ButtonSelect.module.css +0 -40
  49. package/dist/components/card/Card.js +0 -71
  50. package/dist/components/card/Card.module.css +0 -160
  51. package/dist/components/card/components/CardMeta.js +0 -26
  52. package/dist/components/card/components/CardMeta.module.css +0 -55
  53. package/dist/components/card-container/CardContainer.js +0 -6
  54. package/dist/components/card-container/CardContainer.module.css +0 -61
  55. package/dist/components/chip/Chip.js +0 -31
  56. package/dist/components/chip/Chip.module.css +0 -236
  57. package/dist/components/circle/Circle.js +0 -5
  58. package/dist/components/circle/Circle.module.css +0 -128
  59. package/dist/components/clear-button/ClearButton.js +0 -13
  60. package/dist/components/clear-button/ClearButton.module.css +0 -26
  61. package/dist/components/code-block/CodeBlock.js +0 -58
  62. package/dist/components/code-block/CodeBlock.module.css +0 -124
  63. package/dist/components/copy-button/CopyButton.js +0 -78
  64. package/dist/components/copy-button/CopyButton.module.css +0 -22
  65. package/dist/components/datetime-picker/DateTimePicker.js +0 -403
  66. package/dist/components/datetime-picker/DateTimePicker.module.css +0 -155
  67. package/dist/components/datetime-picker/dateTimeHelpers.js +0 -248
  68. package/dist/components/divider/Divider.js +0 -12
  69. package/dist/components/filter-field/FilterField.js +0 -191
  70. package/dist/components/filter-field/FilterField.module.css +0 -379
  71. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +0 -52
  72. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +0 -59
  73. package/dist/components/forms/checkbox/Checkbox.js +0 -28
  74. package/dist/components/forms/checkbox/Checkbox.module.css +0 -103
  75. package/dist/components/forms/checkbox-group/CheckboxGroup.js +0 -75
  76. package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +0 -115
  77. package/dist/components/forms/form-select/FormSelect.js +0 -86
  78. package/dist/components/forms/form-select/FormSelect.module.css +0 -236
  79. package/dist/components/forms/input/Input.js +0 -77
  80. package/dist/components/forms/input/Input.module.css +0 -468
  81. package/dist/components/forms/input-container/InputContainer.js +0 -15
  82. package/dist/components/forms/input-container/InputContainer.module.css +0 -60
  83. package/dist/components/forms/multi-select/MultiSelect.js +0 -122
  84. package/dist/components/forms/radio-buttons/RadioButton.js +0 -26
  85. package/dist/components/forms/radio-buttons/RadioButtonGroup.js +0 -19
  86. package/dist/components/forms/radio-buttons/RadioButtons.module.css +0 -118
  87. package/dist/components/forms/select/Select.js +0 -185
  88. package/dist/components/forms/select/Select.module.css +0 -32
  89. package/dist/components/forms/text-area/Textarea.js +0 -47
  90. package/dist/components/forms/text-area/Textarea.module.css +0 -70
  91. package/dist/components/forms/typeahead/Typeahead.js +0 -668
  92. package/dist/components/forms/typeahead/Typeahead.module.css +0 -38
  93. package/dist/components/grid/Grid.js +0 -23
  94. package/dist/components/grid/Grid.module.css +0 -35
  95. package/dist/components/headline/CollapsibleHeadline.js +0 -29
  96. package/dist/components/headline/Headline.js +0 -26
  97. package/dist/components/headline/Headline.module.css +0 -185
  98. package/dist/components/hyperlink/Hyperlink.js +0 -40
  99. package/dist/components/hyperlink/Hyperlink.module.css +0 -107
  100. package/dist/components/icon/Icon.js +0 -14
  101. package/dist/components/icon/Icon.module.css +0 -36
  102. package/dist/components/interval-select/IntervalSelect.js +0 -99
  103. package/dist/components/json-viewer/HighlightedText.js +0 -6
  104. package/dist/components/json-viewer/JsonNode.js +0 -30
  105. package/dist/components/json-viewer/JsonViewer.js +0 -68
  106. package/dist/components/json-viewer/JsonViewer.module.css +0 -346
  107. package/dist/components/json-viewer/types.js +0 -1
  108. package/dist/components/json-viewer/useClipboardStatus.js +0 -11
  109. package/dist/components/json-viewer/utils.js +0 -125
  110. package/dist/components/menu/Menu.js +0 -165
  111. package/dist/components/menu/Menu.module.css +0 -220
  112. package/dist/components/meta-bar/MetaBar.js +0 -9
  113. package/dist/components/meta-bar/MetaBar.module.css +0 -27
  114. package/dist/components/nav-bar/NavBar.js +0 -29
  115. package/dist/components/nav-bar/NavBar.module.css +0 -221
  116. package/dist/components/overlay/fade-overlay/FadeOverlay.js +0 -8
  117. package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +0 -54
  118. package/dist/components/overlay/modal/Modal.js +0 -115
  119. package/dist/components/overlay/modal/Modal.module.css +0 -109
  120. package/dist/components/overlay/modal/provider/ModalProvider.js +0 -73
  121. package/dist/components/overlay/side-panel/SidePanel.js +0 -83
  122. package/dist/components/overlay/side-panel/SidePanel.module.css +0 -177
  123. package/dist/components/overlay/side-panel/useSidePanel.js +0 -11
  124. package/dist/components/overlay/tooltip/Tooltip.js +0 -17
  125. package/dist/components/overlay/tooltip/Tooltip.module.css +0 -104
  126. package/dist/components/overlay/tooltip/TooltipProvider.js +0 -255
  127. package/dist/components/overlay/tooltip/useTooltipTrigger.js +0 -118
  128. package/dist/components/page/Page.js +0 -11
  129. package/dist/components/page/Page.module.css +0 -89
  130. package/dist/components/page-layout/PageLayout.js +0 -76
  131. package/dist/components/page-layout/PageLayout.module.css +0 -236
  132. package/dist/components/page-layout/components/layout-footer/LayoutFooter.js +0 -27
  133. package/dist/components/page-layout/components/layout-footer/LayoutFooter.module.css +0 -89
  134. package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.js +0 -14
  135. package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.module.css +0 -84
  136. package/dist/components/pagination/Pagination.js +0 -56
  137. package/dist/components/pagination/Pagination.module.css +0 -25
  138. package/dist/components/panel/Panel.js +0 -7
  139. package/dist/components/panel/Panel.module.css +0 -29
  140. package/dist/components/popover/Popover.js +0 -257
  141. package/dist/components/popover/Popover.module.css +0 -54
  142. package/dist/components/search-box/SearchBox.js +0 -170
  143. package/dist/components/search-box/SearchBox.module.css +0 -21
  144. package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +0 -48
  145. package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +0 -167
  146. package/dist/components/sidebar/Sidebar.js +0 -6
  147. package/dist/components/sidebar/components/SidebarItem.js +0 -8
  148. package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
  149. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +0 -63
  150. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +0 -29
  151. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +0 -153
  152. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +0 -260
  153. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +0 -18
  154. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +0 -106
  155. package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +0 -26
  156. package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +0 -20
  157. package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +0 -30
  158. package/dist/components/sidebar/providers/SidebarProvider.js +0 -229
  159. package/dist/components/skeleton-loader/SkeletonLoader.js +0 -73
  160. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +0 -13
  161. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +0 -51
  162. package/dist/components/split-button/SplitButton.js +0 -10
  163. package/dist/components/split-button/SplitButton.module.css +0 -32
  164. package/dist/components/split-pane/SplitPane.js +0 -107
  165. package/dist/components/split-pane/SplitPane.module.css +0 -111
  166. package/dist/components/split-pane/provider/SplitPaneContext.js +0 -124
  167. package/dist/components/stack/Stack.js +0 -33
  168. package/dist/components/stack/Stack.module.css +0 -61
  169. package/dist/components/state-page/StatePage.js +0 -20
  170. package/dist/components/state-page/StatePage.module.css +0 -9
  171. package/dist/components/state-page/empty.js +0 -2
  172. package/dist/components/state-page/error.js +0 -2
  173. package/dist/components/state-page/notFound.js +0 -2
  174. package/dist/components/sticky-footer-layout/StickyFooterLayout.js +0 -64
  175. package/dist/components/table/Table.js +0 -50
  176. package/dist/components/table/Table.module.css +0 -536
  177. package/dist/components/table/Table.types.js +0 -1
  178. package/dist/components/table/TanstackTable.js +0 -111
  179. package/dist/components/table/components/TableBody.js +0 -10
  180. package/dist/components/table/components/TableHeader.js +0 -7
  181. package/dist/components/table/components/TableHeaderCell.js +0 -24
  182. package/dist/components/table/components/TableLoadingBody.js +0 -26
  183. package/dist/components/table/components/TablePagination.js +0 -1
  184. package/dist/components/table/components/TableRow.js +0 -54
  185. package/dist/components/table/components/TableSelectionCell.js +0 -16
  186. package/dist/components/table/components/column-resizer/ColumnResizer.js +0 -5
  187. package/dist/components/table/components/column-resizer/ColumnResizer.module.css +0 -22
  188. package/dist/components/table/components/empty-state/EmptyState.js +0 -23
  189. package/dist/components/table/components/empty-state/EmptyState.module.css +0 -4
  190. package/dist/components/table/components/table-settings/TableSettings.js +0 -63
  191. package/dist/components/table/hooks/useTableRowInteractions.js +0 -30
  192. package/dist/components/table/table.classes.js +0 -23
  193. package/dist/components/table/table.utils.js +0 -47
  194. package/dist/components/table/tanstackTable.utils.js +0 -175
  195. package/dist/components/tabs/Tabs.js +0 -125
  196. package/dist/components/tabs/Tabs.module.css +0 -233
  197. package/dist/components/theme-button/ThemeButton.js +0 -23
  198. package/dist/components/toast/Toast.js +0 -20
  199. package/dist/components/toast/Toast.module.css +0 -161
  200. package/dist/components/toast/provider/ToastProvider.js +0 -70
  201. package/dist/components/user-display/UserDisplay.js +0 -6
  202. package/dist/components/user-display/UserDisplay.module.css +0 -25
  203. package/dist/constants/severity.js +0 -24
  204. package/dist/constants/severity.types.js +0 -1
  205. package/dist/constants/sizes.js +0 -7
  206. package/dist/hooks/useDeviceSize.js +0 -32
  207. package/dist/hooks/useListNavigation.js +0 -234
  208. package/dist/hooks/usePagination.js +0 -140
  209. package/dist/hooks/useSorting.js +0 -118
  210. package/dist/hooks/useTableData.js +0 -45
  211. package/dist/hooks/useTableSelection.js +0 -164
  212. package/dist/hooks/useTableSettings.js +0 -71
  213. package/dist/hooks/useTheme.js +0 -66
  214. package/dist/hooks/useTimeDuration.js +0 -68
  215. package/dist/hooks/useViewportFill.js +0 -77
  216. package/dist/styles/animation.js +0 -5
  217. package/dist/styles/themes/types.js +0 -1
  218. package/dist/types/a11y-props.types.js +0 -1
  219. package/dist/types/sizes.types.js +0 -1
  220. package/dist/utils/arrays/nested-filtering.js +0 -48
  221. package/dist/utils/date/formatDate.js +0 -51
  222. package/dist/utils/localStorage.utils.js +0 -78
  223. package/dist/utils/text/get-highlighted-segments.js +0 -46
@@ -1,165 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from 'react';
4
- import styles from './Menu.module.css';
5
- import { Checkbox } from '../forms/checkbox/Checkbox';
6
- import { RadioButton } from '../forms/radio-buttons/RadioButton';
7
- const INTERACTIVE_SELECTOR = 'a:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"]), [role="menuitem"]:not([aria-disabled="true"]), [role="option"]:not([aria-disabled="true"])';
8
- function getMenuItems(el) {
9
- return Array.from(el.querySelectorAll(INTERACTIVE_SELECTOR));
10
- }
11
- const MenuBase = React.forwardRef(({ children, className, itemRole = 'menuitem', gap, onKeyDown, ...props }, ref) => {
12
- const internalRef = React.useRef(null);
13
- const handleKeyDown = (e) => {
14
- const ul = internalRef.current;
15
- if (!ul)
16
- return;
17
- const items = getMenuItems(ul);
18
- if (items.length === 0)
19
- return;
20
- const focused = document.activeElement;
21
- const currentIndex = items.indexOf(focused);
22
- let nextIndex = null;
23
- if (e.key === 'ArrowDown') {
24
- nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;
25
- }
26
- else if (e.key === 'ArrowUp') {
27
- nextIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;
28
- }
29
- else if (e.key === 'Home') {
30
- nextIndex = 0;
31
- }
32
- else if (e.key === 'End') {
33
- nextIndex = items.length - 1;
34
- }
35
- if (nextIndex !== null) {
36
- e.preventDefault();
37
- items[nextIndex].focus();
38
- }
39
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
40
- };
41
- return (_jsx("ul", { ref: node => {
42
- internalRef.current = node;
43
- if (typeof ref === 'function')
44
- ref(node);
45
- else if (ref)
46
- ref.current = node;
47
- }, role: "menu", "data-itemrole": itemRole, className: [styles.container, gap ? styles.gap : '', className].filter(Boolean).join(' '), onKeyDown: handleKeyDown, ...props, children: children }));
48
- });
49
- MenuBase.displayName = 'Menu';
50
- const isInteractiveEl = (el) => React.isValidElement(el) &&
51
- (typeof el.type === 'string' ? el.type === 'a' || el.type === 'button' : true);
52
- function applyMenuItemPropsToElement(child, opts) {
53
- var _a, _b, _c, _d;
54
- const { active, selected, disabled, role, tabIndex = 0, className } = opts;
55
- const childClass = [styles.item, active ? styles.active : '', selected ? styles.selected : '']
56
- .filter(Boolean)
57
- .join(' ');
58
- const nextImmediate = React.cloneElement(child, {
59
- className: [child.props.className, styles.interactiveChild, className]
60
- .filter(Boolean)
61
- .join(' '),
62
- });
63
- // If immediate child is interactive, apply a11y+styles there
64
- if (typeof child.type === 'string' && (child.type === 'a' || child.type === 'button')) {
65
- return React.cloneElement(child, {
66
- role: (_a = child.props.role) !== null && _a !== void 0 ? _a : role,
67
- tabIndex: (_b = child.props.tabIndex) !== null && _b !== void 0 ? _b : tabIndex,
68
- 'aria-selected': selected || undefined,
69
- 'aria-disabled': disabled || undefined,
70
- className: [child.props.className, styles.interactive, childClass, className]
71
- .filter(Boolean)
72
- .join(' '),
73
- ...(child.type === 'button' ? { disabled } : {}),
74
- });
75
- }
76
- // For custom components, assume they forward props
77
- return React.cloneElement(nextImmediate, {
78
- role: (_c = nextImmediate.props.role) !== null && _c !== void 0 ? _c : role,
79
- tabIndex: (_d = nextImmediate.props.tabIndex) !== null && _d !== void 0 ? _d : tabIndex,
80
- 'aria-selected': selected || undefined,
81
- 'aria-disabled': disabled || undefined,
82
- className: [nextImmediate.props.className, styles.interactive, childClass]
83
- .filter(Boolean)
84
- .join(' '),
85
- disabled,
86
- });
87
- }
88
- const MenuItem = React.forwardRef(({ children, active, selected, disabled, className, itemRole, variant, ...liProps }, ref) => {
89
- // If caller sets itemRole prop, use it; otherwise attempt to inherit from parent Menu via data attr.
90
- // (We can’t reliably read parent props here without context; simplest is: caller passes itemRole on Menu.Item when needed.)
91
- const resolvedRole = itemRole !== null && itemRole !== void 0 ? itemRole : 'menuitem';
92
- const isBordered = variant === 'bordered';
93
- const itemClassName = variant === 'danger' ? styles.itemDanger : undefined;
94
- const rowClass = [styles.row, isBordered ? styles.rowBordered : '', className]
95
- .filter(Boolean)
96
- .join(' ');
97
- if (isInteractiveEl(children)) {
98
- const child = children;
99
- return (_jsx("li", { ref: ref, role: "none", className: rowClass, ...liProps, children: applyMenuItemPropsToElement(child, {
100
- active,
101
- selected,
102
- disabled,
103
- role: resolvedRole,
104
- className: itemClassName,
105
- }) }));
106
- }
107
- // Fallback: wrap non-interactive children in a <button>
108
- return (_jsx("li", { ref: ref, role: "none", className: rowClass, ...liProps, children: _jsx("button", { role: resolvedRole, tabIndex: 0, "aria-selected": selected || undefined, "aria-disabled": disabled || undefined, className: [
109
- styles.interactive,
110
- styles.item,
111
- itemClassName,
112
- active ? styles.active : '',
113
- selected ? styles.selected : '',
114
- ]
115
- .filter(Boolean)
116
- .join(' '), type: "button", disabled: disabled, children: children }) }));
117
- });
118
- MenuItem.displayName = 'Menu.Item';
119
- const MenuCheckItem = React.forwardRef(({ label, checked, active, disabled, interactiveRef, interactiveProps, onCheckedChange, className, ...liProps }, ref) => {
120
- const isSelected = checked;
121
- const interactiveClass = [
122
- styles.interactiveChild,
123
- styles.item,
124
- active ? styles.active : '',
125
- isSelected ? styles.selected : '',
126
- ]
127
- .filter(Boolean)
128
- .join(' ');
129
- return (_jsx("li", { ref: ref, role: "none", className: [styles.row, className].filter(Boolean).join(' '), ...liProps, children: _jsx("div", { ref: interactiveRef, role: interactiveProps === null || interactiveProps === void 0 ? void 0 : interactiveProps.role, tabIndex: -1, "aria-selected": isSelected || undefined, "aria-disabled": disabled || undefined, className: interactiveClass, ...interactiveProps, onClick: event => {
130
- var _a;
131
- (_a = interactiveProps === null || interactiveProps === void 0 ? void 0 : interactiveProps.onClick) === null || _a === void 0 ? void 0 : _a.call(interactiveProps, event);
132
- if (event.defaultPrevented || disabled)
133
- return;
134
- const target = event.target;
135
- if (target instanceof Element && target.closest('button') !== null) {
136
- return;
137
- }
138
- onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange(!checked);
139
- }, children: _jsx(Checkbox, { variant: "primary", size: "sm", noContainer: true, checked: checked, disabled: disabled, labelAs: "span", label: label, onChange: (next, _e) => onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange(next) }) }) }));
140
- });
141
- MenuCheckItem.displayName = 'Menu.CheckItem';
142
- const MenuRadioItem = React.forwardRef(({ name, value, checked, disabled, label, onValueChange, className, ...liProps }, ref) => {
143
- return (_jsx("li", { ref: ref, role: "none", className: [styles.row, className].filter(Boolean).join(' '), ...liProps, children: _jsx("div", { className: styles.interactiveChild, onClick: event => {
144
- var _a;
145
- if (disabled)
146
- return;
147
- const target = event.target;
148
- // Let native label/input clicks handle themselves to avoid double-firing
149
- if ((_a = target.closest('label')) !== null && _a !== void 0 ? _a : target.closest('input'))
150
- return;
151
- onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(value);
152
- }, children: _jsx(RadioButton, { noContainer: true, name: name, size: "sm", value: value, checked: checked, disabled: disabled, label: label, onChange: (v, _e) => onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(v) }) }) }));
153
- });
154
- MenuRadioItem.displayName = 'Menu.RadioItem';
155
- const MenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx("li", { ref: ref, role: "separator", className: [styles.separator, className].filter(Boolean).join(' '), ...props })));
156
- MenuSeparator.displayName = 'Menu.Separator';
157
- const MenuHeader = React.forwardRef(({ className, children, ...props }, ref) => (_jsx("li", { ref: ref, role: "presentation", "aria-hidden": "true", className: [styles.header, className].filter(Boolean).join(' '), ...props, children: children })));
158
- MenuHeader.displayName = 'Menu.Header';
159
- export const Menu = Object.assign(MenuBase, {
160
- Item: MenuItem,
161
- CheckItem: MenuCheckItem,
162
- RadioItem: MenuRadioItem,
163
- Separator: MenuSeparator,
164
- Header: MenuHeader,
165
- });
@@ -1,220 +0,0 @@
1
- .container {
2
- list-style: none;
3
- margin: 0;
4
- padding: 0;
5
- background: transparent;
6
- border: 0;
7
- box-shadow: none;
8
- display: flex;
9
- flex-direction: column;
10
- }
11
-
12
- .row {
13
- display: block;
14
- }
15
-
16
- /* Applied to actual interactive elements (button/a/custom that forwards className) */
17
- .interactive {
18
- display: flex;
19
- align-items: flex-start;
20
- justify-content: flex-start;
21
- gap: var(--spacing-xs);
22
- inline-size: 100%;
23
- text-align: start;
24
- text-decoration: none;
25
- padding-block: var(--spacing-xxs);
26
- padding-inline: var(--spacing-md);
27
- margin-block: var(--spacing-2xs);
28
- min-block-size: var(--component-size-sm);
29
- background: transparent;
30
- border: none;
31
- font-family: var(--font-family);
32
- font-size: var(--font-size-sm);
33
- line-height: var(--line-height-normal);
34
- color: var(--color-fg-default);
35
- cursor: pointer;
36
- border-radius: var(--border-radius-md);
37
- transition:
38
- background-color var(--transition-fast) var(--ease-standard),
39
- color var(--transition-fast) var(--ease-standard);
40
- }
41
-
42
- .interactive > :last-child {
43
- min-width: 0;
44
- white-space: normal;
45
- overflow-wrap: anywhere;
46
- word-break: break-word;
47
- }
48
-
49
- /*
50
- Applied to the immediate child of <li> even if it's NOT an interactive element (e.g. a <div>)
51
- so that menu row styling still works for components that render a wrapper.
52
- */
53
- .interactiveChild {
54
- display: block;
55
- inline-size: 100%;
56
- border-radius: var(--border-radius-md);
57
- }
58
-
59
- /* NEW: make wrapper-children (Checkbox/Radio) look/space like menu rows */
60
- .row > .interactiveChild {
61
- display: flex;
62
- align-items: center;
63
- inline-size: 100%;
64
- padding-block: var(--spacing-xxs);
65
- padding-inline: var(--spacing-md);
66
- margin-block: var(--spacing-2xs);
67
- min-block-size: var(--component-size-sm);
68
- border-radius: var(--border-radius-md);
69
- cursor: pointer;
70
- }
71
-
72
- /* NEW: add consistent gap between control and label inside Checkbox/Radio
73
- Both components use a root element with className={styles.container}.
74
- Because they're CSS modules, we must target it with :global(.container). */
75
- .row :global(.container) {
76
- display: flex;
77
- align-items: center;
78
- gap: var(--spacing-sm);
79
- inline-size: 100%;
80
- cursor: pointer;
81
- }
82
-
83
- .row :global(.label) {
84
- flex: 1 1 auto;
85
- cursor: pointer;
86
- }
87
-
88
- .row :global(.label) * {
89
- cursor: pointer;
90
- }
91
-
92
- /* Hover: support both cases (interactive element, or wrapper child) */
93
- .interactive:hover:not(.selected),
94
- .row:hover > .interactiveChild:not(.selected) {
95
- background-color: var(--color-bg-toolbar-hover);
96
- }
97
-
98
- /* Focus ring: support both cases */
99
- .interactive:focus-visible {
100
- outline: none;
101
- box-shadow: inset 0 0 0 1px var(--color-border-selected);
102
- }
103
-
104
- /* If wrapper contains a focusable element, show ring when any child is focused */
105
- .row:focus-within > .interactiveChild {
106
- outline: none;
107
- box-shadow: inset 0 0 0 1px var(--color-border-selected);
108
- }
109
-
110
- /* Keyboard active/current item */
111
- .active,
112
- .interactive.active,
113
- .row > .interactiveChild.active {
114
- background-color: var(--color-bg-toolbar-hover);
115
- }
116
-
117
- /* Selected item */
118
- .selected,
119
- .interactive[aria-selected='true'],
120
- .row > .interactiveChild.selected,
121
- .row > .interactiveChild[aria-selected='true'] {
122
- background-color: var(--color-bg-selected);
123
- color: var(--color-fg-default);
124
- }
125
-
126
- .selected:hover,
127
- .interactive.selected:hover,
128
- .interactive[aria-selected='true']:hover,
129
- .row:hover > .interactiveChild.selected,
130
- .row:hover > .interactiveChild[aria-selected='true'],
131
- .active.selected,
132
- .interactive.active.selected,
133
- .interactive.active[aria-selected='true'],
134
- .row > .interactiveChild.active.selected,
135
- .row > .interactiveChild.active[aria-selected='true'] {
136
- background-color: var(--color-bg-selected-hover);
137
- }
138
-
139
- /* Checked (legacy support; kept in case any interactive element still uses aria-checked) */
140
- .interactive[aria-checked='true'],
141
- .row > .interactiveChild[aria-checked='true'] {
142
- background-color: var(--color-bg-selected);
143
- color: var(--color-fg-default);
144
- }
145
-
146
- .itemDanger {
147
- color: var(--color-status-error);
148
- }
149
-
150
- .itemDanger svg {
151
- color: inherit;
152
- }
153
-
154
- /* Disabled: support both cases */
155
- .interactive[aria-disabled='true'],
156
- .interactive:disabled,
157
- .row > .interactiveChild[aria-disabled='true'] {
158
- color: var(--color-disabled-fg);
159
- cursor: not-allowed;
160
- pointer-events: none;
161
- }
162
-
163
- /* Icons inside either interactive element or wrapper */
164
- .interactive svg,
165
- .interactiveChild svg {
166
- inline-size: var(--icon-size-sm);
167
- block-size: var(--icon-size-sm);
168
- /* Vertically center the icon against the first text line when parent is flex-start */
169
- margin-block: calc((var(--line-height-normal) * var(--font-size-sm) - var(--icon-size-sm)) / 2);
170
- flex-shrink: 0;
171
- }
172
-
173
- /* Visual separator row (used by <Menu.Separator />) */
174
- .separator {
175
- block-size: 1px;
176
- margin-block: var(--spacing-xxs);
177
- background: var(--color-border-subtle);
178
- opacity: 0.8;
179
- border-radius: 999px;
180
- }
181
-
182
- .header {
183
- padding-block: var(--spacing-xs);
184
- padding-inline: var(--spacing-md);
185
- color: var(--color-fg-muted);
186
- font-size: var(--font-size-xs);
187
- font-weight: 500;
188
- line-height: var(--line-height-normal);
189
- text-transform: uppercase;
190
- letter-spacing: 0.04em;
191
- cursor: default;
192
- user-select: none;
193
- display: flex;
194
- align-items: center;
195
- gap: var(--spacing-xs);
196
- }
197
-
198
- .header svg {
199
- inline-size: var(--icon-size-sm);
200
- block-size: var(--icon-size-sm);
201
- color: inherit;
202
- }
203
-
204
- /* Gap between items */
205
- .gap {
206
- gap: var(--spacing-xs);
207
- }
208
-
209
- /* Bordered item variant */
210
- .rowBordered {
211
- border: 1px solid var(--color-border-default);
212
- border-radius: var(--border-radius-md);
213
- overflow: hidden;
214
- }
215
-
216
- /* Inside a bordered row, remove inner border-radius so hover bg fills the full area */
217
- .rowBordered .interactive,
218
- .rowBordered .interactiveChild {
219
- border-radius: 0;
220
- }
@@ -1,9 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { Fragment } from 'react';
3
- import styles from './MetaBar.module.css';
4
- export function MetaBar({ items, separator = '•' }) {
5
- const visibleItems = items.filter(item => item.value !== null && item.value !== undefined && item.value !== '');
6
- if (visibleItems.length === 0)
7
- return null;
8
- return (_jsx("div", { className: styles.meta, children: visibleItems.map((item, index) => (_jsxs(Fragment, { children: [_jsxs("span", { className: item.muted === false ? styles.itemDefault : styles.itemMuted, children: [item.label && _jsxs("span", { children: [item.label, ":\u00A0"] }), _jsx("span", { children: item.value })] }), index < visibleItems.length - 1 && (_jsx("span", { "aria-hidden": "true", className: styles.dot, children: separator }))] }, index))) }));
9
- }
@@ -1,27 +0,0 @@
1
- .meta {
2
- display: flex;
3
- flex-wrap: wrap;
4
- align-items: center;
5
- gap: var(--spacing-xs);
6
- font-size: var(--font-size-xs);
7
- }
8
-
9
- .itemMuted,
10
- .itemDefault {
11
- display: inline-flex;
12
- align-items: center;
13
- gap: 0;
14
- line-height: 1;
15
- }
16
-
17
- .itemMuted {
18
- color: var(--color-fg-subtle);
19
- }
20
-
21
- .itemDefault {
22
- color: var(--color-fg-default);
23
- }
24
-
25
- .dot {
26
- opacity: 0.6;
27
- }
@@ -1,29 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Menu as MenuIcon, X } from 'lucide-react';
4
- import { useRef, useState } from 'react';
5
- import styles from './NavBar.module.css';
6
- import { Logo } from '../../assets/logo';
7
- import { useDeviceSize } from '../../hooks/useDeviceSize';
8
- import { AppHeader } from '../app-header/AppHeader';
9
- import { Headline } from '../headline/Headline';
10
- import { Popover } from '../popover/Popover';
11
- export function NavBar({ logo, items, productName, addition, activeLink, size, }) {
12
- const [mobileOpen, setMobileOpen] = useState(false);
13
- const deviceSize = useDeviceSize();
14
- const isMobile = deviceSize === 'mobile';
15
- const navRef = useRef(null);
16
- const navLinks = items === null || items === void 0 ? void 0 : items.filter(i => i.enabled !== false).map((item, id) => {
17
- const { component: Component, label, icon, href, active, external } = item;
18
- const isActive = activeLink ? href === activeLink : Boolean(active);
19
- const linkClass = [styles.link, isActive ? styles.active : ''].filter(Boolean).join(' ');
20
- const commonProps = {
21
- className: linkClass,
22
- href,
23
- ...(isActive ? { 'aria-current': 'page' } : {}),
24
- ...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {}),
25
- };
26
- return (_jsx("li", { className: styles.navItem, role: "listitem", children: Component ? (_jsxs(Component, { ...commonProps, children: [icon, _jsx("span", { className: styles.label, children: label })] })) : (_jsxs("a", { ...commonProps, children: [icon, _jsx("span", { className: styles.label, children: label })] })) }, id));
27
- });
28
- return (_jsx(AppHeader, { size: size, children: _jsxs("nav", { ref: navRef, className: styles.container, "aria-label": productName ? `${productName} navigation` : 'Main navigation', children: [(logo || productName) && (_jsxs("div", { className: styles.logoRow, children: [logo, productName && (_jsxs("span", { className: styles.productName, children: [_jsx(Logo, {}), _jsx(Headline, { disableMargin: true, size: 1, children: productName })] }))] })), (navLinks === null || navLinks === void 0 ? void 0 : navLinks.length) > 0 && (_jsx("div", { className: styles.navContent, children: _jsx("ul", { className: styles.navItems, role: "list", children: navLinks }) })), addition && !isMobile && _jsx("div", { className: styles.addition, children: addition }), isMobile && (_jsx(Popover, { open: mobileOpen, onOpenChange: setMobileOpen, matchTriggerWidth: true, fullWidth: false, autoFocusContent: true, anchorRef: navRef, trigger: (toggle, _icon, open) => (_jsx("button", { type: "button", className: styles.burgerButton, "aria-label": open ? 'Close navigation menu' : 'Open navigation menu', "aria-expanded": open, onClick: toggle, children: open ? _jsx(X, { size: 20 }) : _jsx(MenuIcon, { size: 20 }) })), children: close => (_jsxs("div", { className: styles.mobileMenu, children: [_jsx("ul", { className: styles.mobileNavItems, role: "list", onClick: close, children: navLinks }), addition && _jsx("div", { className: styles.mobileAddition, children: addition })] })) }))] }) }));
29
- }
@@ -1,221 +0,0 @@
1
- .container {
2
- display: flex;
3
- align-items: center;
4
- gap: var(--spacing-xl);
5
- inline-size: 100%;
6
- box-sizing: border-box;
7
- flex-grow: 1;
8
- }
9
-
10
- .logoRow {
11
- display: flex;
12
- align-items: center;
13
- gap: var(--spacing-xs);
14
- flex-shrink: 0;
15
- }
16
-
17
- .navContent {
18
- display: flex;
19
- align-items: center;
20
- gap: var(--spacing-md);
21
- min-inline-size: 0;
22
- flex: 1 1 auto;
23
- }
24
-
25
- /* Burger: hidden on desktop, visible on mobile */
26
- .burger {
27
- display: none;
28
- margin-inline-start: auto;
29
- }
30
-
31
- .burgerButton {
32
- display: inline-flex;
33
- align-items: center;
34
- justify-content: center;
35
- inline-size: var(--component-size-md);
36
- block-size: var(--component-size-md);
37
- border: none;
38
- background: transparent;
39
- color: var(--color-fg-default);
40
- border-radius: var(--border-radius-default);
41
- cursor: pointer;
42
- padding: 0;
43
- transition: background-color var(--transition-fast) var(--ease-standard);
44
- }
45
-
46
- .burgerButton:hover {
47
- background-color: var(--color-bg-hover-subtle);
48
- }
49
-
50
- .burgerButton:focus-visible {
51
- outline: none;
52
- box-shadow: var(--focus-ring);
53
- }
54
-
55
- /* Mobile dropdown content */
56
- .mobileMenu {
57
- display: flex;
58
- flex-direction: column;
59
- gap: var(--spacing-xs);
60
- padding: var(--spacing-xs);
61
- }
62
-
63
- .mobileNavItems {
64
- display: flex;
65
- flex-direction: column;
66
- list-style: none;
67
- margin: 0;
68
- padding: 0;
69
- }
70
-
71
- .mobileAddition {
72
- border-top: var(--border-width-thin) solid var(--color-border-subtle);
73
- padding-top: var(--spacing-xs);
74
- }
75
-
76
- @media (max-width: 640px) {
77
- .container {
78
- flex-wrap: nowrap;
79
- overflow: hidden;
80
- }
81
-
82
- .logoRow {
83
- flex: 1 1 auto;
84
- min-inline-size: 0;
85
- overflow: hidden;
86
- }
87
-
88
- .navContent {
89
- display: none;
90
- }
91
-
92
- .addition {
93
- display: none;
94
- }
95
-
96
- .burger {
97
- display: flex;
98
- flex-shrink: 0;
99
- margin-inline-start: 0;
100
- }
101
- }
102
-
103
- .productName {
104
- display: inline-flex;
105
- align-items: center;
106
- gap: var(--spacing-xs);
107
- color: inherit;
108
- text-decoration: none;
109
- }
110
- .productName svg {
111
- inline-size: var(--icon-size-md);
112
- block-size: var(--icon-size-md);
113
- }
114
-
115
- .navItems {
116
- display: flex;
117
- align-items: center;
118
- gap: var(--spacing-lg);
119
- min-inline-size: 0;
120
- list-style: none;
121
- margin: 0;
122
- padding: 0;
123
- }
124
-
125
- .addition {
126
- display: flex;
127
- align-items: center;
128
- flex: 1 1 auto;
129
- min-inline-size: 0;
130
- margin-inline-start: auto;
131
- }
132
-
133
- .mobileAddition {
134
- display: flex;
135
- flex-direction: column;
136
- align-items: stretch;
137
- gap: var(--spacing-xs);
138
- }
139
-
140
- .navItem {
141
- list-style: none;
142
- min-inline-size: 0;
143
- }
144
-
145
- .link {
146
- text-transform: var(--nav-link-transform);
147
- position: relative;
148
- display: inline-flex;
149
- align-items: center;
150
- gap: var(--spacing-xs);
151
- color: var(--color-fg-muted);
152
- font-family: var(--font-family);
153
- font-size: var(--font-size-sm);
154
- text-decoration: none;
155
- border-radius: var(--border-radius-default);
156
- padding-block: var(--spacing-xs);
157
- padding-inline: var(--spacing-sm);
158
- transition:
159
- background-color var(--transition-fast) var(--ease-standard),
160
- color var(--transition-fast) var(--ease-standard),
161
- box-shadow var(--transition-fast) var(--ease-standard);
162
- }
163
-
164
- /* Hover + focus */
165
- .link:hover {
166
- color: var(--color-fg-default);
167
- }
168
- .link:focus-visible {
169
- outline: none;
170
- box-shadow: var(--focus-ring);
171
- }
172
-
173
- /* Active underline */
174
- .link.active,
175
- .link[aria-current='page'] {
176
- color: var(--color-fg-default);
177
- box-shadow: none;
178
- }
179
-
180
- .link::after {
181
- content: '';
182
- position: absolute;
183
- inset-inline-start: 0;
184
- inset-block-end: 0;
185
- inline-size: 0;
186
- block-size: 2px;
187
- background-color: var(--color-border-strong);
188
- transition: inline-size var(--transition-fast) var(--ease-standard);
189
- }
190
-
191
- .link:hover::after {
192
- inline-size: 100%;
193
- }
194
-
195
- .link.active::after,
196
- .link[aria-current='page']::after {
197
- inline-size: 100%;
198
- background-color: var(--color-brand);
199
- }
200
-
201
- /* Icons/images inside links */
202
- .link svg,
203
- .link img {
204
- inline-size: var(--icon-size-md);
205
- block-size: var(--icon-size-md);
206
- flex: 0 0 auto;
207
- }
208
-
209
- @media (max-width: 767px) {
210
- .addition,
211
- .mobileAddition {
212
- flex-direction: column;
213
- align-items: stretch;
214
- gap: var(--spacing-xs);
215
- }
216
-
217
- .addition > *,
218
- .mobileAddition > * {
219
- width: 100%;
220
- }
221
- }
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import styles from './FadeOverlay.module.css';
3
- function cx(...parts) {
4
- return parts.filter(Boolean).join(' ');
5
- }
6
- export function FadeOverlay({ edge = 'bottom', size = 'md', className, 'aria-hidden': ariaHidden = true, ...rest }) {
7
- return (_jsx("div", { "aria-hidden": ariaHidden, className: cx(styles.overlay, styles[edge], styles[size], className), ...rest }));
8
- }