@dbcdk/react-components 0.0.95 → 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.
- package/dist/components/alert/Alert.d.ts +13 -0
- package/dist/components/forms/input/Input.d.ts +2 -1
- package/dist/components/forms/input-container/InputContainer.d.ts +3 -1
- package/dist/components/forms/text-area/Textarea.d.ts +1 -1
- package/dist/components/stack/Stack.d.ts +11 -3
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/Table.types.d.ts +3 -0
- package/dist/components/table/components/TableHeader.d.ts +2 -1
- package/dist/index.cjs +12750 -0
- package/dist/index.css +7149 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12641 -78
- package/dist/tanstack.cjs +2674 -0
- package/dist/tanstack.css +1267 -0
- package/dist/tanstack.js +2650 -3
- package/dist/themes/dbc.css +3 -0
- package/dist/themes/forfatterweb.css +2 -0
- package/package.json +11 -10
- package/dist/assets/logo.js +0 -2
- package/dist/components/__stories__/_data/table.d.ts +0 -15
- package/dist/components/__stories__/_data/table.js +0 -55
- package/dist/components/__stories__/_data/tabs.d.ts +0 -9
- package/dist/components/__stories__/_data/tabs.js +0 -31
- package/dist/components/__stories__/story-components/Colors.d.ts +0 -11
- package/dist/components/__stories__/story-components/Colors.js +0 -96
- package/dist/components/__stories__/story-components/Colors.module.css +0 -27
- package/dist/components/__stories__/story-components/ComponentSizes.d.ts +0 -2
- package/dist/components/__stories__/story-components/ComponentSizes.js +0 -26
- package/dist/components/__stories__/story-components/Elevation.d.ts +0 -2
- package/dist/components/__stories__/story-components/Elevation.js +0 -49
- package/dist/components/__stories__/story-components/Flex.d.ts +0 -2
- package/dist/components/__stories__/story-components/Flex.js +0 -177
- package/dist/components/__stories__/story-components/Flex.module.css +0 -317
- package/dist/components/__stories__/story-components/Spacing.d.ts +0 -6
- package/dist/components/__stories__/story-components/Spacing.js +0 -76
- package/dist/components/__stories__/story-components/Spacing.module.css +0 -154
- package/dist/components/accordion/Accordion.js +0 -70
- package/dist/components/accordion/Accordion.module.css +0 -28
- package/dist/components/accordion/components/AccordionRow.js +0 -53
- package/dist/components/accordion/components/AccordionRow.module.css +0 -90
- package/dist/components/app-header/AppHeader.js +0 -5
- package/dist/components/app-header/AppHeader.module.css +0 -74
- package/dist/components/attribute-chip/AttributeChip.js +0 -5
- package/dist/components/attribute-chip/AttributeChip.module.css +0 -65
- package/dist/components/avatar/Avatar.js +0 -48
- package/dist/components/avatar/Avatar.module.css +0 -91
- package/dist/components/breadcrumbs/Breadcrumbs.js +0 -6
- package/dist/components/breadcrumbs/Breadcrumbs.module.css +0 -80
- package/dist/components/button/Button.js +0 -81
- package/dist/components/button/Button.module.css +0 -249
- package/dist/components/button-select/ButtonSelect.js +0 -7
- package/dist/components/button-select/ButtonSelect.module.css +0 -40
- package/dist/components/card/Card.js +0 -71
- package/dist/components/card/Card.module.css +0 -160
- package/dist/components/card/components/CardMeta.js +0 -26
- package/dist/components/card/components/CardMeta.module.css +0 -55
- package/dist/components/card-container/CardContainer.js +0 -6
- package/dist/components/card-container/CardContainer.module.css +0 -61
- package/dist/components/chip/Chip.js +0 -31
- package/dist/components/chip/Chip.module.css +0 -236
- package/dist/components/circle/Circle.js +0 -5
- package/dist/components/circle/Circle.module.css +0 -128
- package/dist/components/clear-button/ClearButton.js +0 -13
- package/dist/components/clear-button/ClearButton.module.css +0 -26
- package/dist/components/code-block/CodeBlock.js +0 -58
- package/dist/components/code-block/CodeBlock.module.css +0 -124
- package/dist/components/copy-button/CopyButton.js +0 -78
- package/dist/components/copy-button/CopyButton.module.css +0 -22
- package/dist/components/datetime-picker/DateTimePicker.js +0 -403
- package/dist/components/datetime-picker/DateTimePicker.module.css +0 -155
- package/dist/components/datetime-picker/dateTimeHelpers.js +0 -248
- package/dist/components/divider/Divider.js +0 -12
- package/dist/components/filter-field/FilterField.js +0 -191
- package/dist/components/filter-field/FilterField.module.css +0 -379
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +0 -52
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +0 -59
- package/dist/components/forms/checkbox/Checkbox.js +0 -26
- package/dist/components/forms/checkbox/Checkbox.module.css +0 -99
- package/dist/components/forms/checkbox-group/CheckboxGroup.js +0 -75
- package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +0 -115
- package/dist/components/forms/form-select/FormSelect.js +0 -86
- package/dist/components/forms/form-select/FormSelect.module.css +0 -236
- package/dist/components/forms/input/Input.js +0 -77
- package/dist/components/forms/input/Input.module.css +0 -468
- package/dist/components/forms/input-container/InputContainer.js +0 -15
- package/dist/components/forms/input-container/InputContainer.module.css +0 -56
- package/dist/components/forms/multi-select/MultiSelect.js +0 -122
- package/dist/components/forms/radio-buttons/RadioButton.js +0 -26
- package/dist/components/forms/radio-buttons/RadioButtonGroup.js +0 -19
- package/dist/components/forms/radio-buttons/RadioButtons.module.css +0 -118
- package/dist/components/forms/select/Select.js +0 -185
- package/dist/components/forms/select/Select.module.css +0 -32
- package/dist/components/forms/text-area/Textarea.js +0 -47
- package/dist/components/forms/text-area/Textarea.module.css +0 -70
- package/dist/components/forms/typeahead/Typeahead.js +0 -668
- package/dist/components/forms/typeahead/Typeahead.module.css +0 -38
- package/dist/components/grid/Grid.js +0 -23
- package/dist/components/grid/Grid.module.css +0 -35
- package/dist/components/headline/CollapsibleHeadline.js +0 -29
- package/dist/components/headline/Headline.js +0 -26
- package/dist/components/headline/Headline.module.css +0 -165
- package/dist/components/hyperlink/Hyperlink.js +0 -40
- package/dist/components/hyperlink/Hyperlink.module.css +0 -107
- package/dist/components/icon/Icon.js +0 -14
- package/dist/components/icon/Icon.module.css +0 -36
- package/dist/components/interval-select/IntervalSelect.js +0 -99
- package/dist/components/json-viewer/HighlightedText.js +0 -6
- package/dist/components/json-viewer/JsonNode.js +0 -30
- package/dist/components/json-viewer/JsonViewer.js +0 -68
- package/dist/components/json-viewer/JsonViewer.module.css +0 -346
- package/dist/components/json-viewer/types.js +0 -1
- package/dist/components/json-viewer/useClipboardStatus.js +0 -11
- package/dist/components/json-viewer/utils.js +0 -125
- package/dist/components/menu/Menu.js +0 -165
- package/dist/components/menu/Menu.module.css +0 -211
- package/dist/components/meta-bar/MetaBar.js +0 -9
- package/dist/components/meta-bar/MetaBar.module.css +0 -27
- package/dist/components/nav-bar/NavBar.js +0 -29
- package/dist/components/nav-bar/NavBar.module.css +0 -200
- package/dist/components/overlay/fade-overlay/FadeOverlay.js +0 -8
- package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +0 -54
- package/dist/components/overlay/modal/Modal.js +0 -115
- package/dist/components/overlay/modal/Modal.module.css +0 -109
- package/dist/components/overlay/modal/provider/ModalProvider.js +0 -73
- package/dist/components/overlay/side-panel/SidePanel.js +0 -83
- package/dist/components/overlay/side-panel/SidePanel.module.css +0 -177
- package/dist/components/overlay/side-panel/useSidePanel.js +0 -11
- package/dist/components/overlay/tooltip/Tooltip.js +0 -17
- package/dist/components/overlay/tooltip/Tooltip.module.css +0 -104
- package/dist/components/overlay/tooltip/TooltipProvider.js +0 -255
- package/dist/components/overlay/tooltip/useTooltipTrigger.js +0 -118
- package/dist/components/page/Page.js +0 -11
- package/dist/components/page/Page.module.css +0 -76
- package/dist/components/page-layout/PageLayout.js +0 -76
- package/dist/components/page-layout/PageLayout.module.css +0 -236
- package/dist/components/page-layout/components/layout-footer/LayoutFooter.js +0 -27
- package/dist/components/page-layout/components/layout-footer/LayoutFooter.module.css +0 -89
- package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.js +0 -14
- package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.module.css +0 -84
- package/dist/components/pagination/Pagination.js +0 -56
- package/dist/components/pagination/Pagination.module.css +0 -25
- package/dist/components/panel/Panel.js +0 -7
- package/dist/components/panel/Panel.module.css +0 -29
- package/dist/components/popover/Popover.js +0 -257
- package/dist/components/popover/Popover.module.css +0 -54
- package/dist/components/search-box/SearchBox.js +0 -170
- package/dist/components/search-box/SearchBox.module.css +0 -21
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +0 -48
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +0 -167
- package/dist/components/sidebar/Sidebar.js +0 -6
- package/dist/components/sidebar/components/SidebarItem.js +0 -8
- package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +0 -63
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +0 -29
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +0 -153
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +0 -260
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +0 -18
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +0 -106
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +0 -26
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +0 -20
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +0 -30
- package/dist/components/sidebar/providers/SidebarProvider.js +0 -229
- package/dist/components/skeleton-loader/SkeletonLoader.js +0 -73
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +0 -13
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +0 -51
- package/dist/components/split-button/SplitButton.js +0 -10
- package/dist/components/split-button/SplitButton.module.css +0 -32
- package/dist/components/split-pane/SplitPane.js +0 -107
- package/dist/components/split-pane/SplitPane.module.css +0 -111
- package/dist/components/split-pane/provider/SplitPaneContext.js +0 -124
- package/dist/components/stack/Stack.js +0 -19
- package/dist/components/state-page/StatePage.js +0 -20
- package/dist/components/state-page/StatePage.module.css +0 -9
- package/dist/components/state-page/empty.js +0 -2
- package/dist/components/state-page/error.js +0 -2
- package/dist/components/state-page/notFound.js +0 -2
- package/dist/components/sticky-footer-layout/StickyFooterLayout.js +0 -64
- package/dist/components/table/Table.js +0 -50
- package/dist/components/table/Table.module.css +0 -536
- package/dist/components/table/Table.types.js +0 -1
- package/dist/components/table/TanstackTable.js +0 -111
- package/dist/components/table/components/TableBody.js +0 -10
- package/dist/components/table/components/TableHeader.js +0 -7
- package/dist/components/table/components/TableHeaderCell.js +0 -24
- package/dist/components/table/components/TableLoadingBody.js +0 -26
- package/dist/components/table/components/TablePagination.js +0 -1
- package/dist/components/table/components/TableRow.js +0 -54
- package/dist/components/table/components/TableSelectionCell.js +0 -16
- package/dist/components/table/components/column-resizer/ColumnResizer.js +0 -5
- package/dist/components/table/components/column-resizer/ColumnResizer.module.css +0 -22
- package/dist/components/table/components/empty-state/EmptyState.js +0 -23
- package/dist/components/table/components/empty-state/EmptyState.module.css +0 -4
- package/dist/components/table/components/table-settings/TableSettings.js +0 -63
- package/dist/components/table/hooks/useTableRowInteractions.js +0 -30
- package/dist/components/table/table.classes.js +0 -23
- package/dist/components/table/table.utils.js +0 -47
- package/dist/components/table/tanstackTable.utils.js +0 -175
- package/dist/components/tabs/Tabs.js +0 -125
- package/dist/components/tabs/Tabs.module.css +0 -204
- package/dist/components/theme-button/ThemeButton.js +0 -23
- package/dist/components/toast/Toast.js +0 -20
- package/dist/components/toast/Toast.module.css +0 -161
- package/dist/components/toast/provider/ToastProvider.js +0 -70
- package/dist/components/user-display/UserDisplay.js +0 -6
- package/dist/components/user-display/UserDisplay.module.css +0 -25
- package/dist/constants/severity.js +0 -24
- package/dist/constants/severity.types.js +0 -1
- package/dist/constants/sizes.js +0 -7
- package/dist/hooks/useDeviceSize.js +0 -32
- package/dist/hooks/useListNavigation.js +0 -234
- package/dist/hooks/usePagination.js +0 -140
- package/dist/hooks/useSorting.js +0 -118
- package/dist/hooks/useTableData.js +0 -45
- package/dist/hooks/useTableSelection.js +0 -164
- package/dist/hooks/useTableSettings.js +0 -71
- package/dist/hooks/useTheme.js +0 -66
- package/dist/hooks/useTimeDuration.js +0 -68
- package/dist/hooks/useViewportFill.js +0 -77
- package/dist/styles/animation.js +0 -5
- package/dist/styles/themes/types.js +0 -1
- package/dist/types/a11y-props.types.js +0 -1
- package/dist/types/sizes.types.js +0 -1
- package/dist/utils/arrays/nested-filtering.js +0 -48
- package/dist/utils/date/formatDate.js +0 -51
- package/dist/utils/localStorage.utils.js +0 -78
- package/dist/utils/text/get-highlighted-segments.js +0 -46
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
margin-inline: auto;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
gap: 2rem;
|
|
6
|
-
padding: 1.5rem;
|
|
7
|
-
color: var(--color-text);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.header {
|
|
11
|
-
display: grid;
|
|
12
|
-
gap: 0.5rem;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.intro {
|
|
16
|
-
display: grid;
|
|
17
|
-
gap: 1rem;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.section {
|
|
21
|
-
display: grid;
|
|
22
|
-
gap: 1rem;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.grid {
|
|
26
|
-
display: grid;
|
|
27
|
-
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
28
|
-
gap: 1rem;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.card {
|
|
32
|
-
display: grid;
|
|
33
|
-
gap: 1rem;
|
|
34
|
-
padding: 1rem;
|
|
35
|
-
border: 1px solid var(--color-border);
|
|
36
|
-
border-radius: 0.75rem;
|
|
37
|
-
background: var(--color-surface);
|
|
38
|
-
box-shadow: var(--shadow-xs);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.cardHeader {
|
|
42
|
-
display: grid;
|
|
43
|
-
gap: 0.5rem;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.classNameRow {
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: var(--spacing-xs);
|
|
50
|
-
flex-wrap: wrap;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.cardDescription,
|
|
54
|
-
.paragraph {
|
|
55
|
-
margin: 0;
|
|
56
|
-
color: var(--color-text-secondary, #374151);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.h2 {
|
|
60
|
-
margin: 0;
|
|
61
|
-
margin-top: 0.75rem;
|
|
62
|
-
font-size: 1rem;
|
|
63
|
-
font-weight: 500;
|
|
64
|
-
color: #27272a;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.h2:first-child {
|
|
68
|
-
margin-top: 0;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.example {
|
|
72
|
-
margin-top: 0.25rem;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.list {
|
|
76
|
-
margin: 0.25rem 0 0 1rem;
|
|
77
|
-
display: grid;
|
|
78
|
-
gap: 0.5rem;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.code {
|
|
82
|
-
border-radius: var(--border-radius-default);
|
|
83
|
-
background: var(--color-bg-default);
|
|
84
|
-
padding: 0 var(--spacing-xs);
|
|
85
|
-
line-height: 1.5;
|
|
86
|
-
font-size: 12px;
|
|
87
|
-
font-family: var(--font-family-mono, monospace);
|
|
88
|
-
color: var(--color-text-secondary);
|
|
89
|
-
box-shadow: var(--shadow-xs);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.demoSurface {
|
|
93
|
-
min-height: 88px;
|
|
94
|
-
width: 100%;
|
|
95
|
-
padding: 0.75rem;
|
|
96
|
-
border-radius: 0.75rem;
|
|
97
|
-
border: 1px dashed var(--color-border-strong, var(--color-border));
|
|
98
|
-
background:
|
|
99
|
-
linear-gradient(180deg, rgb(255 255 255 / 0.35), transparent),
|
|
100
|
-
repeating-linear-gradient(
|
|
101
|
-
90deg,
|
|
102
|
-
var(--color-bg-default) 0,
|
|
103
|
-
var(--color-bg-default) 24px,
|
|
104
|
-
transparent 24px,
|
|
105
|
-
transparent 48px
|
|
106
|
-
),
|
|
107
|
-
var(--color-background);
|
|
108
|
-
background-size:
|
|
109
|
-
auto,
|
|
110
|
-
auto 100%,
|
|
111
|
-
auto;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.tallSurface {
|
|
115
|
-
min-height: 140px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.centerSurface {
|
|
119
|
-
min-height: 120px;
|
|
120
|
-
padding: 0.75rem;
|
|
121
|
-
border-radius: 0.75rem;
|
|
122
|
-
border: 1px dashed var(--color-border-strong, var(--color-border));
|
|
123
|
-
background:
|
|
124
|
-
radial-gradient(circle at center, var(--color-bg-info) 0, transparent 70%),
|
|
125
|
-
repeating-linear-gradient(
|
|
126
|
-
90deg,
|
|
127
|
-
var(--color-bg-default) 0,
|
|
128
|
-
var(--color-bg-default) 24px,
|
|
129
|
-
transparent 24px,
|
|
130
|
-
transparent 48px
|
|
131
|
-
),
|
|
132
|
-
var(--color-background);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.inlineRow {
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
gap: 0.5rem;
|
|
139
|
-
flex-wrap: wrap;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.inlineSurface {
|
|
143
|
-
padding: 0.5rem;
|
|
144
|
-
border-radius: 0.75rem;
|
|
145
|
-
border: 1px dashed var(--color-border-strong, var(--color-border));
|
|
146
|
-
background:
|
|
147
|
-
repeating-linear-gradient(
|
|
148
|
-
90deg,
|
|
149
|
-
var(--color-bg-default) 0,
|
|
150
|
-
var(--color-bg-default) 24px,
|
|
151
|
-
transparent 24px,
|
|
152
|
-
transparent 48px
|
|
153
|
-
),
|
|
154
|
-
var(--color-background);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.inlineLabel {
|
|
158
|
-
font-size: var(--font-size-xs);
|
|
159
|
-
color: var(--color-text-secondary, #374151);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.demoBox,
|
|
163
|
-
.fixedBox,
|
|
164
|
-
.flexBehaviorBox {
|
|
165
|
-
min-width: 2.75rem;
|
|
166
|
-
min-height: 2.75rem;
|
|
167
|
-
padding: 0.5rem 0.75rem;
|
|
168
|
-
border-radius: 0.625rem;
|
|
169
|
-
background: var(--color-status-info-bg, var(--color-bg-selected));
|
|
170
|
-
color: var(--color-fg-default);
|
|
171
|
-
border: 1px solid var(--color-status-info-border, var(--color-border-selected));
|
|
172
|
-
display: flex;
|
|
173
|
-
align-items: center;
|
|
174
|
-
justify-content: center;
|
|
175
|
-
font-weight: 500;
|
|
176
|
-
position: relative;
|
|
177
|
-
z-index: 1;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.tallBox {
|
|
181
|
-
min-height: 3.75rem;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.fixedBox {
|
|
185
|
-
width: 4.5rem;
|
|
186
|
-
flex: none;
|
|
187
|
-
background: var(--color-status-warning-bg, var(--opac-bg-default));
|
|
188
|
-
border-color: var(--color-status-warning-border, var(--color-border-default));
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.flexBehaviorBox {
|
|
192
|
-
width: 4.5rem;
|
|
193
|
-
min-width: 0;
|
|
194
|
-
background: var(--color-bg-selected, var(--opac-bg-default));
|
|
195
|
-
border-color: var(--color-border-selected, var(--color-border-default));
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.fixedBehaviorBox {
|
|
199
|
-
width: 4rem;
|
|
200
|
-
flex: none;
|
|
201
|
-
min-height: 2.75rem;
|
|
202
|
-
padding: 0.5rem 0.75rem;
|
|
203
|
-
border-radius: 0.625rem;
|
|
204
|
-
background: var(--color-status-warning-bg, var(--opac-bg-default));
|
|
205
|
-
color: var(--color-fg-default);
|
|
206
|
-
border: 1px solid var(--color-status-warning-border, var(--color-border-default));
|
|
207
|
-
display: flex;
|
|
208
|
-
align-items: center;
|
|
209
|
-
justify-content: center;
|
|
210
|
-
font-weight: 500;
|
|
211
|
-
position: relative;
|
|
212
|
-
z-index: 1;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.growSurface {
|
|
216
|
-
max-width: 320px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.shrinkSurface {
|
|
220
|
-
max-width: 208px;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.growSideBox {
|
|
224
|
-
width: 3rem;
|
|
225
|
-
flex: none;
|
|
226
|
-
min-height: 2.75rem;
|
|
227
|
-
padding: 0.5rem;
|
|
228
|
-
border-radius: 0.625rem;
|
|
229
|
-
background: var(--color-status-warning-bg, var(--opac-bg-default));
|
|
230
|
-
color: var(--color-fg-default);
|
|
231
|
-
border: 1px solid var(--color-status-warning-border, var(--color-border-default));
|
|
232
|
-
display: flex;
|
|
233
|
-
align-items: center;
|
|
234
|
-
justify-content: center;
|
|
235
|
-
font-weight: 500;
|
|
236
|
-
position: relative;
|
|
237
|
-
z-index: 1;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.growMainBox {
|
|
241
|
-
width: 4rem;
|
|
242
|
-
min-width: 4rem;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.shrinkBox {
|
|
246
|
-
width: 8rem;
|
|
247
|
-
min-width: 0;
|
|
248
|
-
min-height: 2.75rem;
|
|
249
|
-
padding: 0.5rem 0.75rem;
|
|
250
|
-
border-radius: 0.625rem;
|
|
251
|
-
background: var(--color-bg-selected, var(--opac-bg-default));
|
|
252
|
-
color: var(--color-fg-default);
|
|
253
|
-
border: 1px solid var(--color-border-selected, var(--color-border-default));
|
|
254
|
-
display: flex;
|
|
255
|
-
align-items: center;
|
|
256
|
-
justify-content: center;
|
|
257
|
-
font-weight: 500;
|
|
258
|
-
position: relative;
|
|
259
|
-
z-index: 1;
|
|
260
|
-
white-space: nowrap;
|
|
261
|
-
overflow: hidden;
|
|
262
|
-
text-overflow: ellipsis;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.wrapSurface {
|
|
266
|
-
max-width: 220px;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.wideBox {
|
|
270
|
-
min-width: 5rem;
|
|
271
|
-
min-height: 2.75rem;
|
|
272
|
-
padding: 0.5rem 0.75rem;
|
|
273
|
-
border-radius: 0.625rem;
|
|
274
|
-
background: var(--color-status-info-bg, var(--color-bg-selected));
|
|
275
|
-
color: var(--color-fg-default);
|
|
276
|
-
border: 1px solid var(--color-status-info-border, var(--color-border-selected));
|
|
277
|
-
display: flex;
|
|
278
|
-
align-items: center;
|
|
279
|
-
justify-content: center;
|
|
280
|
-
font-weight: 500;
|
|
281
|
-
position: relative;
|
|
282
|
-
z-index: 1;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.shortBox,
|
|
286
|
-
.midBox {
|
|
287
|
-
min-width: 2.75rem;
|
|
288
|
-
padding: 0.5rem 0.75rem;
|
|
289
|
-
border-radius: 0.625rem;
|
|
290
|
-
background: var(--color-status-info-bg, var(--color-bg-selected));
|
|
291
|
-
color: var(--color-fg-default);
|
|
292
|
-
border: 1px solid var(--color-status-info-border, var(--color-border-selected));
|
|
293
|
-
display: flex;
|
|
294
|
-
align-items: center;
|
|
295
|
-
justify-content: center;
|
|
296
|
-
font-weight: 500;
|
|
297
|
-
position: relative;
|
|
298
|
-
z-index: 1;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.shortBox {
|
|
302
|
-
min-height: 2.25rem;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.midBox {
|
|
306
|
-
min-height: 3.25rem;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
@media (max-width: 640px) {
|
|
310
|
-
.container {
|
|
311
|
-
padding: 1rem;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.card {
|
|
315
|
-
padding: 0.875rem;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CopyButton } from '../../../components/copy-button/CopyButton';
|
|
3
|
-
import { Headline } from '../../../components/headline/Headline';
|
|
4
|
-
import styles from './Spacing.module.css';
|
|
5
|
-
const SIZES = ['xxs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl'];
|
|
6
|
-
const AXES = ['all', 'block', 'inline', 'top', 'bottom', 'start', 'end'];
|
|
7
|
-
// Theme spacing values (px) to show in headers
|
|
8
|
-
const SIZE_PX = {
|
|
9
|
-
xxs: '4px',
|
|
10
|
-
xs: '8px',
|
|
11
|
-
sm: '12px',
|
|
12
|
-
md: '16px',
|
|
13
|
-
lg: '24px',
|
|
14
|
-
xl: '32px',
|
|
15
|
-
'2xl': '48px',
|
|
16
|
-
};
|
|
17
|
-
// map axis -> class fragment for each kind
|
|
18
|
-
const CLASS_PARTS = {
|
|
19
|
-
padding: {
|
|
20
|
-
all: 'p',
|
|
21
|
-
block: 'py',
|
|
22
|
-
inline: 'px',
|
|
23
|
-
top: 'pt',
|
|
24
|
-
bottom: 'pb',
|
|
25
|
-
start: 'ps',
|
|
26
|
-
end: 'pe',
|
|
27
|
-
},
|
|
28
|
-
margin: {
|
|
29
|
-
all: 'm',
|
|
30
|
-
block: 'my',
|
|
31
|
-
inline: 'mx',
|
|
32
|
-
top: 'mt',
|
|
33
|
-
bottom: 'mb',
|
|
34
|
-
start: 'ms',
|
|
35
|
-
end: 'me',
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
// Single-side helpers only go up to xl
|
|
39
|
-
const HAS_SINGLE_SIDE_FOR = (size) => size !== '2xl';
|
|
40
|
-
function makeClass(kind, axis, size) {
|
|
41
|
-
if ((axis === 'top' || axis === 'bottom' || axis === 'start' || axis === 'end') &&
|
|
42
|
-
!HAS_SINGLE_SIDE_FOR(size)) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
const part = CLASS_PARTS[kind][axis];
|
|
46
|
-
return `dbc-${part}-${size}`;
|
|
47
|
-
}
|
|
48
|
-
function Code({ children }) {
|
|
49
|
-
return _jsx("code", { className: styles.code, children: children });
|
|
50
|
-
}
|
|
51
|
-
const ContentBlock = ({ helperClass }) => (_jsxs("div", { className: `${styles.contentBlock} dbc-flex dbc-gap-xxs dbc-justify-center ${helperClass} dbc-items-center`, children: [helperClass, " ", _jsx(CopyButton, { text: helperClass, variant: "inline", size: "sm" })] }));
|
|
52
|
-
function PaddingPreview({ cls }) {
|
|
53
|
-
return (_jsx("div", { className: `${styles.paddingPreview} ${cls}`, children: _jsx(ContentBlock, { helperClass: cls }) }));
|
|
54
|
-
}
|
|
55
|
-
function MarginPreview({ cls }) {
|
|
56
|
-
return (_jsx("div", { className: styles.marginCanvas, children: _jsx("div", { className: `${styles.marginBlock} ${cls}`, children: _jsx(ContentBlock, { helperClass: cls }) }) }));
|
|
57
|
-
}
|
|
58
|
-
function Cell({ kind, axis, size }) {
|
|
59
|
-
const cls = makeClass(kind, axis, size);
|
|
60
|
-
if (!cls)
|
|
61
|
-
return _jsx("div", { className: styles.unavailable, children: "\u2014" });
|
|
62
|
-
return (_jsx("div", { className: styles.cellInner, children: _jsx("div", { className: styles.cellPreview, children: kind === 'padding' ? _jsx(PaddingPreview, { cls: cls }) : _jsx(MarginPreview, { cls: cls }) }) }));
|
|
63
|
-
}
|
|
64
|
-
function Grid({ kind, title, severity }) {
|
|
65
|
-
return (_jsxs("section", { className: styles.section, children: [_jsx(Headline, { marker: true, severity: severity, disableMargin: true, size: 2, children: title }), _jsx("div", { className: styles.tableContainer, children: _jsxs("table", { className: styles.table, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: styles.axisCol, children: "Akse" }), SIZES.map(size => (_jsxs("th", { className: styles.sizeHead, children: [size, " ", _jsxs("span", { className: styles.sizePx, children: ["(", SIZE_PX[size], ")"] })] }, size)))] }) }), _jsx("tbody", { children: AXES.map(axis => (_jsxs("tr", { children: [_jsx("th", { className: styles.axisHead, children: axis }), SIZES.map(size => (_jsx("td", { className: styles.cell, children: _jsx(Cell, { kind: kind, axis: axis, size: size }) }, size)))] }, axis))) })] }) })] }));
|
|
66
|
-
}
|
|
67
|
-
export function Spacing({ mode = 'both' }) {
|
|
68
|
-
return (_jsxs("div", { className: styles.container, style: {
|
|
69
|
-
['--pad-indicator']: 'var(--color-bg-info)',
|
|
70
|
-
['--pad-border']: 'var(--color-info)',
|
|
71
|
-
['--margin-indicator']: 'var(--color-bg-warning)',
|
|
72
|
-
['--margin-border']: 'var(--color-warning)',
|
|
73
|
-
['--dot-pad']: 'var(--color-bg-selected)',
|
|
74
|
-
['--dot-mar']: 'var(--opac-bg-default)',
|
|
75
|
-
}, children: [_jsx("header", { className: styles.header, children: _jsx(Headline, { disableMargin: true, children: "Spacing-hj\u00E6lpere" }) }), _jsxs("section", { className: styles.intro, children: [_jsx("h2", { className: styles.h2, children: "Navngivningskonvention" }), _jsxs("p", { className: styles.paragraph, children: ["Spacing-hj\u00E6lpere f\u00F8lger et enkelt m\u00F8nster med ", _jsx("strong", { children: "prefix\u2013akse\u2013st\u00F8rrelse" }), ":"] }), _jsx("div", { className: styles.example, children: _jsx(Code, { children: "dbc-[prefix][axis?]-[size]" }) }), _jsxs("ul", { className: styles.list, children: [_jsxs("li", { children: [_jsx("strong", { children: "Prefix" }), ": ", _jsx(Code, { children: "p" }), " for ", _jsx("em", { children: "padding" }), ", ", _jsx(Code, { children: "m" }), " for", ' ', _jsx("em", { children: "margin" }), "."] }), _jsxs("li", { children: [_jsx("strong", { children: "Akse" }), " (valgfri): ", _jsx(Code, { children: "x" }), " = inline (venstre + h\u00F8jre),", ' ', _jsx(Code, { children: "y" }), " = blok (top + bund), eller enkeltsider ", _jsx(Code, { children: "t" }), " / ", _jsx(Code, { children: "b" }), " /", ' ', _jsx(Code, { children: "s" }), " / ", _jsx(Code, { children: "e" }), "."] }), _jsxs("li", { children: [_jsx("strong", { children: "St\u00F8rrelse" }), ": \u00E9n af ", _jsx(Code, { children: "xxs" }), ", ", _jsx(Code, { children: "xs" }), ", ", _jsx(Code, { children: "sm" }), ",", ' ', _jsx(Code, { children: "md" }), ", ", _jsx(Code, { children: "lg" }), ", ", _jsx(Code, { children: "xl" }), ", ", _jsx(Code, { children: "2xl" }), "."] })] }), _jsxs("p", { className: styles.paragraph, children: ["Eksempel: ", _jsx(Code, { children: "dbc-px-md" }), " giver medium horizontal padding, mens", ' ', _jsx(Code, { children: "dbc-mt-lg" }), " giver stor top-margin."] })] }), (mode === 'both' || mode === 'padding') && (_jsx(Grid, { kind: "padding", title: "Padding", severity: "info" })), (mode === 'both' || mode === 'margin') && (_jsx(Grid, { kind: "margin", title: "Margin", severity: "warning" }))] }));
|
|
76
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/* Layout */
|
|
2
|
-
.container {
|
|
3
|
-
margin-inline: auto;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: 2rem;
|
|
7
|
-
padding: 1.5rem;
|
|
8
|
-
color: var(--color-text);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* Intro copy */
|
|
12
|
-
.intro {
|
|
13
|
-
display: grid;
|
|
14
|
-
gap: 0.5rem;
|
|
15
|
-
}
|
|
16
|
-
.paragraph {
|
|
17
|
-
color: var(--color-text-secondary, #374151);
|
|
18
|
-
}
|
|
19
|
-
.example {
|
|
20
|
-
margin-top: 0.25rem;
|
|
21
|
-
}
|
|
22
|
-
.list {
|
|
23
|
-
margin: 0.5rem 0 0 1rem;
|
|
24
|
-
display: grid;
|
|
25
|
-
gap: 0.25rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.section {
|
|
29
|
-
display: grid;
|
|
30
|
-
gap: 1rem;
|
|
31
|
-
}
|
|
32
|
-
.h2 {
|
|
33
|
-
font-size: 1rem;
|
|
34
|
-
font-weight: 500;
|
|
35
|
-
color: #27272a;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.tableContainer {
|
|
39
|
-
overflow: auto;
|
|
40
|
-
border-radius: 0.75rem;
|
|
41
|
-
border: 1px solid var(--color-border);
|
|
42
|
-
background: var(--color-surface);
|
|
43
|
-
box-shadow: var(--shadow-xs);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.table {
|
|
47
|
-
width: 100%;
|
|
48
|
-
border-collapse: collapse;
|
|
49
|
-
overflow: auto;
|
|
50
|
-
font-size: var(--font-size-sm);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.axisCol {
|
|
54
|
-
width: 90px;
|
|
55
|
-
text-align: left;
|
|
56
|
-
padding: 0.625rem 0.75rem;
|
|
57
|
-
color: var(--color-text-muted);
|
|
58
|
-
font-weight: 500;
|
|
59
|
-
background: var(--color-background);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.axisHead {
|
|
63
|
-
text-align: left;
|
|
64
|
-
padding: 0.625rem 0.75rem;
|
|
65
|
-
color: var(--color-text-secondary, #374151);
|
|
66
|
-
font-weight: 500;
|
|
67
|
-
background: var(--opac-bg-light, rgba(0, 0, 0, 0.025));
|
|
68
|
-
position: sticky;
|
|
69
|
-
left: 0;
|
|
70
|
-
z-index: 1;
|
|
71
|
-
}
|
|
72
|
-
.sizeHead {
|
|
73
|
-
text-align: center;
|
|
74
|
-
padding: 0.5rem 0.5rem;
|
|
75
|
-
font-weight: 600;
|
|
76
|
-
color: var(--color-text, #1a1a1a);
|
|
77
|
-
white-space: nowrap;
|
|
78
|
-
background: var(--color-surface, #fff);
|
|
79
|
-
border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.12));
|
|
80
|
-
}
|
|
81
|
-
.sizePx {
|
|
82
|
-
font-weight: 400;
|
|
83
|
-
color: var(--color-text-muted, #5f6368);
|
|
84
|
-
margin-left: 0.25rem;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.table tbody tr:nth-child(odd) {
|
|
88
|
-
background: var(--bg-color);
|
|
89
|
-
}
|
|
90
|
-
.table tbody tr:nth-child(even) {
|
|
91
|
-
background: var(--opac-bg-default);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.cell {
|
|
95
|
-
vertical-align: middle;
|
|
96
|
-
padding: var(--spacing-xs);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.cellInner {
|
|
100
|
-
display: grid;
|
|
101
|
-
gap: var(--spacing-xxs);
|
|
102
|
-
align-items: center;
|
|
103
|
-
justify-items: center;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.cellPreview {
|
|
107
|
-
width: min(200px, 100%);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.code {
|
|
111
|
-
border-radius: var(--border-radius-default);
|
|
112
|
-
background: var(--color-bg-default);
|
|
113
|
-
padding: 0 var(--spacing-xs);
|
|
114
|
-
line-height: 1.5;
|
|
115
|
-
font-size: 12px;
|
|
116
|
-
font-family: var(--font-family-mono, monospace);
|
|
117
|
-
color: var(--color-text-secondary);
|
|
118
|
-
box-shadow: var(--shadow-xs);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.contentBlock {
|
|
122
|
-
border-radius: var(--border-radius-md, 0.375rem);
|
|
123
|
-
background: var(--color-background);
|
|
124
|
-
text-align: center;
|
|
125
|
-
font-size: var(--font-size-xs);
|
|
126
|
-
color: var(--color-text-secondary);
|
|
127
|
-
box-shadow: var(--shadow-xs);
|
|
128
|
-
white-space: nowrap;
|
|
129
|
-
overflow: hidden;
|
|
130
|
-
text-overflow: ellipsis;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.paddingPreview {
|
|
134
|
-
width: 100%;
|
|
135
|
-
border-radius: var(--border-radius-md, 0.375rem);
|
|
136
|
-
background: var(--pad-indicator, var(--color-bg-selected));
|
|
137
|
-
box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.05));
|
|
138
|
-
outline: 1px solid var(--pad-border, var(--color-border-selected));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.marginCanvas {
|
|
142
|
-
width: 100%;
|
|
143
|
-
position: relative;
|
|
144
|
-
display: inline-block;
|
|
145
|
-
border-radius: var(--border-radius-md, 0.375rem);
|
|
146
|
-
background: var(--margin-indicator, var(--opac-bg-default));
|
|
147
|
-
outline: 1px solid var(--margin-border, var(--color-border));
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.marginBlock {
|
|
151
|
-
border-radius: var(--border-radius-md, 0.375rem);
|
|
152
|
-
background: var(--color-background, #fff);
|
|
153
|
-
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
|
|
154
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import styles from './Accordion.module.css';
|
|
5
|
-
import { AccordionRow } from './components/AccordionRow';
|
|
6
|
-
function uniqSorted(nums) {
|
|
7
|
-
return Array.from(new Set(nums)).sort((a, b) => a - b);
|
|
8
|
-
}
|
|
9
|
-
function normalizeMultiple(indexes) {
|
|
10
|
-
return uniqSorted((indexes !== null && indexes !== void 0 ? indexes : []).filter(n => Number.isFinite(n)));
|
|
11
|
-
}
|
|
12
|
-
export function Accordion({ items, mode = 'single', size = 'md', defaultOpenIndex = null, defaultOpenIndexes = [], openIndex, openIndexes, onOpenIndexChange, onOpenIndexesChange, }) {
|
|
13
|
-
const uid = useId();
|
|
14
|
-
const isControlled = mode === 'single' ? openIndex !== undefined : openIndexes !== undefined;
|
|
15
|
-
// Disable animation on initial render (for default open state).
|
|
16
|
-
const hasMountedRef = useRef(false);
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
hasMountedRef.current = true;
|
|
19
|
-
}, []);
|
|
20
|
-
const [internalSingle, setInternalSingle] = useState(mode === 'single' ? defaultOpenIndex : null);
|
|
21
|
-
const [internalMultiple, setInternalMultiple] = useState(() => {
|
|
22
|
-
if (mode !== 'multiple')
|
|
23
|
-
return [];
|
|
24
|
-
if (defaultOpenIndexes === 'all')
|
|
25
|
-
return items.map((_, i) => i);
|
|
26
|
-
return normalizeMultiple(defaultOpenIndexes);
|
|
27
|
-
});
|
|
28
|
-
const currentOpenIndexes = useMemo(() => {
|
|
29
|
-
if (mode === 'single') {
|
|
30
|
-
const current = isControlled ? (openIndex !== null && openIndex !== void 0 ? openIndex : null) : internalSingle;
|
|
31
|
-
return current === null ? [] : [current];
|
|
32
|
-
}
|
|
33
|
-
return isControlled ? normalizeMultiple(openIndexes) : internalMultiple;
|
|
34
|
-
}, [mode, isControlled, openIndex, openIndexes, internalSingle, internalMultiple]);
|
|
35
|
-
const openSet = useMemo(() => new Set(currentOpenIndexes), [currentOpenIndexes]);
|
|
36
|
-
function commit(nextIndexes) {
|
|
37
|
-
if (mode === 'single') {
|
|
38
|
-
const next = nextIndexes.length ? nextIndexes[0] : null;
|
|
39
|
-
if (isControlled)
|
|
40
|
-
onOpenIndexChange === null || onOpenIndexChange === void 0 ? void 0 : onOpenIndexChange(next);
|
|
41
|
-
else {
|
|
42
|
-
setInternalSingle(next);
|
|
43
|
-
onOpenIndexChange === null || onOpenIndexChange === void 0 ? void 0 : onOpenIndexChange(next);
|
|
44
|
-
}
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const normalized = uniqSorted(nextIndexes);
|
|
48
|
-
if (isControlled)
|
|
49
|
-
onOpenIndexesChange === null || onOpenIndexesChange === void 0 ? void 0 : onOpenIndexesChange(normalized);
|
|
50
|
-
else {
|
|
51
|
-
setInternalMultiple(normalized);
|
|
52
|
-
onOpenIndexesChange === null || onOpenIndexesChange === void 0 ? void 0 : onOpenIndexesChange(normalized);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function toggle(index) {
|
|
56
|
-
const item = items[index];
|
|
57
|
-
if (!item || item.disabled)
|
|
58
|
-
return;
|
|
59
|
-
const isOpen = openSet.has(index);
|
|
60
|
-
if (mode === 'single') {
|
|
61
|
-
commit(isOpen ? [] : [index]);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
if (isOpen)
|
|
65
|
-
commit(currentOpenIndexes.filter(i => i !== index));
|
|
66
|
-
else
|
|
67
|
-
commit([...currentOpenIndexes, index]);
|
|
68
|
-
}
|
|
69
|
-
return (_jsx("div", { className: `${styles.container} ${styles[size]}`, children: items.map((item, i) => (_jsx(AccordionRow, { uid: uid, index: i, item: item, isOpen: openSet.has(i), onToggle: toggle, shouldAnimate: hasMountedRef.current }, i))) }));
|
|
70
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
border-radius: var(--border-radius-default);
|
|
3
|
-
background-color: var(--color-bg-surface);
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
gap: var(--spacing-xs);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* Size variables (consumed by AccordionRow) */
|
|
12
|
-
.sm {
|
|
13
|
-
--acc-trigger-py: var(--spacing-xs);
|
|
14
|
-
--acc-trigger-px: var(--spacing-sm);
|
|
15
|
-
--acc-content-py: var(--spacing-sm);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.md {
|
|
19
|
-
--acc-trigger-py: var(--spacing-sm);
|
|
20
|
-
--acc-trigger-px: var(--spacing-md);
|
|
21
|
-
--acc-content-py: var(--spacing-md);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.lg {
|
|
25
|
-
--acc-trigger-py: var(--spacing-md);
|
|
26
|
-
--acc-trigger-px: var(--spacing-md);
|
|
27
|
-
--acc-content-py: var(--spacing-md);
|
|
28
|
-
}
|