@stenajs-webui/modal 21.17.0 → 21.18.0

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