@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.
- 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.js +12641 -79
- 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/alert/Alert.js +0 -17
- package/dist/components/alert/Alert.module.css +0 -98
- 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 -28
- package/dist/components/forms/checkbox/Checkbox.module.css +0 -103
- 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 -60
- 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 -185
- 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 -220
- 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 -221
- 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 -89
- 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 -33
- package/dist/components/stack/Stack.module.css +0 -61
- 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 -233
- 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,61 +0,0 @@
|
|
|
1
|
-
.wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: var(--spacing-md);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.container {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-wrap: wrap;
|
|
10
|
-
gap: var(--spacing-md);
|
|
11
|
-
--card-container-gap: var(--spacing-md);
|
|
12
|
-
border-radius: var(--border-radius-sm);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.container.default {
|
|
16
|
-
background-color: var(--card-bg-default, var(--color-bg-surface, var(--color-bg-surface-subtle)));
|
|
17
|
-
padding: var(--spacing-lg);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.container.subtle {
|
|
21
|
-
background-color: var(--card-bg-subtle, var(--color-bg-surface-subtle, var(--color-bg-surface)));
|
|
22
|
-
padding: var(--spacing-lg);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.container.strong {
|
|
26
|
-
background-color: var(
|
|
27
|
-
--card-bg-strong,
|
|
28
|
-
var(--color-bg-surface-strong, var(--color-surface-strong))
|
|
29
|
-
);
|
|
30
|
-
color: var(--card-fg-on-strong, var(--color-fg-on-strong, #ffffff));
|
|
31
|
-
padding: var(--spacing-lg);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.container.accent1 {
|
|
35
|
-
background-color: var(
|
|
36
|
-
--card-bg-accent-1,
|
|
37
|
-
var(--color-bg-accent-1, var(--color-bg-surface-subtle))
|
|
38
|
-
);
|
|
39
|
-
padding: var(--spacing-lg);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.container.accent2 {
|
|
43
|
-
background-color: var(
|
|
44
|
-
--card-bg-accent-2,
|
|
45
|
-
var(--color-bg-accent-2, var(--color-bg-surface-subtle))
|
|
46
|
-
);
|
|
47
|
-
padding: var(--spacing-lg);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.container > * {
|
|
51
|
-
min-width: 0;
|
|
52
|
-
box-sizing: border-box;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* Mobile: stack */
|
|
56
|
-
@media screen and (max-width: 767px) {
|
|
57
|
-
.container > * {
|
|
58
|
-
flex-basis: 100% !important;
|
|
59
|
-
max-width: 100%;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { X } from 'lucide-react';
|
|
4
|
-
import { useState, useRef, useEffect } from 'react';
|
|
5
|
-
import styles from './Chip.module.css';
|
|
6
|
-
import { Icon } from '../icon/Icon';
|
|
7
|
-
import { SkeletonLoaderItem } from '../skeleton-loader/skeleton-loader-item/SkeletonLoaderItem';
|
|
8
|
-
export function Chip({ children, severity = 'neutral', loading, disableIcon = true, fullWidth = false, size = 'sm', customIcon, type = 'rounded', selected = false, onClose, }) {
|
|
9
|
-
const [chipWidth, setChipWidth] = useState(undefined);
|
|
10
|
-
const chipRef = useRef(null);
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
if (chipRef.current) {
|
|
13
|
-
setChipWidth(`${chipRef.current.offsetWidth}px`);
|
|
14
|
-
}
|
|
15
|
-
}, [loading]);
|
|
16
|
-
if (loading) {
|
|
17
|
-
return _jsx(SkeletonLoaderItem, { width: chipWidth !== null && chipWidth !== void 0 ? chipWidth : '100px', height: "26px", radius: "25px" });
|
|
18
|
-
}
|
|
19
|
-
const hasLeading = Boolean(customIcon) || (Boolean(severity) && !disableIcon);
|
|
20
|
-
const hasClose = typeof onClose === 'function';
|
|
21
|
-
return (_jsxs("div", { ref: chipRef, className: [
|
|
22
|
-
styles.container,
|
|
23
|
-
severity ? styles[severity] : '',
|
|
24
|
-
fullWidth ? styles.fullWidth : '',
|
|
25
|
-
styles[size],
|
|
26
|
-
styles[type],
|
|
27
|
-
hasLeading ? styles.hasLeading : '',
|
|
28
|
-
hasClose ? styles.hasClose : '',
|
|
29
|
-
selected ? styles.selected : '',
|
|
30
|
-
].join(' '), children: [hasLeading ? (_jsxs("span", { className: styles.leading, children: [severity && !disableIcon && _jsx(Icon, { severity: severity }), customIcon] })) : null, _jsx("span", { className: styles.label, children: children }), hasClose && (_jsx("button", { type: "button", onClick: onClose, className: styles.close, "aria-label": "Luk", children: _jsx(X, {}) }))] }));
|
|
31
|
-
}
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: var(--spacing-xs);
|
|
5
|
-
white-space: nowrap;
|
|
6
|
-
|
|
7
|
-
color: var(--chip-fg, var(--color-fg-default));
|
|
8
|
-
background: var(--chip-bg, transparent);
|
|
9
|
-
border: 1px solid var(--chip-border, transparent);
|
|
10
|
-
border-radius: var(--border-radius-rounded);
|
|
11
|
-
|
|
12
|
-
padding-inline: var(--spacing-sm);
|
|
13
|
-
padding-block: var(--spacing-2xs);
|
|
14
|
-
|
|
15
|
-
font-family: var(--font-family);
|
|
16
|
-
font-size: var(--font-size-sm);
|
|
17
|
-
font-weight: var(--font-weight-default);
|
|
18
|
-
|
|
19
|
-
transition:
|
|
20
|
-
background-color var(--transition-fast) var(--ease-standard),
|
|
21
|
-
color var(--transition-fast) var(--ease-standard),
|
|
22
|
-
border-color var(--transition-fast) var(--ease-standard),
|
|
23
|
-
box-shadow var(--transition-fast) var(--ease-standard),
|
|
24
|
-
transform var(--transition-fast) var(--ease-standard);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.container:focus-visible {
|
|
28
|
-
outline: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.rounded {
|
|
32
|
-
border-radius: var(--border-radius-rounded);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.default {
|
|
36
|
-
border-radius: var(--border-radius-default);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* Types */
|
|
40
|
-
|
|
41
|
-
.outlined {
|
|
42
|
-
--chip-bg: var(--color-bg-surface);
|
|
43
|
-
--chip-border: var(--chip-outlined-border, var(--color-border-subtle));
|
|
44
|
-
--chip-fg: var(--chip-outlined-fg, var(--color-fg-muted));
|
|
45
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.outlined:hover {
|
|
49
|
-
background-color: var(--color-bg-surface);
|
|
50
|
-
border-color: var(--chip-outlined-border-hover, var(--color-border-default));
|
|
51
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
52
|
-
color: var(--chip-outlined-fg-hover, var(--color-fg-default));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.outlined:focus-visible {
|
|
56
|
-
outline: none;
|
|
57
|
-
border-color: var(--color-border-selected);
|
|
58
|
-
box-shadow:
|
|
59
|
-
0 1px 2px rgba(0, 0, 0, 0.03),
|
|
60
|
-
inset 0 0 0 1px var(--color-border-selected);
|
|
61
|
-
color: var(--chip-outlined-fg-hover, var(--color-fg-default));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* Content */
|
|
65
|
-
|
|
66
|
-
.leading {
|
|
67
|
-
display: inline-flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
flex: 0 0 auto;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.label {
|
|
74
|
-
display: inline-flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
min-width: 0;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.leading svg,
|
|
80
|
-
.close svg {
|
|
81
|
-
inline-size: var(--icon-size-sm);
|
|
82
|
-
block-size: var(--icon-size-sm);
|
|
83
|
-
color: currentColor;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.sm .leading svg {
|
|
87
|
-
inline-size: var(--icon-size-xs);
|
|
88
|
-
block-size: var(--icon-size-xs);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* Sizes */
|
|
92
|
-
|
|
93
|
-
.sm {
|
|
94
|
-
height: var(--component-size-xs);
|
|
95
|
-
font-size: var(--font-size-xs);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.md {
|
|
99
|
-
height: var(--component-size-sm);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.lg {
|
|
103
|
-
height: var(--component-size-md);
|
|
104
|
-
padding-block: var(--spacing-xs);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* Status variants */
|
|
108
|
-
|
|
109
|
-
.neutral {
|
|
110
|
-
--chip-bg: var(--color-bg-toolbar);
|
|
111
|
-
--chip-fg: var(--color-fg-default);
|
|
112
|
-
--chip-border: transparent;
|
|
113
|
-
--chip-outlined-border: var(--color-border-subtle);
|
|
114
|
-
--chip-outlined-border-hover: var(--color-border-default);
|
|
115
|
-
--chip-outlined-fg: var(--color-fg-muted);
|
|
116
|
-
--chip-outlined-fg-hover: var(--color-fg-default);
|
|
117
|
-
box-shadow: none;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.success {
|
|
121
|
-
--chip-bg: var(--color-status-success-bg);
|
|
122
|
-
--chip-fg: var(--color-status-success-fg);
|
|
123
|
-
--chip-border: transparent;
|
|
124
|
-
--chip-outlined-border: var(--color-status-success-border);
|
|
125
|
-
--chip-outlined-border-hover: var(--color-status-success-border);
|
|
126
|
-
--chip-outlined-fg: var(--color-status-success-fg);
|
|
127
|
-
--chip-outlined-fg-hover: var(--color-status-success-fg);
|
|
128
|
-
box-shadow: inset 0 0 0 1px var(--color-status-success-border);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.warning {
|
|
132
|
-
--chip-bg: var(--color-status-warning-bg);
|
|
133
|
-
--chip-fg: var(--color-status-warning-fg);
|
|
134
|
-
--chip-border: transparent;
|
|
135
|
-
--chip-outlined-border: var(--color-status-warning-border);
|
|
136
|
-
--chip-outlined-border-hover: var(--color-status-warning-border);
|
|
137
|
-
--chip-outlined-fg: var(--color-status-warning-fg);
|
|
138
|
-
--chip-outlined-fg-hover: var(--color-status-warning-fg);
|
|
139
|
-
box-shadow: inset 0 0 0 1px var(--color-status-warning-border);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.error {
|
|
143
|
-
--chip-bg: var(--color-status-error-bg);
|
|
144
|
-
--chip-fg: var(--color-status-error-fg);
|
|
145
|
-
--chip-border: transparent;
|
|
146
|
-
--chip-outlined-border: var(--color-status-error-border);
|
|
147
|
-
--chip-outlined-border-hover: var(--color-status-error-border);
|
|
148
|
-
--chip-outlined-fg: var(--color-status-error-fg);
|
|
149
|
-
--chip-outlined-fg-hover: var(--color-status-error-fg);
|
|
150
|
-
box-shadow: inset 0 0 0 1px var(--color-status-error-border);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.info {
|
|
154
|
-
--chip-bg: var(--color-status-info-bg);
|
|
155
|
-
--chip-fg: var(--color-status-info-fg);
|
|
156
|
-
--chip-border: transparent;
|
|
157
|
-
--chip-outlined-border: var(--color-status-info-border);
|
|
158
|
-
--chip-outlined-border-hover: var(--color-status-info-border);
|
|
159
|
-
--chip-outlined-fg: var(--color-status-info-fg);
|
|
160
|
-
--chip-outlined-fg-hover: var(--color-status-info-fg);
|
|
161
|
-
box-shadow: inset 0 0 0 1px var(--color-status-info-border);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.brand {
|
|
165
|
-
--chip-bg: var(--color-brand);
|
|
166
|
-
--chip-fg: var(--color-fg-on-brand);
|
|
167
|
-
--chip-border: transparent;
|
|
168
|
-
--chip-outlined-border: color-mix(in srgb, var(--color-brand) 50%, transparent);
|
|
169
|
-
--chip-outlined-border-hover: var(--color-brand);
|
|
170
|
-
--chip-outlined-fg: var(--color-brand);
|
|
171
|
-
--chip-outlined-fg-hover: var(--color-brand);
|
|
172
|
-
box-shadow: inset 0 0 0 1px transparent;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Selected */
|
|
176
|
-
|
|
177
|
-
.selected {
|
|
178
|
-
background: var(--color-bg-selected);
|
|
179
|
-
color: var(--color-brand);
|
|
180
|
-
border-color: var(--color-border-selected);
|
|
181
|
-
box-shadow: inset 0 0 0 1px var(--color-border-selected);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.selected:hover {
|
|
185
|
-
background-color: var(--color-bg-selected);
|
|
186
|
-
border-color: var(--color-border-selected);
|
|
187
|
-
box-shadow: inset 0 0 0 1px var(--color-border-selected);
|
|
188
|
-
color: var(--color-brand);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.selected:focus-visible {
|
|
192
|
-
outline: none;
|
|
193
|
-
background-color: var(--color-bg-selected);
|
|
194
|
-
border-color: var(--color-border-selected);
|
|
195
|
-
box-shadow: inset 0 0 0 1px var(--color-border-selected);
|
|
196
|
-
color: var(--color-brand);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/* Layout */
|
|
200
|
-
|
|
201
|
-
.fullWidth {
|
|
202
|
-
inline-size: 100%;
|
|
203
|
-
justify-content: center;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/* Close button */
|
|
207
|
-
|
|
208
|
-
.close {
|
|
209
|
-
all: unset;
|
|
210
|
-
display: inline-flex;
|
|
211
|
-
align-items: center;
|
|
212
|
-
justify-content: center;
|
|
213
|
-
cursor: pointer;
|
|
214
|
-
color: inherit;
|
|
215
|
-
|
|
216
|
-
inline-size: var(--icon-size-md);
|
|
217
|
-
block-size: var(--icon-size-md);
|
|
218
|
-
border-radius: var(--border-radius-round);
|
|
219
|
-
border: 1px solid transparent;
|
|
220
|
-
box-sizing: border-box;
|
|
221
|
-
|
|
222
|
-
transition:
|
|
223
|
-
background-color var(--transition-fast) var(--ease-standard),
|
|
224
|
-
border-color var(--transition-fast) var(--ease-standard),
|
|
225
|
-
box-shadow var(--transition-fast) var(--ease-standard);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.close:hover {
|
|
229
|
-
background-color: var(--color-bg-hover-subtle);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.close:focus-visible {
|
|
233
|
-
outline: none;
|
|
234
|
-
border-color: var(--color-border-selected);
|
|
235
|
-
box-shadow: inset 0 0 0 1px var(--color-border-selected);
|
|
236
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styles from './Circle.module.css';
|
|
3
|
-
export function Circle({ severity, children, glow, muted, pulse, size = 'sm', }) {
|
|
4
|
-
return (_jsxs("span", { className: styles.container, "data-size": size, children: [_jsx("span", { "data-glow": glow, "data-pulse": pulse, "data-size": size, "data-muted": muted, className: `${styles.circle} ${styles[severity]}` }), children] }));
|
|
5
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: flex-start;
|
|
5
|
-
gap: var(--spacing-xs);
|
|
6
|
-
white-space: nowrap;
|
|
7
|
-
font-family: var(--font-family);
|
|
8
|
-
color: inherit;
|
|
9
|
-
line-height: 1;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.container[data-size='2xs'] {
|
|
13
|
-
gap: var(--spacing-xxs);
|
|
14
|
-
font-size: var(--font-size-xs);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.circle {
|
|
18
|
-
position: relative;
|
|
19
|
-
display: inline-block;
|
|
20
|
-
inline-size: var(--component-size-sm);
|
|
21
|
-
block-size: var(--component-size-sm);
|
|
22
|
-
border-radius: var(--border-radius-round);
|
|
23
|
-
flex-shrink: 0;
|
|
24
|
-
transition:
|
|
25
|
-
background-color var(--transition-fast) var(--ease-standard),
|
|
26
|
-
box-shadow var(--transition-fast) var(--ease-standard),
|
|
27
|
-
opacity var(--transition-normal) var(--ease-standard);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Density modifier (optional) */
|
|
31
|
-
.container[data-density='compact'] .circle {
|
|
32
|
-
inline-size: calc(var(--component-size-xs) - 4px);
|
|
33
|
-
block-size: calc(var(--component-size-xs) - 4px);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Status variants */
|
|
37
|
-
.brand {
|
|
38
|
-
background-color: var(--color-brand);
|
|
39
|
-
}
|
|
40
|
-
.success {
|
|
41
|
-
background-color: var(--color-status-success);
|
|
42
|
-
}
|
|
43
|
-
.warning {
|
|
44
|
-
background-color: var(--color-status-warning);
|
|
45
|
-
}
|
|
46
|
-
.error {
|
|
47
|
-
background-color: var(--color-status-error);
|
|
48
|
-
}
|
|
49
|
-
.info {
|
|
50
|
-
background-color: var(--color-status-info);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.brand[data-glow='true'] {
|
|
54
|
-
box-shadow: 0 0 0 2px var(--color-bg-selected);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.success[data-glow='true'] {
|
|
58
|
-
box-shadow: 0 0 0 2px var(--color-status-success-bg);
|
|
59
|
-
}
|
|
60
|
-
.warning[data-glow='true'] {
|
|
61
|
-
box-shadow: 0 0 0 2px var(--color-status-warning-bg);
|
|
62
|
-
}
|
|
63
|
-
.error[data-glow='true'] {
|
|
64
|
-
box-shadow: 0 0 0 2px var(--color-status-error-bg);
|
|
65
|
-
}
|
|
66
|
-
.info[data-glow='true'] {
|
|
67
|
-
box-shadow: 0 0 0 2px var(--color-status-info-bg);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.circle[data-size='2xs'] {
|
|
71
|
-
inline-size: var(--component-size-2xs);
|
|
72
|
-
block-size: var(--component-size-2xs);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.circle[data-size='xs'] {
|
|
76
|
-
inline-size: var(--component-size-xxs);
|
|
77
|
-
block-size: var(--component-size-xxs);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.circle[data-size='sm'] {
|
|
81
|
-
inline-size: 14px;
|
|
82
|
-
block-size: 14px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.circle[data-size='md'] {
|
|
86
|
-
inline-size: 18px;
|
|
87
|
-
block-size: 18px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.circle[data-muted='true'] {
|
|
91
|
-
opacity: 0.4;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.circle[data-size='lg'] {
|
|
95
|
-
inline-size: 22px;
|
|
96
|
-
block-size: 22px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.circle[data-pulse='true']::after {
|
|
100
|
-
content: '';
|
|
101
|
-
position: absolute;
|
|
102
|
-
inset: 0;
|
|
103
|
-
border-radius: inherit;
|
|
104
|
-
background-color: inherit;
|
|
105
|
-
animation: circle-pulse 1.6s ease-out infinite;
|
|
106
|
-
pointer-events: none;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@keyframes circle-pulse {
|
|
110
|
-
0% {
|
|
111
|
-
transform: scale(1);
|
|
112
|
-
opacity: 0.6;
|
|
113
|
-
}
|
|
114
|
-
60% {
|
|
115
|
-
transform: scale(2);
|
|
116
|
-
opacity: 0;
|
|
117
|
-
}
|
|
118
|
-
100% {
|
|
119
|
-
transform: scale(2);
|
|
120
|
-
opacity: 0;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
@media (prefers-reduced-motion: reduce) {
|
|
125
|
-
.circle[data-pulse='true']::after {
|
|
126
|
-
animation: none;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { X } from 'lucide-react';
|
|
3
|
-
import styles from './ClearButton.module.css';
|
|
4
|
-
export function ClearButton({ onClick, absolute }) {
|
|
5
|
-
return (_jsx("span", { className: `${styles.clearButton} ${absolute ? styles.absolute : ''}`, children: _jsx("button", { className: styles.button, type: "button", "data-input-role": "clear", onMouseDown: e => {
|
|
6
|
-
e.preventDefault();
|
|
7
|
-
e.stopPropagation();
|
|
8
|
-
}, onClick: e => {
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
e.stopPropagation();
|
|
11
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
12
|
-
}, children: _jsx(X, { size: 16 }) }) }));
|
|
13
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.clearButton .button {
|
|
2
|
-
appearance: none;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
margin: 0;
|
|
7
|
-
border: 0;
|
|
8
|
-
background: transparent;
|
|
9
|
-
color: var(--color-fg-subtle);
|
|
10
|
-
font: inherit;
|
|
11
|
-
line-height: 0;
|
|
12
|
-
padding: var(--spacing-xxs);
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
border-radius: 100%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.clearButton .button:hover {
|
|
18
|
-
background-color: var(--color-bg-contextual);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.clearButton.absolute .button {
|
|
22
|
-
position: absolute;
|
|
23
|
-
right: var(--spacing-xxs);
|
|
24
|
-
top: 50%;
|
|
25
|
-
transform: translateY(-50%);
|
|
26
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { TextWrap } from 'lucide-react';
|
|
3
|
-
import { isValidElement, useMemo, useState } from 'react';
|
|
4
|
-
import styles from './CodeBlock.module.css';
|
|
5
|
-
import { Button } from '../button/Button';
|
|
6
|
-
import { CopyButton } from '../copy-button/CopyButton';
|
|
7
|
-
const looksLikeStackFrame = (line) => {
|
|
8
|
-
const t = line.trim();
|
|
9
|
-
return (t.startsWith('at ') || // Java, JS
|
|
10
|
-
t.startsWith('...') ||
|
|
11
|
-
t.startsWith('Caused by:') ||
|
|
12
|
-
t.startsWith('Suppressed:') ||
|
|
13
|
-
t.startsWith('Traceback') || // Python header
|
|
14
|
-
t.startsWith('File ') || // Python
|
|
15
|
-
t.startsWith('↳') || // some tools
|
|
16
|
-
/^at\s+\w/.test(t));
|
|
17
|
-
};
|
|
18
|
-
function getTextContent(node) {
|
|
19
|
-
if (node == null || typeof node === 'boolean')
|
|
20
|
-
return '';
|
|
21
|
-
if (typeof node === 'string' || typeof node === 'number')
|
|
22
|
-
return String(node);
|
|
23
|
-
if (Array.isArray(node))
|
|
24
|
-
return node.map(getTextContent).join('');
|
|
25
|
-
if (isValidElement(node))
|
|
26
|
-
return getTextContent(node.props.children);
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
29
|
-
export function CodeBlock({ code, children, copyButton, copyText, size = 'md', smart = true, wrap = true, }) {
|
|
30
|
-
const text = typeof code === 'string' ? code : undefined;
|
|
31
|
-
const hasChildren = children !== undefined && children !== null;
|
|
32
|
-
const [isWrapped, setIsWrapped] = useState(wrap);
|
|
33
|
-
const copy = useMemo(() => { var _a; return (_a = copyText !== null && copyText !== void 0 ? copyText : text) !== null && _a !== void 0 ? _a : getTextContent(children); }, [copyText, text, children]);
|
|
34
|
-
const lines = useMemo(() => (smart && !hasChildren && typeof text === 'string' ? text.split('\n') : null), [smart, hasChildren, text]);
|
|
35
|
-
return (_jsxs("div", { className: [
|
|
36
|
-
styles.wrapper,
|
|
37
|
-
styles[size],
|
|
38
|
-
isWrapped ? styles.wrap : styles.noWrap,
|
|
39
|
-
copyButton ? styles.hasActions : '',
|
|
40
|
-
]
|
|
41
|
-
.filter(Boolean)
|
|
42
|
-
.join(' '), children: [copyButton && (_jsxs("span", { className: styles.actions, "aria-hidden": false, children: [_jsx(Button, { type: "button", variant: "inline", size: "sm", shape: "round", onClick: () => setIsWrapped(v => !v), "aria-pressed": isWrapped, active: isWrapped, title: isWrapped ? 'Ombryd ikke tekst' : 'Ombryd tekst', children: _jsx(TextWrap, { size: 16 }) }), _jsx(CopyButton, { size: "sm", shape: "round", variant: "inline", text: copy })] })), _jsx("pre", { className: styles.container, tabIndex: 0, children: _jsx("code", { className: styles.code, children: hasChildren
|
|
43
|
-
? children
|
|
44
|
-
: lines
|
|
45
|
-
? lines.map((line, i) => {
|
|
46
|
-
const isFirst = i === 0;
|
|
47
|
-
const isFrame = looksLikeStackFrame(line);
|
|
48
|
-
const cls = [
|
|
49
|
-
styles.line,
|
|
50
|
-
isFirst ? styles.lineFirst : '',
|
|
51
|
-
isFrame ? styles.lineFrame : '',
|
|
52
|
-
]
|
|
53
|
-
.filter(Boolean)
|
|
54
|
-
.join(' ');
|
|
55
|
-
return (_jsxs("span", { className: cls, children: [line, '\n'] }, i));
|
|
56
|
-
})
|
|
57
|
-
: text }) })] }));
|
|
58
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
.wrapper {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
max-inline-size: 100%;
|
|
5
|
-
--code-actions-h: var(--component-size-sm);
|
|
6
|
-
--code-actions-inset: var(--spacing-xs);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/* <pre> */
|
|
10
|
-
.container {
|
|
11
|
-
position: relative;
|
|
12
|
-
margin-block: 0;
|
|
13
|
-
background: var(--color-bg-surface-strong);
|
|
14
|
-
border: var(--border-width-thin) solid var(--color-border-subtle);
|
|
15
|
-
border-radius: var(--border-radius-lg);
|
|
16
|
-
box-shadow: var(--shadow-xs);
|
|
17
|
-
padding: var(--spacing-sm);
|
|
18
|
-
font-family: var(--font-family-mono);
|
|
19
|
-
line-height: 1.35;
|
|
20
|
-
overflow: auto;
|
|
21
|
-
scrollbar-gutter: stable;
|
|
22
|
-
display: inline-flex;
|
|
23
|
-
align-items: flex-start;
|
|
24
|
-
max-inline-size: 100%;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Sizes */
|
|
28
|
-
.sm .container {
|
|
29
|
-
padding: var(--spacing-xs);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.sm .code {
|
|
33
|
-
font-size: var(--font-size-xs);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.md .code {
|
|
37
|
-
font-size: var(--font-size-sm);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.lg .code {
|
|
41
|
-
font-size: var(--font-size-base);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.hasActions .container {
|
|
45
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-sm) + var(--spacing-sm));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.sm.hasActions .container {
|
|
49
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-xs) + var(--spacing-xs));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.md.hasActions .container {
|
|
53
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-sm) + var(--spacing-sm));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.lg.hasActions .container {
|
|
57
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-sm) + var(--spacing-sm));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Focus ring */
|
|
61
|
-
.wrapper:focus-within .container {
|
|
62
|
-
border-color: var(--color-border-selected);
|
|
63
|
-
box-shadow: var(--shadow-xs), var(--focus-ring);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* <code> */
|
|
67
|
-
.code {
|
|
68
|
-
display: block;
|
|
69
|
-
margin: 0;
|
|
70
|
-
font-family: var(--font-family-mono);
|
|
71
|
-
color: var(--color-fg-default);
|
|
72
|
-
flex: 1 1 auto;
|
|
73
|
-
min-width: 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Wrapping modes */
|
|
77
|
-
.wrap .code {
|
|
78
|
-
white-space: pre-wrap;
|
|
79
|
-
overflow-wrap: break-word;
|
|
80
|
-
word-break: normal;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.noWrap .code {
|
|
84
|
-
white-space: pre;
|
|
85
|
-
overflow-wrap: normal;
|
|
86
|
-
word-break: normal;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.actions {
|
|
90
|
-
position: absolute;
|
|
91
|
-
top: var(--code-actions-inset);
|
|
92
|
-
right: var(--code-actions-inset);
|
|
93
|
-
z-index: 3;
|
|
94
|
-
display: inline-flex;
|
|
95
|
-
gap: var(--spacing-xs);
|
|
96
|
-
align-items: center;
|
|
97
|
-
padding: var(--spacing-2xs);
|
|
98
|
-
border-radius: var(--border-radius-lg);
|
|
99
|
-
background: color-mix(in oklab, var(--color-bg-surface) 70%, transparent);
|
|
100
|
-
backdrop-filter: blur(6px);
|
|
101
|
-
opacity: 0;
|
|
102
|
-
pointer-events: none;
|
|
103
|
-
transition: opacity var(--transition-fast) var(--ease-standard);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.wrapper:hover .actions,
|
|
107
|
-
.wrapper:focus-within .actions {
|
|
108
|
-
opacity: 1;
|
|
109
|
-
pointer-events: auto;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.line {
|
|
113
|
-
display: inline;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.lineFirst {
|
|
117
|
-
font-family: inherit;
|
|
118
|
-
font-weight: 500;
|
|
119
|
-
color: var(--color-fg-default);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.lineFrame {
|
|
123
|
-
color: var(--color-fg-subtle);
|
|
124
|
-
}
|