@qoretechnologies/reqore 0.76.0-pr.663.gf5793e2 → 0.76.0-pr.667.g4fafa42

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 (150) hide show
  1. package/dist/components/Button/index.d.ts +11 -1
  2. package/dist/components/Button/index.d.ts.map +1 -1
  3. package/dist/components/Button/index.js +9 -5
  4. package/dist/components/Button/index.js.map +1 -1
  5. package/dist/components/Collection/index.d.ts +7 -8
  6. package/dist/components/Collection/index.d.ts.map +1 -1
  7. package/dist/components/Collection/index.js +32 -21
  8. package/dist/components/Collection/index.js.map +1 -1
  9. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  10. package/dist/components/ControlGroup/index.js +123 -10
  11. package/dist/components/ControlGroup/index.js.map +1 -1
  12. package/dist/components/Drawer/index.d.ts +90 -1
  13. package/dist/components/Drawer/index.d.ts.map +1 -1
  14. package/dist/components/Drawer/index.js +149 -21
  15. package/dist/components/Drawer/index.js.map +1 -1
  16. package/dist/components/Dropdown/item.d.ts +1 -1
  17. package/dist/components/Dropdown/item.d.ts.map +1 -1
  18. package/dist/components/Dropdown/item.js +20 -4
  19. package/dist/components/Dropdown/item.js.map +1 -1
  20. package/dist/components/Dropdown/list.d.ts.map +1 -1
  21. package/dist/components/Dropdown/list.js +41 -24
  22. package/dist/components/Dropdown/list.js.map +1 -1
  23. package/dist/components/Effect/index.d.ts +24 -1
  24. package/dist/components/Effect/index.d.ts.map +1 -1
  25. package/dist/components/Effect/index.js.map +1 -1
  26. package/dist/components/EntityRow/index.d.ts +1 -0
  27. package/dist/components/EntityRow/index.d.ts.map +1 -1
  28. package/dist/components/EntityRow/index.js +6 -5
  29. package/dist/components/EntityRow/index.js.map +1 -1
  30. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  31. package/dist/components/InternalPopover/index.js +6 -3
  32. package/dist/components/InternalPopover/index.js.map +1 -1
  33. package/dist/components/Message/index.js +6 -6
  34. package/dist/components/Message/index.js.map +1 -1
  35. package/dist/components/MultiSelect/index.d.ts +3 -3
  36. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  37. package/dist/components/MultiSelect/index.js +1 -1
  38. package/dist/components/MultiSelect/index.js.map +1 -1
  39. package/dist/components/Notifications/index.d.ts.map +1 -1
  40. package/dist/components/Notifications/index.js +8 -1
  41. package/dist/components/Notifications/index.js.map +1 -1
  42. package/dist/components/Notifications/notification.d.ts +72 -32
  43. package/dist/components/Notifications/notification.d.ts.map +1 -1
  44. package/dist/components/Notifications/notification.js +257 -96
  45. package/dist/components/Notifications/notification.js.map +1 -1
  46. package/dist/components/Notifications/styles.d.ts +41 -0
  47. package/dist/components/Notifications/styles.d.ts.map +1 -0
  48. package/dist/components/Notifications/styles.js +131 -0
  49. package/dist/components/Notifications/styles.js.map +1 -0
  50. package/dist/components/Panel/index.d.ts +48 -8
  51. package/dist/components/Panel/index.d.ts.map +1 -1
  52. package/dist/components/Panel/index.js +216 -100
  53. package/dist/components/Panel/index.js.map +1 -1
  54. package/dist/components/Panel/responsive.d.ts +24 -0
  55. package/dist/components/Panel/responsive.d.ts.map +1 -0
  56. package/dist/components/Panel/responsive.js +30 -0
  57. package/dist/components/Panel/responsive.js.map +1 -0
  58. package/dist/components/Paragraph/index.d.ts +8 -0
  59. package/dist/components/Paragraph/index.d.ts.map +1 -1
  60. package/dist/components/Paragraph/index.js.map +1 -1
  61. package/dist/components/Popover/index.d.ts +37 -3
  62. package/dist/components/Popover/index.d.ts.map +1 -1
  63. package/dist/components/Popover/index.js +164 -5
  64. package/dist/components/Popover/index.js.map +1 -1
  65. package/dist/components/RadioGroup/index.d.ts.map +1 -1
  66. package/dist/components/RadioGroup/index.js +12 -3
  67. package/dist/components/RadioGroup/index.js.map +1 -1
  68. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  69. package/dist/components/RichTextEditor/index.js +286 -46
  70. package/dist/components/RichTextEditor/index.js.map +1 -1
  71. package/dist/components/Select/index.d.ts +68 -29
  72. package/dist/components/Select/index.d.ts.map +1 -1
  73. package/dist/components/Select/index.js +42 -117
  74. package/dist/components/Select/index.js.map +1 -1
  75. package/dist/components/Select/valuePreview.d.ts +11 -0
  76. package/dist/components/Select/valuePreview.d.ts.map +1 -0
  77. package/dist/components/Select/valuePreview.js +64 -0
  78. package/dist/components/Select/valuePreview.js.map +1 -0
  79. package/dist/components/Table/body.d.ts.map +1 -1
  80. package/dist/components/Table/body.js +31 -10
  81. package/dist/components/Table/body.js.map +1 -1
  82. package/dist/components/Table/cell.d.ts.map +1 -1
  83. package/dist/components/Table/cell.js +6 -6
  84. package/dist/components/Table/cell.js.map +1 -1
  85. package/dist/components/Table/helpers.d.ts +62 -28
  86. package/dist/components/Table/helpers.d.ts.map +1 -1
  87. package/dist/components/Table/helpers.js +106 -55
  88. package/dist/components/Table/helpers.js.map +1 -1
  89. package/dist/components/Table/index.d.ts +30 -2
  90. package/dist/components/Table/index.d.ts.map +1 -1
  91. package/dist/components/Table/index.js +15 -6
  92. package/dist/components/Table/index.js.map +1 -1
  93. package/dist/components/Table/row.d.ts +29 -1
  94. package/dist/components/Table/row.d.ts.map +1 -1
  95. package/dist/components/Table/row.js +76 -12
  96. package/dist/components/Table/row.js.map +1 -1
  97. package/dist/components/Tag/index.d.ts +5 -2
  98. package/dist/components/Tag/index.d.ts.map +1 -1
  99. package/dist/components/Tag/index.js +39 -23
  100. package/dist/components/Tag/index.js.map +1 -1
  101. package/dist/components/Textarea/index.d.ts +10 -0
  102. package/dist/components/Textarea/index.d.ts.map +1 -1
  103. package/dist/components/Textarea/index.js +60 -3
  104. package/dist/components/Textarea/index.js.map +1 -1
  105. package/dist/components/Tree/index.d.ts +2 -1
  106. package/dist/components/Tree/index.d.ts.map +1 -1
  107. package/dist/components/Tree/index.js +31 -9
  108. package/dist/components/Tree/index.js.map +1 -1
  109. package/dist/containers/ReqoreProvider.d.ts.map +1 -1
  110. package/dist/containers/ReqoreProvider.js +23 -5
  111. package/dist/containers/ReqoreProvider.js.map +1 -1
  112. package/dist/containers/UIProvider.d.ts +3 -0
  113. package/dist/containers/UIProvider.d.ts.map +1 -1
  114. package/dist/containers/UIProvider.js.map +1 -1
  115. package/dist/context/ReqoreContext.d.ts +14 -1
  116. package/dist/context/ReqoreContext.d.ts.map +1 -1
  117. package/dist/context/ReqoreContext.js.map +1 -1
  118. package/dist/helpers/selectItem.d.ts +23 -0
  119. package/dist/helpers/selectItem.d.ts.map +1 -0
  120. package/dist/helpers/selectItem.js +147 -0
  121. package/dist/helpers/selectItem.js.map +1 -0
  122. package/dist/helpers/utils.d.ts +1 -1
  123. package/dist/helpers/utils.d.ts.map +1 -1
  124. package/dist/hooks/useFitTextSize.d.ts +14 -1
  125. package/dist/hooks/useFitTextSize.d.ts.map +1 -1
  126. package/dist/hooks/useFitTextSize.js +8 -5
  127. package/dist/hooks/useFitTextSize.js.map +1 -1
  128. package/dist/hooks/useMarqueeOnHover.d.ts +86 -0
  129. package/dist/hooks/useMarqueeOnHover.d.ts.map +1 -0
  130. package/dist/hooks/useMarqueeOnHover.js +292 -0
  131. package/dist/hooks/useMarqueeOnHover.js.map +1 -0
  132. package/dist/hooks/usePaging.d.ts.map +1 -1
  133. package/dist/hooks/usePaging.js +29 -2
  134. package/dist/hooks/usePaging.js.map +1 -1
  135. package/dist/index.d.ts +4 -0
  136. package/dist/index.d.ts.map +1 -1
  137. package/dist/index.js +20 -3
  138. package/dist/index.js.map +1 -1
  139. package/dist/testing/index.d.ts +3 -0
  140. package/dist/testing/index.d.ts.map +1 -0
  141. package/dist/testing/index.js +23 -0
  142. package/dist/testing/index.js.map +1 -0
  143. package/dist/testing/tableGeometry.d.ts +75 -0
  144. package/dist/testing/tableGeometry.d.ts.map +1 -0
  145. package/dist/testing/tableGeometry.js +168 -0
  146. package/dist/testing/tableGeometry.js.map +1 -0
  147. package/dist/types/global.d.ts +6 -6
  148. package/dist/types/global.d.ts.map +1 -1
  149. package/package.json +10 -3
  150. package/testing/package.json +7 -0
@@ -142,6 +142,31 @@ exports.StyledReqoreControlGroup = (0, styled_components_1.default)(Effect_1.Sty
142
142
  return undefined;
143
143
  return (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n\n > * {\n border-radius: 0;\n position: relative;\n\n &:hover,\n &:focus-within {\n z-index: 1;\n }\n }\n "], ["\n ", "\n\n > * {\n border-radius: 0;\n position: relative;\n\n &:hover,\n &:focus-within {\n z-index: 1;\n }\n }\n "])), wrap ? 'padding: 1px 0 0 1px;' : '');
144
144
  });
145
+ /**
146
+ * Drops keys whose value is `undefined`, so a prop the group has nothing to say
147
+ * about is *absent* from the cloned child rather than present-and-undefined.
148
+ *
149
+ * The difference matters for one kind of child and matters a lot: a custom
150
+ * component that gives a prop a default and then spreads the props it was
151
+ * handed onto the element underneath. Spreading `{ minimal: undefined }` over
152
+ * that default destroys it, so the child renders solid where every sibling in
153
+ * the group is minimal — and no prop the caller can pass will fix it, because
154
+ * the group is the thing overwriting it.
155
+ *
156
+ * For a plain Reqore child this changes nothing: those read their own props
157
+ * with their own defaults, where an absent key and an undefined one are the
158
+ * same thing.
159
+ */
160
+ var definedOnly = function (props) {
161
+ var rv = {};
162
+ for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
163
+ var key = _a[_i];
164
+ if (props[key] !== undefined) {
165
+ rv[key] = props[key];
166
+ }
167
+ }
168
+ return rv;
169
+ };
145
170
  var ReqoreControlGroup = (0, react_1.memo)((0, react_1.forwardRef)(function (_a, externalRef) {
146
171
  var children = _a.children, className = _a.className, minimal = _a.minimal, _b = _a.size, size = _b === void 0 ? 'normal' : _b, _c = _a.gapSize, gapSize = _c === void 0 ? 'normal' : _c, fluid = _a.fluid, flat = _a.flat, fixed = _a.fixed, fill = _a.fill, _d = _a.rounded, rounded = _d === void 0 ? true : _d, wrap = _a.wrap, stack = _a.stack, isInsideStackGroup = _a.isInsideStackGroup, isInsideVerticalGroup = _a.isInsideVerticalGroup, isMasterGroupRounded = _a.isMasterGroupRounded, intent = _a.intent, customTheme = _a.customTheme, isFirst = _a.isFirst, isLast = _a.isLast, vertical = _a.vertical, childrenCount = _a.childrenCount, childId = _a.childId, isChild = _a.isChild, isFirstGroup = _a.isFirstGroup, isLastGroup = _a.isLastGroup, verticalAlign = _a.verticalAlign, _e = _a.horizontalAlign, horizontalAlign = _e === void 0 ? 'flex-start' : _e, responsive = _a.responsive, overflowButtonProps = _a.overflowButtonProps, _f = _a.hiddenItemsLabel, hiddenItemsLabel = _f === void 0 ? 'Hidden items' : _f, rest = __rest(_a, ["children", "className", "minimal", "size", "gapSize", "fluid", "flat", "fixed", "fill", "rounded", "wrap", "stack", "isInsideStackGroup", "isInsideVerticalGroup", "isMasterGroupRounded", "intent", "customTheme", "isFirst", "isLast", "vertical", "childrenCount", "childId", "isChild", "isFirstGroup", "isLastGroup", "verticalAlign", "horizontalAlign", "responsive", "overflowButtonProps", "hiddenItemsLabel"]);
147
172
  var isStack = stack || isInsideStackGroup;
@@ -150,6 +175,9 @@ var ReqoreControlGroup = (0, react_1.memo)((0, react_1.forwardRef)(function (_a,
150
175
  var _h = (0, react_1.useState)(0), lastReSize = _h[0], setLastReSize = _h[1];
151
176
  var _j = (0, react_1.useState)(false), isOverflownDialogOpen = _j[0], setIsOverflownDialogOpen = _j[1];
152
177
  var observer = (0, react_1.useRef)(null);
178
+ var onResize = (0, react_1.useRef)(null);
179
+ /** The sizes the group's own last fold left behind; see `getLayoutSignature`. */
180
+ var lastSettledLayout = (0, react_1.useRef)(undefined);
153
181
  var ref = (0, react_1.useRef)(null);
154
182
  var setRefs = (0, react_1.useCallback)(function (node) {
155
183
  ref.current = node;
@@ -185,26 +213,100 @@ var ReqoreControlGroup = (0, react_1.memo)((0, react_1.forwardRef)(function (_a,
185
213
  responsive &&
186
214
  ref.current.scrollWidth > ref.current.clientWidth);
187
215
  }, [vertical, responsive, children]);
216
+ /**
217
+ * The two sizes a fold depends on, as one comparable value: how much room
218
+ * the container is granting, and how much of it the group is taking.
219
+ *
220
+ * Both are needed, and neither on its own would do.
221
+ *
222
+ * The group's own width is the only thing that can report a sibling growing
223
+ * beside it — a panel title getting longer takes room away from the action
224
+ * group without the header changing size at all. But it CANNOT report the
225
+ * container growing: a folded group is only as wide as the one button it is
226
+ * showing, so widening the window around it leaves its own box untouched
227
+ * and it would stay folded forever.
228
+ *
229
+ * The container's width reports exactly that, and is unmoved by anything
230
+ * the group does to its own contents — unless the container is itself
231
+ * sized by the group, which is what the comparison below is for.
232
+ */
233
+ var getLayoutSignature = (0, react_1.useCallback)(function () {
234
+ var _a, _b;
235
+ var element = ref.current;
236
+ if (!element) {
237
+ return undefined;
238
+ }
239
+ return "".concat((_b = (_a = element.parentElement) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : -1, ":").concat(element.clientWidth);
240
+ }, []);
241
+ /**
242
+ * Remembers the layout the group's own fold produced, before the browser
243
+ * gets a chance to report it back.
244
+ *
245
+ * Folding a child away changes the group's width, and the group watches its
246
+ * own width — so without this the fold undoes itself: the observer fires,
247
+ * every folded child goes back, the group measures itself as overflowing,
248
+ * folds again, resizes again, forever. Recording the sizes here, in a
249
+ * layout effect that runs the moment the fold is in the DOM, lets the
250
+ * observer tell the group's own doing (sizes it already knows about) from
251
+ * news it has not heard yet (any other pair of numbers).
252
+ *
253
+ * This runs only for a group that can actually fold: reading `clientWidth`
254
+ * forces layout, and control groups are everywhere.
255
+ */
256
+ (0, react_1.useLayoutEffect)(function () {
257
+ if (vertical || !responsive) {
258
+ return;
259
+ }
260
+ lastSettledLayout.current = getLayoutSignature();
261
+ }, [overflowingChildren, vertical, responsive, getLayoutSignature]);
188
262
  (0, react_use_1.useMount)(function () {
189
263
  if (!vertical && responsive) {
190
- if ('ResizeObserver' in window) {
191
- observer.current = new ResizeObserver((0, lodash_1.debounce)(function () {
192
- if (ref && ref.current) {
193
- setOverflowingChildren(0);
194
- setLastReSize(ref.current.clientWidth);
264
+ if ('ResizeObserver' in window && ref.current) {
265
+ onResize.current = (0, lodash_1.debounce)(function () {
266
+ if (!ref.current) {
267
+ return;
268
+ }
269
+ var layout = getLayoutSignature();
270
+ // The group's own fold, coming back around. Nothing outside the
271
+ // group has moved since it folded, so putting the folded children
272
+ // back would only make it fold them again.
273
+ if (layout === lastSettledLayout.current) {
274
+ return;
195
275
  }
196
- }, 200));
276
+ lastSettledLayout.current = layout;
277
+ // Something outside the group moved: start from everything shown
278
+ // and let the measurement below decide what has to go.
279
+ setOverflowingChildren(0);
280
+ setLastReSize(ref.current.clientWidth);
281
+ }, 200);
282
+ observer.current = new ResizeObserver(onResize.current);
197
283
  observer.current.observe(ref.current);
284
+ // The container carries the news the group's own box cannot; see
285
+ // `getLayoutSignature`.
286
+ if (ref.current.parentElement) {
287
+ observer.current.observe(ref.current.parentElement);
288
+ }
198
289
  }
199
290
  }
200
291
  });
201
292
  (0, react_use_1.useUnmount)(function () {
202
- if (observer.current) {
203
- observer.current.disconnect();
204
- }
293
+ var _a, _b;
294
+ // Cancel first: a debounced callback still in flight would otherwise run
295
+ // against an unmounted group.
296
+ (_a = onResize.current) === null || _a === void 0 ? void 0 : _a.cancel();
297
+ (_b = observer.current) === null || _b === void 0 ? void 0 : _b.disconnect();
205
298
  });
206
299
  (0, react_1.useEffect)(function () {
207
300
  // Is the control group still overflowing?
301
+ //
302
+ // This counts up one child at a time and stops when the row fits, or when
303
+ // there is nothing left in it but the overflow button — which is 40px
304
+ // wide, and `checkIfOverflowing` ignores a group that narrow. It is NOT
305
+ // bounded by the number of children: the fold slices the `children` array
306
+ // while the count walks the rendered elements, and an array with holes in
307
+ // it (a panel whose actions include ones it decided not to render) has
308
+ // more slots than elements, so a bound taken from the count would stop
309
+ // the fold one short and leave the last action clipped.
208
310
  if ((overflowingChildren || overflowingChildren === 0) && checkIfOverflowing()) {
209
311
  setOverflowingChildren(overflowingChildren + 1);
210
312
  }
@@ -310,7 +412,18 @@ var ReqoreControlGroup = (0, react_1.memo)((0, react_1.forwardRef)(function (_a,
310
412
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
311
413
  var isIntrinsicElement = typeof childType === 'string';
312
414
  var newProps = isIntrinsicElement
313
- ? __assign(__assign({}, props), { key: (props === null || props === void 0 ? void 0 : props.reactKey) || _index }) : __assign(__assign({}, props), { key: (props === null || props === void 0 ? void 0 : props.reactKey) || _index, minimal: (_a = props === null || props === void 0 ? void 0 : props.minimal) !== null && _a !== void 0 ? _a : minimal, size: (props === null || props === void 0 ? void 0 : props.size) || size, flat: (_b = props === null || props === void 0 ? void 0 : props.flat) !== null && _b !== void 0 ? _b : flat, fluid: (_c = props === null || props === void 0 ? void 0 : props.fluid) !== null && _c !== void 0 ? _c : fluid, fixed: (_d = props === null || props === void 0 ? void 0 : props.fixed) !== null && _d !== void 0 ? _d : fixed, fill: (_e = props === null || props === void 0 ? void 0 : props.fill) !== null && _e !== void 0 ? _e : fill, spaceBetween: (_f = props === null || props === void 0 ? void 0 : props.spaceBetween) !== null && _f !== void 0 ? _f : false, stack: (_g = props === null || props === void 0 ? void 0 : props.stack) !== null && _g !== void 0 ? _g : isStack, intent: (props === null || props === void 0 ? void 0 : props.intent) || intent, customTheme: (props === null || props === void 0 ? void 0 : props.customTheme) || customTheme });
415
+ ? __assign(__assign({}, props), { key: (props === null || props === void 0 ? void 0 : props.reactKey) || _index }) : __assign(__assign(__assign({}, props), { key: (props === null || props === void 0 ? void 0 : props.reactKey) || _index }), definedOnly({
416
+ minimal: (_a = props === null || props === void 0 ? void 0 : props.minimal) !== null && _a !== void 0 ? _a : minimal,
417
+ size: (props === null || props === void 0 ? void 0 : props.size) || size,
418
+ flat: (_b = props === null || props === void 0 ? void 0 : props.flat) !== null && _b !== void 0 ? _b : flat,
419
+ fluid: (_c = props === null || props === void 0 ? void 0 : props.fluid) !== null && _c !== void 0 ? _c : fluid,
420
+ fixed: (_d = props === null || props === void 0 ? void 0 : props.fixed) !== null && _d !== void 0 ? _d : fixed,
421
+ fill: (_e = props === null || props === void 0 ? void 0 : props.fill) !== null && _e !== void 0 ? _e : fill,
422
+ spaceBetween: (_f = props === null || props === void 0 ? void 0 : props.spaceBetween) !== null && _f !== void 0 ? _f : false,
423
+ stack: (_g = props === null || props === void 0 ? void 0 : props.stack) !== null && _g !== void 0 ? _g : isStack,
424
+ intent: (props === null || props === void 0 ? void 0 : props.intent) || intent,
425
+ customTheme: (props === null || props === void 0 ? void 0 : props.customTheme) || customTheme,
426
+ }));
314
427
  if (isStack) {
315
428
  var childIsFlat = (_h = props === null || props === void 0 ? void 0 : props.flat) !== null && _h !== void 0 ? _h : flat;
316
429
  var needsCollapse = !childIsFlat;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ControlGroup/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAkC;AAClC,6CAAmG;AACnG,uCAAiD;AACjD,qEAAgD;AAChD,2BAAmD;AACnD,+CAAgF;AAEhF,+CAAsD;AACtD,iFAAgF;AAWhF,oCAAyC;AACzC,oCAAyC;AACzC,0CAA+C;AAwDlC,QAAA,wBAAwB,GAAG,IAAA,2BAAM,EAAC,qBAAY,CAAC,CAAC,UAAU,CAAC;IACtE,iBAAiB,EAAE,IAAA,uBAAc,EAC/B,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,OAAO,EACP,UAAU,EACV,eAAe,EACf,MAAM,CACP;CACF,CAAC,wkBAA0B,8BAElB,EAA2E,cAC1E,EAA4D,wBAClD,EAOJ,oBACA,EASA,kBACF,EAA+C,YACrD,EAA4E,kBACtE,EAAwC,+NAMnD,EAYD,eAEQ,EAAe,MAAO,EAAY,sBAC3B,EAC8E,wBAC3E,EAC6E,uBAC9E,EAA4E,WAE1F,EAKC,aAGH,EAOC,QAED,EAgBD,IACF,KAnFS,UAAC,EAAgB;QAAd,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version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ControlGroup/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiD;AACjD,6CASe;AACf,uCAAiD;AACjD,qEAAgD;AAChD,2BAAmD;AACnD,+CAAgF;AAEhF,+CAAsD;AACtD,iFAAgF;AAWhF,oCAAyC;AACzC,oCAAyC;AACzC,0CAA+C;AAwDlC,QAAA,wBAAwB,GAAG,IAAA,2BAAM,EAAC,qBAAY,CAAC,CAAC,UAAU,CAAC;IACtE,iBAAiB,EAAE,IAAA,uBAAc,EAC/B,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,OAAO,EACP,UAAU,EACV,eAAe,EACf,MAAM,CACP;CACF,CAAC,wkBAA0B,8BAElB,EAA2E,cAC1E,EAA4D,wBAClD,EAOJ,oBACA,EASA,kBACF,EAA+C,YACrD,EAA4E,kBACtE,EAAwC,+NAMnD,EAYD,eAEQ,EAAe,MAAO,EAAY,sBAC3B,EAC8E,wBAC3E,EAC6E,uBAC9E,EAA4E,WAE1F,EAKC,aAGH,EAOC,QAED,EAgBD,IACF,KAnFS,UAAC,EAAgB;QAAd,KAAK,WAAA,EAAE,KAAK,WAAA;IAAO,OAAA,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;AAArD,CAAqD,EAC1E,UAAC,EAAgB;QAAd,KAAK,WAAA,EAAE,KAAK,WAAA;IAAO,OAAA,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAAtC,CAAsC,EAClD,UAAC,EAAiC;QAA/B,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,YAAY,kBAAA;IACj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IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,OAAO,EACd,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,UAAG,SAAS,IAAI,EAAE,0BAAuB,YAEnD,KAAK,CAAC,SAAS,CAAC,IACQ,IAC1B,CACJ,CAAC;AACJ,CAAC,CAAC,CACH,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
@@ -1,7 +1,58 @@
1
1
  import { IReqoreTheme } from '../../constants/theme';
2
- import { IReqoreConfirmationModal } from '../../containers/ReqoreProvider';
2
+ import type { IReqoreConfirmationModal } from '../../containers/ReqoreProvider';
3
3
  import { IReqorePanelProps } from '../Panel';
4
4
  export type TPosition = 'top' | 'bottom' | 'left' | 'right';
5
+ /** The floor an EDGE drawer cannot be dragged below, on the axis it resizes. */
6
+ export declare const DRAWER_MIN_SIZE = "150px";
7
+ /**
8
+ * The floor a MODAL cannot be dragged below.
9
+ *
10
+ * A modal is resizable from every edge and corner, and until this existed the
11
+ * floor on both axes was 40px: a dialog could be dragged into a sliver that
12
+ * still held its search box, its list and its close button, stacked one atop
13
+ * the other and none of them readable. (Reported against reqraft's "Select from
14
+ * items" picker, dragged to roughly 45px wide.)
15
+ *
16
+ * The numbers are what the drawer's OWN chrome needs — the part reqore can
17
+ * answer for; what the CONTENT needs is the consumer's to declare, through
18
+ * `minWidth` / `minHeight` (or `minSize` for both).
19
+ *
20
+ * Measured on `dialogs-modal--basic` at 1400x1000, sweeping the width and
21
+ * height of `.reqore-drawer-resizable`:
22
+ *
23
+ * - **200px wide.** Two measurements agree on it. The header: below 180px the
24
+ * panel title is clipped, and below 100px the close control leaves the box
25
+ * entirely (at 60px it overhangs by 46px). The content: at 200px the panel's
26
+ * text column is 182px, which at reqore's body size is 47 characters — the
27
+ * bottom of the 45-75 characters a line has to hold to read as prose rather
28
+ * than as a column of two-word rows.
29
+ * - **80px tall.** The panel header is 55px and is fully visible from 60px;
30
+ * 80px keeps the header whole and leaves one 20px line of the content the
31
+ * modal exists to show.
32
+ *
33
+ * THE FLOOR ALSO APPLIES AT REST, which is worth stating plainly because it is
34
+ * easy to assume otherwise. `re-resizable` takes `minWidth` / `minHeight` both
35
+ * as the drag clamp and as the element's inline `min-width` / `min-height`, so
36
+ * a modal SMALLER than the floor is grown to it without anybody touching it.
37
+ * Measured on a freshly rendered `ReqoreModal`: `min-height: 80px;
38
+ * min-width: 200px` on `.reqore-drawer-resizable`, and `utilities-global-modal
39
+ * --cannot-be-closed` went from ~42px tall to 80px, its one line of text at the
40
+ * top and the rest empty.
41
+ *
42
+ * Width is inert in practice — the default is `80vw` and the narrowest modal in
43
+ * reqore, reqraft and qorus-ide is 480px — so what this actually changes is the
44
+ * height of a modal with less than 80px of content, which in practice means one
45
+ * with no header. Such a modal reserves room for chrome it does not have. That
46
+ * is accepted rather than worked around: 80px is a reasonable smallest dialog,
47
+ * and the alternative — handing `re-resizable` its bounds only once a drag is
48
+ * under way — buys a little dead space back in exchange for a clamp that
49
+ * silently stops clamping if the library ever snapshots its bounds at drag
50
+ * start. If a caller wants a smaller resting modal, `minHeight` takes any value
51
+ * this does, including one below the default floor.
52
+ */
53
+ export declare const MODAL_MIN_WIDTH = "200px";
54
+ /** See {@link MODAL_MIN_WIDTH}. */
55
+ export declare const MODAL_MIN_HEIGHT = "80px";
5
56
  export interface IReqoreDrawerProps extends Omit<IReqorePanelProps, 'size' | 'resizable'> {
6
57
  children?: any;
7
58
  isOpen?: boolean;
@@ -15,7 +66,45 @@ export interface IReqoreDrawerProps extends Omit<IReqorePanelProps, 'size' | 're
15
66
  size?: string | 'auto';
16
67
  panelSize?: IReqorePanelProps['size'];
17
68
  maxSize?: string;
69
+ /**
70
+ * The floor the drawer cannot be dragged below, on the axis it resizes.
71
+ *
72
+ * An edge drawer resizes on one axis, and this is it. A MODAL resizes on
73
+ * both, so it reads `minWidth` / `minHeight` first and falls back to this for
74
+ * whichever of them is not given.
75
+ *
76
+ * Defaults to {@link DRAWER_MIN_SIZE} for an edge drawer, and to
77
+ * {@link MODAL_MIN_WIDTH} / {@link MODAL_MIN_HEIGHT} for a modal.
78
+ *
79
+ * UNITS: `px`, `%`, `vw`, `vh`. Nothing else. See the note on `minWidth`.
80
+ */
18
81
  minSize?: string;
82
+ /**
83
+ * A modal's width floor. See {@link MODAL_MIN_WIDTH}; overrides `minSize`.
84
+ *
85
+ * UNITS: **`px`, `%`, `vw`, `vh` only.** The value is handed to
86
+ * `re-resizable` twice and the two readers do not agree on anything else:
87
+ * the drag clamp runs it through `getPixelSize()`, which converts exactly
88
+ * those four and returns everything else UNCHANGED for `Number()` to turn
89
+ * into `NaN` — and `clamp()` is `Math.max(Math.min(n, max), min)`, so a
90
+ * `NaN` floor makes the dragged size `NaN`; while the same raw value is also
91
+ * written to the element's inline `min-width`, where CSS reads far more.
92
+ *
93
+ * The result is a half-failure in either direction, and the type cannot
94
+ * catch either one because the prop is a `string`:
95
+ * - `'20rem'`, `'40em'`, `'50vmin'`, `'50vmax'` — valid CSS, so the box looks
96
+ * floored; `NaN` in the clamp, so the DRAG is not.
97
+ * - `'200'` (a bare number) — the clamp reads it, CSS drops it.
98
+ *
99
+ * Say `'200px'`.
100
+ */
101
+ minWidth?: string;
102
+ /**
103
+ * A modal's height floor. See {@link MODAL_MIN_HEIGHT}; overrides `minSize`.
104
+ *
105
+ * UNITS: `px`, `%`, `vw`, `vh`. Nothing else — see the note on `minWidth`.
106
+ */
107
+ minHeight?: string;
19
108
  opacity?: number;
20
109
  floating?: boolean;
21
110
  blur?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAM3E,OAAO,EAAsB,iBAAiB,EAAe,MAAM,UAAU,CAAC;AAG9E,MAAM,MAAM,SAAS,GAA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AM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuZrD,CAAC"}
@@ -71,7 +71,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
71
71
  return (mod && mod.__esModule) ? mod : { "default": mod };
72
72
  };
73
73
  Object.defineProperty(exports, "__esModule", { value: true });
74
- exports.ReqoreDrawer = exports.StyledDrawerResizable = exports.StyledCloseWrapper = exports.StyledWrapper = void 0;
74
+ exports.ReqoreDrawer = exports.StyledDrawerResizable = exports.StyledCloseWrapper = exports.StyledWrapper = exports.MODAL_MIN_HEIGHT = exports.MODAL_MIN_WIDTH = exports.DRAWER_MIN_SIZE = void 0;
75
75
  var jsx_runtime_1 = require("react/jsx-runtime");
76
76
  var web_1 = require("@react-spring/web");
77
77
  var re_resizable_1 = require("re-resizable");
@@ -86,6 +86,57 @@ var useTheme_1 = require("../../hooks/useTheme");
86
86
  var Button_1 = __importDefault(require("../Button"));
87
87
  var Panel_1 = require("../Panel");
88
88
  var backdrop_1 = require("./backdrop");
89
+ /** The floor an EDGE drawer cannot be dragged below, on the axis it resizes. */
90
+ exports.DRAWER_MIN_SIZE = '150px';
91
+ /**
92
+ * The floor a MODAL cannot be dragged below.
93
+ *
94
+ * A modal is resizable from every edge and corner, and until this existed the
95
+ * floor on both axes was 40px: a dialog could be dragged into a sliver that
96
+ * still held its search box, its list and its close button, stacked one atop
97
+ * the other and none of them readable. (Reported against reqraft's "Select from
98
+ * items" picker, dragged to roughly 45px wide.)
99
+ *
100
+ * The numbers are what the drawer's OWN chrome needs — the part reqore can
101
+ * answer for; what the CONTENT needs is the consumer's to declare, through
102
+ * `minWidth` / `minHeight` (or `minSize` for both).
103
+ *
104
+ * Measured on `dialogs-modal--basic` at 1400x1000, sweeping the width and
105
+ * height of `.reqore-drawer-resizable`:
106
+ *
107
+ * - **200px wide.** Two measurements agree on it. The header: below 180px the
108
+ * panel title is clipped, and below 100px the close control leaves the box
109
+ * entirely (at 60px it overhangs by 46px). The content: at 200px the panel's
110
+ * text column is 182px, which at reqore's body size is 47 characters — the
111
+ * bottom of the 45-75 characters a line has to hold to read as prose rather
112
+ * than as a column of two-word rows.
113
+ * - **80px tall.** The panel header is 55px and is fully visible from 60px;
114
+ * 80px keeps the header whole and leaves one 20px line of the content the
115
+ * modal exists to show.
116
+ *
117
+ * THE FLOOR ALSO APPLIES AT REST, which is worth stating plainly because it is
118
+ * easy to assume otherwise. `re-resizable` takes `minWidth` / `minHeight` both
119
+ * as the drag clamp and as the element's inline `min-width` / `min-height`, so
120
+ * a modal SMALLER than the floor is grown to it without anybody touching it.
121
+ * Measured on a freshly rendered `ReqoreModal`: `min-height: 80px;
122
+ * min-width: 200px` on `.reqore-drawer-resizable`, and `utilities-global-modal
123
+ * --cannot-be-closed` went from ~42px tall to 80px, its one line of text at the
124
+ * top and the rest empty.
125
+ *
126
+ * Width is inert in practice — the default is `80vw` and the narrowest modal in
127
+ * reqore, reqraft and qorus-ide is 480px — so what this actually changes is the
128
+ * height of a modal with less than 80px of content, which in practice means one
129
+ * with no header. Such a modal reserves room for chrome it does not have. That
130
+ * is accepted rather than worked around: 80px is a reasonable smallest dialog,
131
+ * and the alternative — handing `re-resizable` its bounds only once a drag is
132
+ * under way — buys a little dead space back in exchange for a clamp that
133
+ * silently stops clamping if the library ever snapshots its bounds at drag
134
+ * start. If a caller wants a smaller resting modal, `minHeight` takes any value
135
+ * this does, including one below the default floor.
136
+ */
137
+ exports.MODAL_MIN_WIDTH = '200px';
138
+ /** See {@link MODAL_MIN_WIDTH}. */
139
+ exports.MODAL_MIN_HEIGHT = '80px';
89
140
  exports.StyledWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n z-index: ", ";\n position: fixed;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n"], ["\n z-index: ", ";\n position: fixed;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n"])), function (_a) {
90
141
  var zIndex = _a.zIndex;
91
142
  return zIndex;
@@ -152,7 +203,10 @@ var getSpringConfig = function (isModal, position, floating) {
152
203
  };
153
204
  };
154
205
  exports.ReqoreDrawer = (0, react_1.memo)(function (_a) {
155
- var children = _a.children, isOpen = _a.isOpen, isHidden = _a.isHidden, customTheme = _a.customTheme, inheritCustomTheme = _a.inheritCustomTheme, _b = _a.position, position = _b === void 0 ? 'right' : _b, maxSize = _a.maxSize, _c = _a.minSize, minSize = _c === void 0 ? '150px' : _c, onClose = _a.onClose, _d = _a.hasBackdrop, hasBackdrop = _d === void 0 ? true : _d, size = _a.size, _e = _a.resizable, resizable = _e === void 0 ? true : _e, hidable = _a.hidable, onHideToggle = _a.onHideToggle, className = _a.className, flat = _a.flat, floating = _a.floating, blur = _a.blur, opacity = _a.opacity, intent = _a.intent, _isModal = _a._isModal, width = _a.width, height = _a.height, _f = _a.actions, actions = _f === void 0 ? [] : _f, customZIndex = _a.customZIndex, panelSize = _a.panelSize, confirmOnClose = _a.confirmOnClose, focusTrap = _a.focusTrap, rest = __rest(_a, ["children", "isOpen", "isHidden", "customTheme", "inheritCustomTheme", "position", "maxSize", "minSize", "onClose", "hasBackdrop", "size", "resizable", "hidable", "onHideToggle", "className", "flat", "floating", "blur", "opacity", "intent", "_isModal", "width", "height", "actions", "customZIndex", "panelSize", "confirmOnClose", "focusTrap"]);
206
+ var children = _a.children, isOpen = _a.isOpen, isHidden = _a.isHidden, customTheme = _a.customTheme, inheritCustomTheme = _a.inheritCustomTheme, _b = _a.position, position = _b === void 0 ? 'right' : _b, maxSize = _a.maxSize,
207
+ // No default here: the fallback differs per layout (see the Resizable
208
+ // below), and a default would make "the caller said nothing" unreadable.
209
+ minSize = _a.minSize, minWidth = _a.minWidth, minHeight = _a.minHeight, onClose = _a.onClose, _c = _a.hasBackdrop, hasBackdrop = _c === void 0 ? true : _c, size = _a.size, _d = _a.resizable, resizable = _d === void 0 ? true : _d, hidable = _a.hidable, onHideToggle = _a.onHideToggle, className = _a.className, flat = _a.flat, floating = _a.floating, blur = _a.blur, opacity = _a.opacity, intent = _a.intent, _isModal = _a._isModal, width = _a.width, height = _a.height, _e = _a.actions, actions = _e === void 0 ? [] : _e, customZIndex = _a.customZIndex, panelSize = _a.panelSize, confirmOnClose = _a.confirmOnClose, focusTrap = _a.focusTrap, rest = __rest(_a, ["children", "isOpen", "isHidden", "customTheme", "inheritCustomTheme", "position", "maxSize", "minSize", "minWidth", "minHeight", "onClose", "hasBackdrop", "size", "resizable", "hidable", "onHideToggle", "className", "flat", "floating", "blur", "opacity", "intent", "_isModal", "width", "height", "actions", "customZIndex", "panelSize", "confirmOnClose", "focusTrap"]);
156
210
  // Ref for the drawer wrapper to enable focus trapping
157
211
  var drawerRef = (0, react_1.useRef)(null);
158
212
  var animations = (0, __1.useReqoreProperty)('animations');
@@ -167,11 +221,11 @@ exports.ReqoreDrawer = (0, react_1.memo)(function (_a) {
167
221
  ? 'horizontal'
168
222
  : 'vertical';
169
223
  }, [position, _isModal]);
170
- var _g = (0, react_1.useState)(isHidden || false), _isHidden = _g[0], setIsHidden = _g[1];
171
- var _h = (0, react_1.useState)({
224
+ var _f = (0, react_1.useState)(isHidden || false), _isHidden = _f[0], setIsHidden = _f[1];
225
+ var _g = (0, react_1.useState)({
172
226
  width: width || (layout === 'horizontal' ? 'auto' : size || '300px'),
173
227
  height: height || (layout === 'vertical' ? 'auto' : size || '300px'),
174
- }), _size = _h[0], setSize = _h[1];
228
+ }), _size = _g[0], setSize = _g[1];
175
229
  // Determine if focus trap should be active
176
230
  // By default, enable focus trap for modals and drawers with backdrop
177
231
  var shouldTrapFocus = focusTrap !== null && focusTrap !== void 0 ? focusTrap : (_isModal || hasBackdrop);
@@ -237,8 +291,59 @@ exports.ReqoreDrawer = (0, react_1.memo)(function (_a) {
237
291
  var closeButtonProps = (0, react_1.useMemo)(function () { return (__assign({ className: 'reqore-drawer-close-button' }, (rest.closeButtonProps || {}))); }, [rest.closeButtonProps]);
238
292
  var panelStyle = (0, react_1.useMemo)(function () { return (__assign({ width: '100%', maxHeight: '100%' }, rest.style)); }, [JSON.stringify(rest.style)]);
239
293
  var resizeableStyle = (0, react_1.useMemo)(function () {
240
- return (__assign({ zIndex: wrapperZIndex, display: 'flex', position: 'fixed', overflow: hidable ? undefined : 'hidden', transformOrigin: 'center center', backfaceVisibility: 'hidden' }, positions));
241
- }, [wrapperZIndex, hidable, positions]);
294
+ return (__assign({ zIndex: wrapperZIndex, display: 'flex', position: 'fixed',
295
+ /**
296
+ * Not clipped while anything is allowed to hang outside the box.
297
+ *
298
+ * `re-resizable` centres every handle ON the edge it drags: the four
299
+ * side handles are 10px bands hung at -5px, and the four corners are
300
+ * 20x20 squares hung at -10px on BOTH axes. A clip on this box
301
+ * amputates whatever hangs outside it, which cost the corners three
302
+ * quarters of their area and left a 10x10 target buried INSIDE the
303
+ * dialog: measured on `dialogs-modal--basic` at 1400x1000, a corner
304
+ * handle declared 20x20 was reachable only between 10px and 1px in
305
+ * from the corner, and `document.elementFromPoint()` at the corner
306
+ * itself — and anywhere outside it — returned the backdrop, whose
307
+ * click closes the dialog. A corner drag started there did nothing
308
+ * (1120x500 -> 1120x500); the same drag with the clip gone resized
309
+ * both axes (1120x500 -> 920x350).
310
+ *
311
+ * So the clip is dropped for exactly the two layouts that put
312
+ * something outside the box — a `resizable` one, whose handles do,
313
+ * and a `hidable` one, whose hide control always has and which has
314
+ * therefore always run unclipped. A drawer that is NEITHER draws
315
+ * nothing outside itself and keeps the clip it has always had:
316
+ * `resizable={false}` is a promise that the box is the box, and
317
+ * there is no reason to spend the blast radius there.
318
+ *
319
+ * MEASURED: removing it changed no geometry on any drawer or modal
320
+ * story and moved 17 subpixels of edge antialiasing (max channel
321
+ * delta 1/255) on `dialogs-modal--basic`.
322
+ *
323
+ * REASONED, NOT MEASURED — say so, because the measurement above
324
+ * could not have covered it: `stickyHeader` sets a panel's own
325
+ * wrapper to `overflow: visible` so the header can escape, and
326
+ * `overflow: hidden` on an ancestor makes that ancestor a sticky
327
+ * containing block, so this box was in that chain. No drawer or
328
+ * modal story passes `stickyHeader`, while qorus-ide ships it as a
329
+ * default in panels that render inside drawers — so the geometry
330
+ * sweep says nothing about the case that matters most.
331
+ *
332
+ * The argument that it is nonetheless inert: sticky resolves against
333
+ * the NEAREST scrollport, and a panel's header is a flex sibling
334
+ * ABOVE its `overflow: auto` content, never inside it. So a panel
335
+ * whose header could scroll out of view is one nested in another
336
+ * scroller — a panel inside a panel's content — and that scroller is
337
+ * INSIDE this box, which leaves it the nearest scrollport whether
338
+ * this box clips or not. Where there is no such scroller, this box
339
+ * was the nearest one, and it has never scrolled: sticky had nothing
340
+ * to stick to either way. Deliberately not "covered" by a story,
341
+ * because a story here would assert that a header sitting above a
342
+ * scroller stays above it, which is true before the change, after
343
+ * it, and with `stickyHeader` left off entirely.
344
+ */
345
+ overflow: resizable || hidable ? undefined : 'hidden', transformOrigin: 'center center', backfaceVisibility: 'hidden' }, positions));
346
+ }, [wrapperZIndex, resizable, hidable, positions]);
242
347
  var handleWrapperStyle = (0, react_1.useMemo)(function () { return ({
243
348
  zIndex: wrapperZIndex + 1,
244
349
  }); }, [wrapperZIndex]);
@@ -270,29 +375,52 @@ exports.ReqoreDrawer = (0, react_1.memo)(function (_a) {
270
375
  });
271
376
  }
272
377
  }, [resizable]);
273
- var enable = (0, react_1.useMemo)(function () { return ({
274
- top: (resizable && position === 'bottom') || _isModal ? true : false,
275
- right: (resizable && position === 'left') || _isModal ? true : false,
276
- left: (resizable && position === 'right') || _isModal ? true : false,
277
- bottom: (resizable && position === 'top') || _isModal ? true : false,
278
- bottomLeft: _isModal,
279
- bottomRight: _isModal,
280
- topLeft: _isModal,
281
- topRight: _isModal,
282
- }); }, [resizable, position, _isModal]);
378
+ /**
379
+ * Which edges and corners can be dragged.
380
+ *
381
+ * `resizable` is the whole answer first: a modal used to ignore it, because
382
+ * every direction read `... || _isModal`. The handles were rendered anyway,
383
+ * and because `handleResize` DOES check `resizable`, dragging one moved the
384
+ * box through `re-resizable`'s own inline style and then snapped it back on
385
+ * the next render — a modal that says it cannot be resized could be
386
+ * resized, and then lost the result.
387
+ */
388
+ var enable = (0, react_1.useMemo)(function () {
389
+ return resizable
390
+ ? {
391
+ top: position === 'bottom' || !!_isModal,
392
+ right: position === 'left' || !!_isModal,
393
+ left: position === 'right' || !!_isModal,
394
+ bottom: position === 'top' || !!_isModal,
395
+ bottomLeft: !!_isModal,
396
+ bottomRight: !!_isModal,
397
+ topLeft: !!_isModal,
398
+ topRight: !!_isModal,
399
+ }
400
+ : {
401
+ top: false,
402
+ right: false,
403
+ left: false,
404
+ bottom: false,
405
+ bottomLeft: false,
406
+ bottomRight: false,
407
+ topLeft: false,
408
+ topRight: false,
409
+ };
410
+ }, [resizable, position, _isModal]);
283
411
  return (0, react_dom_1.createPortal)(transitions(function (styles, item) {
284
412
  return item ? ((0, jsx_runtime_1.jsxs)(ThemeProvider_1.default, { theme: theme, customTheme: customTheme, children: [hasBackdrop && !_isHidden ? ((0, jsx_runtime_1.jsx)(backdrop_1.ReqoreBackdrop, { onClose: handleClose, zIndex: zIndex, blur: blur, opacity: styles.opacity })) : null, (0, jsx_runtime_1.jsx)(exports.StyledWrapper, { ref: drawerRef, zIndex: wrapperZIndex, className: 'reqore-drawer-wrapper', role: _isModal || hasBackdrop ? 'dialog' : undefined, "aria-modal": _isModal || hasBackdrop ? 'true' : undefined, children: (0, jsx_runtime_1.jsxs)(re_resizable_1.Resizable, __assign({ className: "".concat(className || '', " reqore-drawer-resizable"), maxHeight: layout === 'horizontal' || layout === 'center' ? maxSize || '90vh' : undefined, minHeight: layout === 'center'
285
- ? '40px'
413
+ ? minHeight || minSize || exports.MODAL_MIN_HEIGHT
286
414
  : layout === 'horizontal'
287
415
  ? _isHidden
288
416
  ? 0
289
- : minSize || '40px'
417
+ : minSize || exports.DRAWER_MIN_SIZE
290
418
  : undefined, maxWidth: layout === 'vertical' || layout === 'center' ? maxSize || '90vw' : undefined, minWidth: layout === 'center'
291
- ? '40px'
419
+ ? minWidth || minSize || exports.MODAL_MIN_WIDTH
292
420
  : layout === 'vertical'
293
421
  ? _isHidden
294
422
  ? 0
295
- : minSize || '40px'
423
+ : minSize || exports.DRAWER_MIN_SIZE
296
424
  : undefined, as: exports.StyledDrawerResizable }, {
297
425
  $edgelessPosition: !floating && !_isModal ? position : undefined,
298
426
  }, { style: __assign(__assign({}, resizeableStyle), styles), handleWrapperStyle: handleWrapperStyle, size: sizeObject, onResize: handleResize, enable: enable, children: [_isHidden && hidable ? ((0, jsx_runtime_1.jsx)(exports.StyledCloseWrapper, { className: 'reqore-drawer-controls', position: position, w: layout === 'vertical' ? 0 : _size.width, h: layout === 'horizontal' ? 0 : _size.height, children: (0, jsx_runtime_1.jsx)(Button_1.default, { flat: true, customTheme: theme, className: 'reqore-drawer-control reqore-drawer-hide-button', icon: getHideShowIcon(position, _isHidden), onClick: onHideToggleClick }) })) : null, !_isHidden && ((0, jsx_runtime_1.jsx)(Panel_1.ReqorePanel, __assign({}, rest, { size: panelSize, opacity: opacity, blur: hasBackdrop ? 0 : blur, actions: _actions, customTheme: customTheme, intent: intent, rounded: floating || _isModal ? true : false, flat: flat, onClose: handleClose, closeButtonProps: closeButtonProps, className: "reqore-drawer", style: panelStyle, children: children })))] })) })] })) : null;