@dbcdk/react-components 0.0.12 → 0.0.14

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 (76) hide show
  1. package/dist/components/accordion/Accordion.d.ts +2 -2
  2. package/dist/components/accordion/Accordion.js +34 -41
  3. package/dist/components/accordion/Accordion.module.css +13 -72
  4. package/dist/components/accordion/components/AccordionRow.d.ts +10 -0
  5. package/dist/components/accordion/components/AccordionRow.js +51 -0
  6. package/dist/components/accordion/components/AccordionRow.module.css +82 -0
  7. package/dist/components/breadcrumbs/Breadcrumbs.module.css +0 -1
  8. package/dist/components/button/Button.module.css +7 -7
  9. package/dist/components/card/Card.d.ts +9 -18
  10. package/dist/components/card/Card.js +34 -23
  11. package/dist/components/card/Card.module.css +22 -87
  12. package/dist/components/card/components/CardMeta.d.ts +15 -0
  13. package/dist/components/card/components/CardMeta.js +20 -0
  14. package/dist/components/card/components/CardMeta.module.css +51 -0
  15. package/dist/components/card-container/CardContainer.js +1 -1
  16. package/dist/components/card-container/CardContainer.module.css +3 -1
  17. package/dist/components/chip/Chip.module.css +7 -2
  18. package/dist/components/datetime-picker/DateTimePicker.d.ts +33 -8
  19. package/dist/components/datetime-picker/DateTimePicker.js +119 -78
  20. package/dist/components/datetime-picker/DateTimePicker.module.css +2 -0
  21. package/dist/components/datetime-picker/dateTimeHelpers.d.ts +15 -3
  22. package/dist/components/datetime-picker/dateTimeHelpers.js +137 -23
  23. package/dist/components/filter-field/FilterField.js +21 -6
  24. package/dist/components/filter-field/FilterField.module.css +5 -5
  25. package/dist/components/forms/form-select/FormSelect.d.ts +35 -0
  26. package/dist/components/forms/form-select/FormSelect.js +86 -0
  27. package/dist/components/forms/form-select/FormSelect.module.css +236 -0
  28. package/dist/components/forms/input/Input.d.ts +0 -3
  29. package/dist/components/forms/input/Input.js +0 -3
  30. package/dist/components/forms/input/Input.module.css +7 -7
  31. package/dist/components/forms/radio-buttons/RadioButtons.module.css +1 -0
  32. package/dist/components/forms/select/Select.js +55 -16
  33. package/dist/components/interval-select/IntervalSelect.d.ts +9 -2
  34. package/dist/components/interval-select/IntervalSelect.js +21 -6
  35. package/dist/components/menu/Menu.d.ts +11 -14
  36. package/dist/components/menu/Menu.js +18 -33
  37. package/dist/components/menu/Menu.module.css +2 -2
  38. package/dist/components/overlay/modal/Modal.module.css +2 -1
  39. package/dist/components/overlay/modal/provider/ModalProvider.js +1 -3
  40. package/dist/components/overlay/side-panel/SidePanel.js +1 -1
  41. package/dist/components/overlay/side-panel/SidePanel.module.css +1 -1
  42. package/dist/components/page-layout/PageLayout.d.ts +16 -4
  43. package/dist/components/page-layout/PageLayout.js +57 -28
  44. package/dist/components/page-layout/PageLayout.module.css +153 -33
  45. package/dist/components/popover/Popover.d.ts +17 -4
  46. package/dist/components/popover/Popover.js +147 -65
  47. package/dist/components/popover/Popover.module.css +5 -0
  48. package/dist/components/split-pane/SplitPane.d.ts +10 -24
  49. package/dist/components/split-pane/SplitPane.js +83 -54
  50. package/dist/components/split-pane/SplitPane.module.css +11 -6
  51. package/dist/components/split-pane/provider/SplitPaneContext.js +5 -11
  52. package/dist/components/sticky-footer-layout/StickyFooterLayout.d.ts +3 -8
  53. package/dist/components/sticky-footer-layout/StickyFooterLayout.js +57 -20
  54. package/dist/components/table/Table.d.ts +3 -8
  55. package/dist/components/table/Table.js +37 -76
  56. package/dist/components/table/Table.module.css +45 -42
  57. package/dist/components/table/{tanstack.d.ts → TanstackTable.d.ts} +5 -12
  58. package/dist/components/table/TanstackTable.js +84 -0
  59. package/dist/components/table/components/column-resizer/ColumnResizer.js +1 -1
  60. package/dist/components/table/components/column-resizer/ColumnResizer.module.css +17 -7
  61. package/dist/components/table/table.utils.d.ts +17 -0
  62. package/dist/components/table/table.utils.js +61 -0
  63. package/dist/components/table/tanstackTable.utils.d.ts +22 -0
  64. package/dist/components/table/tanstackTable.utils.js +104 -0
  65. package/dist/components/tabs/Tabs.d.ts +35 -12
  66. package/dist/components/tabs/Tabs.js +114 -26
  67. package/dist/components/tabs/Tabs.module.css +158 -71
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.js +1 -1
  70. package/dist/src/styles/styles.css +0 -1
  71. package/dist/styles/styles.css +0 -1
  72. package/dist/styles/themes/dbc/base.css +136 -0
  73. package/dist/styles/themes/dbc/dark.css +39 -202
  74. package/dist/styles/themes/dbc/light.css +17 -174
  75. package/package.json +4 -4
  76. package/dist/components/table/tanstack.js +0 -214
@@ -1,35 +1,123 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useCallback, useEffect, useMemo, useState } from 'react';
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Children, isValidElement, useCallback, useEffect, useId, useMemo, useState, } from 'react';
4
3
  import styles from './Tabs.module.css';
5
4
  import { Chip } from '../chip/Chip';
6
5
  import { Headline } from '../headline/Headline';
7
- export function Tabs({ variant, header, tabs, activeId, onTabChange, manuallySetActiveTab, addition, panelStyle, }) {
6
+ const TabsItem = (_props) => {
7
+ // This never renders directly; parent consumes it.
8
+ return _jsx(_Fragment, {});
9
+ };
10
+ TabsItem.__TABS_SLOT__ = 'Item';
11
+ function getFirstEnabledId(items) {
8
12
  var _a;
9
- const [currentId, setCurrentId] = useState(activeId);
13
+ return (_a = items.find(t => !t.hidden && !t.disabled)) === null || _a === void 0 ? void 0 : _a.id;
14
+ }
15
+ function normalizeFromChildren(children) {
16
+ const items = [];
17
+ Children.forEach(children, child => {
18
+ if (!isValidElement(child))
19
+ return;
20
+ const t = child.type;
21
+ if ((t === null || t === void 0 ? void 0 : t.__TABS_SLOT__) !== 'Item')
22
+ return;
23
+ const props = child.props;
24
+ items.push({
25
+ id: props.id,
26
+ header: props.header,
27
+ headerIcon: props.headerIcon,
28
+ disabled: props.disabled,
29
+ hidden: props.hidden,
30
+ badge: props.badge,
31
+ content: props.children,
32
+ });
33
+ });
34
+ return items;
35
+ }
36
+ export function Tabs({ header, variant, panelStyle = false, tabs, value, defaultValue, onValueChange, addition, children, }) {
37
+ const uid = useId();
38
+ // Data API wins if provided; otherwise parse <Tabs.Item>
39
+ const sourceTabs = useMemo(() => {
40
+ if (tabs && tabs.length)
41
+ return tabs;
42
+ return normalizeFromChildren(children);
43
+ }, [tabs, children]);
44
+ const visibleTabs = useMemo(() => sourceTabs.filter(t => !t.hidden), [sourceTabs]);
45
+ const isControlled = value !== undefined;
46
+ const [internalValue, setInternalValue] = useState(() => {
47
+ return defaultValue !== null && defaultValue !== void 0 ? defaultValue : getFirstEnabledId(visibleTabs);
48
+ });
49
+ const currentValue = isControlled ? value : internalValue;
50
+ const activeIndex = useMemo(() => {
51
+ if (!visibleTabs.length)
52
+ return -1;
53
+ const idx = visibleTabs.findIndex(t => t.id === currentValue);
54
+ return idx >= 0 ? idx : 0;
55
+ }, [visibleTabs, currentValue]);
56
+ const activeTab = activeIndex >= 0 ? visibleTabs[activeIndex] : undefined;
57
+ const setValue = useCallback((nextId) => {
58
+ const idx = visibleTabs.findIndex(t => t.id === nextId);
59
+ const tab = idx >= 0 ? visibleTabs[idx] : undefined;
60
+ if (!tab || tab.disabled)
61
+ return;
62
+ if (!isControlled)
63
+ setInternalValue(nextId);
64
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(nextId, tab, idx);
65
+ }, [visibleTabs, isControlled, onValueChange]);
66
+ // If current tab disappears (hidden/removed) or becomes disabled, recover to first enabled.
10
67
  useEffect(() => {
11
- if (activeId !== undefined) {
12
- setCurrentId(activeId);
68
+ if (!visibleTabs.length)
69
+ return;
70
+ const current = currentValue;
71
+ const stillValid = visibleTabs.some(t => t.id === current && !t.disabled);
72
+ if (stillValid)
73
+ return;
74
+ const next = getFirstEnabledId(visibleTabs);
75
+ if (next === undefined)
76
+ return;
77
+ setValue(next);
78
+ // setValue already calls onValueChange; fine.
79
+ // For controlled usage, parent should update `value` accordingly.
80
+ // If parent doesn't, it will remain "stuck" by design.
81
+ }, [visibleTabs, currentValue, setValue]);
82
+ // Keyboard: roving tabindex + select-on-arrow
83
+ const onKeyDownTab = useCallback((e, index) => {
84
+ var _a;
85
+ const enabled = visibleTabs.filter(t => !t.disabled);
86
+ if (!enabled.length)
87
+ return;
88
+ // Map current index -> enabled index
89
+ const currentId = (_a = visibleTabs[index]) === null || _a === void 0 ? void 0 : _a.id;
90
+ const currentEnabledIndex = enabled.findIndex(t => t.id === currentId);
91
+ const focusAndSelect = (enabledIndex) => {
92
+ const nextTab = enabled[enabledIndex];
93
+ if (!nextTab)
94
+ return;
95
+ const btn = document.getElementById(`${uid}-tab-${String(nextTab.id)}`);
96
+ btn === null || btn === void 0 ? void 0 : btn.focus();
97
+ setValue(nextTab.id);
98
+ };
99
+ if (e.key === 'ArrowRight') {
100
+ e.preventDefault();
101
+ focusAndSelect((currentEnabledIndex + 1) % enabled.length);
13
102
  }
14
- }, [activeId]);
15
- const setActiveTab = useCallback((id) => {
16
- setCurrentId(id);
17
- }, [setCurrentId]);
18
- const handleTabChange = useCallback((index, tab) => {
19
- if (!manuallySetActiveTab) {
20
- setActiveTab(tab.id);
103
+ else if (e.key === 'ArrowLeft') {
104
+ e.preventDefault();
105
+ focusAndSelect((currentEnabledIndex - 1 + enabled.length) % enabled.length);
21
106
  }
22
- onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange(index, tab);
23
- }, [onTabChange, manuallySetActiveTab, setActiveTab]);
24
- const filteredTabs = useMemo(() => tabs.filter(tab => !tab.hidden), [tabs]);
25
- const activeIndex = useMemo(() => {
26
- var _a, _b;
27
- return (_a = filteredTabs.findIndex(tab => tab.id === currentId)) !== null && _a !== void 0 ? _a : (_b = filteredTabs[0]) === null || _b === void 0 ? void 0 : _b.id;
28
- }, [currentId, filteredTabs]);
29
- useEffect(() => {
30
- if (activeIndex === -1 && filteredTabs.length > 0) {
31
- setActiveTab(filteredTabs[0].id);
107
+ else if (e.key === 'Home') {
108
+ e.preventDefault();
109
+ focusAndSelect(0);
110
+ }
111
+ else if (e.key === 'End') {
112
+ e.preventDefault();
113
+ focusAndSelect(enabled.length - 1);
32
114
  }
33
- }, [activeIndex, filteredTabs, setActiveTab]);
34
- return (_jsxs("div", { className: "grow-container", children: [header && (_jsxs("div", { className: styles.headerContainer, children: [_jsx(Headline, { disableMargin: true, size: 2, children: header }), addition] })), _jsxs("div", { className: `${styles.tabs} ${styles[variant]} ${panelStyle ? styles.panelStyle : ''}`, children: [_jsx("div", { className: styles.tabList, children: filteredTabs.map((tab, index) => (_jsx("div", { "data-index": index, className: `${styles.tab} ${activeIndex === index ? styles.active : ''}`, children: _jsxs("button", { className: `${styles.tabButton}`, onClick: () => handleTabChange(index, tab), disabled: tab.disabled, children: [_jsx("span", { className: styles.icon, children: tab.headerIcon }), _jsx("span", { className: styles.header, children: tab.header }), tab.badge !== undefined && tab.badge > 0 && (_jsxs("span", { className: styles.badge, children: [' ', _jsx(Chip, { severity: "info", size: "sm", children: tab.badge.toLocaleString('da-DK') })] }))] }) }, index))) }), _jsx("div", { className: `${styles.tabContent} scrollable`, children: (_a = filteredTabs[activeIndex]) === null || _a === void 0 ? void 0 : _a.content })] })] }));
115
+ }, [uid, visibleTabs, setValue]);
116
+ return (_jsxs("div", { className: styles.root, children: [header ? (_jsxs("div", { className: styles.headerContainer, children: [_jsx(Headline, { disableMargin: true, size: 2, children: header }), addition] })) : null, _jsxs("div", { className: `${styles.tabs} ${styles[variant]} ${panelStyle ? styles.panelStyle : ''}`, children: [_jsx("div", { className: styles.tabList, role: "tablist", "aria-label": header !== null && header !== void 0 ? header : 'Tabs', children: visibleTabs.map((tab, index) => {
117
+ const selected = index === activeIndex;
118
+ const tabDomId = `${uid}-tab-${String(tab.id)}`;
119
+ const panelDomId = `${uid}-panel-${String(tab.id)}`;
120
+ return (_jsx("div", { className: `${styles.tab} ${selected ? styles.active : ''}`, children: _jsxs("button", { id: tabDomId, type: "button", className: styles.tabButton, role: "tab", "aria-selected": selected, "aria-controls": panelDomId, tabIndex: selected ? 0 : -1, disabled: tab.disabled, onClick: () => setValue(tab.id), onKeyDown: e => onKeyDownTab(e, index), children: [tab.headerIcon ? _jsx("span", { className: styles.icon, children: tab.headerIcon }) : null, _jsx("span", { className: styles.label, children: tab.header }), tab.badge !== undefined && tab.badge > 0 ? (_jsx("span", { className: styles.badge, children: _jsx(Chip, { severity: "info", size: "sm", children: tab.badge.toLocaleString('da-DK') }) })) : null] }) }, tab.id));
121
+ }) }), _jsx("div", { id: activeTab ? `${uid}-panel-${String(activeTab.id)}` : undefined, role: "tabpanel", "aria-labelledby": activeTab ? `${uid}-tab-${String(activeTab.id)}` : undefined, className: styles.tabContent, children: activeTab === null || activeTab === void 0 ? void 0 : activeTab.content })] })] }));
35
122
  }
123
+ Tabs.Item = TabsItem;
@@ -1,113 +1,200 @@
1
- .tabs {
1
+ .root {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- flex-grow: 1;
5
- gap: var(--spacing-xl);
6
- overflow: hidden;
4
+ min-width: 0;
7
5
  }
8
6
 
9
- /* ========== Filled variant ========== */
10
- .tabs.filled .tab.active {
11
- background: var(--opac-bg-brand);
12
- color: var(--color-brand);
13
- border: var(--border-width-thin) solid var(--opac-bg-dark);
14
- border-block-end: 0;
15
- }
16
- .tabs.filled {
17
- gap: 0;
18
- }
19
- .tabs.filled .tabList {
20
- border-start-start-radius: var(--border-radius-default);
21
- border-start-end-radius: var(--border-radius-default);
22
- inline-size: fit-content;
23
- }
24
- .tabs.filled .tab {
25
- border: var(--border-width-thin) solid transparent;
26
- color: var(--color-fg-muted);
27
- font-size: var(--font-size-sm);
28
- z-index: 3;
29
- transition:
30
- background-color var(--transition-fast) var(--ease-standard),
31
- color var(--transition-fast) var(--ease-standard);
32
- border-start-start-radius: var(--border-radius-default);
33
- border-start-end-radius: var(--border-radius-default);
34
- }
35
- .tabs.filled .tab:not(.active):hover {
36
- color: var(--color-brand);
7
+ .headerContainer {
8
+ display: flex;
9
+ justify-content: space-between;
10
+ align-items: center;
11
+ padding-block: var(--spacing-lg);
12
+ gap: var(--spacing-md);
37
13
  }
38
- .tabs.filled .tabContent {
39
- border: var(--border-width-thin) solid var(--opac-bg-dark);
40
- background: var(--color-bg-surface);
41
- padding: var(--spacing-lg);
14
+
15
+ /* Outer wrapper for tablist + content */
16
+ .tabs {
17
+ display: flex;
18
+ flex-direction: column;
42
19
  flex-grow: 1;
43
- overflow: auto;
20
+ overflow: hidden;
21
+ min-height: 0;
44
22
  }
45
23
 
46
- /* ========== Panel style variant ========== */
47
- .panelStyle .tabList {
48
- border: var(--border-width-thin) solid var(--color-border-default);
49
- border-block-end: 0;
24
+ /* Tablist */
25
+ .tabList {
26
+ display: flex;
27
+ flex-wrap: wrap;
28
+ min-width: 0;
50
29
  }
51
- .panelStyle .tab.active {
52
- border: 0 !important;
30
+
31
+ /* Individual tab wrapper */
32
+ .tab {
33
+ display: flex;
34
+ flex-direction: column;
35
+ border-radius: 0;
36
+ border-block-end: 2px solid var(--color-border-default);
53
37
  }
54
- .panelStyle .tab {
55
- border: 0 !important;
38
+
39
+ .active {
40
+ border-block-end-color: var(--color-brand);
56
41
  }
57
42
 
43
+ /* Button */
58
44
  .tabButton {
59
- text-transform: var(--tab-label-transform);
60
45
  font-size: var(--font-size-sm);
61
46
  color: inherit;
47
+
62
48
  display: inline-flex;
63
- white-space: nowrap;
64
- background: none;
65
49
  align-items: center;
66
50
  justify-content: center;
67
51
  gap: var(--spacing-xs);
52
+
53
+ white-space: nowrap;
54
+
55
+ background: none;
68
56
  border: 0;
69
57
  border-radius: 0;
70
- padding-block: calc(var(--spacing-sm) + var(--density));
58
+
59
+ padding-block: var(--spacing-sm);
71
60
  padding-inline: var(--spacing-md);
61
+
72
62
  cursor: pointer;
63
+
73
64
  transition:
74
- border var(--transition-normal) var(--ease-standard),
75
65
  color var(--transition-fast) var(--ease-standard),
76
- background-color var(--transition-fast) var(--ease-standard);
66
+ background-color var(--transition-fast) var(--ease-standard),
67
+ border-color var(--transition-fast) var(--ease-standard);
77
68
  }
69
+
78
70
  .tabButton:focus-visible {
79
71
  outline: none;
80
72
  box-shadow: var(--focus-ring);
81
73
  }
82
74
 
83
- /* ========== Tablist and tabs ========== */
84
- .tabList {
85
- display: flex;
86
- flex-wrap: wrap;
75
+ .tabButton:disabled {
76
+ cursor: not-allowed;
77
+ color: var(--color-disabled-fg);
87
78
  }
88
79
 
89
- .tab {
90
- display: flex;
91
- flex-direction: column;
92
- border-radius: 0;
80
+ /* Icon + label */
81
+ .icon {
82
+ display: inline-flex;
83
+ align-items: center;
84
+ color: inherit;
85
+ }
86
+
87
+ .icon svg {
88
+ inline-size: var(--icon-size-md);
89
+ block-size: var(--icon-size-md);
90
+ }
91
+
92
+ .label {
93
+ display: inline-block;
94
+ }
95
+
96
+ .badge {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ }
100
+
101
+ /* Content panel */
102
+ .tabContent {
103
+ flex: 1 1 auto;
104
+ min-height: 0;
105
+ overflow: auto;
106
+ }
107
+
108
+ /* =========================
109
+ Filled variant
110
+ ========================= */
111
+
112
+ .filled {
113
+ gap: 0;
114
+ }
115
+
116
+ .filled .tabList {
117
+ border-start-start-radius: var(--border-radius-default);
118
+ border-start-end-radius: var(--border-radius-default);
119
+ inline-size: fit-content;
120
+ }
121
+
122
+ .filled .tab {
123
+ border: var(--border-width-thin) solid transparent;
124
+ border-block-end: 0;
125
+ color: var(--color-fg-muted);
126
+ z-index: 3;
127
+ border-start-start-radius: var(--border-radius-default);
128
+ border-start-end-radius: var(--border-radius-default);
129
+ transition:
130
+ background-color var(--transition-fast) var(--ease-standard),
131
+ color var(--transition-fast) var(--ease-standard),
132
+ border-color var(--transition-fast) var(--ease-standard);
133
+ }
134
+
135
+ .filled .tab:not(.active):hover {
136
+ color: var(--color-brand);
137
+ }
138
+
139
+ .filled .tab.active {
140
+ background: var(--opac-bg-brand);
141
+ color: var(--color-brand);
142
+ border-color: var(--opac-bg-dark);
143
+ }
144
+
145
+ .filled .tabContent {
146
+ border: var(--border-width-thin) solid var(--opac-bg-dark);
147
+ background: var(--color-bg-surface);
148
+ padding: var(--spacing-lg);
149
+ }
150
+
151
+ /* =========================
152
+ Outlined variant
153
+ ========================= */
154
+
155
+ .outlined {
156
+ gap: var(--spacing-md);
157
+ }
158
+
159
+ .outlined .tab {
160
+ color: var(--color-fg-muted);
93
161
  border-block-end: 2px solid var(--color-border-default);
162
+ transition: color var(--transition-fast) var(--ease-standard);
163
+ }
164
+
165
+ .outlined .tab:not(.active):hover {
166
+ color: var(--color-brand);
94
167
  }
95
- .tab.active {
168
+
169
+ .outlined .tab.active {
170
+ color: var(--color-brand);
96
171
  border-block-end-color: var(--color-brand);
97
172
  }
98
173
 
99
- .tab .icon {
100
- display: contents;
101
- color: inherit;
174
+ .outlined .tabContent {
175
+ /* plain panel by default */
176
+ background: transparent;
177
+ padding: 0;
102
178
  }
103
- .tab .icon svg {
104
- inline-size: var(--icon-size-md);
105
- block-size: var(--icon-size-md);
179
+
180
+ /* =========================
181
+ Panel style modifier
182
+ ========================= */
183
+
184
+ .panelStyle .tabList {
185
+ border: var(--border-width-thin) solid var(--color-border-default);
186
+ border-block-end: 0;
106
187
  }
107
188
 
108
- .headerContainer {
109
- display: flex;
110
- justify-content: space-between;
111
- align-items: center;
112
- padding-block: var(--spacing-lg);
189
+ /* When panelStyle is on, tabs look “embedded” (no bottom border indicators) */
190
+ .panelStyle .tab {
191
+ border-block-end: 0;
192
+ }
193
+
194
+ /* In filled mode, keep the filled content panel visuals (already handled above).
195
+ In outlined mode with panelStyle, give the content a panel container too. */
196
+ .panelStyle.outlined .tabContent {
197
+ border: var(--border-width-thin) solid var(--color-border-default);
198
+ background: var(--color-bg-surface);
199
+ padding: var(--spacing-lg);
113
200
  }
package/dist/index.d.ts CHANGED
@@ -53,7 +53,7 @@ export * from './hooks/useTableSettings';
53
53
  export * from './components/table/components/table-settings/TableSettings';
54
54
  export * from './components/filtering/chip-multi-toggle/ChipMultiToggle';
55
55
  export * from './components/forms/checkbox-group/CheckboxGroup';
56
- export * from './components/table/tanstack';
56
+ export * from './components/table/TanstackTable';
57
57
  export * from './components/overlay/side-panel/SidePanel';
58
58
  export * from './components/overlay/side-panel/useSidePanel';
59
59
  export * from './components/forms/input-container/InputContainer';
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ export * from './hooks/useTableSettings';
53
53
  export * from './components/table/components/table-settings/TableSettings';
54
54
  export * from './components/filtering/chip-multi-toggle/ChipMultiToggle';
55
55
  export * from './components/forms/checkbox-group/CheckboxGroup';
56
- export * from './components/table/tanstack';
56
+ export * from './components/table/TanstackTable';
57
57
  export * from './components/overlay/side-panel/SidePanel';
58
58
  export * from './components/overlay/side-panel/useSidePanel';
59
59
  export * from './components/forms/input-container/InputContainer';
@@ -29,7 +29,6 @@
29
29
  body {
30
30
  color: var(--color-fg-default);
31
31
  background-color: var(--color-bg-page);
32
- --density: var(--density-comfortable);
33
32
  font-size: var(--font-size-sm);
34
33
  margin: 0;
35
34
  }
@@ -29,7 +29,6 @@
29
29
  body {
30
30
  color: var(--color-fg-default);
31
31
  background-color: var(--color-bg-page);
32
- --density: var(--density-comfortable);
33
32
  font-size: var(--font-size-sm);
34
33
  margin: 0;
35
34
  }
@@ -0,0 +1,136 @@
1
+ :root {
2
+ /* ==========================================================================
3
+ * NON-COLOR SYSTEM TOKENS (SHARED)
4
+ * ======================================================================= */
5
+
6
+ /* Border widths */
7
+ --border-width-thin: 1px;
8
+ --border-width-medium: 2px;
9
+ --border-width-thick: 4px;
10
+
11
+ /* ===== Spacing & Layout ===== */
12
+ --spacing-2xs: 2px;
13
+ --spacing-xxs: 4px;
14
+ --spacing-xs: 8px;
15
+ --spacing-sm: 12px;
16
+ --spacing-md: 16px;
17
+ --spacing-lg: 24px;
18
+ --spacing-xl: 32px;
19
+ --spacing-2xl: 48px;
20
+ --spacing-3xl: 64px;
21
+ --spacing-4xl: 96px;
22
+
23
+ /* Breakpoints & Containers */
24
+ --bp-xs: 480px;
25
+ --bp-sm: 640px;
26
+ --bp-md: 768px;
27
+ --bp-lg: 1024px;
28
+ --bp-xl: 1280px;
29
+
30
+ --container-xs: 480px;
31
+ --container-sm: 640px;
32
+ --container-md: 768px;
33
+ --container-lg: 1024px;
34
+ --container-xl: 1280px;
35
+
36
+ /* ===== Sizing ===== */
37
+ --icon-size-sm: 16px;
38
+ --icon-size-md: 20px;
39
+ --icon-size-lg: 24px;
40
+
41
+ --component-size-xxs: 12px;
42
+ --component-size-xs: 20px;
43
+ --component-size-sm: 30px;
44
+ --component-size-md: 36px;
45
+ --component-size-lg: 44px;
46
+ --component-size-xl: 435px;
47
+ --sidebar-width: 180px;
48
+
49
+ /* Border Radius */
50
+ --border-radius-none: 0px;
51
+ --border-radius-default: 4px;
52
+ --border-radius-rounded: 32px;
53
+ --border-radius-round: 50%;
54
+ --border-radius-sm: 2px;
55
+ --border-radius-md: 6px;
56
+ --border-radius-lg: 8px;
57
+ --border-radius-xl: 12px;
58
+
59
+ /* Typography */
60
+ --text-max-width: 65ch;
61
+
62
+ --font-family:
63
+ Roboto, Inter, ui-sans-serif, system-ui, 'Segoe UI', 'Helvetica Neue', Arial,
64
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
65
+
66
+ --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
67
+
68
+ --font-size-xs: 12px;
69
+ --font-size-sm: 14px;
70
+ --font-size-md: 16px;
71
+ --font-size-lg: 18px;
72
+ --font-size-xl: 24px;
73
+ --font-size-2xl: 30px;
74
+
75
+ --font-weight-default: 400;
76
+ --font-weight-medium: 500;
77
+ --font-weight-semibold: 600;
78
+ --font-weight-bold: 700;
79
+ --font-weight-extrabold: 800;
80
+
81
+ --line-height-tight: 1.25;
82
+ --line-height-normal: 1.5;
83
+ --line-height-relaxed: 1.75;
84
+
85
+ --letter-spacing-tight: -0.01em;
86
+ --letter-spacing-normal: 0;
87
+ --letter-spacing-wide: 0.02em;
88
+
89
+ /* Motion */
90
+ --transition-fast: 150ms;
91
+ --transition-normal: 250ms;
92
+ --transition-slow: 400ms;
93
+
94
+ --ease-standard: cubic-bezier(0.2, 0, 0.2, 1);
95
+ --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
96
+ --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
97
+ --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
98
+
99
+ /* Elevation & Overlay */
100
+ --overlay-scrim: rgba(0, 0, 0, 0.5);
101
+ --backdrop-blur: 8px;
102
+
103
+ /* Layers */
104
+ --z-base: 0;
105
+
106
+ --z-dropdown: 1000;
107
+ --z-sticky: 1100;
108
+ --z-banner: 1150;
109
+ --z-backdrop-drawer: 1145;
110
+ --z-drawer: 1200;
111
+ --z-backdrop-modal: 1245;
112
+ --z-modal: 1250;
113
+ --z-popover: 1300;
114
+ --z-tooltip: 1400;
115
+ --z-toast: 1500;
116
+
117
+ /* Skeletons & loaders (structure shared; colors overridden per theme if desired) */
118
+ --spinner-size: 16px;
119
+ --spinner-stroke: 2px;
120
+
121
+ /* Logical spacing */
122
+ --space-inline-sm: 8px;
123
+ }
124
+
125
+ /* Reduced motion (shared) */
126
+ @media (prefers-reduced-motion: reduce) {
127
+ :root {
128
+ --transition-fast: 1ms;
129
+ --transition-normal: 1ms;
130
+ --transition-slow: 1ms;
131
+ }
132
+ * {
133
+ animation: none !important;
134
+ transition-duration: 1ms !important;
135
+ }
136
+ }