@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,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
4
|
return cooked;
|
|
@@ -13,6 +14,39 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
14
|
};
|
|
14
15
|
return __assign.apply(this, arguments);
|
|
15
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
|
+
})();
|
|
16
50
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
51
|
var t = {};
|
|
18
52
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -24,41 +58,47 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
58
|
}
|
|
25
59
|
return t;
|
|
26
60
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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 responsive_1 = require("./responsive");
|
|
76
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
77
|
+
var colors_1 = require("../../constants/colors");
|
|
78
|
+
var sizes_1 = require("../../constants/sizes");
|
|
79
|
+
var colors_2 = require("../../helpers/colors");
|
|
80
|
+
var styled_1 = require("../../helpers/styled");
|
|
81
|
+
var utils_1 = require("../../helpers/utils");
|
|
82
|
+
var useCombinedRefs_1 = require("../../hooks/useCombinedRefs");
|
|
83
|
+
var useReqoreContext_1 = require("../../hooks/useReqoreContext");
|
|
84
|
+
var useFitTextSize_1 = require("../../hooks/useFitTextSize");
|
|
85
|
+
var useTheme_1 = require("../../hooks/useTheme");
|
|
86
|
+
var styles_1 = require("../../styles");
|
|
87
|
+
var Breadcrumbs_1 = __importDefault(require("../Breadcrumbs"));
|
|
88
|
+
var Button_1 = __importStar(require("../Button"));
|
|
89
|
+
var item_1 = require("../Collection/item");
|
|
90
|
+
var ControlGroup_1 = __importDefault(require("../ControlGroup"));
|
|
91
|
+
var Dropdown_1 = __importDefault(require("../Dropdown"));
|
|
92
|
+
var Effect_1 = require("../Effect");
|
|
93
|
+
var ErrorBoundary_1 = require("../ErrorBoundary");
|
|
94
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
95
|
+
var Skeleton_1 = require("../Skeleton");
|
|
96
|
+
var Span_1 = require("../Span");
|
|
97
|
+
var TooltipComponent_1 = require("../TooltipComponent");
|
|
98
|
+
var LabelEditor_1 = require("./LabelEditor");
|
|
99
|
+
var NonResponsiveActions_1 = require("./NonResponsiveActions");
|
|
60
100
|
var getPaddingSize = function (padded, size) {
|
|
61
|
-
return typeof padded === 'string' ? SPECIAL_PADDING_FROM_SIZE[padded] : PADDING_FROM_SIZE[size];
|
|
101
|
+
return typeof padded === 'string' ? sizes_1.SPECIAL_PADDING_FROM_SIZE[padded] : sizes_1.PADDING_FROM_SIZE[size];
|
|
62
102
|
};
|
|
63
103
|
/** Nearest scrollable ancestor of `node` (the element a `position: sticky`
|
|
64
104
|
* header actually pins to), or `null` for the viewport. Used to scope the
|
|
@@ -105,20 +145,20 @@ var getScrollportInset = function (el) {
|
|
|
105
145
|
* opening a line box around the inline-flex heading — a block wrapper adds the row's leading on
|
|
106
146
|
* top of the heading's own box, which made a `tiny` panel 3px taller than it used to be.
|
|
107
147
|
*/
|
|
108
|
-
var StyledPanelTitleLabelBox =
|
|
148
|
+
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) {
|
|
109
149
|
var $clampLines = _a.$clampLines;
|
|
110
|
-
return $clampLines > 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
|
+
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);
|
|
111
151
|
});
|
|
112
|
-
|
|
113
|
-
|
|
152
|
+
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"])));
|
|
153
|
+
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) {
|
|
114
154
|
var $hasOuterIcon = _a.$hasOuterIcon;
|
|
115
155
|
return ($hasOuterIcon ? 'grid' : 'flex');
|
|
116
156
|
}, function (_a) {
|
|
117
157
|
var $hasOuterIcon = _a.$hasOuterIcon, size = _a.size, _b = _a.$iconVerticalAlign, $iconVerticalAlign = _b === void 0 ? 'center' : _b, $hasDescription = _a.$hasDescription;
|
|
118
158
|
return $hasOuterIcon
|
|
119
|
-
? 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', PADDING_FROM_SIZE[size || 'normal'], $iconVerticalAlign === 'top'
|
|
120
|
-
? css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n
|
|
121
|
-
? css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n
|
|
159
|
+
? (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'
|
|
160
|
+
? (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n grid-row: 1;\n "], ["\n grid-row: 1;\n "]))) : $iconVerticalAlign === 'bottom' && $hasDescription
|
|
161
|
+
? (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 "])));
|
|
122
162
|
}, function (_a) {
|
|
123
163
|
var iconSize = _a.iconSize, hasIcon = _a.hasIcon;
|
|
124
164
|
var width = 0;
|
|
@@ -127,8 +167,8 @@ export var StyledPanelTitleHeaderContent = styled.div(templateObject_9 || (templ
|
|
|
127
167
|
}
|
|
128
168
|
return width;
|
|
129
169
|
});
|
|
130
|
-
|
|
131
|
-
|
|
170
|
+
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"])));
|
|
171
|
+
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"])));
|
|
132
172
|
/**
|
|
133
173
|
* Does the panel wrapper draw its 1px border?
|
|
134
174
|
*
|
|
@@ -149,32 +189,32 @@ var hasPanelBorder = function (_a) {
|
|
|
149
189
|
* the intent belongs to the strip, so the border falls back to the neutral surface colour. */
|
|
150
190
|
var getPanelBorderBaseColor = function (theme, _a) {
|
|
151
191
|
var intent = _a.intent, accentPosition = _a.accentPosition;
|
|
152
|
-
return (intent && !accentPosition ? theme.intents[intent] : getMainBackgroundColor(theme));
|
|
192
|
+
return (intent && !accentPosition ? theme.intents[intent] : (0, colors_2.getMainBackgroundColor)(theme));
|
|
153
193
|
};
|
|
154
|
-
|
|
194
|
+
exports.StyledPanel = (0, styled_components_1.default)(Effect_1.StyledEffect).withConfig({
|
|
155
195
|
// `fill` controls panel layout and must not become a boolean DOM attribute. Neither must
|
|
156
196
|
// `accentPosition`: when the panel renders as a `Resizable` (a COMPONENT target) the rule
|
|
157
197
|
// below forwards everything, and re-resizable spreads the leftovers onto its wrapper div.
|
|
158
198
|
// Filtering here still leaves the styled-component's own interpolations reading the prop.
|
|
159
199
|
// Everything else follows styled-components' own rule, so re-resizable still receives its
|
|
160
200
|
// `enable` / size / handle config — those are component props, not HTML attributes.
|
|
161
|
-
shouldForwardProp: omitStyleProps('fill', 'accentPosition'),
|
|
201
|
+
shouldForwardProp: (0, styled_1.omitStyleProps)('fill', 'accentPosition'),
|
|
162
202
|
})(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) {
|
|
163
203
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
164
|
-
return rgba(changeDarkness(getMainBackgroundColor(theme), 0.03), opacity);
|
|
204
|
+
return (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
165
205
|
}, function (_a) {
|
|
166
206
|
var rounded = _a.rounded, radiusSize = _a.radiusSize;
|
|
167
|
-
return rounded ? resolveRadius('normal', radiusSize) : 0;
|
|
207
|
+
return rounded ? (0, sizes_1.resolveRadius)('normal', radiusSize) : 0;
|
|
168
208
|
}, function (_a) {
|
|
169
209
|
var theme = _a.theme, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
|
|
170
210
|
return hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition })
|
|
171
|
-
? "1px solid ".concat(changeLightness(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.08))
|
|
211
|
+
? "1px solid ".concat((0, colors_2.changeLightness)(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.08))
|
|
172
212
|
: undefined;
|
|
173
213
|
}, function (_a) {
|
|
174
214
|
var theme = _a.theme;
|
|
175
|
-
return getReadableColor(theme, undefined, undefined, true);
|
|
215
|
+
return (0, colors_2.getReadableColor)(theme, undefined, undefined, true);
|
|
176
216
|
}, function (_a) {
|
|
177
|
-
var accentPosition = _a.accentPosition, _b = _a.$accentSize, $accentSize = _b === void 0 ? 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
|
+
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;
|
|
178
218
|
if (!accentPosition) {
|
|
179
219
|
return undefined;
|
|
180
220
|
}
|
|
@@ -191,16 +231,14 @@ export var StyledPanel = styled(StyledEffect).withConfig({
|
|
|
191
231
|
// The strip sits in the padding box, inside any border, so inset by the border width to
|
|
192
232
|
// land on the wrapper's INNER curve — the same adjustment StyledPanelTopBar makes.
|
|
193
233
|
var stripRadius = stickyHeader && rounded
|
|
194
|
-
? Math.max(0, resolveRadius('normal', radiusSize) -
|
|
234
|
+
? Math.max(0, (0, sizes_1.resolveRadius)('normal', radiusSize) -
|
|
195
235
|
(hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) ? 1 : 0))
|
|
196
236
|
: 0;
|
|
197
|
-
return 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'
|
|
198
|
-
? css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n
|
|
237
|
+
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'
|
|
238
|
+
? (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
|
|
199
239
|
? accentPosition === 'left'
|
|
200
|
-
? css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n
|
|
201
|
-
: undefined, intent
|
|
202
|
-
? theme.intents[intent]
|
|
203
|
-
: changeLightness(getMainBackgroundColor(theme), 0.22));
|
|
240
|
+
? (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)
|
|
241
|
+
: undefined, intent ? theme.intents[intent] : (0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.22));
|
|
204
242
|
}, function (_a) {
|
|
205
243
|
var stickyHeader = _a.stickyHeader;
|
|
206
244
|
return (stickyHeader ? 'visible' : 'hidden');
|
|
@@ -216,53 +254,53 @@ export var StyledPanel = styled(StyledEffect).withConfig({
|
|
|
216
254
|
}, function (_a) {
|
|
217
255
|
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;
|
|
218
256
|
return interactive
|
|
219
|
-
? 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 "])), StyledPanelTitle, StyledPanelTitleHeaderContent, ACTIVE_ICON_SCALE, opacity === 0 && flat
|
|
257
|
+
? (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
|
|
220
258
|
? undefined
|
|
221
|
-
: rgba(darken(0.025, rgba(changeDarkness(getMainBackgroundColor(theme), 0.03), opacity)), opacity), hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition })
|
|
222
|
-
? changeLightness(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.25)
|
|
223
|
-
: undefined, opacity !== 0 && css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n
|
|
259
|
+
: (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 })
|
|
260
|
+
? (0, colors_2.changeLightness)(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.25)
|
|
261
|
+
: 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;
|
|
224
262
|
}, function (_a) {
|
|
225
263
|
var raised = _a.raised, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
|
|
226
|
-
return raised && !hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) && RaisedElement;
|
|
264
|
+
return raised && !hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) && styles_1.RaisedElement;
|
|
227
265
|
}, function (_a) {
|
|
228
266
|
var fill = _a.fill, isCollapsed = _a.isCollapsed;
|
|
229
267
|
return !isCollapsed && fill
|
|
230
|
-
? css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n height: 100%;\n flex: 1;\n "], ["\n height: 100%;\n flex: 1;\n "]))) : undefined;
|
|
268
|
+
? (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;
|
|
231
269
|
}, function (_a) {
|
|
232
270
|
var disabled = _a.disabled;
|
|
233
|
-
return disabled && DisabledElement;
|
|
271
|
+
return disabled && styles_1.DisabledElement;
|
|
234
272
|
});
|
|
235
|
-
|
|
273
|
+
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) {
|
|
236
274
|
var $descriptionBelow = _a.$descriptionBelow;
|
|
237
275
|
return ($descriptionBelow ? 'row wrap' : 'row');
|
|
238
276
|
}, function (_a) {
|
|
239
277
|
var $descriptionFontPx = _a.$descriptionFontPx;
|
|
240
|
-
return !!$descriptionFontPx && 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);
|
|
278
|
+
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);
|
|
241
279
|
}, function (_a) {
|
|
242
280
|
var $descriptionBelow = _a.$descriptionBelow;
|
|
243
|
-
return $descriptionBelow && 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 "])));
|
|
281
|
+
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 "])));
|
|
244
282
|
}, function (_a) {
|
|
245
283
|
var $descriptionMaxLines = _a.$descriptionMaxLines;
|
|
246
|
-
return !!$descriptionMaxLines && 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);
|
|
284
|
+
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);
|
|
247
285
|
}, function (_a) {
|
|
248
286
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
249
|
-
return rgba(changeLightness(getMainBackgroundColor(theme), 0.03), opacity);
|
|
287
|
+
return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
250
288
|
}, function (_a) {
|
|
251
289
|
var noHorizontalPadding = _a.noHorizontalPadding, size = _a.size, padded = _a.padded, opacity = _a.opacity, flat = _a.flat, intent = _a.intent;
|
|
252
290
|
return "".concat(opacity === 0 && flat && !intent ? 0 : getPaddingSize(padded, size), "px ").concat(noHorizontalPadding ? 0 : "".concat(getPaddingSize(padded, size), "px"));
|
|
253
291
|
}, function (_a) {
|
|
254
292
|
var theme = _a.theme, isCollapsed = _a.isCollapsed, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
255
293
|
return !isCollapsed && !flat && opacity
|
|
256
|
-
? "1px solid ".concat(rgba(changeLightness(getMainBackgroundColor(theme), 0.08), opacity))
|
|
294
|
+
? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08), opacity))
|
|
257
295
|
: null;
|
|
258
|
-
}, GAP_FROM_SIZE.normal, StyledPanelTitleHeaderContent, INACTIVE_ICON_SCALE, function (_a) {
|
|
296
|
+
}, sizes_1.GAP_FROM_SIZE.normal, exports.StyledPanelTitleHeaderContent, styles_1.INACTIVE_ICON_SCALE, function (_a) {
|
|
259
297
|
var collapsible = _a.collapsible;
|
|
260
|
-
return collapsible && 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 "])), StyledPanelTitleHeaderContent, ACTIVE_ICON_SCALE, function (_a) {
|
|
298
|
+
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) {
|
|
261
299
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
262
|
-
return rgba(changeLightness(getMainBackgroundColor(theme), 0.05), opacity);
|
|
300
|
+
return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.05), opacity);
|
|
263
301
|
});
|
|
264
302
|
});
|
|
265
|
-
|
|
303
|
+
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) {
|
|
266
304
|
var padded = _a.padded, size = _a.size, isCollapsed = _a.isCollapsed, minimal = _a.minimal;
|
|
267
305
|
return !padded || isCollapsed || !minimal
|
|
268
306
|
? "".concat(getPaddingSize(padded, size), "px")
|
|
@@ -290,7 +328,7 @@ export var StyledPanelTopBar = styled(StyledPanelTitle)(templateObject_27 || (te
|
|
|
290
328
|
return stickyHeader && rounded
|
|
291
329
|
? isStuck
|
|
292
330
|
? '0px'
|
|
293
|
-
: "".concat(Math.max(0, resolveRadius('normal', radiusSize) -
|
|
331
|
+
: "".concat(Math.max(0, (0, sizes_1.resolveRadius)('normal', radiusSize) -
|
|
294
332
|
(hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) ? 1 : 0)), "px")
|
|
295
333
|
: undefined;
|
|
296
334
|
}, function (_a) {
|
|
@@ -298,18 +336,18 @@ export var StyledPanelTopBar = styled(StyledPanelTitle)(templateObject_27 || (te
|
|
|
298
336
|
return stickyHeader && rounded
|
|
299
337
|
? isStuck
|
|
300
338
|
? '0px'
|
|
301
|
-
: "".concat(Math.max(0, resolveRadius('normal', radiusSize) -
|
|
339
|
+
: "".concat(Math.max(0, (0, sizes_1.resolveRadius)('normal', radiusSize) -
|
|
302
340
|
(hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) ? 1 : 0)), "px")
|
|
303
341
|
: undefined;
|
|
304
342
|
}, function (_a) {
|
|
305
343
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
306
|
-
return rgba(changeLightness(getMainBackgroundColor(theme), 0.03), opacity);
|
|
344
|
+
return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
307
345
|
}, function (_a) {
|
|
308
346
|
var stickyHeader = _a.stickyHeader, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
309
347
|
return stickyHeader &&
|
|
310
|
-
opacity === 0 && 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 "])));
|
|
348
|
+
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 "])));
|
|
311
349
|
});
|
|
312
|
-
|
|
350
|
+
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) {
|
|
313
351
|
var padded = _a.padded, size = _a.size, minimal = _a.minimal;
|
|
314
352
|
return !padded || !minimal
|
|
315
353
|
? "".concat(getPaddingSize(padded, size), "px")
|
|
@@ -326,10 +364,10 @@ export var StyledPanelBottomActions = styled(StyledPanelTitle)(templateObject_28
|
|
|
326
364
|
}, function (_a) {
|
|
327
365
|
var theme = _a.theme, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
328
366
|
return !flat
|
|
329
|
-
? "1px solid ".concat(rgba(changeLightness(getMainBackgroundColor(theme), 0.08), opacity))
|
|
367
|
+
? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08), opacity))
|
|
330
368
|
: null;
|
|
331
369
|
});
|
|
332
|
-
|
|
370
|
+
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) {
|
|
333
371
|
var isCollapsed = _a.isCollapsed;
|
|
334
372
|
return (isCollapsed ? 'none !important' : undefined);
|
|
335
373
|
}, function (_a) {
|
|
@@ -341,64 +379,64 @@ export var StyledPanelContent = styled.div(templateObject_29 || (templateObject_
|
|
|
341
379
|
: "".concat(getPaddingSize(padded, size), "px ").concat(getPaddingSize(padded, size), "px");
|
|
342
380
|
}, function (_a) {
|
|
343
381
|
var size = _a.size;
|
|
344
|
-
return TEXT_FROM_SIZE[size];
|
|
382
|
+
return sizes_1.TEXT_FROM_SIZE[size];
|
|
345
383
|
});
|
|
346
|
-
|
|
384
|
+
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) {
|
|
347
385
|
var size = _a.size;
|
|
348
|
-
return PADDING_FROM_SIZE[size];
|
|
386
|
+
return sizes_1.PADDING_FROM_SIZE[size];
|
|
349
387
|
}, function (_a) {
|
|
350
388
|
var theme = _a.theme;
|
|
351
|
-
return rgba(changeDarkness(getMainBackgroundColor(theme), 0.03), 1);
|
|
389
|
+
return (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), 1);
|
|
352
390
|
}, function (_a) {
|
|
353
391
|
var theme = _a.theme, flat = _a.flat, intent = _a.intent;
|
|
354
392
|
return flat && !intent
|
|
355
393
|
? undefined
|
|
356
|
-
: "1px solid ".concat(changeLightness(intent ? theme.intents[intent] : getMainBackgroundColor(theme), 0.08));
|
|
394
|
+
: "1px solid ".concat((0, colors_2.changeLightness)(intent ? theme.intents[intent] : (0, colors_2.getMainBackgroundColor)(theme), 0.08));
|
|
357
395
|
}, function (_a) {
|
|
358
396
|
var radiusSize = _a.radiusSize, size = _a.size;
|
|
359
|
-
return resolveRadius(size, radiusSize);
|
|
397
|
+
return (0, sizes_1.resolveRadius)(size, radiusSize);
|
|
360
398
|
}, function (_a) {
|
|
361
399
|
var radiusSize = _a.radiusSize, size = _a.size;
|
|
362
|
-
return resolveRadius(size, radiusSize);
|
|
400
|
+
return (0, sizes_1.resolveRadius)(size, radiusSize);
|
|
363
401
|
}, function (_a) {
|
|
364
402
|
var size = _a.size;
|
|
365
|
-
return GAP_FROM_SIZE[size];
|
|
403
|
+
return sizes_1.GAP_FROM_SIZE[size];
|
|
366
404
|
});
|
|
367
|
-
|
|
405
|
+
exports.ReqorePanelSkeleton = (0, react_2.memo)(function (_a) {
|
|
368
406
|
var size = _a.size, isCollapsed = _a.isCollapsed, children = _a.children;
|
|
369
|
-
var style = useMemo(function () { return ({ padding: "".concat(PADDING_FROM_SIZE[size], "px") }); }, [size]);
|
|
370
|
-
return (
|
|
371
|
-
(children ? (children) : (
|
|
407
|
+
var style = (0, react_2.useMemo)(function () { return ({ padding: "".concat(sizes_1.PADDING_FROM_SIZE[size], "px") }); }, [size]);
|
|
408
|
+
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 &&
|
|
409
|
+
(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' }) })))] }));
|
|
372
410
|
});
|
|
373
|
-
|
|
411
|
+
exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
374
412
|
var _b, _c;
|
|
375
413
|
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"]);
|
|
376
414
|
// Resolved ONCE, here — the accent styles interpolate px and reserve padding,
|
|
377
415
|
// so they must only ever see a number. Shared with ReqoreCallout.
|
|
378
|
-
var accentSizePx = useMemo(function () { return resolveAccentSize(accentSize); }, [accentSize]);
|
|
379
|
-
var _5 = useState(isCollapsed || false), _isCollapsed = _5[0], setIsCollapsed = _5[1];
|
|
380
|
-
var primaryContentGradient = getPrimaryGradient(contentEffect === null || contentEffect === void 0 ? void 0 : contentEffect.gradient);
|
|
416
|
+
var accentSizePx = (0, react_2.useMemo)(function () { return (0, utils_1.resolveAccentSize)(accentSize); }, [accentSize]);
|
|
417
|
+
var _5 = (0, react_2.useState)(isCollapsed || false), _isCollapsed = _5[0], setIsCollapsed = _5[1];
|
|
418
|
+
var primaryContentGradient = (0, Effect_1.getPrimaryGradient)(contentEffect === null || contentEffect === void 0 ? void 0 : contentEffect.gradient);
|
|
381
419
|
var primaryContentColors = primaryContentGradient && typeof primaryContentGradient.colors === 'object'
|
|
382
420
|
? primaryContentGradient.colors
|
|
383
421
|
: undefined;
|
|
384
422
|
var firstContentGradientColor = primaryContentColors
|
|
385
423
|
? Object.values(primaryContentColors)[0]
|
|
386
424
|
: undefined;
|
|
387
|
-
var theme = useReqoreTheme('main', customTheme ||
|
|
425
|
+
var theme = (0, useTheme_1.useReqoreTheme)('main', customTheme ||
|
|
388
426
|
(firstContentGradientColor && minimal ? { main: firstContentGradientColor } : undefined), undefined, undefined, inheritCustomTheme);
|
|
389
|
-
useEffect(function () {
|
|
427
|
+
(0, react_2.useEffect)(function () {
|
|
390
428
|
return function () {
|
|
391
429
|
if (hoverTimerRef.current)
|
|
392
430
|
clearTimeout(hoverTimerRef.current);
|
|
393
431
|
};
|
|
394
432
|
}, []);
|
|
395
|
-
var isMobile = useReqoreProperty('isMobile');
|
|
396
|
-
var targetRef = useCombinedRefs(ref).targetRef;
|
|
397
|
-
var _6 = useMeasure(), measureRef = _6[0], width = _6[1].width;
|
|
398
|
-
var _7 = useState(false), _isHovered = _7[0], setIsHovered = _7[1];
|
|
399
|
-
var floatingActionsRef = useRef(null);
|
|
400
|
-
var panelRef = useRef(null);
|
|
401
|
-
var hoverTimerRef = useRef(null);
|
|
433
|
+
var isMobile = (0, useReqoreContext_1.useReqoreProperty)('isMobile');
|
|
434
|
+
var targetRef = (0, useCombinedRefs_1.useCombinedRefs)(ref).targetRef;
|
|
435
|
+
var _6 = (0, react_use_1.useMeasure)(), measureRef = _6[0], width = _6[1].width;
|
|
436
|
+
var _7 = (0, react_2.useState)(false), _isHovered = _7[0], setIsHovered = _7[1];
|
|
437
|
+
var floatingActionsRef = (0, react_2.useRef)(null);
|
|
438
|
+
var panelRef = (0, react_2.useRef)(null);
|
|
439
|
+
var hoverTimerRef = (0, react_2.useRef)(null);
|
|
402
440
|
// Runtime stuck-detection for the sticky header: a 0-height sentinel sits at
|
|
403
441
|
// the very top of the panel, directly above the header. The header is
|
|
404
442
|
// "stuck" once that sentinel has scrolled up to (or past) the sticky line of
|
|
@@ -412,10 +450,10 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
412
450
|
// sentinel (not the header) means the panel's OWN content scroll never
|
|
413
451
|
// triggers it. Only wired when `stickyHeader` is on, so ordinary panels pay
|
|
414
452
|
// nothing.
|
|
415
|
-
var stickySentinelRef = useRef(null);
|
|
416
|
-
var _8 = useState(false), isHeaderStuck = _8[0], setIsHeaderStuck = _8[1];
|
|
417
|
-
var _9 = useState(0), stickyInset = _9[0], setStickyInset = _9[1];
|
|
418
|
-
useEffect(function () {
|
|
453
|
+
var stickySentinelRef = (0, react_2.useRef)(null);
|
|
454
|
+
var _8 = (0, react_2.useState)(false), isHeaderStuck = _8[0], setIsHeaderStuck = _8[1];
|
|
455
|
+
var _9 = (0, react_2.useState)(0), stickyInset = _9[0], setStickyInset = _9[1];
|
|
456
|
+
(0, react_2.useEffect)(function () {
|
|
419
457
|
var _a;
|
|
420
458
|
if (!rest.stickyHeader) {
|
|
421
459
|
setIsHeaderStuck(false);
|
|
@@ -438,9 +476,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
438
476
|
// pins to. Comparing against the bare border box flips `isHeaderStuck`
|
|
439
477
|
// late by the scrollport's inset, so a pinned header keeps its top
|
|
440
478
|
// radius through exactly the gap this fix closes.
|
|
441
|
-
var rootTop = scrollParent
|
|
442
|
-
? scrollParent.getBoundingClientRect().top + inset.border
|
|
443
|
-
: 0;
|
|
479
|
+
var rootTop = scrollParent ? scrollParent.getBoundingClientRect().top + inset.border : 0;
|
|
444
480
|
// 1px deadzone so the exact at-rest position (sentinel flush against the
|
|
445
481
|
// top) never reads as stuck.
|
|
446
482
|
setIsHeaderStuck(sentinelTop < rootTop + offset - 1);
|
|
@@ -471,12 +507,12 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
471
507
|
cancelAnimationFrame(frame);
|
|
472
508
|
};
|
|
473
509
|
}, [rest.stickyHeader, rest.stickyHeaderOffset]);
|
|
474
|
-
useUpdateEffect(function () {
|
|
510
|
+
(0, react_use_1.useUpdateEffect)(function () {
|
|
475
511
|
setIsCollapsed(!!isCollapsed);
|
|
476
512
|
}, [isCollapsed]);
|
|
477
|
-
var floatingActionsList = useMemo(function () { return (floatingActions ? actions.filter(function (action) { return action.show === 'hover'; }) : []); }, [floatingActions, actions]);
|
|
478
|
-
var nonFloatingActions = useMemo(function () { return (floatingActions ? actions.filter(function (action) { return action.show !== 'hover'; }) : actions); }, [floatingActions, actions]);
|
|
479
|
-
var updateFloatingActionsPosition = useCallback(function () {
|
|
513
|
+
var floatingActionsList = (0, react_2.useMemo)(function () { return (floatingActions ? actions.filter(function (action) { return action.show === 'hover'; }) : []); }, [floatingActions, actions]);
|
|
514
|
+
var nonFloatingActions = (0, react_2.useMemo)(function () { return (floatingActions ? actions.filter(function (action) { return action.show !== 'hover'; }) : actions); }, [floatingActions, actions]);
|
|
515
|
+
var updateFloatingActionsPosition = (0, react_2.useCallback)(function () {
|
|
480
516
|
if (!floatingActionsRef.current || !panelRef.current)
|
|
481
517
|
return;
|
|
482
518
|
var panelRect = panelRef.current.getBoundingClientRect();
|
|
@@ -495,15 +531,15 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
495
531
|
floatingActionsRef.current.style.top = "".concat(panelRect.top - floatingRect.height + (flat ? 0 : 1), "px");
|
|
496
532
|
floatingActionsRef.current.style.left = "".concat(panelRect.right - floatingRect.width, "px");
|
|
497
533
|
}, [flat]);
|
|
498
|
-
useEffect(function () {
|
|
499
|
-
if (!_isHovered || !floatingActions || !size(floatingActionsList))
|
|
534
|
+
(0, react_2.useEffect)(function () {
|
|
535
|
+
if (!_isHovered || !floatingActions || !(0, lodash_1.size)(floatingActionsList))
|
|
500
536
|
return undefined;
|
|
501
537
|
updateFloatingActionsPosition();
|
|
502
538
|
var onScroll = function () { return updateFloatingActionsPosition(); };
|
|
503
539
|
window.addEventListener('scroll', onScroll, true);
|
|
504
540
|
return function () { return window.removeEventListener('scroll', onScroll, true); };
|
|
505
541
|
}, [_isHovered, floatingActions, floatingActionsList, updateFloatingActionsPosition]);
|
|
506
|
-
var handleMouseEnter = useCallback(function (e) {
|
|
542
|
+
var handleMouseEnter = (0, react_2.useCallback)(function (e) {
|
|
507
543
|
var _a;
|
|
508
544
|
if (floatingActions) {
|
|
509
545
|
if (hoverTimerRef.current)
|
|
@@ -512,14 +548,14 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
512
548
|
}
|
|
513
549
|
(_a = rest.onMouseEnter) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
514
550
|
}, [floatingActions, rest.onMouseEnter]);
|
|
515
|
-
var cancelHover = useCallback(function () {
|
|
551
|
+
var cancelHover = (0, react_2.useCallback)(function () {
|
|
516
552
|
if (hoverTimerRef.current) {
|
|
517
553
|
clearTimeout(hoverTimerRef.current);
|
|
518
554
|
hoverTimerRef.current = null;
|
|
519
555
|
}
|
|
520
556
|
setIsHovered(false);
|
|
521
557
|
}, []);
|
|
522
|
-
var handleMouseLeave = useCallback(function (e) {
|
|
558
|
+
var handleMouseLeave = (0, react_2.useCallback)(function (e) {
|
|
523
559
|
var _a;
|
|
524
560
|
if (floatingActions) {
|
|
525
561
|
var relatedTarget = e.relatedTarget;
|
|
@@ -532,7 +568,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
532
568
|
}
|
|
533
569
|
(_a = rest.onMouseLeave) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
534
570
|
}, [floatingActions, rest.onMouseLeave, cancelHover]);
|
|
535
|
-
var handleFloatingActionsMouseLeave = useCallback(function (e) {
|
|
571
|
+
var handleFloatingActionsMouseLeave = (0, react_2.useCallback)(function (e) {
|
|
536
572
|
var relatedTarget = e.relatedTarget;
|
|
537
573
|
if (panelRef.current &&
|
|
538
574
|
relatedTarget instanceof Node &&
|
|
@@ -541,7 +577,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
541
577
|
}
|
|
542
578
|
cancelHover();
|
|
543
579
|
}, [cancelHover]);
|
|
544
|
-
var _resizable = useMemo(function () {
|
|
580
|
+
var _resizable = (0, react_2.useMemo)(function () {
|
|
545
581
|
// Only carry re-resizable's props when the panel actually renders as a
|
|
546
582
|
// `Resizable` (the same condition the `as` below uses). Otherwise the
|
|
547
583
|
// element is a plain `div`, and — now that these props are forwarded
|
|
@@ -552,17 +588,17 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
552
588
|
return isResizableElement && resizable ? resizable : {};
|
|
553
589
|
}, [resizable, _isCollapsed, disabled]);
|
|
554
590
|
// Return true if the card has a title bar, otherwise return false.
|
|
555
|
-
var hasTitleBar = useMemo(function () {
|
|
591
|
+
var hasTitleBar = (0, react_2.useMemo)(function () {
|
|
556
592
|
return !!label ||
|
|
557
593
|
!!breadcrumbs ||
|
|
558
594
|
collapsible ||
|
|
559
595
|
!!onClose ||
|
|
560
|
-
!!size(nonFloatingActions.filter(isActionShown)) ||
|
|
561
|
-
!!(isArray(badge) ? size(badge) : badge) ||
|
|
596
|
+
!!(0, lodash_1.size)(nonFloatingActions.filter(utils_1.isActionShown)) ||
|
|
597
|
+
!!((0, lodash_1.isArray)(badge) ? (0, lodash_1.size)(badge) : badge) ||
|
|
562
598
|
!!icon;
|
|
563
599
|
}, [label, collapsible, onClose, nonFloatingActions, badge, icon]);
|
|
564
600
|
// Return true if the card has a title bar, otherwise return false.
|
|
565
|
-
var hasTitleHeader = useMemo(function () { return !!label || !!badge || !!icon || !!breadcrumbs; }, [label, icon, badge, breadcrumbs]);
|
|
601
|
+
var hasTitleHeader = (0, react_2.useMemo)(function () { return !!label || !!badge || !!icon || !!breadcrumbs; }, [label, icon, badge, breadcrumbs]);
|
|
566
602
|
/**
|
|
567
603
|
* `width` comes from `useMeasure`, which reports 0 until the element is actually measured —
|
|
568
604
|
* and in jsdom it stays 0 forever. `0 < 480` is true, so an unmeasured panel used to claim it
|
|
@@ -577,7 +613,12 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
577
613
|
* Asking whether the width was MEASURED says what the guard always meant. jsdom keeps its 0
|
|
578
614
|
* and stays wide, so the unit suite is unaffected; a browser measures and behaves.
|
|
579
615
|
*/
|
|
580
|
-
|
|
616
|
+
/* The same rule, from the helper that carries it and its tests —
|
|
617
|
+
`panelIsSmall` is `responsiveTitle && width > 0 && width < 480`, written
|
|
618
|
+
once so the unit suite can reach it without mounting a panel. Both sides
|
|
619
|
+
of this merge fixed the unmeasured-panel bug independently; keeping the
|
|
620
|
+
expression in two places is how they would drift. */
|
|
621
|
+
var isSmall = (0, react_2.useMemo)(function () { return (0, responsive_1.panelIsSmall)(width, responsiveTitle); }, [width, responsiveTitle]);
|
|
581
622
|
/**
|
|
582
623
|
* Narrow, from either trigger: the panel measuring under 480px, or the provider's
|
|
583
624
|
* viewport-level `isMobile`.
|
|
@@ -609,27 +650,27 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
609
650
|
// If collapsible is true, toggle the isCollapsed state
|
|
610
651
|
// If the isCollapsed state is true, the component is expanded
|
|
611
652
|
// If the isCollapsed state is false, the component is collapsed
|
|
612
|
-
var handleCollapseClick = useCallback(function () {
|
|
653
|
+
var handleCollapseClick = (0, react_2.useCallback)(function () {
|
|
613
654
|
// If collapsible is true, toggle the isCollapsed state
|
|
614
655
|
if (collapsible) {
|
|
615
656
|
setIsCollapsed(!_isCollapsed);
|
|
616
657
|
onCollapseChange === null || onCollapseChange === void 0 ? void 0 : onCollapseChange(!_isCollapsed);
|
|
617
658
|
}
|
|
618
659
|
}, [collapsible, _isCollapsed, onCollapseChange]);
|
|
619
|
-
var leftBottomActions = useMemo(function () { return bottomActions.filter(function (_a) {
|
|
660
|
+
var leftBottomActions = (0, react_2.useMemo)(function () { return bottomActions.filter(function (_a) {
|
|
620
661
|
var position = _a.position;
|
|
621
662
|
return position === 'left' || !position;
|
|
622
663
|
}); }, [bottomActions]);
|
|
623
|
-
var rightBottomActions = useMemo(function () { return bottomActions.filter(function (_a) {
|
|
664
|
+
var rightBottomActions = (0, react_2.useMemo)(function () { return bottomActions.filter(function (_a) {
|
|
624
665
|
var position = _a.position;
|
|
625
666
|
return position === 'right';
|
|
626
667
|
}); }, [bottomActions]);
|
|
627
668
|
// Calculates whether or not the bottom actions should be displayed.
|
|
628
|
-
var hasBottomActions = useMemo(function () {
|
|
629
|
-
return !!(size(leftBottomActions.filter(isActionShown)) ||
|
|
630
|
-
size(rightBottomActions.filter(isActionShown)));
|
|
669
|
+
var hasBottomActions = (0, react_2.useMemo)(function () {
|
|
670
|
+
return !!((0, lodash_1.size)(leftBottomActions.filter(utils_1.isActionShown)) ||
|
|
671
|
+
(0, lodash_1.size)(rightBottomActions.filter(utils_1.isActionShown)));
|
|
631
672
|
}, [leftBottomActions, rightBottomActions]);
|
|
632
|
-
var renderResponsiveActions = useCallback(function (align) {
|
|
673
|
+
var renderResponsiveActions = (0, react_2.useCallback)(function (align) {
|
|
633
674
|
if (align === void 0) { align = 'flex-end'; }
|
|
634
675
|
return function (action, index) {
|
|
635
676
|
return renderActions(action, index, true, align);
|
|
@@ -642,7 +683,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
642
683
|
// effect. That is what silently defeated dropping the action labels: the flag flipped and
|
|
643
684
|
// the closure did not. (`renderActions` itself cannot go here: it is declared below.)
|
|
644
685
|
[isNarrow, actions, showActionsWhenCollapsed, _isCollapsed]);
|
|
645
|
-
var hasNonResponsiveActions = useCallback(
|
|
686
|
+
var hasNonResponsiveActions = (0, react_2.useCallback)(
|
|
646
687
|
// `show: false` has to be honoured on BOTH paths. The `responsiveActions: false` arm used
|
|
647
688
|
// to ask only whether the array had entries, so a panel whose every action is hidden still
|
|
648
689
|
// reported having some and rendered an empty control group. It went unnoticed while the
|
|
@@ -652,11 +693,11 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
652
693
|
return (!responsiveActions || action.responsive === false) && action.show !== false;
|
|
653
694
|
});
|
|
654
695
|
}, [actions, bottomActions, responsiveActions, showActionsWhenCollapsed, _isCollapsed]);
|
|
655
|
-
var hasResponsiveActions = useCallback(function (data) {
|
|
696
|
+
var hasResponsiveActions = (0, react_2.useCallback)(function (data) {
|
|
656
697
|
return responsiveActions &&
|
|
657
698
|
data.some(function (action) { return action.responsive !== false && action.show !== false; });
|
|
658
699
|
}, [actions, bottomActions, responsiveActions, showActionsWhenCollapsed, _isCollapsed]);
|
|
659
|
-
var renderNonResponsiveActions = useCallback(function (align) {
|
|
700
|
+
var renderNonResponsiveActions = (0, react_2.useCallback)(function (align) {
|
|
660
701
|
if (align === void 0) { align = 'flex-end'; }
|
|
661
702
|
return function (action, index) {
|
|
662
703
|
return renderActions(action, index, false, align);
|
|
@@ -669,7 +710,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
669
710
|
showActionsWhenCollapsed,
|
|
670
711
|
_isCollapsed,
|
|
671
712
|
]);
|
|
672
|
-
var renderActions = useCallback(function (action, index, includeResponsive, align) {
|
|
713
|
+
var renderActions = (0, react_2.useCallback)(function (action, index, includeResponsive, align) {
|
|
673
714
|
if (align === void 0) { align = 'flex-end'; }
|
|
674
715
|
if (action.show === false ||
|
|
675
716
|
(showActionsWhenCollapsed === false && _isCollapsed === true) ||
|
|
@@ -682,15 +723,15 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
682
723
|
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"]);
|
|
683
724
|
var className = action.className;
|
|
684
725
|
// If the show prop is 'hover', add the hidden class to the action
|
|
685
|
-
className =
|
|
686
|
-
if (size(group)) {
|
|
687
|
-
return (
|
|
726
|
+
className = (0, classnames_1.default)(className, show === 'hover' ? 'reqore-panel-action-hidden' : '');
|
|
727
|
+
if ((0, lodash_1.size)(group)) {
|
|
728
|
+
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));
|
|
688
729
|
}
|
|
689
|
-
if (size(actions)) {
|
|
690
|
-
return (
|
|
730
|
+
if ((0, lodash_1.size)(actions)) {
|
|
731
|
+
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(); } })));
|
|
691
732
|
}
|
|
692
733
|
if (CustomElement) {
|
|
693
|
-
return (
|
|
734
|
+
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
|
|
694
735
|
? function (e) {
|
|
695
736
|
var _a;
|
|
696
737
|
e.stopPropagation();
|
|
@@ -705,9 +746,16 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
705
746
|
// a blank box — and a caller can pin the label with `responsive: false`.
|
|
706
747
|
// `label` on an action is typed `string | number`; a tooltip is not, so the numeric
|
|
707
748
|
// case is stringified rather than cast away.
|
|
749
|
+
//
|
|
750
|
+
// `responsive: false` has to be read HERE, not only by the group that renders the
|
|
751
|
+
// action: it used to decide which control group an action was rendered in and
|
|
752
|
+
// nothing else, so a pinned label was dropped anyway and the escape hatch this
|
|
753
|
+
// comment promises did not exist. It is what the confirmation dialog stands on —
|
|
754
|
+
// two unlabelled squares, a tick and a cross, name neither the action nor the
|
|
755
|
+
// one that throws the work away.
|
|
708
756
|
var actionLabelTooltip = typeof label === 'number' ? String(label) : label;
|
|
709
|
-
var dropActionLabel = isNarrow && !!rest.icon && !!label;
|
|
710
|
-
return (
|
|
757
|
+
var dropActionLabel = isNarrow && action.responsive !== false && !!rest.icon && !!label;
|
|
758
|
+
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
|
|
711
759
|
? function (e) {
|
|
712
760
|
var _a;
|
|
713
761
|
e.stopPropagation();
|
|
@@ -720,10 +768,10 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
720
768
|
rest.onMouseEnter ||
|
|
721
769
|
rest.onDoubleClick ||
|
|
722
770
|
rest.onContextMenu);
|
|
723
|
-
var transformedContentEffect = useMemo(function () {
|
|
771
|
+
var transformedContentEffect = (0, react_2.useMemo)(function () {
|
|
724
772
|
var newContentEffect = __assign({}, contentEffect);
|
|
725
773
|
if (newContentEffect.gradient && intent) {
|
|
726
|
-
newContentEffect.gradient = patchPrimaryGradient(newContentEffect.gradient, {
|
|
774
|
+
newContentEffect.gradient = (0, Effect_1.patchPrimaryGradient)(newContentEffect.gradient, {
|
|
727
775
|
borderColor: theme.intents[intent],
|
|
728
776
|
});
|
|
729
777
|
}
|
|
@@ -732,7 +780,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
732
780
|
}, [intent, theme, contentEffect, interactive]);
|
|
733
781
|
var opacity = rest.transparent ? 0 : rest.opacity;
|
|
734
782
|
var noHorizontalPadding = opacity === 0 && flat && !intent && !rest.raised;
|
|
735
|
-
var showNonResponsiveGroup = useCallback(function () {
|
|
783
|
+
var showNonResponsiveGroup = (0, react_2.useCallback)(function () {
|
|
736
784
|
var show = false;
|
|
737
785
|
// SHOULD THIS GROUP SHOW CONTROL BUTTONS?
|
|
738
786
|
// Always, now that a narrow bar stays on one row: there is no separate control row for them
|
|
@@ -753,7 +801,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
753
801
|
* The title's natural size in px, from the heading level it renders at — the same
|
|
754
802
|
* `labelSize || HEADER_SIZE_TO_NUMBER[panelSize]` the icon is sized from.
|
|
755
803
|
*/
|
|
756
|
-
var labelNaturalPx = (_b = HEADER_LEVEL_TO_PX[labelSize || HEADER_SIZE_TO_NUMBER[panelSize]]) !== null && _b !== void 0 ? _b : HEADER_LEVEL_TO_PX[3];
|
|
804
|
+
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];
|
|
757
805
|
/**
|
|
758
806
|
* SECOND thing to give: the title's size. Once the actions are down to icons and the
|
|
759
807
|
* row is still short, the title shrinks toward a floor rather than dropping characters
|
|
@@ -783,18 +831,18 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
783
831
|
* way it always has. When it IS cut, that same click must not reach the bar — opening the
|
|
784
832
|
* text and folding the panel away in one gesture is the worst of both.
|
|
785
833
|
*/
|
|
786
|
-
var _10 = useState(false), isDescriptionExpanded = _10[0], setIsDescriptionExpanded = _10[1];
|
|
787
|
-
var _11 = useState(false), isDescriptionTruncated = _11[0], setIsDescriptionTruncated = _11[1];
|
|
788
|
-
var descriptionRef = useRef(null);
|
|
834
|
+
var _10 = (0, react_2.useState)(false), isDescriptionExpanded = _10[0], setIsDescriptionExpanded = _10[1];
|
|
835
|
+
var _11 = (0, react_2.useState)(false), isDescriptionTruncated = _11[0], setIsDescriptionTruncated = _11[1];
|
|
836
|
+
var descriptionRef = (0, react_2.useRef)(null);
|
|
789
837
|
var descriptionIsClamped = descriptionClamp > 0 && !isDescriptionExpanded;
|
|
790
|
-
useLayoutEffect(function () {
|
|
838
|
+
(0, react_2.useLayoutEffect)(function () {
|
|
791
839
|
var el = descriptionRef.current;
|
|
792
840
|
// `scrollHeight` is what the text wants, `clientHeight` what the clamp left it. Re-read
|
|
793
841
|
// whenever the bar's width moves, because that is what changes how many lines it takes.
|
|
794
842
|
setIsDescriptionTruncated(descriptionIsClamped && !!el && el.scrollHeight > el.clientHeight + 1);
|
|
795
843
|
}, [description, descriptionIsClamped, width]);
|
|
796
844
|
var descriptionIsInteractive = isDescriptionTruncated || isDescriptionExpanded;
|
|
797
|
-
var handleDescriptionClick = useCallback(function (event) {
|
|
845
|
+
var handleDescriptionClick = (0, react_2.useCallback)(function (event) {
|
|
798
846
|
if (!descriptionIsInteractive) {
|
|
799
847
|
return;
|
|
800
848
|
}
|
|
@@ -817,8 +865,8 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
817
865
|
style: { cursor: 'pointer' },
|
|
818
866
|
}
|
|
819
867
|
: {}));
|
|
820
|
-
var _12 = useState(undefined), labelAvailable = _12[0], setLabelAvailable = _12[1];
|
|
821
|
-
var _13 = useFitTextSize({
|
|
868
|
+
var _12 = (0, react_2.useState)(undefined), labelAvailable = _12[0], setLabelAvailable = _12[1];
|
|
869
|
+
var _13 = (0, useFitTextSize_1.useFitTextSize)({
|
|
822
870
|
text: typeof label === 'string' ? label : '',
|
|
823
871
|
available: labelAvailable,
|
|
824
872
|
max: labelNaturalPx,
|
|
@@ -829,7 +877,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
829
877
|
/** Only while the title is actually below its natural size, and never over a caller who
|
|
830
878
|
* pinned the description's own size. */
|
|
831
879
|
var descriptionFontPx = fitLabel && !(descriptionEffect === null || descriptionEffect === void 0 ? void 0 : descriptionEffect.textSize) && labelFitPx < labelNaturalPx
|
|
832
|
-
? Math.max(FIT_TEXT_FLOOR_PX, Math.round(((_c = TEXT_FROM_SIZE[panelSize]) !== null && _c !== void 0 ? _c : TEXT_FROM_SIZE.normal) * (labelFitPx / labelNaturalPx)))
|
|
880
|
+
? 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)))
|
|
833
881
|
: 0;
|
|
834
882
|
/**
|
|
835
883
|
* How much room the title has, computed rather than measured off its own box.
|
|
@@ -864,7 +912,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
864
912
|
* the text does fit, the parent has slack and the fit returns the natural size, which is
|
|
865
913
|
* the right answer either way.
|
|
866
914
|
*/
|
|
867
|
-
useLayoutEffect(function () {
|
|
915
|
+
(0, react_2.useLayoutEffect)(function () {
|
|
868
916
|
var node = labelFitRef.current;
|
|
869
917
|
var parent = node === null || node === void 0 ? void 0 : node.parentElement;
|
|
870
918
|
if (!fitLabel || !node || !parent) {
|
|
@@ -881,10 +929,10 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
881
929
|
var next = Math.max(0, Math.round(parent.clientWidth - padding - siblings - gaps));
|
|
882
930
|
setLabelAvailable(function (current) { return (current === next ? current : next); });
|
|
883
931
|
}, [fitLabel, label, width, badge, actions, panelSize, description, clampLines]);
|
|
884
|
-
var iconTooltip = useMemo(function () { return ({
|
|
932
|
+
var iconTooltip = (0, react_2.useMemo)(function () { return ({
|
|
885
933
|
content: label,
|
|
886
934
|
}); }, [label]);
|
|
887
|
-
var handleRef = useCallback(function (ref) {
|
|
935
|
+
var handleRef = (0, react_2.useCallback)(function (ref) {
|
|
888
936
|
var _ref = ref;
|
|
889
937
|
if (ref === null || ref === void 0 ? void 0 : ref.resizable) {
|
|
890
938
|
_ref = ref.resizable;
|
|
@@ -892,14 +940,14 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
892
940
|
targetRef.current = _ref;
|
|
893
941
|
}, []);
|
|
894
942
|
if (skeleton) {
|
|
895
|
-
return
|
|
943
|
+
return (0, jsx_runtime_1.jsx)(exports.ReqorePanelSkeleton, { size: panelSize, isCollapsed: _isCollapsed });
|
|
896
944
|
}
|
|
897
|
-
return (
|
|
945
|
+
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) {
|
|
898
946
|
handleRef(node);
|
|
899
947
|
panelRef.current = node;
|
|
900
|
-
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [rest.stickyHeader ? (
|
|
901
|
-
size(floatingActionsList) > 0 &&
|
|
902
|
-
createPortal(
|
|
948
|
+
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [rest.stickyHeader ? ((0, jsx_runtime_1.jsx)("div", { ref: stickySentinelRef, "aria-hidden": 'true', style: { height: 0 } })) : null, _isHovered &&
|
|
949
|
+
(0, lodash_1.size)(floatingActionsList) > 0 &&
|
|
950
|
+
(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 () {
|
|
903
951
|
var hasPanelIcon = !!icon || !!iconImage || loading;
|
|
904
952
|
// The icon takes the label's place, so there has to BE an icon. Without one
|
|
905
953
|
// the label is the only thing identifying the panel and it stays put — a
|
|
@@ -928,10 +976,10 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
928
976
|
// Inline → keep 'margin=right' so ReqoreIcon adds its
|
|
929
977
|
// standard side-spacer between icon and label.
|
|
930
978
|
var iconMargin = useOuterGrid ? undefined : 'right';
|
|
931
|
-
var panelIcon = hasPanelIcon ? (
|
|
932
|
-
opacity: CONTROL_ICON_OPACITY,
|
|
979
|
+
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: {
|
|
980
|
+
opacity: colors_1.CONTROL_ICON_OPACITY,
|
|
933
981
|
} }, 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;
|
|
934
|
-
var labelRow = (
|
|
982
|
+
var labelRow = ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndBadge, { className: 'reqore-panel-title-label-row', children: [inlineWithLabel && panelIcon, hideTitleText ? null : typeof label === 'string' ? (
|
|
935
983
|
// The measured box is this wrapper, not the heading: as a
|
|
936
984
|
// `min-width: 0` flex child it reports the width the row actually
|
|
937
985
|
// left for the title, where the heading would report what the text
|
|
@@ -940,7 +988,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
940
988
|
// the inline-flex heading: a block wrapper adds the row's leading on
|
|
941
989
|
// top of the heading's own box, which made a `tiny` panel 3px taller
|
|
942
990
|
// than it was before this wrapper existed.
|
|
943
|
-
|
|
991
|
+
(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({
|
|
944
992
|
// `noWrap` pins the heading to one line; a clamped title is
|
|
945
993
|
// allowed to wrap, and the clamp brings its own ellipsis.
|
|
946
994
|
noWrap: clampLines === 1 }, labelEffect), style: __assign(__assign(__assign({}, (clampLines > 1
|
|
@@ -952,7 +1000,7 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
952
1000
|
// wrapper clips it mid-word with no ellipsis at all.
|
|
953
1001
|
maxWidth: '100%' }), (fitLabel !== false && !(labelEffect === null || labelEffect === void 0 ? void 0 : labelEffect.textSize)
|
|
954
1002
|
? { fontSize: "".concat(labelFitPx, "px") }
|
|
955
|
-
: {})), label: label, onSubmit: onLabelEdit, tooltip: showLabelTooltip ? customLabelTooltip || label : undefined }) })) : (label), badge || badge === 0 ? (
|
|
1003
|
+
: {})), 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] }));
|
|
956
1004
|
// Description size is driven by the panel size only —
|
|
957
1005
|
// explicitly NOT by `labelSize`. `NUMBER_TO_SIZE` maps
|
|
958
1006
|
// 1..6 → micro..huge, which means bumping `labelSize`
|
|
@@ -961,15 +1009,15 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
961
1009
|
// pairing: a bigger label should not make supporting
|
|
962
1010
|
// text smaller. Consumers that want to size the
|
|
963
1011
|
// description explicitly pass `descriptionEffect.textSize`.
|
|
964
|
-
var descriptionRow = description && !hideTitleText && !descriptionBelow ? (
|
|
965
|
-
return (
|
|
966
|
-
})()) : null, breadcrumbs && (badge || badge === 0) ? (
|
|
1012
|
+
var descriptionRow = description && !hideTitleText && !descriptionBelow ? ((0, jsx_runtime_1.jsx)(Span_1.ReqoreSpan, __assign({}, descriptionProps, { children: description }))) : null;
|
|
1013
|
+
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] })) })));
|
|
1014
|
+
})()) : 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
|
|
967
1015
|
// The narrow bar keeps its controls in the trailing group, so this row —
|
|
968
1016
|
// which existed only for the stacked layout — never shows.
|
|
969
1017
|
, {
|
|
970
1018
|
// The narrow bar keeps its controls in the trailing group, so this row —
|
|
971
1019
|
// which existed only for the stacked layout — never shows.
|
|
972
|
-
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) && (
|
|
1020
|
+
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,
|
|
973
1021
|
// Not fluid by default. `fluid` emits `width: 100%`, so the group's flex basis
|
|
974
1022
|
// becomes the whole bar and the title — the only shrinkable thing on the other
|
|
975
1023
|
// side — collapses to nothing: measured at 0px of title on a 400px panel, and
|
|
@@ -1005,11 +1053,11 @@ export var ReqorePanel = forwardRef(function (_a, ref) {
|
|
|
1005
1053
|
// but only while there is a title header to take it FROM. With no label,
|
|
1006
1054
|
// badge, icon or breadcrumbs the bar is the group's alone, and holding a
|
|
1007
1055
|
// Collection's search input to half of an empty bar guards nothing.
|
|
1008
|
-
maxWidth: hasTitleHeader ? '50%' : undefined }, responsiveActionsWrapperProps === null || responsiveActionsWrapperProps === void 0 ? void 0 : responsiveActionsWrapperProps.style), children: nonFloatingActions.map(renderResponsiveActions()) }))),
|
|
1056
|
+
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 ? (
|
|
1009
1057
|
// `flex-basis: 100%` is what puts it on its own line — the bar is a wrapping
|
|
1010
1058
|
// flex row, so a full-width item cannot share one with anything before it.
|
|
1011
1059
|
// `min-width: 0` so a long sentence wraps inside the bar instead of widening it.
|
|
1012
|
-
|
|
1060
|
+
(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] })) })));
|
|
1013
1061
|
});
|
|
1014
1062
|
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;
|
|
1015
1063
|
//# sourceMappingURL=index.js.map
|