@qoretechnologies/reqore 0.78.1-pr.714.g1a51945 → 0.78.1-pr.714.g8232ee3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Drawer/index.d.ts +66 -0
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +169 -7
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/FadeScroller/index.d.ts.map +1 -1
- package/dist/components/FadeScroller/index.js +44 -170
- package/dist/components/FadeScroller/index.js.map +1 -1
- package/dist/components/Modal/index.d.ts +12 -2
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Notifications/notification.d.ts +11 -1
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +96 -19
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Tier/group.d.ts +5 -4
- package/dist/components/Tier/group.d.ts.map +1 -1
- package/dist/components/Tier/group.js +43 -122
- package/dist/components/Tier/group.js.map +1 -1
- package/dist/helpers/gestures.d.ts +30 -0
- package/dist/helpers/gestures.d.ts.map +1 -0
- package/dist/helpers/gestures.js +36 -0
- package/dist/helpers/gestures.js.map +1 -0
- package/dist/hooks/usePointerDrag.d.ts +77 -0
- package/dist/hooks/usePointerDrag.d.ts.map +1 -0
- package/dist/hooks/usePointerDrag.js +192 -0
- package/dist/hooks/usePointerDrag.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -66,6 +66,7 @@ var styled_components_1 = __importStar(require("styled-components"));
|
|
|
66
66
|
var sizes_1 = require("../../constants/sizes");
|
|
67
67
|
var colors_1 = require("../../helpers/colors");
|
|
68
68
|
var useCombinedRefs_1 = require("../../hooks/useCombinedRefs");
|
|
69
|
+
var usePointerDrag_1 = require("../../hooks/usePointerDrag");
|
|
69
70
|
var useScrollFade_1 = require("../../hooks/useScrollFade");
|
|
70
71
|
var useTheme_1 = require("../../hooks/useTheme");
|
|
71
72
|
var TooltipComponent_1 = require("../TooltipComponent");
|
|
@@ -243,177 +244,50 @@ exports.ReqoreFadeScroller = (0, react_1.memo)((0, react_1.forwardRef)(function
|
|
|
243
244
|
observer.observe(group);
|
|
244
245
|
return function () { return observer.disconnect(); };
|
|
245
246
|
}, [marqueeActive, marqueeSpeed]);
|
|
246
|
-
(0, react_1.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
* browser window entirely. Listening on the row alone meant a release it
|
|
264
|
-
* never saw left `activePointer` set: the next move over the row resumed
|
|
265
|
-
* the drag with no button held, and there was no way to let go, because
|
|
266
|
-
* the only thing that could have ended it was a pointerup on the row that
|
|
267
|
-
* was never coming.
|
|
268
|
-
*
|
|
269
|
-
* Pointer capture alone does not cover this — it is taken only once the
|
|
270
|
-
* drag ENGAGES, and a fast pull can be past the row's edge before the
|
|
271
|
-
* first qualifying move arrives.
|
|
272
|
-
*
|
|
273
|
-
* Bound per-gesture rather than permanently, so an idle scroller adds no
|
|
274
|
-
* global pointermove listener. */
|
|
275
|
-
var stopTracking = function () {
|
|
276
|
-
window.removeEventListener('pointermove', onPointerMove);
|
|
277
|
-
window.removeEventListener('pointerup', onPointerEnd);
|
|
278
|
-
window.removeEventListener('pointercancel', onPointerEnd);
|
|
279
|
-
window.removeEventListener('lostpointercapture', onPointerEnd);
|
|
280
|
-
window.removeEventListener('blur', endGesture);
|
|
281
|
-
};
|
|
282
|
-
var startTracking = function () {
|
|
283
|
-
window.addEventListener('pointermove', onPointerMove);
|
|
284
|
-
window.addEventListener('pointerup', onPointerEnd);
|
|
285
|
-
window.addEventListener('pointercancel', onPointerEnd);
|
|
286
|
-
window.addEventListener('lostpointercapture', onPointerEnd);
|
|
287
|
-
// Alt-tabbing mid-pull: the release happens in another window.
|
|
288
|
-
window.addEventListener('blur', endGesture);
|
|
289
|
-
};
|
|
290
|
-
/* Ends the gesture however it got here — a normal release, a release the
|
|
291
|
-
* page never saw, a cancelled pointer, or the window losing focus.
|
|
292
|
-
* Idempotent: `activePointer` is cleared before the capture is released,
|
|
293
|
-
* so the `lostpointercapture` our own release fires re-enters and returns. */
|
|
294
|
-
var endGesture = function () {
|
|
295
|
-
var _a;
|
|
296
|
-
if (activePointer === undefined) {
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
var pointerId = activePointer;
|
|
300
|
-
activePointer = undefined;
|
|
301
|
-
stopTracking();
|
|
302
|
-
if ((_a = element.hasPointerCapture) === null || _a === void 0 ? void 0 : _a.call(element, pointerId)) {
|
|
303
|
-
element.releasePointerCapture(pointerId);
|
|
304
|
-
}
|
|
305
|
-
if (engaged) {
|
|
306
|
-
engaged = false;
|
|
307
|
-
element.classList.remove('reqore-fade-scroller-dragging');
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
var onPointerEnd = function (event) {
|
|
311
|
-
if (activePointer === undefined || event.pointerId !== activePointer) {
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
endGesture();
|
|
315
|
-
};
|
|
316
|
-
var onPointerMove = function (event) {
|
|
317
|
-
if (activePointer === undefined || event.pointerId !== activePointer) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
/* Nothing is held down, so the button came up somewhere this page could
|
|
321
|
-
* never observe it — off the edge of the window, the usual way. Recover
|
|
322
|
-
* on the first move back rather than wait for a pointerup that is never
|
|
323
|
-
* coming; `buttons` is a bitmask of what is CURRENTLY pressed, so during
|
|
324
|
-
* a real drag it can only be non-zero. */
|
|
325
|
-
if (event.buttons === 0) {
|
|
326
|
-
endGesture();
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
var distance = event.clientX - startX;
|
|
330
|
-
if (!engaged) {
|
|
331
|
-
// Below the threshold this is still a click, so do nothing at all —
|
|
332
|
-
// not even preventDefault, which would break focus on the target.
|
|
333
|
-
if (Math.abs(distance) < DRAG_THRESHOLD) {
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
engaged = true;
|
|
337
|
-
swallowNextClick = true;
|
|
338
|
-
element.classList.add('reqore-fade-scroller-dragging');
|
|
339
|
-
// Capture keeps the moves addressed to the row while the pointer is
|
|
340
|
-
// over other elements. The window listeners are what make the drag
|
|
341
|
-
// survive leaving it; this is what keeps hover states elsewhere quiet.
|
|
342
|
-
try {
|
|
343
|
-
element.setPointerCapture(event.pointerId);
|
|
344
|
-
}
|
|
345
|
-
catch (_a) {
|
|
346
|
-
// Capture is a nicety, not the mechanism.
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
// Stops the browser starting a native text/image drag mid-pull.
|
|
350
|
-
event.preventDefault();
|
|
351
|
-
element.scrollLeft = startScrollLeft - distance;
|
|
352
|
-
};
|
|
353
|
-
var onPointerDown = function (event) {
|
|
247
|
+
var dragStartScrollLeftRef = (0, react_1.useRef)(0);
|
|
248
|
+
/* The drag is the library's shared pointer drag — the one a sheet is pushed away with
|
|
249
|
+
and a tier stack swiped — with the row's own rules on top (see `dragToScroll`): never
|
|
250
|
+
from touch, never with Shift held, never from text entry, and only when there is
|
|
251
|
+
somewhere to go. The gesture is tracked on the window, so a pull that leaves the row
|
|
252
|
+
at once still moves it and a release the page never saw still ends it.
|
|
253
|
+
|
|
254
|
+
Drag state stays OUT of React state (`trackDragging: false`): a drag is a transient
|
|
255
|
+
pointer interaction, and routing it through setState would re-render every child on
|
|
256
|
+
every gesture — on the rail this was built for, that is a whole row of memoized tiles,
|
|
257
|
+
mid-gesture. The classes are toggled here instead, as the fades are. */
|
|
258
|
+
var dragHandlers = (0, usePointerDrag_1.usePointerDrag)({
|
|
259
|
+
enabled: canDrag,
|
|
260
|
+
axis: 'x',
|
|
261
|
+
slop: DRAG_THRESHOLD,
|
|
262
|
+
trackDragging: false,
|
|
263
|
+
canStart: function (event) {
|
|
354
264
|
var _a, _b;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
if (
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
if ((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest) === null || _b === void 0 ? void 0 : _b.call(_a, NON_DRAGGABLE)) {
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
// Nothing to scroll: leave the press alone entirely so a click on a
|
|
379
|
-
// row that happens to fit behaves exactly as it did before.
|
|
380
|
-
if (element.scrollWidth <= element.clientWidth) {
|
|
381
|
-
return;
|
|
265
|
+
// Touch already pans natively and long-press already selects; taking the gesture
|
|
266
|
+
// over would replace two working behaviours with one.
|
|
267
|
+
return event.pointerType !== 'touch' &&
|
|
268
|
+
// Shift is the documented escape hatch to "select instead of drag".
|
|
269
|
+
!event.shiftKey &&
|
|
270
|
+
!((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest) === null || _b === void 0 ? void 0 : _b.call(_a, NON_DRAGGABLE)) &&
|
|
271
|
+
// Nothing to scroll: leave the press alone entirely so a click on a row that
|
|
272
|
+
// happens to fit behaves exactly as it did before.
|
|
273
|
+
event.currentTarget.scrollWidth > event.currentTarget.clientWidth;
|
|
274
|
+
},
|
|
275
|
+
onStart: function (element) {
|
|
276
|
+
dragStartScrollLeftRef.current = element.scrollLeft;
|
|
277
|
+
element.classList.add('reqore-fade-scroller-dragging');
|
|
278
|
+
},
|
|
279
|
+
onMove: function (_a) {
|
|
280
|
+
var dx = _a.dx;
|
|
281
|
+
var element = scrollRef.current;
|
|
282
|
+
if (element) {
|
|
283
|
+
element.scrollLeft = dragStartScrollLeftRef.current - dx;
|
|
382
284
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
var onClickCapture = function (event) {
|
|
390
|
-
if (!swallowNextClick) {
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
swallowNextClick = false;
|
|
394
|
-
event.preventDefault();
|
|
395
|
-
event.stopPropagation();
|
|
396
|
-
};
|
|
397
|
-
// A native drag beats pointer events to the punch on links and images.
|
|
398
|
-
var onDragStart = function (event) {
|
|
399
|
-
if (engaged) {
|
|
400
|
-
event.preventDefault();
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
element.addEventListener('pointerdown', onPointerDown);
|
|
404
|
-
element.addEventListener('dragstart', onDragStart);
|
|
405
|
-
// Capture phase: the click has to be stopped before it reaches the tile.
|
|
406
|
-
element.addEventListener('click', onClickCapture, true);
|
|
407
|
-
return function () {
|
|
408
|
-
element.removeEventListener('pointerdown', onPointerDown);
|
|
409
|
-
element.removeEventListener('dragstart', onDragStart);
|
|
410
|
-
element.removeEventListener('click', onClickCapture, true);
|
|
411
|
-
// A gesture live at unmount would otherwise leave window listeners behind.
|
|
412
|
-
stopTracking();
|
|
413
|
-
element.classList.remove('reqore-fade-scroller-dragging');
|
|
414
|
-
element.classList.remove('reqore-fade-scroller-draggable');
|
|
415
|
-
};
|
|
416
|
-
}, [canDrag]);
|
|
285
|
+
},
|
|
286
|
+
onEnd: function () {
|
|
287
|
+
var _a;
|
|
288
|
+
(_a = scrollRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove('reqore-fade-scroller-dragging');
|
|
289
|
+
},
|
|
290
|
+
}).handlers;
|
|
417
291
|
/* An intent tints the fade, because the fade IS this component's only
|
|
418
292
|
surface — there is no border or background for an intent to colour
|
|
419
293
|
instead. Without this, `intent` would type-check and paint nothing. */
|
|
@@ -425,7 +299,7 @@ exports.ReqoreFadeScroller = (0, react_1.memo)((0, react_1.forwardRef)(function
|
|
|
425
299
|
marqueeActive && fade ? 'reqore-fade-scroller-marquee-fade' : '',
|
|
426
300
|
]
|
|
427
301
|
.filter(Boolean)
|
|
428
|
-
.join(' '), "$fadeColor": resolvedFadeColor, "$fluid": fluid, children: (0, jsx_runtime_1.jsx)(StyledFadeScrollerContent, { ref: scrollRef, className: 'reqore-fade-scroller-content', "$gap": sizes_1.GAP_FROM_SIZE[gapSize], "$verticalAlign": verticalAlign, "$rigid": rigid, "$fluid": fluid, "$marquee": marqueeActive, children: marqueeActive ? ((0, jsx_runtime_1.jsxs)(StyledMarqueeTrack, { ref: trackRef, className: 'reqore-fade-scroller-marquee-track', "$pauseOnHover": marqueePauseOnHover, children: [(0, jsx_runtime_1.jsx)(StyledMarqueeGroup, { ref: groupRef, className: 'reqore-fade-scroller-marquee-group', "$gap": sizes_1.GAP_FROM_SIZE[gapSize], "$verticalAlign": verticalAlign, "$rigid": rigid, children: children }), (0, jsx_runtime_1.jsx)(StyledMarqueeGroup, { "aria-hidden": 'true', className: 'reqore-fade-scroller-marquee-group reqore-fade-scroller-marquee-clone', "$gap": sizes_1.GAP_FROM_SIZE[gapSize], "$verticalAlign": verticalAlign, "$rigid": rigid, children: children })] })) : (children) }) })));
|
|
302
|
+
.join(' '), "$fadeColor": resolvedFadeColor, "$fluid": fluid, children: (0, jsx_runtime_1.jsx)(StyledFadeScrollerContent, __assign({}, dragHandlers, { ref: scrollRef, className: 'reqore-fade-scroller-content', "$gap": sizes_1.GAP_FROM_SIZE[gapSize], "$verticalAlign": verticalAlign, "$rigid": rigid, "$fluid": fluid, "$marquee": marqueeActive, children: marqueeActive ? ((0, jsx_runtime_1.jsxs)(StyledMarqueeTrack, { ref: trackRef, className: 'reqore-fade-scroller-marquee-track', "$pauseOnHover": marqueePauseOnHover, children: [(0, jsx_runtime_1.jsx)(StyledMarqueeGroup, { ref: groupRef, className: 'reqore-fade-scroller-marquee-group', "$gap": sizes_1.GAP_FROM_SIZE[gapSize], "$verticalAlign": verticalAlign, "$rigid": rigid, children: children }), (0, jsx_runtime_1.jsx)(StyledMarqueeGroup, { "aria-hidden": 'true', className: 'reqore-fade-scroller-marquee-group reqore-fade-scroller-marquee-clone', "$gap": sizes_1.GAP_FROM_SIZE[gapSize], "$verticalAlign": verticalAlign, "$rigid": rigid, children: children })] })) : (children) })) })));
|
|
429
303
|
}));
|
|
430
304
|
exports.ReqoreFadeScroller.displayName = 'ReqoreFadeScroller';
|
|
431
305
|
exports.default = exports.ReqoreFadeScroller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FadeScroller/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA6F;AAC7F,qEAA2D;AAC3D,+CAA8D;AAG9D,+CAA8D;AAC9D,+DAA8D;AAC9D,2DAAwF;AACxF,iDAAsD;AAOtD,wDAA6D;AAE7D;;;GAGG;AACH,IAAM,UAAU,GAAG,EAAE,CAAC;AAwFtB;;;;;;GAMG;AACH,IAAM,cAAc,GAAG,CAAC,CAAC;AAEzB;;;;;;;;;;;;GAYG;AACH,IAAM,aAAa,GAAG,yEAAyE,CAAC;AAQhG;;;;;GAKG;AACH,IAAM,yBAAyB,GAAG,2BAAM,CAAC,GAAG,yrDAA0B,iRAK3D,EAA0C,2JAUxC,EAAU,0KAQqB,EAA8B,iHAM/B,EAA8B,u6BAwBxE,KAhDU,UAAC,EAAU;QAAR,MAAM,YAAA;IAAO,OAAA,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AAA1B,CAA0B,EAUxC,UAAU,EAQqB,UAAC,EAAc;QAAZ,UAAU,gBAAA;IAAO,OAAA,U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kBAAe,0BAAkB,CAAC"}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { IReqoreTheme } from '../../constants/theme';
|
|
2
2
|
import { IReqoreDrawerProps } from '../Drawer';
|
|
3
|
-
export interface IReqoreModalProps extends Omit<IReqoreDrawerProps, 'position'> {
|
|
3
|
+
export interface IReqoreModalProps extends Omit<IReqoreDrawerProps, 'position' | 'draggable'> {
|
|
4
4
|
position?: 'top' | 'center' | 'bottom';
|
|
5
5
|
width?: string;
|
|
6
6
|
height?: string;
|
|
7
7
|
/** Whether to trap focus within the modal when open. Defaults to true. */
|
|
8
8
|
focusTrap?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the modal can be moved by dragging its title bar. Opt-in. Only where the pointer can
|
|
11
|
+
* hover (`isHoverCapable`: a mouse or a trackpad) — the `move` cursor on the bar is the
|
|
12
|
+
* affordance, and on a touch screen a press on a header is left to the page. Resizing from the
|
|
13
|
+
* edges and corners works as before; a drag never starts on the close button, a header action
|
|
14
|
+
* or a resize handle; the title bar is held inside the viewport; and the position resets when
|
|
15
|
+
* the modal opens again. The box carries `.reqore-drawer-draggable` while it is on. Not the
|
|
16
|
+
* HTML attribute of the same name: it never reaches the DOM.
|
|
17
|
+
*/
|
|
18
|
+
draggable?: boolean;
|
|
9
19
|
}
|
|
10
20
|
export interface IReqoreModalStyle extends IReqoreModalProps {
|
|
11
21
|
theme: IReqoreTheme;
|
|
12
22
|
zIndex?: number;
|
|
13
23
|
}
|
|
14
|
-
export declare const ReqoreModal: import("react").MemoExoticComponent<({ width, height, confirmOnClose, ...rest }: IReqoreModalProps) => import("react/jsx-runtime").JSX.Element>;
|
|
24
|
+
export declare const ReqoreModal: import("react").MemoExoticComponent<({ width, height, confirmOnClose, draggable, ...rest }: IReqoreModalProps) => import("react/jsx-runtime").JSX.Element>;
|
|
15
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,WAAW,CAAC;AAE7D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,WAAW,CAAC;AAE7D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,WAAW,CAAC;IAC3F,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,8FAOnB,iBAAiB,6CAyDrB,CAAC"}
|
|
@@ -30,7 +30,7 @@ var __1 = require("../..");
|
|
|
30
30
|
var Drawer_1 = require("../Drawer");
|
|
31
31
|
exports.ReqoreModal = (0, react_1.memo)(function (_a) {
|
|
32
32
|
var _b;
|
|
33
|
-
var _c = _a.width, width = _c === void 0 ? '80vw' : _c, _d = _a.height, height = _d === void 0 ? 'fit-content' : _d, confirmOnClose = _a.confirmOnClose, rest = __rest(_a, ["width", "height", "confirmOnClose"]);
|
|
33
|
+
var _c = _a.width, width = _c === void 0 ? '80vw' : _c, _d = _a.height, height = _d === void 0 ? 'fit-content' : _d, confirmOnClose = _a.confirmOnClose, draggable = _a.draggable, rest = __rest(_a, ["width", "height", "confirmOnClose", "draggable"]);
|
|
34
34
|
var id = (0, react_1.useMemo)(function () { return (0, nanoid_1.nanoid)(); }, []);
|
|
35
35
|
var escClosableModals = (0, __1.useReqoreProperty)('escClosableModals');
|
|
36
36
|
var closeModalsOnEscPress = (0, __1.useReqoreProperty)('closeModalsOnEscPress');
|
|
@@ -62,6 +62,6 @@ exports.ReqoreModal = (0, react_1.memo)(function (_a) {
|
|
|
62
62
|
remove(id);
|
|
63
63
|
};
|
|
64
64
|
}, [id, rest.isOpen]);
|
|
65
|
-
return ((0, jsx_runtime_1.jsx)(Drawer_1.ReqoreDrawer, __assign({ closeOnEscPress: closeModalsOnEscPress }, rest, { confirmOnClose: confirmOnClose, width: width, height: height, position: 'left', _isModal: true, className: "".concat(rest.className || '', " reqore-modal") })));
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)(Drawer_1.ReqoreDrawer, __assign({ closeOnEscPress: closeModalsOnEscPress }, rest, { confirmOnClose: confirmOnClose, width: width, height: height, position: 'left', _isModal: true, _draggable: draggable, className: "".concat(rest.className || '', " reqore-modal") })));
|
|
66
66
|
});
|
|
67
67
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAgC;AAChC,+BAA8D;AAC9D,2BAA0C;AAE1C,oCAA6D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAgC;AAChC,+BAA8D;AAC9D,2BAA0C;AAE1C,oCAA6D;AAyBhD,QAAA,WAAW,GAAG,IAAA,YAAI,EAC7B,UAAC,EAMm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,CAAC,EAAE,CAAC,iBAAiB,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;IAEtD,IAAA,iBAAS,EAAC;QACR,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,GAAG,CAAC,EAAE,CAAC,CAAC;QACV,CAAC;QAED,OAAO;YACL,MAAM,CAAC,EAAE,CAAC,CAAC;QACb,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAEtB,OAAO,CACL,uBAAC,qBAAY,aACX,eAAe,EAAE,qBAAqB,IAClC,IAAI,IACR,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAC,MAAM,EACf,QAAQ,QACR,UAAU,EAAE,SAAS,EACrB,SAAS,EAAE,UAAG,IAAI,CAAC,SAAS,IAAI,EAAE,kBAAe,IACjD,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -89,13 +89,23 @@ export interface IReqoreNotificationProps extends IWithReqoreEffect, IWithReqore
|
|
|
89
89
|
showProgress?: boolean;
|
|
90
90
|
/** Accessible name of the close button. */
|
|
91
91
|
closeLabel?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Whether the notification can be flicked away. Dragging it sideways follows the finger, and
|
|
94
|
+
* letting go past 18% of its width (`SWIPE.distance`) or with a flick closes it through
|
|
95
|
+
* `onClose`, the same path as the close button; a shorter pull springs back, at once under
|
|
96
|
+
* `prefers-reduced-motion`. The timer holds while it is held. A press on the close button or
|
|
97
|
+
* an action is theirs, and a mostly vertical press stays the page's to scroll. The root
|
|
98
|
+
* carries `.reqore-notification-swipeable` while it is on and `.reqore-notification-dragging`
|
|
99
|
+
* during a drag. Default `true`; nothing without an `onClose`.
|
|
100
|
+
*/
|
|
101
|
+
swipeToDismiss?: boolean;
|
|
92
102
|
}
|
|
93
103
|
/**
|
|
94
104
|
* Defaults every notification added through the provider starts from — set
|
|
95
105
|
* once on `ReqoreUIProvider` (`options.notifications`) to give the whole app
|
|
96
106
|
* one look and one corner. A notification's own props win.
|
|
97
107
|
*/
|
|
98
|
-
export interface IReqoreNotificationDefaults extends Partial<Pick<IReqoreNotificationProps, 'compact' | 'size' | 'flat' | 'raised' | 'minimal' | 'opaque' | 'blur' | 'effect' | 'duration' | 'pauseOnHover' | 'showProgress' | 'iconHasBackground' | 'closeLabel'>> {
|
|
108
|
+
export interface IReqoreNotificationDefaults extends Partial<Pick<IReqoreNotificationProps, 'compact' | 'size' | 'flat' | 'raised' | 'minimal' | 'opaque' | 'blur' | 'effect' | 'duration' | 'pauseOnHover' | 'showProgress' | 'iconHasBackground' | 'closeLabel' | 'swipeToDismiss'>> {
|
|
99
109
|
position?: IReqoreNotificationsPosition;
|
|
100
110
|
}
|
|
101
111
|
export declare const StyledNotification: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/components/Notifications/notification.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAG7F,OAAO,EAKL,MAAM,EACP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAgB,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/components/Notifications/notification.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAG7F,OAAO,EAKL,MAAM,EACP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAgB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAUpE,OAAO,EAAkC,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKpF,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAq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