@dbcdk/react-components 0.0.167 → 0.0.169
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/package.json +1 -1
- package/dist/assets/logo.cjs +0 -87
- package/dist/assets/logo.d.ts +0 -2
- package/dist/assets/logo.js +0 -85
- package/dist/client.cjs +0 -629
- package/dist/client.d.ts +0 -89
- package/dist/client.js +0 -90
- package/dist/components/accordion/Accordion.cjs +0 -127
- package/dist/components/accordion/Accordion.d.ts +0 -36
- package/dist/components/accordion/Accordion.js +0 -121
- package/dist/components/accordion/Accordion.module.css +0 -41
- package/dist/components/accordion/components/AccordionRow.cjs +0 -129
- package/dist/components/accordion/components/AccordionRow.d.ts +0 -14
- package/dist/components/accordion/components/AccordionRow.js +0 -123
- package/dist/components/accordion/components/AccordionRow.module.css +0 -129
- package/dist/components/alert/Alert.cjs +0 -52
- package/dist/components/alert/Alert.d.ts +0 -14
- package/dist/components/alert/Alert.js +0 -46
- package/dist/components/alert/Alert.module.css +0 -102
- package/dist/components/app-header/AppHeader.cjs +0 -14
- package/dist/components/app-header/AppHeader.d.ts +0 -8
- package/dist/components/app-header/AppHeader.js +0 -8
- package/dist/components/app-header/AppHeader.module.css +0 -74
- package/dist/components/attribute-chip/AttributeChip.cjs +0 -36
- package/dist/components/attribute-chip/AttributeChip.d.ts +0 -11
- package/dist/components/attribute-chip/AttributeChip.js +0 -30
- package/dist/components/attribute-chip/AttributeChip.module.css +0 -64
- package/dist/components/avatar/Avatar.cjs +0 -111
- package/dist/components/avatar/Avatar.d.ts +0 -17
- package/dist/components/avatar/Avatar.js +0 -86
- package/dist/components/avatar/Avatar.module.css +0 -91
- package/dist/components/breadcrumbs/Breadcrumbs.cjs +0 -24
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +0 -12
- package/dist/components/breadcrumbs/Breadcrumbs.js +0 -18
- package/dist/components/breadcrumbs/Breadcrumbs.module.css +0 -77
- package/dist/components/button/Button.cjs +0 -150
- package/dist/components/button/Button.d.ts +0 -18
- package/dist/components/button/Button.js +0 -125
- package/dist/components/button/Button.module.css +0 -266
- package/dist/components/button-select/ButtonSelect.cjs +0 -35
- package/dist/components/button-select/ButtonSelect.d.ts +0 -16
- package/dist/components/button-select/ButtonSelect.js +0 -29
- package/dist/components/button-select/ButtonSelect.module.css +0 -40
- package/dist/components/card/Card.cjs +0 -109
- package/dist/components/card/Card.d.ts +0 -37
- package/dist/components/card/Card.js +0 -103
- package/dist/components/card/Card.module.css +0 -191
- package/dist/components/card/components/CardMeta.cjs +0 -62
- package/dist/components/card/components/CardMeta.d.ts +0 -16
- package/dist/components/card/components/CardMeta.js +0 -55
- package/dist/components/card/components/CardMeta.module.css +0 -55
- package/dist/components/card-container/CardContainer.cjs +0 -34
- package/dist/components/card-container/CardContainer.d.ts +0 -12
- package/dist/components/card-container/CardContainer.js +0 -28
- package/dist/components/card-container/CardContainer.module.css +0 -63
- package/dist/components/chip/Chip.cjs +0 -65
- package/dist/components/chip/Chip.d.ts +0 -16
- package/dist/components/chip/Chip.js +0 -59
- package/dist/components/chip/Chip.module.css +0 -247
- package/dist/components/circle/Circle.cjs +0 -39
- package/dist/components/circle/Circle.d.ts +0 -14
- package/dist/components/circle/Circle.js +0 -33
- package/dist/components/circle/Circle.module.css +0 -138
- package/dist/components/clear-button/ClearButton.cjs +0 -33
- package/dist/components/clear-button/ClearButton.d.ts +0 -8
- package/dist/components/clear-button/ClearButton.js +0 -27
- package/dist/components/clear-button/ClearButton.module.css +0 -26
- package/dist/components/code-block/CodeBlock.cjs +0 -107
- package/dist/components/code-block/CodeBlock.d.ts +0 -11
- package/dist/components/code-block/CodeBlock.js +0 -101
- package/dist/components/code-block/CodeBlock.module.css +0 -135
- package/dist/components/copy-button/CopyButton.cjs +0 -139
- package/dist/components/copy-button/CopyButton.d.ts +0 -13
- package/dist/components/copy-button/CopyButton.js +0 -133
- package/dist/components/copy-button/CopyButton.module.css +0 -22
- package/dist/components/datetime-picker/DateTimePicker.cjs +0 -563
- package/dist/components/datetime-picker/DateTimePicker.d.ts +0 -66
- package/dist/components/datetime-picker/DateTimePicker.js +0 -557
- package/dist/components/datetime-picker/DateTimePicker.module.css +0 -155
- package/dist/components/datetime-picker/dateTimeHelpers.cjs +0 -185
- package/dist/components/datetime-picker/dateTimeHelpers.d.ts +0 -37
- package/dist/components/datetime-picker/dateTimeHelpers.js +0 -166
- package/dist/components/divider/Divider.cjs +0 -22
- package/dist/components/divider/Divider.d.ts +0 -5
- package/dist/components/divider/Divider.js +0 -20
- package/dist/components/environment-banner/EnvironmentBanner.cjs +0 -20
- package/dist/components/environment-banner/EnvironmentBanner.d.ts +0 -13
- package/dist/components/environment-banner/EnvironmentBanner.js +0 -14
- package/dist/components/environment-banner/EnvironmentBanner.module.css +0 -54
- package/dist/components/filter-field/FilterField.cjs +0 -291
- package/dist/components/filter-field/FilterField.d.ts +0 -37
- package/dist/components/filter-field/FilterField.js +0 -284
- package/dist/components/filter-field/FilterField.module.css +0 -379
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.cjs +0 -115
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.d.ts +0 -35
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +0 -108
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +0 -59
- package/dist/components/forms/checkbox/Checkbox.cjs +0 -99
- package/dist/components/forms/checkbox/Checkbox.d.ts +0 -39
- package/dist/components/forms/checkbox/Checkbox.js +0 -93
- package/dist/components/forms/checkbox/Checkbox.module.css +0 -110
- package/dist/components/forms/checkbox-group/CheckboxGroup.cjs +0 -121
- package/dist/components/forms/checkbox-group/CheckboxGroup.d.ts +0 -47
- package/dist/components/forms/checkbox-group/CheckboxGroup.js +0 -115
- package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +0 -115
- package/dist/components/forms/file-upload/FileUpload.cjs +0 -127
- package/dist/components/forms/file-upload/FileUpload.d.ts +0 -18
- package/dist/components/forms/file-upload/FileUpload.js +0 -121
- package/dist/components/forms/file-upload/FileUpload.module.css +0 -75
- package/dist/components/forms/form-select/FormSelect.cjs +0 -191
- package/dist/components/forms/form-select/FormSelect.d.ts +0 -35
- package/dist/components/forms/form-select/FormSelect.js +0 -166
- package/dist/components/forms/form-select/FormSelect.module.css +0 -236
- package/dist/components/forms/input/Input.cjs +0 -190
- package/dist/components/forms/input/Input.d.ts +0 -37
- package/dist/components/forms/input/Input.js +0 -184
- package/dist/components/forms/input/Input.module.css +0 -478
- package/dist/components/forms/input-container/InputContainer.cjs +0 -72
- package/dist/components/forms/input-container/InputContainer.d.ts +0 -18
- package/dist/components/forms/input-container/InputContainer.js +0 -66
- package/dist/components/forms/input-container/InputContainer.module.css +0 -59
- package/dist/components/forms/multi-select/MultiSelect.cjs +0 -229
- package/dist/components/forms/multi-select/MultiSelect.d.ts +0 -26
- package/dist/components/forms/multi-select/MultiSelect.js +0 -227
- package/dist/components/forms/radio-buttons/RadioButton.cjs +0 -94
- package/dist/components/forms/radio-buttons/RadioButton.d.ts +0 -46
- package/dist/components/forms/radio-buttons/RadioButton.js +0 -88
- package/dist/components/forms/radio-buttons/RadioButtonGroup.cjs +0 -74
- package/dist/components/forms/radio-buttons/RadioButtonGroup.d.ts +0 -25
- package/dist/components/forms/radio-buttons/RadioButtonGroup.js +0 -72
- package/dist/components/forms/radio-buttons/RadioButtons.module.css +0 -131
- package/dist/components/forms/select/Select.cjs +0 -287
- package/dist/components/forms/select/Select.d.ts +0 -24
- package/dist/components/forms/select/Select.js +0 -281
- package/dist/components/forms/select/Select.module.css +0 -41
- package/dist/components/forms/switch/Switch.cjs +0 -93
- package/dist/components/forms/switch/Switch.d.ts +0 -37
- package/dist/components/forms/switch/Switch.js +0 -87
- package/dist/components/forms/switch/Switch.module.css +0 -89
- package/dist/components/forms/text-area/Textarea.cjs +0 -118
- package/dist/components/forms/text-area/Textarea.d.ts +0 -17
- package/dist/components/forms/text-area/Textarea.js +0 -112
- package/dist/components/forms/text-area/Textarea.module.css +0 -70
- package/dist/components/forms/typeahead/Typeahead.cjs +0 -792
- package/dist/components/forms/typeahead/Typeahead.d.ts +0 -40
- package/dist/components/forms/typeahead/Typeahead.js +0 -768
- package/dist/components/forms/typeahead/Typeahead.module.css +0 -38
- package/dist/components/grid/Grid.cjs +0 -58
- package/dist/components/grid/Grid.d.ts +0 -29
- package/dist/components/grid/Grid.js +0 -51
- package/dist/components/grid/Grid.module.css +0 -44
- package/dist/components/headline/CollapsibleHeadline.cjs +0 -84
- package/dist/components/headline/CollapsibleHeadline.d.ts +0 -25
- package/dist/components/headline/CollapsibleHeadline.js +0 -78
- package/dist/components/headline/Headline.cjs +0 -59
- package/dist/components/headline/Headline.d.ts +0 -20
- package/dist/components/headline/Headline.js +0 -53
- package/dist/components/headline/Headline.module.css +0 -167
- package/dist/components/highlighted-text/HighlightedText.cjs +0 -21
- package/dist/components/highlighted-text/HighlightedText.d.ts +0 -7
- package/dist/components/highlighted-text/HighlightedText.js +0 -19
- package/dist/components/hyperlink/Hyperlink.cjs +0 -113
- package/dist/components/hyperlink/Hyperlink.d.ts +0 -24
- package/dist/components/hyperlink/Hyperlink.js +0 -88
- package/dist/components/hyperlink/Hyperlink.module.css +0 -121
- package/dist/components/icon/Icon.cjs +0 -39
- package/dist/components/icon/Icon.d.ts +0 -14
- package/dist/components/icon/Icon.js +0 -32
- package/dist/components/icon/Icon.module.css +0 -50
- package/dist/components/inline-status/InlineStatus.cjs +0 -39
- package/dist/components/inline-status/InlineStatus.d.ts +0 -11
- package/dist/components/inline-status/InlineStatus.js +0 -33
- package/dist/components/inline-status/InlineStatus.module.css +0 -98
- package/dist/components/interval-select/IntervalSelect.cjs +0 -203
- package/dist/components/interval-select/IntervalSelect.d.ts +0 -37
- package/dist/components/interval-select/IntervalSelect.js +0 -201
- package/dist/components/json-viewer/JsonNode.cjs +0 -124
- package/dist/components/json-viewer/JsonNode.d.ts +0 -3
- package/dist/components/json-viewer/JsonNode.js +0 -118
- package/dist/components/json-viewer/JsonViewer.cjs +0 -164
- package/dist/components/json-viewer/JsonViewer.d.ts +0 -4
- package/dist/components/json-viewer/JsonViewer.js +0 -158
- package/dist/components/json-viewer/JsonViewer.module.css +0 -346
- package/dist/components/json-viewer/types.cjs +0 -2
- package/dist/components/json-viewer/types.d.ts +0 -33
- package/dist/components/json-viewer/types.js +0 -1
- package/dist/components/json-viewer/useClipboardStatus.cjs +0 -15
- package/dist/components/json-viewer/useClipboardStatus.d.ts +0 -4
- package/dist/components/json-viewer/useClipboardStatus.js +0 -13
- package/dist/components/json-viewer/utils.cjs +0 -126
- package/dist/components/json-viewer/utils.d.ts +0 -17
- package/dist/components/json-viewer/utils.js +0 -111
- package/dist/components/lightbox/Lightbox.cjs +0 -291
- package/dist/components/lightbox/Lightbox.d.ts +0 -36
- package/dist/components/lightbox/Lightbox.js +0 -285
- package/dist/components/lightbox/Lightbox.module.css +0 -214
- package/dist/components/media-card/MediaCard.cjs +0 -87
- package/dist/components/media-card/MediaCard.d.ts +0 -21
- package/dist/components/media-card/MediaCard.js +0 -80
- package/dist/components/media-card/MediaCard.module.css +0 -91
- package/dist/components/menu/Menu.cjs +0 -455
- package/dist/components/menu/Menu.d.ts +0 -102
- package/dist/components/menu/Menu.js +0 -430
- package/dist/components/menu/Menu.module.css +0 -286
- package/dist/components/meta-bar/MetaBar.cjs +0 -28
- package/dist/components/meta-bar/MetaBar.d.ts +0 -12
- package/dist/components/meta-bar/MetaBar.js +0 -22
- package/dist/components/meta-bar/MetaBar.module.css +0 -27
- package/dist/components/metric-tile/MetricTile.cjs +0 -33
- package/dist/components/metric-tile/MetricTile.d.ts +0 -15
- package/dist/components/metric-tile/MetricTile.js +0 -27
- package/dist/components/metric-tile/MetricTile.module.css +0 -103
- package/dist/components/nav-bar/NavBar.cjs +0 -107
- package/dist/components/nav-bar/NavBar.d.ts +0 -44
- package/dist/components/nav-bar/NavBar.js +0 -101
- package/dist/components/nav-bar/NavBar.module.css +0 -243
- package/dist/components/overlay/fade-overlay/FadeOverlay.cjs +0 -30
- package/dist/components/overlay/fade-overlay/FadeOverlay.d.ts +0 -13
- package/dist/components/overlay/fade-overlay/FadeOverlay.js +0 -24
- package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +0 -54
- package/dist/components/overlay/modal/Modal.cjs +0 -191
- package/dist/components/overlay/modal/Modal.d.ts +0 -29
- package/dist/components/overlay/modal/Modal.js +0 -185
- package/dist/components/overlay/modal/Modal.module.css +0 -112
- package/dist/components/overlay/modal/provider/ModalProvider.cjs +0 -98
- package/dist/components/overlay/modal/provider/ModalProvider.d.ts +0 -23
- package/dist/components/overlay/modal/provider/ModalProvider.js +0 -95
- package/dist/components/overlay/side-panel/SidePanel.cjs +0 -173
- package/dist/components/overlay/side-panel/SidePanel.d.ts +0 -25
- package/dist/components/overlay/side-panel/SidePanel.js +0 -167
- package/dist/components/overlay/side-panel/SidePanel.module.css +0 -177
- package/dist/components/overlay/side-panel/useSidePanel.cjs +0 -16
- package/dist/components/overlay/side-panel/useSidePanel.d.ts +0 -5
- package/dist/components/overlay/side-panel/useSidePanel.js +0 -14
- package/dist/components/overlay/tooltip/Tooltip.cjs +0 -56
- package/dist/components/overlay/tooltip/Tooltip.d.ts +0 -12
- package/dist/components/overlay/tooltip/Tooltip.js +0 -54
- package/dist/components/overlay/tooltip/Tooltip.module.css +0 -104
- package/dist/components/overlay/tooltip/TooltipProvider.cjs +0 -238
- package/dist/components/overlay/tooltip/TooltipProvider.d.ts +0 -20
- package/dist/components/overlay/tooltip/TooltipProvider.js +0 -231
- package/dist/components/overlay/tooltip/useTooltipTrigger.cjs +0 -117
- package/dist/components/overlay/tooltip/useTooltipTrigger.d.ts +0 -28
- package/dist/components/overlay/tooltip/useTooltipTrigger.js +0 -115
- package/dist/components/page/Page.cjs +0 -64
- package/dist/components/page/Page.d.ts +0 -21
- package/dist/components/page/Page.js +0 -58
- package/dist/components/page/Page.module.css +0 -95
- package/dist/components/page-layout/PageLayout.cjs +0 -126
- package/dist/components/page-layout/PageLayout.d.ts +0 -47
- package/dist/components/page-layout/PageLayout.js +0 -120
- package/dist/components/page-layout/PageLayout.module.css +0 -333
- package/dist/components/page-layout/components/footer/Footer.cjs +0 -53
- package/dist/components/page-layout/components/footer/Footer.d.ts +0 -14
- package/dist/components/page-layout/components/footer/Footer.js +0 -47
- package/dist/components/page-layout/components/footer/Footer.module.css +0 -86
- package/dist/components/pagination/Pagination.cjs +0 -161
- package/dist/components/pagination/Pagination.d.ts +0 -21
- package/dist/components/pagination/Pagination.js +0 -155
- package/dist/components/pagination/Pagination.module.css +0 -25
- package/dist/components/panel/Panel.cjs +0 -38
- package/dist/components/panel/Panel.d.ts +0 -13
- package/dist/components/panel/Panel.js +0 -32
- package/dist/components/panel/Panel.module.css +0 -30
- package/dist/components/popover/Popover.cjs +0 -331
- package/dist/components/popover/Popover.d.ts +0 -27
- package/dist/components/popover/Popover.js +0 -307
- package/dist/components/popover/Popover.module.css +0 -52
- package/dist/components/search-box/SearchBox.cjs +0 -297
- package/dist/components/search-box/SearchBox.d.ts +0 -30
- package/dist/components/search-box/SearchBox.js +0 -291
- package/dist/components/search-box/SearchBox.module.css +0 -27
- package/dist/components/section-label/SectionLabel.cjs +0 -18
- package/dist/components/section-label/SectionLabel.d.ts +0 -5
- package/dist/components/section-label/SectionLabel.js +0 -12
- package/dist/components/section-label/SectionLabel.module.css +0 -12
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.cjs +0 -130
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +0 -27
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +0 -124
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +0 -187
- package/dist/components/sidebar/Sidebar.cjs +0 -41
- package/dist/components/sidebar/Sidebar.d.ts +0 -23
- package/dist/components/sidebar/Sidebar.js +0 -39
- package/dist/components/sidebar/components/SidebarItem.cjs +0 -29
- package/dist/components/sidebar/components/SidebarItem.d.ts +0 -11
- package/dist/components/sidebar/components/SidebarItem.js +0 -27
- package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.cjs +0 -153
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.d.ts +0 -13
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +0 -147
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +0 -47
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.cjs +0 -220
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.d.ts +0 -18
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +0 -213
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +0 -293
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.cjs +0 -54
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.d.ts +0 -13
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +0 -47
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +0 -117
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.cjs +0 -61
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.d.ts +0 -4
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +0 -55
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +0 -20
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.cjs +0 -96
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.d.ts +0 -7
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +0 -90
- package/dist/components/sidebar/providers/SidebarProvider.cjs +0 -223
- package/dist/components/sidebar/providers/SidebarProvider.d.ts +0 -34
- package/dist/components/sidebar/providers/SidebarProvider.js +0 -220
- package/dist/components/skeleton-loader/SkeletonLoader.cjs +0 -442
- package/dist/components/skeleton-loader/SkeletonLoader.d.ts +0 -9
- package/dist/components/skeleton-loader/SkeletonLoader.js +0 -440
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.cjs +0 -42
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.d.ts +0 -11
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +0 -36
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +0 -55
- package/dist/components/split-button/SplitButton.cjs +0 -46
- package/dist/components/split-button/SplitButton.d.ts +0 -16
- package/dist/components/split-button/SplitButton.js +0 -40
- package/dist/components/split-button/SplitButton.module.css +0 -32
- package/dist/components/split-pane/SplitPane.cjs +0 -191
- package/dist/components/split-pane/SplitPane.d.ts +0 -21
- package/dist/components/split-pane/SplitPane.js +0 -182
- package/dist/components/split-pane/SplitPane.module.css +0 -118
- package/dist/components/split-pane/provider/SplitPaneContext.cjs +0 -129
- package/dist/components/split-pane/provider/SplitPaneContext.d.ts +0 -24
- package/dist/components/split-pane/provider/SplitPaneContext.js +0 -121
- package/dist/components/stack/Stack.cjs +0 -56
- package/dist/components/stack/Stack.d.ts +0 -26
- package/dist/components/stack/Stack.js +0 -50
- package/dist/components/stack/Stack.module.css +0 -77
- package/dist/components/state-page/StatePage.cjs +0 -48
- package/dist/components/state-page/StatePage.d.ts +0 -10
- package/dist/components/state-page/StatePage.js +0 -42
- package/dist/components/state-page/StatePage.module.css +0 -9
- package/dist/components/state-page/empty.cjs +0 -664
- package/dist/components/state-page/empty.d.ts +0 -2
- package/dist/components/state-page/empty.js +0 -662
- package/dist/components/state-page/error.cjs +0 -310
- package/dist/components/state-page/error.d.ts +0 -2
- package/dist/components/state-page/error.js +0 -308
- package/dist/components/state-page/notFound.cjs +0 -243
- package/dist/components/state-page/notFound.d.ts +0 -2
- package/dist/components/state-page/notFound.js +0 -241
- package/dist/components/sticky-footer-layout/StickyFooterLayout.cjs +0 -98
- package/dist/components/sticky-footer-layout/StickyFooterLayout.d.ts +0 -14
- package/dist/components/sticky-footer-layout/StickyFooterLayout.js +0 -96
- package/dist/components/table/Table.cjs +0 -240
- package/dist/components/table/Table.d.ts +0 -4
- package/dist/components/table/Table.js +0 -234
- package/dist/components/table/Table.module.css +0 -704
- package/dist/components/table/Table.types.cjs +0 -2
- package/dist/components/table/Table.types.d.ts +0 -91
- package/dist/components/table/Table.types.js +0 -1
- package/dist/components/table/TanstackTable.cjs +0 -191
- package/dist/components/table/TanstackTable.d.ts +0 -15
- package/dist/components/table/TanstackTable.js +0 -166
- package/dist/components/table/components/TableBody.cjs +0 -58
- package/dist/components/table/components/TableBody.d.ts +0 -28
- package/dist/components/table/components/TableBody.js +0 -52
- package/dist/components/table/components/TableHeader.cjs +0 -56
- package/dist/components/table/components/TableHeader.d.ts +0 -16
- package/dist/components/table/components/TableHeader.js +0 -50
- package/dist/components/table/components/TableHeaderCell.cjs +0 -68
- package/dist/components/table/components/TableHeaderCell.d.ts +0 -12
- package/dist/components/table/components/TableHeaderCell.js +0 -62
- package/dist/components/table/components/TablePagination.cjs +0 -2
- package/dist/components/table/components/TablePagination.d.ts +0 -0
- package/dist/components/table/components/TablePagination.js +0 -1
- package/dist/components/table/components/TableRow.cjs +0 -287
- package/dist/components/table/components/TableRow.d.ts +0 -28
- package/dist/components/table/components/TableRow.js +0 -281
- package/dist/components/table/components/TableSelectionCell.cjs +0 -41
- package/dist/components/table/components/TableSelectionCell.d.ts +0 -9
- package/dist/components/table/components/TableSelectionCell.js +0 -35
- package/dist/components/table/components/column-resizer/ColumnResizer.cjs +0 -25
- package/dist/components/table/components/column-resizer/ColumnResizer.d.ts +0 -7
- package/dist/components/table/components/column-resizer/ColumnResizer.js +0 -19
- package/dist/components/table/components/column-resizer/ColumnResizer.module.css +0 -24
- package/dist/components/table/components/empty-state/EmptyState.cjs +0 -33
- package/dist/components/table/components/empty-state/EmptyState.d.ts +0 -21
- package/dist/components/table/components/empty-state/EmptyState.js +0 -31
- package/dist/components/table/components/empty-state/EmptyState.module.css +0 -4
- package/dist/components/table/components/table-settings/TableSettings.cjs +0 -139
- package/dist/components/table/components/table-settings/TableSettings.d.ts +0 -18
- package/dist/components/table/components/table-settings/TableSettings.js +0 -137
- package/dist/components/table/hooks/useTableRowInteractions.cjs +0 -47
- package/dist/components/table/hooks/useTableRowInteractions.d.ts +0 -15
- package/dist/components/table/hooks/useTableRowInteractions.js +0 -45
- package/dist/components/table/table.classes.cjs +0 -49
- package/dist/components/table/table.classes.d.ts +0 -10
- package/dist/components/table/table.classes.js +0 -40
- package/dist/components/table/table.utils.cjs +0 -59
- package/dist/components/table/table.utils.d.ts +0 -18
- package/dist/components/table/table.utils.js +0 -46
- package/dist/components/table/tanstackTable.utils.cjs +0 -181
- package/dist/components/table/tanstackTable.utils.d.ts +0 -29
- package/dist/components/table/tanstackTable.utils.js +0 -174
- package/dist/components/tabs/Tabs.cjs +0 -187
- package/dist/components/tabs/Tabs.d.ts +0 -52
- package/dist/components/tabs/Tabs.js +0 -181
- package/dist/components/tabs/Tabs.module.css +0 -263
- package/dist/components/theme-button/ThemeButton.cjs +0 -75
- package/dist/components/theme-button/ThemeButton.d.ts +0 -8
- package/dist/components/theme-button/ThemeButton.js +0 -72
- package/dist/components/toast/Toast.cjs +0 -68
- package/dist/components/toast/Toast.d.ts +0 -15
- package/dist/components/toast/Toast.js +0 -62
- package/dist/components/toast/Toast.module.css +0 -165
- package/dist/components/toast/provider/ToastProvider.cjs +0 -105
- package/dist/components/toast/provider/ToastProvider.d.ts +0 -24
- package/dist/components/toast/provider/ToastProvider.js +0 -97
- package/dist/components/user-display/UserDisplay.cjs +0 -22
- package/dist/components/user-display/UserDisplay.d.ts +0 -10
- package/dist/components/user-display/UserDisplay.js +0 -16
- package/dist/components/user-display/UserDisplay.module.css +0 -25
- package/dist/constants/chart-colors.cjs +0 -10
- package/dist/constants/chart-colors.d.ts +0 -2
- package/dist/constants/chart-colors.js +0 -8
- package/dist/constants/chart-colors.types.cjs +0 -2
- package/dist/constants/chart-colors.types.d.ts +0 -3
- package/dist/constants/chart-colors.types.js +0 -1
- package/dist/constants/severity.cjs +0 -33
- package/dist/constants/severity.d.ts +0 -4
- package/dist/constants/severity.js +0 -29
- package/dist/constants/severity.types.cjs +0 -2
- package/dist/constants/severity.types.d.ts +0 -1
- package/dist/constants/severity.types.js +0 -1
- package/dist/constants/sizes.cjs +0 -11
- package/dist/constants/sizes.d.ts +0 -2
- package/dist/constants/sizes.js +0 -9
- package/dist/hooks/useDeviceSize.cjs +0 -33
- package/dist/hooks/useDeviceSize.d.ts +0 -2
- package/dist/hooks/useDeviceSize.js +0 -31
- package/dist/hooks/useListNavigation.cjs +0 -237
- package/dist/hooks/useListNavigation.d.ts +0 -24
- package/dist/hooks/useListNavigation.js +0 -235
- package/dist/hooks/usePagination.cjs +0 -144
- package/dist/hooks/usePagination.d.ts +0 -38
- package/dist/hooks/usePagination.js +0 -142
- package/dist/hooks/usePersistentState.cjs +0 -60
- package/dist/hooks/usePersistentState.d.ts +0 -33
- package/dist/hooks/usePersistentState.js +0 -58
- package/dist/hooks/useSorting.cjs +0 -120
- package/dist/hooks/useSorting.d.ts +0 -50
- package/dist/hooks/useSorting.js +0 -117
- package/dist/hooks/useTableData.cjs +0 -75
- package/dist/hooks/useTableData.d.ts +0 -42
- package/dist/hooks/useTableData.js +0 -73
- package/dist/hooks/useTableSelection.cjs +0 -172
- package/dist/hooks/useTableSelection.d.ts +0 -27
- package/dist/hooks/useTableSelection.js +0 -170
- package/dist/hooks/useTableSettings.cjs +0 -90
- package/dist/hooks/useTableSettings.d.ts +0 -26
- package/dist/hooks/useTableSettings.js +0 -87
- package/dist/hooks/useTheme.cjs +0 -64
- package/dist/hooks/useTheme.d.ts +0 -7
- package/dist/hooks/useTheme.js +0 -62
- package/dist/hooks/useTimeDuration.cjs +0 -75
- package/dist/hooks/useTimeDuration.d.ts +0 -26
- package/dist/hooks/useTimeDuration.js +0 -73
- package/dist/hooks/useViewportFill.cjs +0 -82
- package/dist/hooks/useViewportFill.d.ts +0 -13
- package/dist/hooks/useViewportFill.js +0 -80
- package/dist/index.cjs +0 -292
- package/dist/index.css +0 -75
- package/dist/index.d.ts +0 -42
- package/dist/index.js +0 -41
- package/dist/styles/animation.cjs +0 -9
- package/dist/styles/animation.d.ts +0 -5
- package/dist/styles/animation.js +0 -7
- package/dist/styles/css-helper-classes/flex.css +0 -113
- package/dist/styles/css-helper-classes/spacing.css +0 -312
- package/dist/styles/css-helper-classes/typography.css +0 -11
- package/dist/styles/fonts/Roboto/OFL.txt +0 -93
- package/dist/styles/fonts/Roboto/README.txt +0 -118
- package/dist/styles/fonts/Roboto/Roboto-Black.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ExtraBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ExtraBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ExtraLight.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ExtraLightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Light.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-SemiBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-SemiBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Thin.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Black.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-BlackItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Bold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraLight.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraLightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Italic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Light.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-LightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Medium.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-MediumItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Regular.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-SemiBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-SemiBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Thin.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ThinItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Black.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-BlackItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Bold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraLight.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraLightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Italic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Light.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-LightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Medium.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-MediumItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Regular.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-SemiBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-SemiBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Thin.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ThinItalic.ttf +0 -0
- package/dist/styles/fonts/Tajawal/OFL.txt +0 -93
- package/dist/styles/fonts/Tajawal/Tajawal-Black.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Bold.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-ExtraBold.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-ExtraLight.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Light.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Medium.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Regular.ttf +0 -0
- package/dist/styles/styles.css +0 -377
- package/dist/styles/themes/dbc/base.css +0 -141
- package/dist/styles/themes/dbc/colors.css +0 -320
- package/dist/styles/themes/filmstriben-budget/theme.css +0 -22
- package/dist/styles/themes/types.cjs +0 -2
- package/dist/styles/themes/types.d.ts +0 -16
- package/dist/styles/themes/types.js +0 -1
- package/dist/styles.css +0 -377
- package/dist/tanstack.cjs +0 -26
- package/dist/tanstack.d.ts +0 -3
- package/dist/tanstack.js +0 -3
- package/dist/themes/dbc.css +0 -3
- package/dist/themes/filmstriben-budget.css +0 -3
- package/dist/types/a11y-props.types.cjs +0 -2
- package/dist/types/a11y-props.types.d.ts +0 -8
- package/dist/types/a11y-props.types.js +0 -1
- package/dist/types/assets.d.cjs +0 -2
- package/dist/types/assets.d.js +0 -1
- package/dist/types/css.d.cjs +0 -2
- package/dist/types/css.d.js +0 -1
- package/dist/types/sizes.types.cjs +0 -2
- package/dist/types/sizes.types.d.ts +0 -2
- package/dist/types/sizes.types.js +0 -1
- package/dist/utils/arrays/nested-filtering.cjs +0 -40
- package/dist/utils/arrays/nested-filtering.d.ts +0 -9
- package/dist/utils/arrays/nested-filtering.js +0 -38
- package/dist/utils/cookie.utils.cjs +0 -44
- package/dist/utils/cookie.utils.d.ts +0 -19
- package/dist/utils/cookie.utils.js +0 -40
- package/dist/utils/date/formatDate.cjs +0 -49
- package/dist/utils/date/formatDate.d.ts +0 -28
- package/dist/utils/date/formatDate.js +0 -47
- package/dist/utils/localStorage.utils.cjs +0 -53
- package/dist/utils/localStorage.utils.d.ts +0 -19
- package/dist/utils/localStorage.utils.js +0 -49
- package/dist/utils/text/get-highlighted-segments.cjs +0 -49
- package/dist/utils/text/get-highlighted-segments.d.ts +0 -5
- package/dist/utils/text/get-highlighted-segments.js +0 -47
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var lucideReact = require('lucide-react');
|
|
5
|
-
var react = require('react');
|
|
6
|
-
var styles = require('./CodeBlock.module.css');
|
|
7
|
-
var Button = require('../button/Button');
|
|
8
|
-
var CopyButton = require('../copy-button/CopyButton');
|
|
9
|
-
|
|
10
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
|
|
12
|
-
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
13
|
-
|
|
14
|
-
const looksLikeStackFrame = (line) => {
|
|
15
|
-
const t = line.trim();
|
|
16
|
-
return t.startsWith("at ") || // Java, JS
|
|
17
|
-
t.startsWith("...") || t.startsWith("Caused by:") || t.startsWith("Suppressed:") || t.startsWith("Traceback") || // Python header
|
|
18
|
-
t.startsWith("File ") || // Python
|
|
19
|
-
t.startsWith("\u21B3") || // some tools
|
|
20
|
-
/^at\s+\w/.test(t);
|
|
21
|
-
};
|
|
22
|
-
function getTextContent(node) {
|
|
23
|
-
if (node == null || typeof node === "boolean") return "";
|
|
24
|
-
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
25
|
-
if (Array.isArray(node)) return node.map(getTextContent).join("");
|
|
26
|
-
if (react.isValidElement(node)) return getTextContent(node.props.children);
|
|
27
|
-
return "";
|
|
28
|
-
}
|
|
29
|
-
function CodeBlock({
|
|
30
|
-
code,
|
|
31
|
-
children,
|
|
32
|
-
copyButton,
|
|
33
|
-
copyText,
|
|
34
|
-
size = "md",
|
|
35
|
-
smart = true,
|
|
36
|
-
wrap = true
|
|
37
|
-
}) {
|
|
38
|
-
const text = typeof code === "string" ? code : void 0;
|
|
39
|
-
const hasChildren = children !== void 0 && children !== null;
|
|
40
|
-
const [isWrapped, setIsWrapped] = react.useState(wrap);
|
|
41
|
-
const codeRef = react.useRef(null);
|
|
42
|
-
const copy = react.useMemo(
|
|
43
|
-
() => {
|
|
44
|
-
var _a;
|
|
45
|
-
return (_a = copyText != null ? copyText : text) != null ? _a : getTextContent(children);
|
|
46
|
-
},
|
|
47
|
-
[copyText, text, children]
|
|
48
|
-
);
|
|
49
|
-
const lines = react.useMemo(
|
|
50
|
-
() => smart && !hasChildren && typeof text === "string" ? text.split("\n") : null,
|
|
51
|
-
[smart, hasChildren, text]
|
|
52
|
-
);
|
|
53
|
-
const handleDoubleClick = () => {
|
|
54
|
-
const el = codeRef.current;
|
|
55
|
-
const selection = typeof window !== "undefined" ? window.getSelection() : null;
|
|
56
|
-
if (!el || !selection) return;
|
|
57
|
-
const range = document.createRange();
|
|
58
|
-
range.selectNodeContents(el);
|
|
59
|
-
selection.removeAllRanges();
|
|
60
|
-
selection.addRange(range);
|
|
61
|
-
};
|
|
62
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
className: [
|
|
66
|
-
styles__default.default.wrapper,
|
|
67
|
-
styles__default.default[size],
|
|
68
|
-
isWrapped ? styles__default.default.wrap : styles__default.default.noWrap,
|
|
69
|
-
copyButton ? styles__default.default.hasActions : ""
|
|
70
|
-
].filter(Boolean).join(" "),
|
|
71
|
-
children: [
|
|
72
|
-
copyButton && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles__default.default.actions, "aria-hidden": false, children: [
|
|
73
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
74
|
-
Button.Button,
|
|
75
|
-
{
|
|
76
|
-
type: "button",
|
|
77
|
-
variant: "inline",
|
|
78
|
-
size: "sm",
|
|
79
|
-
shape: "round",
|
|
80
|
-
onClick: () => setIsWrapped((v) => !v),
|
|
81
|
-
"aria-pressed": isWrapped,
|
|
82
|
-
active: isWrapped,
|
|
83
|
-
title: isWrapped ? "Ombryd ikke tekst" : "Ombryd tekst",
|
|
84
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TextWrap, { size: 16 })
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
/* @__PURE__ */ jsxRuntime.jsx(CopyButton.CopyButton, { size: "sm", shape: "round", variant: "inline", text: copy })
|
|
88
|
-
] }),
|
|
89
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: styles__default.default.container, tabIndex: 0, onDoubleClick: handleDoubleClick, children: /* @__PURE__ */ jsxRuntime.jsx("code", { ref: codeRef, className: styles__default.default.code, children: hasChildren ? children : lines ? lines.map((line, i) => {
|
|
90
|
-
const isFirst = i === 0;
|
|
91
|
-
const isFrame = looksLikeStackFrame(line);
|
|
92
|
-
const cls = [
|
|
93
|
-
styles__default.default.line,
|
|
94
|
-
isFirst ? styles__default.default.lineFirst : "",
|
|
95
|
-
isFrame ? styles__default.default.lineFrame : ""
|
|
96
|
-
].filter(Boolean).join(" ");
|
|
97
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cls, children: [
|
|
98
|
-
line,
|
|
99
|
-
"\n"
|
|
100
|
-
] }, i);
|
|
101
|
-
}) : text }) })
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
exports.CodeBlock = CodeBlock;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { JSX, ReactNode } from 'react';
|
|
2
|
-
export interface CodeBlockProps {
|
|
3
|
-
code?: string;
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
copyButton?: boolean;
|
|
6
|
-
copyText?: string;
|
|
7
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
8
|
-
smart?: boolean;
|
|
9
|
-
wrap?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function CodeBlock({ code, children, copyButton, copyText, size, smart, wrap, }: CodeBlockProps): JSX.Element;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { TextWrap } from 'lucide-react';
|
|
3
|
-
import { useState, useRef, useMemo, isValidElement } from 'react';
|
|
4
|
-
import styles from './CodeBlock.module.css';
|
|
5
|
-
import { Button } from '../button/Button';
|
|
6
|
-
import { CopyButton } from '../copy-button/CopyButton';
|
|
7
|
-
|
|
8
|
-
const looksLikeStackFrame = (line) => {
|
|
9
|
-
const t = line.trim();
|
|
10
|
-
return t.startsWith("at ") || // Java, JS
|
|
11
|
-
t.startsWith("...") || t.startsWith("Caused by:") || t.startsWith("Suppressed:") || t.startsWith("Traceback") || // Python header
|
|
12
|
-
t.startsWith("File ") || // Python
|
|
13
|
-
t.startsWith("\u21B3") || // some tools
|
|
14
|
-
/^at\s+\w/.test(t);
|
|
15
|
-
};
|
|
16
|
-
function getTextContent(node) {
|
|
17
|
-
if (node == null || typeof node === "boolean") return "";
|
|
18
|
-
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
19
|
-
if (Array.isArray(node)) return node.map(getTextContent).join("");
|
|
20
|
-
if (isValidElement(node)) return getTextContent(node.props.children);
|
|
21
|
-
return "";
|
|
22
|
-
}
|
|
23
|
-
function CodeBlock({
|
|
24
|
-
code,
|
|
25
|
-
children,
|
|
26
|
-
copyButton,
|
|
27
|
-
copyText,
|
|
28
|
-
size = "md",
|
|
29
|
-
smart = true,
|
|
30
|
-
wrap = true
|
|
31
|
-
}) {
|
|
32
|
-
const text = typeof code === "string" ? code : void 0;
|
|
33
|
-
const hasChildren = children !== void 0 && children !== null;
|
|
34
|
-
const [isWrapped, setIsWrapped] = useState(wrap);
|
|
35
|
-
const codeRef = useRef(null);
|
|
36
|
-
const copy = useMemo(
|
|
37
|
-
() => {
|
|
38
|
-
var _a;
|
|
39
|
-
return (_a = copyText != null ? copyText : text) != null ? _a : getTextContent(children);
|
|
40
|
-
},
|
|
41
|
-
[copyText, text, children]
|
|
42
|
-
);
|
|
43
|
-
const lines = useMemo(
|
|
44
|
-
() => smart && !hasChildren && typeof text === "string" ? text.split("\n") : null,
|
|
45
|
-
[smart, hasChildren, text]
|
|
46
|
-
);
|
|
47
|
-
const handleDoubleClick = () => {
|
|
48
|
-
const el = codeRef.current;
|
|
49
|
-
const selection = typeof window !== "undefined" ? window.getSelection() : null;
|
|
50
|
-
if (!el || !selection) return;
|
|
51
|
-
const range = document.createRange();
|
|
52
|
-
range.selectNodeContents(el);
|
|
53
|
-
selection.removeAllRanges();
|
|
54
|
-
selection.addRange(range);
|
|
55
|
-
};
|
|
56
|
-
return /* @__PURE__ */ jsxs(
|
|
57
|
-
"div",
|
|
58
|
-
{
|
|
59
|
-
className: [
|
|
60
|
-
styles.wrapper,
|
|
61
|
-
styles[size],
|
|
62
|
-
isWrapped ? styles.wrap : styles.noWrap,
|
|
63
|
-
copyButton ? styles.hasActions : ""
|
|
64
|
-
].filter(Boolean).join(" "),
|
|
65
|
-
children: [
|
|
66
|
-
copyButton && /* @__PURE__ */ jsxs("span", { className: styles.actions, "aria-hidden": false, children: [
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
68
|
-
Button,
|
|
69
|
-
{
|
|
70
|
-
type: "button",
|
|
71
|
-
variant: "inline",
|
|
72
|
-
size: "sm",
|
|
73
|
-
shape: "round",
|
|
74
|
-
onClick: () => setIsWrapped((v) => !v),
|
|
75
|
-
"aria-pressed": isWrapped,
|
|
76
|
-
active: isWrapped,
|
|
77
|
-
title: isWrapped ? "Ombryd ikke tekst" : "Ombryd tekst",
|
|
78
|
-
children: /* @__PURE__ */ jsx(TextWrap, { size: 16 })
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ jsx(CopyButton, { size: "sm", shape: "round", variant: "inline", text: copy })
|
|
82
|
-
] }),
|
|
83
|
-
/* @__PURE__ */ jsx("pre", { className: styles.container, tabIndex: 0, onDoubleClick: handleDoubleClick, children: /* @__PURE__ */ jsx("code", { ref: codeRef, className: styles.code, children: hasChildren ? children : lines ? lines.map((line, i) => {
|
|
84
|
-
const isFirst = i === 0;
|
|
85
|
-
const isFrame = looksLikeStackFrame(line);
|
|
86
|
-
const cls = [
|
|
87
|
-
styles.line,
|
|
88
|
-
isFirst ? styles.lineFirst : "",
|
|
89
|
-
isFrame ? styles.lineFrame : ""
|
|
90
|
-
].filter(Boolean).join(" ");
|
|
91
|
-
return /* @__PURE__ */ jsxs("span", { className: cls, children: [
|
|
92
|
-
line,
|
|
93
|
-
"\n"
|
|
94
|
-
] }, i);
|
|
95
|
-
}) : text }) })
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export { CodeBlock };
|
|
@@ -1,135 +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
|
-
display: inline-flex;
|
|
22
|
-
align-items: flex-start;
|
|
23
|
-
max-inline-size: 100%;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Sizes */
|
|
27
|
-
.xs .container {
|
|
28
|
-
padding: var(--spacing-xxs);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.xs .code {
|
|
32
|
-
font-size: var(--font-size-xs);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.sm .container {
|
|
36
|
-
padding: var(--spacing-xs);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.sm .code {
|
|
40
|
-
font-size: var(--font-size-xs);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.md .code {
|
|
44
|
-
font-size: var(--font-size-sm);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.lg .code {
|
|
48
|
-
font-size: var(--font-size-base);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.hasActions .container {
|
|
52
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-sm) + var(--spacing-sm));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.xs.hasActions .container {
|
|
56
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-xxs) + var(--spacing-xxs));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.sm.hasActions .container {
|
|
60
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-xs) + var(--spacing-xs));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.md.hasActions .container {
|
|
64
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-sm) + var(--spacing-sm));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.lg.hasActions .container {
|
|
68
|
-
min-block-size: calc(var(--code-actions-h) + var(--spacing-sm) + var(--spacing-sm));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* Focus ring */
|
|
72
|
-
.wrapper:focus-within .container {
|
|
73
|
-
border-color: var(--color-border-selected);
|
|
74
|
-
box-shadow: var(--shadow-xs), var(--focus-ring);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* <code> */
|
|
78
|
-
.code {
|
|
79
|
-
display: block;
|
|
80
|
-
margin: 0;
|
|
81
|
-
font-family: var(--font-family-mono);
|
|
82
|
-
color: var(--color-fg-default);
|
|
83
|
-
flex: 1 1 auto;
|
|
84
|
-
min-width: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* Wrapping modes */
|
|
88
|
-
.wrap .code {
|
|
89
|
-
white-space: pre-wrap;
|
|
90
|
-
overflow-wrap: break-word;
|
|
91
|
-
word-break: normal;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.noWrap .code {
|
|
95
|
-
white-space: pre;
|
|
96
|
-
overflow-wrap: normal;
|
|
97
|
-
word-break: normal;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.actions {
|
|
101
|
-
position: absolute;
|
|
102
|
-
top: var(--code-actions-inset);
|
|
103
|
-
right: var(--code-actions-inset);
|
|
104
|
-
z-index: 3;
|
|
105
|
-
display: inline-flex;
|
|
106
|
-
gap: var(--spacing-xs);
|
|
107
|
-
align-items: center;
|
|
108
|
-
padding: var(--spacing-2xs);
|
|
109
|
-
border-radius: var(--border-radius-lg);
|
|
110
|
-
background: color-mix(in oklab, var(--color-bg-surface) 70%, transparent);
|
|
111
|
-
backdrop-filter: blur(6px);
|
|
112
|
-
opacity: 0;
|
|
113
|
-
pointer-events: none;
|
|
114
|
-
transition: opacity var(--transition-fast) var(--ease-standard);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.wrapper:hover .actions,
|
|
118
|
-
.wrapper:focus-within .actions {
|
|
119
|
-
opacity: 1;
|
|
120
|
-
pointer-events: auto;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.line {
|
|
124
|
-
display: inline;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.lineFirst {
|
|
128
|
-
font-family: inherit;
|
|
129
|
-
font-weight: 500;
|
|
130
|
-
color: var(--color-fg-default);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.lineFrame {
|
|
134
|
-
color: var(--color-fg-subtle);
|
|
135
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var lucideReact = require('lucide-react');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var styles = require('./CopyButton.module.css');
|
|
8
|
-
var Button = require('../button/Button');
|
|
9
|
-
var Input = require('../forms/input/Input');
|
|
10
|
-
var Hyperlink = require('../hyperlink/Hyperlink');
|
|
11
|
-
var ToastProvider = require('../toast/provider/ToastProvider');
|
|
12
|
-
|
|
13
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
|
|
15
|
-
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
16
|
-
|
|
17
|
-
function CopyButton(props) {
|
|
18
|
-
var _a, _b, _c;
|
|
19
|
-
const {
|
|
20
|
-
text,
|
|
21
|
-
variant = "outlined",
|
|
22
|
-
size = "sm",
|
|
23
|
-
children,
|
|
24
|
-
displayStyle,
|
|
25
|
-
disableIcon = false,
|
|
26
|
-
disableToast = false,
|
|
27
|
-
className,
|
|
28
|
-
style,
|
|
29
|
-
fullWidth,
|
|
30
|
-
disabled,
|
|
31
|
-
...rest
|
|
32
|
-
} = props;
|
|
33
|
-
const [copied, setCopied] = react.useState(false);
|
|
34
|
-
const toast = ToastProvider.useOptionalToast();
|
|
35
|
-
const buttonLabel = children;
|
|
36
|
-
const icon = disableIcon ? null : copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, {});
|
|
37
|
-
const handleCopySuccess = () => {
|
|
38
|
-
if (!disableIcon) {
|
|
39
|
-
setCopied(true);
|
|
40
|
-
window.setTimeout(() => setCopied(false), 1e3);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (!disableToast) {
|
|
44
|
-
toast == null ? void 0 : toast.showToast({
|
|
45
|
-
severity: "neutral",
|
|
46
|
-
message: "Kopieret"
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
const handleCopy = async () => {
|
|
51
|
-
try {
|
|
52
|
-
if (!window.isSecureContext || !navigator.clipboard) {
|
|
53
|
-
throw new Error("Clipboard API unavailable");
|
|
54
|
-
}
|
|
55
|
-
await navigator.clipboard.writeText(text);
|
|
56
|
-
handleCopySuccess();
|
|
57
|
-
} catch (err) {
|
|
58
|
-
console.error("Failed to copy:", err);
|
|
59
|
-
try {
|
|
60
|
-
const textarea = document.createElement("textarea");
|
|
61
|
-
textarea.value = text;
|
|
62
|
-
textarea.setAttribute("readonly", "");
|
|
63
|
-
textarea.style.position = "fixed";
|
|
64
|
-
textarea.style.left = "-9999px";
|
|
65
|
-
document.body.appendChild(textarea);
|
|
66
|
-
textarea.select();
|
|
67
|
-
const success = document.execCommand("copy");
|
|
68
|
-
document.body.removeChild(textarea);
|
|
69
|
-
if (success) {
|
|
70
|
-
handleCopySuccess();
|
|
71
|
-
}
|
|
72
|
-
} catch (fallbackErr) {
|
|
73
|
-
console.error("Fallback copy failed:", fallbackErr);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
if (displayStyle === "link") {
|
|
78
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Hyperlink.Hyperlink, { asChild: true, variant: "primary", icon, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
-
"button",
|
|
80
|
-
{
|
|
81
|
-
type: "button",
|
|
82
|
-
"aria-label": children ? "" : (_a = rest["aria-label"]) != null ? _a : "Kopier til udklipsholder",
|
|
83
|
-
onClick: (e) => {
|
|
84
|
-
e.preventDefault();
|
|
85
|
-
e.stopPropagation();
|
|
86
|
-
handleCopy();
|
|
87
|
-
},
|
|
88
|
-
className: [styles__default.default.link, copied ? styles__default.default.copied : "", className != null ? className : ""].filter(Boolean).join(" "),
|
|
89
|
-
style,
|
|
90
|
-
disabled,
|
|
91
|
-
children: buttonLabel
|
|
92
|
-
}
|
|
93
|
-
) });
|
|
94
|
-
}
|
|
95
|
-
if (displayStyle === "field") {
|
|
96
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
97
|
-
Input.Input,
|
|
98
|
-
{
|
|
99
|
-
value: text,
|
|
100
|
-
readOnly: true,
|
|
101
|
-
disabled,
|
|
102
|
-
fullWidth,
|
|
103
|
-
className,
|
|
104
|
-
style,
|
|
105
|
-
inputSize: size,
|
|
106
|
-
variant: "outlined",
|
|
107
|
-
buttonLabel: typeof buttonLabel === "string" ? buttonLabel : void 0,
|
|
108
|
-
buttonIcon: icon,
|
|
109
|
-
onButtonClick: () => {
|
|
110
|
-
void handleCopy();
|
|
111
|
-
},
|
|
112
|
-
"aria-label": (_b = rest["aria-label"]) != null ? _b : "Kopier til udklipsholder"
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
117
|
-
Button.Button,
|
|
118
|
-
{
|
|
119
|
-
...rest,
|
|
120
|
-
"aria-label": children ? "" : (_c = rest["aria-label"]) != null ? _c : "Kopier til udklipsholder",
|
|
121
|
-
onClick: (e) => {
|
|
122
|
-
e.preventDefault();
|
|
123
|
-
e.stopPropagation();
|
|
124
|
-
handleCopy();
|
|
125
|
-
},
|
|
126
|
-
variant,
|
|
127
|
-
size,
|
|
128
|
-
className,
|
|
129
|
-
style,
|
|
130
|
-
disabled,
|
|
131
|
-
children: [
|
|
132
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.container} ${copied ? styles__default.default.copied : ""}`, children: icon }),
|
|
133
|
-
buttonLabel
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
exports.CopyButton = CopyButton;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ReactNode, ComponentProps } from 'react';
|
|
2
|
-
import { Button, ButtonSize, ButtonVariant } from '../button/Button';
|
|
3
|
-
interface CopyButtonProps {
|
|
4
|
-
text: string;
|
|
5
|
-
variant?: ButtonVariant;
|
|
6
|
-
size?: ButtonSize;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
displayStyle?: 'button' | 'link' | 'field';
|
|
9
|
-
disableIcon?: boolean;
|
|
10
|
-
disableToast?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare function CopyButton(props: CopyButtonProps & ComponentProps<typeof Button>): ReactNode;
|
|
13
|
-
export {};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { Check, Copy } from 'lucide-react';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import styles from './CopyButton.module.css';
|
|
6
|
-
import { Button } from '../button/Button';
|
|
7
|
-
import { Input } from '../forms/input/Input';
|
|
8
|
-
import { Hyperlink } from '../hyperlink/Hyperlink';
|
|
9
|
-
import { useOptionalToast } from '../toast/provider/ToastProvider';
|
|
10
|
-
|
|
11
|
-
function CopyButton(props) {
|
|
12
|
-
var _a, _b, _c;
|
|
13
|
-
const {
|
|
14
|
-
text,
|
|
15
|
-
variant = "outlined",
|
|
16
|
-
size = "sm",
|
|
17
|
-
children,
|
|
18
|
-
displayStyle,
|
|
19
|
-
disableIcon = false,
|
|
20
|
-
disableToast = false,
|
|
21
|
-
className,
|
|
22
|
-
style,
|
|
23
|
-
fullWidth,
|
|
24
|
-
disabled,
|
|
25
|
-
...rest
|
|
26
|
-
} = props;
|
|
27
|
-
const [copied, setCopied] = useState(false);
|
|
28
|
-
const toast = useOptionalToast();
|
|
29
|
-
const buttonLabel = children;
|
|
30
|
-
const icon = disableIcon ? null : copied ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Copy, {});
|
|
31
|
-
const handleCopySuccess = () => {
|
|
32
|
-
if (!disableIcon) {
|
|
33
|
-
setCopied(true);
|
|
34
|
-
window.setTimeout(() => setCopied(false), 1e3);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (!disableToast) {
|
|
38
|
-
toast == null ? void 0 : toast.showToast({
|
|
39
|
-
severity: "neutral",
|
|
40
|
-
message: "Kopieret"
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const handleCopy = async () => {
|
|
45
|
-
try {
|
|
46
|
-
if (!window.isSecureContext || !navigator.clipboard) {
|
|
47
|
-
throw new Error("Clipboard API unavailable");
|
|
48
|
-
}
|
|
49
|
-
await navigator.clipboard.writeText(text);
|
|
50
|
-
handleCopySuccess();
|
|
51
|
-
} catch (err) {
|
|
52
|
-
console.error("Failed to copy:", err);
|
|
53
|
-
try {
|
|
54
|
-
const textarea = document.createElement("textarea");
|
|
55
|
-
textarea.value = text;
|
|
56
|
-
textarea.setAttribute("readonly", "");
|
|
57
|
-
textarea.style.position = "fixed";
|
|
58
|
-
textarea.style.left = "-9999px";
|
|
59
|
-
document.body.appendChild(textarea);
|
|
60
|
-
textarea.select();
|
|
61
|
-
const success = document.execCommand("copy");
|
|
62
|
-
document.body.removeChild(textarea);
|
|
63
|
-
if (success) {
|
|
64
|
-
handleCopySuccess();
|
|
65
|
-
}
|
|
66
|
-
} catch (fallbackErr) {
|
|
67
|
-
console.error("Fallback copy failed:", fallbackErr);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
if (displayStyle === "link") {
|
|
72
|
-
return /* @__PURE__ */ jsx(Hyperlink, { asChild: true, variant: "primary", icon, children: /* @__PURE__ */ jsx(
|
|
73
|
-
"button",
|
|
74
|
-
{
|
|
75
|
-
type: "button",
|
|
76
|
-
"aria-label": children ? "" : (_a = rest["aria-label"]) != null ? _a : "Kopier til udklipsholder",
|
|
77
|
-
onClick: (e) => {
|
|
78
|
-
e.preventDefault();
|
|
79
|
-
e.stopPropagation();
|
|
80
|
-
handleCopy();
|
|
81
|
-
},
|
|
82
|
-
className: [styles.link, copied ? styles.copied : "", className != null ? className : ""].filter(Boolean).join(" "),
|
|
83
|
-
style,
|
|
84
|
-
disabled,
|
|
85
|
-
children: buttonLabel
|
|
86
|
-
}
|
|
87
|
-
) });
|
|
88
|
-
}
|
|
89
|
-
if (displayStyle === "field") {
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
Input,
|
|
92
|
-
{
|
|
93
|
-
value: text,
|
|
94
|
-
readOnly: true,
|
|
95
|
-
disabled,
|
|
96
|
-
fullWidth,
|
|
97
|
-
className,
|
|
98
|
-
style,
|
|
99
|
-
inputSize: size,
|
|
100
|
-
variant: "outlined",
|
|
101
|
-
buttonLabel: typeof buttonLabel === "string" ? buttonLabel : void 0,
|
|
102
|
-
buttonIcon: icon,
|
|
103
|
-
onButtonClick: () => {
|
|
104
|
-
void handleCopy();
|
|
105
|
-
},
|
|
106
|
-
"aria-label": (_b = rest["aria-label"]) != null ? _b : "Kopier til udklipsholder"
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
return /* @__PURE__ */ jsxs(
|
|
111
|
-
Button,
|
|
112
|
-
{
|
|
113
|
-
...rest,
|
|
114
|
-
"aria-label": children ? "" : (_c = rest["aria-label"]) != null ? _c : "Kopier til udklipsholder",
|
|
115
|
-
onClick: (e) => {
|
|
116
|
-
e.preventDefault();
|
|
117
|
-
e.stopPropagation();
|
|
118
|
-
handleCopy();
|
|
119
|
-
},
|
|
120
|
-
variant,
|
|
121
|
-
size,
|
|
122
|
-
className,
|
|
123
|
-
style,
|
|
124
|
-
disabled,
|
|
125
|
-
children: [
|
|
126
|
-
/* @__PURE__ */ jsx("span", { className: `${styles.container} ${copied ? styles.copied : ""}`, children: icon }),
|
|
127
|
-
buttonLabel
|
|
128
|
-
]
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export { CopyButton };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.container,
|
|
2
|
-
.link {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: var(--spacing-xxs);
|
|
6
|
-
background-color: unset;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.link {
|
|
10
|
-
appearance: none;
|
|
11
|
-
border: none;
|
|
12
|
-
padding: 0;
|
|
13
|
-
font: inherit;
|
|
14
|
-
color: inherit;
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
vertical-align: middle;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.copied {
|
|
20
|
-
color: var(--color-status-success);
|
|
21
|
-
transition: color ease-in 0.1s;
|
|
22
|
-
}
|