@qoretechnologies/reqore 0.78.10 → 0.78.11-pr.723.g4423093

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.
Files changed (174) hide show
  1. package/dist/components/Accordion/index.d.ts.map +1 -1
  2. package/dist/components/Accordion/index.js +60 -14
  3. package/dist/components/Accordion/index.js.map +1 -1
  4. package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
  5. package/dist/components/Breadcrumbs/index.js +58 -21
  6. package/dist/components/Breadcrumbs/index.js.map +1 -1
  7. package/dist/components/Bubble/index.d.ts.map +1 -1
  8. package/dist/components/Bubble/index.js +13 -4
  9. package/dist/components/Bubble/index.js.map +1 -1
  10. package/dist/components/Button/index.d.ts +67 -0
  11. package/dist/components/Button/index.d.ts.map +1 -1
  12. package/dist/components/Button/index.js +238 -98
  13. package/dist/components/Button/index.js.map +1 -1
  14. package/dist/components/Callout/index.d.ts.map +1 -1
  15. package/dist/components/Callout/index.js +49 -29
  16. package/dist/components/Callout/index.js.map +1 -1
  17. package/dist/components/Checkbox/index.d.ts.map +1 -1
  18. package/dist/components/Checkbox/index.js +112 -36
  19. package/dist/components/Checkbox/index.js.map +1 -1
  20. package/dist/components/CollapsibleContent/index.d.ts.map +1 -1
  21. package/dist/components/CollapsibleContent/index.js +6 -2
  22. package/dist/components/CollapsibleContent/index.js.map +1 -1
  23. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  24. package/dist/components/ControlGroup/index.js +22 -1
  25. package/dist/components/ControlGroup/index.js.map +1 -1
  26. package/dist/components/DataView/index.d.ts.map +1 -1
  27. package/dist/components/DataView/index.js +13 -10
  28. package/dist/components/DataView/index.js.map +1 -1
  29. package/dist/components/DescriptionList/index.d.ts.map +1 -1
  30. package/dist/components/DescriptionList/index.js +30 -4
  31. package/dist/components/DescriptionList/index.js.map +1 -1
  32. package/dist/components/Drawer/index.d.ts.map +1 -1
  33. package/dist/components/Drawer/index.js +41 -25
  34. package/dist/components/Drawer/index.js.map +1 -1
  35. package/dist/components/Dropdown/list.d.ts.map +1 -1
  36. package/dist/components/Dropdown/list.js +19 -14
  37. package/dist/components/Dropdown/list.js.map +1 -1
  38. package/dist/components/Effect/index.d.ts +37 -0
  39. package/dist/components/Effect/index.d.ts.map +1 -1
  40. package/dist/components/Effect/index.js +224 -58
  41. package/dist/components/Effect/index.js.map +1 -1
  42. package/dist/components/EntityRow/index.d.ts.map +1 -1
  43. package/dist/components/EntityRow/index.js +98 -59
  44. package/dist/components/EntityRow/index.js.map +1 -1
  45. package/dist/components/FeatureCard/index.d.ts.map +1 -1
  46. package/dist/components/FeatureCard/index.js +54 -21
  47. package/dist/components/FeatureCard/index.js.map +1 -1
  48. package/dist/components/Header/index.d.ts.map +1 -1
  49. package/dist/components/Header/index.js +7 -4
  50. package/dist/components/Header/index.js.map +1 -1
  51. package/dist/components/Icon/index.d.ts.map +1 -1
  52. package/dist/components/Icon/index.js +13 -3
  53. package/dist/components/Icon/index.js.map +1 -1
  54. package/dist/components/Input/index.d.ts +44 -1
  55. package/dist/components/Input/index.d.ts.map +1 -1
  56. package/dist/components/Input/index.js +89 -23
  57. package/dist/components/Input/index.js.map +1 -1
  58. package/dist/components/InputClearButton/index.d.ts +7 -2
  59. package/dist/components/InputClearButton/index.d.ts.map +1 -1
  60. package/dist/components/InputClearButton/index.js +12 -5
  61. package/dist/components/InputClearButton/index.js.map +1 -1
  62. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  63. package/dist/components/InternalPopover/index.js +19 -10
  64. package/dist/components/InternalPopover/index.js.map +1 -1
  65. package/dist/components/Link/index.d.ts.map +1 -1
  66. package/dist/components/Link/index.js +6 -1
  67. package/dist/components/Link/index.js.map +1 -1
  68. package/dist/components/Menu/divider.d.ts.map +1 -1
  69. package/dist/components/Menu/divider.js +8 -3
  70. package/dist/components/Menu/divider.js.map +1 -1
  71. package/dist/components/Menu/index.d.ts.map +1 -1
  72. package/dist/components/Menu/index.js +17 -4
  73. package/dist/components/Menu/index.js.map +1 -1
  74. package/dist/components/Message/index.d.ts.map +1 -1
  75. package/dist/components/Message/index.js +20 -4
  76. package/dist/components/Message/index.js.map +1 -1
  77. package/dist/components/NavRail/index.d.ts +2 -0
  78. package/dist/components/NavRail/index.d.ts.map +1 -1
  79. package/dist/components/NavRail/index.js +120 -40
  80. package/dist/components/NavRail/index.js.map +1 -1
  81. package/dist/components/Notifications/notification.d.ts +6 -2
  82. package/dist/components/Notifications/notification.d.ts.map +1 -1
  83. package/dist/components/Notifications/notification.js +78 -18
  84. package/dist/components/Notifications/notification.js.map +1 -1
  85. package/dist/components/Notifications/styles.d.ts +20 -0
  86. package/dist/components/Notifications/styles.d.ts.map +1 -1
  87. package/dist/components/Notifications/styles.js +37 -9
  88. package/dist/components/Notifications/styles.js.map +1 -1
  89. package/dist/components/Panel/index.d.ts +3 -0
  90. package/dist/components/Panel/index.d.ts.map +1 -1
  91. package/dist/components/Panel/index.js +214 -153
  92. package/dist/components/Panel/index.js.map +1 -1
  93. package/dist/components/Paragraph/index.d.ts.map +1 -1
  94. package/dist/components/Paragraph/index.js +8 -5
  95. package/dist/components/Paragraph/index.js.map +1 -1
  96. package/dist/components/Progress/index.d.ts.map +1 -1
  97. package/dist/components/Progress/index.js +1 -1
  98. package/dist/components/Progress/index.js.map +1 -1
  99. package/dist/components/Rating/index.d.ts.map +1 -1
  100. package/dist/components/Rating/index.js +20 -8
  101. package/dist/components/Rating/index.js.map +1 -1
  102. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  103. package/dist/components/RichTextEditor/index.js +89 -46
  104. package/dist/components/RichTextEditor/index.js.map +1 -1
  105. package/dist/components/SegmentedControl/index.d.ts.map +1 -1
  106. package/dist/components/SegmentedControl/index.js +87 -42
  107. package/dist/components/SegmentedControl/index.js.map +1 -1
  108. package/dist/components/SeverityRow/index.d.ts.map +1 -1
  109. package/dist/components/SeverityRow/index.js +1 -1
  110. package/dist/components/SeverityRow/index.js.map +1 -1
  111. package/dist/components/Span/index.d.ts.map +1 -1
  112. package/dist/components/Span/index.js +8 -5
  113. package/dist/components/Span/index.js.map +1 -1
  114. package/dist/components/StackedBar/index.d.ts.map +1 -1
  115. package/dist/components/StackedBar/index.js +42 -12
  116. package/dist/components/StackedBar/index.js.map +1 -1
  117. package/dist/components/Statistic/index.d.ts.map +1 -1
  118. package/dist/components/Statistic/index.js +34 -6
  119. package/dist/components/Statistic/index.js.map +1 -1
  120. package/dist/components/Table/cell.d.ts.map +1 -1
  121. package/dist/components/Table/cell.js +72 -41
  122. package/dist/components/Table/cell.js.map +1 -1
  123. package/dist/components/Table/headerCell.d.ts.map +1 -1
  124. package/dist/components/Table/headerCell.js +7 -5
  125. package/dist/components/Table/headerCell.js.map +1 -1
  126. package/dist/components/Tag/index.d.ts +70 -3
  127. package/dist/components/Tag/index.d.ts.map +1 -1
  128. package/dist/components/Tag/index.js +233 -67
  129. package/dist/components/Tag/index.js.map +1 -1
  130. package/dist/components/Testimonial/index.d.ts.map +1 -1
  131. package/dist/components/Testimonial/index.js +35 -20
  132. package/dist/components/Testimonial/index.js.map +1 -1
  133. package/dist/components/Textarea/index.d.ts +6 -0
  134. package/dist/components/Textarea/index.d.ts.map +1 -1
  135. package/dist/components/Textarea/index.js +20 -20
  136. package/dist/components/Textarea/index.js.map +1 -1
  137. package/dist/components/Timeline/index.d.ts +2 -0
  138. package/dist/components/Timeline/index.d.ts.map +1 -1
  139. package/dist/components/Timeline/index.js +56 -13
  140. package/dist/components/Timeline/index.js.map +1 -1
  141. package/dist/components/Tree/index.d.ts.map +1 -1
  142. package/dist/components/Tree/index.js +24 -20
  143. package/dist/components/Tree/index.js.map +1 -1
  144. package/dist/containers/UIProvider.d.ts +10 -0
  145. package/dist/containers/UIProvider.d.ts.map +1 -1
  146. package/dist/containers/UIProvider.js +33 -4
  147. package/dist/containers/UIProvider.js.map +1 -1
  148. package/dist/context/SurfaceContext.d.ts +18 -0
  149. package/dist/context/SurfaceContext.d.ts.map +1 -0
  150. package/dist/context/SurfaceContext.js +39 -0
  151. package/dist/context/SurfaceContext.js.map +1 -0
  152. package/dist/helpers/colors.d.ts +184 -2
  153. package/dist/helpers/colors.d.ts.map +1 -1
  154. package/dist/helpers/colors.js +739 -86
  155. package/dist/helpers/colors.js.map +1 -1
  156. package/dist/helpers/iconProps.d.ts +14 -0
  157. package/dist/helpers/iconProps.d.ts.map +1 -0
  158. package/dist/helpers/iconProps.js +33 -0
  159. package/dist/helpers/iconProps.js.map +1 -0
  160. package/dist/helpers/surface.d.ts +31 -0
  161. package/dist/helpers/surface.d.ts.map +1 -0
  162. package/dist/helpers/surface.js +87 -0
  163. package/dist/helpers/surface.js.map +1 -0
  164. package/dist/hooks/useDrawnSurface.d.ts +38 -0
  165. package/dist/hooks/useDrawnSurface.d.ts.map +1 -0
  166. package/dist/hooks/useDrawnSurface.js +48 -0
  167. package/dist/hooks/useDrawnSurface.js.map +1 -0
  168. package/dist/index.d.ts +2 -0
  169. package/dist/index.d.ts.map +1 -1
  170. package/dist/index.js +5 -2
  171. package/dist/index.js.map +1 -1
  172. package/package.json +2 -1
  173. package/vitest.config.ts +10 -0
  174. package/tests.json +0 -1
@@ -86,9 +86,11 @@ var styled_components_1 = require("styled-components");
86
86
  var colors_1 = require("../../constants/colors");
87
87
  var sizes_1 = require("../../constants/sizes");
88
88
  var colors_2 = require("../../helpers/colors");
89
+ var SurfaceContext_1 = require("../../context/SurfaceContext");
89
90
  var styled_1 = __importStar(require("../../helpers/styled"));
90
91
  var utils_1 = require("../../helpers/utils");
91
92
  var hoveringPointer_1 = require("../../helpers/hoveringPointer");
93
+ var iconProps_1 = require("../../helpers/iconProps");
92
94
  var useCombinedRefs_1 = require("../../hooks/useCombinedRefs");
93
95
  var useReqoreContext_1 = require("../../hooks/useReqoreContext");
94
96
  var useFitTextSize_1 = require("../../hooks/useFitTextSize");
@@ -107,6 +109,7 @@ var Span_1 = require("../Span");
107
109
  var TooltipComponent_1 = require("../TooltipComponent");
108
110
  var LabelEditor_1 = require("./LabelEditor");
109
111
  var NonResponsiveActions_1 = require("./NonResponsiveActions");
112
+ var surface_1 = require("../../helpers/surface");
110
113
  var getPaddingSize = function (padded, size) {
111
114
  return typeof padded === 'string' ? sizes_1.SPECIAL_PADDING_FROM_SIZE[padded] : sizes_1.PADDING_FROM_SIZE[size];
112
115
  };
@@ -192,7 +195,7 @@ var getWidthAboveMinimum = function (element) {
192
195
  return Math.max(0, width - minimum);
193
196
  };
194
197
  exports.StyledPanelTitleHeader = styled_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"])));
195
- exports.StyledPanelTitleHeaderContent = styled_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) {
198
+ exports.StyledPanelTitleHeaderContent = styled_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 /* Rendered as a link (labelProps.as), the title keeps the panel's text color: the browser's link blue is\n 1.1:1 on the dark theme. */\n color: inherit;\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 /* Rendered as a link (labelProps.as), the title keeps the panel's text color: the browser's link blue is\n 1.1:1 on the dark theme. */\n color: inherit;\n ", "\n flex: 0 1 auto;\n overflow: hidden;\n min-width: ", "px;\n"])), function (_a) {
196
199
  var $hasOuterIcon = _a.$hasOuterIcon;
197
200
  return ($hasOuterIcon ? 'grid' : 'flex');
198
201
  }, function (_a) {
@@ -325,6 +328,14 @@ exports.REQORE_PANEL_STYLE_PROPS = (0, styled_1.listReqoreStyleProps)({
325
328
  unMountContentOnCollapse: true,
326
329
  wrapperPadding: true,
327
330
  });
331
+ /** A panel's fill at `opacity`: what its styled rule paints and what it hands what it holds as its surface. */
332
+ var getPanelFill = function (theme, opacity) {
333
+ return (0, colors_2.fadeColor)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
334
+ };
335
+ /** A panel's title and top bar fill at `opacity`, painted and handed down alike. */
336
+ var getPanelBarFill = function (theme, opacity) {
337
+ return (0, colors_2.fadeColor)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
338
+ };
328
339
  exports.StyledPanel = (0, styled_1.default)(Effect_1.StyledEffect).withConfig({
329
340
  // Its own props, `interactive` (set by the panel for its hover styles) and the layout flags a
330
341
  // containing ControlGroup hands it — except `size`, which a panel never forwards but a
@@ -332,7 +343,7 @@ exports.StyledPanel = (0, styled_1.default)(Effect_1.StyledEffect).withConfig({
332
343
  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)),
333
344
  })(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) {
334
345
  var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
335
- return (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
346
+ return getPanelFill(theme, opacity);
336
347
  }, function (_a) {
337
348
  var rounded = _a.rounded, radiusSize = _a.radiusSize;
338
349
  return rounded ? (0, sizes_1.resolveRadius)('normal', radiusSize) : 0;
@@ -342,8 +353,8 @@ exports.StyledPanel = (0, styled_1.default)(Effect_1.StyledEffect).withConfig({
342
353
  ? "1px solid ".concat((0, colors_2.changeLightness)(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.08))
343
354
  : undefined;
344
355
  }, function (_a) {
345
- var theme = _a.theme;
346
- return (0, colors_2.getReadableColor)(theme, undefined, undefined, true);
356
+ var theme = _a.theme, $color = _a.$color;
357
+ return $color !== null && $color !== void 0 ? $color : (0, colors_2.getReadableColor)(theme, undefined, undefined, true);
347
358
  }, function (_a) {
348
359
  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;
349
360
  if (!accentPosition) {
@@ -387,9 +398,9 @@ exports.StyledPanel = (0, styled_1.default)(Effect_1.StyledEffect).withConfig({
387
398
  return interactive
388
399
  ? (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
389
400
  ? undefined
390
- : (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 })
401
+ : (0, colors_2.fadeColor)((0, polished_1.darken)(0.025, (0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03)), opacity), hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition })
391
402
  ? (0, colors_2.changeLightness)(getPanelBorderBaseColor(theme, { intent: intent, accentPosition: accentPosition }), 0.25)
392
- : 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;
403
+ : 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, colors_2.fadeColor)((0, polished_1.darken)(0.025, (0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03)), opacity))) : undefined;
393
404
  }, function (_a) {
394
405
  var raised = _a.raised, flat = _a.flat, intent = _a.intent, accentPosition = _a.accentPosition;
395
406
  return raised && !hasPanelBorder({ flat: flat, intent: intent, accentPosition: accentPosition }) && styles_1.RaisedElement;
@@ -417,23 +428,26 @@ exports.StyledPanelTitle = styled_1.default.div.withConfig({
417
428
  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);
418
429
  }, function (_a) {
419
430
  var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
420
- return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
431
+ return getPanelBarFill(theme, opacity);
421
432
  }, function (_a) {
422
433
  var noHorizontalPadding = _a.noHorizontalPadding, size = _a.size, padded = _a.padded, opacity = _a.opacity, flat = _a.flat, intent = _a.intent;
423
434
  return "".concat(opacity === 0 && flat && !intent ? 0 : getPaddingSize(padded, size), "px ").concat(noHorizontalPadding ? 0 : "".concat(getPaddingSize(padded, size), "px"));
424
435
  }, function (_a) {
425
436
  var theme = _a.theme, isCollapsed = _a.isCollapsed, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
426
437
  return !isCollapsed && !flat && opacity
427
- ? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08), opacity))
438
+ ? "1px solid ".concat((0, colors_2.fadeColor)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08), opacity))
428
439
  : null;
429
440
  }, sizes_1.GAP_FROM_SIZE.normal, exports.StyledPanelTitleHeaderContent, styles_1.INACTIVE_ICON_SCALE, function (_a) {
430
441
  var collapsible = _a.collapsible;
431
442
  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) {
432
443
  var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
433
- return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.05), opacity);
444
+ return (0, colors_2.fadeColor)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.05), opacity);
434
445
  });
435
446
  });
436
- exports.StyledPanelTopBar = (0, styled_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) {
447
+ exports.StyledPanelTopBar = (0, styled_1.default)(exports.StyledPanelTitle)(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n /* What the bar holds that sets no color of its own (its icon) is written in the bar's text, read on the bar's\n fill. The panel's own text is read on its content, which it paints a step darker than the bar: on a mid grey\n the two are different colors. */\n color: ", ";\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 /* What the bar holds that sets no color of its own (its icon) is written in the bar's text, read on the bar's\n fill. The panel's own text is read on its content, which it paints a step darker than the bar: on a mid grey\n the two are different colors. */\n color: ", ";\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) {
448
+ var $color = _a.$color;
449
+ return $color;
450
+ }, function (_a) {
437
451
  var padded = _a.padded, size = _a.size, isCollapsed = _a.isCollapsed, minimal = _a.minimal;
438
452
  return !padded || isCollapsed || !minimal
439
453
  ? "".concat(getPaddingSize(padded, size), "px")
@@ -474,7 +488,7 @@ exports.StyledPanelTopBar = (0, styled_1.default)(exports.StyledPanelTitle)(temp
474
488
  : undefined;
475
489
  }, function (_a) {
476
490
  var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
477
- return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
491
+ return getPanelBarFill(theme, opacity);
478
492
  }, function (_a) {
479
493
  var stickyHeader = _a.stickyHeader, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
480
494
  return stickyHeader &&
@@ -497,7 +511,7 @@ exports.StyledPanelBottomActions = (0, styled_1.default)(exports.StyledPanelTitl
497
511
  }, function (_a) {
498
512
  var theme = _a.theme, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
499
513
  return !flat
500
- ? "1px solid ".concat((0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08), opacity))
514
+ ? "1px solid ".concat((0, colors_2.fadeColor)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08), opacity))
501
515
  : null;
502
516
  });
503
517
  exports.StyledPanelContent = styled_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 /* Under a sticky header the body scrolls beneath it, and whatever in the body was positioned with a\n z-index as high as the header's (2) was drawn over it: a table's pinned columns are sticky at 2, and\n come later in the document. A stacking context of its own puts everything in the body in one layer\n under the header, whatever z-index it is given. It is not a containing block, so nothing in the body\n is placed differently; popovers and menus are drawn outside the panel and stay above it. */\n isolation: ", ";\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 /* Under a sticky header the body scrolls beneath it, and whatever in the body was positioned with a\n z-index as high as the header's (2) was drawn over it: a table's pinned columns are sticky at 2, and\n come later in the document. A stacking context of its own puts everything in the body in one layer\n under the header, whatever z-index it is given. It is not a containing block, so nothing in the body\n is placed differently; popovers and menus are drawn outside the panel and stay above it. */\n isolation: ", ";\n"])), function (_a) {
@@ -555,13 +569,15 @@ exports.ReqorePanelSkeleton = (0, react_2.memo)(function (_a) {
555
569
  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 &&
556
570
  (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' }) })))] }));
557
571
  });
572
+ /** A description given no effect: one object, so what is made from it holds from render to render. */
573
+ var NO_DESCRIPTION_EFFECT = {};
558
574
  exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
559
- var _b, _c;
560
- 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, floatingActionsProp = _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, media = _a.media, _5 = _a.mediaAlt, mediaAlt = _5 === void 0 ? '' : _5, _6 = _a.mediaPosition, mediaPosition = _6 === void 0 ? 'top' : _6, mediaAspectRatio = _a.mediaAspectRatio, mediaProps = _a.mediaProps, 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", "media", "mediaAlt", "mediaPosition", "mediaAspectRatio", "mediaProps"]);
575
+ var _b, _c, _d;
576
+ var children = _a.children, label = _a.label, description = _a.description, _e = _a.collapseButtonProps, collapseButtonProps = _e === void 0 ? {} : _e, collapsible = _a.collapsible, onClose = _a.onClose, _f = _a.closeButtonProps, closeButtonProps = _f === void 0 ? {} : _f, _g = _a.rounded, rounded = _g === void 0 ? true : _g, _h = _a.actions, actions = _h === void 0 ? [] : _h, _j = _a.bottomActions, bottomActions = _j === void 0 ? [] : _j, isCollapsed = _a.isCollapsed, customTheme = _a.customTheme, inheritCustomTheme = _a.inheritCustomTheme, icon = _a.icon, iconImage = _a.iconImage, _k = _a.iconWithLabel, iconWithLabel = _k === void 0 ? false : _k, _l = _a.iconVerticalAlign, iconVerticalAlign = _l === void 0 ? 'center' : _l, intent = _a.intent, className = _a.className, flat = _a.flat, _m = _a.unMountContentOnCollapse, unMountContentOnCollapse = _m === void 0 ? true : _m, onCollapseChange = _a.onCollapseChange, _o = _a.padded, padded = _o === void 0 ? true : _o, _p = _a.wrapperPadding, wrapperPadding = _p === void 0 ? 'both' : _p, contentStyle = _a.contentStyle, contentEffect = _a.contentEffect, _q = _a.labelEffect, labelEffect = _q === void 0 ? {} : _q, _r = _a.descriptionEffect, descriptionEffect = _r === void 0 ? NO_DESCRIPTION_EFFECT : _r, descriptionIntent = _a.descriptionIntent, labelSize = _a.labelSize, contentSize = _a.contentSize, minimal = _a.minimal, badge = _a.badge, iconColor = _a.iconColor, _s = _a.iconProps, iconProps = _s === void 0 ? {} : _s, fluid = _a.fluid, _t = _a.responsiveActions, responsiveActions = _t === void 0 ? true : _t, _u = _a.responsiveTitle, responsiveTitle = _u === void 0 ? true : _u, _v = _a.compactTitle, compactTitle = _v === void 0 ? false : _v, _w = _a.fitLabel, fitLabel = _w === void 0 ? true : _w, _x = _a.labelMaxLines, labelMaxLines = _x === void 0 ? 2 : _x, _y = _a.descriptionPosition, descriptionPosition = _y === void 0 ? 'inline' : _y, _z = _a.descriptionMaxLines, descriptionMaxLines = _z === void 0 ? 2 : _z, labelMinTextSize = _a.labelMinTextSize, _0 = _a.size, panelSize = _0 === void 0 ? 'normal' : _0, getContentRef = _a.getContentRef, _1 = _a.labelProps, labelProps = _1 === void 0 ? {} : _1, disabled = _a.disabled, breadcrumbs = _a.breadcrumbs, _2 = _a.showActionsWhenCollapsed, showActionsWhenCollapsed = _2 === void 0 ? true : _2, 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, floatingActionsProp = _a.floatingActions, _3 = _a.collapseTooltip, collapseTooltip = _3 === void 0 ? 'Collapse' : _3, _4 = _a.expandTooltip, expandTooltip = _4 === void 0 ? 'Expand' : _4, _5 = _a.closeTooltip, closeTooltip = _5 === void 0 ? 'Close' : _5, accentPosition = _a.accentPosition, accentSize = _a.accentSize, media = _a.media, _6 = _a.mediaAlt, mediaAlt = _6 === void 0 ? '' : _6, _7 = _a.mediaPosition, mediaPosition = _7 === void 0 ? 'top' : _7, mediaAspectRatio = _a.mediaAspectRatio, mediaProps = _a.mediaProps, 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", "media", "mediaAlt", "mediaPosition", "mediaAspectRatio", "mediaProps"]);
561
577
  // Resolved ONCE, here — the accent styles interpolate px and reserve padding,
562
578
  // so they must only ever see a number. Shared with ReqoreCallout.
563
579
  var accentSizePx = (0, react_2.useMemo)(function () { return (0, utils_1.resolveAccentSize)(accentSize); }, [accentSize]);
564
- var _7 = (0, react_2.useState)(isCollapsed || false), _isCollapsed = _7[0], setIsCollapsed = _7[1];
580
+ var _8 = (0, react_2.useState)(isCollapsed || false), _isCollapsed = _8[0], setIsCollapsed = _8[1];
565
581
  var primaryContentGradient = (0, Effect_1.getPrimaryGradient)(contentEffect === null || contentEffect === void 0 ? void 0 : contentEffect.gradient);
566
582
  var primaryContentColors = primaryContentGradient && typeof primaryContentGradient.colors === 'object'
567
583
  ? primaryContentGradient.colors
@@ -584,8 +600,8 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
584
600
  var isHoverCapable = (0, useReqoreContext_1.useReqoreProperty)('isHoverCapable');
585
601
  var floatingActions = !!floatingActionsProp && isHoverCapable !== false;
586
602
  var setRef = (0, useCombinedRefs_1.useCombinedRefs)(ref).setRef;
587
- var _8 = (0, react_use_1.useMeasure)(), measureRef = _8[0], width = _8[1].width;
588
- var _9 = (0, react_2.useState)(false), _isHovered = _9[0], setIsHovered = _9[1];
603
+ var _9 = (0, react_use_1.useMeasure)(), measureRef = _9[0], width = _9[1].width;
604
+ var _10 = (0, react_2.useState)(false), _isHovered = _10[0], setIsHovered = _10[1];
589
605
  var floatingActionsRef = (0, react_2.useRef)(null);
590
606
  var panelRef = (0, react_2.useRef)(null);
591
607
  var hoverTimerRef = (0, react_2.useRef)(null);
@@ -603,8 +619,8 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
603
619
  // triggers it. Only wired when `stickyHeader` is on, so ordinary panels pay
604
620
  // nothing.
605
621
  var stickySentinelRef = (0, react_2.useRef)(null);
606
- var _10 = (0, react_2.useState)(false), isHeaderStuck = _10[0], setIsHeaderStuck = _10[1];
607
- var _11 = (0, react_2.useState)(0), stickyInset = _11[0], setStickyInset = _11[1];
622
+ var _11 = (0, react_2.useState)(false), isHeaderStuck = _11[0], setIsHeaderStuck = _11[1];
623
+ var _12 = (0, react_2.useState)(0), stickyInset = _12[0], setStickyInset = _12[1];
608
624
  (0, react_2.useEffect)(function () {
609
625
  var _a;
610
626
  if (!rest.stickyHeader) {
@@ -1045,6 +1061,36 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
1045
1061
  }, [intent, theme, contentEffect, interactive]);
1046
1062
  var opacity = rest.transparent ? 0 : rest.opacity;
1047
1063
  var noHorizontalPadding = opacity === 0 && flat && !intent && !rest.raised;
1064
+ /* What the panel holds is drawn on the panel - its content on the panel's background, its
1065
+ title bar and bottom actions on the bar's - and is told so, to pick its text and icons
1066
+ against that rather than the page. */
1067
+ var aroundSurface = (0, SurfaceContext_1.useReqoreSurface)();
1068
+ // a panel drawn at no opacity is on what is around it: what a component there says, or its customTheme's main
1069
+ var surface = (0, react_2.useMemo)(function () { return (0, surface_1.getUnpaintedSurface)(theme, customTheme, aroundSurface, opacity === 0); }, [theme, customTheme, aroundSurface, opacity]);
1070
+ var contentSurface = (0, react_2.useMemo)(function () {
1071
+ return (0, colors_2.getDrawnColor)(getPanelFill(theme, opacity !== null && opacity !== void 0 ? opacity : 1), (0, colors_2.getThemeSurface)(theme, surface));
1072
+ }, [theme, opacity, surface]);
1073
+ /* each color of the content's gradient, when its effect draws one: for as long as its colors hold, not the
1074
+ effect object - one given inline is new on every render, and so was every surface the panel hands down */
1075
+ var contentGradientKey = JSON.stringify((_b = transformedContentEffect === null || transformedContentEffect === void 0 ? void 0 : transformedContentEffect.gradient) !== null && _b !== void 0 ? _b : null);
1076
+ var contentSurfaces = (0, react_2.useMemo)(function () {
1077
+ return (0, Effect_1.getEffectBackgrounds)(theme, transformedContentEffect, contentSurface, (0, colors_2.getThemeSurface)(theme, surface));
1078
+ }, [theme, contentGradientKey, contentSurface, surface]);
1079
+ var barSurface = (0, react_2.useMemo)(function () {
1080
+ return contentSurfaces.map(function (under) {
1081
+ return (0, colors_2.getDrawnColor)(getPanelBarFill(theme, minimal ? 0 : (opacity !== null && opacity !== void 0 ? opacity : 1)), under);
1082
+ });
1083
+ }, [theme, minimal, opacity, contentSurfaces]);
1084
+ // The bar's description and icon fade only as far as they stay readable there.
1085
+ var barText = (0, react_2.useMemo)(function () { return (0, colors_2.getReadableTextOn)(theme, barSurface); }, [theme, barSurface]);
1086
+ /* The panel's own text (what it holds that sets no color of its own) is read on what its content is drawn on, as
1087
+ what it holds is - not on the theme's main, which it does not paint: it paints it a step darker, and at less
1088
+ than full opacity barely at all. On a mid grey the step alone decides which text reads. */
1089
+ var panelText = (0, react_2.useMemo)(function () { return (0, colors_2.getReadableTextOn)(theme, contentSurfaces); }, [theme, contentSurfaces]);
1090
+ // the title icon's own color: in its props (which win, as they are spread over the rest), else the panel's
1091
+ var _13 = (0, iconProps_1.splitIconColor)(iconProps), titleIconPropsColor = _13[0], titleIconRest = _13[1];
1092
+ var titleIconOwn = titleIconPropsColor || iconColor;
1093
+ var titleIconLook = (0, react_2.useMemo)(function () { return (0, colors_2.getReadableIconLook)(theme, barSurface, barText, colors_1.CONTROL_ICON_OPACITY, titleIconOwn); }, [theme, barSurface, barText, titleIconOwn]);
1048
1094
  // The media frame's outer corners follow the panel's INNER curve: its radius, less the 1px
1049
1095
  // border when it draws one — the same inset the sticky header and the accent strip take.
1050
1096
  var mediaRadius = rounded
@@ -1076,7 +1122,7 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
1076
1122
  * The title's natural size in px, from the heading level it renders at — the same
1077
1123
  * `labelSize || HEADER_SIZE_TO_NUMBER[panelSize]` the icon is sized from.
1078
1124
  */
1079
- 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];
1125
+ var labelNaturalPx = (_c = sizes_1.HEADER_LEVEL_TO_PX[labelSize || sizes_1.HEADER_SIZE_TO_NUMBER[panelSize]]) !== null && _c !== void 0 ? _c : sizes_1.HEADER_LEVEL_TO_PX[3];
1080
1126
  /**
1081
1127
  * SECOND thing to give: the title's size. Once the actions are down to icons and the
1082
1128
  * row is still short, the title shrinks toward a floor rather than dropping characters
@@ -1106,8 +1152,8 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
1106
1152
  * way it always has. When it IS cut, that same click must not reach the bar — opening the
1107
1153
  * text and folding the panel away in one gesture is the worst of both.
1108
1154
  */
1109
- var _12 = (0, react_2.useState)(false), isDescriptionExpanded = _12[0], setIsDescriptionExpanded = _12[1];
1110
- var _13 = (0, react_2.useState)(false), isDescriptionTruncated = _13[0], setIsDescriptionTruncated = _13[1];
1155
+ var _14 = (0, react_2.useState)(false), isDescriptionExpanded = _14[0], setIsDescriptionExpanded = _14[1];
1156
+ var _15 = (0, react_2.useState)(false), isDescriptionTruncated = _15[0], setIsDescriptionTruncated = _15[1];
1111
1157
  var descriptionRef = (0, react_2.useRef)(null);
1112
1158
  var descriptionIsClamped = descriptionClamp > 0 && !isDescriptionExpanded;
1113
1159
  (0, react_2.useLayoutEffect)(function () {
@@ -1124,9 +1170,23 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
1124
1170
  event.stopPropagation();
1125
1171
  setIsDescriptionExpanded(function (expanded) { return !expanded; });
1126
1172
  }, [descriptionIsInteractive]);
1173
+ /* Dimmer than the title, as far as it stays readable on the bar: the color it is drawn in - its effect's
1174
+ (where the theme can resolve it), its intent's, else the bar's text - at 0.7, or as much more as it needs.
1175
+ An opacity the caller gives is the caller's, as given. Worked out only for a description there is. */
1176
+ var descriptionLook = (0, react_2.useMemo)(function () {
1177
+ if (!description || descriptionEffect.opacity !== undefined) {
1178
+ return descriptionEffect;
1179
+ }
1180
+ var drawn = descriptionEffect.color
1181
+ ? (0, surface_1.getDrawnEffectTextColor)(theme, descriptionEffect.color, barSurface)
1182
+ : descriptionIntent
1183
+ ? (0, colors_2.getReadableIntentColor)(theme, descriptionIntent, undefined, barSurface)
1184
+ : undefined;
1185
+ return __assign(__assign({}, descriptionEffect), { opacity: (0, colors_2.getReadableAlpha)(drawn !== null && drawn !== void 0 ? drawn : barText, barSurface, 0.7) });
1186
+ }, [description, descriptionEffect, descriptionIntent, theme, barSurface, barText]);
1127
1187
  /** Shared by both places the description can render — inline with the title, or on its
1128
1188
  * own row below — so the two cannot drift apart. */
1129
- var descriptionProps = __assign({ ref: descriptionRef, className: 'reqore-panel-title-description', size: panelSize, effect: __assign({ opacity: 0.7 }, descriptionEffect), intent: descriptionIntent, onClick: handleDescriptionClick }, (descriptionIsInteractive
1189
+ var descriptionProps = __assign({ ref: descriptionRef, className: 'reqore-panel-title-description', size: panelSize, effect: descriptionLook, intent: descriptionIntent, onClick: handleDescriptionClick }, (descriptionIsInteractive
1130
1190
  ? {
1131
1191
  role: 'button',
1132
1192
  tabIndex: 0,
@@ -1140,19 +1200,19 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
1140
1200
  style: { cursor: 'pointer' },
1141
1201
  }
1142
1202
  : {}));
1143
- var _14 = (0, react_2.useState)(undefined), labelAvailable = _14[0], setLabelAvailable = _14[1];
1144
- var _15 = (0, useFitTextSize_1.useFitTextSize)({
1203
+ var _16 = (0, react_2.useState)(undefined), labelAvailable = _16[0], setLabelAvailable = _16[1];
1204
+ var _17 = (0, useFitTextSize_1.useFitTextSize)({
1145
1205
  text: typeof label === 'string' ? label : '',
1146
1206
  available: labelAvailable,
1147
1207
  max: labelNaturalPx,
1148
1208
  min: labelMinTextSize,
1149
1209
  lines: clampLines,
1150
1210
  enabled: fitLabel !== false && typeof label === 'string' && !(labelEffect === null || labelEffect === void 0 ? void 0 : labelEffect.textSize),
1151
- }), labelFitRef = _15[0], labelFitPx = _15[1];
1211
+ }), labelFitRef = _17[0], labelFitPx = _17[1];
1152
1212
  /** Only while the title is actually below its natural size, and never over a caller who
1153
1213
  * pinned the description's own size. */
1154
1214
  var descriptionFontPx = fitLabel && !(descriptionEffect === null || descriptionEffect === void 0 ? void 0 : descriptionEffect.textSize) && labelFitPx < labelNaturalPx
1155
- ? 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)))
1215
+ ? Math.max(useFitTextSize_1.FIT_TEXT_FLOOR_PX, Math.round(((_d = sizes_1.TEXT_FROM_SIZE[panelSize]) !== null && _d !== void 0 ? _d : sizes_1.TEXT_FROM_SIZE.normal) * (labelFitPx / labelNaturalPx)))
1156
1216
  : 0;
1157
1217
  /**
1158
1218
  * How much room the title has, computed rather than measured off its own box.
@@ -1235,138 +1295,139 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
1235
1295
  if (skeleton) {
1236
1296
  return (0, jsx_runtime_1.jsx)(exports.ReqorePanelSkeleton, { size: panelSize, isCollapsed: _isCollapsed });
1237
1297
  }
1238
- 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 || (isResizableElement ? 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) {
1298
+ 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 || (isResizableElement ? 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, "aria-disabled": disabled ? true : rest['aria-disabled'], "$color": panelText, Component: exports.StyledPanel, ref: function (node) {
1239
1299
  handleRef(node);
1240
1300
  panelRef.current = node;
1241
1301
  }, onPointerEnter: handlePointerEnter, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [!_isCollapsed && mediaPosition === 'top' ? mediaNode : null, rest.stickyHeader ? ((0, jsx_runtime_1.jsx)("div", { ref: stickySentinelRef, "aria-hidden": 'true', style: { height: 0 } })) : null, _isHovered &&
1242
1302
  (0, lodash_1.size)(floatingActionsList) > 0 &&
1243
- (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, "$mediaAbove": hasMedia && mediaPosition === 'top' && !_isCollapsed, 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 () {
1244
- var hasPanelIcon = !!icon || !!iconImage || loading;
1245
- // The icon takes the label's place, so there has to BE an icon. Without one
1246
- // the label is the only thing identifying the panel and it stays put — a
1247
- // header with neither is not a compact header, it is an empty one. The label
1248
- // is not lost either way: it is already this icon's tooltip.
1249
- var hideTitleText = hideTitleForIcon && hasPanelIcon;
1250
- // Layout decision:
1251
- // - iconWithLabel=true → render the icon INSIDE the
1252
- // label-and-badge row (no outer icon column). The
1253
- // description sits flush-left under the icon+label.
1254
- // - When there is NO description, fall back to the
1255
- // inline layout regardless of iconVerticalAlign — the
1256
- // outer grid only earns its keep when there is a
1257
- // description row to anchor against, and the inline
1258
- // layout aligns icon-to-text glyphs more naturally
1259
- // via the heading's own line-height.
1260
- // - Otherwise → outer two-column grid where the icon
1261
- // sits in a reserved column. iconVerticalAlign places
1262
- // the icon in row 1 (label), row 2 (description), or
1263
- // spans both rows (center). The description always
1264
- // indents past the icon column.
1265
- var inlineWithLabel = hasPanelIcon && (iconWithLabel || !description || hideTitleText);
1266
- var useOuterGrid = hasPanelIcon && !inlineWithLabel;
1267
- // Outer grid → grid column-gap handles icon→label
1268
- // spacing, so the icon itself takes no margin.
1269
- // Inline → keep 'margin=right' so ReqoreIcon adds its
1270
- // standard side-spacer between icon and label.
1271
- var iconMargin = useOuterGrid ? undefined : 'right';
1272
- 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: {
1273
- opacity: colors_1.CONTROL_ICON_OPACITY,
1274
- } }, 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;
1275
- var labelRow = ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndBadge, { className: 'reqore-panel-title-label-row', children: [inlineWithLabel && panelIcon, hideTitleText ? null : typeof label === 'string' ? (
1276
- // The measured box is this wrapper, not the heading: as a
1277
- // `min-width: 0` flex child it reports the width the row actually
1278
- // left for the title, where the heading would report what the text
1279
- // wants. `overflow: hidden` is what makes it shrinkable at all.
1280
- // `display: flex` keeps the wrapper from opening a line box around
1281
- // the inline-flex heading: a block wrapper adds the row's leading on
1282
- // top of the heading's own box, which made a `tiny` panel 3px taller
1283
- // than it was before this wrapper existed.
1284
- (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({
1285
- // `noWrap` pins the heading to one line; a clamped title is
1286
- // allowed to wrap, and the clamp brings its own ellipsis.
1287
- noWrap: clampLines === 1 }, labelEffect), style: __assign(__assign(__assign({}, (clampLines > 1
1288
- ? {}
1289
- : { display: 'inline-flex', alignItems: 'center' })), { minWidth: 0,
1290
- // Capped to the measured wrapper so the heading's own
1291
- // `text-overflow: ellipsis` (from `noWrap`) has a box to overflow.
1292
- // An `inline-flex` heading otherwise sizes to its text, and the
1293
- // wrapper clips it mid-word with no ellipsis at all.
1294
- maxWidth: '100%' }), (fitLabel !== false && !(labelEffect === null || labelEffect === void 0 ? void 0 : labelEffect.textSize)
1295
- ? { fontSize: "".concat(labelFitPx, "px") }
1296
- : {})), 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] }));
1297
- // Description size is driven by the panel size only —
1298
- // explicitly NOT by `labelSize`. `NUMBER_TO_SIZE` maps
1299
- // 1..6 → micro..huge, which means bumping `labelSize`
1300
- // from 4 to 2 to grow the heading would inversely
1301
- // shrink the description to `tiny`. That's the wrong
1302
- // pairing: a bigger label should not make supporting
1303
- // text smaller. Consumers that want to size the
1304
- // description explicitly pass `descriptionEffect.textSize`.
1305
- var descriptionRow = description && !hideTitleText && !descriptionBelow ? ((0, jsx_runtime_1.jsx)(Span_1.ReqoreSpan, __assign({}, descriptionProps, { children: description }))) : null;
1306
- 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] })) })));
1307
- })()) : 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
1308
- // The narrow bar keeps its controls in the trailing group, so this row —
1309
- // which existed only for the stacked layout — never shows.
1310
- , {
1303
+ (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.jsx)(SurfaceContext_1.ReqoreSurfaceProvider, { color: barSurface, children: (0, jsx_runtime_1.jsxs)(exports.StyledPanelTopBar, { "$color": barText, 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, "$mediaAbove": hasMedia && mediaPosition === 'top' && !_isCollapsed, 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 () {
1304
+ var _a;
1305
+ var hasPanelIcon = !!icon || !!iconImage || loading;
1306
+ // The icon takes the label's place, so there has to BE an icon. Without one
1307
+ // the label is the only thing identifying the panel and it stays put — a
1308
+ // header with neither is not a compact header, it is an empty one. The label
1309
+ // is not lost either way: it is already this icon's tooltip.
1310
+ var hideTitleText = hideTitleForIcon && hasPanelIcon;
1311
+ // Layout decision:
1312
+ // - iconWithLabel=true → render the icon INSIDE the
1313
+ // label-and-badge row (no outer icon column). The
1314
+ // description sits flush-left under the icon+label.
1315
+ // - When there is NO description, fall back to the
1316
+ // inline layout regardless of iconVerticalAlign — the
1317
+ // outer grid only earns its keep when there is a
1318
+ // description row to anchor against, and the inline
1319
+ // layout aligns icon-to-text glyphs more naturally
1320
+ // via the heading's own line-height.
1321
+ // - Otherwise → outer two-column grid where the icon
1322
+ // sits in a reserved column. iconVerticalAlign places
1323
+ // the icon in row 1 (label), row 2 (description), or
1324
+ // spans both rows (center). The description always
1325
+ // indents past the icon column.
1326
+ var inlineWithLabel = hasPanelIcon && (iconWithLabel || !description || hideTitleText);
1327
+ var useOuterGrid = hasPanelIcon && !inlineWithLabel;
1328
+ // Outer grid → grid column-gap handles icon→label
1329
+ // spacing, so the icon itself takes no margin.
1330
+ // Inline → keep 'margin=right' so ReqoreIcon adds its
1331
+ // standard side-spacer between icon and label.
1332
+ var iconMargin = useOuterGrid ? undefined : 'right';
1333
+ 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: (_a = titleIconLook.color) !== null && _a !== void 0 ? _a : titleIconOwn, tooltip: iconTooltip, effect: {
1334
+ opacity: titleIconLook.opacity,
1335
+ } }, titleIconRest, { 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;
1336
+ var labelRow = ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndBadge, { className: 'reqore-panel-title-label-row', children: [inlineWithLabel && panelIcon, hideTitleText ? null : typeof label === 'string' ? (
1337
+ // The measured box is this wrapper, not the heading: as a
1338
+ // `min-width: 0` flex child it reports the width the row actually
1339
+ // left for the title, where the heading would report what the text
1340
+ // wants. `overflow: hidden` is what makes it shrinkable at all.
1341
+ // `display: flex` keeps the wrapper from opening a line box around
1342
+ // the inline-flex heading: a block wrapper adds the row's leading on
1343
+ // top of the heading's own box, which made a `tiny` panel 3px taller
1344
+ // than it was before this wrapper existed.
1345
+ (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({
1346
+ // `noWrap` pins the heading to one line; a clamped title is
1347
+ // allowed to wrap, and the clamp brings its own ellipsis.
1348
+ noWrap: clampLines === 1 }, labelEffect), style: __assign(__assign(__assign({}, (clampLines > 1
1349
+ ? {}
1350
+ : { display: 'inline-flex', alignItems: 'center' })), { minWidth: 0,
1351
+ // Capped to the measured wrapper so the heading's own
1352
+ // `text-overflow: ellipsis` (from `noWrap`) has a box to overflow.
1353
+ // An `inline-flex` heading otherwise sizes to its text, and the
1354
+ // wrapper clips it mid-word with no ellipsis at all.
1355
+ maxWidth: '100%' }), (fitLabel !== false && !(labelEffect === null || labelEffect === void 0 ? void 0 : labelEffect.textSize)
1356
+ ? { fontSize: "".concat(labelFitPx, "px") }
1357
+ : {})), 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] }));
1358
+ // Description size is driven by the panel size only —
1359
+ // explicitly NOT by `labelSize`. `NUMBER_TO_SIZE` maps
1360
+ // 1..6 → micro..huge, which means bumping `labelSize`
1361
+ // from 4 to 2 to grow the heading would inversely
1362
+ // shrink the description to `tiny`. That's the wrong
1363
+ // pairing: a bigger label should not make supporting
1364
+ // text smaller. Consumers that want to size the
1365
+ // description explicitly pass `descriptionEffect.textSize`.
1366
+ var descriptionRow = description && !hideTitleText && !descriptionBelow ? ((0, jsx_runtime_1.jsx)(Span_1.ReqoreSpan, __assign({}, descriptionProps, { children: description }))) : null;
1367
+ 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] })) })));
1368
+ })()) : 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
1311
1369
  // The narrow bar keeps its controls in the trailing group, so this row —
1312
1370
  // which existed only for the stacked layout — never shows.
1313
- 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,
1314
- // Not fluid by default. `fluid` emits `width: 100%`, so the group's flex basis
1315
- // becomes the whole bar and the title — the only shrinkable thing on the other
1316
- // side — collapses to nothing: measured at 0px of title on a 400px panel, and
1317
- // 142px of a 518px bar where the buttons needed 90.
1318
- //
1319
- // A caller whose actions include something with no useful width of its own —
1320
- // Collection puts a search input in here — opts back in through
1321
- // `responsiveActionsWrapperProps`, because `fluid` is also what ControlGroup
1322
- // propagates to its children, and that input has nothing to fill without it.
1323
- fluid: false, horizontalAlign: 'flex-end', customTheme: theme, size: panelSize }, responsiveActionsWrapperProps, {
1324
- // The cap is the whole fix. Half the bar guarantees the title the other half,
1325
- // and the moment the buttons need more than their share the group overflows —
1326
- // which is what `responsive` collapse watches (`scrollWidth > clientWidth`), so
1327
- // the fold into the `…` menu still fires. Floored at 40px because shrinking to
1328
- // nothing clips the buttons rather than folding them, and ControlGroup ignores
1329
- // its own overflow below that width, which would strand them clipped.
1330
- style: __assign({
1331
- // Pushed to the trailing edge. A `fluid` group used to span the bar and its
1332
- // own `horizontalAlign` put the buttons on the right; a content-sized one is
1333
- // only as wide as its buttons, so with no title header beside it — Tree has
1334
- // no label — it would sit at the LEFT of an otherwise empty bar. `auto`
1335
- // margin restores the edge without giving the group any width back.
1336
- marginLeft: 'auto',
1337
- // Content basis that may still shrink. `fluid={false}` alone compiles to
1338
- // `flex: 0 0 auto`, which pins the group at its content width so it can never
1339
- // overflow — and `responsive` collapse watches `scrollWidth > clientWidth`,
1340
- // so the fold into the `…` menu would simply stop happening.
1341
- flex: '0 1 auto',
1342
- // Floored, because shrinking to nothing clips the buttons instead of folding
1343
- // them, and ControlGroup ignores its own overflow below 40px.
1344
- minWidth: 40,
1345
- // Capped, so a group that IS opted back into growing cannot take the row —
1346
- // but only while there is a title header to take it FROM. With no label,
1347
- // badge, icon or breadcrumbs the bar is the group's alone, and holding a
1348
- // Collection's search input to half of an empty bar guards nothing.
1349
- 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, className: NON_RESPONSIVE_ACTIONS_CLASS,
1350
- // Beside a title in a NARROW bar the title comes first (qorus#646). The group is
1351
- // `0 0 auto`, so a narrow bar - a table in a card on a phone - squeezed the title
1352
- // to nothing and still pushed its last button past the panel's edge. Narrow, the
1353
- // title takes its whole width first and the group what is left, at least what its
1354
- // controls cannot do without (a search field narrows, a button never does) and at
1355
- // most its own width. A basis of 0 is what gives the title the first claim: the
1356
- // group is sized from the leftover, so the title shrinks only once the controls
1357
- // are at their smallest - and its words break only when one is wider than the
1358
- // space left beside them. Shrinking the two against each other instead, by any
1359
- // factor, took a fraction of a pixel off the title, and that broke "Services" into
1360
- // "Servic / es". Room the title does not need goes to the group first (a grow no
1361
- // title's comes near), so a search field widens before the title's box does. A
1362
- // wide bar keeps the group at its own width: there the title's claim was its
1363
- // one-line width, a description beside it included, and a long description
1364
- // squeezed a table's search to its least instead of wrapping.
1365
- style: hasTitleHeader && isNarrow ? NARROW_ACTIONS_BESIDE_TITLE : undefined, children: nonFloatingActions.map(renderNonResponsiveActions()) }), descriptionBelow ? (
1366
- // `flex-basis: 100%` is what puts it on its own line — the bar is a wrapping
1367
- // flex row, so a full-width item cannot share one with anything before it.
1368
- // `min-width: 0` so a long sentence wraps inside the bar instead of widening it.
1369
- (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, stickyHeader: rest.stickyHeader, 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, !_isCollapsed && mediaPosition === 'bottom' ? mediaNode : null] })) })));
1371
+ , {
1372
+ // The narrow bar keeps its controls in the trailing group, so this row —
1373
+ // which existed only for the stacked layout — never shows.
1374
+ 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,
1375
+ // Not fluid by default. `fluid` emits `width: 100%`, so the group's flex basis
1376
+ // becomes the whole bar and the title — the only shrinkable thing on the other
1377
+ // side — collapses to nothing: measured at 0px of title on a 400px panel, and
1378
+ // 142px of a 518px bar where the buttons needed 90.
1379
+ //
1380
+ // A caller whose actions include something with no useful width of its own —
1381
+ // Collection puts a search input in here — opts back in through
1382
+ // `responsiveActionsWrapperProps`, because `fluid` is also what ControlGroup
1383
+ // propagates to its children, and that input has nothing to fill without it.
1384
+ fluid: false, horizontalAlign: 'flex-end', customTheme: theme, size: panelSize }, responsiveActionsWrapperProps, {
1385
+ // The cap is the whole fix. Half the bar guarantees the title the other half,
1386
+ // and the moment the buttons need more than their share the group overflows —
1387
+ // which is what `responsive` collapse watches (`scrollWidth > clientWidth`), so
1388
+ // the fold into the `…` menu still fires. Floored at 40px because shrinking to
1389
+ // nothing clips the buttons rather than folding them, and ControlGroup ignores
1390
+ // its own overflow below that width, which would strand them clipped.
1391
+ style: __assign({
1392
+ // Pushed to the trailing edge. A `fluid` group used to span the bar and its
1393
+ // own `horizontalAlign` put the buttons on the right; a content-sized one is
1394
+ // only as wide as its buttons, so with no title header beside it — Tree has
1395
+ // no label — it would sit at the LEFT of an otherwise empty bar. `auto`
1396
+ // margin restores the edge without giving the group any width back.
1397
+ marginLeft: 'auto',
1398
+ // Content basis that may still shrink. `fluid={false}` alone compiles to
1399
+ // `flex: 0 0 auto`, which pins the group at its content width so it can never
1400
+ // overflow — and `responsive` collapse watches `scrollWidth > clientWidth`,
1401
+ // so the fold into the `…` menu would simply stop happening.
1402
+ flex: '0 1 auto',
1403
+ // Floored, because shrinking to nothing clips the buttons instead of folding
1404
+ // them, and ControlGroup ignores its own overflow below 40px.
1405
+ minWidth: 40,
1406
+ // Capped, so a group that IS opted back into growing cannot take the row —
1407
+ // but only while there is a title header to take it FROM. With no label,
1408
+ // badge, icon or breadcrumbs the bar is the group's alone, and holding a
1409
+ // Collection's search input to half of an empty bar guards nothing.
1410
+ 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, className: NON_RESPONSIVE_ACTIONS_CLASS,
1411
+ // Beside a title in a NARROW bar the title comes first (qorus#646). The group is
1412
+ // `0 0 auto`, so a narrow bar - a table in a card on a phone - squeezed the title
1413
+ // to nothing and still pushed its last button past the panel's edge. Narrow, the
1414
+ // title takes its whole width first and the group what is left, at least what its
1415
+ // controls cannot do without (a search field narrows, a button never does) and at
1416
+ // most its own width. A basis of 0 is what gives the title the first claim: the
1417
+ // group is sized from the leftover, so the title shrinks only once the controls
1418
+ // are at their smallest - and its words break only when one is wider than the
1419
+ // space left beside them. Shrinking the two against each other instead, by any
1420
+ // factor, took a fraction of a pixel off the title, and that broke "Services" into
1421
+ // "Servic / es". Room the title does not need goes to the group first (a grow no
1422
+ // title's comes near), so a search field widens before the title's box does. A
1423
+ // wide bar keeps the group at its own width: there the title's claim was its
1424
+ // one-line width, a description beside it included, and a long description
1425
+ // squeezed a table's search to its least instead of wrapping.
1426
+ style: hasTitleHeader && isNarrow ? NARROW_ACTIONS_BESIDE_TITLE : undefined, children: nonFloatingActions.map(renderNonResponsiveActions()) }), descriptionBelow ? (
1427
+ // `flex-basis: 100%` is what puts it on its own line — the bar is a wrapping
1428
+ // flex row, so a full-width item cannot share one with anything before it.
1429
+ // `min-width: 0` so a long sentence wraps inside the bar instead of widening it.
1430
+ (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, stickyHeader: rest.stickyHeader, children: (0, jsx_runtime_1.jsx)(SurfaceContext_1.ReqoreSurfaceProvider, { color: contentSurfaces, children: children }) })) : null, hasBottomActions && !_isCollapsed ? ((0, jsx_runtime_1.jsx)(SurfaceContext_1.ReqoreSurfaceProvider, { color: barSurface, children: (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, !_isCollapsed && mediaPosition === 'bottom' ? mediaNode : null] })) })));
1370
1431
  });
1371
1432
  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, templateObject_31, templateObject_32, templateObject_33, templateObject_34;
1372
1433
  //# sourceMappingURL=index.js.map