@stenajs-webui/modal 23.21.2 → 23.21.4

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
@@ -2,28 +2,28 @@ import F from "react-modal";
2
2
  import { jsx as t, jsxs as a, Fragment as K } from "react/jsx-runtime";
3
3
  import { useRef as w, useState as E, useEffect as ze, createContext as Ae, useReducer as Te, useCallback as O, useMemo as ue, createElement as _e, useContext as Me } from "react";
4
4
  import Re from "react-draggable";
5
- import c from "classnames";
6
- import { exhaustSwitchCase as Ee, Spacing as I, Row as p, Space as Q, Heading as te, useEventCallback as We, Column as C, Box as B, Indent as He, Txt as Se, Text as Z } from "@stenajs-webui/core";
7
- import { Icon as Ne, FlatButton as we, stenaTimes as je, Spinner as Pe, CloseButton as oe, stenaTimesThick as Ge, CircledIcon as Be } from "@stenajs-webui/elements";
8
- import { cssColor as $e } from "@stenajs-webui/theme";
9
- import { ToastContainer as Ve, toast as qe } from "react-toastify";
10
- import './index.css';const Fo = (e) => {
5
+ import i from "classnames";
6
+ import { exhaustSwitchCase as Ee, Spacing as I, getDataProps as We, Row as p, Space as Q, Heading as te, useEventCallback as He, Column as C, Box as B, Indent as Se, Txt as je, Text as Z } from "@stenajs-webui/core";
7
+ import { Icon as Ne, FlatButton as we, stenaTimes as Pe, Spinner as Ge, CloseButton as oe, stenaTimesThick as Ve, CircledIcon as Be } from "@stenajs-webui/elements";
8
+ import { cssColor as De } from "@stenajs-webui/theme";
9
+ import { ToastContainer as qe, toast as Xe } from "react-toastify";
10
+ import './index.css';const Oo = (e) => {
11
11
  F.setAppElement(e);
12
- }, Xe = "_overlay_zoch3_1", Ye = "_modal_zoch3_33", Ue = "_content_zoch3_43", Je = "_isDraggable_zoch3_72", Ke = "_footer_zoch3_103", Qe = "_stickyFooter_zoch3_107", L = {
13
- overlay: Xe,
14
- modal: Ye,
15
- content: Ue,
16
- isDraggable: Je,
17
- footer: Ke,
18
- stickyFooter: Qe
19
- }, ke = "draggable-modal-handle", xe = "draggable-modal-cancel", Ze = ({
12
+ }, Ye = "_overlay_zoch3_1", Ue = "_modal_zoch3_33", Je = "_content_zoch3_43", Ke = "_isDraggable_zoch3_72", Qe = "_footer_zoch3_103", Ze = "_stickyFooter_zoch3_107", L = {
13
+ overlay: Ye,
14
+ modal: Ue,
15
+ content: Je,
16
+ isDraggable: Ke,
17
+ footer: Qe,
18
+ stickyFooter: Ze
19
+ }, $e = "draggable-modal-handle", ke = "draggable-modal-cancel", et = ({
20
20
  width: e,
21
21
  maxWidth: o,
22
22
  draggable: n = !1,
23
23
  children: s,
24
24
  ...r
25
25
  }) => {
26
- const i = w(null);
26
+ const c = w(null);
27
27
  return /* @__PURE__ */ t(
28
28
  F,
29
29
  {
@@ -33,11 +33,11 @@ import './index.css';const Fo = (e) => {
33
33
  children: /* @__PURE__ */ t(
34
34
  Re,
35
35
  {
36
- handle: `.${ke}`,
37
- cancel: `.${xe}, button, [role="tooltip"]`,
36
+ handle: `.${$e}`,
37
+ cancel: `.${ke}, button, [role="tooltip"]`,
38
38
  bounds: ".ReactModal__Overlay",
39
39
  disabled: !n,
40
- nodeRef: i,
40
+ nodeRef: c,
41
41
  children: /* @__PURE__ */ t(
42
42
  "div",
43
43
  {
@@ -45,10 +45,10 @@ import './index.css';const Fo = (e) => {
45
45
  "--swui-modal-width": e,
46
46
  "--swui-modal-max-width": o
47
47
  },
48
- className: c(L.content, {
48
+ className: i(L.content, {
49
49
  [L.isDraggable]: n
50
50
  }),
51
- ref: i,
51
+ ref: c,
52
52
  children: s
53
53
  }
54
54
  )
@@ -56,24 +56,24 @@ import './index.css';const Fo = (e) => {
56
56
  )
57
57
  }
58
58
  );
59
- }, et = "_portal_194oy_1", tt = "_overlay_194oy_4", ot = "_content_194oy_9", nt = "_floating_194oy_18", st = "_slideFromLeft_194oy_32", rt = "_slideFromRight_194oy_33", at = "_afterOpen_194oy_39", lt = "_beforeClose_194oy_43", ct = "_slideFromTop_194oy_48", it = "_slideFromBottom_194oy_49", f = {
60
- portal: et,
61
- overlay: tt,
62
- content: ot,
63
- floating: nt,
64
- slideFromLeft: st,
65
- slideFromRight: rt,
66
- afterOpen: at,
67
- beforeClose: lt,
68
- slideFromTop: ct,
69
- slideFromBottom: it
70
- }, Oo = ({
59
+ }, tt = "_portal_194oy_1", ot = "_overlay_194oy_4", nt = "_content_194oy_9", st = "_floating_194oy_18", rt = "_slideFromLeft_194oy_32", at = "_slideFromRight_194oy_33", lt = "_afterOpen_194oy_39", ct = "_beforeClose_194oy_43", it = "_slideFromTop_194oy_48", dt = "_slideFromBottom_194oy_49", f = {
60
+ portal: tt,
61
+ overlay: ot,
62
+ content: nt,
63
+ floating: st,
64
+ slideFromLeft: rt,
65
+ slideFromRight: at,
66
+ afterOpen: lt,
67
+ beforeClose: ct,
68
+ slideFromTop: it,
69
+ slideFromBottom: dt
70
+ }, Io = ({
71
71
  background: e,
72
72
  zIndex: o,
73
73
  children: n,
74
74
  slideFrom: s = "left",
75
75
  portalTarget: r,
76
- floating: i,
76
+ floating: c,
77
77
  ...m
78
78
  }) => {
79
79
  const { height: l, width: h } = m;
@@ -88,10 +88,10 @@ import './index.css';const Fo = (e) => {
88
88
  beforeClose: f.beforeClose
89
89
  },
90
90
  className: {
91
- base: c(
91
+ base: i(
92
92
  f.content,
93
- dt(s),
94
- i && f.floating
93
+ mt(s),
94
+ c && f.floating
95
95
  ),
96
96
  afterOpen: f.afterOpen,
97
97
  beforeClose: f.beforeClose
@@ -103,7 +103,7 @@ import './index.css';const Fo = (e) => {
103
103
  children: n
104
104
  }
105
105
  );
106
- }, dt = (e) => {
106
+ }, mt = (e) => {
107
107
  switch (e) {
108
108
  case "left":
109
109
  return f.slideFromLeft;
@@ -116,18 +116,21 @@ import './index.css';const Fo = (e) => {
116
116
  default:
117
117
  return Ee(e, f.slideFromLeft);
118
118
  }
119
- }, Io = ({
119
+ }, zo = ({
120
120
  header: e,
121
121
  contentRight: o,
122
122
  onRequestClose: n,
123
- icon: s
123
+ icon: s,
124
+ headingLevel: r = "h1",
125
+ ...c
124
126
  }) => /* @__PURE__ */ t(
125
127
  I,
126
128
  {
127
129
  position: "sticky",
128
130
  top: 0,
129
131
  zIndex: 100,
130
- background: $e("--lhds-color-ui-50"),
132
+ background: De("--lhds-color-ui-50"),
133
+ ...We(c),
131
134
  children: /* @__PURE__ */ a(
132
135
  p,
133
136
  {
@@ -138,14 +141,14 @@ import './index.css';const Fo = (e) => {
138
141
  /* @__PURE__ */ a(p, { alignItems: "center", gap: 2, children: [
139
142
  /* @__PURE__ */ t(Q, { num: 1 }),
140
143
  s && /* @__PURE__ */ t(Ne, { icon: s, size: 24 }),
141
- /* @__PURE__ */ t(te, { variant: "h4", children: e })
144
+ /* @__PURE__ */ t(te, { variant: "h4", as: r, children: e })
142
145
  ] }),
143
146
  /* @__PURE__ */ a(p, { gap: 1, children: [
144
147
  o,
145
148
  /* @__PURE__ */ t(
146
149
  we,
147
150
  {
148
- leftIcon: je,
151
+ leftIcon: Pe,
149
152
  onClick: n,
150
153
  variant: "danger"
151
154
  }
@@ -156,11 +159,11 @@ import './index.css';const Fo = (e) => {
156
159
  }
157
160
  )
158
161
  }
159
- ), mt = "_overlay_1xtk3_1", ut = "_modal_1xtk3_33", _t = "_content_1xtk3_40", Y = {
160
- overlay: mt,
161
- modal: ut,
162
- content: _t
163
- }, ft = { overlay: { justifyContent: "center" } }, zo = ({
162
+ ), ut = "_overlay_1xtk3_1", _t = "_modal_1xtk3_33", ft = "_content_1xtk3_40", Y = {
163
+ overlay: ut,
164
+ modal: _t,
165
+ content: ft
166
+ }, gt = { overlay: { justifyContent: "center" } }, Ao = ({
164
167
  children: e,
165
168
  ...o
166
169
  }) => /* @__PURE__ */ t(
@@ -168,7 +171,7 @@ import './index.css';const Fo = (e) => {
168
171
  {
169
172
  overlayClassName: Y.overlay,
170
173
  className: Y.modal,
171
- style: ft,
174
+ style: gt,
172
175
  ...o,
173
176
  children: /* @__PURE__ */ t(
174
177
  "div",
@@ -179,28 +182,28 @@ import './index.css';const Fo = (e) => {
179
182
  }
180
183
  )
181
184
  }
182
- ), gt = "_overlay_20o05_1", pt = "_afterOpen_20o05_29", ht = "_beforeClose_20o05_29", yt = "_modal_20o05_41", Ct = "_content_20o05_64", k = {
183
- overlay: gt,
184
- afterOpen: pt,
185
- beforeClose: ht,
186
- modal: yt,
187
- content: Ct
188
- }, fe = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), vt = ({
185
+ ), pt = "_overlay_20o05_1", ht = "_afterOpen_20o05_29", yt = "_beforeClose_20o05_29", Ct = "_modal_20o05_41", vt = "_content_20o05_64", $ = {
186
+ overlay: pt,
187
+ afterOpen: ht,
188
+ beforeClose: yt,
189
+ modal: Ct,
190
+ content: vt
191
+ }, fe = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), bt = ({
189
192
  children: e,
190
193
  background: o,
191
194
  className: n,
192
195
  overlayClassName: s,
193
196
  ...r
194
197
  }) => {
195
- const i = w(null), [m, l] = E(fe ? "auto" : void 0), h = {
198
+ const c = w(null), [m, l] = E(fe ? "auto" : void 0), h = {
196
199
  overlay: { justifyContent: "center" },
197
200
  content: {
198
201
  "--swui-modal-content-bg-color": o
199
202
  }
200
- }, u = We(() => {
203
+ }, u = He(() => {
201
204
  if (!fe)
202
205
  return;
203
- const y = i.current;
206
+ const y = c.current;
204
207
  y && l(
205
208
  y.scrollHeight > y.clientHeight ? "stable" : "auto"
206
209
  );
@@ -211,14 +214,14 @@ import './index.css';const Fo = (e) => {
211
214
  F,
212
215
  {
213
216
  overlayClassName: {
214
- base: c(s, k.overlay),
215
- beforeClose: k.beforeClose,
216
- afterOpen: k.afterOpen
217
+ base: i(s, $.overlay),
218
+ beforeClose: $.beforeClose,
219
+ afterOpen: $.afterOpen
217
220
  },
218
221
  className: {
219
- base: c(n, k.modal),
220
- beforeClose: k.beforeClose,
221
- afterOpen: k.afterOpen
222
+ base: i(n, $.modal),
223
+ beforeClose: $.beforeClose,
224
+ afterOpen: $.afterOpen
222
225
  },
223
226
  style: h,
224
227
  closeTimeoutMS: 250,
@@ -227,21 +230,21 @@ import './index.css';const Fo = (e) => {
227
230
  children: /* @__PURE__ */ t(
228
231
  "div",
229
232
  {
230
- className: k.content,
233
+ className: $.content,
231
234
  style: {
232
235
  "--swui-modal-width": "fit-content",
233
236
  scrollbarGutter: m
234
237
  },
235
- ref: i,
238
+ ref: c,
236
239
  children: e
237
240
  }
238
241
  )
239
242
  }
240
243
  );
241
- }, bt = "_modal_4fwgb_1", Nt = "_overlay_4fwgb_13", ge = {
242
- modal: bt,
243
- overlay: Nt
244
- }, Ao = ({
244
+ }, Nt = "_modal_4fwgb_1", wt = "_overlay_4fwgb_13", ge = {
245
+ modal: Nt,
246
+ overlay: wt
247
+ }, To = ({
245
248
  headerIconLeft: e,
246
249
  headerText: o,
247
250
  shouldCloseOnOverlayClick: n = !1,
@@ -267,7 +270,7 @@ import './index.css';const Fo = (e) => {
267
270
  borderRadius: "50%",
268
271
  background: "white",
269
272
  shadow: "modal",
270
- children: /* @__PURE__ */ t(Pe, { size: "small" })
273
+ children: /* @__PURE__ */ t(Ge, { size: "small" })
271
274
  }
272
275
  ),
273
276
  (e || o) && /* @__PURE__ */ a(K, { children: [
@@ -275,14 +278,14 @@ import './index.css';const Fo = (e) => {
275
278
  /* @__PURE__ */ a(p, { indent: 2, children: [
276
279
  e && /* @__PURE__ */ a(K, { children: [
277
280
  /* @__PURE__ */ t(Ne, { size: 14, icon: e, color: "white" }),
278
- /* @__PURE__ */ t(He, {})
281
+ /* @__PURE__ */ t(Se, {})
279
282
  ] }),
280
283
  o && /* @__PURE__ */ t(te, { variant: "h4", color: "white", children: o })
281
284
  ] })
282
285
  ] })
283
286
  ] })
284
287
  }
285
- ), wt = ({
288
+ ), Bt = ({
286
289
  onRequestClose: e,
287
290
  header: o,
288
291
  headerText: n,
@@ -293,10 +296,10 @@ import './index.css';const Fo = (e) => {
293
296
  spacing: 2,
294
297
  indent: 2,
295
298
  borderBottom: "1px solid var(--lhds-color-ui-300)",
296
- className: ke,
299
+ className: $e,
297
300
  children: [
298
301
  /* @__PURE__ */ a(p, { flex: 1, indent: !0, alignItems: "center", children: [
299
- n && /* @__PURE__ */ t(Se, { className: xe, size: "large", children: n }),
302
+ n && /* @__PURE__ */ t(je, { className: ke, size: "large", children: n }),
300
303
  o
301
304
  ] }),
302
305
  /* @__PURE__ */ t(B, { alignSelf: "flex-start", children: /* @__PURE__ */ t(
@@ -308,27 +311,27 @@ import './index.css';const Fo = (e) => {
308
311
  ) })
309
312
  ]
310
313
  }
311
- ), To = ({
314
+ ), Mo = ({
312
315
  header: e,
313
316
  headerText: o,
314
317
  children: n,
315
318
  spacing: s,
316
319
  indent: r,
317
- draggable: i = !1,
320
+ draggable: c = !1,
318
321
  onRequestClose: m,
319
322
  closeButtonClassName: l,
320
323
  footer: h,
321
324
  disableStickyFooter: u = !1,
322
325
  ...y
323
326
  }) => /* @__PURE__ */ a(
324
- Ze,
327
+ et,
325
328
  {
326
329
  ...y,
327
330
  onRequestClose: m,
328
- draggable: i,
331
+ draggable: c,
329
332
  children: [
330
333
  /* @__PURE__ */ t(
331
- wt,
334
+ Bt,
332
335
  {
333
336
  onRequestClose: m,
334
337
  header: e,
@@ -340,7 +343,7 @@ import './index.css';const Fo = (e) => {
340
343
  h && /* @__PURE__ */ t(
341
344
  B,
342
345
  {
343
- className: c(L.footer, {
346
+ className: i(L.footer, {
344
347
  [L.stickyFooter]: !u
345
348
  }),
346
349
  children: h
@@ -348,7 +351,7 @@ import './index.css';const Fo = (e) => {
348
351
  )
349
352
  ]
350
353
  }
351
- ), Mo = ({ children: e }) => /* @__PURE__ */ t(C, { indent: 2, spacing: 2, children: e }), ee = Ae(
354
+ ), Ro = ({ children: e }) => /* @__PURE__ */ t(C, { indent: 2, spacing: 2, children: e }), ee = Ae(
352
355
  void 0
353
356
  );
354
357
  function ne(e, {
@@ -356,76 +359,76 @@ function ne(e, {
356
359
  modal: n,
357
360
  contentWrapperClassName: s,
358
361
  closingClassName: r,
359
- contentWrapperStyle: i,
362
+ contentWrapperStyle: c,
360
363
  dialogStyle: m,
361
364
  divInsteadOfDialog: l,
362
365
  disableCloseOnClickOutside: h,
363
366
  blockScroll: u = !0,
364
367
  elementId: y,
365
368
  onResolve: v,
366
- onReject: x,
369
+ onReject: k,
367
370
  className: se,
368
371
  background: W,
369
372
  label: H,
370
373
  labelledby: S,
371
374
  describedby: j
372
375
  }) {
373
- const Fe = w(null), _ = o ?? Fe, [P, Oe] = Te((d) => d + 1, 0), re = w(null), G = w(null), b = w(void 0), z = w(!1), A = w(null), [ae, T] = E(!1), [V, D] = E(!1), [le, N] = E(!1), q = e, Ie = O(
376
+ const Fe = w(null), _ = o ?? Fe, [P, Oe] = Te((d) => d + 1, 0), re = w(null), G = w(null), b = w(void 0), z = w(!1), A = w(null), [ae, T] = E(!1), [V, x] = E(!1), [le, N] = E(!1), q = e, Ie = O(
374
377
  (d) => (re.current = new Promise(
375
378
  (g, me) => {
376
379
  G.current = g, A.current = me;
377
380
  }
378
- ), N(!1), T(!0), D(!0), Oe(), z.current = !1, b.current = d, n ? _.current?.showModal() : _.current?.show(), re.current),
381
+ ), N(!1), T(!0), x(!0), Oe(), z.current = !1, b.current = d, n ? _.current?.showModal() : _.current?.show(), re.current),
379
382
  [_, n]
380
383
  ), ce = O(
381
384
  (d) => {
382
385
  z.current = !0, N(!0), T(!1), l ? setTimeout(() => {
383
- N(!1), D(!1), G.current?.(d), b.current = void 0, v?.();
386
+ N(!1), x(!1), G.current?.(d), b.current = void 0, v?.();
384
387
  }, 300) : _.current?.addEventListener(
385
388
  "animationend",
386
389
  (g) => {
387
- g.stopPropagation(), N(!1), D(!1), _.current?.close(), G.current?.(d), b.current = void 0, v?.();
390
+ g.stopPropagation(), N(!1), x(!1), _.current?.close(), G.current?.(d), b.current = void 0, v?.();
388
391
  },
389
392
  { once: !0 }
390
393
  );
391
394
  },
392
395
  [_, v, l]
393
- ), $ = O(
396
+ ), D = O(
394
397
  (d) => {
395
398
  z.current = !0, N(!0), T(!1), l ? setTimeout(() => {
396
- N(!1), D(!1), A.current?.(d), x?.(), b.current = void 0;
399
+ N(!1), x(!1), A.current?.(d), k?.(), b.current = void 0;
397
400
  }, 300) : _.current?.addEventListener(
398
401
  "animationend",
399
402
  (g) => {
400
- g.stopPropagation(), N(!1), D(!1), _.current?.close(), A.current?.(d), x?.(), b.current = void 0;
403
+ g.stopPropagation(), N(!1), x(!1), _.current?.close(), A.current?.(d), k?.(), b.current = void 0;
401
404
  },
402
405
  { once: !0 }
403
406
  );
404
407
  },
405
- [_, l, x]
408
+ [_, l, k]
406
409
  ), ie = O(
407
410
  (d) => {
408
- d.stopPropagation(), z.current || (N(!1), T(!1), D(!1), A.current?.(), x?.(), b.current = void 0);
411
+ d.stopPropagation(), z.current || (N(!1), T(!1), x(!1), A.current?.(), k?.(), b.current = void 0);
409
412
  },
410
- [x]
413
+ [k]
411
414
  ), de = O(
412
415
  (d) => {
413
416
  if (d.target !== _.current)
414
417
  return;
415
418
  const g = _.current.getBoundingClientRect();
416
- g.top <= d.clientY && d.clientY <= g.top + g.height && g.left <= d.clientX && d.clientX <= g.left + g.width || $();
419
+ g.top <= d.clientY && d.clientY <= g.top + g.height && g.left <= d.clientX && d.clientX <= g.left + g.width || D();
417
420
  },
418
- [_, $]
421
+ [_, D]
419
422
  ), X = ue(
420
- () => ({ resolve: ce, reject: $ }),
421
- [$, ce]
423
+ () => ({ resolve: ce, reject: D }),
424
+ [D, ce]
422
425
  );
423
426
  return [ue(
424
427
  () => l ? /* @__PURE__ */ t(
425
- vt,
428
+ bt,
426
429
  {
427
430
  isOpen: ae,
428
- onRequestClose: $,
431
+ onRequestClose: D,
429
432
  background: W,
430
433
  contentLabel: H,
431
434
  id: y,
@@ -439,7 +442,7 @@ function ne(e, {
439
442
  onClose: ie,
440
443
  ref: _,
441
444
  id: y,
442
- className: c(
445
+ className: i(
443
446
  u && "swui-block-scroll",
444
447
  se,
445
448
  le && r
@@ -448,13 +451,13 @@ function ne(e, {
448
451
  "aria-labelledby": S,
449
452
  "aria-describedby": j,
450
453
  style: { background: W, ...m },
451
- children: /* @__PURE__ */ t("div", { style: i, className: s, children: V && /* @__PURE__ */ t(ee.Provider, { value: X, children: /* @__PURE__ */ _e(q, { ...b.current, key: P }) }) })
454
+ children: /* @__PURE__ */ t("div", { style: c, className: s, children: V && /* @__PURE__ */ t(ee.Provider, { value: X, children: /* @__PURE__ */ _e(q, { ...b.current, key: P }) }) })
452
455
  }
453
456
  ),
454
457
  [
455
458
  l,
456
459
  ae,
457
- $,
460
+ D,
458
461
  W,
459
462
  H,
460
463
  y,
@@ -473,50 +476,50 @@ function ne(e, {
473
476
  le,
474
477
  r,
475
478
  m,
476
- i,
479
+ c,
477
480
  s
478
481
  ]
479
- ), { show: Ie, reject: $ }];
482
+ ), { show: Ie, reject: D }];
480
483
  }
481
- const Ro = () => {
484
+ const Eo = () => {
482
485
  const e = Me(ee);
483
486
  if (e == null)
484
487
  throw new Error("useDialogPromise is being used outside of dialog.");
485
488
  return e;
486
- }, Bt = "_alertDialog_14t8t_1", $t = "_closing_14t8t_22", U = {
487
- alertDialog: Bt,
489
+ }, Dt = "_alertDialog_14t8t_1", $t = "_closing_14t8t_22", U = {
490
+ alertDialog: Dt,
488
491
  closing: $t
489
492
  };
490
- function Eo(e, o) {
493
+ function Wo(e, o) {
491
494
  return ne(e, {
492
495
  ...o,
493
496
  modal: !0,
494
- closingClassName: c(o?.closingClassName, U.closing),
495
- contentWrapperClassName: c(
497
+ closingClassName: i(o?.closingClassName, U.closing),
498
+ contentWrapperClassName: i(
496
499
  o?.contentWrapperClassName,
497
500
  U.contentWrapper
498
501
  ),
499
- className: c(o?.className, U.alertDialog)
502
+ className: i(o?.className, U.alertDialog)
500
503
  });
501
504
  }
502
- const kt = "_drawerDialog_11g6r_1", xt = "_left_11g6r_13", Dt = "_right_11g6r_14", Lt = "_contentWrapper_11g6r_19", Ft = "_slideInLeft_11g6r_1", Ot = "_closing_11g6r_36", It = "_slideOutLeft_11g6r_1", zt = "_slideInRight_11g6r_1", At = "_slideOutRight_11g6r_1", Tt = "_top_11g6r_54", Mt = "_bottom_11g6r_55", Rt = "_slideInTop_11g6r_1", Et = "_slideOutTop_11g6r_1", Wt = "_slideInBottom_11g6r_1", Ht = "_slideOutBottom_11g6r_1", M = {
505
+ const kt = "_drawerDialog_11g6r_1", xt = "_left_11g6r_13", Lt = "_right_11g6r_14", Ft = "_contentWrapper_11g6r_19", Ot = "_slideInLeft_11g6r_1", It = "_closing_11g6r_36", zt = "_slideOutLeft_11g6r_1", At = "_slideInRight_11g6r_1", Tt = "_slideOutRight_11g6r_1", Mt = "_top_11g6r_54", Rt = "_bottom_11g6r_55", Et = "_slideInTop_11g6r_1", Wt = "_slideOutTop_11g6r_1", Ht = "_slideInBottom_11g6r_1", St = "_slideOutBottom_11g6r_1", M = {
503
506
  drawerDialog: kt,
504
507
  left: xt,
505
- right: Dt,
506
- contentWrapper: Lt,
507
- slideInLeft: Ft,
508
- closing: Ot,
509
- slideOutLeft: It,
510
- slideInRight: zt,
511
- slideOutRight: At,
512
- top: Tt,
513
- bottom: Mt,
514
- slideInTop: Rt,
515
- slideOutTop: Et,
516
- slideInBottom: Wt,
517
- slideOutBottom: Ht
508
+ right: Lt,
509
+ contentWrapper: Ft,
510
+ slideInLeft: Ot,
511
+ closing: It,
512
+ slideOutLeft: zt,
513
+ slideInRight: At,
514
+ slideOutRight: Tt,
515
+ top: Mt,
516
+ bottom: Rt,
517
+ slideInTop: Et,
518
+ slideOutTop: Wt,
519
+ slideInBottom: Ht,
520
+ slideOutBottom: St
518
521
  };
519
- function Wo(e, o = "left", n) {
522
+ function Ho(e, o = "left", n) {
520
523
  return ne(e, {
521
524
  ...n,
522
525
  disableCloseOnClickOutside: !0,
@@ -524,45 +527,45 @@ function Wo(e, o = "left", n) {
524
527
  // Drawers never block page scroll. The drawer's own scroll is kept from
525
528
  // chaining to the page by overscroll-behavior on its content.
526
529
  blockScroll: !1,
527
- closingClassName: c(n?.closingClassName, M.closing),
528
- contentWrapperClassName: c(
530
+ closingClassName: i(n?.closingClassName, M.closing),
531
+ contentWrapperClassName: i(
529
532
  n?.contentWrapperClassName,
530
533
  M.contentWrapper
531
534
  ),
532
- className: c(n?.className, M.drawerDialog, M[o])
535
+ className: i(n?.className, M.drawerDialog, M[o])
533
536
  });
534
537
  }
535
- const St = "_modalDialog_iw29e_1", jt = "_closing_iw29e_37", Pt = "_contentWrapper_iw29e_101", J = {
536
- modalDialog: St,
537
- closing: jt,
538
- contentWrapper: Pt
538
+ const jt = "_modalDialog_iw29e_1", Pt = "_closing_iw29e_37", Gt = "_contentWrapper_iw29e_101", J = {
539
+ modalDialog: jt,
540
+ closing: Pt,
541
+ contentWrapper: Gt
539
542
  };
540
- function Ho(e, o) {
543
+ function So(e, o) {
541
544
  return ne(e, {
542
545
  ...o,
543
546
  modal: !0,
544
- closingClassName: c(o?.closingClassName, J.closing),
545
- contentWrapperClassName: c(
547
+ closingClassName: i(o?.closingClassName, J.closing),
548
+ contentWrapperClassName: i(
546
549
  o?.contentWrapperClassName,
547
550
  J.contentWrapper
548
551
  ),
549
- className: c(o?.className, J.modalDialog)
552
+ className: i(o?.className, J.modalDialog)
550
553
  });
551
554
  }
552
- const De = ({
555
+ const xe = ({
553
556
  headingLevel: e = "h2",
554
557
  size: o = "medium",
555
558
  children: n
556
- }) => /* @__PURE__ */ t(te, { variant: o === "medium" ? "h3" : "h1", as: e, children: n }), Gt = "_modalActionButtons_zeqa6_1", Vt = {
557
- modalActionButtons: Gt
558
- }, qt = ({
559
+ }) => /* @__PURE__ */ t(te, { variant: o === "medium" ? "h3" : "h1", as: e, children: n }), Vt = "_modalActionButtons_zeqa6_1", qt = {
560
+ modalActionButtons: Vt
561
+ }, Xt = ({
559
562
  children: e
560
563
  }) => /* @__PURE__ */ a(B, { width: "100%", children: [
561
564
  /* @__PURE__ */ t(I, {}),
562
- /* @__PURE__ */ t("div", { className: Vt.modalActionButtons, children: e })
563
- ] }), Xt = "_modalBody_ozynq_1", pe = {
564
- modalBody: Xt
565
- }, Yt = ({
565
+ /* @__PURE__ */ t("div", { className: qt.modalActionButtons, children: e })
566
+ ] }), Yt = "_modalBody_ozynq_1", pe = {
567
+ modalBody: Yt
568
+ }, Ut = ({
566
569
  gap: e = 3,
567
570
  variant: o = "normal",
568
571
  className: n,
@@ -570,13 +573,13 @@ const De = ({
570
573
  }) => /* @__PURE__ */ t(
571
574
  C,
572
575
  {
573
- className: c(pe.modalBody, pe[o], n),
576
+ className: i(pe.modalBody, pe[o], n),
574
577
  indent: o === "relaxed" ? 5 : 3,
575
578
  spacing: o === "relaxed" ? 5 : 3,
576
579
  gap: e,
577
580
  ...s
578
581
  }
579
- ), Ut = ({
582
+ ), Jt = ({
580
583
  children: e,
581
584
  maxWidth: o
582
585
  }) => /* @__PURE__ */ t(
@@ -588,42 +591,42 @@ const De = ({
588
591
  maxWidth: o,
589
592
  children: e
590
593
  }
591
- ), Jt = (e) => /* @__PURE__ */ t(
594
+ ), Kt = (e) => /* @__PURE__ */ t(
592
595
  we,
593
596
  {
594
597
  size: "large",
595
598
  variant: "danger",
596
- leftIcon: Ge,
599
+ leftIcon: Ve,
597
600
  ...e
598
601
  }
599
- ), Kt = ({
602
+ ), Qt = ({
600
603
  heading: e,
601
604
  headingLevel: o,
602
605
  headingSize: n,
603
606
  onClickClose: s,
604
607
  closeButtonAriaLabel: r
605
608
  }) => /* @__PURE__ */ t(C, { children: /* @__PURE__ */ a(p, { justifyContent: "space-between", alignItems: "center", gap: 2, children: [
606
- e ? /* @__PURE__ */ t(De, { headingLevel: o, size: n, children: e }) : /* @__PURE__ */ t("div", {}),
609
+ e ? /* @__PURE__ */ t(xe, { headingLevel: o, size: n, children: e }) : /* @__PURE__ */ t("div", {}),
607
610
  s ? /* @__PURE__ */ t(
608
- Jt,
611
+ Kt,
609
612
  {
610
613
  onClick: s,
611
614
  size: n,
612
615
  "aria-label": r
613
616
  }
614
617
  ) : null
615
- ] }) }), So = ({
618
+ ] }) }), jo = ({
616
619
  icon: e,
617
620
  buttons: o,
618
621
  heading: n,
619
622
  text: s,
620
623
  children: r,
621
- maxWidth: i,
624
+ maxWidth: c,
622
625
  minWidth: m,
623
626
  ...l
624
- }) => /* @__PURE__ */ t(Ut, { children: /* @__PURE__ */ a(Yt, { gap: 0, children: [
627
+ }) => /* @__PURE__ */ t(Jt, { children: /* @__PURE__ */ a(Ut, { gap: 0, children: [
625
628
  l.onClickClose && /* @__PURE__ */ t(
626
- Kt,
629
+ Qt,
627
630
  {
628
631
  onClickClose: l.onClickClose,
629
632
  closeButtonAriaLabel: l.closeButtonAriaLabel
@@ -635,7 +638,7 @@ const De = ({
635
638
  gap: 2,
636
639
  flexDirection: "column",
637
640
  alignItems: "center",
638
- maxWidth: i,
641
+ maxWidth: c,
639
642
  minWidth: m,
640
643
  children: [
641
644
  e && /* @__PURE__ */ a(K, { children: [
@@ -643,17 +646,17 @@ const De = ({
643
646
  /* @__PURE__ */ t(Be, { icon: e, size: "large" }),
644
647
  /* @__PURE__ */ t(I, {})
645
648
  ] }),
646
- /* @__PURE__ */ t(De, { children: n }),
649
+ /* @__PURE__ */ t(xe, { children: n }),
647
650
  s && /* @__PURE__ */ t(Z, { textAlign: "center", children: s }),
648
651
  r,
649
- o && /* @__PURE__ */ t(qt, { children: o })
652
+ o && /* @__PURE__ */ t(Xt, { children: o })
650
653
  ]
651
654
  }
652
655
  )
653
- ] }) }), Qt = "_modalFooter_1ypno_1", Zt = "_sticky_1ypno_10", he = {
654
- modalFooter: Qt,
655
- sticky: Zt
656
- }, jo = ({
656
+ ] }) }), Zt = "_modalFooter_1ypno_1", eo = "_sticky_1ypno_10", he = {
657
+ modalFooter: Zt,
658
+ sticky: eo
659
+ }, Po = ({
657
660
  sticky: e,
658
661
  zIndex: o = 4,
659
662
  gap: n = 2,
@@ -662,28 +665,28 @@ const De = ({
662
665
  }) => /* @__PURE__ */ t(
663
666
  p,
664
667
  {
665
- className: c(he.modalFooter, e && he.sticky, s),
668
+ className: i(he.modalFooter, e && he.sticky, s),
666
669
  shadow: "var(--swui-sticky-footer-shadow)",
667
670
  zIndex: o,
668
671
  gap: n,
669
672
  ...r
670
673
  }
671
- ), eo = "_unreadDot_l8bni_1", to = "_dot_l8bni_4", ye = {
672
- unreadDot: eo,
673
- dot: to
674
- }, oo = ({ children: e }) => /* @__PURE__ */ a("div", { className: ye.unreadDot, children: [
674
+ ), to = "_unreadDot_l8bni_1", oo = "_dot_l8bni_4", ye = {
675
+ unreadDot: to,
676
+ dot: oo
677
+ }, no = ({ children: e }) => /* @__PURE__ */ a("div", { className: ye.unreadDot, children: [
675
678
  e,
676
679
  /* @__PURE__ */ t("div", { className: ye.dot })
677
- ] }), no = "_notificationHeader_1rl25_1", so = "_timestamp_1rl25_2", Ce = {
678
- notificationHeader: no,
679
- timestamp: so
680
+ ] }), so = "_notificationHeader_1rl25_1", ro = "_timestamp_1rl25_2", Ce = {
681
+ notificationHeader: so,
682
+ timestamp: ro
680
683
  }, Le = ({
681
684
  text: e,
682
685
  timestamp: o,
683
686
  icon: n,
684
687
  iconAriaLabel: s,
685
688
  contentLeft: r,
686
- contentRight: i,
689
+ contentRight: c,
687
690
  onClickClose: m,
688
691
  unread: l = !1,
689
692
  variant: h,
@@ -697,7 +700,7 @@ const De = ({
697
700
  icon: n,
698
701
  "aria-label": s,
699
702
  variant: "whiteBg",
700
- backgroundColor: u || ro(l, h)
703
+ backgroundColor: u || ao(l, h)
701
704
  }
702
705
  ) : void 0;
703
706
  return /* @__PURE__ */ a(
@@ -711,7 +714,7 @@ const De = ({
711
714
  children: [
712
715
  /* @__PURE__ */ a(p, { gap: 2, alignItems: "flex-start", children: [
713
716
  r && /* @__PURE__ */ t(C, { justifyContent: "center", children: r }),
714
- !r && v && /* @__PURE__ */ t(p, { alignItems: "center", height: "40px", children: l ? /* @__PURE__ */ t(oo, { children: v }) : v }),
717
+ !r && v && /* @__PURE__ */ t(p, { alignItems: "center", height: "40px", children: l ? /* @__PURE__ */ t(no, { children: v }) : v }),
715
718
  /* @__PURE__ */ a(B, { minHeight: 20, justifyContent: "center", flex: 1, gap: 0.5, children: [
716
719
  n || m || y ? /* @__PURE__ */ t(Q, { num: 0.5 }) : null,
717
720
  /* @__PURE__ */ t(Z, { variant: "bold", children: e }),
@@ -719,7 +722,7 @@ const De = ({
719
722
  Z,
720
723
  {
721
724
  size: "small",
722
- color: $e(
725
+ color: De(
723
726
  l ? "--lhds-color-blue-600" : "--lhds-color-ui-600"
724
727
  ),
725
728
  children: o
@@ -727,21 +730,21 @@ const De = ({
727
730
  ) })
728
731
  ] })
729
732
  ] }),
730
- i && /* @__PURE__ */ t(C, { justifyContent: "center", children: i }),
733
+ c && /* @__PURE__ */ t(C, { justifyContent: "center", children: c }),
731
734
  m && /* @__PURE__ */ t(p, { alignItems: "center", height: "40px", width: "40px", children: /* @__PURE__ */ t(oe, { onClick: m }) })
732
735
  ]
733
736
  }
734
737
  );
735
- }, ro = (e, o) => {
738
+ }, ao = (e, o) => {
736
739
  if (!(!e && o === "standard"))
737
740
  return "--lhds-color-ui-50";
738
- }, ao = "_notification_tpz0j_1", lo = "_body_tpz0j_10", co = "_standard_tpz0j_15", io = "_unread_tpz0j_16", mo = "_danger_tpz0j_21", R = {
739
- notification: ao,
740
- body: lo,
741
- standard: co,
742
- unread: io,
743
- danger: mo
744
- }, Po = ({
741
+ }, lo = "_notification_tpz0j_1", co = "_body_tpz0j_10", io = "_standard_tpz0j_15", mo = "_unread_tpz0j_16", uo = "_danger_tpz0j_21", R = {
742
+ notification: lo,
743
+ body: co,
744
+ standard: io,
745
+ unread: mo,
746
+ danger: uo
747
+ }, Go = ({
745
748
  variant: e = "standard",
746
749
  children: o,
747
750
  unread: n,
@@ -750,7 +753,7 @@ const De = ({
750
753
  "div",
751
754
  {
752
755
  "data-comp": "Notification",
753
- className: c(
756
+ className: i(
754
757
  R.notification,
755
758
  R[e],
756
759
  n && R.unread
@@ -760,17 +763,17 @@ const De = ({
760
763
  o && /* @__PURE__ */ t(C, { className: R.body, children: o })
761
764
  ]
762
765
  }
763
- ), uo = "_notificationList_1rkvu_1", _o = {
764
- notificationList: uo
765
- }, Go = ({
766
+ ), _o = "_notificationList_1rkvu_1", fo = {
767
+ notificationList: _o
768
+ }, Vo = ({
766
769
  children: e
767
- }) => /* @__PURE__ */ a("div", { "data-comp": "NotificationList", className: _o.notificationList, children: [
770
+ }) => /* @__PURE__ */ a("div", { "data-comp": "NotificationList", className: fo.notificationList, children: [
768
771
  e,
769
772
  /* @__PURE__ */ t("div", {})
770
- ] }), fo = "_toast_1ifzt_1", go = "_body_1ifzt_2", ve = {
771
- toast: fo,
772
- body: go
773
- }, Vo = ({
773
+ ] }), go = "_toast_1ifzt_1", po = "_body_1ifzt_2", ve = {
774
+ toast: go,
775
+ body: po
776
+ }, qo = ({
774
777
  children: e,
775
778
  width: o = 364,
776
779
  maxWidth: n,
@@ -787,14 +790,14 @@ const De = ({
787
790
  e && /* @__PURE__ */ t("div", { className: ve.body, children: e })
788
791
  ]
789
792
  }
790
- ), po = "_toastBox_1lvsy_1", ho = "_clickable_1lvsy_8", be = {
791
- toastBox: po,
792
- clickable: ho
793
- }, qo = ({ className: e, ...o }) => /* @__PURE__ */ t(
793
+ ), ho = "_toastBox_1lvsy_1", yo = "_clickable_1lvsy_8", be = {
794
+ toastBox: ho,
795
+ clickable: yo
796
+ }, Xo = ({ className: e, ...o }) => /* @__PURE__ */ t(
794
797
  B,
795
798
  {
796
799
  as: o.onClick ? "button" : void 0,
797
- className: c(
800
+ className: i(
798
801
  e,
799
802
  be.toastBox,
800
803
  o.onClick && be.clickable
@@ -803,12 +806,12 @@ const De = ({
803
806
  role: "alert",
804
807
  ...o
805
808
  }
806
- ), yo = "_toastContainer_1rek2_1", Co = {
807
- toastContainer: yo
808
- }, Xo = ({ ...e }) => /* @__PURE__ */ t(
809
- Ve,
809
+ ), Co = "_toastContainer_1rek2_1", vo = {
810
+ toastContainer: Co
811
+ }, Yo = ({ ...e }) => /* @__PURE__ */ t(
812
+ qe,
810
813
  {
811
- className: Co.toastContainer,
814
+ className: vo.toastContainer,
812
815
  closeButton: ({ closeToast: o }) => /* @__PURE__ */ t(oe, { onClick: o }),
813
816
  hideProgressBar: !0,
814
817
  pauseOnFocusLoss: !1,
@@ -816,42 +819,42 @@ const De = ({
816
819
  draggable: !1,
817
820
  ...e
818
821
  }
819
- ), Yo = (e, o) => qe(e, o);
822
+ ), Uo = (e, o) => Xe(e, o);
820
823
  export {
821
- zo as Alert,
822
- Ze as BaseWindow,
823
- xe as DRAGGABLE_CANCEL_CLASSNAME,
824
- ke as DRAGGABLE_HANDLE_CLASSNAME,
824
+ Ao as Alert,
825
+ et as BaseWindow,
826
+ ke as DRAGGABLE_CANCEL_CLASSNAME,
827
+ $e as DRAGGABLE_HANDLE_CLASSNAME,
825
828
  ee as DialogContext,
826
- Oo as Drawer,
827
- Io as DrawerHeader,
828
- So as InfoAlert,
829
- Ao as LoadingModal,
830
- vt as Modal,
831
- qt as ModalActionButtons,
832
- Yt as ModalBody,
833
- Jt as ModalCloseButton,
834
- Ut as ModalContainer,
835
- jo as ModalFooter,
836
- Kt as ModalHeader,
837
- De as ModalHeading,
838
- Po as Notification,
829
+ Io as Drawer,
830
+ zo as DrawerHeader,
831
+ jo as InfoAlert,
832
+ To as LoadingModal,
833
+ bt as Modal,
834
+ Xt as ModalActionButtons,
835
+ Ut as ModalBody,
836
+ Kt as ModalCloseButton,
837
+ Jt as ModalContainer,
838
+ Po as ModalFooter,
839
+ Qt as ModalHeader,
840
+ xe as ModalHeading,
841
+ Go as Notification,
839
842
  Le as NotificationHeader,
840
- Go as NotificationList,
841
- Vo as Toast,
842
- qo as ToastBox,
843
- Xo as ToastContainer,
844
- oo as UnreadDot,
845
- To as Window,
846
- Mo as WindowFooter,
847
- wt as WindowHeader,
848
- ro as getIconBgColorFromVariant,
849
- Fo as setupDeclarativeModals,
850
- Yo as showToast,
851
- Eo as useAlertDialog,
843
+ Vo as NotificationList,
844
+ qo as Toast,
845
+ Xo as ToastBox,
846
+ Yo as ToastContainer,
847
+ no as UnreadDot,
848
+ Mo as Window,
849
+ Ro as WindowFooter,
850
+ Bt as WindowHeader,
851
+ ao as getIconBgColorFromVariant,
852
+ Oo as setupDeclarativeModals,
853
+ Uo as showToast,
854
+ Wo as useAlertDialog,
852
855
  ne as useDialog,
853
- Ro as useDialogPromise,
854
- Wo as useDrawerDialog,
855
- Ho as useModalDialog
856
+ Eo as useDialogPromise,
857
+ Ho as useDrawerDialog,
858
+ So as useModalDialog
856
859
  };
857
860
  //# sourceMappingURL=index.es.js.map