@versini/ui-panel 1.1.3 → 1.1.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.
@@ -0,0 +1,99 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { useFloating as E, useClick as _, useDismiss as C, useRole as R, useInteractions as x, useMergeRefs as P, FloatingPortal as k, FloatingOverlay as y, FloatingFocusManager as F } from "@floating-ui/react";
3
+ import S from "clsx";
4
+ import * as o from "react";
5
+ import { useId as h } from "react";
6
+ const I = o.createContext(null);
7
+ function D({
8
+ initialOpen: n = !1,
9
+ open: i,
10
+ onOpenChange: t
11
+ } = {}) {
12
+ const [e, r] = o.useState(n), [s, l] = o.useState(), [c, b] = o.useState(), u = i ?? e, f = t ?? r, p = E({
13
+ open: u,
14
+ onOpenChange: f
15
+ }), m = p.context, w = _(m, {
16
+ enabled: i == null
17
+ }), M = C(m, {
18
+ outsidePress: !1,
19
+ outsidePressEvent: "mousedown"
20
+ }), v = R(m), g = x([w, M, v]);
21
+ return o.useMemo(
22
+ () => ({
23
+ open: u,
24
+ setOpen: f,
25
+ ...g,
26
+ ...p,
27
+ labelId: s,
28
+ descriptionId: c,
29
+ setLabelId: l,
30
+ setDescriptionId: b
31
+ }),
32
+ [u, f, g, p, s, c]
33
+ );
34
+ }
35
+ const d = () => {
36
+ const n = o.useContext(I);
37
+ if (n == null)
38
+ throw new Error("Modal components must be wrapped in <Modal />");
39
+ return n;
40
+ };
41
+ function $({
42
+ children: n,
43
+ ...i
44
+ }) {
45
+ const t = D(i);
46
+ return /* @__PURE__ */ a(I.Provider, { value: t, children: n });
47
+ }
48
+ const V = o.forwardRef(function(n, i) {
49
+ const { context: t, ...e } = d(), r = P([e.refs.setFloating, i]);
50
+ if (!t.open)
51
+ return null;
52
+ const { overlayBackground: s, ...l } = n, c = S("grid place-items-center", {
53
+ [`${s}`]: s,
54
+ "bg-black sm:bg-black/[.8]": !s
55
+ });
56
+ return /* @__PURE__ */ a(k, { children: /* @__PURE__ */ a(y, { className: c, lockScroll: !0, children: /* @__PURE__ */ a(F, { context: t, children: /* @__PURE__ */ a(
57
+ "div",
58
+ {
59
+ ref: r,
60
+ "aria-labelledby": e.labelId,
61
+ "aria-describedby": e.descriptionId,
62
+ ...e.getFloatingProps(l),
63
+ children: l.children
64
+ }
65
+ ) }) }) });
66
+ }), A = o.forwardRef(function({ children: n, ...i }, t) {
67
+ const { setLabelId: e } = d(), r = h();
68
+ return o.useLayoutEffect(() => (e(r), () => e(void 0)), [r, e]), /* @__PURE__ */ a("h1", { ...i, ref: t, id: r, children: n });
69
+ }), U = o.forwardRef(function({ children: n, ...i }, t) {
70
+ const { setDescriptionId: e } = d(), r = h();
71
+ return o.useLayoutEffect(() => (e(r), () => e(void 0)), [r, e]), /* @__PURE__ */ a("div", { ...i, ref: t, id: r, children: n });
72
+ }), j = o.forwardRef(function(n, i) {
73
+ const { setOpen: t } = d(), { trigger: e, className: r, ...s } = n, l = o.useCallback(() => t(!1), [t]);
74
+ return /* @__PURE__ */ a("div", { className: r, children: o.cloneElement(e, {
75
+ ref: i,
76
+ onClick: l,
77
+ ...s
78
+ }) });
79
+ });
80
+ /*!
81
+ @versini/ui-private v1.8.0
82
+ © 2024 gizmette.com
83
+ */
84
+ try {
85
+ window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
86
+ version: "1.8.0",
87
+ buildTime: "12/25/2024 12:30 PM EST",
88
+ homepage: "https://github.com/aversini/ui-components",
89
+ license: "MIT"
90
+ });
91
+ } catch {
92
+ }
93
+ export {
94
+ $ as Modal,
95
+ j as ModalClose,
96
+ V as ModalContent,
97
+ U as ModalDescription,
98
+ A as ModalHeading
99
+ };
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { jsx as n, jsxs as y, Fragment as U } from "react/jsx-runtime";
2
2
  import o from "clsx";
3
- import T, { lazy as P, useRef as z, useEffect as j, Suspense as O } from "react";
3
+ import E, { lazy as A, useRef as z, useEffect as O, Suspense as j } from "react";
4
4
  /*!
5
- @versini/ui-panel v1.1.3
5
+ @versini/ui-panel v1.1.4
6
6
  © 2024 gizmette.com
7
7
  */
8
8
  try {
9
9
  window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
10
- version: "1.1.3",
11
- buildTime: "12/25/2024 10:51 AM EST",
10
+ version: "1.1.4",
11
+ buildTime: "12/25/2024 12:30 PM EST",
12
12
  homepage: "https://github.com/aversini/ui-components",
13
13
  license: "MIT"
14
14
  });
15
15
  } catch {
16
16
  }
17
- const M = "av-messagebox", R = "av-panel", C = "av-button";
17
+ const M = "av-messagebox", C = "av-panel", R = "av-button";
18
18
  /*!
19
19
  @versini/ui-spacing v1.0.0
20
20
  © 2024 gizmette.com
@@ -22,7 +22,7 @@ const M = "av-messagebox", R = "av-panel", C = "av-button";
22
22
  try {
23
23
  window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
24
24
  version: "1.0.0",
25
- buildTime: "12/25/2024 10:51 AM EST",
25
+ buildTime: "12/25/2024 12:30 PM EST",
26
26
  homepage: "https://github.com/aversini/ui-components",
27
27
  license: "MIT"
28
28
  });
@@ -37,7 +37,7 @@ const G = (e) => {
37
37
  (e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), r = t.join(" ");
38
38
  }
39
39
  return r;
40
- }, S = "icon", W = "button", D = "link", H = ({
40
+ }, T = "icon", W = "button", D = "link", H = ({
41
41
  type: e,
42
42
  size: r,
43
43
  labelRight: t,
@@ -58,7 +58,7 @@ const G = (e) => {
58
58
  [g]: r === "medium",
59
59
  [i]: r === "large"
60
60
  });
61
- case S:
61
+ case T:
62
62
  return o("inline-flex items-center", {
63
63
  "justify-center": d === "center",
64
64
  "justify-start": d === "left",
@@ -192,7 +192,7 @@ const G = (e) => {
192
192
  "focus:outline-focus-light": e === "light",
193
193
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
194
194
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
195
- }), A = ({
195
+ }), $ = ({
196
196
  type: e,
197
197
  className: r,
198
198
  raw: t,
@@ -207,14 +207,14 @@ const G = (e) => {
207
207
  spacing: b,
208
208
  noBackground: m,
209
209
  variant: c,
210
- noTruncate: f,
211
- align: v
212
- }) => (c || (c = "primary"), t ? o(C, r) : o(
213
- C,
210
+ noTruncate: v,
211
+ align: f
212
+ }) => (c || (c = "primary"), t ? o(R, r) : o(
213
+ R,
214
214
  r,
215
215
  G(b),
216
- X({ mode: a, variant: c, noBackground: m, noTruncate: f }),
217
- H({ type: e, size: i, labelRight: s, labelLeft: u, align: v }),
216
+ X({ mode: a, variant: c, noBackground: m, noTruncate: v }),
217
+ H({ type: e, size: i, labelRight: s, labelLeft: u, align: f }),
218
218
  q({ mode: a, variant: c, noBorder: h }),
219
219
  J({ focusMode: d }),
220
220
  Y({ mode: a, variant: c, disabled: l }),
@@ -226,7 +226,7 @@ const G = (e) => {
226
226
  )), K = (e, r, t) => {
227
227
  var a;
228
228
  !r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
229
- }, B = T.forwardRef((e, r) => {
229
+ }, B = E.forwardRef((e, r) => {
230
230
  const { onClick: t, noInternalClick: a = !1, ...d } = e;
231
231
  return /* @__PURE__ */ n(
232
232
  "button",
@@ -240,7 +240,7 @@ const G = (e) => {
240
240
  );
241
241
  });
242
242
  B.displayName = "BaseButton";
243
- const $ = T.forwardRef(
243
+ const L = E.forwardRef(
244
244
  ({
245
245
  children: e,
246
246
  disabled: r = !1,
@@ -256,13 +256,13 @@ const $ = T.forwardRef(
256
256
  size: b = "medium",
257
257
  labelRight: m,
258
258
  labelLeft: c,
259
- spacing: f,
260
- noBackground: v = !1,
259
+ spacing: v,
260
+ noBackground: f = !1,
261
261
  align: _ = "center",
262
262
  ...w
263
263
  }, N) => {
264
- const I = A({
265
- type: S,
264
+ const I = $({
265
+ type: T,
266
266
  mode: t,
267
267
  focusMode: a,
268
268
  fullWidth: d,
@@ -273,10 +273,10 @@ const $ = T.forwardRef(
273
273
  size: b,
274
274
  labelRight: m,
275
275
  labelLeft: c,
276
- spacing: f,
277
- noBackground: v,
276
+ spacing: v,
277
+ noBackground: f,
278
278
  align: _
279
- }), E = o({
279
+ }), S = o({
280
280
  "text-copy-accent-dark": t === "light" && !i,
281
281
  "text-copy-light": t === "dark" && !i,
282
282
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !i,
@@ -293,28 +293,28 @@ const $ = T.forwardRef(
293
293
  ...w,
294
294
  children: [
295
295
  c && /* @__PURE__ */ n("span", { className: "pr-2", children: c }),
296
- /* @__PURE__ */ n("div", { className: E, children: e }),
296
+ /* @__PURE__ */ n("div", { className: S, children: e }),
297
297
  m && /* @__PURE__ */ n("span", { className: "pl-2", children: m })
298
298
  ]
299
299
  }
300
300
  );
301
301
  }
302
302
  );
303
- $.displayName = "ButtonIcon";
303
+ L.displayName = "ButtonIcon";
304
304
  /*!
305
- @versini/ui-button v1.3.1
305
+ @versini/ui-button v1.4.0
306
306
  © 2024 gizmette.com
307
307
  */
308
308
  try {
309
309
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
310
- version: "1.3.1",
311
- buildTime: "12/25/2024 10:51 AM EST",
310
+ version: "1.4.0",
311
+ buildTime: "12/25/2024 12:30 PM EST",
312
312
  homepage: "https://github.com/aversini/ui-components",
313
313
  license: "MIT"
314
314
  });
315
315
  } catch {
316
316
  }
317
- const Q = T.forwardRef(
317
+ const Q = E.forwardRef(
318
318
  ({
319
319
  children: e,
320
320
  disabled: r = !1,
@@ -330,14 +330,14 @@ const Q = T.forwardRef(
330
330
  size: b = "medium",
331
331
  labelRight: m,
332
332
  labelLeft: c,
333
- spacing: f,
334
- noBackground: v = !1,
333
+ spacing: v,
334
+ noBackground: f = !1,
335
335
  align: _ = "center",
336
336
  active: w = !1,
337
337
  ...N
338
338
  }, I) => {
339
- const E = A({
340
- type: S,
339
+ const S = $({
340
+ type: T,
341
341
  mode: t,
342
342
  focusMode: a,
343
343
  fullWidth: d,
@@ -348,10 +348,10 @@ const Q = T.forwardRef(
348
348
  size: b,
349
349
  labelRight: m,
350
350
  labelLeft: c,
351
- spacing: f,
352
- noBackground: v,
351
+ spacing: v,
352
+ noBackground: f,
353
353
  align: _
354
- }), L = o({
354
+ }), P = o({
355
355
  "text-copy-accent-dark": t === "light" && !i,
356
356
  "text-copy-light": t === "dark" && !i,
357
357
  "text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !i,
@@ -377,14 +377,14 @@ const Q = T.forwardRef(
377
377
  B,
378
378
  {
379
379
  ref: I,
380
- className: E,
380
+ className: S,
381
381
  disabled: r,
382
382
  type: g,
383
383
  "aria-label": s || u,
384
384
  ...N,
385
385
  children: [
386
386
  c && /* @__PURE__ */ n("span", { className: "pr-2", children: c }),
387
- /* @__PURE__ */ n("div", { className: L, children: e }),
387
+ /* @__PURE__ */ n("div", { className: P, children: e }),
388
388
  m && /* @__PURE__ */ n("span", { className: "pl-2", children: m })
389
389
  ]
390
390
  }
@@ -399,7 +399,7 @@ Q.displayName = "ButtonSort";
399
399
  try {
400
400
  window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
401
401
  version: "1.0.0",
402
- buildTime: "12/25/2024 10:51 AM EST",
402
+ buildTime: "12/25/2024 12:30 PM EST",
403
403
  homepage: "https://github.com/aversini/ui-components",
404
404
  license: "MIT"
405
405
  });
@@ -449,13 +449,13 @@ const Z = (e) => {
449
449
  ] });
450
450
  };
451
451
  /*!
452
- @versini/ui-private v1.7.0
452
+ @versini/ui-svgicon v1.0.0
453
453
  © 2024 gizmette.com
454
454
  */
455
455
  try {
456
- window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
457
- version: "1.7.0",
458
- buildTime: "12/25/2024 10:51 AM EST",
456
+ window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
457
+ version: "1.0.0",
458
+ buildTime: "12/25/2024 12:30 PM EST",
459
459
  homepage: "https://github.com/aversini/ui-components",
460
460
  license: "MIT"
461
461
  });
@@ -482,13 +482,13 @@ const te = ({
482
482
  }
483
483
  );
484
484
  /*!
485
- @versini/ui-icons v1.17.1
485
+ @versini/ui-icons v1.18.0
486
486
  © 2024 gizmette.com
487
487
  */
488
488
  try {
489
489
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
490
- version: "1.17.1",
491
- buildTime: "12/25/2024 10:51 AM EST",
490
+ version: "1.18.0",
491
+ buildTime: "12/25/2024 12:30 PM EST",
492
492
  homepage: "https://github.com/aversini/ui-components",
493
493
  license: "MIT"
494
494
  });
@@ -500,8 +500,8 @@ const p = "panel", x = "messagebox", re = ({
500
500
  borderMode: t
501
501
  }) => ({
502
502
  main: o("prose prose-lighter flex flex-col bg-surface-medium", {
503
- [`${R} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: r === p,
504
- [`${R} w-full sm:w-[95%] md:max-w-2xl`]: r === p && !e,
503
+ [`${C} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: r === p,
504
+ [`${C} w-full sm:w-[95%] md:max-w-2xl`]: r === p && !e,
505
505
  [`${M} rounded-lg border-2`]: r === x,
506
506
  [`${M} w-[95%] sm:w-[50%] md:max-w-2xl`]: r === x && !e,
507
507
  [`${e}`]: !!e,
@@ -514,8 +514,8 @@ const p = "panel", x = "messagebox", re = ({
514
514
  footer: "flex flex-grow flex-col sm:p-4 p-2",
515
515
  header: "sm:p-4 mb-0 p-2",
516
516
  close: "sm:p-4 p-2"
517
- }), k = (e) => P(
518
- () => import("./chunks/index.CBOh3ekz.js").then((r) => ({
517
+ }), k = (e) => A(
518
+ () => import("./chunks/index.DisnC3NY.js").then((r) => ({
519
519
  default: r[e]
520
520
  }))
521
521
  ), ae = k("Modal"), oe = k("ModalClose"), ie = k("ModalContent"), ne = k("ModalDescription"), le = k("ModalHeading"), ge = ({
@@ -529,16 +529,16 @@ const p = "panel", x = "messagebox", re = ({
529
529
  className: i
530
530
  }) => {
531
531
  const h = z(""), s = re({ className: i, kind: g, borderMode: l });
532
- return j(() => (e && (h.current = document.title, document.title = `${t} | ${h.current}`), () => {
532
+ return O(() => (e && (h.current = document.title, document.title = `${t} | ${h.current}`), () => {
533
533
  e && (document.title = h.current);
534
- }), [t, e]), /* @__PURE__ */ n(O, { fallback: /* @__PURE__ */ n("div", {}), children: e && /* @__PURE__ */ n(ae, { open: e, onOpenChange: r, children: /* @__PURE__ */ y(ie, { className: s.main, children: [
534
+ }), [t, e]), /* @__PURE__ */ n(j, { fallback: /* @__PURE__ */ n("div", {}), children: e && /* @__PURE__ */ n(ae, { open: e, onOpenChange: r, children: /* @__PURE__ */ y(ie, { className: s.main, children: [
535
535
  /* @__PURE__ */ y("div", { className: "flex flex-row-reverse items-center justify-between", children: [
536
536
  /* @__PURE__ */ n(
537
537
  oe,
538
538
  {
539
539
  className: s.close,
540
540
  trigger: /* @__PURE__ */ n(
541
- $,
541
+ L,
542
542
  {
543
543
  mode: "dark",
544
544
  focusMode: "light",
@@ -557,6 +557,6 @@ const p = "panel", x = "messagebox", re = ({
557
557
  };
558
558
  export {
559
559
  M as MESSAGEBOX_CLASSNAME,
560
- R as PANEL_CLASSNAME,
560
+ C as PANEL_CLASSNAME,
561
561
  ge as Panel
562
562
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-panel",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,14 +39,14 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@tailwindcss/typography": "0.5.15",
42
- "@versini/ui-button": "1.3.1",
43
- "@versini/ui-icons": "1.17.1",
44
- "@versini/ui-private": "1.7.0",
42
+ "@versini/ui-button": "1.4.0",
43
+ "@versini/ui-icons": "1.18.0",
44
+ "@versini/ui-private": "1.8.0",
45
45
  "clsx": "2.1.1",
46
46
  "tailwindcss": "3.4.17"
47
47
  },
48
48
  "sideEffects": [
49
49
  "**/*.css"
50
50
  ],
51
- "gitHead": "a15d974fcc1a098a9f35a80ff37b1b0901278d96"
51
+ "gitHead": "51f74738512b2962734cd6087ded58d17ef0f8d4"
52
52
  }
@@ -1,156 +0,0 @@
1
- import { jsx as l, jsxs as M, Fragment as C } from "react/jsx-runtime";
2
- import { useFloating as x, useClick as N, useDismiss as S, useRole as R, useInteractions as y, useMergeRefs as P, FloatingPortal as $, FloatingOverlay as F, FloatingFocusManager as T } from "@floating-ui/react";
3
- import I from "clsx";
4
- import * as s from "react";
5
- import { useId as v } from "react";
6
- const b = s.createContext(null);
7
- function k({
8
- initialOpen: e = !1,
9
- open: t,
10
- onOpenChange: n
11
- } = {}) {
12
- const [o, i] = s.useState(e), [r, a] = s.useState(), [c, f] = s.useState(), d = t ?? o, u = n ?? i, m = x({
13
- open: d,
14
- onOpenChange: u
15
- }), h = m.context, w = N(h, {
16
- enabled: t == null
17
- }), _ = S(h, {
18
- outsidePress: !1,
19
- outsidePressEvent: "mousedown"
20
- }), E = R(h), g = y([w, _, E]);
21
- return s.useMemo(
22
- () => ({
23
- open: d,
24
- setOpen: u,
25
- ...g,
26
- ...m,
27
- labelId: r,
28
- descriptionId: c,
29
- setLabelId: a,
30
- setDescriptionId: f
31
- }),
32
- [d, u, g, m, r, c]
33
- );
34
- }
35
- const p = () => {
36
- const e = s.useContext(b);
37
- if (e == null)
38
- throw new Error("Modal components must be wrapped in <Modal />");
39
- return e;
40
- };
41
- function B({
42
- children: e,
43
- ...t
44
- }) {
45
- const n = k(t);
46
- return /* @__PURE__ */ l(b.Provider, { value: n, children: e });
47
- }
48
- const U = s.forwardRef(function(e, t) {
49
- const { context: n, ...o } = p(), i = P([o.refs.setFloating, t]);
50
- if (!n.open)
51
- return null;
52
- const { overlayBackground: r, ...a } = e, c = I("grid place-items-center", {
53
- [`${r}`]: r,
54
- "bg-black sm:bg-black/[.8]": !r
55
- });
56
- return /* @__PURE__ */ l($, { children: /* @__PURE__ */ l(F, { className: c, lockScroll: !0, children: /* @__PURE__ */ l(T, { context: n, children: /* @__PURE__ */ l(
57
- "div",
58
- {
59
- ref: i,
60
- "aria-labelledby": o.labelId,
61
- "aria-describedby": o.descriptionId,
62
- ...o.getFloatingProps(a),
63
- children: a.children
64
- }
65
- ) }) }) });
66
- }), j = s.forwardRef(function({ children: e, ...t }, n) {
67
- const { setLabelId: o } = p(), i = v();
68
- return s.useLayoutEffect(() => (o(i), () => o(void 0)), [i, o]), /* @__PURE__ */ l("h1", { ...t, ref: n, id: i, children: e });
69
- }), G = s.forwardRef(function({ children: e, ...t }, n) {
70
- const { setDescriptionId: o } = p(), i = v();
71
- return s.useLayoutEffect(() => (o(i), () => o(void 0)), [i, o]), /* @__PURE__ */ l("div", { ...t, ref: n, id: i, children: e });
72
- }), H = s.forwardRef(function(e, t) {
73
- const { setOpen: n } = p(), { trigger: o, className: i, ...r } = e, a = s.useCallback(() => n(!1), [n]);
74
- return /* @__PURE__ */ l("div", { className: i, children: s.cloneElement(o, {
75
- ref: t,
76
- onClick: a,
77
- ...r
78
- }) });
79
- });
80
- /*!
81
- @versini/ui-spacing v1.0.0
82
- © 2024 gizmette.com
83
- */
84
- try {
85
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
86
- version: "1.0.0",
87
- buildTime: "12/25/2024 10:51 AM EST",
88
- homepage: "https://github.com/aversini/ui-components",
89
- license: "MIT"
90
- });
91
- } catch {
92
- }
93
- const V = (e) => {
94
- let t = "";
95
- if (typeof e == "number" || typeof e == "string")
96
- t = "m-" + e;
97
- else {
98
- const n = [];
99
- (e == null ? void 0 : e.t) !== void 0 && n.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && n.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && n.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && n.push(`ml-${e.l}`), t = n.join(" ");
100
- }
101
- return t;
102
- }, q = ({
103
- children: e,
104
- fill: t,
105
- viewBox: n,
106
- className: o,
107
- defaultViewBox: i,
108
- defaultClassName: r,
109
- spacing: a,
110
- title: c,
111
- semantic: f = !1,
112
- ...d
113
- }) => {
114
- const u = V(a), m = I(
115
- u,
116
- o || r
117
- );
118
- return /* @__PURE__ */ M(C, { children: [
119
- /* @__PURE__ */ l(
120
- "svg",
121
- {
122
- xmlns: "http://www.w3.org/2000/svg",
123
- className: m,
124
- viewBox: n || i,
125
- fill: t || "currentColor",
126
- role: "img",
127
- "aria-hidden": !f,
128
- focusable: !1,
129
- ...d,
130
- children: e
131
- }
132
- ),
133
- c && f && /* @__PURE__ */ l("span", { className: "sr-only", children: c })
134
- ] });
135
- };
136
- /*!
137
- @versini/ui-private v1.7.0
138
- © 2024 gizmette.com
139
- */
140
- try {
141
- window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
142
- version: "1.7.0",
143
- buildTime: "12/25/2024 10:51 AM EST",
144
- homepage: "https://github.com/aversini/ui-components",
145
- license: "MIT"
146
- });
147
- } catch {
148
- }
149
- export {
150
- B as Modal,
151
- H as ModalClose,
152
- U as ModalContent,
153
- G as ModalDescription,
154
- j as ModalHeading,
155
- q as SvgIcon
156
- };