@youversion/design-system-components 0.5.3 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 5d05213: Adjusted styles for the LinkButton and Button components
8
+
9
+ ## 0.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - cafa647: Create the Tab component
14
+
3
15
  ## 0.5.3
4
16
 
5
17
  ### Patch Changes
@@ -21,7 +21,7 @@ export declare const iconSizes: {
21
21
  readonly xl: 36;
22
22
  readonly xs: 12;
23
23
  };
24
- export declare const defaultButtonClasses = "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";
24
+ export declare const defaultButtonClasses = "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 h-fit";
25
25
  export declare const variantClasses: {
26
26
  readonly 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";
27
27
  readonly 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";
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,WAAW,EAAE,YAAY,EAAc,MAAM,OAAO,CAAC;AAEhG,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAC;AAEX,eAAO,MAAM,oBAAoB,iBAAkB,YAAY;;;;;;CA2B9D,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;CAMZ,CAAC;AAEX,eAAO,MAAM,oBAAoB,uJACqH,CAAC;AAEvJ,eAAO,MAAM,cAAc;;;;;;;;;;;CAqBjB,CAAC;AAEX,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACzF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,OAAO,cAAc,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,UAAU,GAAG,eAAe,CAAC;CACxC;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,eAAe,oGAYvB,WAAW,OACT,aAAa,iBAAiB,CAAC,gBAwBrC,CAAC;AAEF,eAAO,MAAM,MAAM,2GAA8B,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,WAAW,EAAE,YAAY,EAAc,MAAM,OAAO,CAAC;AAEhG,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAC;AAEX,eAAO,MAAM,oBAAoB,iBAAkB,YAAY;;;;;;CA2B9D,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;CAMZ,CAAC;AAEX,eAAO,MAAM,oBAAoB,6JAC2H,CAAC;AAE7J,eAAO,MAAM,cAAc;;;;;;;;;;;CAqBjB,CAAC;AAEX,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACzF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,OAAO,cAAc,EAAE,UAAU,GAAG,eAAe,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,UAAU,GAAG,eAAe,CAAC;CACxC;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,eAAe,oGAYvB,WAAW,OACT,aAAa,iBAAiB,CAAC,gBAwBrC,CAAC;AAEF,eAAO,MAAM,MAAM,2GAA8B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { AllHTMLAttributes } from 'react';
2
+ import { TypographyProps } from '../Typography/Typography';
3
+ type NativeAnchorProps = AllHTMLAttributes<HTMLAnchorElement>;
4
+ interface Props extends NativeAnchorProps {
5
+ active: boolean;
6
+ href: string;
7
+ }
8
+ export declare function Tab({ active, children, component, className, href }: Props & TypographyProps): JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=Tab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/Tab/Tab.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAE9D,UAAU,KAAM,SAAQ,iBAAiB;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAe,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,KAAK,GAAG,eAAe,eAgBlG"}
@@ -0,0 +1,2 @@
1
+ export { Tab } from './Tab';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Tab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,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 './Tab';
25
26
  export * from './Tag';
26
27
  export * from './TimePicker';
27
28
  export * from './Tooltip';
@@ -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,OAAO,CAAC;AACtB,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,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 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
- import c from "clsx";
2
+ import He, { forwardRef as y, createElement as j, useEffect as A, useLayoutEffect as ht, useRef as B, useState as W, useCallback as Y, useMemo as V, Children as xt, isValidElement as yt, useId as vt, cloneElement as wt } from "react";
3
+ import d from "clsx";
4
4
  import "react-dom";
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) => {
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) => {
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, St(t)), Et = (e, t) => {
12
+ }, Ot = (e, t) => $t(e, Nt(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,19 +19,19 @@ var kt = Object.defineProperty, $t = Object.defineProperties, St = 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(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" })] }));
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" })] }));
23
23
  }, It = y(Lt), Ke = It;
24
24
  const ce = (e) => {
25
25
  if (e) {
26
26
  if (typeof e != "string" && e)
27
- return c(e.lightMode, e.darkMode);
27
+ return d(e.lightMode, e.darkMode);
28
28
  if (typeof e == "string")
29
29
  return e;
30
30
  }
31
31
  }, $e = (e) => {
32
32
  if (e) {
33
33
  if (typeof e != "string" && e)
34
- return c(e.block, e.blockEnd, e.blockStart, e.inline, e.inlineEnd, e.inlineStart);
34
+ return d(e.block, e.blockEnd, e.blockStart, e.inline, e.inlineEnd, e.inlineStart);
35
35
  if (typeof e == "string")
36
36
  return e;
37
37
  }
@@ -57,20 +57,20 @@ 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
- }, S = ce(s), k = ce(e), B = ce(t), E = $e(m), L = $e(f), v = c(
60
+ }, N = ce(s), k = ce(e), T = ce(t), E = $e(m), L = $e(f), v = d(
61
61
  r,
62
62
  n,
63
63
  p[i],
64
64
  L,
65
65
  E,
66
- S,
66
+ N,
67
67
  k,
68
- B,
68
+ T,
69
69
  h,
70
70
  u,
71
71
  a
72
72
  );
73
- return R(o, {
73
+ return j(o, {
74
74
  className: v,
75
75
  ...w,
76
76
  ref: g
@@ -102,24 +102,24 @@ const Pt = ({
102
102
  value: m,
103
103
  ...h
104
104
  }, w) => {
105
- const g = P(null), p = he({ forwardedRef: w, innerRef: g }), [S, k] = W(Boolean(m)), [B, E] = W(!1);
105
+ const g = B(null), p = he({ forwardedRef: w, innerRef: g }), [N, k] = W(Boolean(m)), [T, E] = W(!1);
106
106
  A(() => {
107
- var d;
108
- k(Boolean((d = p == null ? void 0 : p.current) == null ? void 0 : d.value) || Boolean(m || u));
107
+ var c;
108
+ k(Boolean((c = p == null ? void 0 : p.current) == null ? void 0 : c.value) || Boolean(m || u));
109
109
  }, [m, u, p]);
110
- const L = (d) => {
110
+ const L = (c) => {
111
111
  var Q;
112
- k(Boolean((Q = p == null ? void 0 : p.current) == null ? void 0 : Q.value) || Boolean(m || u)), i && i(d);
112
+ k(Boolean((Q = p == null ? void 0 : p.current) == null ? void 0 : Q.value) || Boolean(m || u)), i && i(c);
113
113
  }, v = () => {
114
114
  t || !p.current || (p.current.focus(), E(!0));
115
115
  }, b = () => {
116
116
  E(!1);
117
117
  };
118
- return /* @__PURE__ */ x("div", { className: c(["flex items-start flex-col gap-0.5", e]), children: [
118
+ return /* @__PURE__ */ x("div", { className: d(["flex items-start flex-col gap-0.5", e]), children: [
119
119
  /* @__PURE__ */ x(
120
120
  "div",
121
121
  {
122
- className: c([
122
+ className: d([
123
123
  "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",
124
124
  t ? "bg-gray-10 dark:bg-gray-40" : null,
125
125
  n ? "border-alert dark:border-alert-dark" : "border-tertiary-light dark:border-tertiary-dark"
@@ -132,7 +132,7 @@ const Pt = ({
132
132
  /* @__PURE__ */ l(
133
133
  "input",
134
134
  {
135
- className: c([
135
+ className: d([
136
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",
@@ -151,10 +151,10 @@ const Pt = ({
151
151
  o ? /* @__PURE__ */ l(
152
152
  "label",
153
153
  {
154
- className: c(
154
+ className: d(
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 || S ? "text-13 -translate-y-1.5" : "text-16"
157
+ T || N ? "text-13 -translate-y-1.5" : "text-16"
158
158
  ),
159
159
  htmlFor: s,
160
160
  children: o
@@ -175,7 +175,7 @@ qe.displayName = "Input";
175
175
  const Bt = ({ children: e, className: t, ...r }, n) => /* @__PURE__ */ l(
176
176
  "ul",
177
177
  {
178
- className: c(["bg-canvas-light dark:bg-canvas-secondary-dark rounded-1 py-0.5", t]),
178
+ className: d(["bg-canvas-light dark:bg-canvas-secondary-dark rounded-1 py-0.5", t]),
179
179
  ref: n,
180
180
  ...r,
181
181
  children: e
@@ -189,7 +189,7 @@ const Tt = ({ children: e, className: t, disabled: r, divider: n, onClick: a, ..
189
189
  return /* @__PURE__ */ l(
190
190
  "li",
191
191
  {
192
- className: c([
192
+ className: d([
193
193
  "flex items-center box-border relative",
194
194
  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,
195
195
  t
@@ -199,7 +199,7 @@ const Tt = ({ children: e, className: t, disabled: r, divider: n, onClick: a, ..
199
199
  children: /* @__PURE__ */ l(
200
200
  "div",
201
201
  {
202
- className: c([
202
+ className: d([
203
203
  "flex flex-1 py-2 gap-x-2 items-center pie-2 pis-2",
204
204
  a ? "cursor-pointer hover:bg-gray-10 hover:dark:bg-gray-50" : void 0,
205
205
  r ? "pointer-events-none" : ""
@@ -228,8 +228,8 @@ const Dt = ({
228
228
  value: f,
229
229
  ...m
230
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);
231
+ const w = B(null), [g, p] = W(f), [N, k] = W(!1), T = (b) => {
232
+ N || k(!0), !b.length && g && p(null), i(b);
233
233
  }, E = (b) => {
234
234
  u(b), i(b.label), p(b.label), k(!1);
235
235
  }, L = Y(
@@ -251,7 +251,7 @@ const Dt = ({
251
251
  label: e,
252
252
  name: t ?? e,
253
253
  onChange: (b) => {
254
- B(b.target.value);
254
+ T(b.target.value);
255
255
  },
256
256
  onFocus: () => k(!0),
257
257
  ref: h,
@@ -259,11 +259,11 @@ const Dt = ({
259
259
  ...m
260
260
  }
261
261
  ),
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
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((b, c) => /* @__PURE__ */ l(fe, { onClick: () => E(b), children: b.label }, `${b.value}-${c}`)) : /* @__PURE__ */ l(fe, { children: s }) }) }) : null
263
263
  ] });
264
264
  }, Mt = y(Dt);
265
265
  Mt.displayName = "AutocompleteSelect";
266
- const Se = {
266
+ const Ne = {
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 Se = {
283
283
  ...J,
284
284
  base: "font-regular leading-loose",
285
285
  xl: "text-23 md:text-28"
286
- }, Ne = {
286
+ }, Se = {
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,21 +313,21 @@ const Se = {
313
313
  }, Ge = ({ size: e, variant: t }) => {
314
314
  switch (t) {
315
315
  case "headline":
316
- return c(Se.base, Se[e]);
316
+ return d(Ne.base, Ne[e]);
317
317
  case "label":
318
- return c(J.base, e ? J[e] : J.default);
318
+ return d(J.base, e ? J[e] : J.default);
319
319
  case "paragraph":
320
- return c(ue.base, e ? ue[e] : ue.default);
320
+ return d(ue.base, e ? ue[e] : ue.default);
321
321
  case "eyebrow":
322
- return c(Ne.base, Ne[e]);
322
+ return d(Se.base, Se[e]);
323
323
  case "caption":
324
- return c(Oe.base, Oe[e]);
324
+ return d(Oe.base, Oe[e]);
325
325
  case "buttonLabel":
326
- return c(Ee.base, Ee[e]);
326
+ return d(Ee.base, Ee[e]);
327
327
  case "fieldLabel":
328
- return c(Le.base, Le[e]);
328
+ return d(Le.base, Le[e]);
329
329
  case "fieldTextInput":
330
- return c(Ie.base, Ie[e]);
330
+ return d(Ie.base, Ie[e]);
331
331
  default:
332
332
  return e;
333
333
  }
@@ -339,15 +339,15 @@ const Se = {
339
339
  return /* @__PURE__ */ l(
340
340
  I,
341
341
  {
342
- className: c(u, m, f, e),
342
+ className: d(u, m, f, e),
343
343
  component: t,
344
344
  ref: i,
345
345
  ...s,
346
346
  children: r
347
347
  }
348
348
  );
349
- }, j = y(Rt);
350
- j.displayName = "Text";
349
+ }, P = y(Rt);
350
+ P.displayName = "Text";
351
351
  const jt = ({
352
352
  children: e,
353
353
  component: t = "a",
@@ -356,9 +356,9 @@ const jt = ({
356
356
  active: a,
357
357
  ...o
358
358
  }) => /* @__PURE__ */ l(
359
- j,
359
+ P,
360
360
  {
361
- className: c([
361
+ className: d([
362
362
  "font-bold text-gray-50 leading-default whitespace-nowrap",
363
363
  a ? "underline decoration-yv-red decoration-2 underline-offset-8 text-16 leading-loose" : "text-13",
364
364
  n ? "cursor-none pointer-events-none text-text-muted-light dark:text-text-muted-dark" : "",
@@ -394,11 +394,11 @@ const qt = ({ children: e, className: t, ...r }, n) => {
394
394
  var i;
395
395
  return yt(s) ? (i = s == null ? void 0 : s.props) == null ? void 0 : i.active : !1;
396
396
  });
397
- return /* @__PURE__ */ l("div", { className: c(["flex py-0.5 flex-row min-h-[48px] rtl:rotate-180", t]), ref: n, ...r, children: a.map((s, i) => /* @__PURE__ */ x("div", { className: "flex items-center", children: [
397
+ return /* @__PURE__ */ l("div", { className: d(["flex py-0.5 flex-row min-h-[48px] rtl:rotate-180", t]), ref: n, ...r, children: a.map((s, i) => /* @__PURE__ */ x("div", { className: "flex items-center", children: [
398
398
  i ? /* @__PURE__ */ l(
399
399
  Kt,
400
400
  {
401
- className: c([
401
+ className: d([
402
402
  "mx-1",
403
403
  i > o && "text-gray-15",
404
404
  i <= o && "text-gray-25"
@@ -406,9 +406,9 @@ const qt = ({ children: e, className: t, ...r }, n) => {
406
406
  size: "15"
407
407
  }
408
408
  ) : null,
409
- typeof s == "object" && "type" in s ? R(s.type, {
409
+ typeof s == "object" && "type" in s ? j(s.type, {
410
410
  ...s.props,
411
- className: c([
411
+ className: d([
412
412
  s.props.className ?? "",
413
413
  i < o ? "bg-gray-10 dark:bg-gray-40 py-1 px-2 rounded-3 cursor-pointer" : "px-0.5",
414
414
  i > o && "[&>*]:text-gray-15 [&>*]:text-16 [&>*]:leading-loose [&>*]:font-medium",
@@ -457,7 +457,7 @@ const Bn = {
457
457
  sm: 18,
458
458
  xl: 36,
459
459
  xs: 12
460
- }, et = "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", le = {
460
+ }, et = "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 h-fit", le = {
461
461
  // bgColor, outlineColor, disabled, fontColor, hover, pressed, disabled, textTransform
462
462
  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",
463
463
  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",
@@ -481,15 +481,15 @@ const Bn = {
481
481
  variant: u = "primary",
482
482
  ...f
483
483
  }, m) => {
484
- const h = Ye(n !== void 0 ? o : void 0), w = c(et, le[u], h[s], e);
484
+ const h = Ye(n !== void 0 ? o : void 0), w = d(et, le[u], h[s], e);
485
485
  return /* @__PURE__ */ x("button", { className: w, disabled: r, ref: m, type: i, ...f, children: [
486
- o === "start" && n !== void 0 ? R(n, {
486
+ o === "start" && n !== void 0 ? j(n, {
487
487
  className: "mr-0.5",
488
488
  onClick: a ?? void 0,
489
489
  size: re[s]
490
490
  }) : null,
491
491
  /* @__PURE__ */ l("span", { className: "truncate", children: t }),
492
- o === "end" && n !== void 0 ? R(n, {
492
+ o === "end" && n !== void 0 ? j(n, {
493
493
  className: "ml-0.5",
494
494
  onClick: a ?? void 0,
495
495
  size: re[s]
@@ -502,7 +502,7 @@ const Qt = ({ error: e, className: t, label: r, disabled: n, name: a, ...o }, s)
502
502
  return /* @__PURE__ */ x(
503
503
  "div",
504
504
  {
505
- className: c([
505
+ className: d([
506
506
  "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",
507
507
  t
508
508
  ]),
@@ -527,8 +527,8 @@ 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 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
- const r = P(null);
530
+ const Tn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className: d("w-full border-gray-15 dark:border-gray-30 border-standard", e) }), Jt = ({ children: e, autoFocus: t = !0 }) => {
531
+ const r = B(null);
532
532
  return A(() => {
533
533
  if (r.current) {
534
534
  const n = r.current.querySelectorAll(
@@ -574,7 +574,7 @@ const Tn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className
574
574
  };
575
575
  }
576
576
  }, [t]), /* @__PURE__ */ l("div", { ref: r, children: e });
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(
577
+ }, Dn = ({ className: e, progress: t }) => /* @__PURE__ */ l("div", { className: d(["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",
@@ -586,7 +586,7 @@ const Tn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className
586
586
  ) }), Yt = ({ children: e, className: t, disabled: r, type: n = "button", variant: a = "borderless", ...o }, s) => /* @__PURE__ */ l(
587
587
  "button",
588
588
  {
589
- className: c([
589
+ className: d([
590
590
  "rounded-full inline-flex justify-center items-center p-1",
591
591
  t,
592
592
  le[a],
@@ -600,11 +600,11 @@ const Tn = ({ className: e, ...t }) => /* @__PURE__ */ l("hr", { ...t, className
600
600
  }
601
601
  ), er = y(Yt);
602
602
  er.displayName = "IconButton";
603
- const tr = ({ className: e, children: t, component: r = "a", variant: n = "borderless", ...a }, o) => R(
603
+ const tr = ({ className: e, children: t, component: r = "a", variant: n = "borderless", ...a }, o) => j(
604
604
  r,
605
605
  {
606
606
  ...a,
607
- className: c([
607
+ className: d([
608
608
  "rounded-full inline-flex justify-center items-center p-1 no-underline cursor-pointer",
609
609
  le[n],
610
610
  e
@@ -650,14 +650,14 @@ var nr = Object.defineProperty, ar = Object.defineProperties, or = Object.getOwn
650
650
  }, xr = (e, t) => {
651
651
  var r = e, { title: n, titleId: a } = r, o = hr(r, ["title", "titleId"]);
652
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) => {
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) => {
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
- }, Nr = (e, t) => kr(e, $r(t)), Or = (e, t) => {
660
+ }, Sr = (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", 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" }) })] }));
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" }) })] }));
671
671
  }, Lr = y(Er), Ir = Lr;
672
672
  const Cr = {
673
673
  1: "h1",
@@ -679,7 +679,7 @@ const Cr = {
679
679
  return /* @__PURE__ */ l(
680
680
  I,
681
681
  {
682
- className: c(u, m, f, e),
682
+ className: d(u, m, f, e),
683
683
  component: Cr[n],
684
684
  ref: i,
685
685
  ...s,
@@ -697,27 +697,27 @@ const Tr = ({
697
697
  dismissCallback: o,
698
698
  dismissImageAriaLabel: s = "Remove Image",
699
699
  error: i = "",
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.`,
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 ${c == null ? void 0 : c.maxWidth}x${c == null ? void 0 : c.maxHeight}. Please try again.`,
702
+ fileMinSizeError: m = (S) => `${S} 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.`,
703
+ fileRatioError: h = (S) => `${S} must have a ratio of, ${c == null ? void 0 : c.imageRatio}. Please try again.`,
704
704
  fileCallback: w,
705
705
  hero: g = !1,
706
706
  hint: p,
707
- imageWidth: S = 160,
707
+ imageWidth: N = 160,
708
708
  imageSrc: k,
709
- label: B = "Upload Image",
709
+ label: T = "Upload Image",
710
710
  name: E = "imageUpload",
711
711
  onBlur: L,
712
712
  preProcessing: v,
713
713
  shape: b = "circle",
714
- validation: d
714
+ validation: c
715
715
  }, Q) => {
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(() => {
716
+ const S = B(null), ie = he({ forwardedRef: Q, innerRef: S }), [$, U] = W(void 0), [D, M] = W(k ? "resolved" : "idle"), [de, q] = W(i), it = () => S != null && S.current ? S.current.click() : void 0, ve = V(() => $ && D !== "rejected" ? (M("resolved"), $.imageSrc) : k && D === "resolved" ? (M("resolved"), k) : null, [$, k, D]), dt = V(() => {
717
717
  const C = () => {
718
- o && o(k), U(void 0), D("idle");
718
+ o && o(k), U(void 0), M("idle");
719
719
  };
720
- switch (T) {
720
+ switch (D) {
721
721
  case "pending":
722
722
  return /* @__PURE__ */ l(I, { className: "animate-spin", children: /* @__PURE__ */ l(Ir, { className: "text-info-light dark:text-info-dark", "data-testid": "loading spinner", size: "32" }) });
723
723
  case "resolved":
@@ -726,7 +726,7 @@ const Tr = ({
726
726
  "img",
727
727
  {
728
728
  alt: `${$ == null ? void 0 : $.id} preview`,
729
- className: c([
729
+ className: d([
730
730
  "object-fit w-full h-full",
731
731
  b === "circle" ? "rounded-full" : "rounded-0.5",
732
732
  b !== "unset" || !g ? "aspect-square" : "",
@@ -735,7 +735,7 @@ const Tr = ({
735
735
  ]),
736
736
  onLoad: () => $ != null && $.imageSrc ? URL.revokeObjectURL($.imageSrc) : void 0,
737
737
  src: ve || void 0,
738
- width: S
738
+ width: N
739
739
  }
740
740
  ),
741
741
  a ? null : /* @__PURE__ */ l(
@@ -760,28 +760,28 @@ const Tr = ({
760
760
  $ == null ? void 0 : $.id,
761
761
  $ == null ? void 0 : $.imageSrc,
762
762
  k,
763
- T,
764
- S,
763
+ D,
764
+ N,
765
765
  ve,
766
766
  b
767
767
  ]), ct = ({ file: C, imageUrl: z }) => new Promise((F, _) => {
768
768
  var we;
769
- const O = new Image(), Z = (we = d == null ? void 0 : d.imageRatio) == null ? void 0 : we.split("/");
769
+ const O = new Image(), Z = (we = c == null ? void 0 : c.imageRatio) == null ? void 0 : we.split("/");
770
770
  O.onload = async () => {
771
- if (d)
772
- if (d != null && d.maxByteSize && C.size > d.maxByteSize) {
773
- U(void 0), D("rejected");
774
- const bt = u(C.name, Math.round(d.maxByteSize / 1e3));
771
+ if (c)
772
+ if (c != null && c.maxByteSize && C.size > c.maxByteSize) {
773
+ U(void 0), M("rejected");
774
+ const bt = u(C.name, Math.round(c.maxByteSize / 1e3));
775
775
  return q(bt), _(!1);
776
776
  } else {
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
- return U(void 0), D("rejected"), q(m(C.name)), _(!1);
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
- return U(void 0), D("rejected"), q(f(C.name)), _(!1);
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(h(C.name)), _(!1);
777
+ if (c != null && c.minWidth && O.width < (c == null ? void 0 : c.minWidth) || c != null && c.minHeight && O.height < (c == null ? void 0 : c.minHeight))
778
+ return U(void 0), M("rejected"), q(m(C.name)), _(!1);
779
+ if (c != null && c.maxHeight && O.height > (c == null ? void 0 : c.maxHeight) || c != null && c.maxWidth && O.width > (c == null ? void 0 : c.maxWidth))
780
+ return U(void 0), M("rejected"), q(f(C.name)), _(!1);
781
+ if (c != null && c.imageRatio && (Z == null ? void 0 : Z.length) === 2 && parseInt(Z[0]) / parseInt(Z[1]) !== O.width / O.height)
782
+ return U(void 0), M("rejected"), q(h(C.name)), _(!1);
783
783
  }
784
- return S = O.width, typeof w == "function" && (console.log("Callback"), await w(C, O)), q(""), F(!0);
784
+ return N = O.width, typeof w == "function" && (console.log("Callback"), await w(C, O)), q(""), F(!0);
785
785
  }, O.src = z;
786
786
  }), ut = async (C) => {
787
787
  try {
@@ -789,41 +789,41 @@ const Tr = ({
789
789
  if (z) {
790
790
  const F = z[0], _ = URL.createObjectURL(F);
791
791
  let O = !0;
792
- D("pending"), v && await v(F), O = await ct({
792
+ M("pending"), v && await v(F), O = await ct({
793
793
  file: F,
794
794
  imageUrl: _
795
- }), O && (U({ file: F, id: F.name, imageSrc: _ }), D("resolved"));
795
+ }), O && (U({ file: F, id: F.name, imageSrc: _ }), M("resolved"));
796
796
  }
797
797
  } catch (z) {
798
798
  if (z instanceof Error)
799
799
  throw z;
800
800
  }
801
- }, ft = c([b === "circle" && !g ? "rounded-full aspect-square" : ""]), pt = c([b === "square" && !g ? "aspect-square rounded-1" : ""]), mt = c([
801
+ }, ft = d([b === "circle" && !g ? "rounded-full aspect-square" : ""]), pt = d([b === "square" && !g ? "aspect-square rounded-1" : ""]), mt = d([
802
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
- return /* @__PURE__ */ x(I, { className: c([n]), children: [
803
+ b === "unset" && D !== "idle" && !g ? "aspect-auto" : "",
804
+ b === "unset" && D !== "resolved" && !g ? "aspect-square" : ""
805
+ ]), gt = d([g ? "rounded-1 aspect-video" : ""]);
806
+ return /* @__PURE__ */ x(I, { className: d([n]), children: [
807
807
  /* @__PURE__ */ x(
808
808
  I,
809
809
  {
810
- className: c([
810
+ className: d([
811
811
  "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",
812
812
  ,
813
813
  de ? "border-alert-light dark:border-alert-dark" : "border-tertiary-light dark:border-tertiary-dark",
814
814
  a ? "select-none bg-gray-10 dark:bg-gray-40 pointer-events-none" : ""
815
815
  ]),
816
816
  children: [
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 }) }),
817
+ /* @__PURE__ */ l(P, { className: "pb-1.5 text-text-muted-light dark:text-text-muted-dark", children: /* @__PURE__ */ l("label", { htmlFor: E, children: T }) }),
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
- className: c([
822
+ className: d([
823
823
  "flex justify-center items-center relative mbe-2 md:mbe-0 md:mie-2",
824
824
  g ? "w-full" : "md:w-1/2 w-4/5",
825
825
  a ? "border-small border-solid border-tertiary-light" : "",
826
- T !== "resolved" ? "bg-gray-10 dark:bg-gray-3" : "",
826
+ D !== "resolved" ? "bg-gray-10 dark:bg-gray-3" : "",
827
827
  ft,
828
828
  pt,
829
829
  mt,
@@ -835,7 +835,7 @@ const Tr = ({
835
835
  /* @__PURE__ */ l(
836
836
  pe,
837
837
  {
838
- className: c([
838
+ className: d([
839
839
  "my-auto !ring-gray-15 dark:!ring-gray-30 !ring-1 disabled:!bg-gray-15 disabled:!ring-none",
840
840
  g ? "!mbs-2" : ""
841
841
  ]),
@@ -843,7 +843,7 @@ const Tr = ({
843
843
  onClick: it,
844
844
  size: "sm",
845
845
  variant: "stroked",
846
- children: T === "resolved" ? t : r
846
+ children: D === "resolved" ? t : r
847
847
  }
848
848
  ),
849
849
  /* @__PURE__ */ l(
@@ -866,8 +866,8 @@ const Tr = ({
866
866
  ]
867
867
  }
868
868
  ),
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
869
+ de ? /* @__PURE__ */ l(P, { className: "dark:!text-alert-dark !text-alert-light text-13", children: de }) : null,
870
+ p ? /* @__PURE__ */ l(P, { 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,11 +882,11 @@ const Mr = ({
882
882
  ...i
883
883
  }, u) => {
884
884
  const f = Ye(n !== void 0 ? a : void 0);
885
- return /* @__PURE__ */ x(({ children: h }) => R(
885
+ return /* @__PURE__ */ x(({ children: h }) => j(
886
886
  r,
887
887
  {
888
888
  ...i,
889
- className: c([
889
+ className: d([
890
890
  et,
891
891
  le[o],
892
892
  f[s],
@@ -897,13 +897,13 @@ const Mr = ({
897
897
  },
898
898
  h
899
899
  ), { children: [
900
- a === "start" && n !== void 0 ? R(n, {
901
- className: "mr-0.5 min-w-min",
900
+ a === "start" && n !== void 0 ? j(n, {
901
+ className: "mie-0.5 flex-shrink-0",
902
902
  size: re[s]
903
903
  }) : null,
904
- R("span", { className: "truncate" }, t),
905
- a === "end" && n !== void 0 ? R(n, {
906
- className: "ml-0.5 min-w-min",
904
+ j("span", { className: "truncate" }, t),
905
+ a === "end" && n !== void 0 ? j(n, {
906
+ className: "mis-0.5 flex-shrink-0",
907
907
  size: re[s]
908
908
  }) : null
909
909
  ] });
@@ -911,10 +911,10 @@ const Mr = ({
911
911
  Rr.displayName = "LinkButton";
912
912
  function Mn({ children: e, className: t, position: r }) {
913
913
  let n = "";
914
- return r && (r === "start" ? n = "order-first" : n = "order-last"), /* @__PURE__ */ l("div", { className: c("flex gap-1", n, t), children: e });
914
+ return r && (r === "start" ? n = "order-first" : n = "order-last"), /* @__PURE__ */ l("div", { className: d("flex gap-1", n, t), children: e });
915
915
  }
916
916
  function Rn({ children: e, className: t }) {
917
- return /* @__PURE__ */ l("div", { className: c("flex-grow", t), children: e });
917
+ return /* @__PURE__ */ l("div", { className: d("flex-grow", t), children: e });
918
918
  }
919
919
  const jn = ({
920
920
  children: e,
@@ -924,16 +924,16 @@ const jn = ({
924
924
  size: a = "sm",
925
925
  subHeadline: o,
926
926
  subHeadlineProps: s
927
- }) => /* @__PURE__ */ x("div", { className: c(["flex items-center justify-between break-words", t]), children: [
927
+ }) => /* @__PURE__ */ x("div", { className: d(["flex items-center justify-between break-words", t]), children: [
928
928
  /* @__PURE__ */ x("div", { className: "flex flex-col", children: [
929
- /* @__PURE__ */ l(j, { size: a, variant: "label", children: e }),
929
+ /* @__PURE__ */ l(P, { size: a, variant: "label", children: e }),
930
930
  o ? (
931
931
  // eslint-disable-next-line react/jsx-props-no-spreading
932
- /* @__PURE__ */ l(j, { ...s, children: o })
932
+ /* @__PURE__ */ l(P, { ...s, children: o })
933
933
  ) : null
934
934
  ] }),
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 : () => {
935
+ r ? /* @__PURE__ */ l(P, { ...n, children: r }) : null
936
+ ] }), Wn = ({ children: e, className: t, ...r }) => /* @__PURE__ */ l("div", { className: d(["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() {
@@ -1000,7 +1000,7 @@ class Ar {
1000
1000
  }
1001
1001
  }
1002
1002
  function Ur(e) {
1003
- let t = P({
1003
+ let t = B({
1004
1004
  isFocused: !1,
1005
1005
  onBlur: e,
1006
1006
  observer: null
@@ -1065,7 +1065,7 @@ function We() {
1065
1065
  }
1066
1066
  typeof document < "u" && (document.readyState !== "loading" ? We() : document.addEventListener("DOMContentLoaded", We));
1067
1067
  function Xr(e) {
1068
- let { isDisabled: t, onBlurWithin: r, onFocusWithin: n, onFocusWithinChange: a } = e, o = P({
1068
+ let { isDisabled: t, onBlurWithin: r, onFocusWithin: n, onFocusWithinChange: a } = e, o = B({
1069
1069
  isFocusWithin: !1
1070
1070
  }), s = Y((f) => {
1071
1071
  o.current.isFocusWithin && !f.currentTarget.contains(f.relatedTarget) && (o.current.isFocusWithin = !1, r && r(f), a && a(!1));
@@ -1093,7 +1093,7 @@ function Xr(e) {
1093
1093
  };
1094
1094
  }
1095
1095
  function Jr(e) {
1096
- let { ref: t, onInteractOutside: r, isDisabled: n, onInteractOutsideStart: a } = e, s = P({
1096
+ let { ref: t, onInteractOutside: r, isDisabled: n, onInteractOutsideStart: a } = e, s = B({
1097
1097
  isPointerDown: !1,
1098
1098
  ignoreEmulatedMouseEvents: !1,
1099
1099
  onInteractOutside: r,
@@ -1208,22 +1208,22 @@ class ze {
1208
1208
  }
1209
1209
  }
1210
1210
  let Fe = new ye();
1211
- const M = [];
1211
+ const R = [];
1212
1212
  function rn(e, t) {
1213
1213
  let { onClose: r, shouldCloseOnBlur: n, isOpen: a, isDismissable: o = !1, isKeyboardDismissDisabled: s = !1, shouldCloseOnInteractOutside: i } = e;
1214
- A(() => (a && M.push(t), () => {
1215
- let p = M.indexOf(t);
1216
- p >= 0 && M.splice(p, 1);
1214
+ A(() => (a && R.push(t), () => {
1215
+ let p = R.indexOf(t);
1216
+ p >= 0 && R.splice(p, 1);
1217
1217
  }), [
1218
1218
  a,
1219
1219
  t
1220
1220
  ]);
1221
1221
  let u = () => {
1222
- M[M.length - 1] === t && r && r();
1222
+ R[R.length - 1] === t && r && r();
1223
1223
  }, f = (p) => {
1224
- (!i || i(p.target)) && M[M.length - 1] === t && (p.stopPropagation(), p.preventDefault());
1224
+ (!i || i(p.target)) && R[R.length - 1] === t && (p.stopPropagation(), p.preventDefault());
1225
1225
  }, m = (p) => {
1226
- (!i || i(p.target)) && (M[M.length - 1] === t && (p.stopPropagation(), p.preventDefault()), u());
1226
+ (!i || i(p.target)) && (R[R.length - 1] === t && (p.stopPropagation(), p.preventDefault()), u());
1227
1227
  }, h = (p) => {
1228
1228
  p.key === "Escape" && !s && (p.stopPropagation(), p.preventDefault(), u());
1229
1229
  };
@@ -1265,7 +1265,7 @@ const nn = ({ align: e, children: t, className: r, ...n }) => {
1265
1265
  return /* @__PURE__ */ l(
1266
1266
  "div",
1267
1267
  {
1268
- className: c([
1268
+ className: d([
1269
1269
  "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",
1270
1270
  a,
1271
1271
  r
@@ -1284,7 +1284,7 @@ const nn = ({ align: e, children: t, className: r, ...n }) => {
1284
1284
  onClose: s,
1285
1285
  ...i
1286
1286
  }) => {
1287
- const u = P(null), { overlayProps: f } = rn(
1287
+ const u = B(null), { overlayProps: f } = rn(
1288
1288
  {
1289
1289
  isDismissable: a,
1290
1290
  isKeyboardDismissDisabled: !a,
@@ -1306,7 +1306,7 @@ const nn = ({ align: e, children: t, className: r, ...n }) => {
1306
1306
  }, Fn = ({ onToggle: e, children: t, className: r, disabled: n }) => {
1307
1307
  const a = (i) => {
1308
1308
  i.preventDefault(), i.stopPropagation(), e();
1309
- }, o = P(null), s = wt(t, {
1309
+ }, o = B(null), s = wt(t, {
1310
1310
  className: r,
1311
1311
  disabled: n,
1312
1312
  onClick: a,
@@ -1348,33 +1348,33 @@ const ln = ({ children: e, disabled: t, name: r, value: n, ...a }, o) => /* @__P
1348
1348
  ] }), dn = y(ln);
1349
1349
  dn.displayName = "RadioSetItem";
1350
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(
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 = d(
1352
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
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 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)));
1356
+ const h = d(cn, un), w = B(null), g = he({ forwardedRef: m, innerRef: w }), [p, N] = W(Boolean(u || ((L = g == null ? void 0 : g.current) == null ? void 0 : L.value)));
1357
1357
  A(() => {
1358
1358
  var v;
1359
- S(Boolean(((v = g == null ? void 0 : g.current) == null ? void 0 : v.value) || u));
1359
+ N(Boolean(((v = g == null ? void 0 : g.current) == null ? void 0 : v.value) || u));
1360
1360
  }, [u, g]);
1361
1361
  const k = V(() => {
1362
- const v = c(h, gn, o ? bn : null), b = c(h, be);
1362
+ const v = d(h, gn, o ? bn : null), b = d(h, be);
1363
1363
  return p ? v : b;
1364
- }, [h, p, o]), B = V(() => {
1365
- const v = c(_e, mn), b = c(_e);
1364
+ }, [h, p, o]), T = V(() => {
1365
+ const v = d(_e, mn), b = d(_e);
1366
1366
  return p ? v : b;
1367
1367
  }, [p]), E = (v) => {
1368
1368
  var b;
1369
- S(Boolean(((b = g == null ? void 0 : g.current) == null ? void 0 : b.value) || u)), i && i(v);
1369
+ N(Boolean(((b = g == null ? void 0 : g.current) == null ? void 0 : b.value) || u)), i && i(v);
1370
1370
  };
1371
- return /* @__PURE__ */ x("div", { className: c(t), children: [
1372
- /* @__PURE__ */ x("div", { className: c("relative w-full border-none"), children: [
1371
+ return /* @__PURE__ */ x("div", { className: d(t), children: [
1372
+ /* @__PURE__ */ x("div", { className: d("relative w-full border-none"), children: [
1373
1373
  /* @__PURE__ */ l(
1374
1374
  "select",
1375
1375
  {
1376
1376
  ...f,
1377
- className: c([k, n ? fn : pn]),
1377
+ className: d([k, n ? fn : pn]),
1378
1378
  disabled: r,
1379
1379
  id: s,
1380
1380
  name: s,
@@ -1384,15 +1384,31 @@ const un = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark
1384
1384
  children: e
1385
1385
  }
1386
1386
  ),
1387
- /* @__PURE__ */ l("label", { className: B, htmlFor: s, children: o }),
1387
+ /* @__PURE__ */ l("label", { className: T, htmlFor: s, children: o }),
1388
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(be, "text-13 m-0"), children: a }) : null
1392
+ a ? /* @__PURE__ */ l("p", { className: d(be, "text-13 m-0"), children: a }) : null
1393
1393
  ] }) : null
1394
1394
  ] });
1395
- }, Vn = y(xn), yn = {
1395
+ }, Vn = y(xn);
1396
+ function Hn({ active: e, children: t, component: r = "a", className: n, href: a }) {
1397
+ return /* @__PURE__ */ l(
1398
+ P,
1399
+ {
1400
+ className: d(
1401
+ "text-gray-50 whitespace-nowrap text-16 leading-loose mie-2",
1402
+ e ? "font-bold underline decoration-yv-red decoration-2 underline-offset-8" : "text-text-muted-light dark:text-text-muted-dark",
1403
+ n
1404
+ ),
1405
+ component: r,
1406
+ href: a,
1407
+ children: t
1408
+ }
1409
+ );
1410
+ }
1411
+ const yn = {
1396
1412
  default: "bg-gray-10 dark:bg-gray-40 text-light dark:text-dark",
1397
1413
  secondary: "bg-gray-10 dark:bg-gray-35 text-light dark:text-dark",
1398
1414
  error: "bg-orange-10 dark:bg-orange-50 text-orange-40 dark:text-orange-20",
@@ -1402,16 +1418,16 @@ const un = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark
1402
1418
  }, vn = {
1403
1419
  sm: "text-11 w-fit rounded-0.5 plb-0.25 pli-0.5",
1404
1420
  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 }) => {
1421
+ }, An = ({ message: e, variant: t = "default", size: r = "sm", className: n }) => {
1406
1422
  const a = yn[t], o = vn[r];
1407
- return /* @__PURE__ */ l(I, { className: c(a, o, n), children: /* @__PURE__ */ l(j, { children: e }) });
1423
+ return /* @__PURE__ */ l(I, { className: d(a, o, n), children: /* @__PURE__ */ l(P, { children: e }) });
1408
1424
  }, wn = "_inputIcon_1pzdd_1", kn = {
1409
1425
  inputIcon: wn
1410
1426
  }, $n = ({ className: e, error: t, name: r, ...n }, a) => /* @__PURE__ */ x(se, { children: [
1411
1427
  /* @__PURE__ */ l(
1412
1428
  "input",
1413
1429
  {
1414
- className: c([
1430
+ className: d([
1415
1431
  "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 h-[58px]",
1416
1432
  kn.inputIcon,
1417
1433
  e
@@ -1425,12 +1441,12 @@ const un = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark
1425
1441
  }
1426
1442
  ),
1427
1443
  t ? /* @__PURE__ */ l("div", { className: "text-alert-light dark:text-alert-dark text-13", children: t }) : null
1428
- ] }), Sn = y($n);
1429
- Sn.displayName = "TimePicker";
1430
- const Nn = "_tooltipWrapper_qu88w_1", On = "_tooltipContent_qu88w_18", Ve = {
1431
- tooltipWrapper: Nn,
1444
+ ] }), Nn = y($n);
1445
+ Nn.displayName = "TimePicker";
1446
+ const Sn = "_tooltipWrapper_qu88w_1", On = "_tooltipContent_qu88w_18", Ve = {
1447
+ tooltipWrapper: Sn,
1432
1448
  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 }) });
1449
+ }, Un = ({ content: e, className: t, ...r }) => /* @__PURE__ */ l("div", { className: d(Ve.tooltipWrapper, t), ...r, children: /* @__PURE__ */ l("span", { className: Ve.tooltipContent, children: e }) });
1434
1450
  export {
1435
1451
  Mt as AutocompleteSelect,
1436
1452
  I as Box,
@@ -1461,10 +1477,11 @@ export {
1461
1477
  sn as RadioSet,
1462
1478
  dn as RadioSetItem,
1463
1479
  Vn as Select,
1464
- Hn as Tag,
1465
- j as Text,
1466
- Sn as TimePicker,
1467
- An as Tooltip,
1480
+ Hn as Tab,
1481
+ An as Tag,
1482
+ P as Text,
1483
+ Nn as TimePicker,
1484
+ Un as Tooltip,
1468
1485
  Bn as buttonSizeOptions,
1469
1486
  et as defaultButtonClasses,
1470
1487
  Ye as determineSizeClasses,
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,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 h-[58px]",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"})});
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 h-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),mn=()=>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]),yn=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]),vn=({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 Nn=f(T.name,Math.round(u.maxByteSize/1e3));return q(Nn),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}),xn=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 vn({file:O,imageUrl:H}),I&&(V({file:O,id:O.name,imageSrc:H}),z("resolved"))}}catch(W){if(W instanceof Error)throw W}},wn=c([y==="circle"&&!m?"rounded-full aspect-square":""]),kn=c([y==="square"&&!m?"aspect-square rounded-1":""]),Sn=c([y==="unset"&&!m?"rounded-1":"",y==="unset"&&j!=="idle"&&!m?"aspect-auto":"",y==="unset"&&j!=="resolved"&&!m?"aspect-square":""]),En=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":"",wn,kn,Sn,En]),children:yn}),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:mn,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:xn,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:"mie-0.5 flex-shrink-0",size:$[l]}):null,d.createElement("span",{className:"truncate"},t),o==="end"&&n!==void 0?d.createElement(n,{className:"mis-0.5 flex-shrink-0",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",Cn={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);function cn({active:e,children:t,component:r="a",className:n,href:o}){return a.jsx(B,{className:c("text-gray-50 whitespace-nowrap text-16 leading-loose mie-2",e?"font-bold underline decoration-yv-red decoration-2 underline-offset-8":"text-text-muted-light dark:text-text-muted-dark",n),component:r,href:o,children:t})}const un={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"},fn={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"},pn=({message:e,variant:t="default",size:r="sm",className:n})=>{const o=un[t],s=fn[r];return a.jsx(E,{className:c(o,s,n),children:a.jsx(B,{children:e})})},gn={inputIcon:"_inputIcon_1pzdd_1"},bn=({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 h-[58px]",gn.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(bn);ft.displayName="TimePicker";const pt={tooltipWrapper:"_tooltipWrapper_qu88w_1",tooltipContent:"_tooltipContent_qu88w_18"},hn=({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.Tab=cn,p.Tag=pn,p.Text=B,p.TimePicker=ft,p.Tooltip=hn,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.3",
3
+ "version": "0.6.1",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",