@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/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 B from "react-modal";
3
- import { jsx as n, jsxs as g, Fragment as re } from "react/jsx-runtime";
4
- import { useRef as F, useState as W, useEffect as we, createContext as Ie, useReducer as Oe, useCallback as k, useMemo as le, createElement as ae, useContext as Ne } from "react";
5
- import $e from "react-draggable";
6
- import _ from "classnames";
7
- import { exhaustSwitchCase as Fe, Spacing as U, Row as v, Space as ce, Heading as Z, useEventCallback as De, Column as A, Box as L, Indent as xe, Txt as Be, Text as ke } from "@stenajs-webui/core";
8
- import { Icon as me, FlatButton as fe, stenaTimes as Le, Spinner as Ae, CloseButton as ze, CircledIcon as Me, stenaTimesThick as Ee } from "@stenajs-webui/elements";
9
- import { cssColor as We } from "@stenajs-webui/theme";
10
- const bn = (t) => {
11
- B.setAppElement(t);
12
- }, Se = "_overlay_quvmp_1", Te = "_fadeIn_quvmp_1", qe = "_modal_quvmp_31", He = "_content_quvmp_41", Ge = "_appear_quvmp_1", Pe = "_isDraggable_quvmp_70", Ve = "_footer_quvmp_101", Xe = "_stickyFooter_quvmp_105", x = {
13
- overlay: Se,
14
- fadeIn: Te,
15
- modal: qe,
16
- content: He,
17
- appear: Ge,
18
- isDraggable: Pe,
19
- footer: Ve,
20
- stickyFooter: Xe
21
- }, ge = "draggable-modal-handle", he = "draggable-modal-cancel", Ye = ({
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: s,
26
- ...r
25
+ children: r,
26
+ ...s
27
27
  }) => {
28
- const c = F(null);
28
+ const i = I(null);
29
29
  return /* @__PURE__ */ n(
30
- B,
30
+ k,
31
31
  {
32
- overlayClassName: x.overlay,
33
- className: x.modal,
34
- ...r,
32
+ overlayClassName: B.overlay,
33
+ className: B.modal,
34
+ ...s,
35
35
  children: /* @__PURE__ */ n(
36
- $e,
36
+ De,
37
37
  {
38
- handle: `.${ge}`,
39
- cancel: `.${he}, button, [role="tooltip"]`,
38
+ handle: `.${ye}`,
39
+ cancel: `.${Ce}, button, [role="tooltip"]`,
40
40
  bounds: ".ReactModal__Overlay",
41
41
  disabled: !o,
42
- nodeRef: c,
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: _(x.content, {
51
- [x.isDraggable]: o
50
+ className: d(B.content, {
51
+ [B.isDraggable]: o
52
52
  }),
53
- ref: c,
54
- children: s
53
+ ref: i,
54
+ children: r
55
55
  }
56
56
  )
57
57
  }
58
58
  )
59
59
  }
60
60
  );
61
- }, Je = "_portal_17ze5_1", Ke = "_overlay_17ze5_4", Qe = "_content_17ze5_9", Ue = "_floating_17ze5_15", Ze = "_slideFromLeft_17ze5_29", Re = "_slideFromRight_17ze5_30", je = "_afterOpen_17ze5_36", et = "_beforeClose_17ze5_40", tt = "_slideFromTop_17ze5_45", nt = "_slideFromBottom_17ze5_46", f = {
62
- portal: Je,
63
- overlay: Ke,
64
- content: Qe,
65
- floating: Ue,
66
- slideFromLeft: Ze,
67
- slideFromRight: Re,
68
- afterOpen: je,
69
- beforeClose: et,
70
- slideFromTop: tt,
71
- slideFromBottom: nt
72
- }, wn = ({
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: s = "left",
77
- portalTarget: r,
78
- floating: c,
79
- ...h
76
+ slideFrom: r = "left",
77
+ portalTarget: s,
78
+ floating: i,
79
+ ...g
80
80
  }) => {
81
- const { height: a, width: p } = h;
81
+ const { height: a, width: h } = g;
82
82
  return /* @__PURE__ */ n(
83
- B,
83
+ k,
84
84
  {
85
85
  closeTimeoutMS: 250,
86
- portalClassName: f.portal,
86
+ portalClassName: m.portal,
87
87
  overlayClassName: {
88
- base: f.overlay,
89
- afterOpen: f.afterOpen,
90
- beforeClose: f.beforeClose
88
+ base: m.overlay,
89
+ afterOpen: m.afterOpen,
90
+ beforeClose: m.beforeClose
91
91
  },
92
92
  className: {
93
- base: _(
94
- f.content,
95
- ot(s),
96
- c && f.floating
93
+ base: d(
94
+ m.content,
95
+ st(r),
96
+ i && m.floating
97
97
  ),
98
- afterOpen: f.afterOpen,
99
- beforeClose: f.beforeClose
98
+ afterOpen: m.afterOpen,
99
+ beforeClose: m.beforeClose
100
100
  },
101
- style: { content: { width: p, height: a, background: t }, overlay: { zIndex: e } },
102
- parentSelector: r ? () => r : void 0,
103
- ...h,
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
- }, ot = (t) => {
107
+ }, st = (t) => {
108
108
  switch (t) {
109
109
  case "left":
110
- return f.slideFromLeft;
110
+ return m.slideFromLeft;
111
111
  case "right":
112
- return f.slideFromRight;
112
+ return m.slideFromRight;
113
113
  case "top":
114
- return f.slideFromTop;
114
+ return m.slideFromTop;
115
115
  case "bottom":
116
- return f.slideFromBottom;
116
+ return m.slideFromBottom;
117
117
  default:
118
- return Fe(t, f.slideFromLeft);
118
+ return xe(t, m.slideFromLeft);
119
119
  }
120
- }, In = ({
120
+ }, Nn = ({
121
121
  header: t,
122
122
  contentRight: e,
123
123
  onRequestClose: o,
124
- icon: s
124
+ icon: r
125
125
  }) => /* @__PURE__ */ n(
126
- U,
126
+ j,
127
127
  {
128
128
  position: "sticky",
129
129
  top: 0,
130
130
  zIndex: 100,
131
- background: We("--lhds-color-ui-50"),
132
- children: /* @__PURE__ */ g(
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__ */ g(v, { alignItems: "center", gap: 2, children: [
140
- /* @__PURE__ */ n(ce, { num: 1 }),
141
- s && /* @__PURE__ */ n(me, { icon: s, size: 24 }),
142
- /* @__PURE__ */ n(Z, { variant: "h4", children: t })
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__ */ g(v, { gap: 1, children: [
144
+ /* @__PURE__ */ f(v, { gap: 1, children: [
145
145
  e,
146
146
  /* @__PURE__ */ n(
147
- fe,
147
+ he,
148
148
  {
149
- leftIcon: Le,
149
+ leftIcon: ze,
150
150
  onClick: o,
151
151
  variant: "danger"
152
152
  }
153
153
  ),
154
- /* @__PURE__ */ n(ce, { num: 0.5 })
154
+ /* @__PURE__ */ n(_e, { num: 0.5 })
155
155
  ] })
156
156
  ]
157
157
  }
158
158
  )
159
159
  }
160
- ), st = "_overlay_1gix5_1", rt = "_fadeIn_1gix5_1", lt = "_modal_1gix5_31", at = "_content_1gix5_38", ct = "_appear_1gix5_1", it = "_isDraggable_1gix5_61", dt = "_footer_1gix5_92", _t = "_stickyFooter_1gix5_96", Y = {
161
- overlay: st,
162
- fadeIn: rt,
163
- modal: lt,
164
- content: at,
165
- appear: ct,
166
- isDraggable: it,
167
- footer: dt,
168
- stickyFooter: _t
169
- }, ut = { overlay: { justifyContent: "center" } }, On = ({
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
- B,
173
+ k,
174
174
  {
175
- overlayClassName: Y.overlay,
176
- className: Y.modal,
177
- style: ut,
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: Y.content,
182
+ className: Q.content,
183
183
  style: { "--swui-modal-width": "fit-content" },
184
184
  children: t
185
185
  }
186
186
  )
187
187
  }
188
- ), mt = "_overlay_1lu6i_1", ft = "_afterOpen_1lu6i_24", gt = "_beforeClose_1lu6i_24", ht = "_fadeIn_1lu6i_1", pt = "_fadeOut_1lu6i_1", yt = "_modal_1lu6i_36", Ct = "_slideIn_1lu6i_1", vt = "_slideOut_1lu6i_1", bt = "_content_1lu6i_59", wt = "_footer_1lu6i_148", It = "_stickyFooter_1lu6i_152", $ = {
189
- overlay: mt,
190
- afterOpen: ft,
191
- beforeClose: gt,
192
- fadeIn: ht,
193
- fadeOut: pt,
194
- modal: yt,
195
- slideIn: Ct,
196
- slideOut: vt,
197
- content: bt,
198
- footer: wt,
199
- stickyFooter: It
200
- }, ie = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), Ot = ({
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 s = F(null), [r, c] = W(ie ? "auto" : void 0), h = {
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 = De(() => {
211
- if (!ie)
210
+ }, a = Be(() => {
211
+ if (!ue)
212
212
  return;
213
- const p = s.current;
214
- p && c(
215
- p.scrollHeight > p.clientHeight ? "stable" : "auto"
213
+ const h = r.current;
214
+ h && i(
215
+ h.scrollHeight > h.clientHeight ? "stable" : "auto"
216
216
  );
217
217
  });
218
- return we(() => (window.addEventListener("resize", a), document.addEventListener("DOMContentLoaded", a), () => {
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
- B,
221
+ k,
222
222
  {
223
223
  overlayClassName: {
224
- base: $.overlay,
225
- beforeClose: $.beforeClose,
226
- afterOpen: $.afterOpen
224
+ base: D.overlay,
225
+ beforeClose: D.beforeClose,
226
+ afterOpen: D.afterOpen
227
227
  },
228
228
  className: {
229
- base: $.modal,
230
- beforeClose: $.beforeClose,
231
- afterOpen: $.afterOpen
229
+ base: D.modal,
230
+ beforeClose: D.beforeClose,
231
+ afterOpen: D.afterOpen
232
232
  },
233
- style: h,
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: $.content,
240
+ className: D.content,
241
241
  style: {
242
242
  "--swui-modal-width": "fit-content",
243
- scrollbarGutter: r
243
+ scrollbarGutter: s
244
244
  },
245
- ref: s,
245
+ ref: r,
246
246
  children: t
247
247
  }
248
248
  )
249
249
  }
250
250
  );
251
- }, Nt = "_modal_4fwgb_1", $t = "_overlay_4fwgb_13", de = {
252
- modal: Nt,
253
- overlay: $t
254
- }, Nn = ({
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: s = !1,
259
- ...r
258
+ shouldCloseOnEsc: r = !1,
259
+ ...s
260
260
  }) => /* @__PURE__ */ n(
261
- B,
261
+ k,
262
262
  {
263
- ...r,
263
+ ...s,
264
264
  isOpen: !0,
265
265
  shouldCloseOnOverlayClick: o,
266
- shouldCloseOnEsc: s,
267
- className: de.modal,
268
- overlayClassName: de.overlay,
269
- children: /* @__PURE__ */ g(A, { spacing: 2, alignItems: "center", children: [
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
- L,
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(Ae, { size: "small" })
280
+ children: /* @__PURE__ */ n(Me, { size: "small" })
281
281
  }
282
282
  ),
283
- (t || e) && /* @__PURE__ */ g(re, { children: [
284
- /* @__PURE__ */ n(U, {}),
285
- /* @__PURE__ */ g(v, { indent: 2, children: [
286
- t && /* @__PURE__ */ g(re, { children: [
287
- /* @__PURE__ */ n(me, { size: 14, icon: t, color: "white" }),
288
- /* @__PURE__ */ n(xe, {})
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(Z, { variant: "h4", color: "white", children: e })
290
+ e && /* @__PURE__ */ n(ee, { variant: "h4", color: "white", children: e })
291
291
  ] })
292
292
  ] })
293
293
  ] })
294
294
  }
295
- ), Ft = ({
295
+ ), xt = ({
296
296
  onRequestClose: t,
297
297
  header: e,
298
298
  headerText: o,
299
- closeButtonClassName: s
300
- }) => /* @__PURE__ */ g(
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: ge,
306
+ className: ye,
307
307
  children: [
308
- /* @__PURE__ */ g(v, { flex: 1, indent: !0, alignItems: "center", children: [
309
- o && /* @__PURE__ */ n(Be, { className: he, size: "large", children: o }),
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(L, { alignSelf: "flex-start", children: /* @__PURE__ */ n(
313
- ze,
312
+ /* @__PURE__ */ n(z, { alignSelf: "flex-start", children: /* @__PURE__ */ n(
313
+ Ee,
314
314
  {
315
- className: s,
315
+ className: r,
316
316
  onClick: t
317
317
  }
318
318
  ) })
319
319
  ]
320
320
  }
321
- ), $n = ({
321
+ ), Dn = ({
322
322
  header: t,
323
323
  headerText: e,
324
324
  children: o,
325
- spacing: s,
326
- indent: r,
327
- draggable: c = !1,
328
- onRequestClose: h,
325
+ spacing: r,
326
+ indent: s,
327
+ draggable: i = !1,
328
+ onRequestClose: g,
329
329
  closeButtonClassName: a,
330
- footer: p,
331
- disableStickyFooter: C = !1,
332
- ...m
333
- }) => /* @__PURE__ */ g(
334
- Ye,
330
+ footer: h,
331
+ disableStickyFooter: L = !1,
332
+ ...C
333
+ }) => /* @__PURE__ */ f(
334
+ Ke,
335
335
  {
336
- ...m,
337
- onRequestClose: h,
338
- draggable: c,
336
+ ...C,
337
+ onRequestClose: g,
338
+ draggable: i,
339
339
  children: [
340
340
  /* @__PURE__ */ n(
341
- Ft,
341
+ xt,
342
342
  {
343
- onRequestClose: h,
343
+ onRequestClose: g,
344
344
  header: t,
345
345
  headerText: e,
346
346
  closeButtonClassName: a
347
347
  }
348
348
  ),
349
- /* @__PURE__ */ n(L, { spacing: typeof s == "number" ? s : 1, indent: typeof r == "number" ? r : 1, children: o }),
350
- p && /* @__PURE__ */ n(
351
- L,
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: _(x.footer, {
354
- [x.stickyFooter]: !C
353
+ className: d(B.footer, {
354
+ [B.stickyFooter]: !L
355
355
  }),
356
- children: p
356
+ children: h
357
357
  }
358
358
  )
359
359
  ]
360
360
  }
361
- ), Fn = ({ children: t }) => /* @__PURE__ */ n(A, { indent: 2, spacing: 2, children: t }), Q = Ie(
361
+ ), xn = ({ children: t }) => /* @__PURE__ */ n(M, { indent: 2, spacing: 2, children: t }), R = Ne(
362
362
  void 0
363
363
  );
364
- function R(t, {
364
+ function te(t, {
365
365
  ref: e,
366
366
  modal: o,
367
- contentWrapperClassName: s,
368
- closingClassName: r,
369
- contentWrapperStyle: c,
370
- dialogStyle: h,
367
+ contentWrapperClassName: r,
368
+ closingClassName: s,
369
+ contentWrapperStyle: i,
370
+ dialogStyle: g,
371
371
  divInsteadOfDialog: a,
372
- disableCloseOnClickOutside: p,
372
+ disableCloseOnClickOutside: h,
373
+ elementId: L,
373
374
  onResolve: C,
374
- onReject: m,
375
- className: S,
376
- background: z,
377
- label: T,
378
- labelledby: q,
379
- describedby: H
375
+ onReject: p,
376
+ className: q,
377
+ background: P,
378
+ label: H,
379
+ labelledby: G,
380
+ describedby: V
380
381
  }) {
381
- const ye = F(null), u = e ?? ye, [G, Ce] = Oe((l) => l + 1, 0), j = F(null), I = F(null), b = F(void 0), y = F(null), [ee, M] = W(!1), [P, D] = W(!1), [te, w] = W(!1), V = t, ve = k(
382
- (l) => {
383
- var i, d;
384
- return j.current = new Promise(
385
- (N, be) => {
386
- I.current = N, y.current = be;
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), M(!0), D(!0), Ce(), b.current = l, o ? (i = u.current) == null || i.showModal() : (d = u.current) == null || d.show(), j.current;
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
- [u, o]
391
- ), ne = k(
392
- (l) => {
393
- var i;
394
- w(!0), M(!1), a ? setTimeout(() => {
395
- var d;
396
- w(!1), D(!1), (d = I.current) == null || d.call(I, l), b.current = void 0, C == null || C();
397
- }, 300) : (i = u.current) == null || i.addEventListener(
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 d, N;
401
- w(!1), D(!1), (d = u.current) == null || d.close(), (N = I.current) == null || N.call(I, l), b.current = void 0, C == null || C();
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
- [u, C, a]
407
- ), oe = k(() => {
408
- var l;
409
- w(!1), M(!1), D(!1), (l = y.current) == null || l.call(y), m == null || m(), b.current = void 0;
410
- }, [m]), O = k(
411
- (l) => {
412
- var i;
413
- w(!0), M(!1), a ? setTimeout(() => {
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 d, N;
420
- w(!1), D(!1), (d = u.current) == null || d.close(), (N = y.current) == null || N.call(y, l), m == null || m(), b.current = void 0;
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
- [u, a, m]
426
- ), se = k(
427
- (l) => {
428
- if (l.target !== u.current)
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 i = u.current.getBoundingClientRect();
431
- i.top <= l.clientY && l.clientY <= i.top + i.height && i.left <= l.clientX && l.clientX <= i.left + i.width || O();
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
- [u, O]
434
- ), X = le(
435
- () => ({ resolve: ne, reject: O }),
436
- [O, ne]
437
+ [_, N]
438
+ ), K = ie(
439
+ () => ({ resolve: se, reject: N }),
440
+ [N, se]
437
441
  );
438
- return [le(
442
+ return [ie(
439
443
  () => a ? /* @__PURE__ */ n(
440
- Ot,
444
+ $t,
441
445
  {
442
- isOpen: ee,
443
- onRequestClose: O,
444
- background: z,
445
- contentLabel: T,
446
- aria: { modal: !0, labelledby: q, describedby: H },
447
- children: /* @__PURE__ */ n(Q.Provider, { value: X, children: P && /* @__PURE__ */ ae(V, { ...b.current, key: G }) })
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: p ? void 0 : se,
453
- onClose: oe,
454
- ref: u,
455
- className: _(S, te && r),
456
- "aria-label": T,
457
- "aria-labelledby": q,
458
- "aria-describedby": H,
459
- style: { background: z, ...h },
460
- children: /* @__PURE__ */ n("div", { style: c, className: s, children: P && /* @__PURE__ */ n(Q.Provider, { value: X, children: /* @__PURE__ */ ae(V, { ...b.current, key: G }) }) })
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
- ee,
466
- O,
467
- z,
468
- T,
469
- q,
470
- H,
471
- X,
471
+ oe,
472
+ N,
472
473
  P,
473
- V,
474
+ H,
475
+ L,
474
476
  G,
475
- p,
476
- se,
477
- oe,
478
- u,
479
- S,
480
- te,
481
- r,
477
+ V,
478
+ K,
479
+ Y,
480
+ J,
481
+ X,
482
482
  h,
483
- c,
484
- s
483
+ ae,
484
+ le,
485
+ _,
486
+ q,
487
+ re,
488
+ s,
489
+ g,
490
+ i,
491
+ r
485
492
  ]
486
- ), { show: ve, reject: O }];
493
+ ), { show: Ie, reject: N }];
487
494
  }
488
- const Dn = () => {
489
- const t = Ne(Q);
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
- }, Dt = "_alertDialog_14t8t_1", xt = "_slideIn_14t8t_1", Bt = "_closing_14t8t_22", kt = "_slideOut_14t8t_1", Lt = "_fadeIn_14t8t_1", At = "_fadeOut_14t8t_1", J = {
494
- alertDialog: Dt,
495
- slideIn: xt,
496
- closing: Bt,
497
- slideOut: kt,
498
- fadeIn: Lt,
499
- fadeOut: At
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 xn(t, e) {
502
- return R(t, {
508
+ function kn(t, e) {
509
+ return te(t, {
503
510
  ...e,
504
511
  modal: !0,
505
- closingClassName: _(e == null ? void 0 : e.closingClassName, J.closing),
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
- J.contentWrapper
515
+ U.contentWrapper
509
516
  ),
510
- className: _(e == null ? void 0 : e.className, J.alertDialog)
517
+ className: d(e == null ? void 0 : e.className, U.alertDialog)
511
518
  });
512
519
  }
513
- const zt = "_drawerDialog_11g6r_1", Mt = "_left_11g6r_13", Et = "_right_11g6r_14", Wt = "_contentWrapper_11g6r_19", St = "_slideInLeft_11g6r_1", Tt = "_closing_11g6r_36", qt = "_slideOutLeft_11g6r_1", Ht = "_slideInRight_11g6r_1", Gt = "_slideOutRight_11g6r_1", Pt = "_top_11g6r_54", Vt = "_bottom_11g6r_55", Xt = "_slideInTop_11g6r_1", Yt = "_slideOutTop_11g6r_1", Jt = "_slideInBottom_11g6r_1", Kt = "_slideOutBottom_11g6r_1", E = {
514
- drawerDialog: zt,
515
- left: Mt,
516
- right: Et,
517
- contentWrapper: Wt,
518
- slideInLeft: St,
519
- closing: Tt,
520
- slideOutLeft: qt,
521
- slideInRight: Ht,
522
- slideOutRight: Gt,
523
- top: Pt,
524
- bottom: Vt,
525
- slideInTop: Xt,
526
- slideOutTop: Yt,
527
- slideInBottom: Jt,
528
- slideOutBottom: Kt
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 Bn(t, e = "left", o) {
531
- return R(t, {
537
+ function Ln(t, e = "left", o) {
538
+ return te(t, {
532
539
  ...o,
533
540
  disableCloseOnClickOutside: !0,
534
541
  modal: !1,
535
- closingClassName: _(o == null ? void 0 : o.closingClassName, E.closing),
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
- E.contentWrapper
545
+ S.contentWrapper
539
546
  ),
540
- className: _(o == null ? void 0 : o.className, E.drawerDialog, E[e])
547
+ className: d(o == null ? void 0 : o.className, S.drawerDialog, S[e])
541
548
  });
542
549
  }
543
- const Qt = "_modalDialog_1teni_1", Ut = "_slideIn_1teni_1", Zt = "_closing_1teni_36", Rt = "_slideOut_1teni_1", jt = "_fadeIn_1teni_1", en = "_fadeOut_1teni_1", tn = "_contentWrapper_1teni_100", K = {
544
- modalDialog: Qt,
545
- slideIn: Ut,
546
- closing: Zt,
547
- slideOut: Rt,
548
- fadeIn: jt,
549
- fadeOut: en,
550
- contentWrapper: tn
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 kn(t, e) {
553
- return R(t, {
559
+ function An(t, e) {
560
+ return te(t, {
554
561
  ...e,
555
562
  modal: !0,
556
- closingClassName: _(e == null ? void 0 : e.closingClassName, K.closing),
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
- K.contentWrapper
566
+ Z.contentWrapper
560
567
  ),
561
- className: _(e == null ? void 0 : e.className, K.modalDialog)
568
+ className: d(e == null ? void 0 : e.className, Z.modalDialog)
562
569
  });
563
570
  }
564
- const pe = ({
571
+ const ve = ({
565
572
  headingLevel: t = "h2",
566
573
  size: e = "medium",
567
574
  children: o
568
- }) => /* @__PURE__ */ n(Z, { variant: e === "medium" ? "h3" : "h1", as: t, children: o }), nn = "_modalActionButtons_s27nj_1", on = {
569
- modalActionButtons: nn
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
- ...s
588
+ ...r
582
589
  }) => /* @__PURE__ */ n(
583
- A,
590
+ M,
584
591
  {
585
- className: _(_e.modalBody, _e[e], o),
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
- ...s
596
+ ...r
590
597
  }
591
- ), an = ({
598
+ ), dn = ({
592
599
  children: t,
593
600
  maxWidth: e
594
601
  }) => /* @__PURE__ */ n(
595
- A,
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
- ), Ln = ({
610
+ ), zn = ({
604
611
  icon: t,
605
612
  buttons: e,
606
613
  heading: o,
607
- text: s,
608
- children: r,
609
- maxWidth: c,
610
- minWidth: h
611
- }) => /* @__PURE__ */ n(an, { children: /* @__PURE__ */ g(
612
- ln,
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: c,
617
- minWidth: h,
623
+ maxWidth: i,
624
+ minWidth: g,
618
625
  children: [
619
- t && /* @__PURE__ */ n(Me, { icon: t, size: "large" }),
620
- /* @__PURE__ */ n(pe, { children: o }),
621
- s && /* @__PURE__ */ n(ke, { textAlign: "center", children: s }),
622
- r,
623
- e && /* @__PURE__ */ n(sn, { children: e })
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
- ) }), cn = (t) => /* @__PURE__ */ n(
627
- fe,
633
+ ) }), _n = (t) => /* @__PURE__ */ n(
634
+ he,
628
635
  {
629
636
  size: "large",
630
637
  variant: "danger",
631
- leftIcon: Ee,
638
+ leftIcon: Se,
632
639
  ...t
633
640
  }
634
- ), An = ({
641
+ ), Mn = ({
635
642
  heading: t,
636
643
  headingLevel: e,
637
644
  headingSize: o,
638
- onClickClose: s,
639
- closeButtonAriaLabel: r
640
- }) => /* @__PURE__ */ n(A, { children: /* @__PURE__ */ g(v, { justifyContent: "space-between", alignItems: "center", gap: 2, children: [
641
- t ? /* @__PURE__ */ n(pe, { headingLevel: e, size: o, children: t }) : /* @__PURE__ */ n("div", {}),
642
- s ? /* @__PURE__ */ n(
643
- cn,
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: s,
652
+ onClick: r,
646
653
  size: o,
647
- "aria-label": r
654
+ "aria-label": s
648
655
  }
649
656
  ) : null
650
- ] }) }), dn = "_modalFooter_1vp0i_1", _n = "_sticky_1vp0i_9", ue = {
651
- modalFooter: dn,
652
- sticky: _n
653
- }, zn = ({
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: s = 2,
658
- className: r,
659
- ...c
664
+ gap: r = 2,
665
+ className: s,
666
+ ...i
660
667
  }) => /* @__PURE__ */ n(
661
668
  v,
662
669
  {
663
- className: _(ue.modalFooter, e && ue.sticky, r),
670
+ className: d(ge.modalFooter, e && ge.sticky, s),
664
671
  shadow: "var(--swui-sticky-footer-shadow)",
665
672
  zIndex: o,
666
- ...c,
667
- children: /* @__PURE__ */ n(v, { gap: s, spacing: 2, alignItems: "center", children: t })
673
+ ...i,
674
+ children: /* @__PURE__ */ n(v, { gap: r, spacing: 2, alignItems: "center", children: t })
668
675
  }
669
676
  );
670
677
  export {
671
- On as Alert,
672
- Ye as BaseWindow,
673
- he as DRAGGABLE_CANCEL_CLASSNAME,
674
- ge as DRAGGABLE_HANDLE_CLASSNAME,
675
- Q as DialogContext,
676
- wn as Drawer,
677
- In as DrawerHeader,
678
- Ln as InfoAlert,
679
- Nn as LoadingModal,
680
- Ot as Modal,
681
- sn as ModalActionButtons,
682
- ln as ModalBody,
683
- an as ModalContainer,
684
- zn as ModalFooter,
685
- An as ModalHeader,
686
- pe as ModalHeading,
687
- $n as Window,
688
- Fn as WindowFooter,
689
- Ft as WindowHeader,
690
- bn as setupDeclarativeModals,
691
- xn as useAlertDialog,
692
- R as useDialog,
693
- Dn as useDialogPromise,
694
- Bn as useDrawerDialog,
695
- kn as useModalDialog
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