@stenajs-webui/modal 21.21.0 → 21.21.2
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/index.es.js +335 -343
- 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_5x3op_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_5x3op_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_5x3op_1{background-color:#fff}}._overlay_5x3op_1 ._modal_5x3op_31{max-width:100%;outline:none;pointer-events:none}@media (max-width: 768px){._overlay_5x3op_1 ._modal_5x3op_31{width:100%}}._overlay_5x3op_1 ._content_5x3op_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_5x3op_1 ._content_5x3op_41{top:0;width:100%;max-width:100%}}._overlay_5x3op_1 ._content_5x3op_41{animation:_appear_5x3op_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_5x3op_1 ._content_5x3op_41{box-shadow:none;top:0}}._overlay_5x3op_1 ._content_5x3op_41 :focus{outline:0}._overlay_5x3op_1 ._content_5x3op_41._isDraggable_5x3op_70 .draggable-modal-handle{cursor:move}._overlay_5x3op_1 ._content_5x3op_41._isDraggable_5x3op_70 .draggable-modal-handle .draggable-modal-cancel,._overlay_5x3op_1 ._content_5x3op_41._isDraggable_5x3op_70 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_5x3op_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_5x3op_1{0%{opacity:0}to{opacity:1}}._footer_5x3op_101{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_5x3op_105{position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_5x3op_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_r9tkq_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_r9tkq_1 var(--swui-modal-animation-time) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_r9tkq_1{background-color:#fff}}._overlay_r9tkq_1 ._modal_r9tkq_31{max-width:100%;outline:none;pointer-events:none;padding:var(--swui-metrics-space)}._overlay_r9tkq_1 ._content_r9tkq_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_r9tkq_1 var(--swui-animation-time-fast) cubic-bezier(.645,.045,.355,1) both}@media print{._overlay_r9tkq_1 ._content_r9tkq_38{box-shadow:none;top:0}}._overlay_r9tkq_1 ._content_r9tkq_38 :focus{outline:0}._overlay_r9tkq_1 ._content_r9tkq_38._isDraggable_r9tkq_61 .draggable-modal-handle{cursor:move}._overlay_r9tkq_1 ._content_r9tkq_38._isDraggable_r9tkq_61 .draggable-modal-handle .draggable-modal-cancel,._overlay_r9tkq_1 ._content_r9tkq_38._isDraggable_r9tkq_61 .draggable-modal-handle [role=tooltip]{cursor:initial}@keyframes _fadeIn_r9tkq_1{0%{background-color:var(--swui-hidden)}to{background-color:var(--swui-modal-overlay-bg-color)}}@keyframes _appear_r9tkq_1{0%{opacity:0}to{opacity:1}}._footer_r9tkq_92{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_r9tkq_96{position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_r9tkq_96{position:static;box-shadow:none}}._overlay_15dqv_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_15dqv_1._afterOpen_15dqv_24:not(._beforeClose_15dqv_24){animation:_fadeIn_15dqv_1 var(--swui-modal-animation-time) forwards}._overlay_15dqv_1._beforeClose_15dqv_24{animation:_fadeOut_15dqv_1 var(--swui-modal-animation-time) forwards}@media print{._overlay_15dqv_1{background-color:#fff}}._overlay_15dqv_1 ._modal_15dqv_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_15dqv_1 ._modal_15dqv_36{padding:0;width:100%}}._overlay_15dqv_1 ._modal_15dqv_36._afterOpen_15dqv_24:not(._beforeClose_15dqv_24){animation:_slideIn_15dqv_1 var(--swui-modal-animation-time) forwards}._overlay_15dqv_1 ._modal_15dqv_36._beforeClose_15dqv_24{animation:_slideOut_15dqv_1 var(--swui-modal-animation-time) forwards}._overlay_15dqv_1 ._content_15dqv_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_15dqv_1 ._content_15dqv_59{border-radius:0;width:100%;max-width:100%;min-height:100vh}}@media (min-width: 769px){._overlay_15dqv_1 ._content_15dqv_59{border-radius:var(--swui-border-radius-large)}._overlay_15dqv_1 ._content_15dqv_59::-webkit-scrollbar-thumb{background-color:var(--lhds-color-ui-400);border:4px solid transparent;border-radius:8px;background-clip:padding-box}._overlay_15dqv_1 ._content_15dqv_59::-webkit-scrollbar{width:16px}}@media print{._overlay_15dqv_1 ._content_15dqv_59{box-shadow:none;top:0}}._overlay_15dqv_1 ._content_15dqv_59 :focus{outline:0}@keyframes _fadeIn_15dqv_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_15dqv_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_15dqv_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOut_15dqv_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._footer_15dqv_148{background-color:var(--swui-modal-content-bg-color)}._stickyFooter_15dqv_152{position:sticky;bottom:0;box-shadow:var(--swui-modal-footer-shadow)}@media print{._stickyFooter_15dqv_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:-moz-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:-moz-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}}._modalFooter_112wr_1._modalFooter_112wr_1{display:flex;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_112wr_1._modalFooter_112wr_1._sticky_112wr_10{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 B from "react-modal";
|
|
3
|
+
import { jsx as n, jsxs as u, Fragment as ne } from "react/jsx-runtime";
|
|
4
|
+
import { useRef as k, createContext as pe, useReducer as ye, useState as H, useCallback as A, useMemo as oe, createElement as se, useContext as Ce } from "react";
|
|
5
|
+
import ve from "react-draggable";
|
|
6
|
+
import d from "classnames";
|
|
7
|
+
import { exhaustSwitchCase as be, Spacing as Y, Row as b, Space as re, Heading as J, Column as K, Box as x, Indent as we, Txt as Ie, Text as Oe } from "@stenajs-webui/core";
|
|
8
|
+
import { Icon as ce, FlatButton as Ne, stenaTimes as $e, Spinner as Fe, CloseButton as ie, CircledIcon as ke } from "@stenajs-webui/elements";
|
|
9
|
+
import { cssColor as De } from "@stenajs-webui/theme";
|
|
10
|
+
const dn = (t) => {
|
|
11
|
+
B.setAppElement(t);
|
|
12
|
+
}, xe = "_overlay_5x3op_1", Be = "_fadeIn_5x3op_1", Ae = "_modal_5x3op_31", qe = "_content_5x3op_41", Le = "_appear_5x3op_1", ze = "_isDraggable_5x3op_70", Me = "_footer_5x3op_101", We = "_stickyFooter_5x3op_105", D = {
|
|
13
|
+
overlay: xe,
|
|
14
|
+
fadeIn: Be,
|
|
15
|
+
modal: Ae,
|
|
16
|
+
content: qe,
|
|
17
|
+
appear: Le,
|
|
18
|
+
isDraggable: ze,
|
|
19
|
+
footer: Me,
|
|
20
|
+
stickyFooter: We
|
|
21
|
+
}, de = "draggable-modal-handle", _e = "draggable-modal-cancel", Se = ({
|
|
22
22
|
width: t,
|
|
23
23
|
maxWidth: e,
|
|
24
24
|
draggable: o = !1,
|
|
25
25
|
children: s,
|
|
26
|
-
...
|
|
26
|
+
...c
|
|
27
27
|
}) => {
|
|
28
|
-
const
|
|
28
|
+
const f = k(null);
|
|
29
29
|
return /* @__PURE__ */ n(
|
|
30
|
-
|
|
30
|
+
B,
|
|
31
31
|
{
|
|
32
|
-
overlayClassName:
|
|
33
|
-
className:
|
|
34
|
-
...
|
|
32
|
+
overlayClassName: D.overlay,
|
|
33
|
+
className: D.modal,
|
|
34
|
+
...c,
|
|
35
35
|
children: /* @__PURE__ */ n(
|
|
36
|
-
|
|
36
|
+
ve,
|
|
37
37
|
{
|
|
38
|
-
handle: `.${
|
|
39
|
-
cancel: `.${
|
|
38
|
+
handle: `.${de}`,
|
|
39
|
+
cancel: `.${_e}, button, [role="tooltip"]`,
|
|
40
40
|
bounds: ".ReactModal__Overlay",
|
|
41
41
|
disabled: !o,
|
|
42
|
-
nodeRef:
|
|
42
|
+
nodeRef: f,
|
|
43
43
|
children: /* @__PURE__ */ n(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
@@ -47,10 +47,10 @@ const an = (t) => {
|
|
|
47
47
|
"--swui-modal-width": t,
|
|
48
48
|
"--swui-modal-max-width": e
|
|
49
49
|
},
|
|
50
|
-
className:
|
|
51
|
-
[
|
|
50
|
+
className: d(D.content, {
|
|
51
|
+
[D.isDraggable]: o
|
|
52
52
|
}),
|
|
53
|
-
ref:
|
|
53
|
+
ref: f,
|
|
54
54
|
children: s
|
|
55
55
|
}
|
|
56
56
|
)
|
|
@@ -58,146 +58,146 @@ const an = (t) => {
|
|
|
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
|
+
}, Te = "_portal_17ze5_1", Ee = "_overlay_17ze5_4", He = "_content_17ze5_9", Pe = "_floating_17ze5_15", Ge = "_slideFromLeft_17ze5_29", Ve = "_slideFromRight_17ze5_30", Xe = "_afterOpen_17ze5_36", Ye = "_beforeClose_17ze5_40", Je = "_slideFromTop_17ze5_45", Ke = "_slideFromBottom_17ze5_46", m = {
|
|
62
|
+
portal: Te,
|
|
63
|
+
overlay: Ee,
|
|
64
|
+
content: He,
|
|
65
|
+
floating: Pe,
|
|
66
|
+
slideFromLeft: Ge,
|
|
67
|
+
slideFromRight: Ve,
|
|
68
|
+
afterOpen: Xe,
|
|
69
|
+
beforeClose: Ye,
|
|
70
|
+
slideFromTop: Je,
|
|
71
|
+
slideFromBottom: Ke
|
|
72
|
+
}, _n = ({
|
|
73
73
|
background: t,
|
|
74
74
|
zIndex: e,
|
|
75
75
|
children: o,
|
|
76
76
|
slideFrom: s = "left",
|
|
77
|
-
portalTarget:
|
|
78
|
-
floating:
|
|
79
|
-
...
|
|
77
|
+
portalTarget: c,
|
|
78
|
+
floating: f,
|
|
79
|
+
...g
|
|
80
80
|
}) => {
|
|
81
|
-
const { height:
|
|
81
|
+
const { height: h, width: w } = g;
|
|
82
82
|
return /* @__PURE__ */ n(
|
|
83
|
-
|
|
83
|
+
B,
|
|
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
|
+
Qe(s),
|
|
96
|
+
f && m.floating
|
|
97
97
|
),
|
|
98
|
-
afterOpen:
|
|
99
|
-
beforeClose:
|
|
98
|
+
afterOpen: m.afterOpen,
|
|
99
|
+
beforeClose: m.beforeClose
|
|
100
100
|
},
|
|
101
|
-
style: { content: { width: w, height:
|
|
102
|
-
parentSelector:
|
|
103
|
-
...
|
|
101
|
+
style: { content: { width: w, height: h, background: t }, overlay: { zIndex: e } },
|
|
102
|
+
parentSelector: c ? () => c : void 0,
|
|
103
|
+
...g,
|
|
104
104
|
children: o
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
|
-
},
|
|
107
|
+
}, Qe = (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 be(t, m.slideFromLeft);
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, mn = ({
|
|
121
121
|
header: t,
|
|
122
122
|
contentRight: e,
|
|
123
123
|
onRequestClose: o,
|
|
124
124
|
icon: s
|
|
125
125
|
}) => /* @__PURE__ */ n(
|
|
126
|
-
|
|
126
|
+
Y,
|
|
127
127
|
{
|
|
128
128
|
position: "sticky",
|
|
129
129
|
top: 0,
|
|
130
130
|
zIndex: 100,
|
|
131
|
-
background:
|
|
132
|
-
children: /* @__PURE__ */
|
|
131
|
+
background: De("--lhds-color-ui-50"),
|
|
132
|
+
children: /* @__PURE__ */ u(
|
|
133
133
|
b,
|
|
134
134
|
{
|
|
135
135
|
justifyContent: "space-between",
|
|
136
136
|
alignItems: "center",
|
|
137
137
|
height: "48px",
|
|
138
138
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */ n(
|
|
141
|
-
s && /* @__PURE__ */ n(
|
|
142
|
-
/* @__PURE__ */ n(
|
|
139
|
+
/* @__PURE__ */ u(b, { alignItems: "center", gap: 2, children: [
|
|
140
|
+
/* @__PURE__ */ n(re, { num: 1 }),
|
|
141
|
+
s && /* @__PURE__ */ n(ce, { icon: s, size: 24 }),
|
|
142
|
+
/* @__PURE__ */ n(J, { variant: "h4", children: t })
|
|
143
143
|
] }),
|
|
144
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ u(b, { gap: 1, children: [
|
|
145
145
|
e,
|
|
146
146
|
/* @__PURE__ */ n(
|
|
147
|
-
|
|
147
|
+
Ne,
|
|
148
148
|
{
|
|
149
|
-
leftIcon:
|
|
149
|
+
leftIcon: $e,
|
|
150
150
|
onClick: o,
|
|
151
151
|
variant: "danger"
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
/* @__PURE__ */ n(
|
|
154
|
+
/* @__PURE__ */ n(re, { 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
|
+
), Ue = "_overlay_r9tkq_1", Ze = "_fadeIn_r9tkq_1", Re = "_modal_r9tkq_31", je = "_content_r9tkq_38", et = "_appear_r9tkq_1", tt = "_isDraggable_r9tkq_61", nt = "_footer_r9tkq_92", ot = "_stickyFooter_r9tkq_96", P = {
|
|
161
|
+
overlay: Ue,
|
|
162
|
+
fadeIn: Ze,
|
|
163
|
+
modal: Re,
|
|
164
|
+
content: je,
|
|
165
|
+
appear: et,
|
|
166
|
+
isDraggable: tt,
|
|
167
|
+
footer: nt,
|
|
168
|
+
stickyFooter: ot
|
|
169
|
+
}, st = { overlay: { justifyContent: "center" } }, un = ({
|
|
170
170
|
children: t,
|
|
171
171
|
...e
|
|
172
172
|
}) => /* @__PURE__ */ n(
|
|
173
|
-
|
|
173
|
+
B,
|
|
174
174
|
{
|
|
175
|
-
overlayClassName:
|
|
176
|
-
className:
|
|
177
|
-
style:
|
|
175
|
+
overlayClassName: P.overlay,
|
|
176
|
+
className: P.modal,
|
|
177
|
+
style: st,
|
|
178
178
|
...e,
|
|
179
179
|
children: /* @__PURE__ */ n(
|
|
180
180
|
"div",
|
|
181
181
|
{
|
|
182
|
-
className:
|
|
182
|
+
className: P.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
|
+
), rt = "_overlay_15dqv_1", lt = "_afterOpen_15dqv_24", at = "_beforeClose_15dqv_24", ct = "_fadeIn_15dqv_1", it = "_fadeOut_15dqv_1", dt = "_modal_15dqv_36", _t = "_slideIn_15dqv_1", mt = "_slideOut_15dqv_1", ut = "_content_15dqv_59", ft = "_footer_15dqv_148", gt = "_stickyFooter_15dqv_152", $ = {
|
|
189
|
+
overlay: rt,
|
|
190
|
+
afterOpen: lt,
|
|
191
|
+
beforeClose: at,
|
|
192
|
+
fadeIn: ct,
|
|
193
|
+
fadeOut: it,
|
|
194
|
+
modal: dt,
|
|
195
|
+
slideIn: _t,
|
|
196
|
+
slideOut: mt,
|
|
197
|
+
content: ut,
|
|
198
|
+
footer: ft,
|
|
199
|
+
stickyFooter: gt
|
|
200
|
+
}, ht = ({
|
|
201
201
|
children: t,
|
|
202
202
|
background: e,
|
|
203
203
|
...o
|
|
@@ -207,17 +207,17 @@ const an = (t) => {
|
|
|
207
207
|
content: { "--swui-modal-content-bg-color": e }
|
|
208
208
|
};
|
|
209
209
|
return /* @__PURE__ */ n(
|
|
210
|
-
|
|
210
|
+
B,
|
|
211
211
|
{
|
|
212
212
|
overlayClassName: {
|
|
213
|
-
base:
|
|
214
|
-
beforeClose:
|
|
215
|
-
afterOpen:
|
|
213
|
+
base: $.overlay,
|
|
214
|
+
beforeClose: $.beforeClose,
|
|
215
|
+
afterOpen: $.afterOpen
|
|
216
216
|
},
|
|
217
217
|
className: {
|
|
218
|
-
base:
|
|
219
|
-
beforeClose:
|
|
220
|
-
afterOpen:
|
|
218
|
+
base: $.modal,
|
|
219
|
+
beforeClose: $.beforeClose,
|
|
220
|
+
afterOpen: $.afterOpen
|
|
221
221
|
},
|
|
222
222
|
style: s,
|
|
223
223
|
closeTimeoutMS: 250,
|
|
@@ -225,34 +225,34 @@ const an = (t) => {
|
|
|
225
225
|
children: /* @__PURE__ */ n(
|
|
226
226
|
"div",
|
|
227
227
|
{
|
|
228
|
-
className:
|
|
228
|
+
className: $.content,
|
|
229
229
|
style: { "--swui-modal-width": "fit-content" },
|
|
230
230
|
children: t
|
|
231
231
|
}
|
|
232
232
|
)
|
|
233
233
|
}
|
|
234
234
|
);
|
|
235
|
-
},
|
|
236
|
-
modal:
|
|
237
|
-
overlay:
|
|
238
|
-
},
|
|
235
|
+
}, pt = "_modal_4fwgb_1", yt = "_overlay_4fwgb_13", le = {
|
|
236
|
+
modal: pt,
|
|
237
|
+
overlay: yt
|
|
238
|
+
}, fn = ({
|
|
239
239
|
headerIconLeft: t,
|
|
240
240
|
headerText: e,
|
|
241
241
|
shouldCloseOnOverlayClick: o = !1,
|
|
242
242
|
shouldCloseOnEsc: s = !1,
|
|
243
|
-
...
|
|
243
|
+
...c
|
|
244
244
|
}) => /* @__PURE__ */ n(
|
|
245
|
-
|
|
245
|
+
B,
|
|
246
246
|
{
|
|
247
|
-
...
|
|
247
|
+
...c,
|
|
248
248
|
isOpen: !0,
|
|
249
249
|
shouldCloseOnOverlayClick: o,
|
|
250
250
|
shouldCloseOnEsc: s,
|
|
251
|
-
className:
|
|
252
|
-
overlayClassName:
|
|
253
|
-
children: /* @__PURE__ */
|
|
251
|
+
className: le.modal,
|
|
252
|
+
overlayClassName: le.overlay,
|
|
253
|
+
children: /* @__PURE__ */ u(K, { spacing: 2, alignItems: "center", children: [
|
|
254
254
|
/* @__PURE__ */ n(
|
|
255
|
-
|
|
255
|
+
x,
|
|
256
256
|
{
|
|
257
257
|
alignItems: "center",
|
|
258
258
|
justifyContent: "center",
|
|
@@ -261,40 +261,40 @@ const an = (t) => {
|
|
|
261
261
|
borderRadius: "50%",
|
|
262
262
|
background: "white",
|
|
263
263
|
shadow: "modal",
|
|
264
|
-
children: /* @__PURE__ */ n(
|
|
264
|
+
children: /* @__PURE__ */ n(Fe, { size: "small" })
|
|
265
265
|
}
|
|
266
266
|
),
|
|
267
|
-
(t || e) && /* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */ n(
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
t && /* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */ n(
|
|
272
|
-
/* @__PURE__ */ n(
|
|
267
|
+
(t || e) && /* @__PURE__ */ u(ne, { children: [
|
|
268
|
+
/* @__PURE__ */ n(Y, {}),
|
|
269
|
+
/* @__PURE__ */ u(b, { indent: 2, children: [
|
|
270
|
+
t && /* @__PURE__ */ u(ne, { children: [
|
|
271
|
+
/* @__PURE__ */ n(ce, { size: 14, icon: t, color: "white" }),
|
|
272
|
+
/* @__PURE__ */ n(we, {})
|
|
273
273
|
] }),
|
|
274
|
-
e && /* @__PURE__ */ n(
|
|
274
|
+
e && /* @__PURE__ */ n(J, { variant: "h4", color: "white", children: e })
|
|
275
275
|
] })
|
|
276
276
|
] })
|
|
277
277
|
] })
|
|
278
278
|
}
|
|
279
|
-
),
|
|
279
|
+
), Ct = ({
|
|
280
280
|
onRequestClose: t,
|
|
281
281
|
header: e,
|
|
282
282
|
headerText: o,
|
|
283
283
|
closeButtonClassName: s
|
|
284
|
-
}) => /* @__PURE__ */
|
|
284
|
+
}) => /* @__PURE__ */ u(
|
|
285
285
|
b,
|
|
286
286
|
{
|
|
287
287
|
spacing: 2,
|
|
288
288
|
indent: 2,
|
|
289
289
|
borderBottom: "1px solid var(--lhds-color-ui-300)",
|
|
290
|
-
className:
|
|
290
|
+
className: de,
|
|
291
291
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
o && /* @__PURE__ */ n(
|
|
292
|
+
/* @__PURE__ */ u(b, { flex: 1, indent: !0, alignItems: "center", children: [
|
|
293
|
+
o && /* @__PURE__ */ n(Ie, { className: _e, size: "large", children: o }),
|
|
294
294
|
e
|
|
295
295
|
] }),
|
|
296
|
-
/* @__PURE__ */ n(
|
|
297
|
-
|
|
296
|
+
/* @__PURE__ */ n(x, { alignSelf: "flex-start", children: /* @__PURE__ */ n(
|
|
297
|
+
ie,
|
|
298
298
|
{
|
|
299
299
|
className: s,
|
|
300
300
|
onClick: t
|
|
@@ -302,321 +302,313 @@ const an = (t) => {
|
|
|
302
302
|
) })
|
|
303
303
|
]
|
|
304
304
|
}
|
|
305
|
-
),
|
|
305
|
+
), gn = ({
|
|
306
306
|
header: t,
|
|
307
307
|
headerText: e,
|
|
308
308
|
children: o,
|
|
309
309
|
spacing: s,
|
|
310
|
-
indent:
|
|
311
|
-
draggable:
|
|
312
|
-
onRequestClose:
|
|
313
|
-
closeButtonClassName:
|
|
310
|
+
indent: c,
|
|
311
|
+
draggable: f = !1,
|
|
312
|
+
onRequestClose: g,
|
|
313
|
+
closeButtonClassName: h,
|
|
314
314
|
footer: w,
|
|
315
|
-
disableStickyFooter:
|
|
316
|
-
...
|
|
317
|
-
}) => /* @__PURE__ */
|
|
318
|
-
|
|
315
|
+
disableStickyFooter: y = !1,
|
|
316
|
+
..._
|
|
317
|
+
}) => /* @__PURE__ */ u(
|
|
318
|
+
Se,
|
|
319
319
|
{
|
|
320
|
-
...
|
|
321
|
-
onRequestClose:
|
|
322
|
-
draggable:
|
|
320
|
+
..._,
|
|
321
|
+
onRequestClose: g,
|
|
322
|
+
draggable: f,
|
|
323
323
|
children: [
|
|
324
324
|
/* @__PURE__ */ n(
|
|
325
|
-
|
|
325
|
+
Ct,
|
|
326
326
|
{
|
|
327
|
-
onRequestClose:
|
|
327
|
+
onRequestClose: g,
|
|
328
328
|
header: t,
|
|
329
329
|
headerText: e,
|
|
330
|
-
closeButtonClassName:
|
|
330
|
+
closeButtonClassName: h
|
|
331
331
|
}
|
|
332
332
|
),
|
|
333
|
-
/* @__PURE__ */ n(
|
|
333
|
+
/* @__PURE__ */ n(x, { spacing: typeof s == "number" ? s : 1, indent: typeof c == "number" ? c : 1, children: o }),
|
|
334
334
|
w && /* @__PURE__ */ n(
|
|
335
|
-
|
|
335
|
+
x,
|
|
336
336
|
{
|
|
337
|
-
className:
|
|
338
|
-
[
|
|
337
|
+
className: d(D.footer, {
|
|
338
|
+
[D.stickyFooter]: !y
|
|
339
339
|
}),
|
|
340
340
|
children: w
|
|
341
341
|
}
|
|
342
342
|
)
|
|
343
343
|
]
|
|
344
344
|
}
|
|
345
|
-
),
|
|
345
|
+
), hn = ({ children: t }) => /* @__PURE__ */ n(K, { indent: 2, spacing: 2, children: t }), X = pe(
|
|
346
346
|
void 0
|
|
347
347
|
);
|
|
348
|
-
function
|
|
348
|
+
function Q(t, {
|
|
349
349
|
ref: e,
|
|
350
350
|
modal: o,
|
|
351
351
|
contentWrapperClassName: s,
|
|
352
|
-
closingClassName:
|
|
353
|
-
contentWrapperStyle:
|
|
354
|
-
dialogStyle:
|
|
355
|
-
divInsteadOfDialog:
|
|
352
|
+
closingClassName: c,
|
|
353
|
+
contentWrapperStyle: f,
|
|
354
|
+
dialogStyle: g,
|
|
355
|
+
divInsteadOfDialog: h,
|
|
356
356
|
disableCloseOnClickOutside: w,
|
|
357
|
-
onResolve:
|
|
358
|
-
onReject:
|
|
359
|
-
className:
|
|
360
|
-
background:
|
|
357
|
+
onResolve: y,
|
|
358
|
+
onReject: _,
|
|
359
|
+
className: M,
|
|
360
|
+
background: q
|
|
361
361
|
}) {
|
|
362
|
-
const
|
|
362
|
+
const ue = k(null), i = e ?? ue, [W, fe] = ye((r) => r + 1, 0), U = k(), I = k(), C = k(), p = k(), [Z, L] = H(!1), [S, F] = H(!1), [R, v] = H(!1), T = t, ge = A(
|
|
363
363
|
(r) => {
|
|
364
|
-
var l,
|
|
365
|
-
return
|
|
366
|
-
(
|
|
367
|
-
I.current =
|
|
364
|
+
var l, a;
|
|
365
|
+
return U.current = new Promise(
|
|
366
|
+
(N, he) => {
|
|
367
|
+
I.current = N, p.current = he;
|
|
368
368
|
}
|
|
369
|
-
), v(!1),
|
|
369
|
+
), v(!1), L(!0), F(!0), fe(), C.current = r, o ? (l = i.current) == null || l.showModal() : (a = i.current) == null || a.show(), U.current;
|
|
370
370
|
},
|
|
371
|
-
[
|
|
372
|
-
),
|
|
371
|
+
[i, o]
|
|
372
|
+
), j = A(
|
|
373
373
|
(r) => {
|
|
374
|
-
var l
|
|
375
|
-
v(!0),
|
|
374
|
+
var l;
|
|
375
|
+
v(!0), L(!1), h ? setTimeout(() => {
|
|
376
|
+
var a;
|
|
377
|
+
v(!1), F(!1), (a = I.current) == null || a.call(I, r), C.current = void 0, y == null || y();
|
|
378
|
+
}, 300) : (l = i.current) == null || l.addEventListener(
|
|
376
379
|
"animationend",
|
|
377
380
|
() => {
|
|
378
|
-
var
|
|
379
|
-
v(!1),
|
|
381
|
+
var a, N;
|
|
382
|
+
v(!1), F(!1), (a = i.current) == null || a.close(), (N = I.current) == null || N.call(I, r), C.current = void 0, y == null || y();
|
|
380
383
|
},
|
|
381
384
|
{ once: !0 }
|
|
382
385
|
);
|
|
383
386
|
},
|
|
384
|
-
[
|
|
385
|
-
),
|
|
387
|
+
[i, y, h]
|
|
388
|
+
), ee = A(() => {
|
|
386
389
|
var r;
|
|
387
|
-
v(!1),
|
|
388
|
-
}, [
|
|
390
|
+
v(!1), L(!1), F(!1), (r = p.current) == null || r.call(p), _ == null || _(), C.current = void 0;
|
|
391
|
+
}, [_]), O = A(
|
|
389
392
|
(r) => {
|
|
390
|
-
var l
|
|
391
|
-
v(!0),
|
|
393
|
+
var l;
|
|
394
|
+
v(!0), L(!1), h ? setTimeout(() => {
|
|
395
|
+
var a;
|
|
396
|
+
v(!1), F(!1), (a = p.current) == null || a.call(p, r), _ == null || _(), C.current = void 0;
|
|
397
|
+
}, 300) : (l = i.current) == null || l.addEventListener(
|
|
392
398
|
"animationend",
|
|
393
399
|
() => {
|
|
394
|
-
var
|
|
395
|
-
v(!1),
|
|
400
|
+
var a, N;
|
|
401
|
+
v(!1), F(!1), (a = i.current) == null || a.close(), (N = p.current) == null || N.call(p, r), _ == null || _(), C.current = void 0;
|
|
396
402
|
},
|
|
397
403
|
{ once: !0 }
|
|
398
404
|
);
|
|
399
405
|
},
|
|
400
|
-
[
|
|
401
|
-
),
|
|
406
|
+
[i, h, _]
|
|
407
|
+
), te = A(
|
|
402
408
|
(r) => {
|
|
403
|
-
if (r.target !==
|
|
409
|
+
if (r.target !== i.current)
|
|
404
410
|
return;
|
|
405
|
-
const l =
|
|
406
|
-
l.top <= r.clientY && r.clientY <= l.top + l.height && l.left <= r.clientX && r.clientX <= l.left + l.width ||
|
|
411
|
+
const l = i.current.getBoundingClientRect();
|
|
412
|
+
l.top <= r.clientY && r.clientY <= l.top + l.height && l.left <= r.clientX && r.clientX <= l.left + l.width || O();
|
|
407
413
|
},
|
|
408
|
-
[
|
|
409
|
-
),
|
|
410
|
-
() => ({ resolve:
|
|
411
|
-
[
|
|
414
|
+
[i, O]
|
|
415
|
+
), E = oe(
|
|
416
|
+
() => ({ resolve: j, reject: O }),
|
|
417
|
+
[O, j]
|
|
412
418
|
);
|
|
413
|
-
return [
|
|
414
|
-
() =>
|
|
415
|
-
ft,
|
|
416
|
-
{
|
|
417
|
-
isOpen: z,
|
|
418
|
-
onRequestClose: N,
|
|
419
|
-
background: L,
|
|
420
|
-
children: /* @__PURE__ */ n(V.Provider, { value: T, children: /* @__PURE__ */ n(
|
|
421
|
-
"div",
|
|
422
|
-
{
|
|
423
|
-
style: u,
|
|
424
|
-
className: s,
|
|
425
|
-
children: z && /* @__PURE__ */ oe(E, { ...C.current, key: S })
|
|
426
|
-
}
|
|
427
|
-
) })
|
|
428
|
-
}
|
|
429
|
-
) : /* @__PURE__ */ n(
|
|
419
|
+
return [oe(
|
|
420
|
+
() => h ? /* @__PURE__ */ n(ht, { isOpen: Z, onRequestClose: O, background: q, children: /* @__PURE__ */ n(X.Provider, { value: E, children: S && /* @__PURE__ */ se(T, { ...C.current, key: W }) }) }) : /* @__PURE__ */ n(
|
|
430
421
|
"dialog",
|
|
431
422
|
{
|
|
432
|
-
onClick: w ? void 0 :
|
|
433
|
-
onClose:
|
|
434
|
-
ref:
|
|
435
|
-
className:
|
|
436
|
-
style: { background:
|
|
437
|
-
children: /* @__PURE__ */ n("div", { style:
|
|
423
|
+
onClick: w ? void 0 : te,
|
|
424
|
+
onClose: ee,
|
|
425
|
+
ref: i,
|
|
426
|
+
className: d(M, R && c),
|
|
427
|
+
style: { background: q, ...g },
|
|
428
|
+
children: /* @__PURE__ */ n("div", { style: f, className: s, children: S && /* @__PURE__ */ n(X.Provider, { value: E, children: /* @__PURE__ */ se(T, { ...C.current, key: W }) }) })
|
|
438
429
|
}
|
|
439
430
|
),
|
|
440
431
|
[
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
w,
|
|
446
|
-
W,
|
|
447
|
-
a,
|
|
448
|
-
f,
|
|
449
|
-
z,
|
|
450
|
-
N,
|
|
451
|
-
T,
|
|
432
|
+
h,
|
|
433
|
+
Z,
|
|
434
|
+
O,
|
|
435
|
+
q,
|
|
452
436
|
E,
|
|
453
437
|
S,
|
|
454
|
-
|
|
438
|
+
T,
|
|
439
|
+
W,
|
|
440
|
+
w,
|
|
441
|
+
te,
|
|
442
|
+
ee,
|
|
443
|
+
i,
|
|
444
|
+
M,
|
|
455
445
|
R,
|
|
456
446
|
c,
|
|
457
|
-
|
|
447
|
+
g,
|
|
448
|
+
f,
|
|
449
|
+
s
|
|
458
450
|
]
|
|
459
|
-
), { show:
|
|
451
|
+
), { show: ge, reject: O }];
|
|
460
452
|
}
|
|
461
|
-
const
|
|
462
|
-
const t =
|
|
453
|
+
const pn = () => {
|
|
454
|
+
const t = Ce(X);
|
|
463
455
|
if (t == null)
|
|
464
456
|
throw new Error("useDialogPromise is being used outside of dialog.");
|
|
465
457
|
return t;
|
|
466
|
-
},
|
|
467
|
-
alertDialog:
|
|
468
|
-
slideIn:
|
|
469
|
-
closing:
|
|
470
|
-
slideOut:
|
|
471
|
-
fadeIn:
|
|
472
|
-
fadeOut:
|
|
458
|
+
}, vt = "_alertDialog_14t8t_1", bt = "_slideIn_14t8t_1", wt = "_closing_14t8t_22", It = "_slideOut_14t8t_1", Ot = "_fadeIn_14t8t_1", Nt = "_fadeOut_14t8t_1", G = {
|
|
459
|
+
alertDialog: vt,
|
|
460
|
+
slideIn: bt,
|
|
461
|
+
closing: wt,
|
|
462
|
+
slideOut: It,
|
|
463
|
+
fadeIn: Ot,
|
|
464
|
+
fadeOut: Nt
|
|
473
465
|
};
|
|
474
|
-
function
|
|
475
|
-
return
|
|
466
|
+
function yn(t, e) {
|
|
467
|
+
return Q(t, {
|
|
476
468
|
...e,
|
|
477
469
|
modal: !0,
|
|
478
|
-
closingClassName:
|
|
479
|
-
contentWrapperClassName:
|
|
470
|
+
closingClassName: d(e == null ? void 0 : e.closingClassName, G.closing),
|
|
471
|
+
contentWrapperClassName: d(
|
|
480
472
|
e == null ? void 0 : e.contentWrapperClassName,
|
|
481
|
-
|
|
473
|
+
G.contentWrapper
|
|
482
474
|
),
|
|
483
|
-
className:
|
|
475
|
+
className: d(e == null ? void 0 : e.className, G.alertDialog)
|
|
484
476
|
});
|
|
485
477
|
}
|
|
486
|
-
const
|
|
487
|
-
drawerDialog:
|
|
488
|
-
left:
|
|
489
|
-
right:
|
|
490
|
-
contentWrapper:
|
|
491
|
-
slideInLeft:
|
|
492
|
-
closing:
|
|
493
|
-
slideOutLeft:
|
|
494
|
-
slideInRight:
|
|
495
|
-
slideOutRight:
|
|
496
|
-
top:
|
|
497
|
-
bottom:
|
|
498
|
-
slideInTop:
|
|
499
|
-
slideOutTop:
|
|
500
|
-
slideInBottom:
|
|
501
|
-
slideOutBottom:
|
|
478
|
+
const $t = "_drawerDialog_11g6r_1", Ft = "_left_11g6r_13", kt = "_right_11g6r_14", Dt = "_contentWrapper_11g6r_19", xt = "_slideInLeft_11g6r_1", Bt = "_closing_11g6r_36", At = "_slideOutLeft_11g6r_1", qt = "_slideInRight_11g6r_1", Lt = "_slideOutRight_11g6r_1", zt = "_top_11g6r_54", Mt = "_bottom_11g6r_55", Wt = "_slideInTop_11g6r_1", St = "_slideOutTop_11g6r_1", Tt = "_slideInBottom_11g6r_1", Et = "_slideOutBottom_11g6r_1", z = {
|
|
479
|
+
drawerDialog: $t,
|
|
480
|
+
left: Ft,
|
|
481
|
+
right: kt,
|
|
482
|
+
contentWrapper: Dt,
|
|
483
|
+
slideInLeft: xt,
|
|
484
|
+
closing: Bt,
|
|
485
|
+
slideOutLeft: At,
|
|
486
|
+
slideInRight: qt,
|
|
487
|
+
slideOutRight: Lt,
|
|
488
|
+
top: zt,
|
|
489
|
+
bottom: Mt,
|
|
490
|
+
slideInTop: Wt,
|
|
491
|
+
slideOutTop: St,
|
|
492
|
+
slideInBottom: Tt,
|
|
493
|
+
slideOutBottom: Et
|
|
502
494
|
};
|
|
503
|
-
function
|
|
504
|
-
return
|
|
495
|
+
function Cn(t, e = "left", o) {
|
|
496
|
+
return Q(t, {
|
|
505
497
|
...o,
|
|
506
498
|
disableCloseOnClickOutside: !0,
|
|
507
499
|
modal: !1,
|
|
508
|
-
closingClassName:
|
|
509
|
-
contentWrapperClassName:
|
|
500
|
+
closingClassName: d(o == null ? void 0 : o.closingClassName, z.closing),
|
|
501
|
+
contentWrapperClassName: d(
|
|
510
502
|
o == null ? void 0 : o.contentWrapperClassName,
|
|
511
|
-
|
|
503
|
+
z.contentWrapper
|
|
512
504
|
),
|
|
513
|
-
className:
|
|
505
|
+
className: d(o == null ? void 0 : o.className, z.drawerDialog, z[e])
|
|
514
506
|
});
|
|
515
507
|
}
|
|
516
|
-
const
|
|
517
|
-
modalDialog:
|
|
518
|
-
slideIn:
|
|
519
|
-
closing:
|
|
520
|
-
slideOut:
|
|
521
|
-
fadeIn:
|
|
522
|
-
fadeOut:
|
|
523
|
-
contentWrapper:
|
|
508
|
+
const Ht = "_modalDialog_1teni_1", Pt = "_slideIn_1teni_1", Gt = "_closing_1teni_36", Vt = "_slideOut_1teni_1", Xt = "_fadeIn_1teni_1", Yt = "_fadeOut_1teni_1", Jt = "_contentWrapper_1teni_100", V = {
|
|
509
|
+
modalDialog: Ht,
|
|
510
|
+
slideIn: Pt,
|
|
511
|
+
closing: Gt,
|
|
512
|
+
slideOut: Vt,
|
|
513
|
+
fadeIn: Xt,
|
|
514
|
+
fadeOut: Yt,
|
|
515
|
+
contentWrapper: Jt
|
|
524
516
|
};
|
|
525
|
-
function
|
|
526
|
-
return
|
|
517
|
+
function vn(t, e) {
|
|
518
|
+
return Q(t, {
|
|
527
519
|
...e,
|
|
528
520
|
modal: !0,
|
|
529
|
-
closingClassName:
|
|
530
|
-
contentWrapperClassName:
|
|
521
|
+
closingClassName: d(e == null ? void 0 : e.closingClassName, V.closing),
|
|
522
|
+
contentWrapperClassName: d(
|
|
531
523
|
e == null ? void 0 : e.contentWrapperClassName,
|
|
532
|
-
|
|
524
|
+
V.contentWrapper
|
|
533
525
|
),
|
|
534
|
-
className:
|
|
526
|
+
className: d(e == null ? void 0 : e.className, V.modalDialog)
|
|
535
527
|
});
|
|
536
528
|
}
|
|
537
|
-
const
|
|
529
|
+
const me = ({
|
|
538
530
|
headingLevel: t = "h2",
|
|
539
531
|
size: e = "medium",
|
|
540
532
|
children: o
|
|
541
|
-
}) => /* @__PURE__ */ n(
|
|
542
|
-
modalActionButtons:
|
|
543
|
-
},
|
|
533
|
+
}) => /* @__PURE__ */ n(J, { variant: e === "medium" ? "h3" : "h1", as: t, children: o }), Kt = "_modalActionButtons_s27nj_1", Qt = {
|
|
534
|
+
modalActionButtons: Kt
|
|
535
|
+
}, Ut = ({
|
|
544
536
|
buttons: t
|
|
545
|
-
}) => /* @__PURE__ */
|
|
546
|
-
/* @__PURE__ */ n(
|
|
547
|
-
/* @__PURE__ */ n("div", { className:
|
|
548
|
-
] }),
|
|
537
|
+
}) => /* @__PURE__ */ u(x, { width: "100%", children: [
|
|
538
|
+
/* @__PURE__ */ n(Y, {}),
|
|
539
|
+
/* @__PURE__ */ n("div", { className: Qt.modalActionButtons, children: t })
|
|
540
|
+
] }), Zt = ({ gap: t = 3, ...e }) => /* @__PURE__ */ n(x, { indent: 3, spacing: 3, gap: t, ...e }), bn = ({
|
|
549
541
|
icon: t,
|
|
550
542
|
buttons: e,
|
|
551
543
|
heading: o,
|
|
552
544
|
text: s,
|
|
553
|
-
children:
|
|
554
|
-
maxWidth:
|
|
555
|
-
minWidth:
|
|
556
|
-
}) => /* @__PURE__ */
|
|
557
|
-
|
|
545
|
+
children: c,
|
|
546
|
+
maxWidth: f,
|
|
547
|
+
minWidth: g
|
|
548
|
+
}) => /* @__PURE__ */ u(
|
|
549
|
+
Zt,
|
|
558
550
|
{
|
|
559
551
|
flexDirection: "column",
|
|
560
552
|
alignItems: "center",
|
|
561
|
-
maxWidth:
|
|
562
|
-
minWidth:
|
|
553
|
+
maxWidth: f,
|
|
554
|
+
minWidth: g,
|
|
563
555
|
children: [
|
|
564
|
-
t && /* @__PURE__ */ n(
|
|
565
|
-
/* @__PURE__ */ n(
|
|
566
|
-
s && /* @__PURE__ */ n(
|
|
567
|
-
|
|
568
|
-
e && /* @__PURE__ */ n(
|
|
556
|
+
t && /* @__PURE__ */ n(ke, { icon: t, size: "large" }),
|
|
557
|
+
/* @__PURE__ */ n(me, { children: o }),
|
|
558
|
+
s && /* @__PURE__ */ n(Oe, { textAlign: "center", children: s }),
|
|
559
|
+
c,
|
|
560
|
+
e && /* @__PURE__ */ n(Ut, { buttons: e })
|
|
569
561
|
]
|
|
570
562
|
}
|
|
571
|
-
),
|
|
563
|
+
), wn = ({ children: t }) => /* @__PURE__ */ n(K, { flex: 1, height: "100%", justifyContent: "space-between", children: t }), In = ({
|
|
572
564
|
heading: t,
|
|
573
565
|
headingLevel: e,
|
|
574
566
|
headingSize: o,
|
|
575
567
|
onClickClose: s
|
|
576
|
-
}) => /* @__PURE__ */
|
|
577
|
-
t && /* @__PURE__ */ n(
|
|
578
|
-
/* @__PURE__ */ n(
|
|
579
|
-
] }),
|
|
580
|
-
modalFooter:
|
|
581
|
-
sticky:
|
|
582
|
-
},
|
|
568
|
+
}) => /* @__PURE__ */ u(b, { justifyContent: "space-between", children: [
|
|
569
|
+
t && /* @__PURE__ */ n(me, { headingLevel: e, size: o, children: t }),
|
|
570
|
+
/* @__PURE__ */ n(ie, { onClick: s })
|
|
571
|
+
] }), Rt = "_modalFooter_112wr_1", jt = "_sticky_112wr_10", ae = {
|
|
572
|
+
modalFooter: Rt,
|
|
573
|
+
sticky: jt
|
|
574
|
+
}, On = ({
|
|
583
575
|
children: t,
|
|
584
576
|
sticky: e,
|
|
585
577
|
zIndex: o = 4
|
|
586
578
|
}) => /* @__PURE__ */ n(
|
|
587
579
|
b,
|
|
588
580
|
{
|
|
589
|
-
className:
|
|
581
|
+
className: d(ae.modalFooter, e && ae.sticky),
|
|
590
582
|
shadow: "var(--swui-sticky-footer-shadow)",
|
|
591
583
|
zIndex: o,
|
|
592
584
|
children: t
|
|
593
585
|
}
|
|
594
586
|
);
|
|
595
587
|
export {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
588
|
+
un as Alert,
|
|
589
|
+
Se as BaseWindow,
|
|
590
|
+
_e as DRAGGABLE_CANCEL_CLASSNAME,
|
|
591
|
+
de as DRAGGABLE_HANDLE_CLASSNAME,
|
|
592
|
+
X as DialogContext,
|
|
593
|
+
_n as Drawer,
|
|
594
|
+
mn as DrawerHeader,
|
|
595
|
+
bn as InfoAlert,
|
|
596
|
+
fn as LoadingModal,
|
|
597
|
+
ht as Modal,
|
|
598
|
+
Ut as ModalActionButtons,
|
|
599
|
+
Zt as ModalBody,
|
|
600
|
+
wn as ModalContainer,
|
|
601
|
+
On as ModalFooter,
|
|
602
|
+
In as ModalHeader,
|
|
603
|
+
me as ModalHeading,
|
|
604
|
+
gn as Window,
|
|
605
|
+
hn as WindowFooter,
|
|
606
|
+
Ct as WindowHeader,
|
|
607
|
+
dn as setupDeclarativeModals,
|
|
608
|
+
yn as useAlertDialog,
|
|
609
|
+
Q as useDialog,
|
|
610
|
+
pn as useDialogPromise,
|
|
611
|
+
Cn as useDrawerDialog,
|
|
612
|
+
vn as useModalDialog
|
|
621
613
|
};
|
|
622
614
|
//# sourceMappingURL=index.es.js.map
|