@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,53 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ChevronDown } from 'lucide-react';
3
- import { useLayoutEffect, useRef, useState } from 'react';
4
- import { Headline } from '../../../components/headline/Headline';
5
- import styles from './AccordionRow.module.css';
6
- function useCollapsibleHeight(isOpen, shouldAnimate) {
7
- const innerRef = useRef(null);
8
- const [height, setHeight] = useState('0px');
9
- useLayoutEffect(() => {
10
- var _a, _b;
11
- const el = innerRef.current;
12
- if (!el)
13
- return;
14
- const prefersReduced = typeof window !== 'undefined' &&
15
- ((_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(prefers-reduced-motion: reduce)')) === null || _b === void 0 ? void 0 : _b.matches);
16
- // No animation on first render when default-open is used:
17
- // just set the final height.
18
- if (!shouldAnimate || prefersReduced) {
19
- setHeight(isOpen ? 'auto' : '0px');
20
- return;
21
- }
22
- if (isOpen) {
23
- // 0 -> scrollHeight
24
- setHeight('0px');
25
- requestAnimationFrame(() => {
26
- setHeight(`${el.scrollHeight}px`);
27
- });
28
- }
29
- else {
30
- // lock -> 0 (important when currently 'auto')
31
- setHeight(`${el.scrollHeight}px`);
32
- requestAnimationFrame(() => {
33
- setHeight('0px');
34
- });
35
- }
36
- }, [isOpen, shouldAnimate]);
37
- function onTransitionEnd(e) {
38
- if (e.propertyName !== 'height')
39
- return;
40
- if (!innerRef.current)
41
- return;
42
- if (isOpen)
43
- setHeight('auto');
44
- }
45
- return { innerRef, height, onTransitionEnd };
46
- }
47
- export function AccordionRow({ uid, index, item, isOpen, onToggle, shouldAnimate = true, }) {
48
- const isDisabled = !!item.disabled;
49
- const buttonId = `${uid}-acc-btn-${index}`;
50
- const panelId = `${uid}-acc-panel-${index}`;
51
- const { innerRef, height, onTransitionEnd } = useCollapsibleHeight(isOpen, shouldAnimate);
52
- return (_jsxs("section", { className: `${styles.item} ${isOpen ? styles.open : ''} ${isDisabled ? styles.disabled : ''}`, children: [_jsx("div", { children: _jsxs("button", { type: "button", id: buttonId, className: styles.trigger, "aria-expanded": isOpen, "aria-controls": panelId, onClick: () => onToggle(index), disabled: isDisabled, children: [_jsxs("span", { className: styles.title, children: [item.headerIcon ? _jsx("span", { className: styles.icon, children: item.headerIcon }) : null, _jsx(Headline, { disableMargin: true, size: 4, weight: 500, severity: item.severity, subheader: item.subheader, allowWrap: isOpen, children: item.header }), item.headerAddition] }), _jsx("span", { className: styles.chevron, "aria-hidden": "true", children: _jsx(ChevronDown, {}) })] }) }), _jsx("div", { id: panelId, role: "region", "aria-labelledby": buttonId, className: `${styles.panel} ${shouldAnimate ? styles.animate : styles.noAnimate}`, style: { height }, onTransitionEnd: onTransitionEnd, children: _jsx("div", { ref: innerRef, className: styles.content, children: item.children }) })] }));
53
- }
@@ -1,90 +0,0 @@
1
- .trigger {
2
- all: unset;
3
- box-sizing: border-box;
4
-
5
- width: 100%;
6
- display: flex;
7
- align-items: center;
8
- justify-content: space-between;
9
- gap: var(--spacing-sm);
10
-
11
- cursor: pointer;
12
- user-select: none;
13
-
14
- padding: var(--acc-trigger-py) var(--acc-trigger-px);
15
- background: var(--color-bg-contextual-subtle);
16
-
17
- min-width: 0;
18
- }
19
-
20
- .trigger:focus-visible {
21
- outline: none;
22
- box-shadow: var(--focus-ring);
23
- }
24
-
25
- .disabled .trigger {
26
- cursor: not-allowed;
27
- color: var(--color-disabled-fg);
28
- }
29
-
30
- .title {
31
- display: flex;
32
- align-items: center;
33
- gap: var(--spacing-xs);
34
- min-width: 0;
35
- flex: 1 1 auto;
36
- overflow: hidden;
37
- }
38
-
39
- .icon {
40
- flex: 0 0 auto;
41
- display: inline-flex;
42
- align-items: center;
43
- }
44
-
45
- .icon svg {
46
- height: var(--icon-size-sm);
47
- width: var(--icon-size-sm);
48
- }
49
-
50
- .chevron {
51
- width: var(--icon-size-md);
52
- height: var(--icon-size-md);
53
- flex: 0 0 auto;
54
- transition: transform var(--transition-normal) var(--ease-standard);
55
- }
56
-
57
- .chevron svg {
58
- width: 100%;
59
- height: 100%;
60
- display: block;
61
- }
62
-
63
- .open .chevron {
64
- transform: rotate(180deg);
65
- }
66
-
67
- .panel {
68
- overflow: hidden;
69
- height: 0px;
70
- }
71
-
72
- /* Default: animate only when class is present */
73
- .animate {
74
- transition: height var(--transition-slow) var(--ease-decelerate);
75
- }
76
-
77
- /* No animation (initial render default-open) */
78
- .noAnimate {
79
- transition: none;
80
- }
81
-
82
- .content {
83
- padding: var(--acc-content-py) 0;
84
- }
85
-
86
- @media (prefers-reduced-motion: reduce) {
87
- .panel {
88
- transition: none;
89
- }
90
- }
@@ -1,17 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import styles from './Alert.module.css';
4
- import { Icon } from '../icon/Icon';
5
- export function Alert({ children, title, severity = 'neutral', customIcon, disableIcon = false, fullWidth = false, maxWidth = '72ch', role = 'status', }) {
6
- const hasLeading = Boolean(customIcon) || !disableIcon;
7
- return (_jsxs("div", { className: [
8
- styles.container,
9
- styles[severity],
10
- fullWidth ? styles.fullWidth : '',
11
- hasLeading ? styles.hasLeading : '',
12
- ]
13
- .filter(Boolean)
14
- .join(' '), style: {
15
- '--alert-max-width': typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth,
16
- }, role: role, children: [hasLeading ? (_jsx("div", { className: styles.leading, children: customIcon !== null && customIcon !== void 0 ? customIcon : _jsx(Icon, { severity: severity }) })) : null, _jsxs("div", { className: styles.content, children: [title ? _jsx("div", { className: styles.title, children: title }) : null, _jsx("div", { className: styles.body, children: children })] })] }));
17
- }
@@ -1,98 +0,0 @@
1
- .container {
2
- --alert-bg: var(--color-bg-toolbar);
3
- --alert-fg: var(--color-fg-default);
4
- --alert-border: var(--color-border-subtle);
5
-
6
- display: flex;
7
- align-items: flex-start;
8
- gap: var(--spacing-sm);
9
- inline-size: min(100%, var(--alert-max-width, 72ch));
10
- max-inline-size: 100%;
11
- padding: var(--spacing-sm) var(--spacing-md);
12
- border: 1px solid var(--alert-border);
13
- border-radius: var(--border-radius-default);
14
- background: var(--alert-bg);
15
- color: var(--alert-fg);
16
- box-sizing: border-box;
17
- }
18
-
19
- .fullWidth {
20
- inline-size: 100%;
21
- }
22
-
23
- .leading {
24
- display: inline-flex;
25
- align-items: center;
26
- justify-content: center;
27
- flex: 0 0 auto;
28
- padding-block-start: 2px;
29
- }
30
-
31
- .leading svg {
32
- inline-size: var(--icon-size-md);
33
- block-size: var(--icon-size-md);
34
- color: currentColor;
35
- }
36
-
37
- .content {
38
- display: flex;
39
- flex-direction: column;
40
- gap: var(--spacing-2xs);
41
- min-width: 0;
42
- flex: 1 1 auto;
43
- }
44
-
45
- .title,
46
- .body {
47
- min-width: 0;
48
- overflow-wrap: anywhere;
49
- word-break: break-word;
50
- white-space: normal;
51
- }
52
-
53
- .title {
54
- font-size: var(--font-size-sm);
55
- font-weight: var(--font-weight-semibold);
56
- line-height: var(--line-height-tight);
57
- }
58
-
59
- .body {
60
- font-size: var(--font-size-sm);
61
- line-height: var(--line-height-normal);
62
- }
63
-
64
- .neutral {
65
- --alert-bg: var(--color-bg-toolbar);
66
- --alert-fg: var(--color-fg-default);
67
- --alert-border: var(--color-border-subtle);
68
- }
69
-
70
- .success {
71
- --alert-bg: var(--color-status-success-bg);
72
- --alert-fg: var(--color-status-success-fg);
73
- --alert-border: var(--color-status-success-border);
74
- }
75
-
76
- .warning {
77
- --alert-bg: var(--color-status-warning-bg);
78
- --alert-fg: var(--color-status-warning-fg);
79
- --alert-border: var(--color-status-warning-border);
80
- }
81
-
82
- .error {
83
- --alert-bg: var(--color-status-error-bg);
84
- --alert-fg: var(--color-status-error-fg);
85
- --alert-border: var(--color-status-error-border);
86
- }
87
-
88
- .info {
89
- --alert-bg: var(--color-status-info-bg);
90
- --alert-fg: var(--color-status-info-fg);
91
- --alert-border: var(--color-status-info-border);
92
- }
93
-
94
- .brand {
95
- --alert-bg: color-mix(in srgb, var(--color-brand) 10%, var(--color-bg-surface));
96
- --alert-fg: var(--color-brand);
97
- --alert-border: color-mix(in srgb, var(--color-brand) 35%, transparent);
98
- }
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import styles from './AppHeader.module.css';
3
- export function AppHeader({ children, size = 'md' }) {
4
- return (_jsx("header", { className: styles.header, children: _jsx("div", { className: styles.container, "data-size": size, children: children }) }));
5
- }
@@ -1,74 +0,0 @@
1
- .header {
2
- inline-size: 100%;
3
- background-color: var(--color-bg-surface);
4
- }
5
-
6
- .container {
7
- /* layout */
8
- display: flex;
9
- align-items: center;
10
- justify-content: space-between;
11
- gap: var(--spacing-lg);
12
-
13
- /* sizing */
14
- inline-size: 100%;
15
- min-block-size: 60px;
16
- box-sizing: border-box;
17
-
18
- /* chrome */
19
- color: var(--color-fg-default);
20
-
21
- /* density-aware vertical rhythm */
22
- padding-block: calc(var(--control-padding-y) + var(--density));
23
- }
24
-
25
- .container[data-size='lg'] {
26
- min-block-size: 80px;
27
- }
28
-
29
- /* Optional content wrapper */
30
- .inner {
31
- inline-size: min(100%, var(--container-xl));
32
- margin-inline: auto;
33
-
34
- display: flex;
35
- align-items: center;
36
- justify-content: space-between;
37
- gap: var(--spacing-lg);
38
- }
39
-
40
- /* Slots */
41
- .start,
42
- .center,
43
- .end {
44
- display: inline-flex;
45
- align-items: center;
46
- gap: var(--spacing-md);
47
- }
48
- .center {
49
- margin-inline: auto;
50
- }
51
-
52
- /* Interactive elements inside the header share focus visuals */
53
- .container a:focus-visible,
54
- .container button:focus-visible {
55
- outline: none;
56
- box-shadow: var(--focus-ring);
57
- }
58
-
59
- /* Elevated header */
60
- .elevated {
61
- border-block-end: 0;
62
- box-shadow: var(--shadow-sm);
63
- }
64
-
65
- /* Transparent header */
66
- .transparent {
67
- background-color: transparent;
68
- border-block-end: 0;
69
- }
70
-
71
- /* Condensed density option */
72
- :root[data-density='compact'] .container {
73
- padding-inline: var(--spacing-md);
74
- }
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import styles from './AttributeChip.module.css';
3
- export function AttributeChip({ label, value, size = 'md', loading, }) {
4
- return (_jsxs("div", { className: `${styles.container} ${styles[size]}`, "aria-busy": loading, children: [_jsx("span", { className: styles.label, children: label }), _jsx("span", { className: styles.value, children: loading ? '—' : value === null || value === void 0 ? void 0 : value.toString() })] }));
5
- }
@@ -1,65 +0,0 @@
1
- .container {
2
- display: inline-flex;
3
- align-items: center;
4
- white-space: nowrap;
5
- border-radius: var(--border-radius-default);
6
- border: 1px solid var(--color-border-subtle);
7
- overflow: hidden;
8
- font-family: var(--font-family);
9
- font-weight: var(--font-weight-default);
10
- line-height: var(--line-height-tight);
11
- }
12
-
13
- .label,
14
- .value {
15
- display: inline-flex;
16
- align-items: center;
17
- height: 100%;
18
- padding-inline: var(--spacing-sm);
19
- }
20
-
21
- .label {
22
- background: var(--color-bg-contextual);
23
- }
24
-
25
- .value {
26
- background: var(--color-bg-contextual-subtle);
27
- color: var(--color-fg-default);
28
- font-weight: var(--font-weight-medium);
29
- }
30
-
31
- /* Optional: separator between label and value */
32
- .value {
33
- border-left: 1px solid var(--color-border-subtle);
34
- }
35
-
36
- /* Sizes */
37
- .sm {
38
- height: var(--component-size-xs);
39
- font-size: var(--font-size-xs);
40
- }
41
-
42
- .md {
43
- height: var(--component-size-sm);
44
- font-size: var(--font-size-sm);
45
- }
46
-
47
- .lg {
48
- height: var(--component-size-md);
49
- font-size: var(--font-size-md);
50
- }
51
-
52
- .sm .label,
53
- .sm .value {
54
- padding-inline: var(--spacing-xs);
55
- }
56
-
57
- .md .label,
58
- .md .value {
59
- padding-inline: var(--spacing-sm);
60
- }
61
-
62
- .lg .label,
63
- .lg .value {
64
- padding-inline: var(--spacing-md);
65
- }
@@ -1,48 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import styles from './Avatar.module.css';
4
- import { SeverityBgColor, SeverityTextColor } from '../../constants/severity';
5
- import { sizes } from '../../constants/sizes';
6
- export function Avatar({ image, imgSrc, imgAlt, fullName, color = 'brand', button, size = 'md', className, fullWidth = false, photographerCredit, ...rest }) {
7
- const text = (() => {
8
- if (!fullName)
9
- return '';
10
- const parts = fullName.trim().split(/\s+/);
11
- if (parts.length === 1) {
12
- return parts[0].charAt(0).toUpperCase();
13
- }
14
- // Use first letter of first and last part only
15
- return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase();
16
- })();
17
- const styleVars = {
18
- '--bg': SeverityBgColor[color],
19
- '--text': SeverityTextColor[color],
20
- '--size': fullWidth ? '100%' : sizes[size],
21
- };
22
- // Unique id per component instance so multiple avatars don't clash
23
- const pathId = React.useId();
24
- const renderImage = () => {
25
- if (image) {
26
- // If it's a valid React element, merge our className; otherwise render as-is
27
- if (React.isValidElement(image)) {
28
- const mergedClass = [image.props.className, styles.image].filter(Boolean).join(' ');
29
- return React.cloneElement(image, { className: mergedClass });
30
- }
31
- return _jsx("span", { className: styles.imageSlot, children: image });
32
- }
33
- if (imgSrc) {
34
- return _jsx("img", { className: styles.image, src: imgSrc, alt: imgAlt });
35
- }
36
- const avatarSizeClass = [styles.avatar];
37
- if (size === 'xs')
38
- avatarSizeClass.push(styles['size-xs']);
39
- if (size === 'sm')
40
- avatarSizeClass.push(styles['size-sm']);
41
- return (_jsx("span", { className: avatarSizeClass.join(' '), "aria-hidden": "true", children: text }));
42
- };
43
- if (button) {
44
- return (_jsx("button", { type: "button", ...rest, className: [styles.container, styles.button, className].filter(Boolean).join(' '), style: styleVars, children: renderImage() }));
45
- }
46
- // Non-button: wrapper to overlay circular credit SVG
47
- return (_jsxs("div", { className: [styles.wrapper, className].filter(Boolean).join(' '), style: styleVars, children: [_jsx("div", { className: styles.container, children: renderImage() }), photographerCredit && (_jsxs("svg", { className: styles.creditText, viewBox: "0 0 100 100", "aria-hidden": "true", focusable: "false", children: [_jsx("defs", { children: _jsx("path", { id: pathId, d: "\n M 50, 50\n m -42, 0\n a 42,42 0 1,1 84,0\n a 42,42 0 1,1 -84,0\n " }) }), _jsx("text", { children: _jsx("textPath", { xlinkHref: `#${pathId}`, startOffset: "50%", textAnchor: "middle", children: photographerCredit }) })] }))] }));
48
- }
@@ -1,91 +0,0 @@
1
- .container {
2
- inline-size: var(--size);
3
- block-size: var(--size);
4
- max-inline-size: var(--component-size-xl);
5
- aspect-ratio: 1 / 1;
6
- border-radius: var(--border-radius-round);
7
- display: inline-flex;
8
- align-items: center;
9
- justify-content: center;
10
- font-weight: var(--font-weight-normal);
11
- overflow: hidden;
12
- }
13
-
14
- .container.button {
15
- cursor: pointer;
16
- border: 0;
17
- padding: 0;
18
- background: transparent; /* important */
19
- transition:
20
- background-color var(--transition-fast) var(--ease-standard),
21
- opacity var(--transition-fast) var(--ease-standard);
22
- }
23
-
24
- .container.button:hover .avatar {
25
- background-color: color-mix(in srgb, var(--bg) 25%, var(--color-bg-surface));
26
- }
27
-
28
- .container.button:active {
29
- opacity: 0.8;
30
- }
31
-
32
- .avatar {
33
- inline-size: 80%;
34
- block-size: 80%;
35
- display: inline-flex;
36
- align-items: center;
37
- justify-content: center;
38
- border-radius: 50%;
39
-
40
- /* moved here */
41
- background-color: color-mix(in srgb, var(--bg) 20%, var(--color-bg-surface));
42
- color: var(--bg);
43
-
44
- font-size: var(--font-size-sm);
45
- line-height: 1;
46
- text-transform: uppercase;
47
- }
48
-
49
- .avatar.size-xs,
50
- .avatar.size-sm {
51
- font-size: var(--font-size-xs);
52
- font-weight: var(--font-weight-normal);
53
- }
54
-
55
- .image {
56
- inline-size: 100%;
57
- block-size: 100%;
58
- object-fit: cover;
59
- display: block;
60
- border-radius: 50%; /* important if image fills avatar */
61
- }
62
-
63
- .imageSlot {
64
- display: contents;
65
- }
66
-
67
- .wrapper {
68
- position: relative;
69
- display: inline-block;
70
- inline-size: var(--size);
71
- block-size: var(--size);
72
- max-inline-size: var(--component-size-xl);
73
- aspect-ratio: 1 / 1;
74
- color: var(--text);
75
- }
76
-
77
- .creditText {
78
- position: absolute;
79
- inset: 0;
80
- inline-size: 100%;
81
- block-size: 100%;
82
- pointer-events: none;
83
- fill: currentColor;
84
- }
85
-
86
- .creditText text {
87
- font-size: 11px;
88
- font-weight: 600;
89
- text-transform: uppercase;
90
- letter-spacing: 0.08em;
91
- }
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Fragment } from 'react';
3
- import styles from './Breadcrumbs.module.css';
4
- export function Breadcrumbs({ items, ...navProps }) {
5
- return (_jsx("nav", { className: styles.breadcrumbs, "aria-label": "breadcrumb", ...navProps, children: _jsx("ul", { children: items.map((item, index) => (_jsxs(Fragment, { children: [_jsxs("li", { children: [item.icon && item.icon, item.onClick ? (_jsx("button", { onClick: item.onClick, children: item.label })) : (_jsx("span", { children: item.label }))] }), index < items.length - 1 && _jsx("span", { className: styles.separator, children: "/" })] }, `breadcrumbItem-${item.label}-${index}`))) }) }));
6
- }
@@ -1,80 +0,0 @@
1
- .breadcrumbs {
2
- font-family: var(--font-family);
3
- }
4
-
5
- .breadcrumbs ul {
6
- display: flex;
7
- align-items: center;
8
- list-style: none;
9
- margin: 0;
10
- padding: 0;
11
- font-size: var(--font-size-sm);
12
- }
13
-
14
- .breadcrumbs li {
15
- display: flex;
16
- align-items: center;
17
- gap: var(--spacing-xxs);
18
- padding-block: calc(var(--spacing-xxs) + var(--density));
19
- padding-inline: 0;
20
- color: var(--color-fg-default);
21
- border-radius: var(--border-radius-sm);
22
- position: relative;
23
- transition:
24
- color var(--transition-fast) var(--ease-standard),
25
- background-color var(--transition-fast) var(--ease-standard);
26
- }
27
-
28
- .breadcrumbs li:hover button {
29
- color: var(--color-fg-default);
30
- background-color: var(--color-bg-contextual);
31
- cursor: pointer;
32
- }
33
-
34
- .breadcrumbs li[aria-current='page'],
35
- .breadcrumbs li:last-of-type {
36
- color: var(--color-fg-default);
37
- cursor: default;
38
- }
39
-
40
- .breadcrumbs li[aria-current='page'] button,
41
- .breadcrumbs li:last-of-type button {
42
- background-color: var(--color-bg-contextual) !important;
43
- font-weight: var(--font-weight-medium);
44
- }
45
-
46
- .separator {
47
- display: flex;
48
- align-items: center;
49
- padding: 0 var(--spacing-xs);
50
- color: var(--color-fg-subtle);
51
- font-size: var(--font-size-md);
52
- }
53
-
54
- .breadcrumbs li svg {
55
- inline-size: var(--icon-size-sm);
56
- block-size: var(--icon-size-sm);
57
- }
58
-
59
- .breadcrumbs a,
60
- .breadcrumbs button,
61
- .breadcrumbs [role='link'] {
62
- all: unset;
63
- color: inherit;
64
- border-radius: var(--border-radius-default);
65
- background-color: var(--color-bg-contextual-subtle);
66
- padding: var(--spacing-xxs) var(--spacing-sm);
67
- }
68
-
69
- .breadcrumbs a:focus-visible,
70
- .breadcrumbs button:focus-visible,
71
- .breadcrumbs [role='link']:focus-visible {
72
- outline: none;
73
- box-shadow: var(--focus-ring);
74
- }
75
-
76
- .breadcrumbs [aria-disabled='true'],
77
- .breadcrumbs .is-disabled {
78
- color: var(--color-disabled-fg);
79
- pointer-events: none;
80
- }