@qoretechnologies/reqore 0.78.5-pr.708.gbe112f0 → 0.78.6-pr.715.gdfefa70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/index.d.ts.map +1 -1
- package/dist/components/Accordion/index.js +11 -15
- package/dist/components/Accordion/index.js.map +1 -1
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +6 -7
- package/dist/components/Breadcrumbs/index.js.map +1 -1
- package/dist/components/Breadcrumbs/item.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/item.js +2 -6
- package/dist/components/Breadcrumbs/item.js.map +1 -1
- package/dist/components/Bubble/index.d.ts.map +1 -1
- package/dist/components/Bubble/index.js +39 -7
- package/dist/components/Bubble/index.js.map +1 -1
- package/dist/components/Button/index.d.ts +0 -8
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +12 -75
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/ButtonRail/index.d.ts.map +1 -1
- package/dist/components/ButtonRail/index.js +2 -3
- package/dist/components/ButtonRail/index.js.map +1 -1
- package/dist/components/Callout/index.d.ts +3 -4
- package/dist/components/Callout/index.d.ts.map +1 -1
- package/dist/components/Callout/index.js +8 -39
- package/dist/components/Callout/index.js.map +1 -1
- package/dist/components/Checkbox/index.js +8 -8
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Collapse/index.d.ts.map +1 -1
- package/dist/components/Collapse/index.js +36 -7
- package/dist/components/Collapse/index.js.map +1 -1
- package/dist/components/CollapsibleContent/index.d.ts.map +1 -1
- package/dist/components/CollapsibleContent/index.js +37 -5
- package/dist/components/CollapsibleContent/index.js.map +1 -1
- package/dist/components/Collection/index.js +3 -3
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.d.ts.map +1 -1
- package/dist/components/Collection/item.js +4 -4
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/Columns/column.d.ts.map +1 -1
- package/dist/components/Columns/column.js +35 -6
- package/dist/components/Columns/column.js.map +1 -1
- package/dist/components/Columns/index.d.ts.map +1 -1
- package/dist/components/Columns/index.js +35 -3
- package/dist/components/Columns/index.js.map +1 -1
- package/dist/components/Comment/index.js +8 -8
- package/dist/components/Comment/index.js.map +1 -1
- package/dist/components/CommentFeed/index.js +2 -2
- package/dist/components/CommentFeed/index.js.map +1 -1
- package/dist/components/Content/index.d.ts.map +1 -1
- package/dist/components/Content/index.js +35 -3
- package/dist/components/Content/index.js.map +1 -1
- package/dist/components/Content/wrapper.js +2 -2
- package/dist/components/Content/wrapper.js.map +1 -1
- package/dist/components/ControlGroup/index.js +3 -3
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/ControlGroup/item.d.ts.map +1 -1
- package/dist/components/ControlGroup/item.js +6 -35
- package/dist/components/ControlGroup/item.js.map +1 -1
- package/dist/components/DataView/index.d.ts.map +1 -1
- package/dist/components/DataView/index.js +49 -17
- package/dist/components/DataView/index.js.map +1 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +8 -40
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/DescriptionList/index.d.ts.map +1 -1
- package/dist/components/DescriptionList/index.js +39 -7
- package/dist/components/DescriptionList/index.js.map +1 -1
- package/dist/components/Drawer/backdrop.d.ts.map +1 -1
- package/dist/components/Drawer/backdrop.js +6 -35
- package/dist/components/Drawer/backdrop.js.map +1 -1
- package/dist/components/Drawer/index.d.ts +172 -0
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +296 -18
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Effect/index.d.ts +6 -0
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +26 -27
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/EntityRow/index.d.ts +1 -7
- package/dist/components/EntityRow/index.d.ts.map +1 -1
- package/dist/components/EntityRow/index.js +11 -32
- package/dist/components/EntityRow/index.js.map +1 -1
- package/dist/components/FadeScroller/index.d.ts.map +1 -1
- package/dist/components/FadeScroller/index.js +106 -26
- package/dist/components/FadeScroller/index.js.map +1 -1
- package/dist/components/FeatureCard/index.d.ts +1 -7
- package/dist/components/FeatureCard/index.d.ts.map +1 -1
- package/dist/components/FeatureCard/index.js +8 -30
- package/dist/components/FeatureCard/index.js.map +1 -1
- package/dist/components/Header/index.js +2 -2
- package/dist/components/Header/index.js.map +1 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +16 -26
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/IconPicker/index.js +2 -2
- package/dist/components/IconPicker/index.js.map +1 -1
- package/dist/components/Input/index.js +6 -6
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InputClearButton/index.d.ts.map +1 -1
- package/dist/components/InputClearButton/index.js +3 -35
- package/dist/components/InputClearButton/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +4 -5
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/KeyboardShortcut/index.js +3 -3
- package/dist/components/KeyboardShortcut/index.js.map +1 -1
- package/dist/components/Layout/content.js +2 -2
- package/dist/components/Layout/content.js.map +1 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +35 -3
- package/dist/components/Layout/index.js.map +1 -1
- package/dist/components/Link/index.d.ts.map +1 -1
- package/dist/components/Link/index.js +38 -6
- package/dist/components/Link/index.js.map +1 -1
- package/dist/components/Menu/divider.js +3 -3
- package/dist/components/Menu/divider.js.map +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +4 -4
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Menu/item.d.ts.map +1 -1
- package/dist/components/Menu/item.js +0 -27
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Modal/index.d.ts +12 -2
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/NavRail/index.js +6 -6
- package/dist/components/NavRail/index.js.map +1 -1
- package/dist/components/Navbar/divider.d.ts.map +1 -1
- package/dist/components/Navbar/divider.js +6 -35
- package/dist/components/Navbar/divider.js.map +1 -1
- package/dist/components/Navbar/group.js +3 -3
- package/dist/components/Navbar/group.js.map +1 -1
- package/dist/components/Navbar/index.js +3 -3
- package/dist/components/Navbar/index.js.map +1 -1
- package/dist/components/Navbar/item.js +3 -3
- package/dist/components/Navbar/item.js.map +1 -1
- package/dist/components/Notifications/index.d.ts.map +1 -1
- package/dist/components/Notifications/index.js +35 -6
- package/dist/components/Notifications/index.js.map +1 -1
- package/dist/components/Notifications/notification.d.ts +11 -1
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +130 -21
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Notifications/styles.js +8 -8
- package/dist/components/Notifications/styles.js.map +1 -1
- package/dist/components/Paging/index.js +2 -2
- package/dist/components/Paging/index.js.map +1 -1
- package/dist/components/Panel/index.d.ts +0 -12
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +63 -197
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Paragraph/index.d.ts +0 -6
- package/dist/components/Paragraph/index.d.ts.map +1 -1
- package/dist/components/Paragraph/index.js +8 -57
- package/dist/components/Paragraph/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +7 -36
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.js +42 -10
- package/dist/components/Progress/index.js.map +1 -1
- package/dist/components/Rating/index.d.ts.map +1 -1
- package/dist/components/Rating/index.js +36 -4
- 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 +5 -16
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.js +37 -5
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/Select/valuePreview.js +2 -2
- package/dist/components/Select/valuePreview.js.map +1 -1
- package/dist/components/SeverityRow/index.d.ts +1 -7
- package/dist/components/SeverityRow/index.d.ts.map +1 -1
- package/dist/components/SeverityRow/index.js +10 -31
- package/dist/components/SeverityRow/index.js.map +1 -1
- package/dist/components/Skeleton/index.d.ts.map +1 -1
- package/dist/components/Skeleton/index.js +35 -6
- package/dist/components/Skeleton/index.js.map +1 -1
- package/dist/components/Slider/index.js +9 -9
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Spacer/index.js +7 -7
- package/dist/components/Spacer/index.js.map +1 -1
- package/dist/components/Span/index.d.ts.map +1 -1
- package/dist/components/Span/index.js +6 -35
- package/dist/components/Span/index.js.map +1 -1
- package/dist/components/StackedBar/index.d.ts.map +1 -1
- package/dist/components/StackedBar/index.js +38 -9
- package/dist/components/StackedBar/index.js.map +1 -1
- package/dist/components/Statistic/index.d.ts +8 -0
- package/dist/components/Statistic/index.d.ts.map +1 -1
- package/dist/components/Statistic/index.js +41 -9
- 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 +38 -6
- 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 +14 -7
- package/dist/components/Table/cell.js.map +1 -1
- package/dist/components/Table/header.d.ts.map +1 -1
- package/dist/components/Table/header.js +10 -13
- package/dist/components/Table/header.js.map +1 -1
- package/dist/components/Table/headerCell.d.ts.map +1 -1
- package/dist/components/Table/headerCell.js +38 -8
- package/dist/components/Table/headerCell.js.map +1 -1
- package/dist/components/Table/index.d.ts +1 -12
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +49 -34
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/row.js +5 -5
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Table/scrollbar.js +3 -3
- package/dist/components/Table/scrollbar.js.map +1 -1
- package/dist/components/Tabs/content.js +2 -2
- package/dist/components/Tabs/content.js.map +1 -1
- package/dist/components/Tabs/index.js +3 -3
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/item.d.ts.map +1 -1
- package/dist/components/Tabs/item.js +4 -6
- package/dist/components/Tabs/item.js.map +1 -1
- package/dist/components/Tabs/list.js +3 -3
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/group.d.ts.map +1 -1
- package/dist/components/Tag/group.js +35 -3
- package/dist/components/Tag/group.js.map +1 -1
- package/dist/components/Tag/index.d.ts +0 -7
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +16 -79
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Testimonial/index.d.ts +1 -6
- package/dist/components/Testimonial/index.d.ts.map +1 -1
- package/dist/components/Testimonial/index.js +7 -28
- package/dist/components/Testimonial/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts +0 -10
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +14 -99
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/components/Tier/group.d.ts +5 -4
- package/dist/components/Tier/group.d.ts.map +1 -1
- package/dist/components/Tier/group.js +51 -131
- package/dist/components/Tier/group.js.map +1 -1
- package/dist/components/Tier/index.d.ts +0 -5
- package/dist/components/Tier/index.d.ts.map +1 -1
- package/dist/components/Tier/index.js +10 -14
- package/dist/components/Tier/index.js.map +1 -1
- package/dist/components/Timeline/index.d.ts.map +1 -1
- package/dist/components/Timeline/index.js +12 -13
- package/dist/components/Timeline/index.js.map +1 -1
- package/dist/components/TooltipComponent/index.d.ts.map +1 -1
- package/dist/components/TooltipComponent/index.js +7 -6
- package/dist/components/TooltipComponent/index.js.map +1 -1
- package/dist/components/Tree/index.js +3 -3
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/constants/theme.d.ts +21 -0
- package/dist/constants/theme.d.ts.map +1 -1
- package/dist/constants/theme.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +6 -8
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js +35 -3
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/helpers/colors.d.ts +11 -1
- package/dist/helpers/colors.d.ts.map +1 -1
- package/dist/helpers/colors.js +18 -1
- package/dist/helpers/colors.js.map +1 -1
- package/dist/helpers/gestures.d.ts +30 -0
- package/dist/helpers/gestures.d.ts.map +1 -0
- package/dist/helpers/gestures.js +36 -0
- package/dist/helpers/gestures.js.map +1 -0
- package/dist/helpers/styled.d.ts +26 -39
- package/dist/helpers/styled.d.ts.map +1 -1
- package/dist/helpers/styled.js +4 -156
- package/dist/helpers/styled.js.map +1 -1
- package/dist/hooks/usePointerDrag.d.ts +77 -0
- package/dist/hooks/usePointerDrag.d.ts.map +1 -0
- package/dist/hooks/usePointerDrag.js +192 -0
- package/dist/hooks/usePointerDrag.js.map +1 -0
- package/dist/hooks/useReqoreMedia.d.ts +24 -0
- package/dist/hooks/useReqoreMedia.d.ts.map +1 -0
- package/dist/hooks/useReqoreMedia.js +32 -0
- package/dist/hooks/useReqoreMedia.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.js +6 -6
- package/dist/styles.js.map +1 -1
- package/package.json +1 -1
- package/dist/hooks/useDragToScroll.d.ts +0 -55
- package/dist/hooks/useDragToScroll.d.ts.map +0 -1
- package/dist/hooks/useDragToScroll.js +0 -259
- package/dist/hooks/useDragToScroll.js.map +0 -1
|
@@ -58,20 +58,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
58
58
|
}
|
|
59
59
|
return t;
|
|
60
60
|
};
|
|
61
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
62
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
63
|
-
if (ar || !(i in from)) {
|
|
64
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
65
|
-
ar[i] = from[i];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
69
|
-
};
|
|
70
61
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
71
62
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
72
63
|
};
|
|
73
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74
|
-
exports.ReqorePanel = exports.ReqorePanelSkeleton = exports.StyledFloatingActions = exports.StyledPanelMedia = exports.StyledPanelContent = exports.StyledPanelBottomActions = exports.StyledPanelTopBar = exports.StyledPanelTitle = exports.StyledPanel = exports.
|
|
65
|
+
exports.ReqorePanel = exports.ReqorePanelSkeleton = exports.StyledFloatingActions = exports.StyledPanelMedia = exports.StyledPanelContent = exports.StyledPanelBottomActions = exports.StyledPanelTopBar = exports.StyledPanelTitle = exports.StyledPanel = exports.StyledPanelTitleHeaderLabelAndBadge = exports.StyledPanelTitleHeaderLabelAndDescription = exports.StyledPanelTitleHeaderContent = exports.StyledPanelTitleHeader = void 0;
|
|
75
66
|
var react_1 = require("react");
|
|
76
67
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
77
68
|
var classnames_1 = __importDefault(require("classnames"));
|
|
@@ -82,11 +73,11 @@ var react_2 = require("react");
|
|
|
82
73
|
var react_dom_1 = require("react-dom");
|
|
83
74
|
var react_use_1 = require("react-use");
|
|
84
75
|
var responsive_1 = require("./responsive");
|
|
85
|
-
var styled_components_1 = require("styled-components");
|
|
76
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
86
77
|
var colors_1 = require("../../constants/colors");
|
|
87
78
|
var sizes_1 = require("../../constants/sizes");
|
|
88
79
|
var colors_2 = require("../../helpers/colors");
|
|
89
|
-
var styled_1 =
|
|
80
|
+
var styled_1 = require("../../helpers/styled");
|
|
90
81
|
var utils_1 = require("../../helpers/utils");
|
|
91
82
|
var useCombinedRefs_1 = require("../../hooks/useCombinedRefs");
|
|
92
83
|
var useReqoreContext_1 = require("../../hooks/useReqoreContext");
|
|
@@ -154,12 +145,12 @@ var getScrollportInset = function (el) {
|
|
|
154
145
|
* opening a line box around the inline-flex heading — a block wrapper adds the row's leading on
|
|
155
146
|
* top of the heading's own box, which made a `tiny` panel 3px taller than it used to be.
|
|
156
147
|
*/
|
|
157
|
-
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) {
|
|
158
149
|
var $clampLines = _a.$clampLines;
|
|
159
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);
|
|
160
151
|
});
|
|
161
|
-
exports.StyledPanelTitleHeader =
|
|
162
|
-
exports.StyledPanelTitleHeaderContent =
|
|
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) {
|
|
163
154
|
var $hasOuterIcon = _a.$hasOuterIcon;
|
|
164
155
|
return ($hasOuterIcon ? 'grid' : 'flex');
|
|
165
156
|
}, function (_a) {
|
|
@@ -176,8 +167,8 @@ exports.StyledPanelTitleHeaderContent = styled_1.default.div(templateObject_9 ||
|
|
|
176
167
|
}
|
|
177
168
|
return width;
|
|
178
169
|
});
|
|
179
|
-
exports.StyledPanelTitleHeaderLabelAndDescription =
|
|
180
|
-
exports.StyledPanelTitleHeaderLabelAndBadge =
|
|
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"])));
|
|
181
172
|
/**
|
|
182
173
|
* Does the panel wrapper draw its 1px border?
|
|
183
174
|
*
|
|
@@ -200,113 +191,51 @@ var getPanelBorderBaseColor = function (theme, _a) {
|
|
|
200
191
|
var intent = _a.intent, accentPosition = _a.accentPosition;
|
|
201
192
|
return (intent && !accentPosition ? theme.intents[intent] : (0, colors_2.getMainBackgroundColor)(theme));
|
|
202
193
|
};
|
|
203
|
-
/**
|
|
204
|
-
*
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
errorBoundaryOptions: true,
|
|
239
|
-
expandTooltip: true,
|
|
240
|
-
fill: true,
|
|
241
|
-
fitLabel: true,
|
|
242
|
-
flat: true,
|
|
243
|
-
floatingActions: true,
|
|
244
|
-
fluid: true,
|
|
245
|
-
getContentRef: true,
|
|
246
|
-
icon: true,
|
|
247
|
-
iconColor: true,
|
|
248
|
-
iconImage: true,
|
|
249
|
-
iconProps: true,
|
|
250
|
-
iconVerticalAlign: true,
|
|
251
|
-
iconWithLabel: true,
|
|
252
|
-
inheritCustomTheme: true,
|
|
253
|
-
intent: true,
|
|
254
|
-
isCollapsed: true,
|
|
255
|
-
isStuck: true,
|
|
256
|
-
label: true,
|
|
257
|
-
labelEffect: true,
|
|
258
|
-
labelMaxLines: true,
|
|
259
|
-
labelMinTextSize: true,
|
|
260
|
-
labelProps: true,
|
|
261
|
-
labelSize: true,
|
|
262
|
-
loading: true,
|
|
263
|
-
loadingIconType: true,
|
|
264
|
-
media: true,
|
|
265
|
-
mediaAlt: true,
|
|
266
|
-
mediaAspectRatio: true,
|
|
267
|
-
mediaPosition: true,
|
|
268
|
-
mediaProps: true,
|
|
269
|
-
minimal: true,
|
|
270
|
-
noHorizontalPadding: true,
|
|
271
|
-
onClose: true,
|
|
272
|
-
onCollapseChange: true,
|
|
273
|
-
onLabelEdit: true,
|
|
274
|
-
opacity: true,
|
|
275
|
-
padded: true,
|
|
276
|
-
radiusSize: true,
|
|
277
|
-
raised: true,
|
|
278
|
-
resizable: true,
|
|
279
|
-
responsiveActions: true,
|
|
280
|
-
responsiveActionsWrapperProps: true,
|
|
281
|
-
responsiveTitle: true,
|
|
282
|
-
rounded: true,
|
|
283
|
-
showActionsWhenCollapsed: true,
|
|
284
|
-
showLabelTooltip: true,
|
|
285
|
-
skeleton: true,
|
|
286
|
-
stickyHeader: true,
|
|
287
|
-
stickyHeaderInset: true,
|
|
288
|
-
stickyHeaderOffset: true,
|
|
289
|
-
theme: true,
|
|
290
|
-
tooltip: true,
|
|
291
|
-
transparent: true,
|
|
292
|
-
unMountContentOnCollapse: true,
|
|
293
|
-
wrapperPadding: true,
|
|
294
|
-
});
|
|
295
|
-
exports.StyledPanel = (0, styled_1.default)(Effect_1.StyledEffect).withConfig({
|
|
296
|
-
// Its own props, `interactive` (set by the panel for its hover styles) and the layout flags a
|
|
297
|
-
// containing ControlGroup hands it — except `size`, which a panel never forwards but a
|
|
298
|
-
// `Resizable` reads as its own.
|
|
299
|
-
shouldForwardProp: styled_1.omitStyleProps.apply(void 0, __spreadArray(__spreadArray(__spreadArray([], exports.REQORE_PANEL_STYLE_PROPS, false), styled_1.REQORE_CONTROL_GROUP_CHILD_PROPS.filter(function (prop) { return prop !== 'size'; }), false), ['interactive'], false)),
|
|
194
|
+
/** The title bar: a band a step lighter than the page — or, with `theme.panel` named, the
|
|
195
|
+
* panel's own surface, set apart from the body by the hairline under it alone. */
|
|
196
|
+
var getPanelHeaderColor = function (theme, hovered) {
|
|
197
|
+
var themed = (0, colors_2.getThemePanelSurface)(theme);
|
|
198
|
+
if (themed === null || themed === void 0 ? void 0 : themed.main) {
|
|
199
|
+
return hovered ? (0, colors_2.changeLightness)(themed.main, 0.02) : themed.main;
|
|
200
|
+
}
|
|
201
|
+
return (0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), hovered ? 0.05 : 0.03);
|
|
202
|
+
};
|
|
203
|
+
/** The resting border: the intent's colour when the intent tints the edge, else the hairline
|
|
204
|
+
* (`theme.panel.border` when the theme names one). */
|
|
205
|
+
var getPanelBorderColor = function (theme, _a) {
|
|
206
|
+
var intent = _a.intent, accentPosition = _a.accentPosition;
|
|
207
|
+
return intent && !accentPosition
|
|
208
|
+
? (0, colors_2.changeLightness)(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.08)
|
|
209
|
+
: (0, colors_2.getPanelHairlineColor)(theme);
|
|
210
|
+
};
|
|
211
|
+
/** The border while the panel is hovered — a step brighter than at rest. */
|
|
212
|
+
var getPanelHoverBorderColor = function (theme, _a) {
|
|
213
|
+
var intent = _a.intent, accentPosition = _a.accentPosition;
|
|
214
|
+
var themed = !(intent && !accentPosition) ? (0, colors_2.getThemePanelSurface)(theme) : undefined;
|
|
215
|
+
return (themed === null || themed === void 0 ? void 0 : themed.border)
|
|
216
|
+
? (0, colors_2.changeLightness)(themed.border, 0.12)
|
|
217
|
+
: (0, colors_2.changeLightness)(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.25);
|
|
218
|
+
};
|
|
219
|
+
exports.StyledPanel = (0, styled_components_1.default)(Effect_1.StyledEffect).withConfig({
|
|
220
|
+
// `fill` controls panel layout and must not become a boolean DOM attribute. Neither must
|
|
221
|
+
// `accentPosition`: when the panel renders as a `Resizable` (a COMPONENT target) the rule
|
|
222
|
+
// below forwards everything, and re-resizable spreads the leftovers onto its wrapper div.
|
|
223
|
+
// Filtering here still leaves the styled-component's own interpolations reading the prop.
|
|
224
|
+
// Everything else follows styled-components' own rule, so re-resizable still receives its
|
|
225
|
+
// `enable` / size / handle config — those are component props, not HTML attributes.
|
|
226
|
+
// `opacity` is the surface's background opacity, an SVG attribute a `div` would keep; the
|
|
227
|
+
// remaining flags only style the surface, and re-resizable would write them onto its div.
|
|
228
|
+
shouldForwardProp: (0, styled_1.omitStyleProps)('accentPosition', 'fill', 'flat', 'fluid', 'interactive', 'isCollapsed', 'opacity', 'rounded'),
|
|
300
229
|
})(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) {
|
|
301
230
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
302
|
-
return (0, polished_1.rgba)((0, colors_2.
|
|
231
|
+
return (0, polished_1.rgba)((0, colors_2.getPanelBackgroundColor)(theme), opacity);
|
|
303
232
|
}, function (_a) {
|
|
304
233
|
var rounded = _a.rounded, radiusSize = _a.radiusSize;
|
|
305
234
|
return rounded ? (0, sizes_1.resolveRadius)('normal', radiusSize) : 0;
|
|
306
235
|
}, function (_a) {
|
|
307
236
|
var theme = _a.theme, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
|
|
308
237
|
return hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition })
|
|
309
|
-
? "1px solid ".concat((
|
|
238
|
+
? "1px solid ".concat(getPanelBorderColor(theme, { intent: intent, accentPosition: accentPosition }))
|
|
310
239
|
: undefined;
|
|
311
240
|
}, function (_a) {
|
|
312
241
|
var theme = _a.theme;
|
|
@@ -354,9 +283,9 @@ exports.StyledPanel = (0, styled_1.default)(Effect_1.StyledEffect).withConfig({
|
|
|
354
283
|
return interactive
|
|
355
284
|
? (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
|
|
356
285
|
? undefined
|
|
357
|
-
: (0, polished_1.rgba)((0, polished_1.darken)(0.025, (0, polished_1.rgba)((0, colors_2.
|
|
358
|
-
? (
|
|
359
|
-
: 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.
|
|
286
|
+
: (0, polished_1.rgba)((0, polished_1.darken)(0.025, (0, polished_1.rgba)((0, colors_2.getPanelBackgroundColor)(theme), opacity)), opacity), hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition })
|
|
287
|
+
? getPanelHoverBorderColor(theme, { intent: intent, accentPosition: accentPosition })
|
|
288
|
+
: 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.getPanelBackgroundColor)(theme), opacity)), opacity))) : undefined;
|
|
360
289
|
}, function (_a) {
|
|
361
290
|
var raised = _a.raised, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
|
|
362
291
|
return raised && !hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) && styles_1.RaisedElement;
|
|
@@ -368,7 +297,7 @@ exports.StyledPanel = (0, styled_1.default)(Effect_1.StyledEffect).withConfig({
|
|
|
368
297
|
var disabled = _a.disabled;
|
|
369
298
|
return disabled && styles_1.DisabledElement;
|
|
370
299
|
});
|
|
371
|
-
exports.StyledPanelTitle =
|
|
300
|
+
exports.StyledPanelTitle = styled_components_1.default.div.withConfig({
|
|
372
301
|
shouldForwardProp: (0, styled_1.omitStyleProps)('opacity'),
|
|
373
302
|
})(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) {
|
|
374
303
|
var $descriptionBelow = _a.$descriptionBelow;
|
|
@@ -384,23 +313,23 @@ exports.StyledPanelTitle = styled_1.default.div.withConfig({
|
|
|
384
313
|
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);
|
|
385
314
|
}, function (_a) {
|
|
386
315
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
387
|
-
return (0, polished_1.rgba)((
|
|
316
|
+
return (0, polished_1.rgba)(getPanelHeaderColor(theme), opacity);
|
|
388
317
|
}, function (_a) {
|
|
389
318
|
var noHorizontalPadding = _a.noHorizontalPadding, size = _a.size, padded = _a.padded, opacity = _a.opacity, flat = _a.flat, intent = _a.intent;
|
|
390
319
|
return "".concat(opacity === 0 && flat && !intent ? 0 : getPaddingSize(padded, size), "px ").concat(noHorizontalPadding ? 0 : "".concat(getPaddingSize(padded, size), "px"));
|
|
391
320
|
}, function (_a) {
|
|
392
321
|
var theme = _a.theme, isCollapsed = _a.isCollapsed, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
393
322
|
return !isCollapsed && !flat && opacity
|
|
394
|
-
? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.
|
|
323
|
+
? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.getPanelHairlineColor)(theme), opacity))
|
|
395
324
|
: null;
|
|
396
325
|
}, sizes_1.GAP_FROM_SIZE.normal, exports.StyledPanelTitleHeaderContent, styles_1.INACTIVE_ICON_SCALE, function (_a) {
|
|
397
326
|
var collapsible = _a.collapsible;
|
|
398
327
|
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) {
|
|
399
328
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
400
|
-
return (0, polished_1.rgba)((
|
|
329
|
+
return (0, polished_1.rgba)(getPanelHeaderColor(theme, true), opacity);
|
|
401
330
|
});
|
|
402
331
|
});
|
|
403
|
-
exports.StyledPanelTopBar = (0,
|
|
332
|
+
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) {
|
|
404
333
|
var padded = _a.padded, size = _a.size, isCollapsed = _a.isCollapsed, minimal = _a.minimal;
|
|
405
334
|
return !padded || isCollapsed || !minimal
|
|
406
335
|
? "".concat(getPaddingSize(padded, size), "px")
|
|
@@ -441,13 +370,13 @@ exports.StyledPanelTopBar = (0, styled_1.default)(exports.StyledPanelTitle)(temp
|
|
|
441
370
|
: undefined;
|
|
442
371
|
}, function (_a) {
|
|
443
372
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
444
|
-
return (0, polished_1.rgba)((
|
|
373
|
+
return (0, polished_1.rgba)(getPanelHeaderColor(theme), opacity);
|
|
445
374
|
}, function (_a) {
|
|
446
375
|
var stickyHeader = _a.stickyHeader, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
447
376
|
return stickyHeader &&
|
|
448
377
|
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 "])));
|
|
449
378
|
});
|
|
450
|
-
exports.StyledPanelBottomActions = (0,
|
|
379
|
+
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) {
|
|
451
380
|
var padded = _a.padded, size = _a.size, minimal = _a.minimal;
|
|
452
381
|
return !padded || !minimal
|
|
453
382
|
? "".concat(getPaddingSize(padded, size), "px")
|
|
@@ -464,10 +393,10 @@ exports.StyledPanelBottomActions = (0, styled_1.default)(exports.StyledPanelTitl
|
|
|
464
393
|
}, function (_a) {
|
|
465
394
|
var theme = _a.theme, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
466
395
|
return !flat
|
|
467
|
-
? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.
|
|
396
|
+
? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.getPanelHairlineColor)(theme), opacity))
|
|
468
397
|
: null;
|
|
469
398
|
});
|
|
470
|
-
exports.StyledPanelContent =
|
|
399
|
+
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) {
|
|
471
400
|
var isCollapsed = _a.isCollapsed;
|
|
472
401
|
return (isCollapsed ? 'none !important' : undefined);
|
|
473
402
|
}, function (_a) {
|
|
@@ -484,7 +413,7 @@ exports.StyledPanelContent = styled_1.default.div(templateObject_29 || (template
|
|
|
484
413
|
/** The media frame. Its outer corners take the panel's inner curve, so the media is clipped to
|
|
485
414
|
* the panel's shape even where the panel cannot clip it (a sticky header makes the panel
|
|
486
415
|
* overflow visible). */
|
|
487
|
-
exports.StyledPanelMedia =
|
|
416
|
+
exports.StyledPanelMedia = styled_components_1.default.div(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n flex: 0 0 auto;\n position: relative;\n overflow: hidden;\n ", "\n\n > img,\n > video,\n > picture,\n > picture > img,\n > svg,\n > canvas,\n > iframe {\n display: block;\n width: 100%;\n max-width: 100%;\n border: 0;\n }\n\n > img,\n > video,\n > picture > img {\n height: auto;\n }\n\n ", "\n"], ["\n flex: 0 0 auto;\n position: relative;\n overflow: hidden;\n ", "\n\n > img,\n > video,\n > picture,\n > picture > img,\n > svg,\n > canvas,\n > iframe {\n display: block;\n width: 100%;\n max-width: 100%;\n border: 0;\n }\n\n > img,\n > video,\n > picture > img {\n height: auto;\n }\n\n ", "\n"])), function (_a) {
|
|
488
417
|
var $position = _a.$position, $radius = _a.$radius;
|
|
489
418
|
return $position === 'top'
|
|
490
419
|
? (0, styled_components_1.css)(templateObject_30 || (templateObject_30 = __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 "])), $radius, $radius) : (0, styled_components_1.css)(templateObject_31 || (templateObject_31 = __makeTemplateObject(["\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n "], ["\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n "])), $radius, $radius);
|
|
@@ -492,12 +421,12 @@ exports.StyledPanelMedia = styled_1.default.div(templateObject_33 || (templateOb
|
|
|
492
421
|
var $aspectRatio = _a.$aspectRatio;
|
|
493
422
|
return $aspectRatio !== undefined && (0, styled_components_1.css)(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n aspect-ratio: ", ";\n\n > img,\n > video,\n > picture,\n > picture > img,\n > svg,\n > canvas,\n > iframe {\n height: 100%;\n object-fit: cover;\n }\n "], ["\n aspect-ratio: ", ";\n\n > img,\n > video,\n > picture,\n > picture > img,\n > svg,\n > canvas,\n > iframe {\n height: 100%;\n object-fit: cover;\n }\n "])), $aspectRatio);
|
|
494
423
|
});
|
|
495
|
-
exports.StyledFloatingActions =
|
|
424
|
+
exports.StyledFloatingActions = styled_components_1.default.div(templateObject_34 || (templateObject_34 = __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) {
|
|
496
425
|
var size = _a.size;
|
|
497
426
|
return sizes_1.PADDING_FROM_SIZE[size];
|
|
498
427
|
}, function (_a) {
|
|
499
428
|
var theme = _a.theme;
|
|
500
|
-
return (0, polished_1.rgba)((0, colors_2.
|
|
429
|
+
return (0, polished_1.rgba)((0, colors_2.getPanelBackgroundColor)(theme), 1);
|
|
501
430
|
}, function (_a) {
|
|
502
431
|
var theme = _a.theme, flat = _a.flat, intent = _a.intent;
|
|
503
432
|
return flat && !intent
|
|
@@ -669,59 +598,6 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
|
669
598
|
}
|
|
670
599
|
setIsHovered(false);
|
|
671
600
|
}, []);
|
|
672
|
-
/* The way from the panel to its floating actions.
|
|
673
|
-
*
|
|
674
|
-
* The actions float above the panel's top-right corner, so a pointer heading for
|
|
675
|
-
* them from inside the panel leaves the panel through its top edge - usually to the
|
|
676
|
-
* LEFT of the actions, on a diagonal - and passes over what lies above the panel
|
|
677
|
-
* before it reaches them. Ending the hover the moment the pointer left the panel
|
|
678
|
-
* hid the actions on that way, and the click meant for them landed on what they had
|
|
679
|
-
* been covering (in reqraft's expression editor: the Visual / Text switch, so
|
|
680
|
-
* "Remove" switched the view instead).
|
|
681
|
-
*
|
|
682
|
-
* So while the pointer is in the strip between the panel's top edge and the top of
|
|
683
|
-
* the actions, across the panel's width, the hover stays; it ends when the pointer
|
|
684
|
-
* leaves that strip for anything that is neither the panel nor the actions. Decided
|
|
685
|
-
* by where the pointer IS, on each move - no timer to guess the time a person needs. */
|
|
686
|
-
var corridorUntrackRef = (0, react_2.useRef)(null);
|
|
687
|
-
var stopCorridor = (0, react_2.useCallback)(function () {
|
|
688
|
-
var _a;
|
|
689
|
-
(_a = corridorUntrackRef.current) === null || _a === void 0 ? void 0 : _a.call(corridorUntrackRef);
|
|
690
|
-
corridorUntrackRef.current = null;
|
|
691
|
-
}, []);
|
|
692
|
-
var inCorridor = (0, react_2.useCallback)(function (x, y) {
|
|
693
|
-
if (!panelRef.current || !floatingActionsRef.current)
|
|
694
|
-
return false;
|
|
695
|
-
if (floatingActionsRef.current.style.display === 'none')
|
|
696
|
-
return false;
|
|
697
|
-
var panelRect = panelRef.current.getBoundingClientRect();
|
|
698
|
-
var actionsRect = floatingActionsRef.current.getBoundingClientRect();
|
|
699
|
-
return (x >= Math.min(panelRect.left, actionsRect.left) &&
|
|
700
|
-
x <= Math.max(panelRect.right, actionsRect.right) &&
|
|
701
|
-
y >= actionsRect.top &&
|
|
702
|
-
y <= panelRect.top + 1);
|
|
703
|
-
}, []);
|
|
704
|
-
var followCorridor = (0, react_2.useCallback)(function () {
|
|
705
|
-
stopCorridor();
|
|
706
|
-
var onMove = function (event) {
|
|
707
|
-
var _a, _b;
|
|
708
|
-
var target = event.target instanceof Node ? event.target : null;
|
|
709
|
-
// reached the actions or came back into the panel: their own handlers take over
|
|
710
|
-
if (target &&
|
|
711
|
-
(((_a = floatingActionsRef.current) === null || _a === void 0 ? void 0 : _a.contains(target)) || ((_b = panelRef.current) === null || _b === void 0 ? void 0 : _b.contains(target)))) {
|
|
712
|
-
stopCorridor();
|
|
713
|
-
return;
|
|
714
|
-
}
|
|
715
|
-
if (!inCorridor(event.clientX, event.clientY)) {
|
|
716
|
-
stopCorridor();
|
|
717
|
-
cancelHover();
|
|
718
|
-
}
|
|
719
|
-
};
|
|
720
|
-
document.addEventListener('mousemove', onMove, true);
|
|
721
|
-
corridorUntrackRef.current = function () { return document.removeEventListener('mousemove', onMove, true); };
|
|
722
|
-
}, [cancelHover, inCorridor, stopCorridor]);
|
|
723
|
-
// a corridor followed when the panel goes is followed no more
|
|
724
|
-
(0, react_2.useEffect)(function () { return stopCorridor; }, [stopCorridor]);
|
|
725
601
|
var handleMouseLeave = (0, react_2.useCallback)(function (e) {
|
|
726
602
|
var _a;
|
|
727
603
|
if (floatingActions) {
|
|
@@ -731,15 +607,10 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
|
731
607
|
floatingActionsRef.current.contains(relatedTarget)) {
|
|
732
608
|
return;
|
|
733
609
|
}
|
|
734
|
-
|
|
735
|
-
followCorridor();
|
|
736
|
-
}
|
|
737
|
-
else {
|
|
738
|
-
cancelHover();
|
|
739
|
-
}
|
|
610
|
+
cancelHover();
|
|
740
611
|
}
|
|
741
612
|
(_a = rest.onMouseLeave) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
742
|
-
}, [floatingActions, rest.onMouseLeave, cancelHover
|
|
613
|
+
}, [floatingActions, rest.onMouseLeave, cancelHover]);
|
|
743
614
|
var handleFloatingActionsMouseLeave = (0, react_2.useCallback)(function (e) {
|
|
744
615
|
var relatedTarget = e.relatedTarget;
|
|
745
616
|
if (panelRef.current &&
|
|
@@ -747,13 +618,8 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
|
747
618
|
panelRef.current.contains(relatedTarget)) {
|
|
748
619
|
return;
|
|
749
620
|
}
|
|
750
|
-
// back towards the panel through the strip between them
|
|
751
|
-
if (inCorridor(e.clientX, e.clientY)) {
|
|
752
|
-
followCorridor();
|
|
753
|
-
return;
|
|
754
|
-
}
|
|
755
621
|
cancelHover();
|
|
756
|
-
}, [cancelHover
|
|
622
|
+
}, [cancelHover]);
|
|
757
623
|
/* The panel renders as re-resizable's `Resizable` when it is resizable — unless the caller
|
|
758
624
|
gave its own element in `as`, which always wins. (`rest.as || cond ? Resizable : 'div'`
|
|
759
625
|
binds as `(rest.as || cond) ? …`, so a panel given `as` used to render a `Resizable`.) */
|