@stenajs-webui/modal 21.38.0 → 21.38.1
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/dialog/UseDialog.d.ts +2 -1
- package/dist/index.es.js +407 -400
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode("._overlay_quvmp_1{--swui-modal-animation-time: var(--swui-animation-time-fast);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;top:0;left:0;right:0;bottom:0;background-color:var(--swui-modal-overlay-bg-color);overflow:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_quvmp_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_quvmp_1{background-color:#fff}}._overlay_quvmp_1 ._modal_quvmp_31{max-width:100%;outline:none;pointer-events:none}@media (max-width: 768px){._overlay_quvmp_1 ._modal_quvmp_31{width:100%}}._overlay_quvmp_1 ._content_quvmp_41{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);pointer-events:all;top:calc(var(--swui-metrics-space) * 2);width:var(--swui-modal-width);max-width:var(--swui-modal-max-width)}@media (max-width: 768px){._overlay_quvmp_1 ._content_quvmp_41{top:0;width:100%;max-width:100%}}._overlay_quvmp_1 ._content_quvmp_41{animation:_appear_quvmp_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_quvmp_1 ._content_quvmp_41{box-shadow:none;top:0}}._overlay_quvmp_1 ._content_quvmp_41:focus{outline:0}._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle{cursor:move}._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle .draggable-modal-cancel,._overlay_quvmp_1 ._content_quvmp_41._isDraggable_quvmp_70 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_quvmp_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_quvmp_1{0%{opacity:0}to{opacity:1}}._footer_quvmp_101{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_quvmp_105{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_quvmp_105{position:static;box-shadow:none}}._portal_17ze5_1{--drawer-width: 370px}._portal_17ze5_1 ._overlay_17ze5_4{position:fixed;top:0;right:0;bottom:0;left:0}._portal_17ze5_1 ._content_17ze5_9{box-shadow:var(--swui-shadow-modal);background:#fff;position:absolute;transition:transform var(--swui-animation-time-medium) ease-in-out}._portal_17ze5_1 ._content_17ze5_9._floating_17ze5_15{margin:var(--swui-metrics-space);border-radius:var(--swui-border-radius)}@media (max-width: 768px){._portal_17ze5_1 ._content_17ze5_9._floating_17ze5_15{margin:0;border-radius:0}}._portal_17ze5_1 ._content_17ze5_9:focus-visible{outline:unset}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30{transform:translate(var(--translate-x-outside-screen, 0));overflow-y:auto;top:0;bottom:0}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29._afterOpen_17ze5_36,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30._afterOpen_17ze5_36{transform:translate(0)}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29._beforeClose_17ze5_40,._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30._beforeClose_17ze5_40{transform:translate(var(--translate-x-outside-screen))}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46{transform:translateY(var(--translate-y-outside-screen, 0));overflow-x:auto;left:0;right:0}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45._afterOpen_17ze5_36,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46._afterOpen_17ze5_36{transform:translateY(0)}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45._beforeClose_17ze5_40,._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46._beforeClose_17ze5_40{transform:translateY(var(--translate-y-outside-screen))}._portal_17ze5_1 ._content_17ze5_9._slideFromLeft_17ze5_29{--translate-x-outside-screen: -100%;width:var(--drawer-width);left:0}._portal_17ze5_1 ._content_17ze5_9._slideFromRight_17ze5_30{--translate-x-outside-screen: 100%;width:var(--drawer-width);right:0}._portal_17ze5_1 ._content_17ze5_9._slideFromTop_17ze5_45{--translate-y-outside-screen: -100%;height:var(--drawer-width);top:0}._portal_17ze5_1 ._content_17ze5_9._slideFromBottom_17ze5_46{--translate-y-outside-screen: 100%;height:var(--drawer-width);bottom:0}._overlay_1gix5_1{--swui-modal-animation-time: var(--swui-animation-time-fast);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;top:0;left:0;right:0;bottom:0;background-color:var(--swui-modal-overlay-bg-color);overflow:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;animation:_fadeIn_1gix5_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1gix5_1{background-color:#fff}}._overlay_1gix5_1 ._modal_1gix5_31{max-width:100%;outline:none;pointer-events:none;padding:var(--swui-metrics-space)}._overlay_1gix5_1 ._content_1gix5_38{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);border-radius:var(--swui-border-radius-large);pointer-events:all;width:var(--swui-modal-width);max-width:var(--swui-modal-max-width);animation:_appear_1gix5_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_1gix5_1 ._content_1gix5_38{box-shadow:none;top:0}}._overlay_1gix5_1 ._content_1gix5_38:focus{outline:0}._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle{cursor:move}._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle .draggable-modal-cancel,._overlay_1gix5_1 ._content_1gix5_38._isDraggable_1gix5_61 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_1gix5_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_1gix5_1{0%{opacity:0}to{opacity:1}}._footer_1gix5_92{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_1gix5_96{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_1gix5_96{position:static;box-shadow:none}}._overlay_1lu6i_1{--swui-modal-animation-time: var(--swui-animation-time-medium);--swui-modal-overlay-bg-color: var(--swui-overlay-bg-color);--swui-modal-content-bg-color: var(--swui-white);--swui-modal-width: 960px;--swui-modal-max-width: 100%;--swui-modal-header-border-color: var(--lhds-color-ui-300);--swui-modal-shadow: var(--swui-shadow-modal);--swui-modal-footer-shadow: var(--swui-shadow-modal);position:fixed;z-index:10;top:0;left:0;right:0;bottom:0;background-color:var(--swui-modal-overlay-bg-color);display:flex;flex-direction:column;justify-content:flex-start;align-items:center;opacity:0}._overlay_1lu6i_1._afterOpen_1lu6i_24:not(._beforeClose_1lu6i_24){animation:_fadeIn_1lu6i_1 var(--swui-modal-animation-time) forwards}._overlay_1lu6i_1._beforeClose_1lu6i_24{animation:_fadeOut_1lu6i_1 var(--swui-modal-animation-time) forwards}@media print{._overlay_1lu6i_1{background-color:#fff}}._overlay_1lu6i_1 ._modal_1lu6i_36{max-width:100%;outline:none;pointer-events:none;padding:calc(var(--swui-metrics-space) * 2);box-sizing:border-box;max-height:100%;transform:translateY(-100%)}@media (max-width: 768px){._overlay_1lu6i_1 ._modal_1lu6i_36{padding:0;width:100%}}._overlay_1lu6i_1 ._modal_1lu6i_36._afterOpen_1lu6i_24:not(._beforeClose_1lu6i_24){animation:_slideIn_1lu6i_1 var(--swui-modal-animation-time) forwards}._overlay_1lu6i_1 ._modal_1lu6i_36._beforeClose_1lu6i_24{animation:_slideOut_1lu6i_1 var(--swui-modal-animation-time) forwards}._overlay_1lu6i_1 ._content_1lu6i_59{position:relative;display:block;background:var(--swui-modal-content-bg-color);box-shadow:var(--swui-modal-shadow);border-radius:var(--swui-border-radius-large);pointer-events:all;width:var(--swui-modal-width);max-width:var(--swui-modal-max-width);height:100%;overflow:hidden;overflow-y:auto}@media (max-width: 768px){._overlay_1lu6i_1 ._content_1lu6i_59{border-radius:0;width:100%;max-width:100%;min-height:100dvh}}@media (min-width: 769px){._overlay_1lu6i_1 ._content_1lu6i_59{border-radius:var(--swui-border-radius-large)}._overlay_1lu6i_1 ._content_1lu6i_59::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box}._overlay_1lu6i_1 ._content_1lu6i_59::-webkit-scrollbar{width:16px}}@media print{._overlay_1lu6i_1 ._content_1lu6i_59{box-shadow:none;top:0}}._overlay_1lu6i_1 ._content_1lu6i_59:focus{outline:0}@keyframes _fadeIn_1lu6i_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_1lu6i_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_1lu6i_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_1lu6i_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._footer_1lu6i_148{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_1lu6i_152{position:-webkit-sticky;position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_1lu6i_152{position:static;box-shadow:none}}._modal_4fwgb_1{display:flex;justify-content:center;align-items:center;position:fixed;top:0;left:0;right:0;bottom:0;background-color:transparent}._overlay_4fwgb_13{position:fixed;top:0;left:0;right:0;bottom:0;background-color:var(--swui-overlay-bg-color)}._alertDialog_14t8t_1{border:0;outline:0;border-radius:var(--swui-border-radius-large);margin:auto;padding:0;overscroll-behavior:contain;opacity:0;pointer-events:none;box-shadow:#0003 0 0 10px 4px}._alertDialog_14t8t_1:not([open]){display:none}._alertDialog_14t8t_1[open]{opacity:1;pointer-events:auto;animation:_slideIn_14t8t_1 .25s forwards}._alertDialog_14t8t_1._closing_14t8t_22[open]{animation:_slideOut_14t8t_1 .25s forwards}._alertDialog_14t8t_1::backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#0d0e1080;animation:_fadeIn_14t8t_1 .25s forwards}._alertDialog_14t8t_1._closing_14t8t_22::backdrop{animation:_fadeOut_14t8t_1 .25s forwards}@keyframes _fadeIn_14t8t_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_14t8t_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_14t8t_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_14t8t_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._drawerDialog_11g6r_1{max-height:100%;max-width:100%;border:0;outline:0;margin:0;padding:0;overflow-y:auto;overscroll-behavior:contain;box-shadow:#0003 0 0 10px 4px;position:fixed}._drawerDialog_11g6r_1._left_11g6r_13,._drawerDialog_11g6r_1._right_11g6r_14{height:100%;top:0;bottom:0}._drawerDialog_11g6r_1._left_11g6r_13 ._contentWrapper_11g6r_19,._drawerDialog_11g6r_1._right_11g6r_14 ._contentWrapper_11g6r_19{height:100%}@media (max-width: 768px){._drawerDialog_11g6r_1._left_11g6r_13,._drawerDialog_11g6r_1._right_11g6r_14{width:-webkit-fit-content;width:fit-content}}._drawerDialog_11g6r_1._left_11g6r_13{left:0;right:unset}._drawerDialog_11g6r_1._left_11g6r_13[open]{animation:_slideInLeft_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._left_11g6r_13._closing_11g6r_36[open]{animation:_slideOutLeft_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._right_11g6r_14{left:unset;right:0}._drawerDialog_11g6r_1._right_11g6r_14[open]{animation:_slideInRight_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._right_11g6r_14._closing_11g6r_36[open]{animation:_slideOutRight_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._top_11g6r_54,._drawerDialog_11g6r_1._bottom_11g6r_55{width:100%;left:0;right:0}@media (max-width: 768px){._drawerDialog_11g6r_1._top_11g6r_54,._drawerDialog_11g6r_1._bottom_11g6r_55{height:-webkit-fit-content;height:fit-content}}._drawerDialog_11g6r_1._top_11g6r_54{top:0;bottom:unset}._drawerDialog_11g6r_1._top_11g6r_54[open]{animation:_slideInTop_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._top_11g6r_54._closing_11g6r_36[open]{animation:_slideOutTop_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._bottom_11g6r_55{top:unset;bottom:0}._drawerDialog_11g6r_1._bottom_11g6r_55[open]{animation:_slideInBottom_11g6r_1 .25s forwards}._drawerDialog_11g6r_1._bottom_11g6r_55._closing_11g6r_36[open]{animation:_slideOutBottom_11g6r_1 .25s forwards}._drawerDialog_11g6r_1[open]{opacity:1;pointer-events:auto}@keyframes _slideInLeft_11g6r_1{0%{transform:translate(-100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutLeft_11g6r_1{0%{transform:translate(0);opacity:0}to{transform:translate(-100%);opacity:1}}@keyframes _slideInTop_11g6r_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutTop_11g6r_1{0%{transform:translateY(0);opacity:0}to{transform:translateY(-100%);opacity:1}}@keyframes _slideInRight_11g6r_1{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutRight_11g6r_1{0%{transform:translate(0);opacity:0}to{transform:translate(100%);opacity:1}}@keyframes _slideInBottom_11g6r_1{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutBottom_11g6r_1{0%{transform:translateY(0);opacity:0}to{transform:translateY(100%);opacity:1}}._modalDialog_1teni_1{border:0;outline:0;margin:auto;padding:0;overscroll-behavior:contain;opacity:0;pointer-events:none;box-shadow:#0003 0 0 10px 4px}@media (min-width: 769px){._modalDialog_1teni_1{border-radius:var(--swui-border-radius-large)}._modalDialog_1teni_1::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box}._modalDialog_1teni_1::-webkit-scrollbar{width:16px}}._modalDialog_1teni_1:not([open]){display:none}._modalDialog_1teni_1[open]{opacity:1;pointer-events:auto;animation:_slideIn_1teni_1 .25s forwards}._modalDialog_1teni_1._closing_1teni_36[open]{animation:_slideOut_1teni_1 .25s forwards}@media (max-width: 768px){._modalDialog_1teni_1{margin:0;width:100%;max-width:100%;height:100%;max-height:100%}}._modalDialog_1teni_1::backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#0d0e1080;animation:_fadeIn_1teni_1 .25s forwards}._modalDialog_1teni_1._closing_1teni_36::backdrop{animation:_fadeOut_1teni_1 .25s forwards}@keyframes _fadeIn_1teni_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_1teni_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_1teni_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_1teni_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}@media (max-width: 768px){._contentWrapper_1teni_100{width:100%;height:100%}}._modalActionButtons_s27nj_1{display:flex;flex-direction:row;gap:16px;justify-content:center}@media (max-width: 768px){._modalActionButtons_s27nj_1{flex-direction:column;justify-content:stretch}}@media (max-width: 768px){._modalBody_ozynq_1._modalBody_ozynq_1{padding:calc(var(--swui-metrics-space) * 2)}}._modalFooter_1vp0i_1._modalFooter_1vp0i_1{align-items:center;overflow:hidden;background:var(--silver-lighter);border-radius:24px 24px 0 0;padding:0 calc((var(--swui-metrics-indent) * 5));flex-shrink:0}._modalFooter_1vp0i_1._modalFooter_1vp0i_1._sticky_1vp0i_9{position:-webkit-sticky;position:sticky;bottom:0}")),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import
|
|
3
|
-
import { jsx as n, jsxs as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { exhaustSwitchCase as
|
|
8
|
-
import { Icon as
|
|
9
|
-
import { cssColor as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
overlay:
|
|
14
|
-
fadeIn:
|
|
15
|
-
modal:
|
|
16
|
-
content:
|
|
17
|
-
appear:
|
|
18
|
-
isDraggable:
|
|
19
|
-
footer:
|
|
20
|
-
stickyFooter:
|
|
21
|
-
},
|
|
2
|
+
import k from "react-modal";
|
|
3
|
+
import { jsx as n, jsxs as f, Fragment as ce } from "react/jsx-runtime";
|
|
4
|
+
import { useRef as I, useState as T, useEffect as Oe, createContext as Ne, useReducer as $e, useCallback as A, useMemo as ie, createElement as de, useContext as Fe } from "react";
|
|
5
|
+
import De from "react-draggable";
|
|
6
|
+
import d from "classnames";
|
|
7
|
+
import { exhaustSwitchCase as xe, Spacing as j, Row as v, Space as _e, Heading as ee, useEventCallback as Be, Column as M, Box as z, Indent as ke, Txt as Le, Text as Ae } from "@stenajs-webui/core";
|
|
8
|
+
import { Icon as pe, FlatButton as he, stenaTimes as ze, Spinner as Me, CloseButton as Ee, CircledIcon as We, stenaTimesThick as Se } from "@stenajs-webui/elements";
|
|
9
|
+
import { cssColor as Te } from "@stenajs-webui/theme";
|
|
10
|
+
const In = (t) => {
|
|
11
|
+
k.setAppElement(t);
|
|
12
|
+
}, qe = "_overlay_quvmp_1", Pe = "_fadeIn_quvmp_1", He = "_modal_quvmp_31", Ge = "_content_quvmp_41", Ve = "_appear_quvmp_1", Xe = "_isDraggable_quvmp_70", Ye = "_footer_quvmp_101", Je = "_stickyFooter_quvmp_105", B = {
|
|
13
|
+
overlay: qe,
|
|
14
|
+
fadeIn: Pe,
|
|
15
|
+
modal: He,
|
|
16
|
+
content: Ge,
|
|
17
|
+
appear: Ve,
|
|
18
|
+
isDraggable: Xe,
|
|
19
|
+
footer: Ye,
|
|
20
|
+
stickyFooter: Je
|
|
21
|
+
}, ye = "draggable-modal-handle", Ce = "draggable-modal-cancel", Ke = ({
|
|
22
22
|
width: t,
|
|
23
23
|
maxWidth: e,
|
|
24
24
|
draggable: o = !1,
|
|
25
|
-
children:
|
|
26
|
-
...
|
|
25
|
+
children: r,
|
|
26
|
+
...s
|
|
27
27
|
}) => {
|
|
28
|
-
const
|
|
28
|
+
const i = I(null);
|
|
29
29
|
return /* @__PURE__ */ n(
|
|
30
|
-
|
|
30
|
+
k,
|
|
31
31
|
{
|
|
32
|
-
overlayClassName:
|
|
33
|
-
className:
|
|
34
|
-
...
|
|
32
|
+
overlayClassName: B.overlay,
|
|
33
|
+
className: B.modal,
|
|
34
|
+
...s,
|
|
35
35
|
children: /* @__PURE__ */ n(
|
|
36
|
-
|
|
36
|
+
De,
|
|
37
37
|
{
|
|
38
|
-
handle: `.${
|
|
39
|
-
cancel: `.${
|
|
38
|
+
handle: `.${ye}`,
|
|
39
|
+
cancel: `.${Ce}, button, [role="tooltip"]`,
|
|
40
40
|
bounds: ".ReactModal__Overlay",
|
|
41
41
|
disabled: !o,
|
|
42
|
-
nodeRef:
|
|
42
|
+
nodeRef: i,
|
|
43
43
|
children: /* @__PURE__ */ n(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
@@ -47,228 +47,228 @@ const bn = (t) => {
|
|
|
47
47
|
"--swui-modal-width": t,
|
|
48
48
|
"--swui-modal-max-width": e
|
|
49
49
|
},
|
|
50
|
-
className:
|
|
51
|
-
[
|
|
50
|
+
className: d(B.content, {
|
|
51
|
+
[B.isDraggable]: o
|
|
52
52
|
}),
|
|
53
|
-
ref:
|
|
54
|
-
children:
|
|
53
|
+
ref: i,
|
|
54
|
+
children: r
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
}
|
|
58
58
|
)
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
|
-
},
|
|
62
|
-
portal:
|
|
63
|
-
overlay:
|
|
64
|
-
content:
|
|
65
|
-
floating:
|
|
66
|
-
slideFromLeft:
|
|
67
|
-
slideFromRight:
|
|
68
|
-
afterOpen:
|
|
69
|
-
beforeClose:
|
|
70
|
-
slideFromTop:
|
|
71
|
-
slideFromBottom:
|
|
72
|
-
},
|
|
61
|
+
}, Qe = "_portal_17ze5_1", Ue = "_overlay_17ze5_4", Ze = "_content_17ze5_9", Re = "_floating_17ze5_15", je = "_slideFromLeft_17ze5_29", et = "_slideFromRight_17ze5_30", tt = "_afterOpen_17ze5_36", nt = "_beforeClose_17ze5_40", ot = "_slideFromTop_17ze5_45", rt = "_slideFromBottom_17ze5_46", m = {
|
|
62
|
+
portal: Qe,
|
|
63
|
+
overlay: Ue,
|
|
64
|
+
content: Ze,
|
|
65
|
+
floating: Re,
|
|
66
|
+
slideFromLeft: je,
|
|
67
|
+
slideFromRight: et,
|
|
68
|
+
afterOpen: tt,
|
|
69
|
+
beforeClose: nt,
|
|
70
|
+
slideFromTop: ot,
|
|
71
|
+
slideFromBottom: rt
|
|
72
|
+
}, On = ({
|
|
73
73
|
background: t,
|
|
74
74
|
zIndex: e,
|
|
75
75
|
children: o,
|
|
76
|
-
slideFrom:
|
|
77
|
-
portalTarget:
|
|
78
|
-
floating:
|
|
79
|
-
...
|
|
76
|
+
slideFrom: r = "left",
|
|
77
|
+
portalTarget: s,
|
|
78
|
+
floating: i,
|
|
79
|
+
...g
|
|
80
80
|
}) => {
|
|
81
|
-
const { height: a, width:
|
|
81
|
+
const { height: a, width: h } = g;
|
|
82
82
|
return /* @__PURE__ */ n(
|
|
83
|
-
|
|
83
|
+
k,
|
|
84
84
|
{
|
|
85
85
|
closeTimeoutMS: 250,
|
|
86
|
-
portalClassName:
|
|
86
|
+
portalClassName: m.portal,
|
|
87
87
|
overlayClassName: {
|
|
88
|
-
base:
|
|
89
|
-
afterOpen:
|
|
90
|
-
beforeClose:
|
|
88
|
+
base: m.overlay,
|
|
89
|
+
afterOpen: m.afterOpen,
|
|
90
|
+
beforeClose: m.beforeClose
|
|
91
91
|
},
|
|
92
92
|
className: {
|
|
93
|
-
base:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
base: d(
|
|
94
|
+
m.content,
|
|
95
|
+
st(r),
|
|
96
|
+
i && m.floating
|
|
97
97
|
),
|
|
98
|
-
afterOpen:
|
|
99
|
-
beforeClose:
|
|
98
|
+
afterOpen: m.afterOpen,
|
|
99
|
+
beforeClose: m.beforeClose
|
|
100
100
|
},
|
|
101
|
-
style: { content: { width:
|
|
102
|
-
parentSelector:
|
|
103
|
-
...
|
|
101
|
+
style: { content: { width: h, height: a, background: t }, overlay: { zIndex: e } },
|
|
102
|
+
parentSelector: s ? () => s : void 0,
|
|
103
|
+
...g,
|
|
104
104
|
children: o
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
|
-
},
|
|
107
|
+
}, st = (t) => {
|
|
108
108
|
switch (t) {
|
|
109
109
|
case "left":
|
|
110
|
-
return
|
|
110
|
+
return m.slideFromLeft;
|
|
111
111
|
case "right":
|
|
112
|
-
return
|
|
112
|
+
return m.slideFromRight;
|
|
113
113
|
case "top":
|
|
114
|
-
return
|
|
114
|
+
return m.slideFromTop;
|
|
115
115
|
case "bottom":
|
|
116
|
-
return
|
|
116
|
+
return m.slideFromBottom;
|
|
117
117
|
default:
|
|
118
|
-
return
|
|
118
|
+
return xe(t, m.slideFromLeft);
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, Nn = ({
|
|
121
121
|
header: t,
|
|
122
122
|
contentRight: e,
|
|
123
123
|
onRequestClose: o,
|
|
124
|
-
icon:
|
|
124
|
+
icon: r
|
|
125
125
|
}) => /* @__PURE__ */ n(
|
|
126
|
-
|
|
126
|
+
j,
|
|
127
127
|
{
|
|
128
128
|
position: "sticky",
|
|
129
129
|
top: 0,
|
|
130
130
|
zIndex: 100,
|
|
131
|
-
background:
|
|
132
|
-
children: /* @__PURE__ */
|
|
131
|
+
background: Te("--lhds-color-ui-50"),
|
|
132
|
+
children: /* @__PURE__ */ f(
|
|
133
133
|
v,
|
|
134
134
|
{
|
|
135
135
|
justifyContent: "space-between",
|
|
136
136
|
alignItems: "center",
|
|
137
137
|
height: "48px",
|
|
138
138
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */ n(
|
|
141
|
-
|
|
142
|
-
/* @__PURE__ */ n(
|
|
139
|
+
/* @__PURE__ */ f(v, { alignItems: "center", gap: 2, children: [
|
|
140
|
+
/* @__PURE__ */ n(_e, { num: 1 }),
|
|
141
|
+
r && /* @__PURE__ */ n(pe, { icon: r, size: 24 }),
|
|
142
|
+
/* @__PURE__ */ n(ee, { variant: "h4", children: t })
|
|
143
143
|
] }),
|
|
144
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ f(v, { gap: 1, children: [
|
|
145
145
|
e,
|
|
146
146
|
/* @__PURE__ */ n(
|
|
147
|
-
|
|
147
|
+
he,
|
|
148
148
|
{
|
|
149
|
-
leftIcon:
|
|
149
|
+
leftIcon: ze,
|
|
150
150
|
onClick: o,
|
|
151
151
|
variant: "danger"
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
/* @__PURE__ */ n(
|
|
154
|
+
/* @__PURE__ */ n(_e, { num: 0.5 })
|
|
155
155
|
] })
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
)
|
|
159
159
|
}
|
|
160
|
-
),
|
|
161
|
-
overlay:
|
|
162
|
-
fadeIn:
|
|
163
|
-
modal:
|
|
164
|
-
content:
|
|
165
|
-
appear:
|
|
166
|
-
isDraggable:
|
|
167
|
-
footer:
|
|
168
|
-
stickyFooter:
|
|
169
|
-
},
|
|
160
|
+
), lt = "_overlay_1gix5_1", at = "_fadeIn_1gix5_1", ct = "_modal_1gix5_31", it = "_content_1gix5_38", dt = "_appear_1gix5_1", _t = "_isDraggable_1gix5_61", ut = "_footer_1gix5_92", mt = "_stickyFooter_1gix5_96", Q = {
|
|
161
|
+
overlay: lt,
|
|
162
|
+
fadeIn: at,
|
|
163
|
+
modal: ct,
|
|
164
|
+
content: it,
|
|
165
|
+
appear: dt,
|
|
166
|
+
isDraggable: _t,
|
|
167
|
+
footer: ut,
|
|
168
|
+
stickyFooter: mt
|
|
169
|
+
}, ft = { overlay: { justifyContent: "center" } }, $n = ({
|
|
170
170
|
children: t,
|
|
171
171
|
...e
|
|
172
172
|
}) => /* @__PURE__ */ n(
|
|
173
|
-
|
|
173
|
+
k,
|
|
174
174
|
{
|
|
175
|
-
overlayClassName:
|
|
176
|
-
className:
|
|
177
|
-
style:
|
|
175
|
+
overlayClassName: Q.overlay,
|
|
176
|
+
className: Q.modal,
|
|
177
|
+
style: ft,
|
|
178
178
|
...e,
|
|
179
179
|
children: /* @__PURE__ */ n(
|
|
180
180
|
"div",
|
|
181
181
|
{
|
|
182
|
-
className:
|
|
182
|
+
className: Q.content,
|
|
183
183
|
style: { "--swui-modal-width": "fit-content" },
|
|
184
184
|
children: t
|
|
185
185
|
}
|
|
186
186
|
)
|
|
187
187
|
}
|
|
188
|
-
),
|
|
189
|
-
overlay:
|
|
190
|
-
afterOpen:
|
|
191
|
-
beforeClose:
|
|
192
|
-
fadeIn:
|
|
193
|
-
fadeOut:
|
|
194
|
-
modal:
|
|
195
|
-
slideIn:
|
|
196
|
-
slideOut:
|
|
197
|
-
content:
|
|
198
|
-
footer:
|
|
199
|
-
stickyFooter:
|
|
200
|
-
},
|
|
188
|
+
), gt = "_overlay_1lu6i_1", pt = "_afterOpen_1lu6i_24", ht = "_beforeClose_1lu6i_24", yt = "_fadeIn_1lu6i_1", Ct = "_fadeOut_1lu6i_1", vt = "_modal_1lu6i_36", bt = "_slideIn_1lu6i_1", wt = "_slideOut_1lu6i_1", It = "_content_1lu6i_59", Ot = "_footer_1lu6i_148", Nt = "_stickyFooter_1lu6i_152", D = {
|
|
189
|
+
overlay: gt,
|
|
190
|
+
afterOpen: pt,
|
|
191
|
+
beforeClose: ht,
|
|
192
|
+
fadeIn: yt,
|
|
193
|
+
fadeOut: Ct,
|
|
194
|
+
modal: vt,
|
|
195
|
+
slideIn: bt,
|
|
196
|
+
slideOut: wt,
|
|
197
|
+
content: It,
|
|
198
|
+
footer: Ot,
|
|
199
|
+
stickyFooter: Nt
|
|
200
|
+
}, ue = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), $t = ({
|
|
201
201
|
children: t,
|
|
202
202
|
background: e,
|
|
203
203
|
...o
|
|
204
204
|
}) => {
|
|
205
|
-
const
|
|
205
|
+
const r = I(null), [s, i] = T(ue ? "auto" : void 0), g = {
|
|
206
206
|
overlay: { justifyContent: "center" },
|
|
207
207
|
content: {
|
|
208
208
|
"--swui-modal-content-bg-color": e
|
|
209
209
|
}
|
|
210
|
-
}, a =
|
|
211
|
-
if (!
|
|
210
|
+
}, a = Be(() => {
|
|
211
|
+
if (!ue)
|
|
212
212
|
return;
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
const h = r.current;
|
|
214
|
+
h && i(
|
|
215
|
+
h.scrollHeight > h.clientHeight ? "stable" : "auto"
|
|
216
216
|
);
|
|
217
217
|
});
|
|
218
|
-
return
|
|
218
|
+
return Oe(() => (window.addEventListener("resize", a), document.addEventListener("DOMContentLoaded", a), () => {
|
|
219
219
|
window.removeEventListener("resize", a), document.removeEventListener("DOMContentLoaded", a);
|
|
220
220
|
}), [a]), /* @__PURE__ */ n(
|
|
221
|
-
|
|
221
|
+
k,
|
|
222
222
|
{
|
|
223
223
|
overlayClassName: {
|
|
224
|
-
base:
|
|
225
|
-
beforeClose:
|
|
226
|
-
afterOpen:
|
|
224
|
+
base: D.overlay,
|
|
225
|
+
beforeClose: D.beforeClose,
|
|
226
|
+
afterOpen: D.afterOpen
|
|
227
227
|
},
|
|
228
228
|
className: {
|
|
229
|
-
base:
|
|
230
|
-
beforeClose:
|
|
231
|
-
afterOpen:
|
|
229
|
+
base: D.modal,
|
|
230
|
+
beforeClose: D.beforeClose,
|
|
231
|
+
afterOpen: D.afterOpen
|
|
232
232
|
},
|
|
233
|
-
style:
|
|
233
|
+
style: g,
|
|
234
234
|
closeTimeoutMS: 250,
|
|
235
235
|
onAfterOpen: a,
|
|
236
236
|
...o,
|
|
237
237
|
children: /* @__PURE__ */ n(
|
|
238
238
|
"div",
|
|
239
239
|
{
|
|
240
|
-
className:
|
|
240
|
+
className: D.content,
|
|
241
241
|
style: {
|
|
242
242
|
"--swui-modal-width": "fit-content",
|
|
243
|
-
scrollbarGutter:
|
|
243
|
+
scrollbarGutter: s
|
|
244
244
|
},
|
|
245
|
-
ref:
|
|
245
|
+
ref: r,
|
|
246
246
|
children: t
|
|
247
247
|
}
|
|
248
248
|
)
|
|
249
249
|
}
|
|
250
250
|
);
|
|
251
|
-
},
|
|
252
|
-
modal:
|
|
253
|
-
overlay:
|
|
254
|
-
},
|
|
251
|
+
}, Ft = "_modal_4fwgb_1", Dt = "_overlay_4fwgb_13", me = {
|
|
252
|
+
modal: Ft,
|
|
253
|
+
overlay: Dt
|
|
254
|
+
}, Fn = ({
|
|
255
255
|
headerIconLeft: t,
|
|
256
256
|
headerText: e,
|
|
257
257
|
shouldCloseOnOverlayClick: o = !1,
|
|
258
|
-
shouldCloseOnEsc:
|
|
259
|
-
...
|
|
258
|
+
shouldCloseOnEsc: r = !1,
|
|
259
|
+
...s
|
|
260
260
|
}) => /* @__PURE__ */ n(
|
|
261
|
-
|
|
261
|
+
k,
|
|
262
262
|
{
|
|
263
|
-
...
|
|
263
|
+
...s,
|
|
264
264
|
isOpen: !0,
|
|
265
265
|
shouldCloseOnOverlayClick: o,
|
|
266
|
-
shouldCloseOnEsc:
|
|
267
|
-
className:
|
|
268
|
-
overlayClassName:
|
|
269
|
-
children: /* @__PURE__ */
|
|
266
|
+
shouldCloseOnEsc: r,
|
|
267
|
+
className: me.modal,
|
|
268
|
+
overlayClassName: me.overlay,
|
|
269
|
+
children: /* @__PURE__ */ f(M, { spacing: 2, alignItems: "center", children: [
|
|
270
270
|
/* @__PURE__ */ n(
|
|
271
|
-
|
|
271
|
+
z,
|
|
272
272
|
{
|
|
273
273
|
alignItems: "center",
|
|
274
274
|
justifyContent: "center",
|
|
@@ -277,322 +277,329 @@ const bn = (t) => {
|
|
|
277
277
|
borderRadius: "50%",
|
|
278
278
|
background: "white",
|
|
279
279
|
shadow: "modal",
|
|
280
|
-
children: /* @__PURE__ */ n(
|
|
280
|
+
children: /* @__PURE__ */ n(Me, { size: "small" })
|
|
281
281
|
}
|
|
282
282
|
),
|
|
283
|
-
(t || e) && /* @__PURE__ */
|
|
284
|
-
/* @__PURE__ */ n(
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
t && /* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */ n(
|
|
288
|
-
/* @__PURE__ */ n(
|
|
283
|
+
(t || e) && /* @__PURE__ */ f(ce, { children: [
|
|
284
|
+
/* @__PURE__ */ n(j, {}),
|
|
285
|
+
/* @__PURE__ */ f(v, { indent: 2, children: [
|
|
286
|
+
t && /* @__PURE__ */ f(ce, { children: [
|
|
287
|
+
/* @__PURE__ */ n(pe, { size: 14, icon: t, color: "white" }),
|
|
288
|
+
/* @__PURE__ */ n(ke, {})
|
|
289
289
|
] }),
|
|
290
|
-
e && /* @__PURE__ */ n(
|
|
290
|
+
e && /* @__PURE__ */ n(ee, { variant: "h4", color: "white", children: e })
|
|
291
291
|
] })
|
|
292
292
|
] })
|
|
293
293
|
] })
|
|
294
294
|
}
|
|
295
|
-
),
|
|
295
|
+
), xt = ({
|
|
296
296
|
onRequestClose: t,
|
|
297
297
|
header: e,
|
|
298
298
|
headerText: o,
|
|
299
|
-
closeButtonClassName:
|
|
300
|
-
}) => /* @__PURE__ */
|
|
299
|
+
closeButtonClassName: r
|
|
300
|
+
}) => /* @__PURE__ */ f(
|
|
301
301
|
v,
|
|
302
302
|
{
|
|
303
303
|
spacing: 2,
|
|
304
304
|
indent: 2,
|
|
305
305
|
borderBottom: "1px solid var(--lhds-color-ui-300)",
|
|
306
|
-
className:
|
|
306
|
+
className: ye,
|
|
307
307
|
children: [
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
o && /* @__PURE__ */ n(
|
|
308
|
+
/* @__PURE__ */ f(v, { flex: 1, indent: !0, alignItems: "center", children: [
|
|
309
|
+
o && /* @__PURE__ */ n(Le, { className: Ce, size: "large", children: o }),
|
|
310
310
|
e
|
|
311
311
|
] }),
|
|
312
|
-
/* @__PURE__ */ n(
|
|
313
|
-
|
|
312
|
+
/* @__PURE__ */ n(z, { alignSelf: "flex-start", children: /* @__PURE__ */ n(
|
|
313
|
+
Ee,
|
|
314
314
|
{
|
|
315
|
-
className:
|
|
315
|
+
className: r,
|
|
316
316
|
onClick: t
|
|
317
317
|
}
|
|
318
318
|
) })
|
|
319
319
|
]
|
|
320
320
|
}
|
|
321
|
-
),
|
|
321
|
+
), Dn = ({
|
|
322
322
|
header: t,
|
|
323
323
|
headerText: e,
|
|
324
324
|
children: o,
|
|
325
|
-
spacing:
|
|
326
|
-
indent:
|
|
327
|
-
draggable:
|
|
328
|
-
onRequestClose:
|
|
325
|
+
spacing: r,
|
|
326
|
+
indent: s,
|
|
327
|
+
draggable: i = !1,
|
|
328
|
+
onRequestClose: g,
|
|
329
329
|
closeButtonClassName: a,
|
|
330
|
-
footer:
|
|
331
|
-
disableStickyFooter:
|
|
332
|
-
...
|
|
333
|
-
}) => /* @__PURE__ */
|
|
334
|
-
|
|
330
|
+
footer: h,
|
|
331
|
+
disableStickyFooter: L = !1,
|
|
332
|
+
...C
|
|
333
|
+
}) => /* @__PURE__ */ f(
|
|
334
|
+
Ke,
|
|
335
335
|
{
|
|
336
|
-
...
|
|
337
|
-
onRequestClose:
|
|
338
|
-
draggable:
|
|
336
|
+
...C,
|
|
337
|
+
onRequestClose: g,
|
|
338
|
+
draggable: i,
|
|
339
339
|
children: [
|
|
340
340
|
/* @__PURE__ */ n(
|
|
341
|
-
|
|
341
|
+
xt,
|
|
342
342
|
{
|
|
343
|
-
onRequestClose:
|
|
343
|
+
onRequestClose: g,
|
|
344
344
|
header: t,
|
|
345
345
|
headerText: e,
|
|
346
346
|
closeButtonClassName: a
|
|
347
347
|
}
|
|
348
348
|
),
|
|
349
|
-
/* @__PURE__ */ n(
|
|
350
|
-
|
|
351
|
-
|
|
349
|
+
/* @__PURE__ */ n(z, { spacing: typeof r == "number" ? r : 1, indent: typeof s == "number" ? s : 1, children: o }),
|
|
350
|
+
h && /* @__PURE__ */ n(
|
|
351
|
+
z,
|
|
352
352
|
{
|
|
353
|
-
className:
|
|
354
|
-
[
|
|
353
|
+
className: d(B.footer, {
|
|
354
|
+
[B.stickyFooter]: !L
|
|
355
355
|
}),
|
|
356
|
-
children:
|
|
356
|
+
children: h
|
|
357
357
|
}
|
|
358
358
|
)
|
|
359
359
|
]
|
|
360
360
|
}
|
|
361
|
-
),
|
|
361
|
+
), xn = ({ children: t }) => /* @__PURE__ */ n(M, { indent: 2, spacing: 2, children: t }), R = Ne(
|
|
362
362
|
void 0
|
|
363
363
|
);
|
|
364
|
-
function
|
|
364
|
+
function te(t, {
|
|
365
365
|
ref: e,
|
|
366
366
|
modal: o,
|
|
367
|
-
contentWrapperClassName:
|
|
368
|
-
closingClassName:
|
|
369
|
-
contentWrapperStyle:
|
|
370
|
-
dialogStyle:
|
|
367
|
+
contentWrapperClassName: r,
|
|
368
|
+
closingClassName: s,
|
|
369
|
+
contentWrapperStyle: i,
|
|
370
|
+
dialogStyle: g,
|
|
371
371
|
divInsteadOfDialog: a,
|
|
372
|
-
disableCloseOnClickOutside:
|
|
372
|
+
disableCloseOnClickOutside: h,
|
|
373
|
+
elementId: L,
|
|
373
374
|
onResolve: C,
|
|
374
|
-
onReject:
|
|
375
|
-
className:
|
|
376
|
-
background:
|
|
377
|
-
label:
|
|
378
|
-
labelledby:
|
|
379
|
-
describedby:
|
|
375
|
+
onReject: p,
|
|
376
|
+
className: q,
|
|
377
|
+
background: P,
|
|
378
|
+
label: H,
|
|
379
|
+
labelledby: G,
|
|
380
|
+
describedby: V
|
|
380
381
|
}) {
|
|
381
|
-
const
|
|
382
|
-
(
|
|
383
|
-
var
|
|
384
|
-
return
|
|
385
|
-
(
|
|
386
|
-
|
|
382
|
+
const be = I(null), _ = e ?? be, [X, we] = $e((c) => c + 1, 0), ne = I(null), O = I(null), b = I(void 0), E = I(!1), y = I(null), [oe, W] = T(!1), [Y, x] = T(!1), [re, w] = T(!1), J = t, Ie = A(
|
|
383
|
+
(c) => {
|
|
384
|
+
var l, u;
|
|
385
|
+
return ne.current = new Promise(
|
|
386
|
+
($, F) => {
|
|
387
|
+
O.current = $, y.current = F;
|
|
387
388
|
}
|
|
388
|
-
), w(!1),
|
|
389
|
+
), w(!1), W(!0), x(!0), we(), E.current = !1, b.current = c, o ? (l = _.current) == null || l.showModal() : (u = _.current) == null || u.show(), ne.current;
|
|
389
390
|
},
|
|
390
|
-
[
|
|
391
|
-
),
|
|
392
|
-
(
|
|
393
|
-
var
|
|
394
|
-
w(!0),
|
|
395
|
-
var
|
|
396
|
-
w(!1),
|
|
397
|
-
}, 300) : (
|
|
391
|
+
[_, o]
|
|
392
|
+
), se = A(
|
|
393
|
+
(c) => {
|
|
394
|
+
var l;
|
|
395
|
+
E.current = !0, w(!0), W(!1), a ? setTimeout(() => {
|
|
396
|
+
var u;
|
|
397
|
+
w(!1), x(!1), (u = O.current) == null || u.call(O, c), b.current = void 0, C == null || C();
|
|
398
|
+
}, 300) : (l = _.current) == null || l.addEventListener(
|
|
398
399
|
"animationend",
|
|
399
|
-
() => {
|
|
400
|
-
var
|
|
401
|
-
w(!1),
|
|
400
|
+
(u) => {
|
|
401
|
+
var $, F;
|
|
402
|
+
u.stopPropagation(), w(!1), x(!1), ($ = _.current) == null || $.close(), (F = O.current) == null || F.call(O, c), b.current = void 0, C == null || C();
|
|
402
403
|
},
|
|
403
404
|
{ once: !0 }
|
|
404
405
|
);
|
|
405
406
|
},
|
|
406
|
-
[
|
|
407
|
-
),
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
var d;
|
|
415
|
-
w(!1), D(!1), (d = y.current) == null || d.call(y, l), m == null || m(), b.current = void 0;
|
|
416
|
-
}, 300) : (i = u.current) == null || i.addEventListener(
|
|
407
|
+
[_, C, a]
|
|
408
|
+
), N = A(
|
|
409
|
+
(c) => {
|
|
410
|
+
var l;
|
|
411
|
+
E.current = !0, w(!0), W(!1), a ? setTimeout(() => {
|
|
412
|
+
var u;
|
|
413
|
+
w(!1), x(!1), (u = y.current) == null || u.call(y, c), p == null || p(), b.current = void 0;
|
|
414
|
+
}, 300) : (l = _.current) == null || l.addEventListener(
|
|
417
415
|
"animationend",
|
|
418
|
-
() => {
|
|
419
|
-
var
|
|
420
|
-
w(!1),
|
|
416
|
+
(u) => {
|
|
417
|
+
var $, F;
|
|
418
|
+
u.stopPropagation(), w(!1), x(!1), ($ = _.current) == null || $.close(), (F = y.current) == null || F.call(y, c), p == null || p(), b.current = void 0;
|
|
421
419
|
},
|
|
422
420
|
{ once: !0 }
|
|
423
421
|
);
|
|
424
422
|
},
|
|
425
|
-
[
|
|
426
|
-
),
|
|
427
|
-
(
|
|
428
|
-
|
|
423
|
+
[_, a, p]
|
|
424
|
+
), le = A(
|
|
425
|
+
(c) => {
|
|
426
|
+
var l;
|
|
427
|
+
c.stopPropagation(), E.current || (w(!1), W(!1), x(!1), (l = y.current) == null || l.call(y), p == null || p(), b.current = void 0);
|
|
428
|
+
},
|
|
429
|
+
[p]
|
|
430
|
+
), ae = A(
|
|
431
|
+
(c) => {
|
|
432
|
+
if (c.target !== _.current)
|
|
429
433
|
return;
|
|
430
|
-
const
|
|
431
|
-
|
|
434
|
+
const l = _.current.getBoundingClientRect();
|
|
435
|
+
l.top <= c.clientY && c.clientY <= l.top + l.height && l.left <= c.clientX && c.clientX <= l.left + l.width || N();
|
|
432
436
|
},
|
|
433
|
-
[
|
|
434
|
-
),
|
|
435
|
-
() => ({ resolve:
|
|
436
|
-
[
|
|
437
|
+
[_, N]
|
|
438
|
+
), K = ie(
|
|
439
|
+
() => ({ resolve: se, reject: N }),
|
|
440
|
+
[N, se]
|
|
437
441
|
);
|
|
438
|
-
return [
|
|
442
|
+
return [ie(
|
|
439
443
|
() => a ? /* @__PURE__ */ n(
|
|
440
|
-
|
|
444
|
+
$t,
|
|
441
445
|
{
|
|
442
|
-
isOpen:
|
|
443
|
-
onRequestClose:
|
|
444
|
-
background:
|
|
445
|
-
contentLabel:
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
isOpen: oe,
|
|
447
|
+
onRequestClose: N,
|
|
448
|
+
background: P,
|
|
449
|
+
contentLabel: H,
|
|
450
|
+
id: L,
|
|
451
|
+
aria: { modal: !0, labelledby: G, describedby: V },
|
|
452
|
+
children: /* @__PURE__ */ n(R.Provider, { value: K, children: Y && /* @__PURE__ */ de(J, { ...b.current, key: X }) })
|
|
448
453
|
}
|
|
449
454
|
) : /* @__PURE__ */ n(
|
|
450
455
|
"dialog",
|
|
451
456
|
{
|
|
452
|
-
onClick:
|
|
453
|
-
onClose:
|
|
454
|
-
ref:
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
"aria-
|
|
458
|
-
"aria-
|
|
459
|
-
|
|
460
|
-
|
|
457
|
+
onClick: h ? void 0 : ae,
|
|
458
|
+
onClose: le,
|
|
459
|
+
ref: _,
|
|
460
|
+
id: L,
|
|
461
|
+
className: d(q, re && s),
|
|
462
|
+
"aria-label": H,
|
|
463
|
+
"aria-labelledby": G,
|
|
464
|
+
"aria-describedby": V,
|
|
465
|
+
style: { background: P, ...g },
|
|
466
|
+
children: /* @__PURE__ */ n("div", { style: i, className: r, children: Y && /* @__PURE__ */ n(R.Provider, { value: K, children: /* @__PURE__ */ de(J, { ...b.current, key: X }) }) })
|
|
461
467
|
}
|
|
462
468
|
),
|
|
463
469
|
[
|
|
464
470
|
a,
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
z,
|
|
468
|
-
T,
|
|
469
|
-
q,
|
|
470
|
-
H,
|
|
471
|
-
X,
|
|
471
|
+
oe,
|
|
472
|
+
N,
|
|
472
473
|
P,
|
|
473
|
-
|
|
474
|
+
H,
|
|
475
|
+
L,
|
|
474
476
|
G,
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
te,
|
|
481
|
-
r,
|
|
477
|
+
V,
|
|
478
|
+
K,
|
|
479
|
+
Y,
|
|
480
|
+
J,
|
|
481
|
+
X,
|
|
482
482
|
h,
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
ae,
|
|
484
|
+
le,
|
|
485
|
+
_,
|
|
486
|
+
q,
|
|
487
|
+
re,
|
|
488
|
+
s,
|
|
489
|
+
g,
|
|
490
|
+
i,
|
|
491
|
+
r
|
|
485
492
|
]
|
|
486
|
-
), { show:
|
|
493
|
+
), { show: Ie, reject: N }];
|
|
487
494
|
}
|
|
488
|
-
const
|
|
489
|
-
const t =
|
|
495
|
+
const Bn = () => {
|
|
496
|
+
const t = Fe(R);
|
|
490
497
|
if (t == null)
|
|
491
498
|
throw new Error("useDialogPromise is being used outside of dialog.");
|
|
492
499
|
return t;
|
|
493
|
-
},
|
|
494
|
-
alertDialog:
|
|
495
|
-
slideIn:
|
|
496
|
-
closing:
|
|
497
|
-
slideOut:
|
|
498
|
-
fadeIn:
|
|
499
|
-
fadeOut:
|
|
500
|
+
}, Bt = "_alertDialog_14t8t_1", kt = "_slideIn_14t8t_1", Lt = "_closing_14t8t_22", At = "_slideOut_14t8t_1", zt = "_fadeIn_14t8t_1", Mt = "_fadeOut_14t8t_1", U = {
|
|
501
|
+
alertDialog: Bt,
|
|
502
|
+
slideIn: kt,
|
|
503
|
+
closing: Lt,
|
|
504
|
+
slideOut: At,
|
|
505
|
+
fadeIn: zt,
|
|
506
|
+
fadeOut: Mt
|
|
500
507
|
};
|
|
501
|
-
function
|
|
502
|
-
return
|
|
508
|
+
function kn(t, e) {
|
|
509
|
+
return te(t, {
|
|
503
510
|
...e,
|
|
504
511
|
modal: !0,
|
|
505
|
-
closingClassName:
|
|
506
|
-
contentWrapperClassName:
|
|
512
|
+
closingClassName: d(e == null ? void 0 : e.closingClassName, U.closing),
|
|
513
|
+
contentWrapperClassName: d(
|
|
507
514
|
e == null ? void 0 : e.contentWrapperClassName,
|
|
508
|
-
|
|
515
|
+
U.contentWrapper
|
|
509
516
|
),
|
|
510
|
-
className:
|
|
517
|
+
className: d(e == null ? void 0 : e.className, U.alertDialog)
|
|
511
518
|
});
|
|
512
519
|
}
|
|
513
|
-
const
|
|
514
|
-
drawerDialog:
|
|
515
|
-
left:
|
|
516
|
-
right:
|
|
517
|
-
contentWrapper:
|
|
518
|
-
slideInLeft:
|
|
519
|
-
closing:
|
|
520
|
-
slideOutLeft:
|
|
521
|
-
slideInRight:
|
|
522
|
-
slideOutRight:
|
|
523
|
-
top:
|
|
524
|
-
bottom:
|
|
525
|
-
slideInTop:
|
|
526
|
-
slideOutTop:
|
|
527
|
-
slideInBottom:
|
|
528
|
-
slideOutBottom:
|
|
520
|
+
const Et = "_drawerDialog_11g6r_1", Wt = "_left_11g6r_13", St = "_right_11g6r_14", Tt = "_contentWrapper_11g6r_19", qt = "_slideInLeft_11g6r_1", Pt = "_closing_11g6r_36", Ht = "_slideOutLeft_11g6r_1", Gt = "_slideInRight_11g6r_1", Vt = "_slideOutRight_11g6r_1", Xt = "_top_11g6r_54", Yt = "_bottom_11g6r_55", Jt = "_slideInTop_11g6r_1", Kt = "_slideOutTop_11g6r_1", Qt = "_slideInBottom_11g6r_1", Ut = "_slideOutBottom_11g6r_1", S = {
|
|
521
|
+
drawerDialog: Et,
|
|
522
|
+
left: Wt,
|
|
523
|
+
right: St,
|
|
524
|
+
contentWrapper: Tt,
|
|
525
|
+
slideInLeft: qt,
|
|
526
|
+
closing: Pt,
|
|
527
|
+
slideOutLeft: Ht,
|
|
528
|
+
slideInRight: Gt,
|
|
529
|
+
slideOutRight: Vt,
|
|
530
|
+
top: Xt,
|
|
531
|
+
bottom: Yt,
|
|
532
|
+
slideInTop: Jt,
|
|
533
|
+
slideOutTop: Kt,
|
|
534
|
+
slideInBottom: Qt,
|
|
535
|
+
slideOutBottom: Ut
|
|
529
536
|
};
|
|
530
|
-
function
|
|
531
|
-
return
|
|
537
|
+
function Ln(t, e = "left", o) {
|
|
538
|
+
return te(t, {
|
|
532
539
|
...o,
|
|
533
540
|
disableCloseOnClickOutside: !0,
|
|
534
541
|
modal: !1,
|
|
535
|
-
closingClassName:
|
|
536
|
-
contentWrapperClassName:
|
|
542
|
+
closingClassName: d(o == null ? void 0 : o.closingClassName, S.closing),
|
|
543
|
+
contentWrapperClassName: d(
|
|
537
544
|
o == null ? void 0 : o.contentWrapperClassName,
|
|
538
|
-
|
|
545
|
+
S.contentWrapper
|
|
539
546
|
),
|
|
540
|
-
className:
|
|
547
|
+
className: d(o == null ? void 0 : o.className, S.drawerDialog, S[e])
|
|
541
548
|
});
|
|
542
549
|
}
|
|
543
|
-
const
|
|
544
|
-
modalDialog:
|
|
545
|
-
slideIn:
|
|
546
|
-
closing:
|
|
547
|
-
slideOut:
|
|
548
|
-
fadeIn:
|
|
549
|
-
fadeOut:
|
|
550
|
-
contentWrapper:
|
|
550
|
+
const Zt = "_modalDialog_1teni_1", Rt = "_slideIn_1teni_1", jt = "_closing_1teni_36", en = "_slideOut_1teni_1", tn = "_fadeIn_1teni_1", nn = "_fadeOut_1teni_1", on = "_contentWrapper_1teni_100", Z = {
|
|
551
|
+
modalDialog: Zt,
|
|
552
|
+
slideIn: Rt,
|
|
553
|
+
closing: jt,
|
|
554
|
+
slideOut: en,
|
|
555
|
+
fadeIn: tn,
|
|
556
|
+
fadeOut: nn,
|
|
557
|
+
contentWrapper: on
|
|
551
558
|
};
|
|
552
|
-
function
|
|
553
|
-
return
|
|
559
|
+
function An(t, e) {
|
|
560
|
+
return te(t, {
|
|
554
561
|
...e,
|
|
555
562
|
modal: !0,
|
|
556
|
-
closingClassName:
|
|
557
|
-
contentWrapperClassName:
|
|
563
|
+
closingClassName: d(e == null ? void 0 : e.closingClassName, Z.closing),
|
|
564
|
+
contentWrapperClassName: d(
|
|
558
565
|
e == null ? void 0 : e.contentWrapperClassName,
|
|
559
|
-
|
|
566
|
+
Z.contentWrapper
|
|
560
567
|
),
|
|
561
|
-
className:
|
|
568
|
+
className: d(e == null ? void 0 : e.className, Z.modalDialog)
|
|
562
569
|
});
|
|
563
570
|
}
|
|
564
|
-
const
|
|
571
|
+
const ve = ({
|
|
565
572
|
headingLevel: t = "h2",
|
|
566
573
|
size: e = "medium",
|
|
567
574
|
children: o
|
|
568
|
-
}) => /* @__PURE__ */ n(
|
|
569
|
-
modalActionButtons:
|
|
570
|
-
}, sn = ({
|
|
571
|
-
children: t
|
|
572
|
-
}) => /* @__PURE__ */ g(L, { width: "100%", children: [
|
|
573
|
-
/* @__PURE__ */ n(U, {}),
|
|
574
|
-
/* @__PURE__ */ n("div", { className: on.modalActionButtons, children: t })
|
|
575
|
-
] }), rn = "_modalBody_ozynq_1", _e = {
|
|
576
|
-
modalBody: rn
|
|
575
|
+
}) => /* @__PURE__ */ n(ee, { variant: e === "medium" ? "h3" : "h1", as: t, children: o }), rn = "_modalActionButtons_s27nj_1", sn = {
|
|
576
|
+
modalActionButtons: rn
|
|
577
577
|
}, ln = ({
|
|
578
|
+
children: t
|
|
579
|
+
}) => /* @__PURE__ */ f(z, { width: "100%", children: [
|
|
580
|
+
/* @__PURE__ */ n(j, {}),
|
|
581
|
+
/* @__PURE__ */ n("div", { className: sn.modalActionButtons, children: t })
|
|
582
|
+
] }), an = "_modalBody_ozynq_1", fe = {
|
|
583
|
+
modalBody: an
|
|
584
|
+
}, cn = ({
|
|
578
585
|
gap: t = 3,
|
|
579
586
|
variant: e = "normal",
|
|
580
587
|
className: o,
|
|
581
|
-
...
|
|
588
|
+
...r
|
|
582
589
|
}) => /* @__PURE__ */ n(
|
|
583
|
-
|
|
590
|
+
M,
|
|
584
591
|
{
|
|
585
|
-
className:
|
|
592
|
+
className: d(fe.modalBody, fe[e], o),
|
|
586
593
|
indent: e === "relaxed" ? 5 : 3,
|
|
587
594
|
spacing: e === "relaxed" ? 5 : 3,
|
|
588
595
|
gap: t,
|
|
589
|
-
...
|
|
596
|
+
...r
|
|
590
597
|
}
|
|
591
|
-
),
|
|
598
|
+
), dn = ({
|
|
592
599
|
children: t,
|
|
593
600
|
maxWidth: e
|
|
594
601
|
}) => /* @__PURE__ */ n(
|
|
595
|
-
|
|
602
|
+
M,
|
|
596
603
|
{
|
|
597
604
|
flex: 1,
|
|
598
605
|
height: "100%",
|
|
@@ -600,98 +607,98 @@ const pe = ({
|
|
|
600
607
|
maxWidth: e,
|
|
601
608
|
children: t
|
|
602
609
|
}
|
|
603
|
-
),
|
|
610
|
+
), zn = ({
|
|
604
611
|
icon: t,
|
|
605
612
|
buttons: e,
|
|
606
613
|
heading: o,
|
|
607
|
-
text:
|
|
608
|
-
children:
|
|
609
|
-
maxWidth:
|
|
610
|
-
minWidth:
|
|
611
|
-
}) => /* @__PURE__ */ n(
|
|
612
|
-
|
|
614
|
+
text: r,
|
|
615
|
+
children: s,
|
|
616
|
+
maxWidth: i,
|
|
617
|
+
minWidth: g
|
|
618
|
+
}) => /* @__PURE__ */ n(dn, { children: /* @__PURE__ */ f(
|
|
619
|
+
cn,
|
|
613
620
|
{
|
|
614
621
|
flexDirection: "column",
|
|
615
622
|
alignItems: "center",
|
|
616
|
-
maxWidth:
|
|
617
|
-
minWidth:
|
|
623
|
+
maxWidth: i,
|
|
624
|
+
minWidth: g,
|
|
618
625
|
children: [
|
|
619
|
-
t && /* @__PURE__ */ n(
|
|
620
|
-
/* @__PURE__ */ n(
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
e && /* @__PURE__ */ n(
|
|
626
|
+
t && /* @__PURE__ */ n(We, { icon: t, size: "large" }),
|
|
627
|
+
/* @__PURE__ */ n(ve, { children: o }),
|
|
628
|
+
r && /* @__PURE__ */ n(Ae, { textAlign: "center", children: r }),
|
|
629
|
+
s,
|
|
630
|
+
e && /* @__PURE__ */ n(ln, { children: e })
|
|
624
631
|
]
|
|
625
632
|
}
|
|
626
|
-
) }),
|
|
627
|
-
|
|
633
|
+
) }), _n = (t) => /* @__PURE__ */ n(
|
|
634
|
+
he,
|
|
628
635
|
{
|
|
629
636
|
size: "large",
|
|
630
637
|
variant: "danger",
|
|
631
|
-
leftIcon:
|
|
638
|
+
leftIcon: Se,
|
|
632
639
|
...t
|
|
633
640
|
}
|
|
634
|
-
),
|
|
641
|
+
), Mn = ({
|
|
635
642
|
heading: t,
|
|
636
643
|
headingLevel: e,
|
|
637
644
|
headingSize: o,
|
|
638
|
-
onClickClose:
|
|
639
|
-
closeButtonAriaLabel:
|
|
640
|
-
}) => /* @__PURE__ */ n(
|
|
641
|
-
t ? /* @__PURE__ */ n(
|
|
642
|
-
|
|
643
|
-
|
|
645
|
+
onClickClose: r,
|
|
646
|
+
closeButtonAriaLabel: s
|
|
647
|
+
}) => /* @__PURE__ */ n(M, { children: /* @__PURE__ */ f(v, { justifyContent: "space-between", alignItems: "center", gap: 2, children: [
|
|
648
|
+
t ? /* @__PURE__ */ n(ve, { headingLevel: e, size: o, children: t }) : /* @__PURE__ */ n("div", {}),
|
|
649
|
+
r ? /* @__PURE__ */ n(
|
|
650
|
+
_n,
|
|
644
651
|
{
|
|
645
|
-
onClick:
|
|
652
|
+
onClick: r,
|
|
646
653
|
size: o,
|
|
647
|
-
"aria-label":
|
|
654
|
+
"aria-label": s
|
|
648
655
|
}
|
|
649
656
|
) : null
|
|
650
|
-
] }) }),
|
|
651
|
-
modalFooter:
|
|
652
|
-
sticky:
|
|
653
|
-
},
|
|
657
|
+
] }) }), un = "_modalFooter_1vp0i_1", mn = "_sticky_1vp0i_9", ge = {
|
|
658
|
+
modalFooter: un,
|
|
659
|
+
sticky: mn
|
|
660
|
+
}, En = ({
|
|
654
661
|
children: t,
|
|
655
662
|
sticky: e,
|
|
656
663
|
zIndex: o = 4,
|
|
657
|
-
gap:
|
|
658
|
-
className:
|
|
659
|
-
...
|
|
664
|
+
gap: r = 2,
|
|
665
|
+
className: s,
|
|
666
|
+
...i
|
|
660
667
|
}) => /* @__PURE__ */ n(
|
|
661
668
|
v,
|
|
662
669
|
{
|
|
663
|
-
className:
|
|
670
|
+
className: d(ge.modalFooter, e && ge.sticky, s),
|
|
664
671
|
shadow: "var(--swui-sticky-footer-shadow)",
|
|
665
672
|
zIndex: o,
|
|
666
|
-
...
|
|
667
|
-
children: /* @__PURE__ */ n(v, { gap:
|
|
673
|
+
...i,
|
|
674
|
+
children: /* @__PURE__ */ n(v, { gap: r, spacing: 2, alignItems: "center", children: t })
|
|
668
675
|
}
|
|
669
676
|
);
|
|
670
677
|
export {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
678
|
+
$n as Alert,
|
|
679
|
+
Ke as BaseWindow,
|
|
680
|
+
Ce as DRAGGABLE_CANCEL_CLASSNAME,
|
|
681
|
+
ye as DRAGGABLE_HANDLE_CLASSNAME,
|
|
682
|
+
R as DialogContext,
|
|
683
|
+
On as Drawer,
|
|
684
|
+
Nn as DrawerHeader,
|
|
685
|
+
zn as InfoAlert,
|
|
686
|
+
Fn as LoadingModal,
|
|
687
|
+
$t as Modal,
|
|
688
|
+
ln as ModalActionButtons,
|
|
689
|
+
cn as ModalBody,
|
|
690
|
+
dn as ModalContainer,
|
|
691
|
+
En as ModalFooter,
|
|
692
|
+
Mn as ModalHeader,
|
|
693
|
+
ve as ModalHeading,
|
|
694
|
+
Dn as Window,
|
|
695
|
+
xn as WindowFooter,
|
|
696
|
+
xt as WindowHeader,
|
|
697
|
+
In as setupDeclarativeModals,
|
|
698
|
+
kn as useAlertDialog,
|
|
699
|
+
te as useDialog,
|
|
700
|
+
Bn as useDialogPromise,
|
|
701
|
+
Ln as useDrawerDialog,
|
|
702
|
+
An as useModalDialog
|
|
696
703
|
};
|
|
697
704
|
//# sourceMappingURL=index.es.js.map
|