@qoretechnologies/reqore 0.76.0-pr.673.g960750c → 0.76.0
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/.claude/CLAUDE.md +2 -32
- package/dist/components/Accordion/index.js +89 -53
- package/dist/components/Accordion/index.js.map +1 -1
- package/dist/components/Breadcrumbs/index.js +71 -33
- package/dist/components/Breadcrumbs/index.js.map +1 -1
- package/dist/components/Breadcrumbs/item.js +13 -8
- package/dist/components/Breadcrumbs/item.js.map +1 -1
- package/dist/components/Bubble/index.js +93 -53
- package/dist/components/Bubble/index.js.map +1 -1
- package/dist/components/Button/index.d.ts +11 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +156 -114
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Callout/index.js +84 -45
- package/dist/components/Callout/index.js.map +1 -1
- package/dist/components/Checkbox/index.js +106 -68
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Collapse/index.js +56 -19
- package/dist/components/Collapse/index.js.map +1 -1
- package/dist/components/CollapsibleContent/index.js +78 -39
- package/dist/components/CollapsibleContent/index.js.map +1 -1
- package/dist/components/Collection/index.d.ts +7 -8
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +117 -75
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.js +73 -33
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/Columns/column.js +39 -3
- package/dist/components/Columns/column.js.map +1 -1
- package/dist/components/Columns/index.js +47 -8
- package/dist/components/Columns/index.js.map +1 -1
- package/dist/components/Comment/index.js +29 -22
- package/dist/components/Comment/index.js.map +1 -1
- package/dist/components/CommentFeed/index.js +14 -7
- package/dist/components/CommentFeed/index.js.map +1 -1
- package/dist/components/Content/index.js +48 -10
- package/dist/components/Content/index.js.map +1 -1
- package/dist/components/Content/wrapper.js +13 -8
- package/dist/components/Content/wrapper.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +171 -58
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/ControlGroup/item.js +18 -12
- package/dist/components/ControlGroup/item.js.map +1 -1
- package/dist/components/DataView/helpers.js +53 -37
- package/dist/components/DataView/helpers.js.map +1 -1
- package/dist/components/DataView/index.js +234 -182
- package/dist/components/DataView/index.js.map +1 -1
- package/dist/components/DatePicker/MonthYearDropdowns.js +19 -12
- package/dist/components/DatePicker/MonthYearDropdowns.js.map +1 -1
- package/dist/components/DatePicker/index.js +65 -58
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/DescriptionList/index.js +65 -26
- package/dist/components/DescriptionList/index.js.map +1 -1
- package/dist/components/Drawer/backdrop.js +23 -17
- package/dist/components/Drawer/backdrop.js.map +1 -1
- package/dist/components/Drawer/index.d.ts +89 -0
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +236 -69
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +23 -18
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/Dropdown/item.d.ts +1 -1
- package/dist/components/Dropdown/item.d.ts.map +1 -1
- package/dist/components/Dropdown/item.js +34 -11
- package/dist/components/Dropdown/item.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Dropdown/list.js +96 -74
- package/dist/components/Dropdown/list.js.map +1 -1
- package/dist/components/Effect/index.d.ts +24 -1
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +107 -65
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/EmptyState/index.js +26 -20
- package/dist/components/EmptyState/index.js.map +1 -1
- package/dist/components/EntityRow/index.js +98 -59
- package/dist/components/EntityRow/index.js.map +1 -1
- package/dist/components/ErrorBoundary/index.js +15 -12
- package/dist/components/ErrorBoundary/index.js.map +1 -1
- package/dist/components/ExportModal/index.js +24 -17
- package/dist/components/ExportModal/index.js.map +1 -1
- package/dist/components/FadeScroller/index.js +29 -23
- package/dist/components/FadeScroller/index.js.map +1 -1
- package/dist/components/FeatureCard/index.js +84 -45
- package/dist/components/FeatureCard/index.js.map +1 -1
- package/dist/components/GlobalModalsWrapper/index.js +16 -13
- package/dist/components/GlobalModalsWrapper/index.js.map +1 -1
- package/dist/components/Header/index.js +33 -21
- package/dist/components/Header/index.js.map +1 -1
- package/dist/components/Icon/index.js +77 -41
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/IconPicker/index.js +80 -41
- package/dist/components/IconPicker/index.js.map +1 -1
- package/dist/components/Input/index.js +94 -55
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InputClearButton/index.js +20 -14
- package/dist/components/InputClearButton/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts +1 -0
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +190 -54
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/KeyValueTable/index.js +18 -11
- package/dist/components/KeyValueTable/index.js.map +1 -1
- package/dist/components/KeyboardShortcut/index.js +28 -22
- package/dist/components/KeyboardShortcut/index.js.map +1 -1
- package/dist/components/Label/index.js +11 -5
- package/dist/components/Label/index.js.map +1 -1
- package/dist/components/Layout/content.js +10 -5
- package/dist/components/Layout/content.js.map +1 -1
- package/dist/components/Layout/index.js +46 -8
- package/dist/components/Layout/index.js.map +1 -1
- package/dist/components/Link/index.js +63 -24
- package/dist/components/Link/index.js.map +1 -1
- package/dist/components/Menu/divider.js +56 -20
- package/dist/components/Menu/divider.js.map +1 -1
- package/dist/components/Menu/index.js +67 -29
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Menu/item.js +20 -18
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Menu/section.js +19 -12
- package/dist/components/Menu/section.js.map +1 -1
- package/dist/components/Message/index.js +33 -28
- package/dist/components/Message/index.js.map +1 -1
- package/dist/components/Modal/index.js +18 -15
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +3 -3
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.js +10 -4
- package/dist/components/MultiSelect/index.js.map +1 -1
- package/dist/components/NavRail/index.js +145 -106
- package/dist/components/NavRail/index.js.map +1 -1
- package/dist/components/Navbar/divider.js +14 -9
- package/dist/components/Navbar/divider.js.map +1 -1
- package/dist/components/Navbar/group.js +45 -9
- package/dist/components/Navbar/group.js.map +1 -1
- package/dist/components/Navbar/index.js +53 -17
- package/dist/components/Navbar/index.js.map +1 -1
- package/dist/components/Navbar/item.js +50 -15
- package/dist/components/Navbar/item.js.map +1 -1
- package/dist/components/Notifications/index.js +44 -9
- package/dist/components/Notifications/index.js.map +1 -1
- package/dist/components/Notifications/notification.js +125 -79
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Notifications/styles.js +69 -33
- package/dist/components/Notifications/styles.js.map +1 -1
- package/dist/components/Paging/index.js +63 -24
- package/dist/components/Paging/index.js.map +1 -1
- package/dist/components/Panel/LabelEditor.js +21 -15
- package/dist/components/Panel/LabelEditor.js.map +1 -1
- package/dist/components/Panel/NonResponsiveActions.js +15 -9
- package/dist/components/Panel/NonResponsiveActions.js.map +1 -1
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +228 -180
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Panel/responsive.d.ts +24 -0
- package/dist/components/Panel/responsive.d.ts.map +1 -0
- package/dist/components/Panel/responsive.js +30 -0
- package/dist/components/Panel/responsive.js.map +1 -0
- package/dist/components/Paragraph/index.d.ts +8 -0
- package/dist/components/Paragraph/index.d.ts.map +1 -1
- package/dist/components/Paragraph/index.js +19 -13
- package/dist/components/Paragraph/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts +46 -0
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +240 -42
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Progress/index.js +78 -40
- package/dist/components/Progress/index.js.map +1 -1
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +23 -9
- package/dist/components/RadioGroup/index.js.map +1 -1
- package/dist/components/Rating/index.js +81 -43
- package/dist/components/Rating/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.d.ts.map +1 -1
- package/dist/components/RichTextEditor/index.js +362 -114
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/SegmentedControl/index.js +97 -59
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/Select/index.d.ts +68 -29
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +75 -140
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/valuePreview.d.ts +11 -0
- package/dist/components/Select/valuePreview.d.ts.map +1 -0
- package/dist/components/Select/valuePreview.js +64 -0
- package/dist/components/Select/valuePreview.js.map +1 -0
- package/dist/components/SeverityRow/index.js +85 -47
- package/dist/components/SeverityRow/index.js.map +1 -1
- package/dist/components/Skeleton/index.js +46 -9
- package/dist/components/Skeleton/index.js.map +1 -1
- package/dist/components/Slider/index.js +76 -37
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Spacer/index.js +61 -25
- package/dist/components/Spacer/index.js.map +1 -1
- package/dist/components/Span/index.js +19 -13
- package/dist/components/Span/index.js.map +1 -1
- package/dist/components/Spinner/index.js +16 -9
- package/dist/components/Spinner/index.js.map +1 -1
- package/dist/components/StackedBar/index.js +69 -34
- package/dist/components/StackedBar/index.js.map +1 -1
- package/dist/components/Statistic/index.js +73 -35
- package/dist/components/Statistic/index.js.map +1 -1
- package/dist/components/Table/body.d.ts.map +1 -1
- package/dist/components/Table/body.js +107 -48
- package/dist/components/Table/body.js.map +1 -1
- package/dist/components/Table/cell.d.ts.map +1 -1
- package/dist/components/Table/cell.js +68 -29
- package/dist/components/Table/cell.js.map +1 -1
- package/dist/components/Table/header.js +69 -33
- package/dist/components/Table/header.js.map +1 -1
- package/dist/components/Table/headerCell.js +65 -26
- package/dist/components/Table/headerCell.js.map +1 -1
- package/dist/components/Table/helpers.d.ts +62 -28
- package/dist/components/Table/helpers.d.ts.map +1 -1
- package/dist/components/Table/helpers.js +189 -111
- package/dist/components/Table/helpers.js.map +1 -1
- package/dist/components/Table/index.d.ts +30 -2
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +142 -95
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/row.d.ts +29 -1
- package/dist/components/Table/row.d.ts.map +1 -1
- package/dist/components/Table/row.js +163 -60
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Table/scrollbar.js +37 -31
- package/dist/components/Table/scrollbar.js.map +1 -1
- package/dist/components/Table/value.js +15 -9
- package/dist/components/Table/value.js.map +1 -1
- package/dist/components/Tabs/content.js +17 -12
- package/dist/components/Tabs/content.js.map +1 -1
- package/dist/components/Tabs/index.js +52 -14
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/item.js +65 -26
- package/dist/components/Tabs/item.js.map +1 -1
- package/dist/components/Tabs/list.js +101 -60
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/group.js +49 -11
- package/dist/components/Tag/group.js.map +1 -1
- package/dist/components/Tag/index.d.ts +5 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +147 -92
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Testimonial/index.js +82 -44
- package/dist/components/Testimonial/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts +10 -0
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +167 -63
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/components/Tier/index.js +58 -19
- package/dist/components/Tier/index.js.map +1 -1
- package/dist/components/TimeAgo/index.js +16 -9
- package/dist/components/TimeAgo/index.js.map +1 -1
- package/dist/components/Timeline/index.js +117 -78
- package/dist/components/Timeline/index.js.map +1 -1
- package/dist/components/TooltipComponent/index.js +10 -7
- package/dist/components/TooltipComponent/index.js.map +1 -1
- package/dist/components/Tree/index.d.ts +2 -1
- package/dist/components/Tree/index.d.ts.map +1 -1
- package/dist/components/Tree/index.js +99 -70
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/components/Tree/modal.js +20 -13
- package/dist/components/Tree/modal.js.map +1 -1
- package/dist/constants/animations.js +5 -2
- package/dist/constants/animations.js.map +1 -1
- package/dist/constants/colors.js +5 -2
- package/dist/constants/colors.js.map +1 -1
- package/dist/constants/fonts.js +10 -6
- package/dist/constants/fonts.js.map +1 -1
- package/dist/constants/paging.js +6 -2
- package/dist/constants/paging.js.map +1 -1
- package/dist/constants/sizes.js +55 -51
- package/dist/constants/sizes.js.map +1 -1
- package/dist/constants/theme.js +22 -19
- package/dist/constants/theme.js.map +1 -1
- package/dist/containers/Paging.js +16 -13
- package/dist/containers/Paging.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +62 -52
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/ThemeProvider.js +13 -8
- package/dist/containers/ThemeProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js +63 -31
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/context/CustomThemeContext.js +5 -3
- package/dist/context/CustomThemeContext.js.map +1 -1
- package/dist/context/ReqoreContext.js +6 -4
- package/dist/context/ReqoreContext.js.map +1 -1
- package/dist/context/ThemeContext.js +5 -3
- package/dist/context/ThemeContext.js.map +1 -1
- package/dist/helpers/animations.js +5 -2
- package/dist/helpers/animations.js.map +1 -1
- package/dist/helpers/colors.js +103 -78
- package/dist/helpers/colors.js.map +1 -1
- package/dist/helpers/dates.js +17 -8
- package/dist/helpers/dates.js.map +1 -1
- package/dist/helpers/search.js +11 -5
- package/dist/helpers/search.js.map +1 -1
- package/dist/helpers/selectItem.d.ts +23 -0
- package/dist/helpers/selectItem.d.ts.map +1 -0
- package/dist/helpers/selectItem.js +147 -0
- package/dist/helpers/selectItem.js.map +1 -0
- package/dist/helpers/shortcuts.js +14 -7
- package/dist/helpers/shortcuts.js.map +1 -1
- package/dist/helpers/styled.js +5 -1
- package/dist/helpers/styled.js.map +1 -1
- package/dist/helpers/time.js +5 -1
- package/dist/helpers/time.js.map +1 -1
- package/dist/helpers/utils.js +58 -38
- package/dist/helpers/utils.js.map +1 -1
- package/dist/hooks/useAutoFocus.js +14 -10
- package/dist/hooks/useAutoFocus.js.map +1 -1
- package/dist/hooks/useCloneThroughFragments.js +45 -8
- package/dist/hooks/useCloneThroughFragments.js.map +1 -1
- package/dist/hooks/useCombinedRefs.js +11 -5
- package/dist/hooks/useCombinedRefs.js.map +1 -1
- package/dist/hooks/useComponentTooltip.js +11 -7
- package/dist/hooks/useComponentTooltip.js.map +1 -1
- package/dist/hooks/useFitTextSize.js +13 -9
- package/dist/hooks/useFitTextSize.js.map +1 -1
- package/dist/hooks/useFocusTrap.js +10 -7
- package/dist/hooks/useFocusTrap.js.map +1 -1
- package/dist/hooks/useLatestZIndex.js +8 -6
- package/dist/hooks/useLatestZIndex.js.map +1 -1
- package/dist/hooks/useMarqueeOnHover.js +34 -25
- package/dist/hooks/useMarqueeOnHover.js.map +1 -1
- package/dist/hooks/useNarrowContainer.js +12 -8
- package/dist/hooks/useNarrowContainer.js.map +1 -1
- package/dist/hooks/useOutsideClick.js +6 -4
- package/dist/hooks/useOutsideClick.js.map +1 -1
- package/dist/hooks/usePaging.js +27 -20
- package/dist/hooks/usePaging.js.map +1 -1
- package/dist/hooks/useQueryWithDelay.js +12 -8
- package/dist/hooks/useQueryWithDelay.js.map +1 -1
- package/dist/hooks/useReqore.js +11 -4
- package/dist/hooks/useReqore.js.map +1 -1
- package/dist/hooks/useReqoreContext.js +11 -4
- package/dist/hooks/useReqoreContext.js.map +1 -1
- package/dist/hooks/useReqoreEffect.js +9 -5
- package/dist/hooks/useReqoreEffect.js.map +1 -1
- package/dist/hooks/useScrollFade.js +12 -8
- package/dist/hooks/useScrollFade.js.map +1 -1
- package/dist/hooks/useTextareaAutoSize.js +5 -3
- package/dist/hooks/useTextareaAutoSize.js.map +1 -1
- package/dist/hooks/useTheme.js +22 -15
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/hooks/useWhyDidYouUpdate.js +7 -4
- package/dist/hooks/useWhyDidYouUpdate.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +284 -107
- package/dist/index.js.map +1 -1
- package/dist/styles.js +58 -22
- package/dist/styles.js.map +1 -1
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +23 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/tableGeometry.d.ts +75 -0
- package/dist/testing/tableGeometry.d.ts.map +1 -0
- package/dist/testing/tableGeometry.js +168 -0
- package/dist/testing/tableGeometry.js.map +1 -0
- package/dist/types/global.js +2 -1
- package/dist/types/icons.js +2 -1
- package/package.json +13 -9
- package/testing/package.json +7 -0
- package/tests.json +1 -0
- package/dist/components/Accordion/index.cjs +0 -199
- package/dist/components/Accordion/index.cjs.map +0 -1
- package/dist/components/Breadcrumbs/index.cjs +0 -239
- package/dist/components/Breadcrumbs/index.cjs.map +0 -1
- package/dist/components/Breadcrumbs/item.cjs +0 -43
- package/dist/components/Breadcrumbs/item.cjs.map +0 -1
- package/dist/components/Bubble/index.cjs +0 -281
- package/dist/components/Bubble/index.cjs.map +0 -1
- package/dist/components/Button/index.cjs +0 -401
- package/dist/components/Button/index.cjs.map +0 -1
- package/dist/components/Callout/index.cjs +0 -203
- package/dist/components/Callout/index.cjs.map +0 -1
- package/dist/components/Checkbox/index.cjs +0 -222
- package/dist/components/Checkbox/index.cjs.map +0 -1
- package/dist/components/Collapse/index.cjs +0 -127
- package/dist/components/Collapse/index.cjs.map +0 -1
- package/dist/components/CollapsibleContent/index.cjs +0 -244
- package/dist/components/CollapsibleContent/index.cjs.map +0 -1
- package/dist/components/Collection/index.cjs +0 -362
- package/dist/components/Collection/index.cjs.map +0 -1
- package/dist/components/Collection/item.cjs +0 -196
- package/dist/components/Collection/item.cjs.map +0 -1
- package/dist/components/Columns/column.cjs +0 -47
- package/dist/components/Columns/column.cjs.map +0 -1
- package/dist/components/Columns/index.cjs +0 -79
- package/dist/components/Columns/index.cjs.map +0 -1
- package/dist/components/Comment/index.cjs +0 -72
- package/dist/components/Comment/index.cjs.map +0 -1
- package/dist/components/CommentFeed/index.cjs +0 -49
- package/dist/components/CommentFeed/index.cjs.map +0 -1
- package/dist/components/Content/index.cjs +0 -80
- package/dist/components/Content/index.cjs.map +0 -1
- package/dist/components/Content/wrapper.cjs +0 -43
- package/dist/components/Content/wrapper.cjs.map +0 -1
- package/dist/components/ControlGroup/index.cjs +0 -437
- package/dist/components/ControlGroup/index.cjs.map +0 -1
- package/dist/components/ControlGroup/item.cjs +0 -86
- package/dist/components/ControlGroup/item.cjs.map +0 -1
- package/dist/components/DataView/helpers.cjs +0 -350
- package/dist/components/DataView/helpers.cjs.map +0 -1
- package/dist/components/DataView/index.cjs +0 -961
- package/dist/components/DataView/index.cjs.map +0 -1
- package/dist/components/DatePicker/MonthYearDropdowns.cjs +0 -64
- package/dist/components/DatePicker/MonthYearDropdowns.cjs.map +0 -1
- package/dist/components/DatePicker/index.cjs +0 -289
- package/dist/components/DatePicker/index.cjs.map +0 -1
- package/dist/components/DescriptionList/index.cjs +0 -183
- package/dist/components/DescriptionList/index.cjs.map +0 -1
- package/dist/components/Drawer/backdrop.cjs +0 -73
- package/dist/components/Drawer/backdrop.cjs.map +0 -1
- package/dist/components/Drawer/index.cjs +0 -302
- package/dist/components/Drawer/index.cjs.map +0 -1
- package/dist/components/Dropdown/index.cjs +0 -77
- package/dist/components/Dropdown/index.cjs.map +0 -1
- package/dist/components/Dropdown/item.cjs +0 -42
- package/dist/components/Dropdown/item.cjs.map +0 -1
- package/dist/components/Dropdown/list.cjs +0 -346
- package/dist/components/Dropdown/list.cjs.map +0 -1
- package/dist/components/Effect/index.cjs +0 -331
- package/dist/components/Effect/index.cjs.map +0 -1
- package/dist/components/EmptyState/index.cjs +0 -60
- package/dist/components/EmptyState/index.cjs.map +0 -1
- package/dist/components/EntityRow/index.cjs +0 -249
- package/dist/components/EntityRow/index.cjs.map +0 -1
- package/dist/components/ErrorBoundary/index.cjs +0 -118
- package/dist/components/ErrorBoundary/index.cjs.map +0 -1
- package/dist/components/ExportModal/index.cjs +0 -91
- package/dist/components/ExportModal/index.cjs.map +0 -1
- package/dist/components/FadeScroller/index.cjs +0 -327
- package/dist/components/FadeScroller/index.cjs.map +0 -1
- package/dist/components/FeatureCard/index.cjs +0 -168
- package/dist/components/FeatureCard/index.cjs.map +0 -1
- package/dist/components/GlobalModalsWrapper/index.cjs +0 -46
- package/dist/components/GlobalModalsWrapper/index.cjs.map +0 -1
- package/dist/components/Header/index.cjs +0 -70
- package/dist/components/Header/index.cjs.map +0 -1
- package/dist/components/Icon/index.cjs +0 -195
- package/dist/components/Icon/index.cjs.map +0 -1
- package/dist/components/IconPicker/index.cjs +0 -236
- package/dist/components/IconPicker/index.cjs.map +0 -1
- package/dist/components/Input/index.cjs +0 -203
- package/dist/components/Input/index.cjs.map +0 -1
- package/dist/components/InputClearButton/index.cjs +0 -62
- package/dist/components/InputClearButton/index.cjs.map +0 -1
- package/dist/components/InternalPopover/index.cjs +0 -315
- package/dist/components/InternalPopover/index.cjs.map +0 -1
- package/dist/components/KeyValueTable/index.cjs +0 -108
- package/dist/components/KeyValueTable/index.cjs.map +0 -1
- package/dist/components/KeyboardShortcut/index.cjs +0 -69
- package/dist/components/KeyboardShortcut/index.cjs.map +0 -1
- package/dist/components/Label/index.cjs +0 -24
- package/dist/components/Label/index.cjs.map +0 -1
- package/dist/components/Layout/content.cjs +0 -41
- package/dist/components/Layout/content.cjs.map +0 -1
- package/dist/components/Layout/index.cjs +0 -79
- package/dist/components/Layout/index.cjs.map +0 -1
- package/dist/components/Link/index.cjs +0 -168
- package/dist/components/Link/index.cjs.map +0 -1
- package/dist/components/Menu/divider.cjs +0 -98
- package/dist/components/Menu/divider.cjs.map +0 -1
- package/dist/components/Menu/index.cjs +0 -135
- package/dist/components/Menu/index.cjs.map +0 -1
- package/dist/components/Menu/item.cjs +0 -99
- package/dist/components/Menu/item.cjs.map +0 -1
- package/dist/components/Menu/section.cjs +0 -59
- package/dist/components/Menu/section.cjs.map +0 -1
- package/dist/components/Message/index.cjs +0 -78
- package/dist/components/Message/index.cjs.map +0 -1
- package/dist/components/Modal/index.cjs +0 -67
- package/dist/components/Modal/index.cjs.map +0 -1
- package/dist/components/MultiSelect/index.cjs +0 -36
- package/dist/components/MultiSelect/index.cjs.map +0 -1
- package/dist/components/NavRail/index.cjs +0 -666
- package/dist/components/NavRail/index.cjs.map +0 -1
- package/dist/components/Navbar/divider.cjs +0 -47
- package/dist/components/Navbar/divider.cjs.map +0 -1
- package/dist/components/Navbar/group.cjs +0 -85
- package/dist/components/Navbar/group.cjs.map +0 -1
- package/dist/components/Navbar/index.cjs +0 -97
- package/dist/components/Navbar/index.cjs.map +0 -1
- package/dist/components/Navbar/item.cjs +0 -98
- package/dist/components/Navbar/item.cjs.map +0 -1
- package/dist/components/Notifications/index.cjs +0 -66
- package/dist/components/Notifications/index.cjs.map +0 -1
- package/dist/components/Notifications/notification.cjs +0 -343
- package/dist/components/Notifications/notification.cjs.map +0 -1
- package/dist/components/Notifications/styles.cjs +0 -131
- package/dist/components/Notifications/styles.cjs.map +0 -1
- package/dist/components/Paging/index.cjs +0 -173
- package/dist/components/Paging/index.cjs.map +0 -1
- package/dist/components/Panel/LabelEditor.cjs +0 -62
- package/dist/components/Panel/LabelEditor.cjs.map +0 -1
- package/dist/components/Panel/NonResponsiveActions.cjs +0 -47
- package/dist/components/Panel/NonResponsiveActions.cjs.map +0 -1
- package/dist/components/Panel/index.cjs +0 -1054
- package/dist/components/Panel/index.cjs.map +0 -1
- package/dist/components/Paragraph/index.cjs +0 -55
- package/dist/components/Paragraph/index.cjs.map +0 -1
- package/dist/components/Popover/index.cjs +0 -348
- package/dist/components/Popover/index.cjs.map +0 -1
- package/dist/components/Progress/index.cjs +0 -187
- package/dist/components/Progress/index.cjs.map +0 -1
- package/dist/components/RadioGroup/index.cjs +0 -42
- package/dist/components/RadioGroup/index.cjs.map +0 -1
- package/dist/components/Rating/index.cjs +0 -207
- package/dist/components/Rating/index.cjs.map +0 -1
- package/dist/components/RichTextEditor/index.cjs +0 -424
- package/dist/components/RichTextEditor/index.cjs.map +0 -1
- package/dist/components/SegmentedControl/index.cjs +0 -364
- package/dist/components/SegmentedControl/index.cjs.map +0 -1
- package/dist/components/Select/index.cjs +0 -363
- package/dist/components/Select/index.cjs.map +0 -1
- package/dist/components/SeverityRow/index.cjs +0 -207
- package/dist/components/SeverityRow/index.cjs.map +0 -1
- package/dist/components/Skeleton/index.cjs +0 -58
- package/dist/components/Skeleton/index.cjs.map +0 -1
- package/dist/components/Slider/index.cjs +0 -154
- package/dist/components/Slider/index.cjs.map +0 -1
- package/dist/components/Spacer/index.cjs +0 -138
- package/dist/components/Spacer/index.cjs.map +0 -1
- package/dist/components/Span/index.cjs +0 -61
- package/dist/components/Span/index.cjs.map +0 -1
- package/dist/components/Spinner/index.cjs +0 -44
- package/dist/components/Spinner/index.cjs.map +0 -1
- package/dist/components/StackedBar/index.cjs +0 -209
- package/dist/components/StackedBar/index.cjs.map +0 -1
- package/dist/components/Statistic/index.cjs +0 -161
- package/dist/components/Statistic/index.cjs.map +0 -1
- package/dist/components/Table/body.cjs +0 -265
- package/dist/components/Table/body.cjs.map +0 -1
- package/dist/components/Table/cell.cjs +0 -179
- package/dist/components/Table/cell.cjs.map +0 -1
- package/dist/components/Table/header.cjs +0 -170
- package/dist/components/Table/header.cjs.map +0 -1
- package/dist/components/Table/headerCell.cjs +0 -277
- package/dist/components/Table/headerCell.cjs.map +0 -1
- package/dist/components/Table/helpers.cjs +0 -386
- package/dist/components/Table/helpers.cjs.map +0 -1
- package/dist/components/Table/index.cjs +0 -682
- package/dist/components/Table/index.cjs.map +0 -1
- package/dist/components/Table/row.cjs +0 -345
- package/dist/components/Table/row.cjs.map +0 -1
- package/dist/components/Table/scrollbar.cjs +0 -201
- package/dist/components/Table/scrollbar.cjs.map +0 -1
- package/dist/components/Table/value.cjs +0 -26
- package/dist/components/Table/value.cjs.map +0 -1
- package/dist/components/Tabs/content.cjs +0 -63
- package/dist/components/Tabs/content.cjs.map +0 -1
- package/dist/components/Tabs/index.cjs +0 -109
- package/dist/components/Tabs/index.cjs.map +0 -1
- package/dist/components/Tabs/item.cjs +0 -136
- package/dist/components/Tabs/item.cjs.map +0 -1
- package/dist/components/Tabs/list.cjs +0 -322
- package/dist/components/Tabs/list.cjs.map +0 -1
- package/dist/components/Tag/group.cjs +0 -107
- package/dist/components/Tag/group.cjs.map +0 -1
- package/dist/components/Tag/index.cjs +0 -343
- package/dist/components/Tag/index.cjs.map +0 -1
- package/dist/components/Testimonial/index.cjs +0 -166
- package/dist/components/Testimonial/index.cjs.map +0 -1
- package/dist/components/Textarea/index.cjs +0 -220
- package/dist/components/Textarea/index.cjs.map +0 -1
- package/dist/components/Tier/index.cjs +0 -107
- package/dist/components/Tier/index.cjs.map +0 -1
- package/dist/components/TimeAgo/index.cjs +0 -27
- package/dist/components/TimeAgo/index.cjs.map +0 -1
- package/dist/components/Timeline/index.cjs +0 -416
- package/dist/components/Timeline/index.cjs.map +0 -1
- package/dist/components/TooltipComponent/index.cjs +0 -37
- package/dist/components/TooltipComponent/index.cjs.map +0 -1
- package/dist/components/Tree/index.cjs +0 -321
- package/dist/components/Tree/index.cjs.map +0 -1
- package/dist/components/Tree/modal.cjs +0 -38
- package/dist/components/Tree/modal.cjs.map +0 -1
- package/dist/constants/animations.cjs +0 -12
- package/dist/constants/animations.cjs.map +0 -1
- package/dist/constants/colors.cjs +0 -16
- package/dist/constants/colors.cjs.map +0 -1
- package/dist/constants/fonts.cjs +0 -28
- package/dist/constants/fonts.cjs.map +0 -1
- package/dist/constants/paging.cjs +0 -63
- package/dist/constants/paging.cjs.map +0 -1
- package/dist/constants/sizes.cjs +0 -462
- package/dist/constants/sizes.cjs.map +0 -1
- package/dist/constants/theme.cjs +0 -43
- package/dist/constants/theme.cjs.map +0 -1
- package/dist/containers/Paging.cjs +0 -52
- package/dist/containers/Paging.cjs.map +0 -1
- package/dist/containers/ReqoreProvider.cjs +0 -275
- package/dist/containers/ReqoreProvider.cjs.map +0 -1
- package/dist/containers/ThemeProvider.cjs +0 -17
- package/dist/containers/ThemeProvider.cjs.map +0 -1
- package/dist/containers/UIProvider.cjs +0 -96
- package/dist/containers/UIProvider.cjs.map +0 -1
- package/dist/context/CustomThemeContext.cjs +0 -6
- package/dist/context/CustomThemeContext.cjs.map +0 -1
- package/dist/context/ReqoreContext.cjs +0 -25
- package/dist/context/ReqoreContext.cjs.map +0 -1
- package/dist/context/ThemeContext.cjs +0 -6
- package/dist/context/ThemeContext.cjs.map +0 -1
- package/dist/helpers/animations.cjs +0 -11
- package/dist/helpers/animations.cjs.map +0 -1
- package/dist/helpers/colors.cjs +0 -273
- package/dist/helpers/colors.cjs.map +0 -1
- package/dist/helpers/dates.cjs +0 -62
- package/dist/helpers/dates.cjs.map +0 -1
- package/dist/helpers/portal.cjs +0 -32
- package/dist/helpers/portal.cjs.map +0 -1
- package/dist/helpers/portal.d.ts +0 -18
- package/dist/helpers/portal.d.ts.map +0 -1
- package/dist/helpers/portal.js +0 -27
- package/dist/helpers/portal.js.map +0 -1
- package/dist/helpers/search.cjs +0 -63
- package/dist/helpers/search.cjs.map +0 -1
- package/dist/helpers/shortcuts.cjs +0 -152
- package/dist/helpers/shortcuts.cjs.map +0 -1
- package/dist/helpers/styled.cjs +0 -46
- package/dist/helpers/styled.cjs.map +0 -1
- package/dist/helpers/time.cjs +0 -25
- package/dist/helpers/time.cjs.map +0 -1
- package/dist/helpers/utils.cjs +0 -294
- package/dist/helpers/utils.cjs.map +0 -1
- package/dist/hooks/useAutoFocus.cjs +0 -84
- package/dist/hooks/useAutoFocus.cjs.map +0 -1
- package/dist/hooks/useCloneThroughFragments.cjs +0 -63
- package/dist/hooks/useCloneThroughFragments.cjs.map +0 -1
- package/dist/hooks/useCombinedRefs.cjs +0 -44
- package/dist/hooks/useCombinedRefs.cjs.map +0 -1
- package/dist/hooks/useComponentTooltip.cjs +0 -34
- package/dist/hooks/useComponentTooltip.cjs.map +0 -1
- package/dist/hooks/useFitTextSize.cjs +0 -75
- package/dist/hooks/useFitTextSize.cjs.map +0 -1
- package/dist/hooks/useFocusTrap.cjs +0 -119
- package/dist/hooks/useFocusTrap.cjs.map +0 -1
- package/dist/hooks/useLatestZIndex.cjs +0 -12
- package/dist/hooks/useLatestZIndex.cjs.map +0 -1
- package/dist/hooks/useMarqueeOnHover.cjs +0 -292
- package/dist/hooks/useMarqueeOnHover.cjs.map +0 -1
- package/dist/hooks/useNarrowContainer.cjs +0 -68
- package/dist/hooks/useNarrowContainer.cjs.map +0 -1
- package/dist/hooks/useOutsideClick.cjs +0 -19
- package/dist/hooks/useOutsideClick.cjs.map +0 -1
- package/dist/hooks/usePaging.cjs +0 -152
- package/dist/hooks/usePaging.cjs.map +0 -1
- package/dist/hooks/useQueryWithDelay.cjs +0 -25
- package/dist/hooks/useQueryWithDelay.cjs.map +0 -1
- package/dist/hooks/useReqore.cjs +0 -17
- package/dist/hooks/useReqore.cjs.map +0 -1
- package/dist/hooks/useReqoreContext.cjs +0 -19
- package/dist/hooks/useReqoreContext.cjs.map +0 -1
- package/dist/hooks/useReqoreEffect.cjs +0 -34
- package/dist/hooks/useReqoreEffect.cjs.map +0 -1
- package/dist/hooks/useScrollFade.cjs +0 -70
- package/dist/hooks/useScrollFade.cjs.map +0 -1
- package/dist/hooks/useTextareaAutoSize.cjs +0 -22
- package/dist/hooks/useTextareaAutoSize.cjs.map +0 -1
- package/dist/hooks/useTheme.cjs +0 -49
- package/dist/hooks/useTheme.cjs.map +0 -1
- package/dist/hooks/useWhyDidYouUpdate.cjs +0 -46
- package/dist/hooks/useWhyDidYouUpdate.cjs.map +0 -1
- package/dist/index.cjs +0 -271
- package/dist/index.cjs.map +0 -1
- package/dist/package.json +0 -3
- package/dist/styles.cjs +0 -88
- package/dist/styles.cjs.map +0 -1
- package/dist/types/global.cjs +0 -3
- package/dist/types/global.cjs.map +0 -1
- package/dist/types/icons.cjs +0 -3
- package/dist/types/icons.cjs.map +0 -1
|
@@ -1,1054 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
-
var ownKeys = function(o) {
|
|
35
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
-
var ar = [];
|
|
37
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
-
return ar;
|
|
39
|
-
};
|
|
40
|
-
return ownKeys(o);
|
|
41
|
-
};
|
|
42
|
-
return function (mod) {
|
|
43
|
-
if (mod && mod.__esModule) return mod;
|
|
44
|
-
var result = {};
|
|
45
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
-
__setModuleDefault(result, mod);
|
|
47
|
-
return result;
|
|
48
|
-
};
|
|
49
|
-
})();
|
|
50
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
51
|
-
var t = {};
|
|
52
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
53
|
-
t[p] = s[p];
|
|
54
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
55
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
56
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
57
|
-
t[p[i]] = s[p[i]];
|
|
58
|
-
}
|
|
59
|
-
return t;
|
|
60
|
-
};
|
|
61
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
-
};
|
|
64
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
exports.ReqorePanel = exports.ReqorePanelSkeleton = exports.StyledFloatingActions = exports.StyledPanelContent = exports.StyledPanelBottomActions = exports.StyledPanelTopBar = exports.StyledPanelTitle = exports.StyledPanel = exports.StyledPanelTitleHeaderLabelAndBadge = exports.StyledPanelTitleHeaderLabelAndDescription = exports.StyledPanelTitleHeaderContent = exports.StyledPanelTitleHeader = void 0;
|
|
66
|
-
var react_1 = require("react");
|
|
67
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
68
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
69
|
-
var lodash_1 = require("lodash");
|
|
70
|
-
var polished_1 = require("polished");
|
|
71
|
-
var re_resizable_1 = require("re-resizable");
|
|
72
|
-
var react_2 = require("react");
|
|
73
|
-
var react_dom_1 = require("react-dom");
|
|
74
|
-
var react_use_1 = require("react-use");
|
|
75
|
-
var styled_components_1 = __importStar(require("styled-components"));
|
|
76
|
-
var colors_1 = require("../../constants/colors.cjs");
|
|
77
|
-
var sizes_1 = require("../../constants/sizes.cjs");
|
|
78
|
-
var colors_2 = require("../../helpers/colors.cjs");
|
|
79
|
-
var styled_1 = require("../../helpers/styled.cjs");
|
|
80
|
-
var utils_1 = require("../../helpers/utils.cjs");
|
|
81
|
-
var useCombinedRefs_1 = require("../../hooks/useCombinedRefs.cjs");
|
|
82
|
-
var useReqoreContext_1 = require("../../hooks/useReqoreContext.cjs");
|
|
83
|
-
var useFitTextSize_1 = require("../../hooks/useFitTextSize.cjs");
|
|
84
|
-
var useTheme_1 = require("../../hooks/useTheme.cjs");
|
|
85
|
-
var styles_1 = require("../../styles.cjs");
|
|
86
|
-
var Breadcrumbs_1 = __importDefault(require("../Breadcrumbs/index.cjs"));
|
|
87
|
-
var Button_1 = __importStar(require("../Button/index.cjs"));
|
|
88
|
-
var item_1 = require("../Collection/item.cjs");
|
|
89
|
-
var ControlGroup_1 = __importDefault(require("../ControlGroup/index.cjs"));
|
|
90
|
-
var Dropdown_1 = __importDefault(require("../Dropdown/index.cjs"));
|
|
91
|
-
var Effect_1 = require("../Effect/index.cjs");
|
|
92
|
-
var ErrorBoundary_1 = require("../ErrorBoundary/index.cjs");
|
|
93
|
-
var Icon_1 = __importDefault(require("../Icon/index.cjs"));
|
|
94
|
-
var Skeleton_1 = require("../Skeleton/index.cjs");
|
|
95
|
-
var Span_1 = require("../Span/index.cjs");
|
|
96
|
-
var TooltipComponent_1 = require("../TooltipComponent/index.cjs");
|
|
97
|
-
var LabelEditor_1 = require("./LabelEditor.cjs");
|
|
98
|
-
var NonResponsiveActions_1 = require("./NonResponsiveActions.cjs");
|
|
99
|
-
var getPaddingSize = function (padded, size) {
|
|
100
|
-
return typeof padded === 'string' ? sizes_1.SPECIAL_PADDING_FROM_SIZE[padded] : sizes_1.PADDING_FROM_SIZE[size];
|
|
101
|
-
};
|
|
102
|
-
/** Nearest scrollable ancestor of `node` (the element a `position: sticky`
|
|
103
|
-
* header actually pins to), or `null` for the viewport. Used to scope the
|
|
104
|
-
* stuck-detection observer to the right scroll container. */
|
|
105
|
-
var getScrollableAncestor = function (node) {
|
|
106
|
-
var _a;
|
|
107
|
-
var el = (_a = node === null || node === void 0 ? void 0 : node.parentElement) !== null && _a !== void 0 ? _a : null;
|
|
108
|
-
while (el) {
|
|
109
|
-
var overflowY = getComputedStyle(el).overflowY;
|
|
110
|
-
// `hidden` counts: it is a scroll container per spec and DOES capture a
|
|
111
|
-
// sticky descendant, even though it shows no scrollbar. Skipping it picks
|
|
112
|
-
// the wrong ancestor and measures the wrong inset below.
|
|
113
|
-
if (overflowY === 'auto' ||
|
|
114
|
-
overflowY === 'scroll' ||
|
|
115
|
-
overflowY === 'overlay' ||
|
|
116
|
-
overflowY === 'hidden') {
|
|
117
|
-
return el;
|
|
118
|
-
}
|
|
119
|
-
el = el.parentElement;
|
|
120
|
-
}
|
|
121
|
-
return null;
|
|
122
|
-
};
|
|
123
|
-
/** The distance from a scrollport's border-box top to the line a `position:
|
|
124
|
-
* sticky; top: 0` descendant actually pins to — its top padding. Sticky
|
|
125
|
-
* resolves against the scroll container's CONTENT box, so a padded scrollport
|
|
126
|
-
* parks the header below its own padding and content scrolls through the gap.
|
|
127
|
-
* Border is reported separately: it sits outside the scrollport and so shifts
|
|
128
|
-
* the reference the stuck-detector measures against, but not the sticky line. */
|
|
129
|
-
var getScrollportInset = function (el) {
|
|
130
|
-
if (!el)
|
|
131
|
-
return { padding: 0, border: 0 };
|
|
132
|
-
var style = getComputedStyle(el);
|
|
133
|
-
return {
|
|
134
|
-
padding: parseFloat(style.paddingTop) || 0,
|
|
135
|
-
border: parseFloat(style.borderTopWidth) || 0,
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* The box the title lives in — and, when the title may wrap, the thing that clamps it.
|
|
140
|
-
*
|
|
141
|
-
* It exists first as a measuring box: as a `min-width: 0` flex child it reports the width the
|
|
142
|
-
* row actually left for the title, where the heading itself would report what its text wants.
|
|
143
|
-
* `overflow: hidden` is what makes it shrinkable at all, and `display: flex` keeps it from
|
|
144
|
-
* opening a line box around the inline-flex heading — a block wrapper adds the row's leading on
|
|
145
|
-
* top of the heading's own box, which made a `tiny` panel 3px taller than it used to be.
|
|
146
|
-
*/
|
|
147
|
-
var StyledPanelTitleLabelBox = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n min-width: 0;\n overflow: hidden;\n flex: 0 1 auto;\n\n ", "\n"], ["\n display: flex;\n min-width: 0;\n overflow: hidden;\n flex: 0 1 auto;\n\n ", "\n"])), function (_a) {
|
|
148
|
-
var $clampLines = _a.$clampLines;
|
|
149
|
-
return $clampLines > 1 && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .reqore-heading {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n white-space: normal;\n /* A single word longer than the box would push past it rather than break, and the\n clamp would have nothing to ellipsize. */\n overflow-wrap: anywhere;\n max-width: 100%;\n\n /* The heading wraps its text in a span of its own, and `-webkit-line-clamp` counts the\n box's CHILDREN rather than the lines inside them \u2014 so one block-level child reads as\n a single line and nothing is ever clamped, however far the text overruns. Putting the\n text back into the heading's own line boxes is what the clamp actually measures. */\n .reqore-span {\n display: inline;\n }\n }\n "], ["\n .reqore-heading {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n white-space: normal;\n /* A single word longer than the box would push past it rather than break, and the\n clamp would have nothing to ellipsize. */\n overflow-wrap: anywhere;\n max-width: 100%;\n\n /* The heading wraps its text in a span of its own, and \\`-webkit-line-clamp\\` counts the\n box's CHILDREN rather than the lines inside them \u2014 so one block-level child reads as\n a single line and nothing is ever clamped, however far the text overruns. Putting the\n text back into the heading's own line boxes is what the clamp actually measures. */\n .reqore-span {\n display: inline;\n }\n }\n "])), $clampLines);
|
|
150
|
-
});
|
|
151
|
-
exports.StyledPanelTitleHeader = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\n display: flex;\n justify-content: flex-start;\n align-items: center;\n /* A CONTENT basis, and both extremes were tried before settling here. Basis 0 hands the action\n group beside this one its full content width, so nothing ever overflows and the fold into the\n menu never fires \u2014 actions labelled \"hidden when small\" stay visible on a small panel. A 100%\n width does the opposite: this header claims the entire row, so the group is always crushed to\n its floor and always folds however much room there is, which hid Tree's save button behind an\n overflow menu on a panel with space to spare. On a content basis the two shrink against each\n other in proportion to what they each need, which is the only version where folding means\n \"there is no room\" rather than \"there is a header\". */\n flex: 1 1 auto;\n overflow: hidden;\n"], ["\n\n display: flex;\n justify-content: flex-start;\n align-items: center;\n /* A CONTENT basis, and both extremes were tried before settling here. Basis 0 hands the action\n group beside this one its full content width, so nothing ever overflows and the fold into the\n menu never fires \u2014 actions labelled \"hidden when small\" stay visible on a small panel. A 100%\n width does the opposite: this header claims the entire row, so the group is always crushed to\n its floor and always folds however much room there is, which hid Tree's save button behind an\n overflow menu on a panel with space to spare. On a content basis the two shrink against each\n other in proportion to what they each need, which is the only version where folding means\n \"there is no room\" rather than \"there is a header\". */\n flex: 1 1 auto;\n overflow: hidden;\n"])));
|
|
152
|
-
exports.StyledPanelTitleHeaderContent = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n // When the icon lives in the outer container (iconVerticalAlign mode),\n // we use a 2-column \u00D7 N-row CSS Grid where the LABEL ROW and DESCRIPTION\n // ROW are direct grid items \u2014 not wrapped inside a span-2 stack. That\n // makes each row's auto-sized height equal to the actual text row's\n // line-box height, so 'align-self: center' on the icon (in column 1)\n // visually centres the icon against the text row it shares a grid row\n // with \u2014 no font-metric guesswork.\n display: ", ";\n ", "\n flex: 0 1 auto;\n overflow: hidden;\n min-width: ", "px;\n"], ["\n // When the icon lives in the outer container (iconVerticalAlign mode),\n // we use a 2-column \u00D7 N-row CSS Grid where the LABEL ROW and DESCRIPTION\n // ROW are direct grid items \u2014 not wrapped inside a span-2 stack. That\n // makes each row's auto-sized height equal to the actual text row's\n // line-box height, so 'align-self: center' on the icon (in column 1)\n // visually centres the icon against the text row it shares a grid row\n // with \u2014 no font-metric guesswork.\n display: ", ";\n ", "\n flex: 0 1 auto;\n overflow: hidden;\n min-width: ", "px;\n"])), function (_a) {
|
|
153
|
-
var $hasOuterIcon = _a.$hasOuterIcon;
|
|
154
|
-
return ($hasOuterIcon ? 'grid' : 'flex');
|
|
155
|
-
}, function (_a) {
|
|
156
|
-
var $hasOuterIcon = _a.$hasOuterIcon, size = _a.size, _b = _a.$iconVerticalAlign, $iconVerticalAlign = _b === void 0 ? 'center' : _b, $hasDescription = _a.$hasDescription;
|
|
157
|
-
return $hasOuterIcon
|
|
158
|
-
? (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n // 'auto' lets the column grow to the icon's actual rendered size \u2014\n // important when consumers pass a custom 'iconProps.size' that does\n // not match the default size derived from 'panelSize'/'labelSize'.\n // 'iconSize' is still passed via 'min-width' below to ensure a\n // sensible minimum reservation when the row is otherwise empty.\n grid-template-columns: auto minmax(0, 1fr);\n grid-template-rows: ", ";\n column-gap: ", "px;\n row-gap: 3px;\n align-items: start;\n\n & > .reqore-panel-title-icon {\n ", "\n grid-column: 1;\n align-self: center;\n justify-self: start;\n // Suppress 'vertical-align: super' that ReqoreIcon applies to its\n // SVG for inline-text contexts. In our grid layout the wrapper is\n // already vertically centred against the text row's line-box;\n // 'display: block' takes the SVG out of inline flow entirely so\n // baseline/super offsets cannot push it off-centre. The wrapper's\n // own 'align-items: center' then centres the SVG within itself.\n & svg {\n display: block;\n vertical-align: middle;\n }\n }\n\n & > .reqore-panel-title-label-row {\n grid-column: 2;\n grid-row: 1;\n min-width: 0;\n }\n\n & > .reqore-panel-title-description {\n grid-column: 2;\n grid-row: 2;\n min-width: 0;\n }\n "], ["\n // 'auto' lets the column grow to the icon's actual rendered size \u2014\n // important when consumers pass a custom 'iconProps.size' that does\n // not match the default size derived from 'panelSize'/'labelSize'.\n // 'iconSize' is still passed via 'min-width' below to ensure a\n // sensible minimum reservation when the row is otherwise empty.\n grid-template-columns: auto minmax(0, 1fr);\n grid-template-rows: ", ";\n column-gap: ", "px;\n row-gap: 3px;\n align-items: start;\n\n & > .reqore-panel-title-icon {\n ", "\n grid-column: 1;\n align-self: center;\n justify-self: start;\n // Suppress 'vertical-align: super' that ReqoreIcon applies to its\n // SVG for inline-text contexts. In our grid layout the wrapper is\n // already vertically centred against the text row's line-box;\n // 'display: block' takes the SVG out of inline flow entirely so\n // baseline/super offsets cannot push it off-centre. The wrapper's\n // own 'align-items: center' then centres the SVG within itself.\n & svg {\n display: block;\n vertical-align: middle;\n }\n }\n\n & > .reqore-panel-title-label-row {\n grid-column: 2;\n grid-row: 1;\n min-width: 0;\n }\n\n & > .reqore-panel-title-description {\n grid-column: 2;\n grid-row: 2;\n min-width: 0;\n }\n "])), $hasDescription ? 'auto auto' : 'auto', sizes_1.PADDING_FROM_SIZE[size || 'normal'], $iconVerticalAlign === 'top'
|
|
159
|
-
? (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n grid-row: 1;\n "], ["\n grid-row: 1;\n "]))) : $iconVerticalAlign === 'bottom' && $hasDescription
|
|
160
|
-
? (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n grid-row: 2;\n "], ["\n grid-row: 2;\n "]))) : (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n grid-row: 1 / ", ";\n "], ["\n grid-row: 1 / ", ";\n "])), $hasDescription ? 3 : 2)) : (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n justify-content: flex-start;\n align-items: center;\n "], ["\n justify-content: flex-start;\n align-items: center;\n "])));
|
|
161
|
-
}, function (_a) {
|
|
162
|
-
var iconSize = _a.iconSize, hasIcon = _a.hasIcon;
|
|
163
|
-
var width = 0;
|
|
164
|
-
if (hasIcon) {
|
|
165
|
-
width += iconSize;
|
|
166
|
-
}
|
|
167
|
-
return width;
|
|
168
|
-
});
|
|
169
|
-
exports.StyledPanelTitleHeaderLabelAndDescription = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n display: flex;\n flex-flow: column;\n gap: 3px;\n min-width: 0;\n flex: 1 auto;\n"], ["\n display: flex;\n flex-flow: column;\n gap: 3px;\n min-width: 0;\n flex: 1 auto;\n"])));
|
|
170
|
-
exports.StyledPanelTitleHeaderLabelAndBadge = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n"], ["\n display: inline-flex;\n align-items: center;\n max-width: 100%;\n"])));
|
|
171
|
-
/**
|
|
172
|
-
* Does the panel wrapper draw its 1px border?
|
|
173
|
-
*
|
|
174
|
-
* `accentPosition` moves the intent onto the edge strip, so an accent panel never tints its
|
|
175
|
-
* border — and a `flat` one draws no border at all, leaving the strip to carry the colour alone.
|
|
176
|
-
*
|
|
177
|
-
* This lives in one place because FOUR style rules branch on it — the border itself, the
|
|
178
|
-
* interactive hover border, the `raised` inset highlight, and the sticky header's radius inset.
|
|
179
|
-
* They were four separate copies of `flat && !intent`, and only the first was taught about
|
|
180
|
-
* `accentPosition`, so hover repainted the intent border the strip had just removed and `raised`
|
|
181
|
-
* silently vanished on accent panels.
|
|
182
|
-
*/
|
|
183
|
-
var hasPanelBorder = function (_a) {
|
|
184
|
-
var flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
|
|
185
|
-
return !(flat && (!intent || accentPosition));
|
|
186
|
-
};
|
|
187
|
-
/** The colour the panel border (and its hover variant) is derived from. With `accentPosition`
|
|
188
|
-
* the intent belongs to the strip, so the border falls back to the neutral surface colour. */
|
|
189
|
-
var getPanelBorderBaseColor = function (theme, _a) {
|
|
190
|
-
var intent = _a.intent, accentPosition = _a.accentPosition;
|
|
191
|
-
return (intent && !accentPosition ? theme.intents[intent] : (0, colors_2.getMainBackgroundColor)(theme));
|
|
192
|
-
};
|
|
193
|
-
exports.StyledPanel = (0, styled_components_1.default)(Effect_1.StyledEffect).withConfig({
|
|
194
|
-
// `fill` controls panel layout and must not become a boolean DOM attribute. Neither must
|
|
195
|
-
// `accentPosition`: when the panel renders as a `Resizable` (a COMPONENT target) the rule
|
|
196
|
-
// below forwards everything, and re-resizable spreads the leftovers onto its wrapper div.
|
|
197
|
-
// Filtering here still leaves the styled-component's own interpolations reading the prop.
|
|
198
|
-
// Everything else follows styled-components' own rule, so re-resizable still receives its
|
|
199
|
-
// `enable` / size / handle config — those are component props, not HTML attributes.
|
|
200
|
-
shouldForwardProp: (0, styled_1.omitStyleProps)('fill', 'accentPosition'),
|
|
201
|
-
})(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", "px;\n border: ", ";\n color: ", ";\n ", "\n overflow: ", ";\n display: flex;\n flex-flow: column;\n position: relative;\n backdrop-filter: ", ";\n width: ", ";\n max-width: 100%;\n flex: ", ";\n\n /* Hover-hiding applies ONLY where the pointer can hover. A touch device never\n fires :hover, so without this gate a `show: 'hover'` action is display:none\n forever \u2014 not merely invisible but absent from the layout, with nothing on\n screen hinting it exists. Where hover is unavailable the action stays\n visible; losing the tidiness beats losing the action. */\n @media (hover: hover) and (pointer: fine) {\n &:not(:hover) {\n .reqore-panel-action-hidden {\n display: none;\n }\n }\n }\n\n &.reqore-panel-floating-active {\n border-top-right-radius: 0;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-radius: ", "px;\n border: ", ";\n color: ", ";\n ", "\n overflow: ", ";\n display: flex;\n flex-flow: column;\n position: relative;\n backdrop-filter: ", ";\n width: ", ";\n max-width: 100%;\n flex: ", ";\n\n /* Hover-hiding applies ONLY where the pointer can hover. A touch device never\n fires :hover, so without this gate a \\`show: 'hover'\\` action is display:none\n forever \u2014 not merely invisible but absent from the layout, with nothing on\n screen hinting it exists. Where hover is unavailable the action stays\n visible; losing the tidiness beats losing the action. */\n @media (hover: hover) and (pointer: fine) {\n &:not(:hover) {\n .reqore-panel-action-hidden {\n display: none;\n }\n }\n }\n\n &.reqore-panel-floating-active {\n border-top-right-radius: 0;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
202
|
-
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
203
|
-
return (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
204
|
-
}, function (_a) {
|
|
205
|
-
var rounded = _a.rounded, radiusSize = _a.radiusSize;
|
|
206
|
-
return rounded ? (0, sizes_1.resolveRadius)('normal', radiusSize) : 0;
|
|
207
|
-
}, function (_a) {
|
|
208
|
-
var theme = _a.theme, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
|
|
209
|
-
return hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition })
|
|
210
|
-
? "1px solid ".concat((0, colors_2.changeLightness)(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.08))
|
|
211
|
-
: undefined;
|
|
212
|
-
}, function (_a) {
|
|
213
|
-
var theme = _a.theme;
|
|
214
|
-
return (0, colors_2.getReadableColor)(theme, undefined, undefined, true);
|
|
215
|
-
}, function (_a) {
|
|
216
|
-
var accentPosition = _a.accentPosition, _b = _a.$accentSize, $accentSize = _b === void 0 ? sizes_1.ACCENT_SIZE_TO_PX.normal : _b, theme = _a.theme, intent = _a.intent, flat = _a.flat, rounded = _a.rounded, radiusSize = _a.radiusSize, stickyHeader = _a.stickyHeader;
|
|
217
|
-
if (!accentPosition) {
|
|
218
|
-
return undefined;
|
|
219
|
-
}
|
|
220
|
-
// The wrapper normally clips the strip into its rounded corners via `overflow: hidden`
|
|
221
|
-
// (see the `overflow` rule below) — EXCEPT with a sticky header, which forces
|
|
222
|
-
// `overflow: visible` so the header can escape. Unclipped, a square strip pokes out past
|
|
223
|
-
// the panel's corners, so in THAT CASE ONLY the strip carries its own matching radius.
|
|
224
|
-
//
|
|
225
|
-
// Deliberately not applied unconditionally: where the wrapper already clips, a redundant
|
|
226
|
-
// radius re-renders the strip as a rounded box that is then clipped to the same curve —
|
|
227
|
-
// identical shape, but a different antialiasing blend along the whole edge, which shows up
|
|
228
|
-
// as a diff on every existing accent snapshot for no visual gain.
|
|
229
|
-
//
|
|
230
|
-
// The strip sits in the padding box, inside any border, so inset by the border width to
|
|
231
|
-
// land on the wrapper's INNER curve — the same adjustment StyledPanelTopBar makes.
|
|
232
|
-
var stripRadius = stickyHeader && rounded
|
|
233
|
-
? Math.max(0, (0, sizes_1.resolveRadius)('normal', radiusSize) -
|
|
234
|
-
(hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) ? 1 : 0))
|
|
235
|
-
: 0;
|
|
236
|
-
return (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n position: relative;\n /* Reserve the strip's thickness so the title bar and content never sit\n under it \u2014 the same reservation ReqoreCallout makes. */\n padding-", ": ", "px;\n\n &::before {\n content: '';\n position: absolute;\n ", "\n ", "\n background-color: ", ";\n }\n "], ["\n position: relative;\n /* Reserve the strip's thickness so the title bar and content never sit\n under it \u2014 the same reservation ReqoreCallout makes. */\n padding-", ": ", "px;\n\n &::before {\n content: '';\n position: absolute;\n ", "\n ", "\n background-color: ", ";\n }\n "])), accentPosition === 'left' ? 'left' : 'top', $accentSize, accentPosition === 'left'
|
|
237
|
-
? (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n top: 0;\n bottom: 0;\n left: 0;\n width: ", "px;\n "], ["\n top: 0;\n bottom: 0;\n left: 0;\n width: ", "px;\n "])), $accentSize) : (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n top: 0;\n right: 0;\n left: 0;\n height: ", "px;\n "], ["\n top: 0;\n right: 0;\n left: 0;\n height: ", "px;\n "])), $accentSize), stripRadius
|
|
238
|
-
? accentPosition === 'left'
|
|
239
|
-
? (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n "], ["\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n "])), stripRadius, stripRadius) : (0, styled_components_1.css)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n "], ["\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n "])), stripRadius, stripRadius)
|
|
240
|
-
: undefined, intent
|
|
241
|
-
? theme.intents[intent]
|
|
242
|
-
: (0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.22));
|
|
243
|
-
}, function (_a) {
|
|
244
|
-
var stickyHeader = _a.stickyHeader;
|
|
245
|
-
return (stickyHeader ? 'visible' : 'hidden');
|
|
246
|
-
}, function (_a) {
|
|
247
|
-
var blur = _a.blur, opacity = _a.opacity;
|
|
248
|
-
return (blur && opacity < 1 ? "blur(".concat(blur, "px)") : undefined);
|
|
249
|
-
}, function (_a) {
|
|
250
|
-
var fluid = _a.fluid;
|
|
251
|
-
return (fluid ? '100%' : undefined);
|
|
252
|
-
}, function (_a) {
|
|
253
|
-
var fluid = _a.fluid;
|
|
254
|
-
return (fluid ? '1 auto' : '0 0 auto');
|
|
255
|
-
}, function (_a) {
|
|
256
|
-
var interactive = _a.interactive, theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
|
|
257
|
-
return interactive
|
|
258
|
-
? (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n cursor: pointer;\n\n &:hover {\n ", " ", " .reqore-panel-title-icon {\n transform: scale(", ");\n }\n\n background-color: ", ";\n\n border-color: ", ";\n\n ", "\n }\n "], ["\n cursor: pointer;\n\n &:hover {\n ", " ", " .reqore-panel-title-icon {\n transform: scale(", ");\n }\n\n background-color: ", ";\n\n border-color: ", ";\n\n ", "\n }\n "])), exports.StyledPanelTitle, exports.StyledPanelTitleHeaderContent, styles_1.ACTIVE_ICON_SCALE, opacity === 0 && flat
|
|
259
|
-
? undefined
|
|
260
|
-
: (0, polished_1.rgba)((0, polished_1.darken)(0.025, (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity)), opacity), hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition })
|
|
261
|
-
? (0, colors_2.changeLightness)(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.25)
|
|
262
|
-
: undefined, opacity !== 0 && (0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n ", ":after {\n background: linear-gradient(\n to top,\n ", "\n 0%,\n transparent 100%\n );\n }\n "], ["\n ", ":after {\n background: linear-gradient(\n to top,\n ", "\n 0%,\n transparent 100%\n );\n }\n "])), item_1.StyledCollectionItemContent, (0, polished_1.rgba)((0, polished_1.darken)(0.025, (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity)), opacity))) : undefined;
|
|
263
|
-
}, function (_a) {
|
|
264
|
-
var raised = _a.raised, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
|
|
265
|
-
return raised && !hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) && styles_1.RaisedElement;
|
|
266
|
-
}, function (_a) {
|
|
267
|
-
var fill = _a.fill, isCollapsed = _a.isCollapsed;
|
|
268
|
-
return !isCollapsed && fill
|
|
269
|
-
? (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n height: 100%;\n flex: 1;\n "], ["\n height: 100%;\n flex: 1;\n "]))) : undefined;
|
|
270
|
-
}, function (_a) {
|
|
271
|
-
var disabled = _a.disabled;
|
|
272
|
-
return disabled && styles_1.DisabledElement;
|
|
273
|
-
});
|
|
274
|
-
exports.StyledPanelTitle = styled_components_1.default.div(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n display: flex;\n /* Always a row. The title bar used to flip to a column when narrow; it now ellipsizes its\n label and lets the responsive action group collapse instead, which is what the \"hidden when\n small\" actions are for and what the stack was quietly defeating (a column made the group\n fluid, and a full-width group had room not to collapse). */\n flex-flow: ", ";\n\n ", "\n\n ", "\n\n ", "\n\n background-color: ", ";\n justify-content: space-between;\n\n padding: ", ";\n\n align-items: center;\n border-bottom: ", ";\n transition: background-color 0.2s ease-out;\n overflow: hidden;\n flex: 0 0 auto;\n gap: ", "px;\n\n ", " .reqore-panel-title-icon {\n transform: scale(", ");\n }\n\n ", "\n"], ["\n display: flex;\n /* Always a row. The title bar used to flip to a column when narrow; it now ellipsizes its\n label and lets the responsive action group collapse instead, which is what the \"hidden when\n small\" actions are for and what the stack was quietly defeating (a column made the group\n fluid, and a full-width group had room not to collapse). */\n flex-flow: ", ";\n\n ", "\n\n ", "\n\n ", "\n\n background-color: ", ";\n justify-content: space-between;\n\n padding: ", ";\n\n align-items: center;\n border-bottom: ", ";\n transition: background-color 0.2s ease-out;\n overflow: hidden;\n flex: 0 0 auto;\n gap: ", "px;\n\n ", " .reqore-panel-title-icon {\n transform: scale(", ");\n }\n\n ", "\n"])), function (_a) {
|
|
275
|
-
var $descriptionBelow = _a.$descriptionBelow;
|
|
276
|
-
return ($descriptionBelow ? 'row wrap' : 'row');
|
|
277
|
-
}, function (_a) {
|
|
278
|
-
var $descriptionFontPx = _a.$descriptionFontPx;
|
|
279
|
-
return !!$descriptionFontPx && (0, styled_components_1.css)(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n /* The description is a fixed px from `TEXT_FROM_SIZE` and knows nothing about the title\n having shrunk, so a fitted title crosses under it: at the 12px floor the support text\n renders at 15px and outranks the heading it supports. Scaling it by the SAME factor the\n title took keeps the two in their original proportion instead of giving the description\n a fit of its own \u2014 which would size it against its own box and let the pair drift apart\n again, in the other direction. */\n .reqore-panel-title-description {\n font-size: ", "px;\n }\n "], ["\n /* The description is a fixed px from \\`TEXT_FROM_SIZE\\` and knows nothing about the title\n having shrunk, so a fitted title crosses under it: at the 12px floor the support text\n renders at 15px and outranks the heading it supports. Scaling it by the SAME factor the\n title took keeps the two in their original proportion instead of giving the description\n a fit of its own \u2014 which would size it against its own box and let the pair drift apart\n again, in the other direction. */\n .reqore-panel-title-description {\n font-size: ", "px;\n }\n "])), $descriptionFontPx);
|
|
280
|
-
}, function (_a) {
|
|
281
|
-
var $descriptionBelow = _a.$descriptionBelow;
|
|
282
|
-
return $descriptionBelow && (0, styled_components_1.css)(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n /* Only on a wrapping bar. The header claims the row so the action group beside it gets\n squeezed and folds \u2014 that is what the base rule is for \u2014 but in a WRAPPING row a\n full-width claim takes the whole line and pushes the actions onto their own, which is\n not what \"description below\" asked for. Here the header grows from 0 into whatever the\n actions leave, on line one, and the description takes line two. */\n > .reqore-panel-title-header {\n width: auto;\n flex: 1 1 0%;\n min-width: 0;\n }\n "], ["\n /* Only on a wrapping bar. The header claims the row so the action group beside it gets\n squeezed and folds \u2014 that is what the base rule is for \u2014 but in a WRAPPING row a\n full-width claim takes the whole line and pushes the actions onto their own, which is\n not what \"description below\" asked for. Here the header grows from 0 into whatever the\n actions leave, on line one, and the description takes line two. */\n > .reqore-panel-title-header {\n width: auto;\n flex: 1 1 0%;\n min-width: 0;\n }\n "])));
|
|
283
|
-
}, function (_a) {
|
|
284
|
-
var $descriptionMaxLines = _a.$descriptionMaxLines;
|
|
285
|
-
return !!$descriptionMaxLines && (0, styled_components_1.css)(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n .reqore-panel-title-description {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n white-space: normal;\n overflow-wrap: anywhere;\n }\n "], ["\n .reqore-panel-title-description {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: ", ";\n overflow: hidden;\n white-space: normal;\n overflow-wrap: anywhere;\n }\n "])), $descriptionMaxLines);
|
|
286
|
-
}, function (_a) {
|
|
287
|
-
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
288
|
-
return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
289
|
-
}, function (_a) {
|
|
290
|
-
var noHorizontalPadding = _a.noHorizontalPadding, size = _a.size, padded = _a.padded, opacity = _a.opacity, flat = _a.flat, intent = _a.intent;
|
|
291
|
-
return "".concat(opacity === 0 && flat && !intent ? 0 : getPaddingSize(padded, size), "px ").concat(noHorizontalPadding ? 0 : "".concat(getPaddingSize(padded, size), "px"));
|
|
292
|
-
}, function (_a) {
|
|
293
|
-
var theme = _a.theme, isCollapsed = _a.isCollapsed, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
294
|
-
return !isCollapsed && !flat && opacity
|
|
295
|
-
? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08), opacity))
|
|
296
|
-
: null;
|
|
297
|
-
}, sizes_1.GAP_FROM_SIZE.normal, exports.StyledPanelTitleHeaderContent, styles_1.INACTIVE_ICON_SCALE, function (_a) {
|
|
298
|
-
var collapsible = _a.collapsible;
|
|
299
|
-
return collapsible && (0, styled_components_1.css)(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n cursor: pointer;\n &:hover {\n ", " .reqore-panel-title-icon {\n transform: scale(", ");\n }\n\n background-color: ", ";\n }\n "], ["\n cursor: pointer;\n &:hover {\n ", " .reqore-panel-title-icon {\n transform: scale(", ");\n }\n\n background-color: ", ";\n }\n "])), exports.StyledPanelTitleHeaderContent, styles_1.ACTIVE_ICON_SCALE, function (_a) {
|
|
300
|
-
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
301
|
-
return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.05), opacity);
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
exports.StyledPanelTopBar = (0, styled_components_1.default)(exports.StyledPanelTitle)(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n padding-bottom: ", ";\n padding-top: ", ";\n position: ", ";\n /* `top: 0` must mean \"flush with the visible top edge of whatever scrolls\",\n which is what every call site assumes. Sticky resolves against the scroll\n container's CONTENT box, so on a padded scrollport \u2014 which every default\n panel/drawer/modal body is, since StyledPanelContent puts padding and\n overflow on one element \u2014 an uncompensated 0 parks the header below the\n padding and lets content scroll through the gap. `stickyHeaderInset` is\n that padding, measured from the real scroll ancestor at runtime;\n `stickyHeaderOffset` stays a deliberate caller offset on top of a now\n correct zero. */\n top: ", ";\n z-index: ", ";\n // A sticky header forces the panel wrapper to overflow visible (so the\n // header can stick), which stops the wrapper from clipping the header's top\n // corners \u2014 so without this the panel reads as square-topped even at rest.\n // AT REST, round the header's own top corners to the panel's inner radius so\n // the panel keeps its radius (inset 1px past a visible border to match the\n // wrapper's inner curve; flat border-less panels need no inset). ONCE STUCK\n // (pinned to the scroll container, detected at runtime via isStuck), drop the\n // radius to 0 so the pinned header reads as a full-width bar and only loses\n // its corners while it is actually moving with the scroll.\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n background: ", ";\n // When the header is sticky AND the panel is minimal / transparent (opacity === 0), the\n // header has no surface of its own \u2014 scrolling content slides straight under it and the\n // label / actions become illegible. Apply a backdrop blur so the underlying content stays\n // visible but is softened enough for the header text to read clearly. Idle (no overflow,\n // nothing behind) the blur is a no-op so the static appearance is unchanged.\n ", "\n"], ["\n padding-bottom: ", ";\n padding-top: ", ";\n position: ", ";\n /* \\`top: 0\\` must mean \"flush with the visible top edge of whatever scrolls\",\n which is what every call site assumes. Sticky resolves against the scroll\n container's CONTENT box, so on a padded scrollport \u2014 which every default\n panel/drawer/modal body is, since StyledPanelContent puts padding and\n overflow on one element \u2014 an uncompensated 0 parks the header below the\n padding and lets content scroll through the gap. \\`stickyHeaderInset\\` is\n that padding, measured from the real scroll ancestor at runtime;\n \\`stickyHeaderOffset\\` stays a deliberate caller offset on top of a now\n correct zero. */\n top: ", ";\n z-index: ", ";\n // A sticky header forces the panel wrapper to overflow visible (so the\n // header can stick), which stops the wrapper from clipping the header's top\n // corners \u2014 so without this the panel reads as square-topped even at rest.\n // AT REST, round the header's own top corners to the panel's inner radius so\n // the panel keeps its radius (inset 1px past a visible border to match the\n // wrapper's inner curve; flat border-less panels need no inset). ONCE STUCK\n // (pinned to the scroll container, detected at runtime via isStuck), drop the\n // radius to 0 so the pinned header reads as a full-width bar and only loses\n // its corners while it is actually moving with the scroll.\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n background: ", ";\n // When the header is sticky AND the panel is minimal / transparent (opacity === 0), the\n // header has no surface of its own \u2014 scrolling content slides straight under it and the\n // label / actions become illegible. Apply a backdrop blur so the underlying content stays\n // visible but is softened enough for the header text to read clearly. Idle (no overflow,\n // nothing behind) the blur is a no-op so the static appearance is unchanged.\n ", "\n"])), function (_a) {
|
|
305
|
-
var padded = _a.padded, size = _a.size, isCollapsed = _a.isCollapsed, minimal = _a.minimal;
|
|
306
|
-
return !padded || isCollapsed || !minimal
|
|
307
|
-
? "".concat(getPaddingSize(padded, size), "px")
|
|
308
|
-
: minimal
|
|
309
|
-
? "".concat(getPaddingSize(padded, size) / 2, "px")
|
|
310
|
-
: 0;
|
|
311
|
-
}, function (_a) {
|
|
312
|
-
var minimal = _a.minimal, size = _a.size, padded = _a.padded, wrapperPadding = _a.wrapperPadding;
|
|
313
|
-
return wrapperPadding === 'bottom' || wrapperPadding === 'none'
|
|
314
|
-
? undefined
|
|
315
|
-
: minimal
|
|
316
|
-
? "".concat(getPaddingSize(padded, size), "px")
|
|
317
|
-
: undefined;
|
|
318
|
-
}, function (_a) {
|
|
319
|
-
var stickyHeader = _a.stickyHeader;
|
|
320
|
-
return (stickyHeader ? 'sticky' : 'relative');
|
|
321
|
-
}, function (_a) {
|
|
322
|
-
var stickyHeader = _a.stickyHeader, _b = _a.stickyHeaderOffset, stickyHeaderOffset = _b === void 0 ? 0 : _b, _c = _a.stickyHeaderInset, stickyHeaderInset = _c === void 0 ? 0 : _c;
|
|
323
|
-
return stickyHeader ? "".concat(stickyHeaderOffset - stickyHeaderInset, "px") : undefined;
|
|
324
|
-
}, function (_a) {
|
|
325
|
-
var stickyHeader = _a.stickyHeader;
|
|
326
|
-
return (stickyHeader ? 2 : undefined);
|
|
327
|
-
}, function (_a) {
|
|
328
|
-
var stickyHeader = _a.stickyHeader, rounded = _a.rounded, radiusSize = _a.radiusSize, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition, isStuck = _a.isStuck;
|
|
329
|
-
return stickyHeader && rounded
|
|
330
|
-
? isStuck
|
|
331
|
-
? '0px'
|
|
332
|
-
: "".concat(Math.max(0, (0, sizes_1.resolveRadius)('normal', radiusSize) -
|
|
333
|
-
(hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) ? 1 : 0)), "px")
|
|
334
|
-
: undefined;
|
|
335
|
-
}, function (_a) {
|
|
336
|
-
var stickyHeader = _a.stickyHeader, rounded = _a.rounded, radiusSize = _a.radiusSize, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition, isStuck = _a.isStuck;
|
|
337
|
-
return stickyHeader && rounded
|
|
338
|
-
? isStuck
|
|
339
|
-
? '0px'
|
|
340
|
-
: "".concat(Math.max(0, (0, sizes_1.resolveRadius)('normal', radiusSize) -
|
|
341
|
-
(hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) ? 1 : 0)), "px")
|
|
342
|
-
: undefined;
|
|
343
|
-
}, function (_a) {
|
|
344
|
-
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
345
|
-
return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
346
|
-
}, function (_a) {
|
|
347
|
-
var stickyHeader = _a.stickyHeader, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
348
|
-
return stickyHeader &&
|
|
349
|
-
opacity === 0 && (0, styled_components_1.css)(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n backdrop-filter: blur(30px);\n -webkit-backdrop-filter: blur(30px);\n "], ["\n backdrop-filter: blur(30px);\n -webkit-backdrop-filter: blur(30px);\n "])));
|
|
350
|
-
});
|
|
351
|
-
exports.StyledPanelBottomActions = (0, styled_components_1.default)(exports.StyledPanelTitle)(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n border-bottom: 0;\n border-top: ", ";\n"], ["\n padding-top: ", ";\n padding-bottom: ", ";\n border-bottom: 0;\n border-top: ", ";\n"])), function (_a) {
|
|
352
|
-
var padded = _a.padded, size = _a.size, minimal = _a.minimal;
|
|
353
|
-
return !padded || !minimal
|
|
354
|
-
? "".concat(getPaddingSize(padded, size), "px")
|
|
355
|
-
: minimal
|
|
356
|
-
? getPaddingSize(padded, size) / 2
|
|
357
|
-
: 0;
|
|
358
|
-
}, function (_a) {
|
|
359
|
-
var minimal = _a.minimal, size = _a.size, padded = _a.padded, wrapperPadding = _a.wrapperPadding;
|
|
360
|
-
return wrapperPadding === 'top' || wrapperPadding === 'none'
|
|
361
|
-
? undefined
|
|
362
|
-
: minimal
|
|
363
|
-
? "".concat(getPaddingSize(padded, size), "px")
|
|
364
|
-
: undefined;
|
|
365
|
-
}, function (_a) {
|
|
366
|
-
var theme = _a.theme, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
367
|
-
return !flat
|
|
368
|
-
? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08), opacity))
|
|
369
|
-
: null;
|
|
370
|
-
});
|
|
371
|
-
exports.StyledPanelContent = styled_components_1.default.div(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n display: ", ";\n padding: ", ";\n flex: 1;\n /* A flex child's min-height defaults to its content size, so without this the\n scrollable content can't shrink: a panel/drawer body taller than the panel\n pushes the (flex: 0 0 auto) bottom-actions footer past the panel's clipped\n edge and strands it, instead of scrolling. */\n min-height: 0;\n overflow: auto;\n overflow-wrap: anywhere;\n font-size: ", "px;\n"], ["\n display: ", ";\n padding: ", ";\n flex: 1;\n /* A flex child's min-height defaults to its content size, so without this the\n scrollable content can't shrink: a panel/drawer body taller than the panel\n pushes the (flex: 0 0 auto) bottom-actions footer past the panel's clipped\n edge and strands it, instead of scrolling. */\n min-height: 0;\n overflow: auto;\n overflow-wrap: anywhere;\n font-size: ", "px;\n"])), function (_a) {
|
|
372
|
-
var isCollapsed = _a.isCollapsed;
|
|
373
|
-
return (isCollapsed ? 'none !important' : undefined);
|
|
374
|
-
}, function (_a) {
|
|
375
|
-
var padded = _a.padded, size = _a.size, noHorizontalPadding = _a.noHorizontalPadding;
|
|
376
|
-
return !padded
|
|
377
|
-
? undefined
|
|
378
|
-
: noHorizontalPadding
|
|
379
|
-
? "".concat(getPaddingSize(padded, size), "px 0")
|
|
380
|
-
: "".concat(getPaddingSize(padded, size), "px ").concat(getPaddingSize(padded, size), "px");
|
|
381
|
-
}, function (_a) {
|
|
382
|
-
var size = _a.size;
|
|
383
|
-
return sizes_1.TEXT_FROM_SIZE[size];
|
|
384
|
-
});
|
|
385
|
-
exports.StyledFloatingActions = styled_components_1.default.div(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n position: fixed;\n z-index: 999999;\n display: flex;\n padding: ", "px;\n background-color: ", ";\n border: ", ";\n border-bottom: none;\n border-radius: ", "px\n ", "px 0 0;\n gap: ", "px;\n pointer-events: auto;\n"], ["\n position: fixed;\n z-index: 999999;\n display: flex;\n padding: ", "px;\n background-color: ", ";\n border: ", ";\n border-bottom: none;\n border-radius: ", "px\n ", "px 0 0;\n gap: ", "px;\n pointer-events: auto;\n"])), function (_a) {
|
|
386
|
-
var size = _a.size;
|
|
387
|
-
return sizes_1.PADDING_FROM_SIZE[size];
|
|
388
|
-
}, function (_a) {
|
|
389
|
-
var theme = _a.theme;
|
|
390
|
-
return (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), 1);
|
|
391
|
-
}, function (_a) {
|
|
392
|
-
var theme = _a.theme, flat = _a.flat, intent = _a.intent;
|
|
393
|
-
return flat && !intent
|
|
394
|
-
? undefined
|
|
395
|
-
: "1px solid ".concat((0, colors_2.changeLightness)(intent ? theme.intents[intent] : (0, colors_2.getMainBackgroundColor)(theme), 0.08));
|
|
396
|
-
}, function (_a) {
|
|
397
|
-
var radiusSize = _a.radiusSize, size = _a.size;
|
|
398
|
-
return (0, sizes_1.resolveRadius)(size, radiusSize);
|
|
399
|
-
}, function (_a) {
|
|
400
|
-
var radiusSize = _a.radiusSize, size = _a.size;
|
|
401
|
-
return (0, sizes_1.resolveRadius)(size, radiusSize);
|
|
402
|
-
}, function (_a) {
|
|
403
|
-
var size = _a.size;
|
|
404
|
-
return sizes_1.GAP_FROM_SIZE[size];
|
|
405
|
-
});
|
|
406
|
-
exports.ReqorePanelSkeleton = (0, react_2.memo)(function (_a) {
|
|
407
|
-
var size = _a.size, isCollapsed = _a.isCollapsed, children = _a.children;
|
|
408
|
-
var style = (0, react_2.useMemo)(function () { return ({ padding: "".concat(sizes_1.PADDING_FROM_SIZE[size], "px") }); }, [size]);
|
|
409
|
-
return ((0, jsx_runtime_1.jsxs)(ControlGroup_1.default, { vertical: true, fluid: true, gapSize: 'big', style: style, children: [(0, jsx_runtime_1.jsxs)(ControlGroup_1.default, { spaceBetween: true, fluid: true, children: [(0, jsx_runtime_1.jsxs)(ControlGroup_1.default, { fixed: true, gapSize: 'big', children: [(0, jsx_runtime_1.jsx)(Skeleton_1.ReqoreSkeleton, { circle: true, size: size }), (0, jsx_runtime_1.jsx)(Skeleton_1.ReqoreSkeleton, { width: '200px', size: size })] }), (0, jsx_runtime_1.jsxs)(ControlGroup_1.default, { fixed: true, children: [(0, jsx_runtime_1.jsx)(Skeleton_1.ReqoreSkeleton, { size: size }), (0, jsx_runtime_1.jsx)(Skeleton_1.ReqoreSkeleton, { size: size })] })] }), !isCollapsed &&
|
|
410
|
-
(children ? (children) : ((0, jsx_runtime_1.jsx)(ControlGroup_1.default, { vertical: true, children: (0, jsx_runtime_1.jsx)(Skeleton_1.ReqoreSkeleton, { lines: 5, width: '100%', size: 'tiny' }) })))] }));
|
|
411
|
-
});
|
|
412
|
-
exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
413
|
-
var _b, _c;
|
|
414
|
-
var children = _a.children, label = _a.label, description = _a.description, _d = _a.collapseButtonProps, collapseButtonProps = _d === void 0 ? {} : _d, collapsible = _a.collapsible, onClose = _a.onClose, _e = _a.closeButtonProps, closeButtonProps = _e === void 0 ? {} : _e, _f = _a.rounded, rounded = _f === void 0 ? true : _f, _g = _a.actions, actions = _g === void 0 ? [] : _g, _h = _a.bottomActions, bottomActions = _h === void 0 ? [] : _h, isCollapsed = _a.isCollapsed, customTheme = _a.customTheme, inheritCustomTheme = _a.inheritCustomTheme, icon = _a.icon, iconImage = _a.iconImage, _j = _a.iconWithLabel, iconWithLabel = _j === void 0 ? false : _j, _k = _a.iconVerticalAlign, iconVerticalAlign = _k === void 0 ? 'center' : _k, intent = _a.intent, className = _a.className, flat = _a.flat, _l = _a.unMountContentOnCollapse, unMountContentOnCollapse = _l === void 0 ? true : _l, onCollapseChange = _a.onCollapseChange, _m = _a.padded, padded = _m === void 0 ? true : _m, _o = _a.wrapperPadding, wrapperPadding = _o === void 0 ? 'both' : _o, contentStyle = _a.contentStyle, contentEffect = _a.contentEffect, _p = _a.labelEffect, labelEffect = _p === void 0 ? {} : _p, _q = _a.descriptionEffect, descriptionEffect = _q === void 0 ? {} : _q, descriptionIntent = _a.descriptionIntent, labelSize = _a.labelSize, contentSize = _a.contentSize, minimal = _a.minimal, badge = _a.badge, iconColor = _a.iconColor, _r = _a.iconProps, iconProps = _r === void 0 ? {} : _r, fluid = _a.fluid, _s = _a.responsiveActions, responsiveActions = _s === void 0 ? true : _s, _t = _a.responsiveTitle, responsiveTitle = _t === void 0 ? true : _t, _u = _a.compactTitle, compactTitle = _u === void 0 ? false : _u, _v = _a.fitLabel, fitLabel = _v === void 0 ? true : _v, _w = _a.labelMaxLines, labelMaxLines = _w === void 0 ? 2 : _w, _x = _a.descriptionPosition, descriptionPosition = _x === void 0 ? 'inline' : _x, _y = _a.descriptionMaxLines, descriptionMaxLines = _y === void 0 ? 2 : _y, labelMinTextSize = _a.labelMinTextSize, _z = _a.size, panelSize = _z === void 0 ? 'normal' : _z, getContentRef = _a.getContentRef, _0 = _a.labelProps, labelProps = _0 === void 0 ? {} : _0, disabled = _a.disabled, breadcrumbs = _a.breadcrumbs, _1 = _a.showActionsWhenCollapsed, showActionsWhenCollapsed = _1 === void 0 ? true : _1, showLabelTooltip = _a.showLabelTooltip, customLabelTooltip = _a.customLabelTooltip, resizable = _a.resizable, onLabelEdit = _a.onLabelEdit, responsiveActionsWrapperProps = _a.responsiveActionsWrapperProps, loading = _a.loading, loadingIconType = _a.loadingIconType, skeleton = _a.skeleton, errorBoundaryOptions = _a.errorBoundaryOptions, floatingActions = _a.floatingActions, _2 = _a.collapseTooltip, collapseTooltip = _2 === void 0 ? 'Collapse' : _2, _3 = _a.expandTooltip, expandTooltip = _3 === void 0 ? 'Expand' : _3, _4 = _a.closeTooltip, closeTooltip = _4 === void 0 ? 'Close' : _4, accentPosition = _a.accentPosition, accentSize = _a.accentSize, rest = __rest(_a, ["children", "label", "description", "collapseButtonProps", "collapsible", "onClose", "closeButtonProps", "rounded", "actions", "bottomActions", "isCollapsed", "customTheme", "inheritCustomTheme", "icon", "iconImage", "iconWithLabel", "iconVerticalAlign", "intent", "className", "flat", "unMountContentOnCollapse", "onCollapseChange", "padded", "wrapperPadding", "contentStyle", "contentEffect", "labelEffect", "descriptionEffect", "descriptionIntent", "labelSize", "contentSize", "minimal", "badge", "iconColor", "iconProps", "fluid", "responsiveActions", "responsiveTitle", "compactTitle", "fitLabel", "labelMaxLines", "descriptionPosition", "descriptionMaxLines", "labelMinTextSize", "size", "getContentRef", "labelProps", "disabled", "breadcrumbs", "showActionsWhenCollapsed", "showLabelTooltip", "customLabelTooltip", "resizable", "onLabelEdit", "responsiveActionsWrapperProps", "loading", "loadingIconType", "skeleton", "errorBoundaryOptions", "floatingActions", "collapseTooltip", "expandTooltip", "closeTooltip", "accentPosition", "accentSize"]);
|
|
415
|
-
// Resolved ONCE, here — the accent styles interpolate px and reserve padding,
|
|
416
|
-
// so they must only ever see a number. Shared with ReqoreCallout.
|
|
417
|
-
var accentSizePx = (0, react_2.useMemo)(function () { return (0, utils_1.resolveAccentSize)(accentSize); }, [accentSize]);
|
|
418
|
-
var _5 = (0, react_2.useState)(isCollapsed || false), _isCollapsed = _5[0], setIsCollapsed = _5[1];
|
|
419
|
-
var primaryContentGradient = (0, Effect_1.getPrimaryGradient)(contentEffect === null || contentEffect === void 0 ? void 0 : contentEffect.gradient);
|
|
420
|
-
var primaryContentColors = primaryContentGradient && typeof primaryContentGradient.colors === 'object'
|
|
421
|
-
? primaryContentGradient.colors
|
|
422
|
-
: undefined;
|
|
423
|
-
var firstContentGradientColor = primaryContentColors
|
|
424
|
-
? Object.values(primaryContentColors)[0]
|
|
425
|
-
: undefined;
|
|
426
|
-
var theme = (0, useTheme_1.useReqoreTheme)('main', customTheme ||
|
|
427
|
-
(firstContentGradientColor && minimal ? { main: firstContentGradientColor } : undefined), undefined, undefined, inheritCustomTheme);
|
|
428
|
-
(0, react_2.useEffect)(function () {
|
|
429
|
-
return function () {
|
|
430
|
-
if (hoverTimerRef.current)
|
|
431
|
-
clearTimeout(hoverTimerRef.current);
|
|
432
|
-
};
|
|
433
|
-
}, []);
|
|
434
|
-
var isMobile = (0, useReqoreContext_1.useReqoreProperty)('isMobile');
|
|
435
|
-
var targetRef = (0, useCombinedRefs_1.useCombinedRefs)(ref).targetRef;
|
|
436
|
-
var _6 = (0, react_use_1.useMeasure)(), measureRef = _6[0], width = _6[1].width;
|
|
437
|
-
var _7 = (0, react_2.useState)(false), _isHovered = _7[0], setIsHovered = _7[1];
|
|
438
|
-
var floatingActionsRef = (0, react_2.useRef)(null);
|
|
439
|
-
var panelRef = (0, react_2.useRef)(null);
|
|
440
|
-
var hoverTimerRef = (0, react_2.useRef)(null);
|
|
441
|
-
// Runtime stuck-detection for the sticky header: a 0-height sentinel sits at
|
|
442
|
-
// the very top of the panel, directly above the header. The header is
|
|
443
|
-
// "stuck" once that sentinel has scrolled up to (or past) the sticky line of
|
|
444
|
-
// its scroll container — at which point the header is pinned and sheds its
|
|
445
|
-
// top radius. Positions are read with getBoundingClientRect on scroll
|
|
446
|
-
// (rAF-throttled), NOT an IntersectionObserver: the observer's edge-of-root
|
|
447
|
-
// behaviour falsely reported "stuck" for panels that sit flush at their
|
|
448
|
-
// scroll container's top at rest. A document-level *capture* scroll listener
|
|
449
|
-
// catches scrolling in ANY ancestor container (page or a nested overflow
|
|
450
|
-
// box), so it works regardless of where the scroll lives; measuring the
|
|
451
|
-
// sentinel (not the header) means the panel's OWN content scroll never
|
|
452
|
-
// triggers it. Only wired when `stickyHeader` is on, so ordinary panels pay
|
|
453
|
-
// nothing.
|
|
454
|
-
var stickySentinelRef = (0, react_2.useRef)(null);
|
|
455
|
-
var _8 = (0, react_2.useState)(false), isHeaderStuck = _8[0], setIsHeaderStuck = _8[1];
|
|
456
|
-
var _9 = (0, react_2.useState)(0), stickyInset = _9[0], setStickyInset = _9[1];
|
|
457
|
-
(0, react_2.useEffect)(function () {
|
|
458
|
-
var _a;
|
|
459
|
-
if (!rest.stickyHeader) {
|
|
460
|
-
setIsHeaderStuck(false);
|
|
461
|
-
return undefined;
|
|
462
|
-
}
|
|
463
|
-
var sentinel = stickySentinelRef.current;
|
|
464
|
-
if (!sentinel)
|
|
465
|
-
return undefined;
|
|
466
|
-
var offset = (_a = rest.stickyHeaderOffset) !== null && _a !== void 0 ? _a : 0;
|
|
467
|
-
var scrollParent = getScrollableAncestor(sentinel);
|
|
468
|
-
var frame = 0;
|
|
469
|
-
// Read once per layout change, not per scroll frame: `measure()` runs in a
|
|
470
|
-
// rAF on every scroll and already forces a layout read.
|
|
471
|
-
var inset = getScrollportInset(scrollParent);
|
|
472
|
-
setStickyInset(inset.padding);
|
|
473
|
-
var measure = function () {
|
|
474
|
-
frame = 0;
|
|
475
|
-
var sentinelTop = sentinel.getBoundingClientRect().top;
|
|
476
|
-
// Border box plus the border, which is the line the compensated header
|
|
477
|
-
// pins to. Comparing against the bare border box flips `isHeaderStuck`
|
|
478
|
-
// late by the scrollport's inset, so a pinned header keeps its top
|
|
479
|
-
// radius through exactly the gap this fix closes.
|
|
480
|
-
var rootTop = scrollParent
|
|
481
|
-
? scrollParent.getBoundingClientRect().top + inset.border
|
|
482
|
-
: 0;
|
|
483
|
-
// 1px deadzone so the exact at-rest position (sentinel flush against the
|
|
484
|
-
// top) never reads as stuck.
|
|
485
|
-
setIsHeaderStuck(sentinelTop < rootTop + offset - 1);
|
|
486
|
-
};
|
|
487
|
-
var onScroll = function () {
|
|
488
|
-
if (!frame)
|
|
489
|
-
frame = requestAnimationFrame(measure);
|
|
490
|
-
};
|
|
491
|
-
var onLayout = function () {
|
|
492
|
-
inset = getScrollportInset(scrollParent);
|
|
493
|
-
setStickyInset(inset.padding);
|
|
494
|
-
onScroll();
|
|
495
|
-
};
|
|
496
|
-
measure();
|
|
497
|
-
document.addEventListener('scroll', onScroll, { capture: true, passive: true });
|
|
498
|
-
window.addEventListener('resize', onLayout, { passive: true });
|
|
499
|
-
// Responsive padding changes the inset without a window resize or a
|
|
500
|
-
// scroll, and the header would stay compensated by the old value.
|
|
501
|
-
var observer = scrollParent && typeof ResizeObserver !== 'undefined'
|
|
502
|
-
? new ResizeObserver(onLayout)
|
|
503
|
-
: undefined;
|
|
504
|
-
observer === null || observer === void 0 ? void 0 : observer.observe(scrollParent);
|
|
505
|
-
return function () {
|
|
506
|
-
document.removeEventListener('scroll', onScroll, true);
|
|
507
|
-
window.removeEventListener('resize', onLayout);
|
|
508
|
-
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
|
509
|
-
if (frame)
|
|
510
|
-
cancelAnimationFrame(frame);
|
|
511
|
-
};
|
|
512
|
-
}, [rest.stickyHeader, rest.stickyHeaderOffset]);
|
|
513
|
-
(0, react_use_1.useUpdateEffect)(function () {
|
|
514
|
-
setIsCollapsed(!!isCollapsed);
|
|
515
|
-
}, [isCollapsed]);
|
|
516
|
-
var floatingActionsList = (0, react_2.useMemo)(function () { return (floatingActions ? actions.filter(function (action) { return action.show === 'hover'; }) : []); }, [floatingActions, actions]);
|
|
517
|
-
var nonFloatingActions = (0, react_2.useMemo)(function () { return (floatingActions ? actions.filter(function (action) { return action.show !== 'hover'; }) : actions); }, [floatingActions, actions]);
|
|
518
|
-
var updateFloatingActionsPosition = (0, react_2.useCallback)(function () {
|
|
519
|
-
if (!floatingActionsRef.current || !panelRef.current)
|
|
520
|
-
return;
|
|
521
|
-
var panelRect = panelRef.current.getBoundingClientRect();
|
|
522
|
-
var floatingRect = floatingActionsRef.current.getBoundingClientRect();
|
|
523
|
-
// Temporarily hide the floating actions from hit-testing so they don't
|
|
524
|
-
// block the elementFromPoint check on the panel
|
|
525
|
-
floatingActionsRef.current.style.pointerEvents = 'none';
|
|
526
|
-
var topRight = document.elementFromPoint(panelRect.right - 1, panelRect.top + 1);
|
|
527
|
-
floatingActionsRef.current.style.pointerEvents = '';
|
|
528
|
-
var isPanelTopVisible = topRight && (panelRef.current.contains(topRight) || topRight === panelRef.current);
|
|
529
|
-
if (!isPanelTopVisible) {
|
|
530
|
-
floatingActionsRef.current.style.display = 'none';
|
|
531
|
-
return;
|
|
532
|
-
}
|
|
533
|
-
floatingActionsRef.current.style.display = 'flex';
|
|
534
|
-
floatingActionsRef.current.style.top = "".concat(panelRect.top - floatingRect.height + (flat ? 0 : 1), "px");
|
|
535
|
-
floatingActionsRef.current.style.left = "".concat(panelRect.right - floatingRect.width, "px");
|
|
536
|
-
}, [flat]);
|
|
537
|
-
(0, react_2.useEffect)(function () {
|
|
538
|
-
if (!_isHovered || !floatingActions || !(0, lodash_1.size)(floatingActionsList))
|
|
539
|
-
return undefined;
|
|
540
|
-
updateFloatingActionsPosition();
|
|
541
|
-
var onScroll = function () { return updateFloatingActionsPosition(); };
|
|
542
|
-
window.addEventListener('scroll', onScroll, true);
|
|
543
|
-
return function () { return window.removeEventListener('scroll', onScroll, true); };
|
|
544
|
-
}, [_isHovered, floatingActions, floatingActionsList, updateFloatingActionsPosition]);
|
|
545
|
-
var handleMouseEnter = (0, react_2.useCallback)(function (e) {
|
|
546
|
-
var _a;
|
|
547
|
-
if (floatingActions) {
|
|
548
|
-
if (hoverTimerRef.current)
|
|
549
|
-
clearTimeout(hoverTimerRef.current);
|
|
550
|
-
hoverTimerRef.current = setTimeout(function () { return setIsHovered(true); }, 150);
|
|
551
|
-
}
|
|
552
|
-
(_a = rest.onMouseEnter) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
553
|
-
}, [floatingActions, rest.onMouseEnter]);
|
|
554
|
-
var cancelHover = (0, react_2.useCallback)(function () {
|
|
555
|
-
if (hoverTimerRef.current) {
|
|
556
|
-
clearTimeout(hoverTimerRef.current);
|
|
557
|
-
hoverTimerRef.current = null;
|
|
558
|
-
}
|
|
559
|
-
setIsHovered(false);
|
|
560
|
-
}, []);
|
|
561
|
-
var handleMouseLeave = (0, react_2.useCallback)(function (e) {
|
|
562
|
-
var _a;
|
|
563
|
-
if (floatingActions) {
|
|
564
|
-
var relatedTarget = e.relatedTarget;
|
|
565
|
-
if (floatingActionsRef.current &&
|
|
566
|
-
relatedTarget instanceof Node &&
|
|
567
|
-
floatingActionsRef.current.contains(relatedTarget)) {
|
|
568
|
-
return;
|
|
569
|
-
}
|
|
570
|
-
cancelHover();
|
|
571
|
-
}
|
|
572
|
-
(_a = rest.onMouseLeave) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
573
|
-
}, [floatingActions, rest.onMouseLeave, cancelHover]);
|
|
574
|
-
var handleFloatingActionsMouseLeave = (0, react_2.useCallback)(function (e) {
|
|
575
|
-
var relatedTarget = e.relatedTarget;
|
|
576
|
-
if (panelRef.current &&
|
|
577
|
-
relatedTarget instanceof Node &&
|
|
578
|
-
panelRef.current.contains(relatedTarget)) {
|
|
579
|
-
return;
|
|
580
|
-
}
|
|
581
|
-
cancelHover();
|
|
582
|
-
}, [cancelHover]);
|
|
583
|
-
var _resizable = (0, react_2.useMemo)(function () {
|
|
584
|
-
// Only carry re-resizable's props when the panel actually renders as a
|
|
585
|
-
// `Resizable` (the same condition the `as` below uses). Otherwise the
|
|
586
|
-
// element is a plain `div`, and — now that these props are forwarded
|
|
587
|
-
// through the panel — spreading `enable` / `defaultSize` / … onto a div
|
|
588
|
-
// would emit invalid-DOM-attribute warnings. A non-resizable (or
|
|
589
|
-
// collapsed / disabled) panel therefore carries no resizable props.
|
|
590
|
-
var isResizableElement = !!resizable && !disabled && !_isCollapsed;
|
|
591
|
-
return isResizableElement && resizable ? resizable : {};
|
|
592
|
-
}, [resizable, _isCollapsed, disabled]);
|
|
593
|
-
// Return true if the card has a title bar, otherwise return false.
|
|
594
|
-
var hasTitleBar = (0, react_2.useMemo)(function () {
|
|
595
|
-
return !!label ||
|
|
596
|
-
!!breadcrumbs ||
|
|
597
|
-
collapsible ||
|
|
598
|
-
!!onClose ||
|
|
599
|
-
!!(0, lodash_1.size)(nonFloatingActions.filter(utils_1.isActionShown)) ||
|
|
600
|
-
!!((0, lodash_1.isArray)(badge) ? (0, lodash_1.size)(badge) : badge) ||
|
|
601
|
-
!!icon;
|
|
602
|
-
}, [label, collapsible, onClose, nonFloatingActions, badge, icon]);
|
|
603
|
-
// Return true if the card has a title bar, otherwise return false.
|
|
604
|
-
var hasTitleHeader = (0, react_2.useMemo)(function () { return !!label || !!badge || !!icon || !!breadcrumbs; }, [label, icon, badge, breadcrumbs]);
|
|
605
|
-
/**
|
|
606
|
-
* `width` comes from `useMeasure`, which reports 0 until the element is actually measured —
|
|
607
|
-
* and in jsdom it stays 0 forever. `0 < 480` is true, so an unmeasured panel used to claim it
|
|
608
|
-
* was narrow; the guard against that was `NODE_ENV !== 'test'`, added in 4eb8ac1 ("Test
|
|
609
|
-
* fixes") back when the suite was jsdom-only.
|
|
610
|
-
*
|
|
611
|
-
* That proxy stopped holding when snapshots moved to a real browser under vitest: same
|
|
612
|
-
* NODE_ENV, real widths, and the narrow layout switched off in the one place it needed to be
|
|
613
|
-
* on. No snapshot has ever shown a stacked title bar, which is why the stack going three rows
|
|
614
|
-
* deep on a drawer went unnoticed for so long (#664).
|
|
615
|
-
*
|
|
616
|
-
* Asking whether the width was MEASURED says what the guard always meant. jsdom keeps its 0
|
|
617
|
-
* and stays wide, so the unit suite is unaffected; a browser measures and behaves.
|
|
618
|
-
*/
|
|
619
|
-
var isSmall = (0, react_2.useMemo)(function () { return responsiveTitle && width > 0 && width < 480; }, [width, responsiveTitle]);
|
|
620
|
-
/**
|
|
621
|
-
* Narrow, from either trigger: the panel measuring under 480px, or the provider's
|
|
622
|
-
* viewport-level `isMobile`.
|
|
623
|
-
*
|
|
624
|
-
* A narrow title bar STAYS ON ONE ROW. The label ellipsizes (it already carries `noWrap`) and
|
|
625
|
-
* the responsive action group collapses into its overflow, which is what the "hidden when
|
|
626
|
-
* small" actions exist for. It used to stack instead — title on one row, actions on another,
|
|
627
|
-
* close/collapse on a third — and that cost more room than the title ever took: measured on a
|
|
628
|
-
* drawer at 375px, a 93px header for a title using 204px of the width, with a 359px action
|
|
629
|
-
* group holding a 106px button and 261px of nothing beside it.
|
|
630
|
-
*
|
|
631
|
-
* Stacking also broke the collapse it was supposed to help. Going to a column made the action
|
|
632
|
-
* group `fluid`, the group got a full-width row, and with that much space its own measurement
|
|
633
|
-
* decided fewer actions needed collapsing — so an action labelled "hidden when small" rendered
|
|
634
|
-
* in full on a small panel.
|
|
635
|
-
*/
|
|
636
|
-
var isNarrow = isSmall || isMobile;
|
|
637
|
-
/**
|
|
638
|
-
* The tightest fallback, still opt-in: drop the title TEXT and leave the icon in its place.
|
|
639
|
-
* For a bar too narrow even to ellipsize into — a `[icon] [actions] [×]` header. Nothing
|
|
640
|
-
* changes without an icon to fall back to, and the label survives as that icon's tooltip.
|
|
641
|
-
*/
|
|
642
|
-
/**
|
|
643
|
-
* The title gives up its space entirely and the icon stands in. Opt-in only: the automatic
|
|
644
|
-
* end of the cascade is the ellipsis, and dropping the title is a decision the caller makes,
|
|
645
|
-
* not something a width should take on their behalf. Needs an icon to fall back to.
|
|
646
|
-
*/
|
|
647
|
-
var hideTitleForIcon = isNarrow && compactTitle;
|
|
648
|
-
// If collapsible is true, toggle the isCollapsed state
|
|
649
|
-
// If the isCollapsed state is true, the component is expanded
|
|
650
|
-
// If the isCollapsed state is false, the component is collapsed
|
|
651
|
-
var handleCollapseClick = (0, react_2.useCallback)(function () {
|
|
652
|
-
// If collapsible is true, toggle the isCollapsed state
|
|
653
|
-
if (collapsible) {
|
|
654
|
-
setIsCollapsed(!_isCollapsed);
|
|
655
|
-
onCollapseChange === null || onCollapseChange === void 0 ? void 0 : onCollapseChange(!_isCollapsed);
|
|
656
|
-
}
|
|
657
|
-
}, [collapsible, _isCollapsed, onCollapseChange]);
|
|
658
|
-
var leftBottomActions = (0, react_2.useMemo)(function () { return bottomActions.filter(function (_a) {
|
|
659
|
-
var position = _a.position;
|
|
660
|
-
return position === 'left' || !position;
|
|
661
|
-
}); }, [bottomActions]);
|
|
662
|
-
var rightBottomActions = (0, react_2.useMemo)(function () { return bottomActions.filter(function (_a) {
|
|
663
|
-
var position = _a.position;
|
|
664
|
-
return position === 'right';
|
|
665
|
-
}); }, [bottomActions]);
|
|
666
|
-
// Calculates whether or not the bottom actions should be displayed.
|
|
667
|
-
var hasBottomActions = (0, react_2.useMemo)(function () {
|
|
668
|
-
return !!((0, lodash_1.size)(leftBottomActions.filter(utils_1.isActionShown)) ||
|
|
669
|
-
(0, lodash_1.size)(rightBottomActions.filter(utils_1.isActionShown)));
|
|
670
|
-
}, [leftBottomActions, rightBottomActions]);
|
|
671
|
-
var renderResponsiveActions = (0, react_2.useCallback)(function (align) {
|
|
672
|
-
if (align === void 0) { align = 'flex-end'; }
|
|
673
|
-
return function (action, index) {
|
|
674
|
-
return renderActions(action, index, true, align);
|
|
675
|
-
};
|
|
676
|
-
},
|
|
677
|
-
// `isNarrow` belongs here even though this callback does not name it: it wraps
|
|
678
|
-
// `renderActions`, which does. Without it the wrapper keeps whichever `renderActions`
|
|
679
|
-
// existed on the first render — when `useMeasure` still reported 0 and the bar did not
|
|
680
|
-
// yet know it was narrow — so a width-dependent decision inside it could never take
|
|
681
|
-
// effect. That is what silently defeated dropping the action labels: the flag flipped and
|
|
682
|
-
// the closure did not. (`renderActions` itself cannot go here: it is declared below.)
|
|
683
|
-
[isNarrow, actions, showActionsWhenCollapsed, _isCollapsed]);
|
|
684
|
-
var hasNonResponsiveActions = (0, react_2.useCallback)(
|
|
685
|
-
// `show: false` has to be honoured on BOTH paths. The `responsiveActions: false` arm used
|
|
686
|
-
// to ask only whether the array had entries, so a panel whose every action is hidden still
|
|
687
|
-
// reported having some and rendered an empty control group. It went unnoticed while the
|
|
688
|
-
// prop defaulted to `true` and that arm was mostly dead.
|
|
689
|
-
function (data) {
|
|
690
|
-
return data.some(function (action) {
|
|
691
|
-
return (!responsiveActions || action.responsive === false) && action.show !== false;
|
|
692
|
-
});
|
|
693
|
-
}, [actions, bottomActions, responsiveActions, showActionsWhenCollapsed, _isCollapsed]);
|
|
694
|
-
var hasResponsiveActions = (0, react_2.useCallback)(function (data) {
|
|
695
|
-
return responsiveActions &&
|
|
696
|
-
data.some(function (action) { return action.responsive !== false && action.show !== false; });
|
|
697
|
-
}, [actions, bottomActions, responsiveActions, showActionsWhenCollapsed, _isCollapsed]);
|
|
698
|
-
var renderNonResponsiveActions = (0, react_2.useCallback)(function (align) {
|
|
699
|
-
if (align === void 0) { align = 'flex-end'; }
|
|
700
|
-
return function (action, index) {
|
|
701
|
-
return renderActions(action, index, false, align);
|
|
702
|
-
};
|
|
703
|
-
}, [
|
|
704
|
-
isNarrow,
|
|
705
|
-
actions,
|
|
706
|
-
bottomActions,
|
|
707
|
-
responsiveActions,
|
|
708
|
-
showActionsWhenCollapsed,
|
|
709
|
-
_isCollapsed,
|
|
710
|
-
]);
|
|
711
|
-
var renderActions = (0, react_2.useCallback)(function (action, index, includeResponsive, align) {
|
|
712
|
-
if (align === void 0) { align = 'flex-end'; }
|
|
713
|
-
if (action.show === false ||
|
|
714
|
-
(showActionsWhenCollapsed === false && _isCollapsed === true) ||
|
|
715
|
-
(includeResponsive && action.responsive === false) ||
|
|
716
|
-
(!includeResponsive &&
|
|
717
|
-
responsiveActions &&
|
|
718
|
-
(action.responsive === true || !('responsive' in action)))) {
|
|
719
|
-
return null;
|
|
720
|
-
}
|
|
721
|
-
var id = action.id, actions = action.actions, actionsProps = action.actionsProps, label = action.label, intent = action.intent, CustomElement = action.as, _a = action.props, props = _a === void 0 ? {} : _a, group = action.group, show = action.show, rest = __rest(action, ["id", "actions", "actionsProps", "label", "intent", "as", "props", "group", "show"]);
|
|
722
|
-
var className = action.className;
|
|
723
|
-
// If the show prop is 'hover', add the hidden class to the action
|
|
724
|
-
className = (0, classnames_1.default)(className, show === 'hover' ? 'reqore-panel-action-hidden' : '');
|
|
725
|
-
if ((0, lodash_1.size)(group)) {
|
|
726
|
-
return ((0, jsx_runtime_1.jsx)(ControlGroup_1.default, { intent: intent, stack: true, customTheme: rest.customTheme || theme, size: rest.size, fixed: rest.fixed, fluid: rest.fluid, className: className, horizontalAlign: align, children: group.map(function (action, index) { return renderActions(action, index, true); }) }, index));
|
|
727
|
-
}
|
|
728
|
-
if ((0, lodash_1.size)(actions)) {
|
|
729
|
-
return ((0, react_1.createElement)(Dropdown_1.default, __assign({ fixed: true }, rest, { key: index, label: label, intent: intent, className: className, customTheme: rest.customTheme || theme, id: id }, actionsProps, { items: actions.filter(utils_1.isActionShown), onClick: function (e) { return e.stopPropagation(); } })));
|
|
730
|
-
}
|
|
731
|
-
if (CustomElement) {
|
|
732
|
-
return ((0, react_1.createElement)(CustomElement, __assign({ fixed: true }, props, { className: (0, classnames_1.default)(className, props.className), key: props.key || index, customTheme: props.customTheme || theme, onClick: props.onClick
|
|
733
|
-
? function (e) {
|
|
734
|
-
var _a;
|
|
735
|
-
e.stopPropagation();
|
|
736
|
-
(_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
737
|
-
}
|
|
738
|
-
: undefined })));
|
|
739
|
-
}
|
|
740
|
-
// FIRST thing to go when the bar is short of room: the action's LABEL, not the
|
|
741
|
-
// panel's title. An action is a verb the icon already carries, and the label moves
|
|
742
|
-
// to the tooltip rather than being lost; the title is the only thing naming what
|
|
743
|
-
// this panel IS. Needs an icon to fall back to — an unlabelled, iconless button is
|
|
744
|
-
// a blank box — and a caller can pin the label with `responsive: false`.
|
|
745
|
-
// `label` on an action is typed `string | number`; a tooltip is not, so the numeric
|
|
746
|
-
// case is stringified rather than cast away.
|
|
747
|
-
var actionLabelTooltip = typeof label === 'number' ? String(label) : label;
|
|
748
|
-
var dropActionLabel = isNarrow && !!rest.icon && !!label;
|
|
749
|
-
return ((0, react_1.createElement)(Button_1.default, __assign({ fixed: true }, rest, { id: id, key: index, className: className, customTheme: rest.customTheme || theme, intent: intent, tooltip: dropActionLabel ? rest.tooltip || actionLabelTooltip : rest.tooltip, onClick: rest.onClick
|
|
750
|
-
? function (e) {
|
|
751
|
-
var _a;
|
|
752
|
-
e.stopPropagation();
|
|
753
|
-
(_a = rest.onClick) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
754
|
-
}
|
|
755
|
-
: undefined }), dropActionLabel ? undefined : label));
|
|
756
|
-
}, [actions, theme, showActionsWhenCollapsed, _isCollapsed, isNarrow]);
|
|
757
|
-
var interactive = !!(rest.onClick ||
|
|
758
|
-
rest.onMouseOver ||
|
|
759
|
-
rest.onMouseEnter ||
|
|
760
|
-
rest.onDoubleClick ||
|
|
761
|
-
rest.onContextMenu);
|
|
762
|
-
var transformedContentEffect = (0, react_2.useMemo)(function () {
|
|
763
|
-
var newContentEffect = __assign({}, contentEffect);
|
|
764
|
-
if (newContentEffect.gradient && intent) {
|
|
765
|
-
newContentEffect.gradient = (0, Effect_1.patchPrimaryGradient)(newContentEffect.gradient, {
|
|
766
|
-
borderColor: theme.intents[intent],
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
newContentEffect.interactive = interactive;
|
|
770
|
-
return newContentEffect;
|
|
771
|
-
}, [intent, theme, contentEffect, interactive]);
|
|
772
|
-
var opacity = rest.transparent ? 0 : rest.opacity;
|
|
773
|
-
var noHorizontalPadding = opacity === 0 && flat && !intent && !rest.raised;
|
|
774
|
-
var showNonResponsiveGroup = (0, react_2.useCallback)(function () {
|
|
775
|
-
var show = false;
|
|
776
|
-
// SHOULD THIS GROUP SHOW CONTROL BUTTONS?
|
|
777
|
-
// Always, now that a narrow bar stays on one row: there is no separate control row for them
|
|
778
|
-
// to move to. This used to read `!isSmall`, which withheld them here because a small panel
|
|
779
|
-
// rendered its own row below — and that row is what the one-row treatment removed.
|
|
780
|
-
if (onClose || collapsible) {
|
|
781
|
-
show = true;
|
|
782
|
-
}
|
|
783
|
-
// OTHERWISE, ARE THERE ANY NON RESPONSIVE ACTIONS TO BE SHOWN?
|
|
784
|
-
// This either means actions where user specified responsive: false
|
|
785
|
-
// or user passed responsiveActions: false
|
|
786
|
-
if (hasNonResponsiveActions(nonFloatingActions)) {
|
|
787
|
-
show = true;
|
|
788
|
-
}
|
|
789
|
-
return show;
|
|
790
|
-
}, [collapsible, onClose, nonFloatingActions, hasNonResponsiveActions]);
|
|
791
|
-
/**
|
|
792
|
-
* The title's natural size in px, from the heading level it renders at — the same
|
|
793
|
-
* `labelSize || HEADER_SIZE_TO_NUMBER[panelSize]` the icon is sized from.
|
|
794
|
-
*/
|
|
795
|
-
var labelNaturalPx = (_b = sizes_1.HEADER_LEVEL_TO_PX[labelSize || sizes_1.HEADER_SIZE_TO_NUMBER[panelSize]]) !== null && _b !== void 0 ? _b : sizes_1.HEADER_LEVEL_TO_PX[3];
|
|
796
|
-
/**
|
|
797
|
-
* SECOND thing to give: the title's size. Once the actions are down to icons and the
|
|
798
|
-
* row is still short, the title shrinks toward a floor rather than dropping characters
|
|
799
|
-
* — the end of a name is often the part that distinguishes it. Only at the floor does
|
|
800
|
-
* the existing `noWrap` ellipsis take over.
|
|
801
|
-
*
|
|
802
|
-
* Off when the caller pins `labelEffect.textSize`: they have said what size they want.
|
|
803
|
-
*/
|
|
804
|
-
/**
|
|
805
|
-
* The width the layout left for the title, observed on the box that claims the leftover
|
|
806
|
-
* space. Kept as state rather than read during render so the fit is calculated from a width
|
|
807
|
-
* that has actually been laid out.
|
|
808
|
-
*/
|
|
809
|
-
/** Whole lines, at least one — a fractional or zero `labelMaxLines` is a caller slip, not
|
|
810
|
-
* a request for half a line of text. */
|
|
811
|
-
var clampLines = Math.max(1, Math.floor(labelMaxLines) || 1);
|
|
812
|
-
/** `compactTitle` drops the description with the title it belongs to, so a bar that has
|
|
813
|
-
* given up its title never grows a row to carry one. */
|
|
814
|
-
var descriptionBelow = descriptionPosition === 'below' && !!description && !(hideTitleForIcon && !!icon);
|
|
815
|
-
var descriptionClamp = Math.max(0, Math.floor(descriptionMaxLines || 0));
|
|
816
|
-
/**
|
|
817
|
-
* A clamped description opens on click so the whole of it can be read — on a phone there is
|
|
818
|
-
* no hover to reveal it with, and two lines of a long sentence are an invitation to tap.
|
|
819
|
-
*
|
|
820
|
-
* Interactive only while it is actually cut, or already open: a description that fits is
|
|
821
|
-
* left alone, so a click on it still reaches the bar and collapses a collapsible panel the
|
|
822
|
-
* way it always has. When it IS cut, that same click must not reach the bar — opening the
|
|
823
|
-
* text and folding the panel away in one gesture is the worst of both.
|
|
824
|
-
*/
|
|
825
|
-
var _10 = (0, react_2.useState)(false), isDescriptionExpanded = _10[0], setIsDescriptionExpanded = _10[1];
|
|
826
|
-
var _11 = (0, react_2.useState)(false), isDescriptionTruncated = _11[0], setIsDescriptionTruncated = _11[1];
|
|
827
|
-
var descriptionRef = (0, react_2.useRef)(null);
|
|
828
|
-
var descriptionIsClamped = descriptionClamp > 0 && !isDescriptionExpanded;
|
|
829
|
-
(0, react_2.useLayoutEffect)(function () {
|
|
830
|
-
var el = descriptionRef.current;
|
|
831
|
-
// `scrollHeight` is what the text wants, `clientHeight` what the clamp left it. Re-read
|
|
832
|
-
// whenever the bar's width moves, because that is what changes how many lines it takes.
|
|
833
|
-
setIsDescriptionTruncated(descriptionIsClamped && !!el && el.scrollHeight > el.clientHeight + 1);
|
|
834
|
-
}, [description, descriptionIsClamped, width]);
|
|
835
|
-
var descriptionIsInteractive = isDescriptionTruncated || isDescriptionExpanded;
|
|
836
|
-
var handleDescriptionClick = (0, react_2.useCallback)(function (event) {
|
|
837
|
-
if (!descriptionIsInteractive) {
|
|
838
|
-
return;
|
|
839
|
-
}
|
|
840
|
-
event.stopPropagation();
|
|
841
|
-
setIsDescriptionExpanded(function (expanded) { return !expanded; });
|
|
842
|
-
}, [descriptionIsInteractive]);
|
|
843
|
-
/** Shared by both places the description can render — inline with the title, or on its
|
|
844
|
-
* own row below — so the two cannot drift apart. */
|
|
845
|
-
var descriptionProps = __assign({ ref: descriptionRef, className: 'reqore-panel-title-description', size: panelSize, effect: __assign({ opacity: 0.7 }, descriptionEffect), intent: descriptionIntent, onClick: handleDescriptionClick }, (descriptionIsInteractive
|
|
846
|
-
? {
|
|
847
|
-
role: 'button',
|
|
848
|
-
tabIndex: 0,
|
|
849
|
-
'aria-expanded': isDescriptionExpanded,
|
|
850
|
-
onKeyDown: function (event) {
|
|
851
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
852
|
-
event.preventDefault();
|
|
853
|
-
handleDescriptionClick(event);
|
|
854
|
-
}
|
|
855
|
-
},
|
|
856
|
-
style: { cursor: 'pointer' },
|
|
857
|
-
}
|
|
858
|
-
: {}));
|
|
859
|
-
var _12 = (0, react_2.useState)(undefined), labelAvailable = _12[0], setLabelAvailable = _12[1];
|
|
860
|
-
var _13 = (0, useFitTextSize_1.useFitTextSize)({
|
|
861
|
-
text: typeof label === 'string' ? label : '',
|
|
862
|
-
available: labelAvailable,
|
|
863
|
-
max: labelNaturalPx,
|
|
864
|
-
min: labelMinTextSize,
|
|
865
|
-
lines: clampLines,
|
|
866
|
-
enabled: fitLabel !== false && typeof label === 'string' && !(labelEffect === null || labelEffect === void 0 ? void 0 : labelEffect.textSize),
|
|
867
|
-
}), labelFitRef = _13[0], labelFitPx = _13[1];
|
|
868
|
-
/** Only while the title is actually below its natural size, and never over a caller who
|
|
869
|
-
* pinned the description's own size. */
|
|
870
|
-
var descriptionFontPx = fitLabel && !(descriptionEffect === null || descriptionEffect === void 0 ? void 0 : descriptionEffect.textSize) && labelFitPx < labelNaturalPx
|
|
871
|
-
? Math.max(useFitTextSize_1.FIT_TEXT_FLOOR_PX, Math.round(((_c = sizes_1.TEXT_FROM_SIZE[panelSize]) !== null && _c !== void 0 ? _c : sizes_1.TEXT_FROM_SIZE.normal) * (labelFitPx / labelNaturalPx)))
|
|
872
|
-
: 0;
|
|
873
|
-
/**
|
|
874
|
-
* How much room the title has, computed rather than measured off its own box.
|
|
875
|
-
*
|
|
876
|
-
* The box the title sits in is sized by its content, so measuring THAT is circular — the
|
|
877
|
-
* font shrinks, the box shrinks, and the size ratchets to the floor. Measuring the space it
|
|
878
|
-
* COULD have is not: take the bar, subtract everything competing with the title, and what
|
|
879
|
-
* is left does not move when the title's font does.
|
|
880
|
-
*
|
|
881
|
-
* Everything competing with it is text-independent: the action groups and control buttons
|
|
882
|
-
* (the bar's other children), and the icon and badge that share the title's row. The action
|
|
883
|
-
* group is `fluid` by default and would otherwise swallow the leftover, which is why this
|
|
884
|
-
* cannot be solved by giving the title column `flex-grow` — it competes with a group that
|
|
885
|
-
* is designed to take the rest, and loses.
|
|
886
|
-
*
|
|
887
|
-
* Re-run on `width`, which is the bar's own measured width: when the bar resizes, so does
|
|
888
|
-
* everything in it.
|
|
889
|
-
*/
|
|
890
|
-
/**
|
|
891
|
-
* The title's available width is its CONTAINING BLOCK minus whatever shares it — measured,
|
|
892
|
-
* not reconstructed.
|
|
893
|
-
*
|
|
894
|
-
* This used to subtract the action group, the gaps and the icon from the bar's width. That
|
|
895
|
-
* arithmetic held only for the one layout it was written against: give the panel a
|
|
896
|
-
* `description` and the icon moves into an outer grid, so the sum over-reported by 30-80px
|
|
897
|
-
* and the fit under-shrank. The symptom was the worst of both worlds — a title both smaller
|
|
898
|
-
* AND ellipsized, which is the one outcome the feature exists to avoid.
|
|
899
|
-
*
|
|
900
|
-
* Measuring the parent is safe precisely where it looks circular. While the text overflows
|
|
901
|
-
* — the only regime in which anything shrinks — the parent is pinned by the row, not by the
|
|
902
|
-
* text: at a 300px bar it measures 128px at 19px, at 16px, and wrapped to two lines. When
|
|
903
|
-
* the text does fit, the parent has slack and the fit returns the natural size, which is
|
|
904
|
-
* the right answer either way.
|
|
905
|
-
*/
|
|
906
|
-
(0, react_2.useLayoutEffect)(function () {
|
|
907
|
-
var node = labelFitRef.current;
|
|
908
|
-
var parent = node === null || node === void 0 ? void 0 : node.parentElement;
|
|
909
|
-
if (!fitLabel || !node || !parent) {
|
|
910
|
-
return;
|
|
911
|
-
}
|
|
912
|
-
var style = getComputedStyle(parent);
|
|
913
|
-
var padding = (parseFloat(style.paddingLeft) || 0) + (parseFloat(style.paddingRight) || 0);
|
|
914
|
-
var gap = parseFloat(style.columnGap) || parseFloat(style.gap) || 0;
|
|
915
|
-
// A badge sits beside the title in the same box and takes real width.
|
|
916
|
-
var siblings = Array.from(parent.children).reduce(function (total, child) {
|
|
917
|
-
return child === node ? total : total + child.getBoundingClientRect().width;
|
|
918
|
-
}, 0);
|
|
919
|
-
var gaps = gap * Math.max(0, parent.children.length - 1);
|
|
920
|
-
var next = Math.max(0, Math.round(parent.clientWidth - padding - siblings - gaps));
|
|
921
|
-
setLabelAvailable(function (current) { return (current === next ? current : next); });
|
|
922
|
-
}, [fitLabel, label, width, badge, actions, panelSize, description, clampLines]);
|
|
923
|
-
var iconTooltip = (0, react_2.useMemo)(function () { return ({
|
|
924
|
-
content: label,
|
|
925
|
-
}); }, [label]);
|
|
926
|
-
var handleRef = (0, react_2.useCallback)(function (ref) {
|
|
927
|
-
var _ref = ref;
|
|
928
|
-
if (ref === null || ref === void 0 ? void 0 : ref.resizable) {
|
|
929
|
-
_ref = ref.resizable;
|
|
930
|
-
}
|
|
931
|
-
targetRef.current = _ref;
|
|
932
|
-
}, []);
|
|
933
|
-
if (skeleton) {
|
|
934
|
-
return (0, jsx_runtime_1.jsx)(exports.ReqorePanelSkeleton, { size: panelSize, isCollapsed: _isCollapsed });
|
|
935
|
-
}
|
|
936
|
-
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ReqoreErrorBoundary, __assign({}, errorBoundaryOptions, { children: (0, jsx_runtime_1.jsxs)(TooltipComponent_1.ReqoreTooltipComponent, __assign({}, (0, lodash_1.omit)(rest, ['onResize']), _resizable, { as: rest.as || (!!resizable && !disabled && !_isCollapsed) ? re_resizable_1.Resizable : 'div', isCollapsed: _isCollapsed, rounded: rounded, flat: flat, intent: intent, accentPosition: accentPosition, "$accentSize": accentSizePx, className: "".concat(className || '', " reqore-panel").concat(_isHovered && (0, lodash_1.size)(floatingActionsList) > 0 ? ' reqore-panel-floating-active' : ''), interactive: interactive, theme: theme, effect: transformedContentEffect, opacity: opacity, fluid: fluid, disabled: disabled, Component: exports.StyledPanel, ref: function (node) {
|
|
937
|
-
handleRef(node);
|
|
938
|
-
panelRef.current = node;
|
|
939
|
-
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [rest.stickyHeader ? ((0, jsx_runtime_1.jsx)("div", { ref: stickySentinelRef, "aria-hidden": 'true', style: { height: 0 } })) : null, _isHovered &&
|
|
940
|
-
(0, lodash_1.size)(floatingActionsList) > 0 &&
|
|
941
|
-
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(exports.StyledFloatingActions, { className: 'reqore-panel-floating-actions', theme: theme, size: panelSize, intent: intent, flat: flat, ref: floatingActionsRef, onMouseLeave: handleFloatingActionsMouseLeave, children: (0, jsx_runtime_1.jsx)(ControlGroup_1.default, { size: panelSize, gapSize: panelSize, children: floatingActionsList.map(function (action, index) { return renderActions(action, index, true); }) }) }), document.body), hasTitleBar && ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTopBar, { flat: flat, isCollapsed: _isCollapsed, collapsible: collapsible, className: 'reqore-panel-title', onClick: handleCollapseClick, theme: theme, minimal: minimal || opacity === 0, size: contentSize || panelSize, opacity: minimal ? 0 : opacity !== null && opacity !== void 0 ? opacity : 1, noHorizontalPadding: noHorizontalPadding, responsive: responsiveTitle, "$descriptionBelow": descriptionBelow, "$descriptionMaxLines": descriptionIsClamped ? descriptionClamp : 0, "$descriptionFontPx": descriptionFontPx, "data-narrow": isNarrow ? 'true' : 'false', ref: measureRef, padded: padded, wrapperPadding: wrapperPadding, intent: intent, rounded: rounded, radiusSize: rest.radiusSize, stickyHeader: rest.stickyHeader, stickyHeaderOffset: rest.stickyHeaderOffset, stickyHeaderInset: stickyInset, isStuck: isHeaderStuck, children: [hasTitleHeader && ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeader, { className: 'reqore-panel-title-header', children: [breadcrumbs ? ((0, jsx_runtime_1.jsx)(Breadcrumbs_1.default, __assign({}, breadcrumbs, { padded: false, margin: 'none', flat: true, responsive: true }))) : icon || iconImage || label || badge ? ((function () {
|
|
942
|
-
var hasPanelIcon = !!icon || !!iconImage || loading;
|
|
943
|
-
// The icon takes the label's place, so there has to BE an icon. Without one
|
|
944
|
-
// the label is the only thing identifying the panel and it stays put — a
|
|
945
|
-
// header with neither is not a compact header, it is an empty one. The label
|
|
946
|
-
// is not lost either way: it is already this icon's tooltip.
|
|
947
|
-
var hideTitleText = hideTitleForIcon && hasPanelIcon;
|
|
948
|
-
// Layout decision:
|
|
949
|
-
// - iconWithLabel=true → render the icon INSIDE the
|
|
950
|
-
// label-and-badge row (no outer icon column). The
|
|
951
|
-
// description sits flush-left under the icon+label.
|
|
952
|
-
// - When there is NO description, fall back to the
|
|
953
|
-
// inline layout regardless of iconVerticalAlign — the
|
|
954
|
-
// outer grid only earns its keep when there is a
|
|
955
|
-
// description row to anchor against, and the inline
|
|
956
|
-
// layout aligns icon-to-text glyphs more naturally
|
|
957
|
-
// via the heading's own line-height.
|
|
958
|
-
// - Otherwise → outer two-column grid where the icon
|
|
959
|
-
// sits in a reserved column. iconVerticalAlign places
|
|
960
|
-
// the icon in row 1 (label), row 2 (description), or
|
|
961
|
-
// spans both rows (center). The description always
|
|
962
|
-
// indents past the icon column.
|
|
963
|
-
var inlineWithLabel = hasPanelIcon && (iconWithLabel || !description || hideTitleText);
|
|
964
|
-
var useOuterGrid = hasPanelIcon && !inlineWithLabel;
|
|
965
|
-
// Outer grid → grid column-gap handles icon→label
|
|
966
|
-
// spacing, so the icon itself takes no margin.
|
|
967
|
-
// Inline → keep 'margin=right' so ReqoreIcon adds its
|
|
968
|
-
// standard side-spacer between icon and label.
|
|
969
|
-
var iconMargin = useOuterGrid ? undefined : 'right';
|
|
970
|
-
var panelIcon = hasPanelIcon ? ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ size: "".concat(sizes_1.ICON_FROM_HEADER_SIZE[labelSize || sizes_1.HEADER_SIZE_TO_NUMBER[panelSize]], "px"), image: loading ? undefined : iconImage, margin: iconMargin, color: iconColor, tooltip: iconTooltip, effect: {
|
|
971
|
-
opacity: colors_1.CONTROL_ICON_OPACITY,
|
|
972
|
-
} }, iconProps, { animation: loading ? 'spin' : iconProps === null || iconProps === void 0 ? void 0 : iconProps.animation, icon: loading ? "Loader".concat(loadingIconType || '', "Line") : icon || (iconProps === null || iconProps === void 0 ? void 0 : iconProps.icon), className: "reqore-panel-title-icon ".concat((iconProps === null || iconProps === void 0 ? void 0 : iconProps.className) || '').trim() }))) : null;
|
|
973
|
-
var labelRow = ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndBadge, { className: 'reqore-panel-title-label-row', children: [inlineWithLabel && panelIcon, hideTitleText ? null : typeof label === 'string' ? (
|
|
974
|
-
// The measured box is this wrapper, not the heading: as a
|
|
975
|
-
// `min-width: 0` flex child it reports the width the row actually
|
|
976
|
-
// left for the title, where the heading would report what the text
|
|
977
|
-
// wants. `overflow: hidden` is what makes it shrinkable at all.
|
|
978
|
-
// `display: flex` keeps the wrapper from opening a line box around
|
|
979
|
-
// the inline-flex heading: a block wrapper adds the row's leading on
|
|
980
|
-
// top of the heading's own box, which made a `tiny` panel 3px taller
|
|
981
|
-
// than it was before this wrapper existed.
|
|
982
|
-
(0, jsx_runtime_1.jsx)(StyledPanelTitleLabelBox, { ref: labelFitRef, className: 'reqore-panel-title-label-box', "$clampLines": clampLines, children: (0, jsx_runtime_1.jsx)(LabelEditor_1.LabelEditor, { size: labelSize || panelSize, customTheme: theme, effect: __assign({
|
|
983
|
-
// `noWrap` pins the heading to one line; a clamped title is
|
|
984
|
-
// allowed to wrap, and the clamp brings its own ellipsis.
|
|
985
|
-
noWrap: clampLines === 1 }, labelEffect), style: __assign(__assign(__assign({}, (clampLines > 1
|
|
986
|
-
? {}
|
|
987
|
-
: { display: 'inline-flex', alignItems: 'center' })), { minWidth: 0,
|
|
988
|
-
// Capped to the measured wrapper so the heading's own
|
|
989
|
-
// `text-overflow: ellipsis` (from `noWrap`) has a box to overflow.
|
|
990
|
-
// An `inline-flex` heading otherwise sizes to its text, and the
|
|
991
|
-
// wrapper clips it mid-word with no ellipsis at all.
|
|
992
|
-
maxWidth: '100%' }), (fitLabel !== false && !(labelEffect === null || labelEffect === void 0 ? void 0 : labelEffect.textSize)
|
|
993
|
-
? { fontSize: "".concat(labelFitPx, "px") }
|
|
994
|
-
: {})), label: label, onSubmit: onLabelEdit, tooltip: showLabelTooltip ? customLabelTooltip || label : undefined }) })) : (label), badge || badge === 0 ? ((0, jsx_runtime_1.jsx)(Button_1.ButtonBadge, { size: (0, utils_1.getOneHigherSize)(panelSize), content: badge, wrapGroup: isSmall, margin: label ? 'left' : 'none' })) : null] }));
|
|
995
|
-
// Description size is driven by the panel size only —
|
|
996
|
-
// explicitly NOT by `labelSize`. `NUMBER_TO_SIZE` maps
|
|
997
|
-
// 1..6 → micro..huge, which means bumping `labelSize`
|
|
998
|
-
// from 4 to 2 to grow the heading would inversely
|
|
999
|
-
// shrink the description to `tiny`. That's the wrong
|
|
1000
|
-
// pairing: a bigger label should not make supporting
|
|
1001
|
-
// text smaller. Consumers that want to size the
|
|
1002
|
-
// description explicitly pass `descriptionEffect.textSize`.
|
|
1003
|
-
var descriptionRow = description && !hideTitleText && !descriptionBelow ? ((0, jsx_runtime_1.jsx)(Span_1.ReqoreSpan, __assign({}, descriptionProps, { children: description }))) : null;
|
|
1004
|
-
return ((0, jsx_runtime_1.jsx)(exports.StyledPanelTitleHeaderContent, __assign({ size: panelSize }, labelProps, { hasLabel: !!label && !hideTitleText, hasIcon: useOuterGrid, iconSize: sizes_1.ICON_FROM_HEADER_SIZE[labelSize || sizes_1.HEADER_SIZE_TO_NUMBER[panelSize]], "$hasOuterIcon": useOuterGrid, "$iconVerticalAlign": iconVerticalAlign, "$hasDescription": !!description && !hideTitleText, children: useOuterGrid ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [panelIcon, labelRow, descriptionRow] })) : ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndDescription, { children: [labelRow, descriptionRow] })) })));
|
|
1005
|
-
})()) : null, breadcrumbs && (badge || badge === 0) ? ((0, jsx_runtime_1.jsx)(Button_1.ButtonBadge, { size: (0, utils_1.getOneHigherSize)(panelSize), content: badge, wrapGroup: isSmall, margin: label ? 'left' : 'none' })) : null, (0, jsx_runtime_1.jsx)(NonResponsiveActions_1.ReqorePanelNonResponsiveActions
|
|
1006
|
-
// The narrow bar keeps its controls in the trailing group, so this row —
|
|
1007
|
-
// which existed only for the stacked layout — never shows.
|
|
1008
|
-
, {
|
|
1009
|
-
// The narrow bar keeps its controls in the trailing group, so this row —
|
|
1010
|
-
// which existed only for the stacked layout — never shows.
|
|
1011
|
-
show: false, isSmall: false, showControlButtons: true, size: panelSize, hasResponsiveActions: hasResponsiveActions(nonFloatingActions), customTheme: theme, isCollapsed: _isCollapsed, onCollapseClick: collapsible ? handleCollapseClick : undefined, onCloseClick: onClose, closeButtonProps: closeButtonProps, collapseButtonProps: collapseButtonProps, collapseTooltip: collapseTooltip, expandTooltip: expandTooltip, closeTooltip: closeTooltip, fluid: false, style: { marginLeft: 'auto' } })] })), hasResponsiveActions(nonFloatingActions) && ((0, jsx_runtime_1.jsx)(ControlGroup_1.default, __assign({ responsive: responsiveActions,
|
|
1012
|
-
// Not fluid by default. `fluid` emits `width: 100%`, so the group's flex basis
|
|
1013
|
-
// becomes the whole bar and the title — the only shrinkable thing on the other
|
|
1014
|
-
// side — collapses to nothing: measured at 0px of title on a 400px panel, and
|
|
1015
|
-
// 142px of a 518px bar where the buttons needed 90.
|
|
1016
|
-
//
|
|
1017
|
-
// A caller whose actions include something with no useful width of its own —
|
|
1018
|
-
// Collection puts a search input in here — opts back in through
|
|
1019
|
-
// `responsiveActionsWrapperProps`, because `fluid` is also what ControlGroup
|
|
1020
|
-
// propagates to its children, and that input has nothing to fill without it.
|
|
1021
|
-
fluid: false, horizontalAlign: 'flex-end', customTheme: theme, size: panelSize }, responsiveActionsWrapperProps, {
|
|
1022
|
-
// The cap is the whole fix. Half the bar guarantees the title the other half,
|
|
1023
|
-
// and the moment the buttons need more than their share the group overflows —
|
|
1024
|
-
// which is what `responsive` collapse watches (`scrollWidth > clientWidth`), so
|
|
1025
|
-
// the fold into the `…` menu still fires. Floored at 40px because shrinking to
|
|
1026
|
-
// nothing clips the buttons rather than folding them, and ControlGroup ignores
|
|
1027
|
-
// its own overflow below that width, which would strand them clipped.
|
|
1028
|
-
style: __assign({
|
|
1029
|
-
// Pushed to the trailing edge. A `fluid` group used to span the bar and its
|
|
1030
|
-
// own `horizontalAlign` put the buttons on the right; a content-sized one is
|
|
1031
|
-
// only as wide as its buttons, so with no title header beside it — Tree has
|
|
1032
|
-
// no label — it would sit at the LEFT of an otherwise empty bar. `auto`
|
|
1033
|
-
// margin restores the edge without giving the group any width back.
|
|
1034
|
-
marginLeft: 'auto',
|
|
1035
|
-
// Content basis that may still shrink. `fluid={false}` alone compiles to
|
|
1036
|
-
// `flex: 0 0 auto`, which pins the group at its content width so it can never
|
|
1037
|
-
// overflow — and `responsive` collapse watches `scrollWidth > clientWidth`,
|
|
1038
|
-
// so the fold into the `…` menu would simply stop happening.
|
|
1039
|
-
flex: '0 1 auto',
|
|
1040
|
-
// Floored, because shrinking to nothing clips the buttons instead of folding
|
|
1041
|
-
// them, and ControlGroup ignores its own overflow below 40px.
|
|
1042
|
-
minWidth: 40,
|
|
1043
|
-
// Capped, so a group that IS opted back into growing cannot take the row —
|
|
1044
|
-
// but only while there is a title header to take it FROM. With no label,
|
|
1045
|
-
// badge, icon or breadcrumbs the bar is the group's alone, and holding a
|
|
1046
|
-
// Collection's search input to half of an empty bar guards nothing.
|
|
1047
|
-
maxWidth: hasTitleHeader ? '50%' : undefined }, responsiveActionsWrapperProps === null || responsiveActionsWrapperProps === void 0 ? void 0 : responsiveActionsWrapperProps.style), children: nonFloatingActions.map(renderResponsiveActions()) }))), (0, jsx_runtime_1.jsx)(NonResponsiveActions_1.ReqorePanelNonResponsiveActions, { show: showNonResponsiveGroup(), isSmall: false, showControlButtons: true, size: panelSize, hasResponsiveActions: hasResponsiveActions(nonFloatingActions), customTheme: theme, isCollapsed: _isCollapsed, onCollapseClick: collapsible ? handleCollapseClick : undefined, onCloseClick: onClose, closeButtonProps: closeButtonProps, collapseButtonProps: collapseButtonProps, collapseTooltip: collapseTooltip, expandTooltip: expandTooltip, closeTooltip: closeTooltip, fluid: !hasTitleHeader, children: nonFloatingActions.map(renderNonResponsiveActions()) }), descriptionBelow ? (
|
|
1048
|
-
// `flex-basis: 100%` is what puts it on its own line — the bar is a wrapping
|
|
1049
|
-
// flex row, so a full-width item cannot share one with anything before it.
|
|
1050
|
-
// `min-width: 0` so a long sentence wraps inside the bar instead of widening it.
|
|
1051
|
-
(0, jsx_runtime_1.jsx)("div", { className: 'reqore-panel-title-description-row', style: { flex: '0 0 100%', minWidth: 0 }, children: (0, jsx_runtime_1.jsx)(Span_1.ReqoreSpan, __assign({}, descriptionProps, { children: description })) })) : null] })), !_isCollapsed || (_isCollapsed && !unMountContentOnCollapse) ? ((0, jsx_runtime_1.jsx)(exports.StyledPanelContent, { as: 'div', className: 'reqore-panel-content', hasLabel: !!hasTitleBar, hasBottomActions: hasBottomActions, isCollapsed: _isCollapsed, style: contentStyle, padded: padded, minimal: minimal || opacity === 0, size: contentSize || panelSize, ref: getContentRef, noHorizontalPadding: noHorizontalPadding, children: children })) : null, hasBottomActions && !_isCollapsed ? ((0, jsx_runtime_1.jsxs)(exports.StyledPanelBottomActions, { flat: flat, className: 'reqore-panel-bottom-actions', theme: theme, padded: padded, intent: intent, minimal: minimal || opacity === 0, opacity: minimal ? 0 : opacity !== null && opacity !== void 0 ? opacity : 1, size: contentSize || panelSize, noHorizontalPadding: noHorizontalPadding, children: [hasNonResponsiveActions(leftBottomActions) ? ((0, jsx_runtime_1.jsx)(ControlGroup_1.default, { size: panelSize, style: { marginRight: 'auto' }, children: leftBottomActions.map(renderNonResponsiveActions('flex-start')) })) : null, hasResponsiveActions(leftBottomActions) && ((0, jsx_runtime_1.jsx)(ControlGroup_1.default, { fluid: responsiveActions, responsive: responsiveActions, customTheme: theme, size: panelSize, style: { marginRight: 'auto' }, children: leftBottomActions.map(renderResponsiveActions('flex-start')) })), hasResponsiveActions(rightBottomActions) && ((0, jsx_runtime_1.jsx)(ControlGroup_1.default, { fluid: responsiveActions, horizontalAlign: 'flex-end', responsive: responsiveActions, customTheme: theme, style: { marginLeft: 'auto' }, size: panelSize, children: rightBottomActions.map(renderResponsiveActions()) })), hasNonResponsiveActions(rightBottomActions) ? ((0, jsx_runtime_1.jsx)(ControlGroup_1.default, { horizontalAlign: 'flex-end', size: panelSize, style: { marginLeft: 'auto' }, children: rightBottomActions.map(renderNonResponsiveActions()) })) : null] })) : null] })) })));
|
|
1052
|
-
});
|
|
1053
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30;
|
|
1054
|
-
//# sourceMappingURL=index.cjs.map
|