@dbcdk/react-components 0.0.103 → 0.0.104
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/assets/logo.cjs +87 -0
- package/dist/assets/logo.js +85 -0
- package/dist/client.cjs +587 -0
- package/dist/client.d.ts +83 -0
- package/dist/client.js +84 -0
- package/dist/components/accordion/Accordion.cjs +103 -0
- package/dist/components/accordion/Accordion.js +97 -0
- package/dist/components/accordion/Accordion.module.css +41 -0
- package/dist/components/accordion/components/AccordionRow.cjs +115 -0
- package/dist/components/accordion/components/AccordionRow.js +109 -0
- package/dist/components/accordion/components/AccordionRow.module.css +99 -0
- package/dist/components/alert/Alert.cjs +52 -0
- package/dist/components/alert/Alert.d.ts +2 -1
- package/dist/components/alert/Alert.js +46 -0
- package/dist/components/alert/Alert.module.css +97 -0
- package/dist/components/app-header/AppHeader.cjs +14 -0
- package/dist/components/app-header/AppHeader.js +8 -0
- package/dist/components/app-header/AppHeader.module.css +74 -0
- package/dist/components/attribute-chip/AttributeChip.cjs +22 -0
- package/dist/components/attribute-chip/AttributeChip.js +16 -0
- package/dist/components/attribute-chip/AttributeChip.module.css +65 -0
- package/dist/components/avatar/Avatar.cjs +111 -0
- package/dist/components/avatar/Avatar.js +86 -0
- package/dist/components/avatar/Avatar.module.css +91 -0
- package/dist/components/breadcrumbs/Breadcrumbs.cjs +24 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +18 -0
- package/dist/components/breadcrumbs/Breadcrumbs.module.css +80 -0
- package/dist/components/button/Button.cjs +149 -0
- package/dist/components/button/Button.js +124 -0
- package/dist/components/button/Button.module.css +260 -0
- package/dist/components/button-select/ButtonSelect.cjs +35 -0
- package/dist/components/button-select/ButtonSelect.js +29 -0
- package/dist/components/button-select/ButtonSelect.module.css +40 -0
- package/dist/components/card/Card.cjs +112 -0
- package/dist/components/card/Card.d.ts +2 -1
- package/dist/components/card/Card.js +106 -0
- package/dist/components/card/Card.module.css +187 -0
- package/dist/components/card/components/CardMeta.cjs +62 -0
- package/dist/components/card/components/CardMeta.js +55 -0
- package/dist/components/card/components/CardMeta.module.css +55 -0
- package/dist/components/card-container/CardContainer.cjs +34 -0
- package/dist/components/card-container/CardContainer.js +28 -0
- package/dist/components/card-container/CardContainer.module.css +63 -0
- package/dist/components/chip/Chip.cjs +65 -0
- package/dist/components/chip/Chip.js +59 -0
- package/dist/components/chip/Chip.module.css +236 -0
- package/dist/components/circle/Circle.cjs +33 -0
- package/dist/components/circle/Circle.js +27 -0
- package/dist/components/circle/Circle.module.css +128 -0
- package/dist/components/clear-button/ClearButton.cjs +33 -0
- package/dist/components/clear-button/ClearButton.d.ts +2 -1
- package/dist/components/clear-button/ClearButton.js +27 -0
- package/dist/components/clear-button/ClearButton.module.css +26 -0
- package/dist/components/code-block/CodeBlock.cjs +97 -0
- package/dist/components/code-block/CodeBlock.js +91 -0
- package/dist/components/code-block/CodeBlock.module.css +124 -0
- package/dist/components/copy-button/CopyButton.cjs +139 -0
- package/dist/components/copy-button/CopyButton.js +133 -0
- package/dist/components/copy-button/CopyButton.module.css +22 -0
- package/dist/components/datetime-picker/DateTimePicker.cjs +559 -0
- package/dist/components/datetime-picker/DateTimePicker.js +553 -0
- package/dist/components/datetime-picker/DateTimePicker.module.css +155 -0
- package/dist/components/datetime-picker/dateTimeHelpers.cjs +179 -0
- package/dist/components/datetime-picker/dateTimeHelpers.js +160 -0
- package/dist/components/divider/Divider.cjs +22 -0
- package/dist/components/divider/Divider.js +20 -0
- package/dist/components/filter-field/FilterField.cjs +296 -0
- package/dist/components/filter-field/FilterField.js +289 -0
- package/dist/components/filter-field/FilterField.module.css +379 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.cjs +115 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +108 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +59 -0
- package/dist/components/forms/checkbox/Checkbox.cjs +88 -0
- package/dist/components/forms/checkbox/Checkbox.js +82 -0
- package/dist/components/forms/checkbox/Checkbox.module.css +104 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.cjs +121 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.js +115 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +115 -0
- package/dist/components/forms/form-select/FormSelect.cjs +191 -0
- package/dist/components/forms/form-select/FormSelect.js +166 -0
- package/dist/components/forms/form-select/FormSelect.module.css +236 -0
- package/dist/components/forms/input/Input.cjs +188 -0
- package/dist/components/forms/input/Input.d.ts +1 -0
- package/dist/components/forms/input/Input.js +182 -0
- package/dist/components/forms/input/Input.module.css +468 -0
- package/dist/components/forms/input-container/InputContainer.cjs +72 -0
- package/dist/components/forms/input-container/InputContainer.js +66 -0
- package/dist/components/forms/input-container/InputContainer.module.css +59 -0
- package/dist/components/forms/multi-select/MultiSelect.cjs +227 -0
- package/dist/components/forms/multi-select/MultiSelect.js +225 -0
- package/dist/components/forms/radio-buttons/RadioButton.cjs +91 -0
- package/dist/components/forms/radio-buttons/RadioButton.js +85 -0
- package/dist/components/forms/radio-buttons/RadioButtonGroup.cjs +74 -0
- package/dist/components/forms/radio-buttons/RadioButtonGroup.js +72 -0
- package/dist/components/forms/radio-buttons/RadioButtons.module.css +118 -0
- package/dist/components/forms/select/Select.cjs +286 -0
- package/dist/components/forms/select/Select.js +280 -0
- package/dist/components/forms/select/Select.module.css +32 -0
- package/dist/components/forms/text-area/Textarea.cjs +116 -0
- package/dist/components/forms/text-area/Textarea.js +110 -0
- package/dist/components/forms/text-area/Textarea.module.css +70 -0
- package/dist/components/forms/typeahead/Typeahead.cjs +792 -0
- package/dist/components/forms/typeahead/Typeahead.js +768 -0
- package/dist/components/forms/typeahead/Typeahead.module.css +38 -0
- package/dist/components/grid/Grid.cjs +45 -0
- package/dist/components/grid/Grid.js +38 -0
- package/dist/components/grid/Grid.module.css +35 -0
- package/dist/components/headline/CollapsibleHeadline.cjs +80 -0
- package/dist/components/headline/CollapsibleHeadline.js +74 -0
- package/dist/components/headline/Headline.cjs +59 -0
- package/dist/components/headline/Headline.js +53 -0
- package/dist/components/headline/Headline.module.css +185 -0
- package/dist/components/hyperlink/Hyperlink.cjs +107 -0
- package/dist/components/hyperlink/Hyperlink.js +82 -0
- package/dist/components/hyperlink/Hyperlink.module.css +121 -0
- package/dist/components/icon/Icon.cjs +27 -0
- package/dist/components/icon/Icon.js +20 -0
- package/dist/components/icon/Icon.module.css +36 -0
- package/dist/components/inline-status/InlineStatus.cjs +39 -0
- package/dist/components/inline-status/InlineStatus.js +33 -0
- package/dist/components/inline-status/InlineStatus.module.css +92 -0
- package/dist/components/interval-select/IntervalSelect.cjs +203 -0
- package/dist/components/interval-select/IntervalSelect.js +201 -0
- package/dist/components/json-viewer/HighlightedText.cjs +13 -0
- package/dist/components/json-viewer/HighlightedText.js +11 -0
- package/dist/components/json-viewer/JsonNode.cjs +124 -0
- package/dist/components/json-viewer/JsonNode.js +118 -0
- package/dist/components/json-viewer/JsonViewer.cjs +164 -0
- package/dist/components/json-viewer/JsonViewer.js +158 -0
- package/dist/components/json-viewer/JsonViewer.module.css +346 -0
- package/dist/components/json-viewer/types.cjs +2 -0
- package/dist/components/json-viewer/types.js +1 -0
- package/dist/components/json-viewer/useClipboardStatus.cjs +15 -0
- package/dist/components/json-viewer/useClipboardStatus.js +13 -0
- package/dist/components/json-viewer/utils.cjs +126 -0
- package/dist/components/json-viewer/utils.js +111 -0
- package/dist/components/media-card/MediaCard.cjs +60 -0
- package/dist/components/media-card/MediaCard.d.ts +19 -0
- package/dist/components/media-card/MediaCard.js +54 -0
- package/dist/components/media-card/MediaCard.module.css +92 -0
- package/dist/components/menu/Menu.cjs +287 -0
- package/dist/components/menu/Menu.js +262 -0
- package/dist/components/menu/Menu.module.css +220 -0
- package/dist/components/meta-bar/MetaBar.cjs +28 -0
- package/dist/components/meta-bar/MetaBar.js +22 -0
- package/dist/components/meta-bar/MetaBar.module.css +27 -0
- package/dist/components/nav-bar/NavBar.cjs +95 -0
- package/dist/components/nav-bar/NavBar.d.ts +1 -1
- package/dist/components/nav-bar/NavBar.js +89 -0
- package/dist/components/nav-bar/NavBar.module.css +225 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.cjs +30 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.js +24 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +54 -0
- package/dist/components/overlay/modal/Modal.cjs +189 -0
- package/dist/components/overlay/modal/Modal.d.ts +2 -1
- package/dist/components/overlay/modal/Modal.js +183 -0
- package/dist/components/overlay/modal/Modal.module.css +112 -0
- package/dist/components/overlay/modal/provider/ModalProvider.cjs +98 -0
- package/dist/components/overlay/modal/provider/ModalProvider.js +95 -0
- package/dist/components/overlay/side-panel/SidePanel.cjs +173 -0
- package/dist/components/overlay/side-panel/SidePanel.js +167 -0
- package/dist/components/overlay/side-panel/SidePanel.module.css +177 -0
- package/dist/components/overlay/side-panel/useSidePanel.cjs +16 -0
- package/dist/components/overlay/side-panel/useSidePanel.js +14 -0
- package/dist/components/overlay/tooltip/Tooltip.cjs +34 -0
- package/dist/components/overlay/tooltip/Tooltip.js +32 -0
- package/dist/components/overlay/tooltip/Tooltip.module.css +104 -0
- package/dist/components/overlay/tooltip/TooltipProvider.cjs +238 -0
- package/dist/components/overlay/tooltip/TooltipProvider.js +231 -0
- package/dist/components/overlay/tooltip/useTooltipTrigger.cjs +117 -0
- package/dist/components/overlay/tooltip/useTooltipTrigger.js +115 -0
- package/dist/components/page/Page.cjs +63 -0
- package/dist/components/page/Page.js +57 -0
- package/dist/components/page/Page.module.css +95 -0
- package/dist/components/page-layout/PageLayout.cjs +97 -0
- package/dist/components/page-layout/PageLayout.d.ts +0 -5
- package/dist/components/page-layout/PageLayout.js +91 -0
- package/dist/components/page-layout/PageLayout.module.css +236 -0
- package/dist/components/page-layout/components/footer/Footer.cjs +53 -0
- package/dist/components/page-layout/components/footer/Footer.js +47 -0
- package/dist/components/page-layout/components/footer/Footer.module.css +89 -0
- package/dist/components/pagination/Pagination.cjs +160 -0
- package/dist/components/pagination/Pagination.js +154 -0
- package/dist/components/pagination/Pagination.module.css +25 -0
- package/dist/components/panel/Panel.cjs +38 -0
- package/dist/components/panel/Panel.js +32 -0
- package/dist/components/panel/Panel.module.css +30 -0
- package/dist/components/popover/Popover.cjs +331 -0
- package/dist/components/popover/Popover.js +307 -0
- package/dist/components/popover/Popover.module.css +52 -0
- package/dist/components/search-box/SearchBox.cjs +274 -0
- package/dist/components/search-box/SearchBox.js +268 -0
- package/dist/components/search-box/SearchBox.module.css +27 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.cjs +127 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +121 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +174 -0
- package/dist/components/sidebar/Sidebar.cjs +39 -0
- package/dist/components/sidebar/Sidebar.js +37 -0
- package/dist/components/sidebar/components/SidebarItem.cjs +29 -0
- package/dist/components/sidebar/components/SidebarItem.js +27 -0
- package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.cjs +133 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +127 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +29 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.cjs +214 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +207 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +260 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.cjs +54 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +47 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +106 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.cjs +61 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +55 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +20 -0
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.cjs +97 -0
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +91 -0
- package/dist/components/sidebar/providers/SidebarProvider.cjs +223 -0
- package/dist/components/sidebar/providers/SidebarProvider.js +220 -0
- package/dist/components/skeleton-loader/SkeletonLoader.cjs +442 -0
- package/dist/components/skeleton-loader/SkeletonLoader.js +440 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.cjs +42 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +36 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +51 -0
- package/dist/components/split-button/SplitButton.cjs +46 -0
- package/dist/components/split-button/SplitButton.js +40 -0
- package/dist/components/split-button/SplitButton.module.css +32 -0
- package/dist/components/split-pane/SplitPane.cjs +177 -0
- package/dist/components/split-pane/SplitPane.js +168 -0
- package/dist/components/split-pane/SplitPane.module.css +111 -0
- package/dist/components/split-pane/provider/SplitPaneContext.cjs +129 -0
- package/dist/components/split-pane/provider/SplitPaneContext.js +121 -0
- package/dist/components/stack/Stack.cjs +47 -0
- package/dist/components/stack/Stack.d.ts +1 -1
- package/dist/components/stack/Stack.js +41 -0
- package/dist/components/stack/Stack.module.css +61 -0
- package/dist/components/state-page/StatePage.cjs +48 -0
- package/dist/components/state-page/StatePage.js +42 -0
- package/dist/components/state-page/StatePage.module.css +9 -0
- package/dist/components/state-page/empty.cjs +664 -0
- package/dist/components/state-page/empty.js +662 -0
- package/dist/components/state-page/error.cjs +310 -0
- package/dist/components/state-page/error.js +308 -0
- package/dist/components/state-page/notFound.cjs +243 -0
- package/dist/components/state-page/notFound.js +241 -0
- package/dist/components/sticky-footer-layout/StickyFooterLayout.cjs +98 -0
- package/dist/components/sticky-footer-layout/StickyFooterLayout.js +96 -0
- package/dist/components/table/Table.cjs +216 -0
- package/dist/components/table/Table.js +210 -0
- package/dist/components/table/Table.module.css +534 -0
- package/dist/components/table/Table.types.cjs +2 -0
- package/dist/components/table/Table.types.js +1 -0
- package/dist/components/table/TanstackTable.cjs +172 -0
- package/dist/components/table/TanstackTable.js +147 -0
- package/dist/components/table/components/TableBody.cjs +50 -0
- package/dist/components/table/components/TableBody.js +44 -0
- package/dist/components/table/components/TableHeader.cjs +56 -0
- package/dist/components/table/components/TableHeader.js +50 -0
- package/dist/components/table/components/TableHeaderCell.cjs +69 -0
- package/dist/components/table/components/TableHeaderCell.js +63 -0
- package/dist/components/table/components/TableLoadingBody.cjs +35 -0
- package/dist/components/table/components/TableLoadingBody.js +29 -0
- package/dist/components/table/components/TablePagination.cjs +2 -0
- package/dist/components/table/components/TablePagination.js +1 -0
- package/dist/components/table/components/TableRow.cjs +151 -0
- package/dist/components/table/components/TableRow.js +145 -0
- package/dist/components/table/components/TableSelectionCell.cjs +41 -0
- package/dist/components/table/components/TableSelectionCell.js +35 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.cjs +25 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.js +19 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.module.css +22 -0
- package/dist/components/table/components/empty-state/EmptyState.cjs +33 -0
- package/dist/components/table/components/empty-state/EmptyState.js +31 -0
- package/dist/components/table/components/empty-state/EmptyState.module.css +4 -0
- package/dist/components/table/components/table-settings/TableSettings.cjs +139 -0
- package/dist/components/table/components/table-settings/TableSettings.js +137 -0
- package/dist/components/table/hooks/useTableRowInteractions.cjs +46 -0
- package/dist/components/table/hooks/useTableRowInteractions.js +44 -0
- package/dist/components/table/table.classes.cjs +49 -0
- package/dist/components/table/table.classes.js +40 -0
- package/dist/components/table/table.utils.cjs +57 -0
- package/dist/components/table/table.utils.js +45 -0
- package/dist/components/table/tanstackTable.utils.cjs +166 -0
- package/dist/components/table/tanstackTable.utils.js +159 -0
- package/dist/components/tabs/Tabs.cjs +172 -0
- package/dist/components/tabs/Tabs.js +166 -0
- package/dist/components/tabs/Tabs.module.css +261 -0
- package/dist/components/theme-button/ThemeButton.cjs +78 -0
- package/dist/components/theme-button/ThemeButton.js +75 -0
- package/dist/components/toast/Toast.cjs +68 -0
- package/dist/components/toast/Toast.js +62 -0
- package/dist/components/toast/Toast.module.css +161 -0
- package/dist/components/toast/provider/ToastProvider.cjs +105 -0
- package/dist/components/toast/provider/ToastProvider.js +97 -0
- package/dist/components/user-display/UserDisplay.cjs +22 -0
- package/dist/components/user-display/UserDisplay.js +16 -0
- package/dist/components/user-display/UserDisplay.module.css +25 -0
- package/dist/constants/chart-colors.cjs +10 -0
- package/dist/constants/chart-colors.js +8 -0
- package/dist/constants/chart-colors.types.cjs +2 -0
- package/dist/constants/chart-colors.types.js +1 -0
- package/dist/constants/severity.cjs +30 -0
- package/dist/constants/severity.js +26 -0
- package/dist/constants/severity.types.cjs +2 -0
- package/dist/constants/severity.types.js +1 -0
- package/dist/constants/sizes.cjs +11 -0
- package/dist/constants/sizes.js +9 -0
- package/dist/hooks/useDeviceSize.cjs +35 -0
- package/dist/hooks/useDeviceSize.js +33 -0
- package/dist/hooks/useListNavigation.cjs +237 -0
- package/dist/hooks/useListNavigation.js +235 -0
- package/dist/hooks/usePagination.cjs +144 -0
- package/dist/hooks/usePagination.js +142 -0
- package/dist/hooks/useSorting.cjs +119 -0
- package/dist/hooks/useSorting.js +117 -0
- package/dist/hooks/useTableData.cjs +53 -0
- package/dist/hooks/useTableData.js +51 -0
- package/dist/hooks/useTableSelection.cjs +172 -0
- package/dist/hooks/useTableSelection.js +170 -0
- package/dist/hooks/useTableSettings.cjs +90 -0
- package/dist/hooks/useTableSettings.js +87 -0
- package/dist/hooks/useTheme.cjs +64 -0
- package/dist/hooks/useTheme.js +62 -0
- package/dist/hooks/useTimeDuration.cjs +72 -0
- package/dist/hooks/useTimeDuration.js +70 -0
- package/dist/hooks/useViewportFill.cjs +82 -0
- package/dist/hooks/useViewportFill.js +80 -0
- package/dist/index.cjs +161 -12908
- package/dist/index.css +67 -7357
- package/dist/index.d.ts +0 -58
- package/dist/index.js +24 -12809
- package/dist/styles/animation.cjs +9 -0
- package/dist/styles/animation.js +7 -0
- package/dist/styles/themes/dbc/colors.css +5 -0
- package/dist/styles/themes/types.cjs +2 -0
- package/dist/styles/themes/types.js +1 -0
- package/dist/tanstack.cjs +18 -2717
- package/dist/tanstack.js +3 -2701
- package/dist/types/a11y-props.types.cjs +2 -0
- package/dist/types/a11y-props.types.js +1 -0
- package/dist/types/assets.d.cjs +2 -0
- package/dist/types/assets.d.js +1 -0
- package/dist/types/css.d.cjs +2 -0
- package/dist/types/css.d.js +1 -0
- package/dist/types/sizes.types.cjs +2 -0
- package/dist/types/sizes.types.js +1 -0
- package/dist/utils/arrays/nested-filtering.cjs +40 -0
- package/dist/utils/arrays/nested-filtering.js +38 -0
- package/dist/utils/date/formatDate.cjs +35 -0
- package/dist/utils/date/formatDate.js +33 -0
- package/dist/utils/localStorage.utils.cjs +53 -0
- package/dist/utils/localStorage.utils.js +49 -0
- package/dist/utils/text/get-highlighted-segments.cjs +49 -0
- package/dist/utils/text/get-highlighted-segments.js +47 -0
- package/package.json +8 -3
- package/dist/tanstack.css +0 -1385
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { X } from 'lucide-react';
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
|
+
import { Button } from '../../../components/button/Button';
|
|
6
|
+
import { Headline } from '../../../components/headline/Headline';
|
|
7
|
+
import { MOTION_MS } from '../../../styles/animation';
|
|
8
|
+
import styles from './SidePanel.module.css';
|
|
9
|
+
|
|
10
|
+
function SidePanel({
|
|
11
|
+
isOpen,
|
|
12
|
+
onClose,
|
|
13
|
+
children,
|
|
14
|
+
header,
|
|
15
|
+
subheader,
|
|
16
|
+
headerAddition,
|
|
17
|
+
actions,
|
|
18
|
+
showBackdrop = true,
|
|
19
|
+
severity,
|
|
20
|
+
showHeaderMarker = true,
|
|
21
|
+
width = "400px",
|
|
22
|
+
details,
|
|
23
|
+
detailsHeader = "Output",
|
|
24
|
+
detailsWidth = "420px",
|
|
25
|
+
onCloseDetails,
|
|
26
|
+
detailsHeaderAddition,
|
|
27
|
+
...props
|
|
28
|
+
}) {
|
|
29
|
+
const [mounted, setMounted] = useState(false);
|
|
30
|
+
const [shouldRender, setShouldRender] = useState(isOpen);
|
|
31
|
+
const [isActive, setIsActive] = useState(false);
|
|
32
|
+
const panelRef = useRef(null);
|
|
33
|
+
useEffect(() => setMounted(true), []);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (isOpen) setShouldRender(true);
|
|
36
|
+
}, [isOpen]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (!isOpen) return;
|
|
39
|
+
const handleKeyDown = (e) => {
|
|
40
|
+
if (e.key === "Escape") {
|
|
41
|
+
e.stopPropagation();
|
|
42
|
+
onClose();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
46
|
+
return () => {
|
|
47
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
48
|
+
};
|
|
49
|
+
}, [isOpen, onClose]);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (!shouldRender) return;
|
|
52
|
+
if (!isOpen) {
|
|
53
|
+
setIsActive(false);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const raf = requestAnimationFrame(() => setIsActive(true));
|
|
57
|
+
return () => cancelAnimationFrame(raf);
|
|
58
|
+
}, [isOpen, shouldRender]);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (!shouldRender) return;
|
|
61
|
+
const el = panelRef.current;
|
|
62
|
+
if (!el) return;
|
|
63
|
+
const onTransitionEnd = (e) => {
|
|
64
|
+
if (e.target !== el) return;
|
|
65
|
+
if (e.propertyName !== "transform") return;
|
|
66
|
+
if (!isOpen) setShouldRender(false);
|
|
67
|
+
};
|
|
68
|
+
el.addEventListener("transitionend", onTransitionEnd);
|
|
69
|
+
return () => el.removeEventListener("transitionend", onTransitionEnd);
|
|
70
|
+
}, [isOpen, shouldRender]);
|
|
71
|
+
if (!mounted) return null;
|
|
72
|
+
if (!shouldRender) return null;
|
|
73
|
+
const hasDetails = Boolean(details);
|
|
74
|
+
return createPortal(
|
|
75
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76
|
+
showBackdrop && /* @__PURE__ */ jsx(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: `${styles.backdrop} ${isActive ? styles.backdropOpen : ""}`,
|
|
80
|
+
onClick: (e) => {
|
|
81
|
+
e.stopPropagation();
|
|
82
|
+
onClose(e);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ jsxs(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
ref: panelRef,
|
|
90
|
+
...props,
|
|
91
|
+
className: `${styles.sidePanel} ${isActive ? styles.open : ""} ${hasDetails ? styles.withDetails : styles.noDetails}`,
|
|
92
|
+
style: {
|
|
93
|
+
"--side-panel-width": width,
|
|
94
|
+
"--details-width": detailsWidth,
|
|
95
|
+
"--panel-dur": MOTION_MS.panelSlide + "ms"
|
|
96
|
+
},
|
|
97
|
+
"data-cy": "details-panel",
|
|
98
|
+
role: "dialog",
|
|
99
|
+
"aria-modal": "true",
|
|
100
|
+
children: [
|
|
101
|
+
hasDetails ? /* @__PURE__ */ jsxs("aside", { className: styles.detailsCol, "data-cy": "details-panel-details", children: [
|
|
102
|
+
/* @__PURE__ */ jsxs("div", { className: styles.detailsHeader, children: [
|
|
103
|
+
/* @__PURE__ */ jsx("div", { className: styles.detailsTitle, children: detailsHeader }),
|
|
104
|
+
/* @__PURE__ */ jsxs("div", { className: styles.detailsHeaderActions, children: [
|
|
105
|
+
detailsHeaderAddition,
|
|
106
|
+
onCloseDetails ? /* @__PURE__ */ jsx(
|
|
107
|
+
Button,
|
|
108
|
+
{
|
|
109
|
+
type: "button",
|
|
110
|
+
size: "sm",
|
|
111
|
+
variant: "outlined",
|
|
112
|
+
onClick: (e) => {
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
onCloseDetails();
|
|
115
|
+
},
|
|
116
|
+
children: "Luk"
|
|
117
|
+
}
|
|
118
|
+
) : null
|
|
119
|
+
] })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ jsx("div", { className: styles.detailsContent, children: details })
|
|
122
|
+
] }) : null,
|
|
123
|
+
/* @__PURE__ */ jsxs("section", { className: styles.mainCol, "data-cy": "details-panel-main", children: [
|
|
124
|
+
/* @__PURE__ */ jsx("div", { className: styles.header, children: /* @__PURE__ */ jsxs("div", { className: "dbc-flex dbc-justify-between", children: [
|
|
125
|
+
/* @__PURE__ */ jsx(
|
|
126
|
+
Headline,
|
|
127
|
+
{
|
|
128
|
+
size: 2,
|
|
129
|
+
disableMargin: true,
|
|
130
|
+
severity,
|
|
131
|
+
marker: showHeaderMarker,
|
|
132
|
+
subheader,
|
|
133
|
+
children: header
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ jsxs("span", { className: "dbc-flex dbc-items-center dbc-gap-xs", children: [
|
|
137
|
+
headerAddition,
|
|
138
|
+
/* @__PURE__ */ jsx(
|
|
139
|
+
Button,
|
|
140
|
+
{
|
|
141
|
+
type: "button",
|
|
142
|
+
size: "md",
|
|
143
|
+
shape: "round",
|
|
144
|
+
variant: "inline",
|
|
145
|
+
onClick: (e) => {
|
|
146
|
+
e.stopPropagation();
|
|
147
|
+
onClose(e);
|
|
148
|
+
},
|
|
149
|
+
"aria-label": "Luk panel",
|
|
150
|
+
"data-cy": "side-panel-close-button",
|
|
151
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
] })
|
|
155
|
+
] }) }),
|
|
156
|
+
/* @__PURE__ */ jsx("div", { className: styles.content, "data-cy": "details-panel-content", children }),
|
|
157
|
+
actions && /* @__PURE__ */ jsx("div", { className: styles.actions, children: actions })
|
|
158
|
+
] })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
] }),
|
|
163
|
+
document.body
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export { SidePanel };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
.sidePanel {
|
|
2
|
+
--col-pad: var(--spacing-md);
|
|
3
|
+
|
|
4
|
+
--panel-ease: cubic-bezier(0.22, 1, 0.36, 1); /* smooth spring-ish without overshoot */
|
|
5
|
+
|
|
6
|
+
/* Shadow + edge */
|
|
7
|
+
--shadow-opacity: 0.22;
|
|
8
|
+
--edge-opacity: 0.12;
|
|
9
|
+
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
padding: 0;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
|
|
14
|
+
position: fixed;
|
|
15
|
+
right: 0;
|
|
16
|
+
top: 0;
|
|
17
|
+
|
|
18
|
+
background-color: var(--color-bg-surface);
|
|
19
|
+
z-index: var(--z-drawer);
|
|
20
|
+
|
|
21
|
+
transform: translate3d(100%, 0, 0);
|
|
22
|
+
transition: transform var(--panel-dur) var(--panel-ease);
|
|
23
|
+
will-change: transform;
|
|
24
|
+
|
|
25
|
+
display: grid;
|
|
26
|
+
gap: var(--spacing-md);
|
|
27
|
+
align-items: stretch;
|
|
28
|
+
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
pointer-events: auto;
|
|
31
|
+
|
|
32
|
+
/* Make pseudo-elements layer properly */
|
|
33
|
+
isolation: isolate;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* “Lift” layer: drop-shadow + edge highlight (both fade in) */
|
|
37
|
+
.sidePanel::before {
|
|
38
|
+
content: '';
|
|
39
|
+
position: absolute;
|
|
40
|
+
inset: 0;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
z-index: -1; /* behind content but within isolated stacking context */
|
|
43
|
+
|
|
44
|
+
/* 1) drop-shadow = smoother than animating box-shadow
|
|
45
|
+
2) edge gradient = premium depth cue */
|
|
46
|
+
filter: drop-shadow(0 16px 32px rgba(0, 0, 0, var(--shadow-opacity)));
|
|
47
|
+
opacity: 0;
|
|
48
|
+
|
|
49
|
+
/* Edge highlight from the left edge (panel’s leading edge) */
|
|
50
|
+
background: linear-gradient(
|
|
51
|
+
90deg,
|
|
52
|
+
rgba(255, 255, 255, var(--edge-opacity)),
|
|
53
|
+
rgba(255, 255, 255, 0) 36%
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
transition: opacity var(--panel-dur) var(--panel-ease);
|
|
57
|
+
|
|
58
|
+
will-change: opacity;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Optional: super subtle “sheen” right as it settles (feels snappy) */
|
|
62
|
+
.sidePanel.open::before {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.sidePanel.open {
|
|
67
|
+
transform: translate3d(0, 0, 0);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* MAIN TRACK WIDTH = content + padding*2 */
|
|
71
|
+
.sidePanel.noDetails {
|
|
72
|
+
grid-template-columns: calc(var(--side-panel-width, 400px) + (var(--col-pad) * 2));
|
|
73
|
+
width: calc(var(--side-panel-width, 400px) + (var(--col-pad) * 2));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* when details show, main track stays the same; panel grows */
|
|
77
|
+
.sidePanel.withDetails {
|
|
78
|
+
grid-template-columns:
|
|
79
|
+
calc(var(--side-panel-width, 400px) + (var(--col-pad) * 2))
|
|
80
|
+
calc(var(--details-width, 420px) + (var(--col-pad) * 2));
|
|
81
|
+
|
|
82
|
+
width: calc(
|
|
83
|
+
(var(--side-panel-width, 400px) + (var(--col-pad) * 2)) +
|
|
84
|
+
(var(--details-width, 420px) + (var(--col-pad) * 2)) + var(--spacing-md)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* columns get the padding */
|
|
89
|
+
.mainCol,
|
|
90
|
+
.detailsCol {
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
padding: 0 var(--col-pad);
|
|
93
|
+
|
|
94
|
+
min-width: 0;
|
|
95
|
+
min-height: 0;
|
|
96
|
+
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: var(--spacing-md);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.header {
|
|
103
|
+
padding: var(--spacing-md) 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.content {
|
|
107
|
+
flex: 1;
|
|
108
|
+
min-height: 0;
|
|
109
|
+
overflow: auto;
|
|
110
|
+
font-size: var(--font-size-sm);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.actions {
|
|
114
|
+
padding: var(--spacing-md) 0;
|
|
115
|
+
display: flex;
|
|
116
|
+
justify-content: flex-end;
|
|
117
|
+
gap: var(--spacing-sm);
|
|
118
|
+
min-width: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* details styling */
|
|
122
|
+
.detailsCol {
|
|
123
|
+
border: 1px solid var(--color-border-subtle);
|
|
124
|
+
border-radius: var(--border-radius-md);
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
background: var(--color-bg-surface);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.detailsHeader {
|
|
130
|
+
padding: var(--spacing-sm) 0;
|
|
131
|
+
border-bottom: 1px solid var(--color-border-subtle);
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: space-between;
|
|
135
|
+
gap: var(--spacing-sm);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.detailsTitle {
|
|
139
|
+
font-weight: 600;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.detailsHeaderActions {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
gap: var(--spacing-sm);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.detailsContent {
|
|
149
|
+
padding: var(--spacing-md) 0;
|
|
150
|
+
overflow: auto;
|
|
151
|
+
min-height: 0;
|
|
152
|
+
flex: 1 1 auto;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Backdrop with a nice fade */
|
|
156
|
+
.backdrop {
|
|
157
|
+
position: fixed;
|
|
158
|
+
inset: 0;
|
|
159
|
+
background-color: rgba(0, 0, 0, 0.45);
|
|
160
|
+
z-index: var(--z-backdrop-drawer);
|
|
161
|
+
|
|
162
|
+
opacity: 0;
|
|
163
|
+
transition: opacity var(--panel-dur) var(--panel-ease);
|
|
164
|
+
will-change: opacity;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.backdropOpen {
|
|
168
|
+
opacity: 1;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@media (prefers-reduced-motion: reduce) {
|
|
172
|
+
.sidePanel,
|
|
173
|
+
.sidePanel::before,
|
|
174
|
+
.backdrop {
|
|
175
|
+
transition: none !important;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
|
|
5
|
+
function useSidePanel(initialOpen = false) {
|
|
6
|
+
const [isOpen, setIsOpen] = react.useState(initialOpen);
|
|
7
|
+
const openSidePanel = () => setIsOpen(true);
|
|
8
|
+
const closeSidePanel = () => setIsOpen(false);
|
|
9
|
+
return {
|
|
10
|
+
isOpen,
|
|
11
|
+
openSidePanel,
|
|
12
|
+
closeSidePanel
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.useSidePanel = useSidePanel;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
function useSidePanel(initialOpen = false) {
|
|
4
|
+
const [isOpen, setIsOpen] = useState(initialOpen);
|
|
5
|
+
const openSidePanel = () => setIsOpen(true);
|
|
6
|
+
const closeSidePanel = () => setIsOpen(false);
|
|
7
|
+
return {
|
|
8
|
+
isOpen,
|
|
9
|
+
openSidePanel,
|
|
10
|
+
closeSidePanel
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { useSidePanel };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var useTooltipTrigger = require('./useTooltipTrigger');
|
|
6
|
+
|
|
7
|
+
function Tooltip({
|
|
8
|
+
children,
|
|
9
|
+
content,
|
|
10
|
+
placement = "top",
|
|
11
|
+
open,
|
|
12
|
+
offset = 8,
|
|
13
|
+
delayOpenMs,
|
|
14
|
+
delayCloseMs,
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
}) {
|
|
18
|
+
const { triggerProps } = useTooltipTrigger.useTooltipTrigger({
|
|
19
|
+
content,
|
|
20
|
+
placement,
|
|
21
|
+
offset,
|
|
22
|
+
open,
|
|
23
|
+
delayOpenMs,
|
|
24
|
+
delayCloseMs
|
|
25
|
+
});
|
|
26
|
+
const rootClass = react.useMemo(
|
|
27
|
+
() => ["TooltipContainer", className].filter(Boolean).join(" "),
|
|
28
|
+
[className]
|
|
29
|
+
);
|
|
30
|
+
if (!content) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: rootClass, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "TooltipTrigger", tabIndex: 0, ...triggerProps, children }) });
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.Tooltip = Tooltip;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useTooltipTrigger } from './useTooltipTrigger';
|
|
4
|
+
|
|
5
|
+
function Tooltip({
|
|
6
|
+
children,
|
|
7
|
+
content,
|
|
8
|
+
placement = "top",
|
|
9
|
+
open,
|
|
10
|
+
offset = 8,
|
|
11
|
+
delayOpenMs,
|
|
12
|
+
delayCloseMs,
|
|
13
|
+
className,
|
|
14
|
+
...rest
|
|
15
|
+
}) {
|
|
16
|
+
const { triggerProps } = useTooltipTrigger({
|
|
17
|
+
content,
|
|
18
|
+
placement,
|
|
19
|
+
offset,
|
|
20
|
+
open,
|
|
21
|
+
delayOpenMs,
|
|
22
|
+
delayCloseMs
|
|
23
|
+
});
|
|
24
|
+
const rootClass = useMemo(
|
|
25
|
+
() => ["TooltipContainer", className].filter(Boolean).join(" "),
|
|
26
|
+
[className]
|
|
27
|
+
);
|
|
28
|
+
if (!content) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
29
|
+
return /* @__PURE__ */ jsx("span", { className: rootClass, ...rest, children: /* @__PURE__ */ jsx("span", { className: "TooltipTrigger", tabIndex: 0, ...triggerProps, children }) });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { Tooltip };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* Layout neutral wrapper */
|
|
2
|
+
.container {
|
|
3
|
+
display: contents;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* Measurable trigger box without forcing full width */
|
|
7
|
+
.trigger {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.trigger:focus-visible {
|
|
14
|
+
outline: none;
|
|
15
|
+
box-shadow: var(--focus-ring);
|
|
16
|
+
border-radius: var(--border-radius-default);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Bubble */
|
|
20
|
+
.bubble {
|
|
21
|
+
position: fixed;
|
|
22
|
+
z-index: var(--z-tooltip);
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
background: var(--color-fg-default);
|
|
25
|
+
color: var(--color-fg-on-strong);
|
|
26
|
+
font-size: var(--font-size-xs);
|
|
27
|
+
line-height: var(--line-height-tight);
|
|
28
|
+
padding: var(--spacing-xxs) var(--spacing-sm);
|
|
29
|
+
border-radius: var(--border-radius-default);
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
- Don't let it run wild horizontally
|
|
33
|
+
- But don't clip: allow wrap
|
|
34
|
+
- Keep some relation to viewport
|
|
35
|
+
*/
|
|
36
|
+
max-width: min(360px, calc(100vw - 16px));
|
|
37
|
+
white-space: normal;
|
|
38
|
+
overflow-wrap: break-word; /* wrap long words nicely */
|
|
39
|
+
word-break: normal;
|
|
40
|
+
|
|
41
|
+
/*
|
|
42
|
+
If your tooltips often include URLs/IDs, consider 'anywhere' instead:
|
|
43
|
+
overflow-wrap: anywhere;
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/* Optional: nicer shadow than box-shadow for rounded bubble */
|
|
47
|
+
filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.22));
|
|
48
|
+
|
|
49
|
+
/* Hidden by default */
|
|
50
|
+
opacity: 0;
|
|
51
|
+
visibility: hidden;
|
|
52
|
+
|
|
53
|
+
/* Base transform gets overridden by placement rules below */
|
|
54
|
+
transform: translate3d(0, 0, 0);
|
|
55
|
+
|
|
56
|
+
transition:
|
|
57
|
+
opacity var(--transition-fast),
|
|
58
|
+
transform var(--transition-fast),
|
|
59
|
+
visibility 0s linear var(--transition-fast);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.bubble[data-open='true'] {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
visibility: visible;
|
|
65
|
+
transition:
|
|
66
|
+
opacity var(--transition-fast),
|
|
67
|
+
transform var(--transition-fast),
|
|
68
|
+
visibility 0s;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Placement-based motion (so it “comes from” the trigger) */
|
|
72
|
+
.bubble[data-placement='top'] {
|
|
73
|
+
transform: translate3d(0, -6px, 0);
|
|
74
|
+
}
|
|
75
|
+
.bubble[data-placement='bottom'] {
|
|
76
|
+
transform: translate3d(0, 6px, 0);
|
|
77
|
+
}
|
|
78
|
+
.bubble[data-placement='left'] {
|
|
79
|
+
transform: translate3d(-6px, 0, 0);
|
|
80
|
+
}
|
|
81
|
+
.bubble[data-placement='right'] {
|
|
82
|
+
transform: translate3d(6px, 0, 0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Open state resets transform to 0 for all placements */
|
|
86
|
+
.bubble[data-open='true'][data-placement='top'],
|
|
87
|
+
.bubble[data-open='true'][data-placement='bottom'],
|
|
88
|
+
.bubble[data-open='true'][data-placement='left'],
|
|
89
|
+
.bubble[data-open='true'][data-placement='right'] {
|
|
90
|
+
transform: translate3d(0, 0, 0);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.bubble svg {
|
|
94
|
+
height: 20px;
|
|
95
|
+
width: 20px;
|
|
96
|
+
flex: 0 0 auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (prefers-reduced-motion: reduce) {
|
|
100
|
+
.bubble {
|
|
101
|
+
transition: none;
|
|
102
|
+
transform: none;
|
|
103
|
+
}
|
|
104
|
+
}
|