@youversion/design-system-components 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 0.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - f468773: Added a height to the Input component.
8
+
9
+ ## 0.5.1
10
+
11
+ ### Patch Changes
12
+
13
+ - f367f90: Add Tag to export file
14
+ - Updated dependencies [f367f90]
15
+ - @youversion/design-system-core@0.1.1
16
+
3
17
  ## 0.5.0
4
18
 
5
19
  ### Minor Changes
@@ -0,0 +1,9 @@
1
+ import { ClassValue } from 'clsx';
2
+ export interface Props {
3
+ className?: ClassValue;
4
+ message: string;
5
+ size?: 'sm' | 'lg';
6
+ variant?: 'default' | 'secondary' | 'error' | 'info' | 'success' | 'caution';
7
+ }
8
+ export declare const Tag: ({ message, variant, size, className }: Props) => JSX.Element;
9
+ //# sourceMappingURL=Tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAa,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAKxC,MAAM,WAAW,KAAK;IACpB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CAC9E;AAgBD,eAAO,MAAM,GAAG,0CAA8D,KAAK,gBAQlF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Tag';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Tag/index.tsx"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export * from './PopoverBody';
22
22
  export * from './PopoverTrigger';
23
23
  export * from './RadioSet';
24
24
  export * from './Select';
25
+ export * from './Tag';
25
26
  export * from './TimePicker';
26
27
  export * from './Tooltip';
27
28
  export * from './Typography';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
package/dist/index.es.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { jsxs as x, jsx as l, Fragment as se } from "react/jsx-runtime";
2
- import He, { forwardRef as y, createElement as R, useEffect as A, useLayoutEffect as gt, useRef as P, useState as j, useCallback as Y, useMemo as V, Children as xt, isValidElement as yt, useId as vt, cloneElement as wt } from "react";
2
+ import He, { forwardRef as y, createElement as R, useEffect as A, useLayoutEffect as ht, useRef as P, useState as W, useCallback as Y, useMemo as V, Children as xt, isValidElement as yt, useId as vt, cloneElement as wt } from "react";
3
3
  import c from "clsx";
4
4
  import "react-dom";
5
- var kt = Object.defineProperty, $t = Object.defineProperties, Nt = Object.getOwnPropertyDescriptors, ee = Object.getOwnPropertySymbols, Ae = Object.prototype.hasOwnProperty, Ue = Object.prototype.propertyIsEnumerable, ke = (e, t, r) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, St = (e, t) => {
5
+ var kt = Object.defineProperty, $t = Object.defineProperties, St = Object.getOwnPropertyDescriptors, ee = Object.getOwnPropertySymbols, Ae = Object.prototype.hasOwnProperty, Ue = Object.prototype.propertyIsEnumerable, ke = (e, t, r) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Nt = (e, t) => {
6
6
  for (var r in t || (t = {}))
7
7
  Ae.call(t, r) && ke(e, r, t[r]);
8
8
  if (ee)
9
9
  for (var r of ee(t))
10
10
  Ue.call(t, r) && ke(e, r, t[r]);
11
11
  return e;
12
- }, Ot = (e, t) => $t(e, Nt(t)), Et = (e, t) => {
12
+ }, Ot = (e, t) => $t(e, St(t)), Et = (e, t) => {
13
13
  var r = {};
14
14
  for (var n in e)
15
15
  Ae.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
@@ -19,7 +19,7 @@ var kt = Object.defineProperty, $t = Object.defineProperties, Nt = Object.getOwn
19
19
  return r;
20
20
  }, Lt = (e, t) => {
21
21
  var r = e, { title: n, titleId: a } = r, o = Et(r, ["title", "titleId"]);
22
- return x("svg", Ot(St({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? l("title", { id: a, children: n }) : null, l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.207 10a.5.5 0 0 0-.354.854l3.793 3.792a.5.5 0 0 0 .707 0l3.793-3.792a.5.5 0 0 0-.353-.854H8.207Z", fill: "currentColor" })] }));
22
+ return x("svg", Ot(Nt({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? l("title", { id: a, children: n }) : null, l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.207 10a.5.5 0 0 0-.354.854l3.793 3.792a.5.5 0 0 0 .707 0l3.793-3.792a.5.5 0 0 0-.353-.854H8.207Z", fill: "currentColor" })] }));
23
23
  }, It = y(Lt), Ke = It;
24
24
  const ce = (e) => {
25
25
  if (e) {
@@ -47,9 +47,9 @@ const ce = (e) => {
47
47
  height: u,
48
48
  margin: f,
49
49
  padding: m,
50
- width: g,
50
+ width: h,
51
51
  ...w
52
- }, b) => {
52
+ }, g) => {
53
53
  const p = {
54
54
  0: "",
55
55
  1: "shadow-light-1 dark:shadow-dark-1",
@@ -57,33 +57,33 @@ const ce = (e) => {
57
57
  4: "shadow-light-4 dark:shadow-dark-4",
58
58
  8: "shadow-light-8 dark:shadow-dark-8",
59
59
  12: "shadow-light-12 dark:shadow-dark-12"
60
- }, N = ce(s), k = ce(e), B = ce(t), E = $e(m), L = $e(f), v = c(
60
+ }, S = ce(s), k = ce(e), B = ce(t), E = $e(m), L = $e(f), v = c(
61
61
  r,
62
62
  n,
63
63
  p[i],
64
64
  L,
65
65
  E,
66
- N,
66
+ S,
67
67
  k,
68
68
  B,
69
- g,
69
+ h,
70
70
  u,
71
71
  a
72
72
  );
73
73
  return R(o, {
74
74
  className: v,
75
75
  ...w,
76
- ref: b
76
+ ref: g
77
77
  });
78
78
  }, I = y(Ct);
79
79
  I.displayName = "Box";
80
- const ge = ({ innerRef: e, forwardedRef: t }) => (A(() => {
80
+ const he = ({ innerRef: e, forwardedRef: t }) => (A(() => {
81
81
  [e, t].forEach((r) => {
82
82
  r && (typeof r == "function" ? r(e.current || null) : r.current = e.current || null);
83
83
  });
84
84
  }, [e, t]), e);
85
- function In() {
86
- gt(() => {
85
+ function Pn() {
86
+ ht(() => {
87
87
  const e = window.getComputedStyle(document.body).overflow;
88
88
  return document.body.style.overflow = "hidden", () => document.body.style.overflow = e;
89
89
  }, []);
@@ -100,9 +100,9 @@ const Pt = ({
100
100
  placeholder: u,
101
101
  startIcon: f,
102
102
  value: m,
103
- ...g
103
+ ...h
104
104
  }, w) => {
105
- const b = P(null), p = ge({ forwardedRef: w, innerRef: b }), [N, k] = j(Boolean(m)), [B, E] = j(!1);
105
+ const g = P(null), p = he({ forwardedRef: w, innerRef: g }), [S, k] = W(Boolean(m)), [B, E] = W(!1);
106
106
  A(() => {
107
107
  var d;
108
108
  k(Boolean((d = p == null ? void 0 : p.current) == null ? void 0 : d.value) || Boolean(m || u));
@@ -112,7 +112,7 @@ const Pt = ({
112
112
  k(Boolean((Q = p == null ? void 0 : p.current) == null ? void 0 : Q.value) || Boolean(m || u)), i && i(d);
113
113
  }, v = () => {
114
114
  t || !p.current || (p.current.focus(), E(!0));
115
- }, h = () => {
115
+ }, b = () => {
116
116
  E(!1);
117
117
  };
118
118
  return /* @__PURE__ */ x("div", { className: c(["flex items-start flex-col gap-0.5", e]), children: [
@@ -133,19 +133,19 @@ const Pt = ({
133
133
  "input",
134
134
  {
135
135
  className: c([
136
- "self-stretch bg-transparent flex-auto outline-none overflow-hidden",
136
+ "self-stretch bg-transparent flex-auto outline-none overflow-hidden h-[56px]",
137
137
  f ? "pis-1" : "pis-2",
138
138
  r ? "pie-1" : "pie-2",
139
139
  o ? "pbs-3 pbe-1" : "pbs-2 pbe-2"
140
140
  ]),
141
141
  disabled: t,
142
142
  id: s,
143
- onBlur: h,
143
+ onBlur: b,
144
144
  onChange: L,
145
145
  placeholder: u,
146
146
  ref: p,
147
147
  value: m,
148
- ...g
148
+ ...h
149
149
  }
150
150
  ),
151
151
  o ? /* @__PURE__ */ l(
@@ -154,7 +154,7 @@ const Pt = ({
154
154
  className: c(
155
155
  "items-center text-text-muted-light dark:text-text-muted-dark flex font-regular leading-loose pointer-events-none absolute top-2 select-none",
156
156
  f ? "ltr:left-1 rtl:right-1" : "ltr:left-2 rtl:right-2",
157
- B || N ? "text-13 -translate-y-1.5" : "text-16"
157
+ B || S ? "text-13 -translate-y-1.5" : "text-16"
158
158
  ),
159
159
  htmlFor: s,
160
160
  children: o
@@ -227,17 +227,17 @@ const Dt = ({
227
227
  onSelect: u,
228
228
  value: f,
229
229
  ...m
230
- }, g) => {
231
- const w = P(null), [b, p] = j(f), [N, k] = j(!1), B = (h) => {
232
- N || k(!0), !h.length && b && p(null), i(h);
233
- }, E = (h) => {
234
- u(h), i(h.label), p(h.label), k(!1);
230
+ }, h) => {
231
+ const w = P(null), [g, p] = W(f), [S, k] = W(!1), B = (b) => {
232
+ S || k(!0), !b.length && g && p(null), i(b);
233
+ }, E = (b) => {
234
+ u(b), i(b.label), p(b.label), k(!1);
235
235
  }, L = Y(
236
- (h) => {
237
- w.current && !w.current.contains(h.target) && (!b && f && i(""), b && f && i(b), k(!1));
236
+ (b) => {
237
+ w.current && !w.current.contains(b.target) && (!g && f && i(""), g && f && i(g), k(!1));
238
238
  },
239
- [i, b, f]
240
- ), v = V(() => r.filter((h) => h.label.toLowerCase().includes(f.toLowerCase())) ?? [], [r, f]);
239
+ [i, g, f]
240
+ ), v = V(() => r.filter((b) => b.label.toLowerCase().includes(f.toLowerCase())) ?? [], [r, f]);
241
241
  return A(() => (document.addEventListener("click", L, !0), () => {
242
242
  document.removeEventListener("click", L, !0);
243
243
  }), [L]), /* @__PURE__ */ x(I, { className: "relative", ref: w, children: [
@@ -250,20 +250,20 @@ const Dt = ({
250
250
  hint: o,
251
251
  label: e,
252
252
  name: t ?? e,
253
- onChange: (h) => {
254
- B(h.target.value);
253
+ onChange: (b) => {
254
+ B(b.target.value);
255
255
  },
256
256
  onFocus: () => k(!0),
257
- ref: g,
257
+ ref: h,
258
258
  value: f ?? "",
259
259
  ...m
260
260
  }
261
261
  ),
262
- N ? /* @__PURE__ */ l(I, { className: "absolute top-[calc(100%+1px)] w-full z-50", children: /* @__PURE__ */ l(Ze, { className: "max-h-[300px] overflow-y-auto", children: v.length ? v.map((h, d) => /* @__PURE__ */ l(fe, { onClick: () => E(h), children: h.label }, `${h.value}-${d}`)) : /* @__PURE__ */ l(fe, { children: s }) }) }) : null
262
+ S ? /* @__PURE__ */ l(I, { className: "absolute top-[calc(100%+1px)] w-full z-50", children: /* @__PURE__ */ l(Ze, { className: "max-h-[300px] overflow-y-auto", children: v.length ? v.map((b, d) => /* @__PURE__ */ l(fe, { onClick: () => E(b), children: b.label }, `${b.value}-${d}`)) : /* @__PURE__ */ l(fe, { children: s }) }) }) : null
263
263
  ] });
264
264
  }, Mt = y(Dt);
265
265
  Mt.displayName = "AutocompleteSelect";
266
- const Ne = {
266
+ const Se = {
267
267
  base: "font-bold",
268
268
  xs: "text-16 md:text-19 leading-default",
269
269
  sm: "text-19 md:text-23 leading-default md:leading-comfy",
@@ -283,7 +283,7 @@ const Ne = {
283
283
  ...J,
284
284
  base: "font-regular leading-loose",
285
285
  xl: "text-23 md:text-28"
286
- }, Se = {
286
+ }, Ne = {
287
287
  base: "font-medium leading-default tracking-wider uppercase text-text-muted-light dark:text-text-muted-dark",
288
288
  xs: "text-11",
289
289
  sm: "text-13",
@@ -313,13 +313,13 @@ const Ne = {
313
313
  }, Ge = ({ size: e, variant: t }) => {
314
314
  switch (t) {
315
315
  case "headline":
316
- return c(Ne.base, Ne[e]);
316
+ return c(Se.base, Se[e]);
317
317
  case "label":
318
318
  return c(J.base, e ? J[e] : J.default);
319
319
  case "paragraph":
320
320
  return c(ue.base, e ? ue[e] : ue.default);
321
321
  case "eyebrow":
322
- return c(Se.base, Se[e]);
322
+ return c(Ne.base, Ne[e]);
323
323
  case "caption":
324
324
  return c(Oe.base, Oe[e]);
325
325
  case "buttonLabel":
@@ -346,8 +346,8 @@ const Ne = {
346
346
  children: r
347
347
  }
348
348
  );
349
- }, F = y(Rt);
350
- F.displayName = "Text";
349
+ }, j = y(Rt);
350
+ j.displayName = "Text";
351
351
  const jt = ({
352
352
  children: e,
353
353
  component: t = "a",
@@ -356,7 +356,7 @@ const jt = ({
356
356
  active: a,
357
357
  ...o
358
358
  }) => /* @__PURE__ */ l(
359
- F,
359
+ j,
360
360
  {
361
361
  className: c([
362
362
  "font-bold text-gray-50 leading-default whitespace-nowrap",
@@ -370,14 +370,14 @@ const jt = ({
370
370
  }
371
371
  );
372
372
  jt.displayName = "Breadcrumb";
373
- var Ft = Object.defineProperty, Wt = Object.defineProperties, zt = Object.getOwnPropertyDescriptors, te = Object.getOwnPropertySymbols, Xe = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, Ce = (e, t, r) => t in e ? Ft(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, _t = (e, t) => {
373
+ var Wt = Object.defineProperty, zt = Object.defineProperties, Ft = Object.getOwnPropertyDescriptors, te = Object.getOwnPropertySymbols, Xe = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable, Ce = (e, t, r) => t in e ? Wt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, _t = (e, t) => {
374
374
  for (var r in t || (t = {}))
375
375
  Xe.call(t, r) && Ce(e, r, t[r]);
376
376
  if (te)
377
377
  for (var r of te(t))
378
378
  Je.call(t, r) && Ce(e, r, t[r]);
379
379
  return e;
380
- }, Vt = (e, t) => Wt(e, zt(t)), Ht = (e, t) => {
380
+ }, Vt = (e, t) => zt(e, Ft(t)), Ht = (e, t) => {
381
381
  var r = {};
382
382
  for (var n in e)
383
383
  Xe.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
@@ -418,7 +418,7 @@ const qt = ({ children: e, className: t, ...r }, n) => {
418
418
  ] }, `${i}-${s.toString()}`)) });
419
419
  }, Zt = y(qt);
420
420
  Zt.displayName = "Breadcrumbs";
421
- const Cn = {
421
+ const Bn = {
422
422
  lg: "lg",
423
423
  md: "md",
424
424
  sm: "sm",
@@ -481,7 +481,7 @@ const Cn = {
481
481
  variant: u = "primary",
482
482
  ...f
483
483
  }, m) => {
484
- const g = Ye(n !== void 0 ? o : void 0), w = c(et, le[u], g[s], e);
484
+ const h = Ye(n !== void 0 ? o : void 0), w = c(et, le[u], h[s], e);
485
485
  return /* @__PURE__ */ x("button", { className: w, disabled: r, ref: m, type: i, ...f, children: [
486
486
  o === "start" && n !== void 0 ? R(n, {
487
487
  className: "mr-0.5",
@@ -527,7 +527,7 @@ const Qt = ({ error: e, className: t, label: r, disabled: n, name: a, ...o }, s)
527
527
  );
528
528
  }, Xt = y(Qt);
529
529
  Xt.displayName = "Checkbox";
530
- const Pn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className: c("w-full border-gray-15 dark:border-gray-30 border-standard", e) }), Jt = ({ children: e, autoFocus: t = !0 }) => {
530
+ const Tn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className: c("w-full border-gray-15 dark:border-gray-30 border-standard", e) }), Jt = ({ children: e, autoFocus: t = !0 }) => {
531
531
  const r = P(null);
532
532
  return A(() => {
533
533
  if (r.current) {
@@ -541,18 +541,18 @@ const Pn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className
541
541
  if (document.activeElement === o)
542
542
  m.preventDefault(), s.focus(), a = s;
543
543
  else
544
- for (let g = 0; g < n.length; g++)
545
- if (n[g] === document.activeElement) {
546
- a = n[g - 1];
544
+ for (let h = 0; h < n.length; h++)
545
+ if (n[h] === document.activeElement) {
546
+ a = n[h - 1];
547
547
  break;
548
548
  }
549
549
  } else if (!m.shiftKey) {
550
550
  if (document.activeElement === s)
551
551
  m.preventDefault(), o.focus(), a = o;
552
552
  else
553
- for (let g = 0; g < n.length; g++)
554
- if (n[g] === document.activeElement) {
555
- a = n[g + 1];
553
+ for (let h = 0; h < n.length; h++)
554
+ if (n[h] === document.activeElement) {
555
+ a = n[h + 1];
556
556
  break;
557
557
  }
558
558
  }
@@ -574,7 +574,7 @@ const Pn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className
574
574
  };
575
575
  }
576
576
  }, [t]), /* @__PURE__ */ l("div", { ref: r, children: e });
577
- }, Bn = ({ className: e, progress: t }) => /* @__PURE__ */ l("div", { className: c(["w-full bg-gray-15 h-2 rounded-3 overflow-hidden", e]), children: /* @__PURE__ */ l(
577
+ }, Dn = ({ className: e, progress: t }) => /* @__PURE__ */ l("div", { className: c(["w-full bg-gray-15 h-2 rounded-3 overflow-hidden", e]), children: /* @__PURE__ */ l(
578
578
  "div",
579
579
  {
580
580
  className: "bg-blue-30 h-2 ease-in-out duration-300",
@@ -632,14 +632,14 @@ var nr = Object.defineProperty, ar = Object.defineProperties, or = Object.getOwn
632
632
  }, dr = (e, t) => {
633
633
  var r = e, { title: n, titleId: a } = r, o = ir(r, ["title", "titleId"]);
634
634
  return x("svg", lr(sr({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? l("title", { id: a, children: n }) : null, l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.768 11.646a.5.5 0 0 0 0 .708l3.182 3.182a1 1 0 0 1-1.414 1.414l-3.182-3.182a.5.5 0 0 0-.708 0L8.464 16.95a1 1 0 1 1-1.414-1.414l3.182-3.182a.5.5 0 0 0 0-.708L7.05 8.464A1 1 0 0 1 8.464 7.05l3.182 3.182a.5.5 0 0 0 .707 0l3.183-3.182a1 1 0 1 1 1.414 1.414l-3.182 3.182Z", fill: "currentColor" })] }));
635
- }, cr = y(dr), ur = cr, fr = Object.defineProperty, pr = Object.defineProperties, mr = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, nt = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable, Be = (e, t, r) => t in e ? fr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, br = (e, t) => {
635
+ }, cr = y(dr), ur = cr, fr = Object.defineProperty, pr = Object.defineProperties, mr = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, nt = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable, Be = (e, t, r) => t in e ? fr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, gr = (e, t) => {
636
636
  for (var r in t || (t = {}))
637
637
  nt.call(t, r) && Be(e, r, t[r]);
638
638
  if (ae)
639
639
  for (var r of ae(t))
640
640
  at.call(t, r) && Be(e, r, t[r]);
641
641
  return e;
642
- }, hr = (e, t) => pr(e, mr(t)), gr = (e, t) => {
642
+ }, br = (e, t) => pr(e, mr(t)), hr = (e, t) => {
643
643
  var r = {};
644
644
  for (var n in e)
645
645
  nt.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
@@ -648,16 +648,16 @@ var nr = Object.defineProperty, ar = Object.defineProperties, or = Object.getOwn
648
648
  t.indexOf(n) < 0 && at.call(e, n) && (r[n] = e[n]);
649
649
  return r;
650
650
  }, xr = (e, t) => {
651
- var r = e, { title: n, titleId: a } = r, o = gr(r, ["title", "titleId"]);
652
- return x("svg", hr(br({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? l("title", { id: a, children: n }) : null, l("path", { d: "M9.346 14.272c.15.228.499.228 1.194.228h5.628c.81 0 1.215 0 1.36-.262.145-.261-.07-.605-.5-1.292l-.667-1.068c-.386-.618-.58-.928-.861-.928s-.475.31-.861.928l-.453.724-1.252-2.924c-.4-.931-.6-1.397-.934-1.397-.335 0-.534.466-.934 1.397l-1.46 3.406c-.273.64-.41.96-.26 1.188ZM18 7a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z", fill: "currentColor" }), l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.879 3.379C6 4.257 6 5.672 6 8.5v3c0 2.828 0 4.243.879 5.121.878.879 2.293.879 5.121.879h3c2.828 0 4.243 0 5.121-.879C21 15.743 21 14.328 21 11.5v-3c0-2.828 0-4.243-.879-5.121C19.243 2.5 17.828 2.5 15 2.5h-3c-2.828 0-4.243 0-5.121.879ZM18.02 4.623c-.65-.087-1.55-.092-3.021-.092h-3c-1.472 0-2.371.005-3.021.092-.301.04-.466.09-.554.126a.292.292 0 0 0-.11.066.292.292 0 0 0-.066.11 2.313 2.313 0 0 0-.126.554c-.087.65-.092 1.55-.092 3.021v3c0 1.472.005 2.371.092 3.021.04.301.09.466.126.554.03.072.05.095.066.11a.292.292 0 0 0 .11.066c.088.036.253.085.554.126.65.087 1.55.092 3.021.092h3c1.472 0 2.371-.005 3.021-.092.301-.04.466-.09.554-.126a.292.292 0 0 0 .11-.066.292.292 0 0 0 .066-.11c.036-.088.085-.253.126-.554.087-.65.092-1.55.092-3.021v-3c0-1.472-.005-2.371-.092-3.021a2.313 2.313 0 0 0-.126-.554.292.292 0 0 0-.066-.11.292.292 0 0 0-.11-.066 2.313 2.313 0 0 0-.554-.126Z", fill: "currentColor" }), l("path", { d: "M2 8.5c0-1 1-2 2-2v9a4 4 0 0 0 4 4h9c0 1-.887 2-2 2H8a6 6 0 0 1-6-6v-7Z", fill: "currentColor" })] }));
653
- }, yr = y(xr), vr = yr, wr = Object.defineProperty, kr = Object.defineProperties, $r = Object.getOwnPropertyDescriptors, oe = Object.getOwnPropertySymbols, ot = Object.prototype.hasOwnProperty, st = Object.prototype.propertyIsEnumerable, Te = (e, t, r) => t in e ? wr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Nr = (e, t) => {
651
+ var r = e, { title: n, titleId: a } = r, o = hr(r, ["title", "titleId"]);
652
+ return x("svg", br(gr({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? l("title", { id: a, children: n }) : null, l("path", { d: "M9.346 14.272c.15.228.499.228 1.194.228h5.628c.81 0 1.215 0 1.36-.262.145-.261-.07-.605-.5-1.292l-.667-1.068c-.386-.618-.58-.928-.861-.928s-.475.31-.861.928l-.453.724-1.252-2.924c-.4-.931-.6-1.397-.934-1.397-.335 0-.534.466-.934 1.397l-1.46 3.406c-.273.64-.41.96-.26 1.188ZM18 7a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z", fill: "currentColor" }), l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.879 3.379C6 4.257 6 5.672 6 8.5v3c0 2.828 0 4.243.879 5.121.878.879 2.293.879 5.121.879h3c2.828 0 4.243 0 5.121-.879C21 15.743 21 14.328 21 11.5v-3c0-2.828 0-4.243-.879-5.121C19.243 2.5 17.828 2.5 15 2.5h-3c-2.828 0-4.243 0-5.121.879ZM18.02 4.623c-.65-.087-1.55-.092-3.021-.092h-3c-1.472 0-2.371.005-3.021.092-.301.04-.466.09-.554.126a.292.292 0 0 0-.11.066.292.292 0 0 0-.066.11 2.313 2.313 0 0 0-.126.554c-.087.65-.092 1.55-.092 3.021v3c0 1.472.005 2.371.092 3.021.04.301.09.466.126.554.03.072.05.095.066.11a.292.292 0 0 0 .11.066c.088.036.253.085.554.126.65.087 1.55.092 3.021.092h3c1.472 0 2.371-.005 3.021-.092.301-.04.466-.09.554-.126a.292.292 0 0 0 .11-.066.292.292 0 0 0 .066-.11c.036-.088.085-.253.126-.554.087-.65.092-1.55.092-3.021v-3c0-1.472-.005-2.371-.092-3.021a2.313 2.313 0 0 0-.126-.554.292.292 0 0 0-.066-.11.292.292 0 0 0-.11-.066 2.313 2.313 0 0 0-.554-.126Z", fill: "currentColor" }), l("path", { d: "M2 8.5c0-1 1-2 2-2v9a4 4 0 0 0 4 4h9c0 1-.887 2-2 2H8a6 6 0 0 1-6-6v-7Z", fill: "currentColor" })] }));
653
+ }, yr = y(xr), vr = yr, wr = Object.defineProperty, kr = Object.defineProperties, $r = Object.getOwnPropertyDescriptors, oe = Object.getOwnPropertySymbols, ot = Object.prototype.hasOwnProperty, st = Object.prototype.propertyIsEnumerable, Te = (e, t, r) => t in e ? wr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Sr = (e, t) => {
654
654
  for (var r in t || (t = {}))
655
655
  ot.call(t, r) && Te(e, r, t[r]);
656
656
  if (oe)
657
657
  for (var r of oe(t))
658
658
  st.call(t, r) && Te(e, r, t[r]);
659
659
  return e;
660
- }, Sr = (e, t) => kr(e, $r(t)), Or = (e, t) => {
660
+ }, Nr = (e, t) => kr(e, $r(t)), Or = (e, t) => {
661
661
  var r = {};
662
662
  for (var n in e)
663
663
  ot.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
@@ -667,7 +667,7 @@ var nr = Object.defineProperty, ar = Object.defineProperties, or = Object.getOwn
667
667
  return r;
668
668
  }, Er = (e, t) => {
669
669
  var r = e, { title: n, titleId: a } = r, o = Or(r, ["title", "titleId"]);
670
- return x("svg", Sr(Nr({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? l("title", { id: a, children: n }) : null, l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 4a1 1 0 0 1 1-1 9 9 0 0 1 9 9 1 1 0 1 1-2 0 7.001 7.001 0 0 0-7-7 1 1 0 0 1-1-1Z", fill: "currentColor", children: l("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", from: "0 12 12", to: "360 12 12", dur: o.dur, repeatCount: "indefinite" }) })] }));
670
+ return x("svg", Nr(Sr({ width: o.size || "24", height: o.size || "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: t, "aria-labelledby": a }, o), { children: [n ? l("title", { id: a, children: n }) : null, l("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 4a1 1 0 0 1 1-1 9 9 0 0 1 9 9 1 1 0 1 1-2 0 7.001 7.001 0 0 0-7-7 1 1 0 0 1-1-1Z", fill: "currentColor", children: l("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", from: "0 12 12", to: "360 12 12", dur: o.dur, repeatCount: "indefinite" }) })] }));
671
671
  }, Lr = y(Er), Ir = Lr;
672
672
  const Cr = {
673
673
  1: "h1",
@@ -697,23 +697,23 @@ const Tr = ({
697
697
  dismissCallback: o,
698
698
  dismissImageAriaLabel: s = "Remove Image",
699
699
  error: i = "",
700
- fileMaxKbSizeError: u = (S, ie) => `${S} is too big to upload, the maximum size is ${ie}kb. Please try again.`,
701
- fileMaxSizeError: f = (S) => `${S} is too large to upload. The maximum dimensions are ${d == null ? void 0 : d.maxWidth}x${d == null ? void 0 : d.maxHeight}. Please try again.`,
702
- fileMinSizeError: m = (S) => `${S} is too small to upload. The minimum dimensions are ${d == null ? void 0 : d.minWidth}x${d == null ? void 0 : d.minHeight}. Please try again.`,
703
- fileRatioError: g = (S) => `${S} must have a ratio of, ${d == null ? void 0 : d.imageRatio}. Please try again.`,
700
+ fileMaxKbSizeError: u = (N, ie) => `${N} is too big to upload, the maximum size is ${ie}kb. Please try again.`,
701
+ fileMaxSizeError: f = (N) => `${N} is too large to upload. The maximum dimensions are ${d == null ? void 0 : d.maxWidth}x${d == null ? void 0 : d.maxHeight}. Please try again.`,
702
+ fileMinSizeError: m = (N) => `${N} is too small to upload. The minimum dimensions are ${d == null ? void 0 : d.minWidth}x${d == null ? void 0 : d.minHeight}. Please try again.`,
703
+ fileRatioError: h = (N) => `${N} must have a ratio of, ${d == null ? void 0 : d.imageRatio}. Please try again.`,
704
704
  fileCallback: w,
705
- hero: b = !1,
705
+ hero: g = !1,
706
706
  hint: p,
707
- imageWidth: N = 160,
707
+ imageWidth: S = 160,
708
708
  imageSrc: k,
709
709
  label: B = "Upload Image",
710
710
  name: E = "imageUpload",
711
711
  onBlur: L,
712
712
  preProcessing: v,
713
- shape: h = "circle",
713
+ shape: b = "circle",
714
714
  validation: d
715
715
  }, Q) => {
716
- const S = P(null), ie = ge({ forwardedRef: Q, innerRef: S }), [$, U] = j(void 0), [T, D] = j(k ? "resolved" : "idle"), [de, q] = j(i), it = () => S != null && S.current ? S.current.click() : void 0, ve = V(() => $ && T !== "rejected" ? (D("resolved"), $.imageSrc) : k && T === "resolved" ? (D("resolved"), k) : null, [$, k, T]), dt = V(() => {
716
+ const N = P(null), ie = he({ forwardedRef: Q, innerRef: N }), [$, U] = W(void 0), [T, D] = W(k ? "resolved" : "idle"), [de, q] = W(i), it = () => N != null && N.current ? N.current.click() : void 0, ve = V(() => $ && T !== "rejected" ? (D("resolved"), $.imageSrc) : k && T === "resolved" ? (D("resolved"), k) : null, [$, k, T]), dt = V(() => {
717
717
  const C = () => {
718
718
  o && o(k), U(void 0), D("idle");
719
719
  };
@@ -728,14 +728,14 @@ const Tr = ({
728
728
  alt: `${$ == null ? void 0 : $.id} preview`,
729
729
  className: c([
730
730
  "object-fit w-full h-full",
731
- h === "circle" ? "rounded-full" : "rounded-0.5",
732
- h !== "unset" || !b ? "aspect-square" : "",
733
- h === "unset" && b ? "aspect-video" : "",
734
- h === "unset" && !b ? "!aspect-auto" : ""
731
+ b === "circle" ? "rounded-full" : "rounded-0.5",
732
+ b !== "unset" || !g ? "aspect-square" : "",
733
+ b === "unset" && g ? "aspect-video" : "",
734
+ b === "unset" && !g ? "!aspect-auto" : ""
735
735
  ]),
736
736
  onLoad: () => $ != null && $.imageSrc ? URL.revokeObjectURL($.imageSrc) : void 0,
737
737
  src: ve || void 0,
738
- width: N
738
+ width: S
739
739
  }
740
740
  ),
741
741
  a ? null : /* @__PURE__ */ l(
@@ -756,53 +756,53 @@ const Tr = ({
756
756
  a,
757
757
  o,
758
758
  s,
759
- b,
759
+ g,
760
760
  $ == null ? void 0 : $.id,
761
761
  $ == null ? void 0 : $.imageSrc,
762
762
  k,
763
763
  T,
764
- N,
764
+ S,
765
765
  ve,
766
- h
767
- ]), ct = ({ file: C, imageUrl: W }) => new Promise((z, _) => {
766
+ b
767
+ ]), ct = ({ file: C, imageUrl: z }) => new Promise((F, _) => {
768
768
  var we;
769
769
  const O = new Image(), Z = (we = d == null ? void 0 : d.imageRatio) == null ? void 0 : we.split("/");
770
770
  O.onload = async () => {
771
771
  if (d)
772
772
  if (d != null && d.maxByteSize && C.size > d.maxByteSize) {
773
773
  U(void 0), D("rejected");
774
- const ht = u(C.name, Math.round(d.maxByteSize / 1e3));
775
- return q(ht), _(!1);
774
+ const bt = u(C.name, Math.round(d.maxByteSize / 1e3));
775
+ return q(bt), _(!1);
776
776
  } else {
777
777
  if (d != null && d.minWidth && O.width < (d == null ? void 0 : d.minWidth) || d != null && d.minHeight && O.height < (d == null ? void 0 : d.minHeight))
778
778
  return U(void 0), D("rejected"), q(m(C.name)), _(!1);
779
779
  if (d != null && d.maxHeight && O.height > (d == null ? void 0 : d.maxHeight) || d != null && d.maxWidth && O.width > (d == null ? void 0 : d.maxWidth))
780
780
  return U(void 0), D("rejected"), q(f(C.name)), _(!1);
781
781
  if (d != null && d.imageRatio && (Z == null ? void 0 : Z.length) === 2 && parseInt(Z[0]) / parseInt(Z[1]) !== O.width / O.height)
782
- return U(void 0), D("rejected"), q(g(C.name)), _(!1);
782
+ return U(void 0), D("rejected"), q(h(C.name)), _(!1);
783
783
  }
784
- return N = O.width, typeof w == "function" && (console.log("Callback"), await w(C, O)), q(""), z(!0);
785
- }, O.src = W;
784
+ return S = O.width, typeof w == "function" && (console.log("Callback"), await w(C, O)), q(""), F(!0);
785
+ }, O.src = z;
786
786
  }), ut = async (C) => {
787
787
  try {
788
- const { files: W } = C.target;
789
- if (W) {
790
- const z = W[0], _ = URL.createObjectURL(z);
788
+ const { files: z } = C.target;
789
+ if (z) {
790
+ const F = z[0], _ = URL.createObjectURL(F);
791
791
  let O = !0;
792
- D("pending"), v && await v(z), O = await ct({
793
- file: z,
792
+ D("pending"), v && await v(F), O = await ct({
793
+ file: F,
794
794
  imageUrl: _
795
- }), O && (U({ file: z, id: z.name, imageSrc: _ }), D("resolved"));
795
+ }), O && (U({ file: F, id: F.name, imageSrc: _ }), D("resolved"));
796
796
  }
797
- } catch (W) {
798
- if (W instanceof Error)
799
- throw W;
797
+ } catch (z) {
798
+ if (z instanceof Error)
799
+ throw z;
800
800
  }
801
- }, ft = c([h === "circle" && !b ? "rounded-full aspect-square" : ""]), pt = c([h === "square" && !b ? "aspect-square rounded-1" : ""]), mt = c([
802
- h === "unset" && !b ? "rounded-1" : "",
803
- h === "unset" && T !== "idle" && !b ? "aspect-auto" : "",
804
- h === "unset" && T !== "resolved" && !b ? "aspect-square" : ""
805
- ]), bt = c([b ? "rounded-1 aspect-video" : ""]);
801
+ }, ft = c([b === "circle" && !g ? "rounded-full aspect-square" : ""]), pt = c([b === "square" && !g ? "aspect-square rounded-1" : ""]), mt = c([
802
+ b === "unset" && !g ? "rounded-1" : "",
803
+ b === "unset" && T !== "idle" && !g ? "aspect-auto" : "",
804
+ b === "unset" && T !== "resolved" && !g ? "aspect-square" : ""
805
+ ]), gt = c([g ? "rounded-1 aspect-video" : ""]);
806
806
  return /* @__PURE__ */ x(I, { className: c([n]), children: [
807
807
  /* @__PURE__ */ x(
808
808
  I,
@@ -814,20 +814,20 @@ const Tr = ({
814
814
  a ? "select-none bg-gray-10 dark:bg-gray-40 pointer-events-none" : ""
815
815
  ]),
816
816
  children: [
817
- /* @__PURE__ */ l(F, { className: "pb-1.5 text-text-muted-light dark:text-text-muted-dark", children: /* @__PURE__ */ l("label", { htmlFor: E, children: B }) }),
817
+ /* @__PURE__ */ l(j, { className: "pb-1.5 text-text-muted-light dark:text-text-muted-dark", children: /* @__PURE__ */ l("label", { htmlFor: E, children: B }) }),
818
818
  /* @__PURE__ */ x(I, { className: "flex relative flex-wrap justify-center md:justify-start", children: [
819
819
  /* @__PURE__ */ l(
820
820
  I,
821
821
  {
822
822
  className: c([
823
823
  "flex justify-center items-center relative mbe-2 md:mbe-0 md:mie-2",
824
- b ? "w-full" : "md:w-1/2 w-4/5",
824
+ g ? "w-full" : "md:w-1/2 w-4/5",
825
825
  a ? "border-small border-solid border-tertiary-light" : "",
826
826
  T !== "resolved" ? "bg-gray-10 dark:bg-gray-3" : "",
827
827
  ft,
828
828
  pt,
829
829
  mt,
830
- bt
830
+ gt
831
831
  ]),
832
832
  children: dt
833
833
  }
@@ -837,7 +837,7 @@ const Tr = ({
837
837
  {
838
838
  className: c([
839
839
  "my-auto !ring-gray-15 dark:!ring-gray-30 !ring-1 disabled:!bg-gray-15 disabled:!ring-none",
840
- b ? "!mbs-2" : ""
840
+ g ? "!mbs-2" : ""
841
841
  ]),
842
842
  disabled: a,
843
843
  onClick: it,
@@ -866,8 +866,8 @@ const Tr = ({
866
866
  ]
867
867
  }
868
868
  ),
869
- de ? /* @__PURE__ */ l(F, { className: "dark:!text-alert-dark !text-alert-light text-13", children: de }) : null,
870
- p ? /* @__PURE__ */ l(F, { className: "text-text-muted-light dark:text-text-muted-dark text-13", children: p }) : null
869
+ de ? /* @__PURE__ */ l(j, { className: "dark:!text-alert-dark !text-alert-light text-13", children: de }) : null,
870
+ p ? /* @__PURE__ */ l(j, { className: "text-text-muted-light dark:text-text-muted-dark text-13", children: p }) : null
871
871
  ] });
872
872
  }, Dr = y(Tr);
873
873
  Dr.displayName = "ImageUpload";
@@ -882,7 +882,7 @@ const Mr = ({
882
882
  ...i
883
883
  }, u) => {
884
884
  const f = Ye(n !== void 0 ? a : void 0);
885
- return /* @__PURE__ */ x(({ children: g }) => R(
885
+ return /* @__PURE__ */ x(({ children: h }) => R(
886
886
  r,
887
887
  {
888
888
  ...i,
@@ -895,7 +895,7 @@ const Mr = ({
895
895
  ]),
896
896
  ref: u
897
897
  },
898
- g
898
+ h
899
899
  ), { children: [
900
900
  a === "start" && n !== void 0 ? R(n, {
901
901
  className: "mr-0.5 min-w-min",
@@ -909,14 +909,14 @@ const Mr = ({
909
909
  ] });
910
910
  }, Rr = y(Mr);
911
911
  Rr.displayName = "LinkButton";
912
- function Tn({ children: e, className: t, position: r }) {
912
+ function Mn({ children: e, className: t, position: r }) {
913
913
  let n = "";
914
914
  return r && (r === "start" ? n = "order-first" : n = "order-last"), /* @__PURE__ */ l("div", { className: c("flex gap-1", n, t), children: e });
915
915
  }
916
- function Dn({ children: e, className: t }) {
916
+ function Rn({ children: e, className: t }) {
917
917
  return /* @__PURE__ */ l("div", { className: c("flex-grow", t), children: e });
918
918
  }
919
- const Mn = ({
919
+ const jn = ({
920
920
  children: e,
921
921
  className: t,
922
922
  endText: r,
@@ -926,14 +926,14 @@ const Mn = ({
926
926
  subHeadlineProps: s
927
927
  }) => /* @__PURE__ */ x("div", { className: c(["flex items-center justify-between break-words", t]), children: [
928
928
  /* @__PURE__ */ x("div", { className: "flex flex-col", children: [
929
- /* @__PURE__ */ l(F, { size: a, variant: "label", children: e }),
929
+ /* @__PURE__ */ l(j, { size: a, variant: "label", children: e }),
930
930
  o ? (
931
931
  // eslint-disable-next-line react/jsx-props-no-spreading
932
- /* @__PURE__ */ l(F, { ...s, children: o })
932
+ /* @__PURE__ */ l(j, { ...s, children: o })
933
933
  ) : null
934
934
  ] }),
935
- r ? /* @__PURE__ */ l(F, { ...n, children: r }) : null
936
- ] }), Rn = ({ children: e, className: t, ...r }) => /* @__PURE__ */ l("div", { className: c(["relative", t]), ...r, children: e }), jr = typeof window < "u" ? He.useLayoutEffect : () => {
935
+ r ? /* @__PURE__ */ l(j, { ...n, children: r }) : null
936
+ ] }), Wn = ({ children: e, className: t, ...r }) => /* @__PURE__ */ l("div", { className: c(["relative", t]), ...r, children: e }), jr = typeof window < "u" ? He.useLayoutEffect : () => {
937
937
  };
938
938
  let G = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ new Set();
939
939
  function Me() {
@@ -953,19 +953,19 @@ function Me() {
953
953
  document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", t);
954
954
  }
955
955
  typeof document < "u" && (document.readyState !== "loading" ? Me() : document.addEventListener("DOMContentLoaded", Me));
956
- function Fr(e) {
956
+ function Wr(e) {
957
957
  var t;
958
958
  return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((r) => e.test(r.brand))) || e.test(window.navigator.userAgent);
959
959
  }
960
- function Wr(e) {
960
+ function zr(e) {
961
961
  var t;
962
962
  return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
963
963
  }
964
- function zr() {
965
- return Wr(/^Mac/i);
964
+ function Fr() {
965
+ return zr(/^Mac/i);
966
966
  }
967
967
  function _r() {
968
- return Fr(/Android/i);
968
+ return Wr(/Android/i);
969
969
  }
970
970
  function Vr(e) {
971
971
  return e.mozInputSource === 0 && e.isTrusted ? !0 : _r() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
@@ -1032,13 +1032,13 @@ function Ur(e) {
1032
1032
  }
1033
1033
  }, []);
1034
1034
  }
1035
- let Kr = /* @__PURE__ */ new Set(), Re = !1, H = !1, be = !1;
1035
+ let Kr = /* @__PURE__ */ new Set(), Re = !1, H = !1, ge = !1;
1036
1036
  function xe(e, t) {
1037
1037
  for (let r of Kr)
1038
1038
  r(e, t);
1039
1039
  }
1040
1040
  function qr(e) {
1041
- return !(e.metaKey || !zr() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
1041
+ return !(e.metaKey || !Fr() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
1042
1042
  }
1043
1043
  function je(e) {
1044
1044
  H = !0, qr(e) && xe("keyboard", e);
@@ -1050,12 +1050,12 @@ function Zr(e) {
1050
1050
  Vr(e) && (H = !0);
1051
1051
  }
1052
1052
  function Gr(e) {
1053
- e.target === window || e.target === document || (!H && !be && xe("virtual", e), H = !1, be = !1);
1053
+ e.target === window || e.target === document || (!H && !ge && xe("virtual", e), H = !1, ge = !1);
1054
1054
  }
1055
1055
  function Qr() {
1056
- H = !1, be = !0;
1056
+ H = !1, ge = !0;
1057
1057
  }
1058
- function Fe() {
1058
+ function We() {
1059
1059
  if (typeof window > "u" || Re)
1060
1060
  return;
1061
1061
  let e = HTMLElement.prototype.focus;
@@ -1063,7 +1063,7 @@ function Fe() {
1063
1063
  H = !0, e.apply(this, arguments);
1064
1064
  }, document.addEventListener("keydown", je, !0), document.addEventListener("keyup", je, !0), document.addEventListener("click", Zr, !0), window.addEventListener("focus", Gr, !0), window.addEventListener("blur", Qr, !1), typeof PointerEvent < "u" ? (document.addEventListener("pointerdown", K, !0), document.addEventListener("pointermove", K, !0), document.addEventListener("pointerup", K, !0)) : (document.addEventListener("mousedown", K, !0), document.addEventListener("mousemove", K, !0), document.addEventListener("mouseup", K, !0)), Re = !0;
1065
1065
  }
1066
- typeof document < "u" && (document.readyState !== "loading" ? Fe() : document.addEventListener("DOMContentLoaded", Fe));
1066
+ typeof document < "u" && (document.readyState !== "loading" ? We() : document.addEventListener("DOMContentLoaded", We));
1067
1067
  function Xr(e) {
1068
1068
  let { isDisabled: t, onBlurWithin: r, onFocusWithin: n, onFocusWithinChange: a } = e, o = P({
1069
1069
  isFocusWithin: !1
@@ -1145,7 +1145,7 @@ function lt(e, t) {
1145
1145
  function en(e, t = null) {
1146
1146
  if (e instanceof Element && e.closest("[data-react-aria-top-layer]"))
1147
1147
  return !0;
1148
- for (let { scopeRef: r } of ze.traverse(ze.getTreeNode(t)))
1148
+ for (let { scopeRef: r } of Fe.traverse(Fe.getTreeNode(t)))
1149
1149
  if (lt(e, r.current))
1150
1150
  return !0;
1151
1151
  return !1;
@@ -1161,7 +1161,7 @@ class ye {
1161
1161
  return this.fastMap.get(t);
1162
1162
  }
1163
1163
  addTreeNode(t, r, n) {
1164
- let a = this.fastMap.get(r ?? null), o = new We({
1164
+ let a = this.fastMap.get(r ?? null), o = new ze({
1165
1165
  scopeRef: t
1166
1166
  });
1167
1167
  a.addChild(o), o.parent = a, this.fastMap.set(t, o), n && (o.nodeToRestore = n);
@@ -1191,12 +1191,12 @@ class ye {
1191
1191
  return t;
1192
1192
  }
1193
1193
  constructor() {
1194
- me(this, "fastMap", /* @__PURE__ */ new Map()), this.root = new We({
1194
+ me(this, "fastMap", /* @__PURE__ */ new Map()), this.root = new ze({
1195
1195
  scopeRef: null
1196
1196
  }), this.fastMap.set(null, this.root);
1197
1197
  }
1198
1198
  }
1199
- class We {
1199
+ class ze {
1200
1200
  addChild(t) {
1201
1201
  this.children.add(t), t.parent = this;
1202
1202
  }
@@ -1207,7 +1207,7 @@ class We {
1207
1207
  me(this, "children", /* @__PURE__ */ new Set()), me(this, "contain", !1), this.scopeRef = t.scopeRef;
1208
1208
  }
1209
1209
  }
1210
- let ze = new ye();
1210
+ let Fe = new ye();
1211
1211
  const M = [];
1212
1212
  function rn(e, t) {
1213
1213
  let { onClose: r, shouldCloseOnBlur: n, isOpen: a, isDismissable: o = !1, isKeyboardDismissDisabled: s = !1, shouldCloseOnInteractOutside: i } = e;
@@ -1224,7 +1224,7 @@ function rn(e, t) {
1224
1224
  (!i || i(p.target)) && M[M.length - 1] === t && (p.stopPropagation(), p.preventDefault());
1225
1225
  }, m = (p) => {
1226
1226
  (!i || i(p.target)) && (M[M.length - 1] === t && (p.stopPropagation(), p.preventDefault()), u());
1227
- }, g = (p) => {
1227
+ }, h = (p) => {
1228
1228
  p.key === "Escape" && !s && (p.stopPropagation(), p.preventDefault(), u());
1229
1229
  };
1230
1230
  Jr({
@@ -1237,16 +1237,16 @@ function rn(e, t) {
1237
1237
  onBlurWithin: (p) => {
1238
1238
  p.relatedTarget && tn(p.relatedTarget) || (!i || i(p.relatedTarget)) && r();
1239
1239
  }
1240
- }), b = (p) => {
1240
+ }), g = (p) => {
1241
1241
  p.target === p.currentTarget && p.preventDefault();
1242
1242
  };
1243
1243
  return {
1244
1244
  overlayProps: {
1245
- onKeyDown: g,
1245
+ onKeyDown: h,
1246
1246
  ...w
1247
1247
  },
1248
1248
  underlayProps: {
1249
- onPointerDown: b
1249
+ onPointerDown: g
1250
1250
  }
1251
1251
  };
1252
1252
  }
@@ -1274,7 +1274,7 @@ const nn = ({ align: e, children: t, className: r, ...n }) => {
1274
1274
  children: t
1275
1275
  }
1276
1276
  );
1277
- }, an = ({ open: e, children: t }) => /* @__PURE__ */ l(se, { children: e ? t : null }), jn = ({
1277
+ }, an = ({ open: e, children: t }) => /* @__PURE__ */ l(se, { children: e ? t : null }), zn = ({
1278
1278
  align: e = { horizontal: "start", vertical: "bottom" },
1279
1279
  autoFocus: t = !0,
1280
1280
  children: r,
@@ -1347,26 +1347,26 @@ const ln = ({ children: e, disabled: t, name: r, value: n, ...a }, o) => /* @__P
1347
1347
  )
1348
1348
  ] }), dn = y(ln);
1349
1349
  dn.displayName = "RadioSetItem";
1350
- const Wn = ({ ...e }) => /* @__PURE__ */ l("option", { ...e }), cn = "_select_1dwiy_1";
1351
- const un = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark:disabled:bg-gray-40 rounded-1 border-solid border-small font-aktiv-grotesk text-16 leading-loose p-2 w-full mlb-0", fn = "border-alert-light dark:border-alert-dark", pn = "border-tertiary-light dark:border-tertiary-dark", he = "text-text-muted-light dark:text-text-muted-dark", _e = c(
1352
- he,
1350
+ const _n = ({ ...e }) => /* @__PURE__ */ l("option", { ...e }), cn = "_select_1dwiy_1";
1351
+ const un = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark:disabled:bg-gray-40 rounded-1 border-solid border-small font-aktiv-grotesk text-16 leading-loose p-2 w-full mlb-0", fn = "border-alert-light dark:border-alert-dark", pn = "border-tertiary-light dark:border-tertiary-dark", be = "text-text-muted-light dark:text-text-muted-dark", _e = c(
1352
+ be,
1353
1353
  "font-aktiv-grotesk font-medium text-13 absolute inline-start-2 block-start-2 pointer-events-none opacity-0 h-1.5"
1354
- ), mn = "-translate-y-1 opacity-100", bn = "text-overlay-text dark:text-text-dark", hn = "!pbs-3 !pbe-1", gn = "absolute block-end-2 inline-end-1.5 leading-0 pointer-events-none text-text-muted-light dark:text-text-muted-dark", xn = ({ children: e, className: t, disabled: r = !1, error: n, hint: a, label: o, name: s, onChange: i, value: u, ...f }, m) => {
1354
+ ), mn = "-translate-y-1 opacity-100", gn = "text-overlay-text dark:text-text-dark", bn = "!pbs-3 !pbe-1", hn = "absolute block-end-2 inline-end-1.5 leading-0 pointer-events-none text-text-muted-light dark:text-text-muted-dark", xn = ({ children: e, className: t, disabled: r = !1, error: n, hint: a, label: o, name: s, onChange: i, value: u, ...f }, m) => {
1355
1355
  var L;
1356
- const g = c(cn, un), w = P(null), b = ge({ forwardedRef: m, innerRef: w }), [p, N] = j(Boolean(u || ((L = b == null ? void 0 : b.current) == null ? void 0 : L.value)));
1356
+ const h = c(cn, un), w = P(null), g = he({ forwardedRef: m, innerRef: w }), [p, S] = W(Boolean(u || ((L = g == null ? void 0 : g.current) == null ? void 0 : L.value)));
1357
1357
  A(() => {
1358
1358
  var v;
1359
- N(Boolean(((v = b == null ? void 0 : b.current) == null ? void 0 : v.value) || u));
1360
- }, [u, b]);
1359
+ S(Boolean(((v = g == null ? void 0 : g.current) == null ? void 0 : v.value) || u));
1360
+ }, [u, g]);
1361
1361
  const k = V(() => {
1362
- const v = c(g, bn, o ? hn : null), h = c(g, he);
1363
- return p ? v : h;
1364
- }, [g, p, o]), B = V(() => {
1365
- const v = c(_e, mn), h = c(_e);
1366
- return p ? v : h;
1362
+ const v = c(h, gn, o ? bn : null), b = c(h, be);
1363
+ return p ? v : b;
1364
+ }, [h, p, o]), B = V(() => {
1365
+ const v = c(_e, mn), b = c(_e);
1366
+ return p ? v : b;
1367
1367
  }, [p]), E = (v) => {
1368
- var h;
1369
- N(Boolean(((h = b == null ? void 0 : b.current) == null ? void 0 : h.value) || u)), i && i(v);
1368
+ var b;
1369
+ S(Boolean(((b = g == null ? void 0 : g.current) == null ? void 0 : b.value) || u)), i && i(v);
1370
1370
  };
1371
1371
  return /* @__PURE__ */ x("div", { className: c(t), children: [
1372
1372
  /* @__PURE__ */ x("div", { className: c("relative w-full border-none"), children: [
@@ -1379,28 +1379,41 @@ const un = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark
1379
1379
  id: s,
1380
1380
  name: s,
1381
1381
  onChange: E,
1382
- ref: b,
1382
+ ref: g,
1383
1383
  value: u,
1384
1384
  children: e
1385
1385
  }
1386
1386
  ),
1387
1387
  /* @__PURE__ */ l("label", { className: B, htmlFor: s, children: o }),
1388
- /* @__PURE__ */ l("div", { className: gn, children: /* @__PURE__ */ l(Ke, { size: "24" }) })
1388
+ /* @__PURE__ */ l("div", { className: hn, children: /* @__PURE__ */ l(Ke, { size: "24" }) })
1389
1389
  ] }),
1390
1390
  n || a ? /* @__PURE__ */ x("div", { className: "mbs-0.5", children: [
1391
1391
  n ? /* @__PURE__ */ l("p", { className: "text-alert-light dark:text-alert-dark text-13 m-0", children: n }) : null,
1392
- a ? /* @__PURE__ */ l("p", { className: c(he, "text-13 m-0"), children: a }) : null
1392
+ a ? /* @__PURE__ */ l("p", { className: c(be, "text-13 m-0"), children: a }) : null
1393
1393
  ] }) : null
1394
1394
  ] });
1395
- }, zn = y(xn), yn = "_inputIcon_1pzdd_1", vn = {
1396
- inputIcon: yn
1397
- }, wn = ({ className: e, error: t, name: r, ...n }, a) => /* @__PURE__ */ x(se, { children: [
1395
+ }, Vn = y(xn), yn = {
1396
+ default: "bg-gray-10 dark:bg-gray-40 text-light dark:text-dark",
1397
+ secondary: "bg-gray-10 dark:bg-gray-35 text-light dark:text-dark",
1398
+ error: "bg-orange-10 dark:bg-orange-50 text-orange-40 dark:text-orange-20",
1399
+ info: "bg-blue-10 dark:bg-blue-50 text-blue-40, dark:text-blue-20",
1400
+ success: "bg-green-10, dark:bg-green-50 text-green-40 dark:text-green-20",
1401
+ caution: "bg-yellow-10 dark:bg-yellow-50 text-yellow-40 dark:text-yellow-20"
1402
+ }, vn = {
1403
+ sm: "text-11 w-fit rounded-0.5 plb-0.25 pli-0.5",
1404
+ lg: "text-16 w-fit rounded-0.5 plb-0.5 pli-1"
1405
+ }, Hn = ({ message: e, variant: t = "default", size: r = "sm", className: n }) => {
1406
+ const a = yn[t], o = vn[r];
1407
+ return /* @__PURE__ */ l(I, { className: c(a, o, n), children: /* @__PURE__ */ l(j, { children: e }) });
1408
+ }, wn = "_inputIcon_1pzdd_1", kn = {
1409
+ inputIcon: wn
1410
+ }, $n = ({ className: e, error: t, name: r, ...n }, a) => /* @__PURE__ */ x(se, { children: [
1398
1411
  /* @__PURE__ */ l(
1399
1412
  "input",
1400
1413
  {
1401
1414
  className: c([
1402
1415
  "rounded-1 text-black dark:text-white p-2 border-small border-tertiary-light dark:border-tertiary-dark hover:cursor-pointer bg-transparent disabled:bg-gray-10 disabled:dark:bg-gray-40 disabled:cursor-auto",
1403
- vn.inputIcon,
1416
+ kn.inputIcon,
1404
1417
  e
1405
1418
  ]),
1406
1419
  id: r,
@@ -1412,12 +1425,12 @@ const un = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark
1412
1425
  }
1413
1426
  ),
1414
1427
  t ? /* @__PURE__ */ l("div", { className: "text-alert-light dark:text-alert-dark text-13", children: t }) : null
1415
- ] }), kn = y(wn);
1416
- kn.displayName = "TimePicker";
1417
- const $n = "_tooltipWrapper_qu88w_1", Nn = "_tooltipContent_qu88w_18", Ve = {
1418
- tooltipWrapper: $n,
1419
- tooltipContent: Nn
1420
- }, _n = ({ content: e, className: t, ...r }) => /* @__PURE__ */ l("div", { className: c(Ve.tooltipWrapper, t), ...r, children: /* @__PURE__ */ l("span", { className: Ve.tooltipContent, children: e }) });
1428
+ ] }), Sn = y($n);
1429
+ Sn.displayName = "TimePicker";
1430
+ const Nn = "_tooltipWrapper_qu88w_1", On = "_tooltipContent_qu88w_18", Ve = {
1431
+ tooltipWrapper: Nn,
1432
+ tooltipContent: On
1433
+ }, An = ({ content: e, className: t, ...r }) => /* @__PURE__ */ l("div", { className: c(Ve.tooltipWrapper, t), ...r, children: /* @__PURE__ */ l("span", { className: Ve.tooltipContent, children: e }) });
1421
1434
  export {
1422
1435
  Mt as AutocompleteSelect,
1423
1436
  I as Box,
@@ -1426,10 +1439,10 @@ export {
1426
1439
  pe as Button,
1427
1440
  Gt as ButtonComponent,
1428
1441
  Xt as Checkbox,
1429
- Pn as Divider,
1442
+ Tn as Divider,
1430
1443
  Jt as FocusTrap,
1431
1444
  Br as Heading,
1432
- Bn as HorizontalLoader,
1445
+ Dn as HorizontalLoader,
1433
1446
  er as IconButton,
1434
1447
  rr as IconLinkButton,
1435
1448
  Dr as ImageUpload,
@@ -1438,24 +1451,25 @@ export {
1438
1451
  Mr as LinkButtonComponent,
1439
1452
  Ze as List,
1440
1453
  fe as ListItem,
1441
- Tn as ListItemActions,
1442
- Dn as ListItemContent,
1443
- Mn as ListItemText,
1444
- Wn as Option,
1445
- Rn as Popover,
1446
- jn as PopoverBody,
1454
+ Mn as ListItemActions,
1455
+ Rn as ListItemContent,
1456
+ jn as ListItemText,
1457
+ _n as Option,
1458
+ Wn as Popover,
1459
+ zn as PopoverBody,
1447
1460
  Fn as PopoverTrigger,
1448
1461
  sn as RadioSet,
1449
1462
  dn as RadioSetItem,
1450
- zn as Select,
1451
- F as Text,
1452
- kn as TimePicker,
1453
- _n as Tooltip,
1454
- Cn as buttonSizeOptions,
1463
+ Vn as Select,
1464
+ Hn as Tag,
1465
+ j as Text,
1466
+ Sn as TimePicker,
1467
+ An as Tooltip,
1468
+ Bn as buttonSizeOptions,
1455
1469
  et as defaultButtonClasses,
1456
1470
  Ye as determineSizeClasses,
1457
1471
  re as iconSizes,
1458
- ge as useCombinedRefs,
1459
- In as useLockBodyScroll,
1472
+ he as useCombinedRefs,
1473
+ Pn as useLockBodyScroll,
1460
1474
  le as variantClasses
1461
1475
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(p,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("react"),require("clsx"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","clsx","react-dom"],a):(p=typeof globalThis<"u"?globalThis:p||self,a(p["design-system-components"]={},p["react/jsx-runtime"],p.React,p.clsx))})(this,function(p,a,d,u){"use strict";var gt=Object.defineProperty,mt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,ve=(e,t,r)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vt=(e,t)=>{for(var r in t||(t={}))me.call(t,r)&&ve(e,r,t[r]);if(Z)for(var r of Z(t))ye.call(t,r)&&ve(e,r,t[r]);return e},xt=(e,t)=>mt(e,yt(t)),wt=(e,t)=>{var r={};for(var n in e)me.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Z)for(var n of Z(e))t.indexOf(n)<0&&ye.call(e,n)&&(r[n]=e[n]);return r},kt=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=wt(r,["title","titleId"]);return a.jsxs("svg",xt(vt({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.207 10a.5.5 0 0 0-.354.854l3.793 3.792a.5.5 0 0 0 .707 0l3.793-3.792a.5.5 0 0 0-.353-.854H8.207Z",fill:"currentColor"})]}))},St=d.forwardRef(kt),xe=St;const ae=e=>{if(e){if(typeof e!="string"&&e)return u(e.lightMode,e.darkMode);if(typeof e=="string")return e}},we=e=>{if(e){if(typeof e!="string"&&e)return u(e.block,e.blockEnd,e.blockStart,e.inline,e.inlineEnd,e.inlineStart);if(typeof e=="string")return e}},Et=({background:e,borderColor:t,borderRadius:r,borderWidth:n,className:o,component:s="div",color:l,elevation:i=0,height:f,margin:b,padding:g,width:v,...w},m)=>{const h={0:"",1:"shadow-light-1 dark:shadow-dark-1",2:"shadow-light-2 dark:shadow-dark-2",4:"shadow-light-4 dark:shadow-dark-4",8:"shadow-light-8 dark:shadow-dark-8",12:"shadow-light-12 dark:shadow-dark-12"},E=ae(l),k=ae(e),M=ae(t),L=we(g),P=we(b),x=u(r,n,h[i],P,L,E,k,M,v,f,o);return d.createElement(s,{className:x,...w,ref:m})},I=d.forwardRef(Et);I.displayName="Box";const G=({innerRef:e,forwardedRef:t})=>(d.useEffect(()=>{[e,t].forEach(r=>{r&&(typeof r=="function"?r(e.current||null):r.current=e.current||null)})},[e,t]),e);function Nt(){d.useLayoutEffect(()=>{const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>document.body.style.overflow=e},[])}const Ct=({className:e,disabled:t,endIcon:r,error:n,hint:o,label:s,name:l,onChange:i,placeholder:f,startIcon:b,value:g,...v},w)=>{const m=d.useRef(null),h=G({forwardedRef:w,innerRef:m}),[E,k]=d.useState(Boolean(g)),[M,L]=d.useState(!1);d.useEffect(()=>{var c;k(Boolean((c=h==null?void 0:h.current)==null?void 0:c.value)||Boolean(g||f))},[g,f,h]);const P=c=>{var ne;k(Boolean((ne=h==null?void 0:h.current)==null?void 0:ne.value)||Boolean(g||f)),i&&i(c)},x=()=>{t||!h.current||(h.current.focus(),L(!0))},y=()=>{L(!1)};return a.jsxs("div",{className:u(["flex items-start flex-col gap-0.5",e]),children:[a.jsxs("div",{className:u(["items-center self-stretch rounded-1 border-small border-solid cursor-text flex flex-row relative focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark",t?"bg-gray-10 dark:bg-gray-40":null,n?"border-alert dark:border-alert-dark":"border-tertiary-light dark:border-tertiary-dark"]),onClick:x,onFocus:x,children:[b?a.jsx("div",{className:"text-text-muted-light dark:text-text-muted-dark pis-1.5",children:b}):null,a.jsxs("span",{className:"relative flex flex-1 overflow-hidden",children:[a.jsx("input",{className:u(["self-stretch bg-transparent flex-auto outline-none overflow-hidden",b?"pis-1":"pis-2",r?"pie-1":"pie-2",s?"pbs-3 pbe-1":"pbs-2 pbe-2"]),disabled:t,id:l,onBlur:y,onChange:P,placeholder:f,ref:h,value:g,...v}),s?a.jsx("label",{className:u("items-center text-text-muted-light dark:text-text-muted-dark flex font-regular leading-loose pointer-events-none absolute top-2 select-none",b?"ltr:left-1 rtl:right-1":"ltr:left-2 rtl:right-2",M||E?"text-13 -translate-y-1.5":"text-16"),htmlFor:l,children:s}):null]}),r?a.jsx("div",{className:"text-text-muted-light dark:text-text-muted-dark pie-1.5",children:r}):null]}),n||o?a.jsxs("div",{className:"flex flex-col",children:[n?a.jsx("span",{className:"text-alert dark:text-alert-dark",children:n}):null,o?a.jsx("span",{className:"text-text-muted-light dark:text-text-muted-dark text-13 leading-default",children:o}):null]}):null]})},oe=d.forwardRef(Ct);oe.displayName="Input";const It=({children:e,className:t,...r},n)=>a.jsx("ul",{className:u(["bg-canvas-light dark:bg-canvas-secondary-dark rounded-1 py-0.5",t]),ref:n,...r,children:e}),se=d.forwardRef(It);se.displayName="List";const Lt=({children:e,className:t,disabled:r,divider:n,onClick:o,...s},l)=>{const i=f=>{o&&(f.code==="Enter"||f.key===" ")&&o()};return a.jsx("li",{className:u(["flex items-center box-border relative",n?"after:last:content-none after:absolute after:inset-x-0 after:bottom-0 after:mx-2 after:bg-gray-10 after:dark:bg-gray-40 after:h-px":null,t]),ref:l,...s,children:a.jsx("div",{className:u(["flex flex-1 py-2 gap-x-2 items-center pie-2 pis-2",o?"cursor-pointer hover:bg-gray-10 hover:dark:bg-gray-50":void 0,r?"pointer-events-none":""]),onClick:o,onKeyUp:i,onTouchEnd:o,tabIndex:o?0:void 0,children:e})})},X=d.forwardRef(Lt);X.displayName="ListItem";const Pt=({label:e,name:t,options:r,disabled:n=!1,error:o,hint:s,noOptionsText:l,onChange:i,onSelect:f,value:b,...g},v)=>{const w=d.useRef(null),[m,h]=d.useState(b),[E,k]=d.useState(!1),M=y=>{E||k(!0),!y.length&&m&&h(null),i(y)},L=y=>{f(y),i(y.label),h(y.label),k(!1)},P=d.useCallback(y=>{w.current&&!w.current.contains(y.target)&&(!m&&b&&i(""),m&&b&&i(m),k(!1))},[i,m,b]),x=d.useMemo(()=>r.filter(y=>y.label.toLowerCase().includes(b.toLowerCase()))??[],[r,b]);return d.useEffect(()=>(document.addEventListener("click",P,!0),()=>{document.removeEventListener("click",P,!0)}),[P]),a.jsxs(I,{className:"relative",ref:w,children:[a.jsx(oe,{disabled:n,endIcon:a.jsx(xe,{size:"24"}),error:o,hint:s,label:e,name:t??e,onChange:y=>{M(y.target.value)},onFocus:()=>k(!0),ref:v,value:b??"",...g}),E?a.jsx(I,{className:"absolute top-[calc(100%+1px)] w-full z-50",children:a.jsx(se,{className:"max-h-[300px] overflow-y-auto",children:x.length?x.map((y,c)=>a.jsx(X,{onClick:()=>L(y),children:y.label},`${y.value}-${c}`)):a.jsx(X,{children:l})})}):null]})},ke=d.forwardRef(Pt);ke.displayName="AutocompleteSelect";const Se={base:"font-bold",xs:"text-16 md:text-19 leading-default",sm:"text-19 md:text-23 leading-default md:leading-comfy",md:"text-23 md:text-28 leading-comfy",lg:"text-28 md:text-33 leading-comfy",xl:"text-33 md:text-40 leading-comfy",xxl:"text-33 md:text-57 leading-comfy"},J={base:"font-medium leading-default",default:"text-16 md:text-19",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19",xl:"text-23 md:text-28 tracking-tight"},le={...J,base:"font-regular leading-loose",xl:"text-23 md:text-28"},Ee={base:"font-medium leading-default tracking-wider uppercase text-text-muted-light dark:text-text-muted-dark",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19",xl:"text-23"},Ne={base:"font-regular leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Ce={base:"font-bold leading-default",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19"},Ie={base:"font-medium leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Le={base:"font-regular leading-loose",md:"text-16",lg:"text-19"},Pe=({size:e,variant:t})=>{switch(t){case"headline":return u(Se.base,Se[e]);case"label":return u(J.base,e?J[e]:J.default);case"paragraph":return u(le.base,e?le[e]:le.default);case"eyebrow":return u(Ee.base,Ee[e]);case"caption":return u(Ne.base,Ne[e]);case"buttonLabel":return u(Ce.base,Ce[e]);case"fieldLabel":return u(Ie.base,Ie[e]);case"fieldTextInput":return u(Le.base,Le[e]);default:return e}},Be={primary:"font-aktiv-grotesk",secondary:"font-untitled-serif"},Bt=({className:e,component:t="p",children:r,font:n="primary",size:o,variant:s,...l},i)=>{const f="text-text-light dark:text-text-dark",b=Be[n],g=Pe({size:o,variant:s});return a.jsx(I,{className:u(f,g,b,e),component:t,ref:i,...l,children:r})},T=d.forwardRef(Bt);T.displayName="Text";const Te=({children:e,component:t="a",className:r,disabled:n,active:o,...s})=>a.jsx(T,{className:u(["font-bold text-gray-50 leading-default whitespace-nowrap",o?"underline decoration-yv-red decoration-2 underline-offset-8 text-16 leading-loose":"text-13",n?"cursor-none pointer-events-none text-text-muted-light dark:text-text-muted-dark":"",r]),component:t,...s,children:e});Te.displayName="Breadcrumb";var Tt=Object.defineProperty,Dt=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,je=(e,t,r)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jt=(e,t)=>{for(var r in t||(t={}))De.call(t,r)&&je(e,r,t[r]);if(Y)for(var r of Y(t))Me.call(t,r)&&je(e,r,t[r]);return e},Ft=(e,t)=>Dt(e,Mt(t)),zt=(e,t)=>{var r={};for(var n in e)De.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Y)for(var n of Y(e))t.indexOf(n)<0&&Me.call(e,n)&&(r[n]=e[n]);return r},Wt=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=zt(r,["title","titleId"]);return a.jsxs("svg",Ft(jt({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.293 18.707a1 1 0 0 1 0-1.414l4.94-4.94a.5.5 0 0 0 0-.707l-4.94-4.939a1 1 0 0 1 1.414-1.414l5.647 5.646a1.5 1.5 0 0 1 0 2.122l-5.647 5.646a1 1 0 0 1-1.414 0Z",fill:"currentColor"})]}))},Ot=d.forwardRef(Wt),Ht=Ot;const _t=({children:e,className:t,...r},n)=>{const o=d.Children.toArray(e),s=o.findIndex(l=>{var i;return d.isValidElement(l)?(i=l==null?void 0:l.props)==null?void 0:i.active:!1});return a.jsx("div",{className:u(["flex py-0.5 flex-row min-h-[48px] rtl:rotate-180",t]),ref:n,...r,children:o.map((l,i)=>a.jsxs("div",{className:"flex items-center",children:[i?a.jsx(Ht,{className:u(["mx-1",i>s&&"text-gray-15",i<=s&&"text-gray-25"]),size:"15"}):null,typeof l=="object"&&"type"in l?d.createElement(l.type,{...l.props,className:u([l.props.className??"",i<s?"bg-gray-10 dark:bg-gray-40 py-1 px-2 rounded-3 cursor-pointer":"px-0.5",i>s&&"[&>*]:text-gray-15 [&>*]:text-16 [&>*]:leading-loose [&>*]:font-medium","rtl:rotate-180"])}):l]},`${i}-${l.toString()}`))})},Fe=d.forwardRef(_t);Fe.displayName="Breadcrumbs";const Vt={lg:"lg",md:"md",sm:"sm",xl:"xl",xs:"xs"},de=e=>{switch(e){case"start":return{lg:"rounded-4 text-19 pis-[20px] pie-4 py-2",md:"rounded-3 text-xs pis-2 pie-3 py-1.5",sm:"rounded-3 text-13 pis-1.5 pie-3 py-1.5",xl:"rounded-4 text-23 pis-3 pie-4 py-2",xs:"rounded-3 text-11 pis-1 pie-2 py-1"};case"end":return{lg:"rounded-4 text-19 pie-[20px] pis-4 py-2",md:"rounded-3 text-xs pie-2 pis-3 py-1.5",sm:"rounded-3 text-13 pie-1.5 pis-3 py-1.5",xl:"rounded-4 text-23 pie-3 pis-4 py-2",xs:"rounded-3 text-11 pie-1 pis-2 py-1"};default:return{lg:"rounded-4 text-19 px-4 py-2",md:"rounded-3 text-xs px-3 py-1.5",sm:"rounded-3 text-13 px-3 py-1.5",xl:"rounded-4 text-23 px-4 py-2",xs:"rounded-3 text-11 px-2 py-1"}}},$={lg:30,md:24,sm:18,xl:36,xs:12},ie="items-center leading-default font-bold ease-in-out duration-100 focus:ring-2 focus:ring-info-light dark:focus:ring-info-dark flex w-full max-w-fit",A={all_caps:"bg-transparent text-gray-50 dark:text-white hover:text-info-light dark:hover:text-info-dark active:text-blue-40 dark:active:text-blue-20 disabled:opacity-50 disabled:text-gray-50 dark:disabled:text-white uppercase",borderless:"bg-transparent text-gray-50 dark:text-white hover:bg-gray-10 dark:hover:bg-gray-40 disabled:opacity-50 dark:disabled:bg-transparent",brand:"bg-yv-red dark:bg-yv-red-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",primary:"bg-gray-50 dark:bg-gray-10 text-white dark:text-gray-50 hover:bg-gray-40 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",risk:"bg-orange-30 dark:bg-alert-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white","risk:all_caps":"bg-transparent text-alert dark:text-alert-dark active:bg-gray-10 dark:active:bg-gray-40 hover:text-alert-light-hover hover:bg-white dark:hover:bg-gray-40 dark:hover:text-alert-dark-hover hover:shadow-risk-light-2 dark:hover:shadow-risk-dark-2 disabled:opacity-50 disabled:text-gray-50 dark:disabled:text-white active:shadow-none dark:active:shadow-none uppercase","risk:borderless":"bg-transparent text-alert dark:text-alert-dark active:bg-gray-10 dark:active:bg-gray-40 hover:text-alert-light-hover hover:bg-white dark:hover:bg-gray-40 dark:hover:text-alert-dark-hover hover:shadow-risk-light-2 dark:hover:shadow-risk-dark-2 disabled:opacity-50 dark:disabled:bg-transparent active:shadow-none dark:active:shadow-none","risk:stroked":"bg-transparent ring ring-2 ring-alert dark:ring-alert-dark text-alert dark:text-alert-dark hover:bg-alert dark:hover:bg-alert-dark hover:text-white dark:hover:text-white active:bg-alert dark:active:bg-alert-dark disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white hover:shadow-risk-light-2 dark:hover:shadow-risk-dark-2",secondary:"bg-gray-10 dark:bg-gray-40 text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 disabled:text-gray-50",stroked:"bg-transparent ring ring-2 ring-gray-50 dark:ring-white text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white"},ze=({className:e,children:t,disabled:r,icon:n,iconAction:o,iconPosition:s,size:l="md",type:i="button",variant:f="primary",...b},g)=>{const v=de(n!==void 0?s:void 0),w=u(ie,A[f],v[l],e);return a.jsxs("button",{className:w,disabled:r,ref:g,type:i,...b,children:[s==="start"&&n!==void 0?d.createElement(n,{className:"mr-0.5",onClick:o??void 0,size:$[l]}):null,a.jsx("span",{className:"truncate",children:t}),s==="end"&&n!==void 0?d.createElement(n,{className:"ml-0.5",onClick:o??void 0,size:$[l]}):null]})},R=d.forwardRef(ze);R.displayName="Button";const $t=({error:e,className:t,label:r,disabled:n,name:o,...s},l)=>{const i=d.useId(),f=d.useMemo(()=>`checkbox-label-${i}`,[i]);return a.jsxs("div",{className:u(["flex items-baseline rounded-0.5 w-fit focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark",t]),children:[a.jsx("input",{"aria-labelledby":f,className:"w-1.5 h-1.5 mr-0.5 flex-none rounded-0.25 focus-within:outline-none peer",disabled:n,id:o,name:o,ref:l,type:"checkbox",...s}),r?a.jsx("div",{className:"peer-disabled:text-text-muted-light peer-disabled:dark:text-text-muted-dark text-text-light dark:text-text-dark",children:a.jsx("label",{htmlFor:o,id:f,children:r})}):null,e?a.jsx("div",{className:"text-alert-light dark:text-alert-dark text-13",children:e}):null]})},We=d.forwardRef($t);We.displayName="Checkbox";const At=({className:e,...t})=>a.jsx("hr",{...t,className:u("w-full border-gray-15 dark:border-gray-30 border-standard",e)}),Oe=({children:e,autoFocus:t=!0})=>{const r=d.useRef(null);return d.useEffect(()=>{if(r.current){const n=r.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');let o=document.activeElement;const s=n[0],l=n[n.length-1],i=g=>{if(g.key==="Tab"){if(g.shiftKey){if(document.activeElement===s)g.preventDefault(),l.focus(),o=l;else for(let v=0;v<n.length;v++)if(n[v]===document.activeElement){o=n[v-1];break}}else if(!g.shiftKey){if(document.activeElement===l)g.preventDefault(),s.focus(),o=s;else for(let v=0;v<n.length;v++)if(n[v]===document.activeElement){o=n[v+1];break}}}};t&&(()=>{if(r.current){const g=r.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');g&&g.focus()}})();const b=g=>{r.current&&!r.current.contains(g.target)&&o.focus()};return document.addEventListener("keydown",i),document.addEventListener("click",b),()=>{document.removeEventListener("keydown",i),document.removeEventListener("click",b)}}},[t]),a.jsx("div",{ref:r,children:e})},Ut=({className:e,progress:t})=>a.jsx("div",{className:u(["w-full bg-gray-15 h-2 rounded-3 overflow-hidden",e]),children:a.jsx("div",{className:"bg-blue-30 h-2 ease-in-out duration-300",style:{transitionProperty:"width",width:`${t}%`}})}),qt=({children:e,className:t,disabled:r,type:n="button",variant:o="borderless",...s},l)=>a.jsx("button",{className:u(["rounded-full inline-flex justify-center items-center p-1",t,A[o],r?"pointer-events-none":""]),disabled:r,ref:l,type:n,...s,children:e}),He=d.forwardRef(qt);He.displayName="IconButton";const Kt=({className:e,children:t,component:r="a",variant:n="borderless",...o},s)=>d.createElement(r,{...o,className:u(["rounded-full inline-flex justify-center items-center p-1 no-underline cursor-pointer",A[n],e]),ref:s},t),_e=d.forwardRef(Kt);_e.displayName="IconLinkButton";var Zt=Object.defineProperty,Gt=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Ae=(e,t,r)=>t in e?Zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jt=(e,t)=>{for(var r in t||(t={}))Ve.call(t,r)&&Ae(e,r,t[r]);if(Q)for(var r of Q(t))$e.call(t,r)&&Ae(e,r,t[r]);return e},Yt=(e,t)=>Gt(e,Xt(t)),Rt=(e,t)=>{var r={};for(var n in e)Ve.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Q)for(var n of Q(e))t.indexOf(n)<0&&$e.call(e,n)&&(r[n]=e[n]);return r},Qt=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=Rt(r,["title","titleId"]);return a.jsxs("svg",Yt(Jt({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.768 11.646a.5.5 0 0 0 0 .708l3.182 3.182a1 1 0 0 1-1.414 1.414l-3.182-3.182a.5.5 0 0 0-.708 0L8.464 16.95a1 1 0 1 1-1.414-1.414l3.182-3.182a.5.5 0 0 0 0-.708L7.05 8.464A1 1 0 0 1 8.464 7.05l3.182 3.182a.5.5 0 0 0 .707 0l3.183-3.182a1 1 0 1 1 1.414 1.414l-3.182 3.182Z",fill:"currentColor"})]}))},er=d.forwardRef(Qt),tr=er,rr=Object.defineProperty,nr=Object.defineProperties,ar=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Ke=(e,t,r)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,or=(e,t)=>{for(var r in t||(t={}))Ue.call(t,r)&&Ke(e,r,t[r]);if(ee)for(var r of ee(t))qe.call(t,r)&&Ke(e,r,t[r]);return e},sr=(e,t)=>nr(e,ar(t)),lr=(e,t)=>{var r={};for(var n in e)Ue.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ee)for(var n of ee(e))t.indexOf(n)<0&&qe.call(e,n)&&(r[n]=e[n]);return r},dr=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=lr(r,["title","titleId"]);return a.jsxs("svg",sr(or({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{d:"M9.346 14.272c.15.228.499.228 1.194.228h5.628c.81 0 1.215 0 1.36-.262.145-.261-.07-.605-.5-1.292l-.667-1.068c-.386-.618-.58-.928-.861-.928s-.475.31-.861.928l-.453.724-1.252-2.924c-.4-.931-.6-1.397-.934-1.397-.335 0-.534.466-.934 1.397l-1.46 3.406c-.273.64-.41.96-.26 1.188ZM18 7a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",fill:"currentColor"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.879 3.379C6 4.257 6 5.672 6 8.5v3c0 2.828 0 4.243.879 5.121.878.879 2.293.879 5.121.879h3c2.828 0 4.243 0 5.121-.879C21 15.743 21 14.328 21 11.5v-3c0-2.828 0-4.243-.879-5.121C19.243 2.5 17.828 2.5 15 2.5h-3c-2.828 0-4.243 0-5.121.879ZM18.02 4.623c-.65-.087-1.55-.092-3.021-.092h-3c-1.472 0-2.371.005-3.021.092-.301.04-.466.09-.554.126a.292.292 0 0 0-.11.066.292.292 0 0 0-.066.11 2.313 2.313 0 0 0-.126.554c-.087.65-.092 1.55-.092 3.021v3c0 1.472.005 2.371.092 3.021.04.301.09.466.126.554.03.072.05.095.066.11a.292.292 0 0 0 .11.066c.088.036.253.085.554.126.65.087 1.55.092 3.021.092h3c1.472 0 2.371-.005 3.021-.092.301-.04.466-.09.554-.126a.292.292 0 0 0 .11-.066.292.292 0 0 0 .066-.11c.036-.088.085-.253.126-.554.087-.65.092-1.55.092-3.021v-3c0-1.472-.005-2.371-.092-3.021a2.313 2.313 0 0 0-.126-.554.292.292 0 0 0-.066-.11.292.292 0 0 0-.11-.066 2.313 2.313 0 0 0-.554-.126Z",fill:"currentColor"}),a.jsx("path",{d:"M2 8.5c0-1 1-2 2-2v9a4 4 0 0 0 4 4h9c0 1-.887 2-2 2H8a6 6 0 0 1-6-6v-7Z",fill:"currentColor"})]}))},ir=d.forwardRef(dr),cr=ir,ur=Object.defineProperty,fr=Object.defineProperties,pr=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Xe=(e,t,r)=>t in e?ur(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,br=(e,t)=>{for(var r in t||(t={}))Ze.call(t,r)&&Xe(e,r,t[r]);if(te)for(var r of te(t))Ge.call(t,r)&&Xe(e,r,t[r]);return e},hr=(e,t)=>fr(e,pr(t)),gr=(e,t)=>{var r={};for(var n in e)Ze.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&te)for(var n of te(e))t.indexOf(n)<0&&Ge.call(e,n)&&(r[n]=e[n]);return r},mr=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=gr(r,["title","titleId"]);return a.jsxs("svg",hr(br({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 4a1 1 0 0 1 1-1 9 9 0 0 1 9 9 1 1 0 1 1-2 0 7.001 7.001 0 0 0-7-7 1 1 0 0 1-1-1Z",fill:"currentColor",children:a.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 12 12",to:"360 12 12",dur:s.dur,repeatCount:"indefinite"})})]}))},yr=d.forwardRef(mr),vr=yr;const xr={1:"h1",2:"h2",3:"h3",4:"h4"},wr=({className:e,children:t,font:r="primary",level:n=1,size:o,variant:s,...l},i)=>{const f="text-text-light dark:text-text-dark",b=Be[r],g=Pe({size:o,variant:s});return a.jsx(I,{className:u(f,g,b,e),component:xr[n],ref:i,...l,children:t})},Je=d.forwardRef(wr);Je.displayName="Heading";const kr=({acceptedFileTypes:e=["image/*"],changeImageButtonLabel:t="Change",chooseImageButtonLabel:r="Choose Image",className:n,disabled:o=!1,dismissCallback:s,dismissImageAriaLabel:l="Remove Image",error:i="",fileMaxKbSizeError:f=(N,he)=>`${N} is too big to upload, the maximum size is ${he}kb. Please try again.`,fileMaxSizeError:b=N=>`${N} is too large to upload. The maximum dimensions are ${c==null?void 0:c.maxWidth}x${c==null?void 0:c.maxHeight}. Please try again.`,fileMinSizeError:g=N=>`${N} is too small to upload. The minimum dimensions are ${c==null?void 0:c.minWidth}x${c==null?void 0:c.minHeight}. Please try again.`,fileRatioError:v=N=>`${N} must have a ratio of, ${c==null?void 0:c.imageRatio}. Please try again.`,fileCallback:w,hero:m=!1,hint:h,imageWidth:E=160,imageSrc:k,label:M="Upload Image",name:L="imageUpload",onBlur:P,preProcessing:x,shape:y="circle",validation:c},ne)=>{const N=d.useRef(null),he=G({forwardedRef:ne,innerRef:N}),[S,V]=d.useState(void 0),[j,F]=d.useState(k?"resolved":"idle"),[ge,q]=d.useState(i),pn=()=>N!=null&&N.current?N.current.click():void 0,bt=d.useMemo(()=>S&&j!=="rejected"?(F("resolved"),S.imageSrc):k&&j==="resolved"?(F("resolved"),k):null,[S,k,j]),bn=d.useMemo(()=>{const B=()=>{s&&s(k),V(void 0),F("idle")};switch(j){case"pending":return a.jsx(I,{className:"animate-spin",children:a.jsx(vr,{className:"text-info-light dark:text-info-dark","data-testid":"loading spinner",size:"32"})});case"resolved":return a.jsxs(a.Fragment,{children:[a.jsx("img",{alt:`${S==null?void 0:S.id} preview`,className:u(["object-fit w-full h-full",y==="circle"?"rounded-full":"rounded-0.5",y!=="unset"||!m?"aspect-square":"",y==="unset"&&m?"aspect-video":"",y==="unset"&&!m?"!aspect-auto":""]),onLoad:()=>S!=null&&S.imageSrc?URL.revokeObjectURL(S.imageSrc):void 0,src:bt||void 0,width:E}),o?null:a.jsx(R,{"aria-label":l,className:"absolute -top-0.5 -right-0.5 rounded-3 !p-0 !text-text-muted-light dark:text-text-muted-dark bg-white dark:bg-gray-40 dark:hover:bg-white dark:hover:!text-gray-45 hover:!text-white shadow-light-1 dark:shadow-dark-1","data-testid":"remove image",onClick:B,children:a.jsx(tr,{})})]});default:return a.jsx(I,{className:"gray-10 dark:gray-30",children:a.jsx(cr,{"data-testid":"placeholder image",size:"32"})})}},[o,s,l,m,S==null?void 0:S.id,S==null?void 0:S.imageSrc,k,j,E,bt,y]),hn=({file:B,imageUrl:W})=>new Promise((O,H)=>{var ht;const C=new Image,K=(ht=c==null?void 0:c.imageRatio)==null?void 0:ht.split("/");C.onload=async()=>{if(c)if(c!=null&&c.maxByteSize&&B.size>c.maxByteSize){V(void 0),F("rejected");const wn=f(B.name,Math.round(c.maxByteSize/1e3));return q(wn),H(!1)}else{if(c!=null&&c.minWidth&&C.width<(c==null?void 0:c.minWidth)||c!=null&&c.minHeight&&C.height<(c==null?void 0:c.minHeight))return V(void 0),F("rejected"),q(g(B.name)),H(!1);if(c!=null&&c.maxHeight&&C.height>(c==null?void 0:c.maxHeight)||c!=null&&c.maxWidth&&C.width>(c==null?void 0:c.maxWidth))return V(void 0),F("rejected"),q(b(B.name)),H(!1);if(c!=null&&c.imageRatio&&(K==null?void 0:K.length)===2&&parseInt(K[0])/parseInt(K[1])!==C.width/C.height)return V(void 0),F("rejected"),q(v(B.name)),H(!1)}return E=C.width,typeof w=="function"&&(console.log("Callback"),await w(B,C)),q(""),O(!0)},C.src=W}),gn=async B=>{try{const{files:W}=B.target;if(W){const O=W[0],H=URL.createObjectURL(O);let C=!0;F("pending"),x&&await x(O),C=await hn({file:O,imageUrl:H}),C&&(V({file:O,id:O.name,imageSrc:H}),F("resolved"))}}catch(W){if(W instanceof Error)throw W}},mn=u([y==="circle"&&!m?"rounded-full aspect-square":""]),yn=u([y==="square"&&!m?"aspect-square rounded-1":""]),vn=u([y==="unset"&&!m?"rounded-1":"",y==="unset"&&j!=="idle"&&!m?"aspect-auto":"",y==="unset"&&j!=="resolved"&&!m?"aspect-square":""]),xn=u([m?"rounded-1 aspect-video":""]);return a.jsxs(I,{className:u([n]),children:[a.jsxs(I,{className:u(["relative border-small border-solid rounded-1 mb-0.5 pt-1 pb-2 px-2 text-text-muted-light dark:text-text-muted-dark",,ge?"border-alert-light dark:border-alert-dark":"border-tertiary-light dark:border-tertiary-dark",o?"select-none bg-gray-10 dark:bg-gray-40 pointer-events-none":""]),children:[a.jsx(T,{className:"pb-1.5 text-text-muted-light dark:text-text-muted-dark",children:a.jsx("label",{htmlFor:L,children:M})}),a.jsxs(I,{className:"flex relative flex-wrap justify-center md:justify-start",children:[a.jsx(I,{className:u(["flex justify-center items-center relative mbe-2 md:mbe-0 md:mie-2",m?"w-full":"md:w-1/2 w-4/5",o?"border-small border-solid border-tertiary-light":"",j!=="resolved"?"bg-gray-10 dark:bg-gray-3":"",mn,yn,vn,xn]),children:bn}),a.jsx(R,{className:u(["my-auto !ring-gray-15 dark:!ring-gray-30 !ring-1 disabled:!bg-gray-15 disabled:!ring-none",m?"!mbs-2":""]),disabled:o,onClick:pn,size:"sm",variant:"stroked",children:j==="resolved"?t:r}),a.jsx("input",{accept:e.toString(),className:"hidden",disabled:o,id:L,name:L,onBlur:P,onChange:gn,ref:he,title:"",type:"file",value:""})]})]}),ge?a.jsx(T,{className:"dark:!text-alert-dark !text-alert-light text-13",children:ge}):null,h?a.jsx(T,{className:"text-text-muted-light dark:text-text-muted-dark text-13",children:h}):null]})},Ye=d.forwardRef(kr);Ye.displayName="ImageUpload";const Re=({className:e,children:t,component:r="a",icon:n,iconPosition:o,variant:s="primary",size:l="md",...i},f)=>{const b=de(n!==void 0?o:void 0),g=({children:v})=>d.createElement(r,{...i,className:u([ie,A[s],b[l],"no-underline cursor-pointer",e]),ref:f},v);return a.jsxs(g,{children:[o==="start"&&n!==void 0?d.createElement(n,{className:"mr-0.5 min-w-min",size:$[l]}):null,d.createElement("span",{className:"truncate"},t),o==="end"&&n!==void 0?d.createElement(n,{className:"ml-0.5 min-w-min",size:$[l]}):null]})},Qe=d.forwardRef(Re);Qe.displayName="LinkButton";function Sr({children:e,className:t,position:r}){let n="";return r&&(r==="start"?n="order-first":n="order-last"),a.jsx("div",{className:u("flex gap-1",n,t),children:e})}function Er({children:e,className:t}){return a.jsx("div",{className:u("flex-grow",t),children:e})}const Nr=({children:e,className:t,endText:r,endTextProps:n,size:o="sm",subHeadline:s,subHeadlineProps:l})=>a.jsxs("div",{className:u(["flex items-center justify-between break-words",t]),children:[a.jsxs("div",{className:"flex flex-col",children:[a.jsx(T,{size:o,variant:"label",children:e}),s?a.jsx(T,{...l,children:s}):null]}),r?a.jsx(T,{...n,children:r}):null]}),Cr=({children:e,className:t,...r})=>a.jsx("div",{className:u(["relative",t]),...r,children:e}),Ir=typeof window<"u"?d.useLayoutEffect:()=>{};let U=new Map,et=new Set;function tt(){if(typeof window>"u")return;let e=r=>{let n=U.get(r.target);n||(n=new Set,U.set(r.target,n),r.target.addEventListener("transitioncancel",t)),n.add(r.propertyName)},t=r=>{let n=U.get(r.target);if(n&&(n.delete(r.propertyName),n.size===0&&(r.target.removeEventListener("transitioncancel",t),U.delete(r.target)),U.size===0)){for(let o of et)o();et.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?tt():document.addEventListener("DOMContentLoaded",tt));function Lr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Pr(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Br(){return Pr(/^Mac/i)}function Tr(){return Lr(/Android/i)}function Dr(e){return e.mozInputSource===0&&e.isTrusted?!0:Tr()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mr=d.createContext(null);Mr.displayName="PressResponderContext";class jr{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function Fr(e){let t=d.useRef({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,Ir(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target,o=s=>{var l,i;t.current.isFocused=!1,n.disabled&&((i=(l=t.current).onBlur)===null||i===void 0||i.call(l,new jr("blur",s))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{t.current.isFocused&&n.disabled&&(t.current.observer.disconnect(),n.dispatchEvent(new FocusEvent("blur")),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[])}let zr=new Set,rt=!1,z=!1,ue=!1;function fe(e,t){for(let r of zr)r(e,t)}function Wr(e){return!(e.metaKey||!Br()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function nt(e){z=!0,Wr(e)&&fe("keyboard",e)}function _(e){(e.type==="mousedown"||e.type==="pointerdown")&&(z=!0,fe("pointer",e))}function Or(e){Dr(e)&&(z=!0)}function Hr(e){e.target===window||e.target===document||(!z&&!ue&&fe("virtual",e),z=!1,ue=!1)}function _r(){z=!1,ue=!0}function at(){if(typeof window>"u"||rt)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){z=!0,e.apply(this,arguments)},document.addEventListener("keydown",nt,!0),document.addEventListener("keyup",nt,!0),document.addEventListener("click",Or,!0),window.addEventListener("focus",Hr,!0),window.addEventListener("blur",_r,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",_,!0),document.addEventListener("pointermove",_,!0),document.addEventListener("pointerup",_,!0)):(document.addEventListener("mousedown",_,!0),document.addEventListener("mousemove",_,!0),document.addEventListener("mouseup",_,!0)),rt=!0}typeof document<"u"&&(document.readyState!=="loading"?at():document.addEventListener("DOMContentLoaded",at));function Vr(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,s=d.useRef({isFocusWithin:!1}),l=d.useCallback(b=>{s.current.isFocusWithin&&!b.currentTarget.contains(b.relatedTarget)&&(s.current.isFocusWithin=!1,r&&r(b),o&&o(!1))},[r,o,s]),i=Fr(l),f=d.useCallback(b=>{!s.current.isFocusWithin&&document.activeElement===b.target&&(n&&n(b),o&&o(!0),s.current.isFocusWithin=!0,i(b))},[n,o,i]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:f,onBlur:l}}}function $r(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,l=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:o}).current;l.onInteractOutside=r,l.onInteractOutsideStart=o,d.useEffect(()=>{if(n)return;let i=f=>{re(f,t)&&l.onInteractOutside&&(l.onInteractOutsideStart&&l.onInteractOutsideStart(f),l.isPointerDown=!0)};if(typeof PointerEvent<"u"){let f=b=>{l.isPointerDown&&l.onInteractOutside&&re(b,t)&&l.onInteractOutside(b),l.isPointerDown=!1};return document.addEventListener("pointerdown",i,!0),document.addEventListener("pointerup",f,!0),()=>{document.removeEventListener("pointerdown",i,!0),document.removeEventListener("pointerup",f,!0)}}else{let f=g=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&l.onInteractOutside&&re(g,t)&&l.onInteractOutside(g),l.isPointerDown=!1},b=g=>{l.ignoreEmulatedMouseEvents=!0,l.onInteractOutside&&l.isPointerDown&&re(g,t)&&l.onInteractOutside(g),l.isPointerDown=!1};return document.addEventListener("mousedown",i,!0),document.addEventListener("mouseup",f,!0),document.addEventListener("touchstart",i,!0),document.addEventListener("touchend",b,!0),()=>{document.removeEventListener("mousedown",i,!0),document.removeEventListener("mouseup",f,!0),document.removeEventListener("touchstart",i,!0),document.removeEventListener("touchend",b,!0)}}},[t,l,n])}function re(e,t){if(e.button>0)return!1;if(e.target){const r=e.target.ownerDocument;if(!r||!r.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}let Ar=null;function ot(e,t){return t.some(r=>r.contains(e))}function Ur(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of lt.traverse(lt.getTreeNode(t)))if(ot(e,r.current))return!0;return!1}function qr(e){return Ur(e,Ar)}class pe{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,r,n){let o=this.fastMap.get(r??null),s=new st({scopeRef:t});o.addChild(s),s.parent=o,this.fastMap.set(t,s),n&&(s.nodeToRestore=n)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let r=this.fastMap.get(t),n=r.parent;for(let s of this.traverse())s!==r&&r.nodeToRestore&&s.nodeToRestore&&r.scopeRef.current&&ot(s.nodeToRestore,r.scopeRef.current)&&(s.nodeToRestore=r.nodeToRestore);let o=r.children;n.removeChild(r),o.size>0&&o.forEach(s=>n.addChild(s)),this.fastMap.delete(r.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let r of t.children)yield*this.traverse(r)}clone(){let t=new pe;for(let r of this.traverse())t.addTreeNode(r.scopeRef,r.parent.scopeRef,r.nodeToRestore);return t}constructor(){ce(this,"fastMap",new Map),this.root=new st({scopeRef:null}),this.fastMap.set(null,this.root)}}class st{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){ce(this,"children",new Set),ce(this,"contain",!1),this.scopeRef=t.scopeRef}}let lt=new pe;const D=[];function Kr(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:s=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:i}=e;d.useEffect(()=>(o&&D.push(t),()=>{let h=D.indexOf(t);h>=0&&D.splice(h,1)}),[o,t]);let f=()=>{D[D.length-1]===t&&r&&r()},b=h=>{(!i||i(h.target))&&D[D.length-1]===t&&(h.stopPropagation(),h.preventDefault())},g=h=>{(!i||i(h.target))&&(D[D.length-1]===t&&(h.stopPropagation(),h.preventDefault()),f())},v=h=>{h.key==="Escape"&&!l&&(h.stopPropagation(),h.preventDefault(),f())};$r({ref:t,onInteractOutside:s?g:null,onInteractOutsideStart:b});let{focusWithinProps:w}=Vr({isDisabled:!n,onBlurWithin:h=>{h.relatedTarget&&qr(h.relatedTarget)||(!i||i(h.relatedTarget))&&r()}}),m=h=>{h.target===h.currentTarget&&h.preventDefault()};return{overlayProps:{onKeyDown:v,...w},underlayProps:{onPointerDown:m}}}const Zr=({align:e,children:t,className:r,...n})=>{const o=d.useMemo(()=>{const{horizontal:s,vertical:l}=e,i={center:"left-1/2",end:"inline-end-0",start:"inline-start-0"},f={bottom:"",top:"bottom-full"};return`${i[s]} ${f[l]}`},[e]);return a.jsx("div",{className:u(["absolute shadow-light-2 dark:shadow-dark-2 rounded-1 bg-canvas-light dark:bg-overlay-body-dark mb-0.5 w-max overflow-y-scroll min-h-[200px] max-h-[400px] scrollbar-hide z-10",o,r]),...n,children:t})},Gr=({open:e,children:t})=>a.jsx(a.Fragment,{children:e?t:null}),Xr=({align:e={horizontal:"start",vertical:"bottom"},autoFocus:t=!0,children:r,className:n,isDismissible:o,isOpen:s,onClose:l,...i})=>{const f=d.useRef(null),{overlayProps:b}=Kr({isDismissable:o,isKeyboardDismissDisabled:!o,isOpen:s,onClose:l},f);return a.jsx(Gr,{open:s,children:a.jsx(Oe,{autoFocus:t,children:a.jsx(Zr,{align:e,className:n,onClose:l,...i,children:a.jsx("div",{ref:f,...b,onClick:l,children:r})})})})},Jr=({onToggle:e,children:t,className:r,disabled:n})=>{const o=i=>{i.preventDefault(),i.stopPropagation(),e()},s=d.useRef(null),l=d.cloneElement(t,{className:r,disabled:n,onClick:o,ref:s});return a.jsx(a.Fragment,{children:l})},Yr=(e,t)=>{const{children:r,error:n,hint:o,label:s}=e;return a.jsxs("div",{...e,className:"flex-col rounded-0.5 w-fit",ref:t,children:[a.jsx("label",{children:s}),n?a.jsx("p",{className:"text-alert-light dark:text-alert-dark text-13",children:n}):null,o?a.jsx("p",{className:"text-13 text-gray-25 dark:text-gray-20",children:o}):null,r]})},dt=d.forwardRef(Yr);dt.displayName="Radio Set";const Rr=({children:e,disabled:t,name:r,value:n,...o},s)=>a.jsxs("div",{className:"flex items-baseline rounded-0.5 w-fit focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark",children:[a.jsx("input",{className:"w-1.5 h-1.5 mr-0.5 flex-none rounded-0.25 focus-within:outline-none peer display: inline",disabled:t,id:r,name:r,ref:s,...o,type:"radio",value:n}),a.jsx("label",{className:"peer-disabled:text-text-muted-light peer-disabled:dark:text-text-muted-dark text-text-light dark:text-text-dark",htmlFor:"name",children:e})]}),it=d.forwardRef(Rr);it.displayName="RadioSetItem";const Qr=({...e})=>a.jsx("option",{...e}),ct="_select_1dwiy_1",kn={select:ct},en="appearance-none outline-none bg-transparent disabled:bg-gray-10 dark:disabled:bg-gray-40 rounded-1 border-solid border-small font-aktiv-grotesk text-16 leading-loose p-2 w-full mlb-0",tn="border-alert-light dark:border-alert-dark",rn="border-tertiary-light dark:border-tertiary-dark",be="text-text-muted-light dark:text-text-muted-dark",ut=u(be,"font-aktiv-grotesk font-medium text-13 absolute inline-start-2 block-start-2 pointer-events-none opacity-0 h-1.5"),nn="-translate-y-1 opacity-100",an="text-overlay-text dark:text-text-dark",on="!pbs-3 !pbe-1",sn="absolute block-end-2 inline-end-1.5 leading-0 pointer-events-none text-text-muted-light dark:text-text-muted-dark",ln=({children:e,className:t,disabled:r=!1,error:n,hint:o,label:s,name:l,onChange:i,value:f,...b},g)=>{var P;const v=u(ct,en),w=d.useRef(null),m=G({forwardedRef:g,innerRef:w}),[h,E]=d.useState(Boolean(f||((P=m==null?void 0:m.current)==null?void 0:P.value)));d.useEffect(()=>{var x;E(Boolean(((x=m==null?void 0:m.current)==null?void 0:x.value)||f))},[f,m]);const k=d.useMemo(()=>{const x=u(v,an,s?on:null),y=u(v,be);return h?x:y},[v,h,s]),M=d.useMemo(()=>{const x=u(ut,nn),y=u(ut);return h?x:y},[h]),L=x=>{var y;E(Boolean(((y=m==null?void 0:m.current)==null?void 0:y.value)||f)),i&&i(x)};return a.jsxs("div",{className:u(t),children:[a.jsxs("div",{className:u("relative w-full border-none"),children:[a.jsx("select",{...b,className:u([k,n?tn:rn]),disabled:r,id:l,name:l,onChange:L,ref:m,value:f,children:e}),a.jsx("label",{className:M,htmlFor:l,children:s}),a.jsx("div",{className:sn,children:a.jsx(xe,{size:"24"})})]}),n||o?a.jsxs("div",{className:"mbs-0.5",children:[n?a.jsx("p",{className:"text-alert-light dark:text-alert-dark text-13 m-0",children:n}):null,o?a.jsx("p",{className:u(be,"text-13 m-0"),children:o}):null]}):null]})},dn=d.forwardRef(ln),cn={inputIcon:"_inputIcon_1pzdd_1"},un=({className:e,error:t,name:r,...n},o)=>a.jsxs(a.Fragment,{children:[a.jsx("input",{className:u(["rounded-1 text-black dark:text-white p-2 border-small border-tertiary-light dark:border-tertiary-dark hover:cursor-pointer bg-transparent disabled:bg-gray-10 disabled:dark:bg-gray-40 disabled:cursor-auto",cn.inputIcon,e]),id:r,name:r,ref:o,role:"textbox",type:"time",...n}),t?a.jsx("div",{className:"text-alert-light dark:text-alert-dark text-13",children:t}):null]}),ft=d.forwardRef(un);ft.displayName="TimePicker";const pt={tooltipWrapper:"_tooltipWrapper_qu88w_1",tooltipContent:"_tooltipContent_qu88w_18"},fn=({content:e,className:t,...r})=>a.jsx("div",{className:u(pt.tooltipWrapper,t),...r,children:a.jsx("span",{className:pt.tooltipContent,children:e})});p.AutocompleteSelect=ke,p.Box=I,p.Breadcrumb=Te,p.Breadcrumbs=Fe,p.Button=R,p.ButtonComponent=ze,p.Checkbox=We,p.Divider=At,p.FocusTrap=Oe,p.Heading=Je,p.HorizontalLoader=Ut,p.IconButton=He,p.IconLinkButton=_e,p.ImageUpload=Ye,p.Input=oe,p.LinkButton=Qe,p.LinkButtonComponent=Re,p.List=se,p.ListItem=X,p.ListItemActions=Sr,p.ListItemContent=Er,p.ListItemText=Nr,p.Option=Qr,p.Popover=Cr,p.PopoverBody=Xr,p.PopoverTrigger=Jr,p.RadioSet=dt,p.RadioSetItem=it,p.Select=dn,p.Text=T,p.TimePicker=ft,p.Tooltip=fn,p.buttonSizeOptions=Vt,p.defaultButtonClasses=ie,p.determineSizeClasses=de,p.iconSizes=$,p.useCombinedRefs=G,p.useLockBodyScroll=Nt,p.variantClasses=A,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
1
+ (function(p,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("react"),require("clsx"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","clsx","react-dom"],a):(p=typeof globalThis<"u"?globalThis:p||self,a(p["design-system-components"]={},p["react/jsx-runtime"],p.React,p.clsx))})(this,function(p,a,d,c){"use strict";var ht=Object.defineProperty,mt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,ve=(e,t,r)=>t in e?ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vt=(e,t)=>{for(var r in t||(t={}))me.call(t,r)&&ve(e,r,t[r]);if(Z)for(var r of Z(t))ye.call(t,r)&&ve(e,r,t[r]);return e},xt=(e,t)=>mt(e,yt(t)),wt=(e,t)=>{var r={};for(var n in e)me.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Z)for(var n of Z(e))t.indexOf(n)<0&&ye.call(e,n)&&(r[n]=e[n]);return r},kt=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=wt(r,["title","titleId"]);return a.jsxs("svg",xt(vt({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.207 10a.5.5 0 0 0-.354.854l3.793 3.792a.5.5 0 0 0 .707 0l3.793-3.792a.5.5 0 0 0-.353-.854H8.207Z",fill:"currentColor"})]}))},St=d.forwardRef(kt),xe=St;const ae=e=>{if(e){if(typeof e!="string"&&e)return c(e.lightMode,e.darkMode);if(typeof e=="string")return e}},we=e=>{if(e){if(typeof e!="string"&&e)return c(e.block,e.blockEnd,e.blockStart,e.inline,e.inlineEnd,e.inlineStart);if(typeof e=="string")return e}},Et=({background:e,borderColor:t,borderRadius:r,borderWidth:n,className:o,component:s="div",color:l,elevation:i=0,height:f,margin:g,padding:h,width:v,...w},m)=>{const b={0:"",1:"shadow-light-1 dark:shadow-dark-1",2:"shadow-light-2 dark:shadow-dark-2",4:"shadow-light-4 dark:shadow-dark-4",8:"shadow-light-8 dark:shadow-dark-8",12:"shadow-light-12 dark:shadow-dark-12"},N=ae(l),k=ae(e),M=ae(t),L=we(h),P=we(g),x=c(r,n,b[i],P,L,N,k,M,v,f,o);return d.createElement(s,{className:x,...w,ref:m})},E=d.forwardRef(Et);E.displayName="Box";const G=({innerRef:e,forwardedRef:t})=>(d.useEffect(()=>{[e,t].forEach(r=>{r&&(typeof r=="function"?r(e.current||null):r.current=e.current||null)})},[e,t]),e);function Nt(){d.useLayoutEffect(()=>{const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>document.body.style.overflow=e},[])}const Ct=({className:e,disabled:t,endIcon:r,error:n,hint:o,label:s,name:l,onChange:i,placeholder:f,startIcon:g,value:h,...v},w)=>{const m=d.useRef(null),b=G({forwardedRef:w,innerRef:m}),[N,k]=d.useState(Boolean(h)),[M,L]=d.useState(!1);d.useEffect(()=>{var u;k(Boolean((u=b==null?void 0:b.current)==null?void 0:u.value)||Boolean(h||f))},[h,f,b]);const P=u=>{var ne;k(Boolean((ne=b==null?void 0:b.current)==null?void 0:ne.value)||Boolean(h||f)),i&&i(u)},x=()=>{t||!b.current||(b.current.focus(),L(!0))},y=()=>{L(!1)};return a.jsxs("div",{className:c(["flex items-start flex-col gap-0.5",e]),children:[a.jsxs("div",{className:c(["items-center self-stretch rounded-1 border-small border-solid cursor-text flex flex-row relative focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark",t?"bg-gray-10 dark:bg-gray-40":null,n?"border-alert dark:border-alert-dark":"border-tertiary-light dark:border-tertiary-dark"]),onClick:x,onFocus:x,children:[g?a.jsx("div",{className:"text-text-muted-light dark:text-text-muted-dark pis-1.5",children:g}):null,a.jsxs("span",{className:"relative flex flex-1 overflow-hidden",children:[a.jsx("input",{className:c(["self-stretch bg-transparent flex-auto outline-none overflow-hidden h-[56px]",g?"pis-1":"pis-2",r?"pie-1":"pie-2",s?"pbs-3 pbe-1":"pbs-2 pbe-2"]),disabled:t,id:l,onBlur:y,onChange:P,placeholder:f,ref:b,value:h,...v}),s?a.jsx("label",{className:c("items-center text-text-muted-light dark:text-text-muted-dark flex font-regular leading-loose pointer-events-none absolute top-2 select-none",g?"ltr:left-1 rtl:right-1":"ltr:left-2 rtl:right-2",M||N?"text-13 -translate-y-1.5":"text-16"),htmlFor:l,children:s}):null]}),r?a.jsx("div",{className:"text-text-muted-light dark:text-text-muted-dark pie-1.5",children:r}):null]}),n||o?a.jsxs("div",{className:"flex flex-col",children:[n?a.jsx("span",{className:"text-alert dark:text-alert-dark",children:n}):null,o?a.jsx("span",{className:"text-text-muted-light dark:text-text-muted-dark text-13 leading-default",children:o}):null]}):null]})},oe=d.forwardRef(Ct);oe.displayName="Input";const It=({children:e,className:t,...r},n)=>a.jsx("ul",{className:c(["bg-canvas-light dark:bg-canvas-secondary-dark rounded-1 py-0.5",t]),ref:n,...r,children:e}),se=d.forwardRef(It);se.displayName="List";const Lt=({children:e,className:t,disabled:r,divider:n,onClick:o,...s},l)=>{const i=f=>{o&&(f.code==="Enter"||f.key===" ")&&o()};return a.jsx("li",{className:c(["flex items-center box-border relative",n?"after:last:content-none after:absolute after:inset-x-0 after:bottom-0 after:mx-2 after:bg-gray-10 after:dark:bg-gray-40 after:h-px":null,t]),ref:l,...s,children:a.jsx("div",{className:c(["flex flex-1 py-2 gap-x-2 items-center pie-2 pis-2",o?"cursor-pointer hover:bg-gray-10 hover:dark:bg-gray-50":void 0,r?"pointer-events-none":""]),onClick:o,onKeyUp:i,onTouchEnd:o,tabIndex:o?0:void 0,children:e})})},X=d.forwardRef(Lt);X.displayName="ListItem";const Pt=({label:e,name:t,options:r,disabled:n=!1,error:o,hint:s,noOptionsText:l,onChange:i,onSelect:f,value:g,...h},v)=>{const w=d.useRef(null),[m,b]=d.useState(g),[N,k]=d.useState(!1),M=y=>{N||k(!0),!y.length&&m&&b(null),i(y)},L=y=>{f(y),i(y.label),b(y.label),k(!1)},P=d.useCallback(y=>{w.current&&!w.current.contains(y.target)&&(!m&&g&&i(""),m&&g&&i(m),k(!1))},[i,m,g]),x=d.useMemo(()=>r.filter(y=>y.label.toLowerCase().includes(g.toLowerCase()))??[],[r,g]);return d.useEffect(()=>(document.addEventListener("click",P,!0),()=>{document.removeEventListener("click",P,!0)}),[P]),a.jsxs(E,{className:"relative",ref:w,children:[a.jsx(oe,{disabled:n,endIcon:a.jsx(xe,{size:"24"}),error:o,hint:s,label:e,name:t??e,onChange:y=>{M(y.target.value)},onFocus:()=>k(!0),ref:v,value:g??"",...h}),N?a.jsx(E,{className:"absolute top-[calc(100%+1px)] w-full z-50",children:a.jsx(se,{className:"max-h-[300px] overflow-y-auto",children:x.length?x.map((y,u)=>a.jsx(X,{onClick:()=>L(y),children:y.label},`${y.value}-${u}`)):a.jsx(X,{children:l})})}):null]})},ke=d.forwardRef(Pt);ke.displayName="AutocompleteSelect";const Se={base:"font-bold",xs:"text-16 md:text-19 leading-default",sm:"text-19 md:text-23 leading-default md:leading-comfy",md:"text-23 md:text-28 leading-comfy",lg:"text-28 md:text-33 leading-comfy",xl:"text-33 md:text-40 leading-comfy",xxl:"text-33 md:text-57 leading-comfy"},J={base:"font-medium leading-default",default:"text-16 md:text-19",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19",xl:"text-23 md:text-28 tracking-tight"},le={...J,base:"font-regular leading-loose",xl:"text-23 md:text-28"},Ee={base:"font-medium leading-default tracking-wider uppercase text-text-muted-light dark:text-text-muted-dark",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19",xl:"text-23"},Ne={base:"font-regular leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Ce={base:"font-bold leading-default",xs:"text-11",sm:"text-13",md:"text-16",lg:"text-19"},Ie={base:"font-medium leading-default text-text-muted-light dark:text-text-muted-dark",sm:"text-11",md:"text-13",lg:"text-16"},Le={base:"font-regular leading-loose",md:"text-16",lg:"text-19"},Pe=({size:e,variant:t})=>{switch(t){case"headline":return c(Se.base,Se[e]);case"label":return c(J.base,e?J[e]:J.default);case"paragraph":return c(le.base,e?le[e]:le.default);case"eyebrow":return c(Ee.base,Ee[e]);case"caption":return c(Ne.base,Ne[e]);case"buttonLabel":return c(Ce.base,Ce[e]);case"fieldLabel":return c(Ie.base,Ie[e]);case"fieldTextInput":return c(Le.base,Le[e]);default:return e}},Be={primary:"font-aktiv-grotesk",secondary:"font-untitled-serif"},Bt=({className:e,component:t="p",children:r,font:n="primary",size:o,variant:s,...l},i)=>{const f="text-text-light dark:text-text-dark",g=Be[n],h=Pe({size:o,variant:s});return a.jsx(E,{className:c(f,h,g,e),component:t,ref:i,...l,children:r})},B=d.forwardRef(Bt);B.displayName="Text";const Te=({children:e,component:t="a",className:r,disabled:n,active:o,...s})=>a.jsx(B,{className:c(["font-bold text-gray-50 leading-default whitespace-nowrap",o?"underline decoration-yv-red decoration-2 underline-offset-8 text-16 leading-loose":"text-13",n?"cursor-none pointer-events-none text-text-muted-light dark:text-text-muted-dark":"",r]),component:t,...s,children:e});Te.displayName="Breadcrumb";var Tt=Object.defineProperty,Dt=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,je=(e,t,r)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jt=(e,t)=>{for(var r in t||(t={}))De.call(t,r)&&je(e,r,t[r]);if(Y)for(var r of Y(t))Me.call(t,r)&&je(e,r,t[r]);return e},zt=(e,t)=>Dt(e,Mt(t)),Ft=(e,t)=>{var r={};for(var n in e)De.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Y)for(var n of Y(e))t.indexOf(n)<0&&Me.call(e,n)&&(r[n]=e[n]);return r},Wt=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=Ft(r,["title","titleId"]);return a.jsxs("svg",zt(jt({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.293 18.707a1 1 0 0 1 0-1.414l4.94-4.94a.5.5 0 0 0 0-.707l-4.94-4.939a1 1 0 0 1 1.414-1.414l5.647 5.646a1.5 1.5 0 0 1 0 2.122l-5.647 5.646a1 1 0 0 1-1.414 0Z",fill:"currentColor"})]}))},Ot=d.forwardRef(Wt),Ht=Ot;const _t=({children:e,className:t,...r},n)=>{const o=d.Children.toArray(e),s=o.findIndex(l=>{var i;return d.isValidElement(l)?(i=l==null?void 0:l.props)==null?void 0:i.active:!1});return a.jsx("div",{className:c(["flex py-0.5 flex-row min-h-[48px] rtl:rotate-180",t]),ref:n,...r,children:o.map((l,i)=>a.jsxs("div",{className:"flex items-center",children:[i?a.jsx(Ht,{className:c(["mx-1",i>s&&"text-gray-15",i<=s&&"text-gray-25"]),size:"15"}):null,typeof l=="object"&&"type"in l?d.createElement(l.type,{...l.props,className:c([l.props.className??"",i<s?"bg-gray-10 dark:bg-gray-40 py-1 px-2 rounded-3 cursor-pointer":"px-0.5",i>s&&"[&>*]:text-gray-15 [&>*]:text-16 [&>*]:leading-loose [&>*]:font-medium","rtl:rotate-180"])}):l]},`${i}-${l.toString()}`))})},ze=d.forwardRef(_t);ze.displayName="Breadcrumbs";const Vt={lg:"lg",md:"md",sm:"sm",xl:"xl",xs:"xs"},de=e=>{switch(e){case"start":return{lg:"rounded-4 text-19 pis-[20px] pie-4 py-2",md:"rounded-3 text-xs pis-2 pie-3 py-1.5",sm:"rounded-3 text-13 pis-1.5 pie-3 py-1.5",xl:"rounded-4 text-23 pis-3 pie-4 py-2",xs:"rounded-3 text-11 pis-1 pie-2 py-1"};case"end":return{lg:"rounded-4 text-19 pie-[20px] pis-4 py-2",md:"rounded-3 text-xs pie-2 pis-3 py-1.5",sm:"rounded-3 text-13 pie-1.5 pis-3 py-1.5",xl:"rounded-4 text-23 pie-3 pis-4 py-2",xs:"rounded-3 text-11 pie-1 pis-2 py-1"};default:return{lg:"rounded-4 text-19 px-4 py-2",md:"rounded-3 text-xs px-3 py-1.5",sm:"rounded-3 text-13 px-3 py-1.5",xl:"rounded-4 text-23 px-4 py-2",xs:"rounded-3 text-11 px-2 py-1"}}},$={lg:30,md:24,sm:18,xl:36,xs:12},ie="items-center leading-default font-bold ease-in-out duration-100 focus:ring-2 focus:ring-info-light dark:focus:ring-info-dark flex w-full max-w-fit",A={all_caps:"bg-transparent text-gray-50 dark:text-white hover:text-info-light dark:hover:text-info-dark active:text-blue-40 dark:active:text-blue-20 disabled:opacity-50 disabled:text-gray-50 dark:disabled:text-white uppercase",borderless:"bg-transparent text-gray-50 dark:text-white hover:bg-gray-10 dark:hover:bg-gray-40 disabled:opacity-50 dark:disabled:bg-transparent",brand:"bg-yv-red dark:bg-yv-red-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",primary:"bg-gray-50 dark:bg-gray-10 text-white dark:text-gray-50 hover:bg-gray-40 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white",risk:"bg-orange-30 dark:bg-alert-dark text-white disabled:opacity-50 disabled:bg-gray-10 dark:disabled:bg-gray-40 disabled:text-gray-50 dark:disabled:text-white","risk:all_caps":"bg-transparent text-alert dark:text-alert-dark active:bg-gray-10 dark:active:bg-gray-40 hover:text-alert-light-hover hover:bg-white dark:hover:bg-gray-40 dark:hover:text-alert-dark-hover hover:shadow-risk-light-2 dark:hover:shadow-risk-dark-2 disabled:opacity-50 disabled:text-gray-50 dark:disabled:text-white active:shadow-none dark:active:shadow-none uppercase","risk:borderless":"bg-transparent text-alert dark:text-alert-dark active:bg-gray-10 dark:active:bg-gray-40 hover:text-alert-light-hover hover:bg-white dark:hover:bg-gray-40 dark:hover:text-alert-dark-hover hover:shadow-risk-light-2 dark:hover:shadow-risk-dark-2 disabled:opacity-50 dark:disabled:bg-transparent active:shadow-none dark:active:shadow-none","risk:stroked":"bg-transparent ring ring-2 ring-alert dark:ring-alert-dark text-alert dark:text-alert-dark hover:bg-alert dark:hover:bg-alert-dark hover:text-white dark:hover:text-white active:bg-alert dark:active:bg-alert-dark disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white hover:shadow-risk-light-2 dark:hover:shadow-risk-dark-2",secondary:"bg-gray-10 dark:bg-gray-40 text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-gray-10 disabled:text-gray-50",stroked:"bg-transparent ring ring-2 ring-gray-50 dark:ring-white text-gray-50 dark:text-white hover:bg-gray-40 dark:hover:bg-gray-10 hover:text-white dark:hover:text-gray-50 active:bg-gray-50 disabled:opacity-50 disabled:bg-transparent dark:disabled:bg-transparent disabled:text-gray-50 dark:disabled:text-white"},Fe=({className:e,children:t,disabled:r,icon:n,iconAction:o,iconPosition:s,size:l="md",type:i="button",variant:f="primary",...g},h)=>{const v=de(n!==void 0?s:void 0),w=c(ie,A[f],v[l],e);return a.jsxs("button",{className:w,disabled:r,ref:h,type:i,...g,children:[s==="start"&&n!==void 0?d.createElement(n,{className:"mr-0.5",onClick:o??void 0,size:$[l]}):null,a.jsx("span",{className:"truncate",children:t}),s==="end"&&n!==void 0?d.createElement(n,{className:"ml-0.5",onClick:o??void 0,size:$[l]}):null]})},R=d.forwardRef(Fe);R.displayName="Button";const $t=({error:e,className:t,label:r,disabled:n,name:o,...s},l)=>{const i=d.useId(),f=d.useMemo(()=>`checkbox-label-${i}`,[i]);return a.jsxs("div",{className:c(["flex items-baseline rounded-0.5 w-fit focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark",t]),children:[a.jsx("input",{"aria-labelledby":f,className:"w-1.5 h-1.5 mr-0.5 flex-none rounded-0.25 focus-within:outline-none peer",disabled:n,id:o,name:o,ref:l,type:"checkbox",...s}),r?a.jsx("div",{className:"peer-disabled:text-text-muted-light peer-disabled:dark:text-text-muted-dark text-text-light dark:text-text-dark",children:a.jsx("label",{htmlFor:o,id:f,children:r})}):null,e?a.jsx("div",{className:"text-alert-light dark:text-alert-dark text-13",children:e}):null]})},We=d.forwardRef($t);We.displayName="Checkbox";const At=({className:e,...t})=>a.jsx("hr",{...t,className:c("w-full border-gray-15 dark:border-gray-30 border-standard",e)}),Oe=({children:e,autoFocus:t=!0})=>{const r=d.useRef(null);return d.useEffect(()=>{if(r.current){const n=r.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');let o=document.activeElement;const s=n[0],l=n[n.length-1],i=h=>{if(h.key==="Tab"){if(h.shiftKey){if(document.activeElement===s)h.preventDefault(),l.focus(),o=l;else for(let v=0;v<n.length;v++)if(n[v]===document.activeElement){o=n[v-1];break}}else if(!h.shiftKey){if(document.activeElement===l)h.preventDefault(),s.focus(),o=s;else for(let v=0;v<n.length;v++)if(n[v]===document.activeElement){o=n[v+1];break}}}};t&&(()=>{if(r.current){const h=r.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');h&&h.focus()}})();const g=h=>{r.current&&!r.current.contains(h.target)&&o.focus()};return document.addEventListener("keydown",i),document.addEventListener("click",g),()=>{document.removeEventListener("keydown",i),document.removeEventListener("click",g)}}},[t]),a.jsx("div",{ref:r,children:e})},Ut=({className:e,progress:t})=>a.jsx("div",{className:c(["w-full bg-gray-15 h-2 rounded-3 overflow-hidden",e]),children:a.jsx("div",{className:"bg-blue-30 h-2 ease-in-out duration-300",style:{transitionProperty:"width",width:`${t}%`}})}),qt=({children:e,className:t,disabled:r,type:n="button",variant:o="borderless",...s},l)=>a.jsx("button",{className:c(["rounded-full inline-flex justify-center items-center p-1",t,A[o],r?"pointer-events-none":""]),disabled:r,ref:l,type:n,...s,children:e}),He=d.forwardRef(qt);He.displayName="IconButton";const Kt=({className:e,children:t,component:r="a",variant:n="borderless",...o},s)=>d.createElement(r,{...o,className:c(["rounded-full inline-flex justify-center items-center p-1 no-underline cursor-pointer",A[n],e]),ref:s},t),_e=d.forwardRef(Kt);_e.displayName="IconLinkButton";var Zt=Object.defineProperty,Gt=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Ae=(e,t,r)=>t in e?Zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jt=(e,t)=>{for(var r in t||(t={}))Ve.call(t,r)&&Ae(e,r,t[r]);if(Q)for(var r of Q(t))$e.call(t,r)&&Ae(e,r,t[r]);return e},Yt=(e,t)=>Gt(e,Xt(t)),Rt=(e,t)=>{var r={};for(var n in e)Ve.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Q)for(var n of Q(e))t.indexOf(n)<0&&$e.call(e,n)&&(r[n]=e[n]);return r},Qt=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=Rt(r,["title","titleId"]);return a.jsxs("svg",Yt(Jt({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.768 11.646a.5.5 0 0 0 0 .708l3.182 3.182a1 1 0 0 1-1.414 1.414l-3.182-3.182a.5.5 0 0 0-.708 0L8.464 16.95a1 1 0 1 1-1.414-1.414l3.182-3.182a.5.5 0 0 0 0-.708L7.05 8.464A1 1 0 0 1 8.464 7.05l3.182 3.182a.5.5 0 0 0 .707 0l3.183-3.182a1 1 0 1 1 1.414 1.414l-3.182 3.182Z",fill:"currentColor"})]}))},er=d.forwardRef(Qt),tr=er,rr=Object.defineProperty,nr=Object.defineProperties,ar=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Ke=(e,t,r)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,or=(e,t)=>{for(var r in t||(t={}))Ue.call(t,r)&&Ke(e,r,t[r]);if(ee)for(var r of ee(t))qe.call(t,r)&&Ke(e,r,t[r]);return e},sr=(e,t)=>nr(e,ar(t)),lr=(e,t)=>{var r={};for(var n in e)Ue.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ee)for(var n of ee(e))t.indexOf(n)<0&&qe.call(e,n)&&(r[n]=e[n]);return r},dr=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=lr(r,["title","titleId"]);return a.jsxs("svg",sr(or({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{d:"M9.346 14.272c.15.228.499.228 1.194.228h5.628c.81 0 1.215 0 1.36-.262.145-.261-.07-.605-.5-1.292l-.667-1.068c-.386-.618-.58-.928-.861-.928s-.475.31-.861.928l-.453.724-1.252-2.924c-.4-.931-.6-1.397-.934-1.397-.335 0-.534.466-.934 1.397l-1.46 3.406c-.273.64-.41.96-.26 1.188ZM18 7a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",fill:"currentColor"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.879 3.379C6 4.257 6 5.672 6 8.5v3c0 2.828 0 4.243.879 5.121.878.879 2.293.879 5.121.879h3c2.828 0 4.243 0 5.121-.879C21 15.743 21 14.328 21 11.5v-3c0-2.828 0-4.243-.879-5.121C19.243 2.5 17.828 2.5 15 2.5h-3c-2.828 0-4.243 0-5.121.879ZM18.02 4.623c-.65-.087-1.55-.092-3.021-.092h-3c-1.472 0-2.371.005-3.021.092-.301.04-.466.09-.554.126a.292.292 0 0 0-.11.066.292.292 0 0 0-.066.11 2.313 2.313 0 0 0-.126.554c-.087.65-.092 1.55-.092 3.021v3c0 1.472.005 2.371.092 3.021.04.301.09.466.126.554.03.072.05.095.066.11a.292.292 0 0 0 .11.066c.088.036.253.085.554.126.65.087 1.55.092 3.021.092h3c1.472 0 2.371-.005 3.021-.092.301-.04.466-.09.554-.126a.292.292 0 0 0 .11-.066.292.292 0 0 0 .066-.11c.036-.088.085-.253.126-.554.087-.65.092-1.55.092-3.021v-3c0-1.472-.005-2.371-.092-3.021a2.313 2.313 0 0 0-.126-.554.292.292 0 0 0-.066-.11.292.292 0 0 0-.11-.066 2.313 2.313 0 0 0-.554-.126Z",fill:"currentColor"}),a.jsx("path",{d:"M2 8.5c0-1 1-2 2-2v9a4 4 0 0 0 4 4h9c0 1-.887 2-2 2H8a6 6 0 0 1-6-6v-7Z",fill:"currentColor"})]}))},ir=d.forwardRef(dr),cr=ir,ur=Object.defineProperty,fr=Object.defineProperties,pr=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Xe=(e,t,r)=>t in e?ur(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gr=(e,t)=>{for(var r in t||(t={}))Ze.call(t,r)&&Xe(e,r,t[r]);if(te)for(var r of te(t))Ge.call(t,r)&&Xe(e,r,t[r]);return e},br=(e,t)=>fr(e,pr(t)),hr=(e,t)=>{var r={};for(var n in e)Ze.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&te)for(var n of te(e))t.indexOf(n)<0&&Ge.call(e,n)&&(r[n]=e[n]);return r},mr=(e,t)=>{var r=e,{title:n,titleId:o}=r,s=hr(r,["title","titleId"]);return a.jsxs("svg",br(gr({width:s.size||"24",height:s.size||"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":o},s),{children:[n?a.jsx("title",{id:o,children:n}):null,a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 4a1 1 0 0 1 1-1 9 9 0 0 1 9 9 1 1 0 1 1-2 0 7.001 7.001 0 0 0-7-7 1 1 0 0 1-1-1Z",fill:"currentColor",children:a.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 12 12",to:"360 12 12",dur:s.dur,repeatCount:"indefinite"})})]}))},yr=d.forwardRef(mr),vr=yr;const xr={1:"h1",2:"h2",3:"h3",4:"h4"},wr=({className:e,children:t,font:r="primary",level:n=1,size:o,variant:s,...l},i)=>{const f="text-text-light dark:text-text-dark",g=Be[r],h=Pe({size:o,variant:s});return a.jsx(E,{className:c(f,h,g,e),component:xr[n],ref:i,...l,children:t})},Je=d.forwardRef(wr);Je.displayName="Heading";const kr=({acceptedFileTypes:e=["image/*"],changeImageButtonLabel:t="Change",chooseImageButtonLabel:r="Choose Image",className:n,disabled:o=!1,dismissCallback:s,dismissImageAriaLabel:l="Remove Image",error:i="",fileMaxKbSizeError:f=(C,be)=>`${C} is too big to upload, the maximum size is ${be}kb. Please try again.`,fileMaxSizeError:g=C=>`${C} is too large to upload. The maximum dimensions are ${u==null?void 0:u.maxWidth}x${u==null?void 0:u.maxHeight}. Please try again.`,fileMinSizeError:h=C=>`${C} is too small to upload. The minimum dimensions are ${u==null?void 0:u.minWidth}x${u==null?void 0:u.minHeight}. Please try again.`,fileRatioError:v=C=>`${C} must have a ratio of, ${u==null?void 0:u.imageRatio}. Please try again.`,fileCallback:w,hero:m=!1,hint:b,imageWidth:N=160,imageSrc:k,label:M="Upload Image",name:L="imageUpload",onBlur:P,preProcessing:x,shape:y="circle",validation:u},ne)=>{const C=d.useRef(null),be=G({forwardedRef:ne,innerRef:C}),[S,V]=d.useState(void 0),[j,z]=d.useState(k?"resolved":"idle"),[he,q]=d.useState(i),hn=()=>C!=null&&C.current?C.current.click():void 0,gt=d.useMemo(()=>S&&j!=="rejected"?(z("resolved"),S.imageSrc):k&&j==="resolved"?(z("resolved"),k):null,[S,k,j]),mn=d.useMemo(()=>{const T=()=>{s&&s(k),V(void 0),z("idle")};switch(j){case"pending":return a.jsx(E,{className:"animate-spin",children:a.jsx(vr,{className:"text-info-light dark:text-info-dark","data-testid":"loading spinner",size:"32"})});case"resolved":return a.jsxs(a.Fragment,{children:[a.jsx("img",{alt:`${S==null?void 0:S.id} preview`,className:c(["object-fit w-full h-full",y==="circle"?"rounded-full":"rounded-0.5",y!=="unset"||!m?"aspect-square":"",y==="unset"&&m?"aspect-video":"",y==="unset"&&!m?"!aspect-auto":""]),onLoad:()=>S!=null&&S.imageSrc?URL.revokeObjectURL(S.imageSrc):void 0,src:gt||void 0,width:N}),o?null:a.jsx(R,{"aria-label":l,className:"absolute -top-0.5 -right-0.5 rounded-3 !p-0 !text-text-muted-light dark:text-text-muted-dark bg-white dark:bg-gray-40 dark:hover:bg-white dark:hover:!text-gray-45 hover:!text-white shadow-light-1 dark:shadow-dark-1","data-testid":"remove image",onClick:T,children:a.jsx(tr,{})})]});default:return a.jsx(E,{className:"gray-10 dark:gray-30",children:a.jsx(cr,{"data-testid":"placeholder image",size:"32"})})}},[o,s,l,m,S==null?void 0:S.id,S==null?void 0:S.imageSrc,k,j,N,gt,y]),yn=({file:T,imageUrl:W})=>new Promise((O,H)=>{var bt;const I=new Image,K=(bt=u==null?void 0:u.imageRatio)==null?void 0:bt.split("/");I.onload=async()=>{if(u)if(u!=null&&u.maxByteSize&&T.size>u.maxByteSize){V(void 0),z("rejected");const En=f(T.name,Math.round(u.maxByteSize/1e3));return q(En),H(!1)}else{if(u!=null&&u.minWidth&&I.width<(u==null?void 0:u.minWidth)||u!=null&&u.minHeight&&I.height<(u==null?void 0:u.minHeight))return V(void 0),z("rejected"),q(h(T.name)),H(!1);if(u!=null&&u.maxHeight&&I.height>(u==null?void 0:u.maxHeight)||u!=null&&u.maxWidth&&I.width>(u==null?void 0:u.maxWidth))return V(void 0),z("rejected"),q(g(T.name)),H(!1);if(u!=null&&u.imageRatio&&(K==null?void 0:K.length)===2&&parseInt(K[0])/parseInt(K[1])!==I.width/I.height)return V(void 0),z("rejected"),q(v(T.name)),H(!1)}return N=I.width,typeof w=="function"&&(console.log("Callback"),await w(T,I)),q(""),O(!0)},I.src=W}),vn=async T=>{try{const{files:W}=T.target;if(W){const O=W[0],H=URL.createObjectURL(O);let I=!0;z("pending"),x&&await x(O),I=await yn({file:O,imageUrl:H}),I&&(V({file:O,id:O.name,imageSrc:H}),z("resolved"))}}catch(W){if(W instanceof Error)throw W}},xn=c([y==="circle"&&!m?"rounded-full aspect-square":""]),wn=c([y==="square"&&!m?"aspect-square rounded-1":""]),kn=c([y==="unset"&&!m?"rounded-1":"",y==="unset"&&j!=="idle"&&!m?"aspect-auto":"",y==="unset"&&j!=="resolved"&&!m?"aspect-square":""]),Sn=c([m?"rounded-1 aspect-video":""]);return a.jsxs(E,{className:c([n]),children:[a.jsxs(E,{className:c(["relative border-small border-solid rounded-1 mb-0.5 pt-1 pb-2 px-2 text-text-muted-light dark:text-text-muted-dark",,he?"border-alert-light dark:border-alert-dark":"border-tertiary-light dark:border-tertiary-dark",o?"select-none bg-gray-10 dark:bg-gray-40 pointer-events-none":""]),children:[a.jsx(B,{className:"pb-1.5 text-text-muted-light dark:text-text-muted-dark",children:a.jsx("label",{htmlFor:L,children:M})}),a.jsxs(E,{className:"flex relative flex-wrap justify-center md:justify-start",children:[a.jsx(E,{className:c(["flex justify-center items-center relative mbe-2 md:mbe-0 md:mie-2",m?"w-full":"md:w-1/2 w-4/5",o?"border-small border-solid border-tertiary-light":"",j!=="resolved"?"bg-gray-10 dark:bg-gray-3":"",xn,wn,kn,Sn]),children:mn}),a.jsx(R,{className:c(["my-auto !ring-gray-15 dark:!ring-gray-30 !ring-1 disabled:!bg-gray-15 disabled:!ring-none",m?"!mbs-2":""]),disabled:o,onClick:hn,size:"sm",variant:"stroked",children:j==="resolved"?t:r}),a.jsx("input",{accept:e.toString(),className:"hidden",disabled:o,id:L,name:L,onBlur:P,onChange:vn,ref:be,title:"",type:"file",value:""})]})]}),he?a.jsx(B,{className:"dark:!text-alert-dark !text-alert-light text-13",children:he}):null,b?a.jsx(B,{className:"text-text-muted-light dark:text-text-muted-dark text-13",children:b}):null]})},Ye=d.forwardRef(kr);Ye.displayName="ImageUpload";const Re=({className:e,children:t,component:r="a",icon:n,iconPosition:o,variant:s="primary",size:l="md",...i},f)=>{const g=de(n!==void 0?o:void 0),h=({children:v})=>d.createElement(r,{...i,className:c([ie,A[s],g[l],"no-underline cursor-pointer",e]),ref:f},v);return a.jsxs(h,{children:[o==="start"&&n!==void 0?d.createElement(n,{className:"mr-0.5 min-w-min",size:$[l]}):null,d.createElement("span",{className:"truncate"},t),o==="end"&&n!==void 0?d.createElement(n,{className:"ml-0.5 min-w-min",size:$[l]}):null]})},Qe=d.forwardRef(Re);Qe.displayName="LinkButton";function Sr({children:e,className:t,position:r}){let n="";return r&&(r==="start"?n="order-first":n="order-last"),a.jsx("div",{className:c("flex gap-1",n,t),children:e})}function Er({children:e,className:t}){return a.jsx("div",{className:c("flex-grow",t),children:e})}const Nr=({children:e,className:t,endText:r,endTextProps:n,size:o="sm",subHeadline:s,subHeadlineProps:l})=>a.jsxs("div",{className:c(["flex items-center justify-between break-words",t]),children:[a.jsxs("div",{className:"flex flex-col",children:[a.jsx(B,{size:o,variant:"label",children:e}),s?a.jsx(B,{...l,children:s}):null]}),r?a.jsx(B,{...n,children:r}):null]}),Cr=({children:e,className:t,...r})=>a.jsx("div",{className:c(["relative",t]),...r,children:e}),Ir=typeof window<"u"?d.useLayoutEffect:()=>{};let U=new Map,et=new Set;function tt(){if(typeof window>"u")return;let e=r=>{let n=U.get(r.target);n||(n=new Set,U.set(r.target,n),r.target.addEventListener("transitioncancel",t)),n.add(r.propertyName)},t=r=>{let n=U.get(r.target);if(n&&(n.delete(r.propertyName),n.size===0&&(r.target.removeEventListener("transitioncancel",t),U.delete(r.target)),U.size===0)){for(let o of et)o();et.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?tt():document.addEventListener("DOMContentLoaded",tt));function Lr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function Pr(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Br(){return Pr(/^Mac/i)}function Tr(){return Lr(/Android/i)}function Dr(e){return e.mozInputSource===0&&e.isTrusted?!0:Tr()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mr=d.createContext(null);Mr.displayName="PressResponderContext";class jr{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=t}}function zr(e){let t=d.useRef({isFocused:!1,onBlur:e,observer:null});return t.current.onBlur=e,Ir(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r.target,o=s=>{var l,i;t.current.isFocused=!1,n.disabled&&((i=(l=t.current).onBlur)===null||i===void 0||i.call(l,new jr("blur",s))),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};n.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{t.current.isFocused&&n.disabled&&(t.current.observer.disconnect(),n.dispatchEvent(new FocusEvent("blur")),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))}),t.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[])}let Fr=new Set,rt=!1,F=!1,ue=!1;function fe(e,t){for(let r of Fr)r(e,t)}function Wr(e){return!(e.metaKey||!Br()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function nt(e){F=!0,Wr(e)&&fe("keyboard",e)}function _(e){(e.type==="mousedown"||e.type==="pointerdown")&&(F=!0,fe("pointer",e))}function Or(e){Dr(e)&&(F=!0)}function Hr(e){e.target===window||e.target===document||(!F&&!ue&&fe("virtual",e),F=!1,ue=!1)}function _r(){F=!1,ue=!0}function at(){if(typeof window>"u"||rt)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){F=!0,e.apply(this,arguments)},document.addEventListener("keydown",nt,!0),document.addEventListener("keyup",nt,!0),document.addEventListener("click",Or,!0),window.addEventListener("focus",Hr,!0),window.addEventListener("blur",_r,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",_,!0),document.addEventListener("pointermove",_,!0),document.addEventListener("pointerup",_,!0)):(document.addEventListener("mousedown",_,!0),document.addEventListener("mousemove",_,!0),document.addEventListener("mouseup",_,!0)),rt=!0}typeof document<"u"&&(document.readyState!=="loading"?at():document.addEventListener("DOMContentLoaded",at));function Vr(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,s=d.useRef({isFocusWithin:!1}),l=d.useCallback(g=>{s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,r&&r(g),o&&o(!1))},[r,o,s]),i=zr(l),f=d.useCallback(g=>{!s.current.isFocusWithin&&document.activeElement===g.target&&(n&&n(g),o&&o(!0),s.current.isFocusWithin=!0,i(g))},[n,o,i]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:f,onBlur:l}}}function $r(e){let{ref:t,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=e,l=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:o}).current;l.onInteractOutside=r,l.onInteractOutsideStart=o,d.useEffect(()=>{if(n)return;let i=f=>{re(f,t)&&l.onInteractOutside&&(l.onInteractOutsideStart&&l.onInteractOutsideStart(f),l.isPointerDown=!0)};if(typeof PointerEvent<"u"){let f=g=>{l.isPointerDown&&l.onInteractOutside&&re(g,t)&&l.onInteractOutside(g),l.isPointerDown=!1};return document.addEventListener("pointerdown",i,!0),document.addEventListener("pointerup",f,!0),()=>{document.removeEventListener("pointerdown",i,!0),document.removeEventListener("pointerup",f,!0)}}else{let f=h=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&l.onInteractOutside&&re(h,t)&&l.onInteractOutside(h),l.isPointerDown=!1},g=h=>{l.ignoreEmulatedMouseEvents=!0,l.onInteractOutside&&l.isPointerDown&&re(h,t)&&l.onInteractOutside(h),l.isPointerDown=!1};return document.addEventListener("mousedown",i,!0),document.addEventListener("mouseup",f,!0),document.addEventListener("touchstart",i,!0),document.addEventListener("touchend",g,!0),()=>{document.removeEventListener("mousedown",i,!0),document.removeEventListener("mouseup",f,!0),document.removeEventListener("touchstart",i,!0),document.removeEventListener("touchend",g,!0)}}},[t,l,n])}function re(e,t){if(e.button>0)return!1;if(e.target){const r=e.target.ownerDocument;if(!r||!r.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}let Ar=null;function ot(e,t){return t.some(r=>r.contains(e))}function Ur(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of lt.traverse(lt.getTreeNode(t)))if(ot(e,r.current))return!0;return!1}function qr(e){return Ur(e,Ar)}class pe{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,r,n){let o=this.fastMap.get(r??null),s=new st({scopeRef:t});o.addChild(s),s.parent=o,this.fastMap.set(t,s),n&&(s.nodeToRestore=n)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let r=this.fastMap.get(t),n=r.parent;for(let s of this.traverse())s!==r&&r.nodeToRestore&&s.nodeToRestore&&r.scopeRef.current&&ot(s.nodeToRestore,r.scopeRef.current)&&(s.nodeToRestore=r.nodeToRestore);let o=r.children;n.removeChild(r),o.size>0&&o.forEach(s=>n.addChild(s)),this.fastMap.delete(r.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let r of t.children)yield*this.traverse(r)}clone(){let t=new pe;for(let r of this.traverse())t.addTreeNode(r.scopeRef,r.parent.scopeRef,r.nodeToRestore);return t}constructor(){ce(this,"fastMap",new Map),this.root=new st({scopeRef:null}),this.fastMap.set(null,this.root)}}class st{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){ce(this,"children",new Set),ce(this,"contain",!1),this.scopeRef=t.scopeRef}}let lt=new pe;const D=[];function Kr(e,t){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:s=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:i}=e;d.useEffect(()=>(o&&D.push(t),()=>{let b=D.indexOf(t);b>=0&&D.splice(b,1)}),[o,t]);let f=()=>{D[D.length-1]===t&&r&&r()},g=b=>{(!i||i(b.target))&&D[D.length-1]===t&&(b.stopPropagation(),b.preventDefault())},h=b=>{(!i||i(b.target))&&(D[D.length-1]===t&&(b.stopPropagation(),b.preventDefault()),f())},v=b=>{b.key==="Escape"&&!l&&(b.stopPropagation(),b.preventDefault(),f())};$r({ref:t,onInteractOutside:s?h:null,onInteractOutsideStart:g});let{focusWithinProps:w}=Vr({isDisabled:!n,onBlurWithin:b=>{b.relatedTarget&&qr(b.relatedTarget)||(!i||i(b.relatedTarget))&&r()}}),m=b=>{b.target===b.currentTarget&&b.preventDefault()};return{overlayProps:{onKeyDown:v,...w},underlayProps:{onPointerDown:m}}}const Zr=({align:e,children:t,className:r,...n})=>{const o=d.useMemo(()=>{const{horizontal:s,vertical:l}=e,i={center:"left-1/2",end:"inline-end-0",start:"inline-start-0"},f={bottom:"",top:"bottom-full"};return`${i[s]} ${f[l]}`},[e]);return a.jsx("div",{className:c(["absolute shadow-light-2 dark:shadow-dark-2 rounded-1 bg-canvas-light dark:bg-overlay-body-dark mb-0.5 w-max overflow-y-scroll min-h-[200px] max-h-[400px] scrollbar-hide z-10",o,r]),...n,children:t})},Gr=({open:e,children:t})=>a.jsx(a.Fragment,{children:e?t:null}),Xr=({align:e={horizontal:"start",vertical:"bottom"},autoFocus:t=!0,children:r,className:n,isDismissible:o,isOpen:s,onClose:l,...i})=>{const f=d.useRef(null),{overlayProps:g}=Kr({isDismissable:o,isKeyboardDismissDisabled:!o,isOpen:s,onClose:l},f);return a.jsx(Gr,{open:s,children:a.jsx(Oe,{autoFocus:t,children:a.jsx(Zr,{align:e,className:n,onClose:l,...i,children:a.jsx("div",{ref:f,...g,onClick:l,children:r})})})})},Jr=({onToggle:e,children:t,className:r,disabled:n})=>{const o=i=>{i.preventDefault(),i.stopPropagation(),e()},s=d.useRef(null),l=d.cloneElement(t,{className:r,disabled:n,onClick:o,ref:s});return a.jsx(a.Fragment,{children:l})},Yr=(e,t)=>{const{children:r,error:n,hint:o,label:s}=e;return a.jsxs("div",{...e,className:"flex-col rounded-0.5 w-fit",ref:t,children:[a.jsx("label",{children:s}),n?a.jsx("p",{className:"text-alert-light dark:text-alert-dark text-13",children:n}):null,o?a.jsx("p",{className:"text-13 text-gray-25 dark:text-gray-20",children:o}):null,r]})},dt=d.forwardRef(Yr);dt.displayName="Radio Set";const Rr=({children:e,disabled:t,name:r,value:n,...o},s)=>a.jsxs("div",{className:"flex items-baseline rounded-0.5 w-fit focus-within:border-transparent focus-within:outline-2 focus-within:outline-info focus-within:outline focus-within:dark:border-transparent focus-within:dark:outline-info-dark",children:[a.jsx("input",{className:"w-1.5 h-1.5 mr-0.5 flex-none rounded-0.25 focus-within:outline-none peer display: inline",disabled:t,id:r,name:r,ref:s,...o,type:"radio",value:n}),a.jsx("label",{className:"peer-disabled:text-text-muted-light peer-disabled:dark:text-text-muted-dark text-text-light dark:text-text-dark",htmlFor:"name",children:e})]}),it=d.forwardRef(Rr);it.displayName="RadioSetItem";const Qr=({...e})=>a.jsx("option",{...e}),ct="_select_1dwiy_1",Nn={select:ct},en="appearance-none outline-none bg-transparent disabled:bg-gray-10 dark:disabled:bg-gray-40 rounded-1 border-solid border-small font-aktiv-grotesk text-16 leading-loose p-2 w-full mlb-0",tn="border-alert-light dark:border-alert-dark",rn="border-tertiary-light dark:border-tertiary-dark",ge="text-text-muted-light dark:text-text-muted-dark",ut=c(ge,"font-aktiv-grotesk font-medium text-13 absolute inline-start-2 block-start-2 pointer-events-none opacity-0 h-1.5"),nn="-translate-y-1 opacity-100",an="text-overlay-text dark:text-text-dark",on="!pbs-3 !pbe-1",sn="absolute block-end-2 inline-end-1.5 leading-0 pointer-events-none text-text-muted-light dark:text-text-muted-dark",ln=({children:e,className:t,disabled:r=!1,error:n,hint:o,label:s,name:l,onChange:i,value:f,...g},h)=>{var P;const v=c(ct,en),w=d.useRef(null),m=G({forwardedRef:h,innerRef:w}),[b,N]=d.useState(Boolean(f||((P=m==null?void 0:m.current)==null?void 0:P.value)));d.useEffect(()=>{var x;N(Boolean(((x=m==null?void 0:m.current)==null?void 0:x.value)||f))},[f,m]);const k=d.useMemo(()=>{const x=c(v,an,s?on:null),y=c(v,ge);return b?x:y},[v,b,s]),M=d.useMemo(()=>{const x=c(ut,nn),y=c(ut);return b?x:y},[b]),L=x=>{var y;N(Boolean(((y=m==null?void 0:m.current)==null?void 0:y.value)||f)),i&&i(x)};return a.jsxs("div",{className:c(t),children:[a.jsxs("div",{className:c("relative w-full border-none"),children:[a.jsx("select",{...g,className:c([k,n?tn:rn]),disabled:r,id:l,name:l,onChange:L,ref:m,value:f,children:e}),a.jsx("label",{className:M,htmlFor:l,children:s}),a.jsx("div",{className:sn,children:a.jsx(xe,{size:"24"})})]}),n||o?a.jsxs("div",{className:"mbs-0.5",children:[n?a.jsx("p",{className:"text-alert-light dark:text-alert-dark text-13 m-0",children:n}):null,o?a.jsx("p",{className:c(ge,"text-13 m-0"),children:o}):null]}):null]})},dn=d.forwardRef(ln),cn={default:"bg-gray-10 dark:bg-gray-40 text-light dark:text-dark",secondary:"bg-gray-10 dark:bg-gray-35 text-light dark:text-dark",error:"bg-orange-10 dark:bg-orange-50 text-orange-40 dark:text-orange-20",info:"bg-blue-10 dark:bg-blue-50 text-blue-40, dark:text-blue-20",success:"bg-green-10, dark:bg-green-50 text-green-40 dark:text-green-20",caution:"bg-yellow-10 dark:bg-yellow-50 text-yellow-40 dark:text-yellow-20"},un={sm:"text-11 w-fit rounded-0.5 plb-0.25 pli-0.5",lg:"text-16 w-fit rounded-0.5 plb-0.5 pli-1"},fn=({message:e,variant:t="default",size:r="sm",className:n})=>{const o=cn[t],s=un[r];return a.jsx(E,{className:c(o,s,n),children:a.jsx(B,{children:e})})},pn={inputIcon:"_inputIcon_1pzdd_1"},gn=({className:e,error:t,name:r,...n},o)=>a.jsxs(a.Fragment,{children:[a.jsx("input",{className:c(["rounded-1 text-black dark:text-white p-2 border-small border-tertiary-light dark:border-tertiary-dark hover:cursor-pointer bg-transparent disabled:bg-gray-10 disabled:dark:bg-gray-40 disabled:cursor-auto",pn.inputIcon,e]),id:r,name:r,ref:o,role:"textbox",type:"time",...n}),t?a.jsx("div",{className:"text-alert-light dark:text-alert-dark text-13",children:t}):null]}),ft=d.forwardRef(gn);ft.displayName="TimePicker";const pt={tooltipWrapper:"_tooltipWrapper_qu88w_1",tooltipContent:"_tooltipContent_qu88w_18"},bn=({content:e,className:t,...r})=>a.jsx("div",{className:c(pt.tooltipWrapper,t),...r,children:a.jsx("span",{className:pt.tooltipContent,children:e})});p.AutocompleteSelect=ke,p.Box=E,p.Breadcrumb=Te,p.Breadcrumbs=ze,p.Button=R,p.ButtonComponent=Fe,p.Checkbox=We,p.Divider=At,p.FocusTrap=Oe,p.Heading=Je,p.HorizontalLoader=Ut,p.IconButton=He,p.IconLinkButton=_e,p.ImageUpload=Ye,p.Input=oe,p.LinkButton=Qe,p.LinkButtonComponent=Re,p.List=se,p.ListItem=X,p.ListItemActions=Sr,p.ListItemContent=Er,p.ListItemText=Nr,p.Option=Qr,p.Popover=Cr,p.PopoverBody=Xr,p.PopoverTrigger=Jr,p.RadioSet=dt,p.RadioSetItem=it,p.Select=dn,p.Tag=fn,p.Text=B,p.TimePicker=ft,p.Tooltip=bn,p.buttonSizeOptions=Vt,p.defaultButtonClasses=ie,p.determineSizeClasses=de,p.iconSizes=$,p.useCombinedRefs=G,p.useLockBodyScroll=Nt,p.variantClasses=A,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/design-system-components",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@react-aria/overlays": "3.14.0",
25
- "@youversion/design-system-core": "0.1.0",
25
+ "@youversion/design-system-core": "0.1.1",
26
26
  "@youversion/design-system-icons": "0.0.10",
27
27
  "@youversion/design-system-tokens": "0.0.6",
28
28
  "clsx": "1.2.1"