zaravand-ui 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,10 +20,11 @@ var m = Object.defineProperty, h = (e, t) => () => (t || (e((t = { exports: {} }
20
20
  success: "#22C55E",
21
21
  warning: "#FBBF24",
22
22
  danger: "#EF4444",
23
+ border: "var(--zui-theme-border-default)",
23
24
  surface: "#121212",
24
25
  mutedSurface: "#1E1E1E",
25
26
  tooltipSurface: "#2A2A2A"
26
- }, y = C(), b = w(), x = ["theme-light", "theme-dark"], S = ["zui-theme-light", "zui-theme-dark"];
27
+ }, y = ["theme-light", "theme-dark"], b = ["zui-theme-light", "zui-theme-dark"], x = C(), S = w();
27
28
  function C(e = {}) {
28
29
  let t = {
29
30
  ...v,
@@ -43,6 +44,7 @@ function w(e = {}) {
43
44
  "--zui-color-success": t.success,
44
45
  "--zui-color-warning": t.warning,
45
46
  "--zui-color-danger": t.danger,
47
+ "--zui-color-border": t.border,
46
48
  "--zui-color-surface": t.surface,
47
49
  "--zui-color-muted-surface": t.mutedSurface,
48
50
  "--zui-color-tooltip-surface": t.tooltipSurface,
@@ -53,7 +55,7 @@ function T(e = {}, t = {}) {
53
55
  let n = w(e), r = t.target ?? (typeof document < "u" ? document.documentElement : void 0);
54
56
  if (!r) return n;
55
57
  for (let [e, t] of Object.entries(n)) r.style.setProperty(e, t);
56
- return t.mode && (r.classList.remove(...x, ...S), r.classList.add(t.mode === "dark" ? "zui-theme-dark" : "zui-theme-light"), r.setAttribute("data-zui-theme", t.mode)), n;
58
+ return t.mode && (r.classList.remove(...y, ...b), r.classList.add(t.mode === "dark" ? "zui-theme-dark" : "zui-theme-light"), r.setAttribute("data-zui-theme", t.mode)), n;
57
59
  }
58
60
  //#endregion
59
61
  //#region src/components/Spinner/Spinner.variant.ts
@@ -1186,7 +1188,7 @@ var yt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, bt = vt, K =
1186
1188
  r
1187
1189
  ] : e;
1188
1190
  }, []), n?.class, n?.className);
1189
- }, xt = K("zui:group/checkbox zui:relative zui:inline-flex zui:shrink-0 zui:items-center zui:justify-center radius-xs zui:border zui:border-[var(--zui-theme-border-strong)] zui:bg-[var(--zui-theme-bg-page)] zui:text-[var(--zui-theme-text-inverse)] zui:shadow-xs zui:cursor-pointer zui:outline-none zui:select-none zui:transition-all zui:duration-300 zui:ease-out zui:data-[state=checked]:border-[var(--zui-theme-action-primary)] zui:data-[state=checked]:bg-[var(--zui-theme-action-primary)] zui:hover:-translate-y-0.5 zui:hover:border-[var(--zui-theme-action-primary-hover)] zui:hover:bg-[var(--zui-theme-bg-elevated)] zui:hover:shadow-[0_8px_20px_-12px_var(--zui-effect-shadow-ink-35)] zui:data-[state=checked]:hover:bg-[var(--zui-theme-action-primary-hover)] zui:active:translate-y-px zui:data-[state=checked]:active:bg-[var(--zui-theme-action-primary-active)] zui:focus-visible:border-[var(--zui-theme-action-secondary)] zui:focus-visible:ring-[3px] zui:focus-visible:ring-[var(--zui-theme-action-secondary)] zui:aria-invalid:border-[var(--zui-theme-status-danger)] zui:aria-invalid:ring-[var(--zui-theme-status-danger)] zui:disabled:cursor-not-allowed zui:disabled:pointer-events-none zui:disabled:opacity-50", {
1191
+ }, xt = K("zui:group/checkbox zui:relative zui:inline-flex zui:shrink-0 zui:items-center zui:justify-center radius-xs zui:border zui:border-[var(--zui-color-border)] zui:bg-[var(--zui-theme-bg-page)] zui:text-[var(--zui-theme-text-inverse)] zui:shadow-xs zui:cursor-pointer zui:outline-none zui:select-none zui:transition-all zui:duration-300 zui:ease-out zui:data-[state=checked]:border-[var(--zui-theme-action-primary)] zui:data-[state=checked]:bg-[var(--zui-theme-action-primary)] zui:hover:-translate-y-0.5 zui:hover:border-[var(--zui-theme-action-primary-hover)] zui:hover:bg-[var(--zui-theme-bg-elevated)] zui:hover:shadow-[0_8px_20px_-12px_var(--zui-effect-shadow-ink-35)] zui:data-[state=checked]:hover:bg-[var(--zui-theme-action-primary-hover)] zui:active:translate-y-px zui:data-[state=checked]:active:bg-[var(--zui-theme-action-primary-active)] zui:focus-visible:border-[var(--zui-theme-action-secondary)] zui:focus-visible:ring-[3px] zui:focus-visible:ring-[var(--zui-theme-action-secondary)] zui:aria-invalid:border-[var(--zui-theme-status-danger)] zui:aria-invalid:ring-[var(--zui-theme-status-danger)] zui:disabled:cursor-not-allowed zui:disabled:pointer-events-none zui:disabled:opacity-50", {
1190
1192
  variants: {
1191
1193
  size: {
1192
1194
  sm: "zui:size-[1.05rem]",
@@ -10908,7 +10910,7 @@ var bv = (e) => new Bc(e, _v), xv = [
10908
10910
  "zui:aria-invalid:focus:shadow-[0_0_0_1px_var(--zui-theme-status-danger)]",
10909
10911
  "zui:aria-invalid:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-status-danger)]"
10910
10912
  ].join(" "), Sv = ["zui:data-[state=open]:border-[var(--zui-theme-action-primary)]", "zui:data-[state=open]:shadow-[0_0_0_1px_var(--zui-theme-action-primary)]"].join(" "), Cv = K([
10911
- "zui:flex zui:w-full zui:items-center zui:justify-between zui:gap-2 radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-theme-bg-page)] zui:px-3 zui:text-right zui:text-base zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:data-[has-value=true]:border-[var(--zui-theme-action-primary)] zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:bg-[var(--zui-theme-bg-elevated)] zui:disabled:opacity-50 zui:md:text-sm",
10913
+ "zui:flex zui:w-full zui:items-center zui:justify-between zui:gap-2 radius-xs zui:border zui:border-[var(--zui-color-border)] zui:bg-transparent zui:px-3 zui:text-right zui:text-base zui:text-[var(--zui-color-text)] zui:outline-none zui:data-[has-value=true]:border-[var(--zui-theme-action-primary)] zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:bg-[var(--zui-theme-bg-elevated)] zui:disabled:opacity-50 zui:md:text-sm",
10912
10914
  xv,
10913
10915
  Sv
10914
10916
  ].join(" "), {
@@ -10918,19 +10920,19 @@ var bv = (e) => new Bc(e, _v), xv = [
10918
10920
  lg: "zui:h-[3rem]"
10919
10921
  } },
10920
10922
  defaultVariants: { size: "default" }
10921
- }), wv = K("zui:z-[95] zui:w-fit zui:min-w-0 zui:max-w-[calc(100vw-1.5rem)] zui:overflow-hidden radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-theme-bg-page)] zui:p-0 zui:text-[var(--zui-theme-text-primary)] zui:shadow-[0_20px_40px_-28px_var(--zui-effect-shadow-ink-55)] zui:outline-none zui:data-[state=closed]:animate-out zui:data-[state=closed]:fade-out-0 zui:data-[state=closed]:zoom-out-95 zui:data-[state=open]:animate-in zui:data-[state=open]:fade-in-0 zui:data-[state=open]:zoom-in-95"), Tv = K("zui:inline-flex zui:size-7 zui:items-center zui:justify-center radius-xs zui:bg-[var(--zui-theme-bg-page)] zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:transition-[color,background-color,box-shadow,transform] zui:duration-200 zui:hover:cursor-pointer zui:hover:scale-110 zui:hover:bg-[var(--zui-theme-bg-surface)] zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)] zui:disabled:pointer-events-none zui:disabled:opacity-45"), Ev = K("zui:flex zui:w-full zui:items-center zui:justify-between zui:gap-2 zui:px-1 zui:pb-1 zui:pt-2"), Dv = K("zui:inline-flex zui:items-center zui:gap-3"), Ov = K("zui:inline-flex zui:h-8 zui:items-center zui:justify-center zui:gap-2 radius-xs zui:px-1 zui:text-base zui:font-semibold zui:outline-none zui:transition-[color,background-color,box-shadow] zui:duration-200 zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)]", {
10923
+ }), wv = K("zui:z-[95] zui:w-fit zui:min-w-0 zui:max-w-[calc(100vw-1.5rem)] zui:overflow-hidden radius-xs zui:border zui:border-[var(--zui-theme-action-primary)] zui:bg-[var(--zui-theme-bg-page)] zui:p-0 zui:text-[var(--zui-color-text)] zui:shadow-[0_20px_40px_-28px_var(--zui-effect-shadow-ink-55)] zui:outline-none zui:data-[state=closed]:animate-out zui:data-[state=closed]:fade-out-0 zui:data-[state=closed]:zoom-out-95 zui:data-[state=open]:animate-in zui:data-[state=open]:fade-in-0 zui:data-[state=open]:zoom-in-95"), Tv = K("zui:inline-flex zui:size-7 zui:items-center zui:justify-center radius-xs zui:bg-[var(--zui-theme-bg-page)] zui:text-[var(--zui-color-text)] zui:outline-none zui:transition-[color,background-color,box-shadow,transform] zui:duration-200 zui:hover:cursor-pointer zui:hover:scale-110 zui:hover:bg-[var(--zui-theme-bg-surface)] zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)] zui:disabled:pointer-events-none zui:disabled:opacity-45"), Ev = K("zui:flex zui:w-full zui:items-center zui:justify-between zui:gap-2 zui:px-1 zui:pb-1 zui:pt-2"), Dv = K("zui:inline-flex zui:items-center zui:gap-3"), Ov = K("zui:inline-flex zui:h-8 zui:items-center zui:justify-center zui:gap-2 radius-xs zui:px-1 zui:text-base zui:font-semibold zui:outline-none zui:transition-[color,background-color,box-shadow] zui:duration-200 zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)]", {
10922
10924
  variants: { active: {
10923
- true: "zui:bg-transparent zui:text-[var(--zui-theme-action-primary)]",
10924
- false: "zui:bg-transparent zui:text-[var(--zui-theme-text-secondary)] zui:hover:cursor-pointer zui:hover:text-[var(--zui-theme-text-primary)]"
10925
+ true: "zui:bg-transparent zui:text-[var(--zui-color-text)]",
10926
+ false: "zui:bg-transparent zui:text-[var(--zui-color-text)] zui:hover:cursor-pointer zui:hover:text-[var(--zui-color-text)]"
10925
10927
  } },
10926
10928
  defaultVariants: { active: !1 }
10927
- }), kv = K("zui:inline-flex zui:h-8 zui:items-center zui:justify-center zui:gap-1.5 radius-xs zui:px-2 zui:text-xs zui:font-semibold zui:text-[var(--zui-theme-text-secondary)] zui:outline-none zui:transition-[color,background-color,box-shadow] zui:duration-200 zui:hover:cursor-pointer zui:hover:text-[var(--zui-theme-text-primary)] zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)]"), Av = K("zui:mb-2 zui:text-center zui:text-xs zui:text-[var(--zui-theme-text-secondary)]"), jv = K("zui:grid zui:grid-cols-3 zui:gap-2 zui:sm:grid-cols-4"), Mv = K("zui:inline-flex zui:h-8 zui:items-center zui:justify-center radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-theme-bg-page)] zui:px-2 zui:text-sm zui:font-medium zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:transition-[color,background-color,border-color,box-shadow] zui:duration-200 zui:hover:cursor-pointer zui:hover:border-[var(--zui-theme-border-strong)] zui:hover:bg-[var(--zui-theme-bg-surface)] zui:focus-visible:border-[var(--zui-theme-action-primary-hover)] zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)]", {
10929
+ }), kv = K("zui:inline-flex zui:h-8 zui:items-center zui:justify-center zui:gap-1.5 radius-xs zui:px-2 zui:text-xs zui:font-semibold zui:text-[var(--zui-color-text)] zui:outline-none zui:transition-[color,background-color,box-shadow] zui:duration-200 zui:hover:cursor-pointer zui:hover:text-[var(--zui-color-text)] zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)]"), Av = K("zui:mb-2 zui:text-center zui:text-xs zui:text-[var(--zui-color-text)]"), jv = K("zui:grid zui:grid-cols-3 zui:gap-2 zui:sm:grid-cols-4"), Mv = K("zui:inline-flex zui:h-8 zui:items-center zui:justify-center radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-theme-bg-page)] zui:px-2 zui:text-sm zui:font-medium zui:text-[var(--zui-color-text)] zui:outline-none zui:transition-[color,background-color,border-color,box-shadow] zui:duration-200 zui:hover:cursor-pointer zui:hover:border-[var(--zui-theme-border-strong)] zui:hover:bg-[var(--zui-theme-bg-surface)] zui:focus-visible:border-[var(--zui-theme-action-primary-hover)] zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)]", {
10928
10930
  variants: { active: {
10929
- true: "zui:border-[var(--zui-theme-action-primary)] zui:bg-[var(--zui-theme-action-primary)] zui:text-[var(--zui-theme-text-inverse)]",
10931
+ true: "zui:border-[var(--zui-theme-action-primary)] zui:bg-[var(--zui-theme-action-primary)] zui:text-[var(--zui-color-text)]",
10930
10932
  false: ""
10931
10933
  } },
10932
10934
  defaultVariants: { active: !1 }
10933
- }), Nv = K("zui:flex-1 zui:text-center zui:text-sm zui:font-semibold zui:text-[var(--zui-theme-text-muted)]"), Pv = K("zui:inline-flex zui:size-8 zui:items-center zui:justify-center radius-xs zui:text-base zui:font-medium zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:transition-[color,background-color,box-shadow] zui:duration-200 zui:hover:cursor-pointer zui:hover:bg-[var(--zui-theme-bg-surface)] zui:focus-visible:bg-[var(--zui-theme-bg-surface)] zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)] zui:aria-disabled:pointer-events-none zui:aria-disabled:opacity-45"), Fv = new Bc({
10935
+ }), Nv = K("zui:flex-1 zui:text-center zui:text-sm zui:font-semibold zui:text-[var(--zui-color-text)]"), Pv = K("zui:inline-flex zui:size-8 zui:items-center zui:justify-center radius-xs zui:text-base zui:font-medium zui:text-[var(--zui-color-text)] zui:outline-none zui:transition-[color,background-color,box-shadow] zui:duration-200 zui:hover:cursor-pointer zui:hover:bg-[var(--zui-theme-bg-surface)] zui:focus-visible:bg-[var(--zui-theme-bg-surface)] zui:focus-visible:shadow-[0_0_0_1px_var(--zui-theme-action-primary)] zui:aria-disabled:pointer-events-none zui:aria-disabled:opacity-45"), Fv = new Bc({
10934
10936
  locale: Xs,
10935
10937
  numerals: "latn"
10936
10938
  }), Iv = bv();
@@ -11106,14 +11108,14 @@ function oy({ className: t, size: n = "default", title: r, required: i = !1, pla
11106
11108
  week: G("zui:mt-1 zui:flex zui:w-full", e.week),
11107
11109
  day: G("zui:relative zui:flex-1 zui:p-0 zui:text-center", e.day),
11108
11110
  day_button: G(Pv(), e.day_button),
11109
- selected: G("zui:rounded-[0.7rem] zui:bg-[var(--zui-theme-action-primary)] zui:text-[var(--zui-theme-text-inverse)] zui:hover:bg-[var(--zui-theme-action-primary-hover)] zui:focus-visible:bg-[var(--zui-theme-action-primary-hover)]", e.selected),
11111
+ selected: G("zui:rounded-[0.7rem] zui:bg-[var(--zui-theme-action-primary)] zui:text-[var(--zui-color-text)] zui:hover:bg-[var(--zui-theme-action-primary-hover)] zui:focus-visible:bg-[var(--zui-theme-action-primary-hover)]", e.selected),
11110
11112
  today: G("zui:border zui:border-[var(--zui-theme-action-secondary)] zui:text-[var(--zui-theme-action-secondary)]", e.today),
11111
- outside: G("zui:text-[var(--zui-theme-text-muted)] zui:opacity-55", e.outside),
11112
- disabled: G("zui:text-[var(--zui-theme-text-muted)] zui:opacity-45", e.disabled),
11113
+ outside: G("zui:text-[var(--zui-color-text)] zui:opacity-55", e.outside),
11114
+ disabled: G("zui:text-[var(--zui-color-text)] zui:opacity-45", e.disabled),
11113
11115
  hidden: G("zui:invisible", e.hidden),
11114
- range_start: G("zui:rounded-r-[var(--zui-radius-xs)] zui:bg-[var(--zui-theme-action-primary)] zui:text-[var(--zui-theme-text-inverse)]", e.range_start),
11115
- range_end: G("zui:rounded-l-[var(--zui-radius-xs)] zui:bg-[var(--zui-theme-action-primary)] zui:text-[var(--zui-theme-text-inverse)]", e.range_end),
11116
- range_middle: G("zui:bg-[var(--zui-theme-action-primary)]/15 zui:text-[var(--zui-theme-text-primary)]", e.range_middle)
11116
+ range_start: G("zui:rounded-r-[var(--zui-radius-xs)] zui:bg-[var(--zui-theme-action-primary)] zui:text-[var(--zui-color-text)]", e.range_start),
11117
+ range_end: G("zui:rounded-l-[var(--zui-radius-xs)] zui:bg-[var(--zui-theme-action-primary)] zui:text-[var(--zui-color-text)]", e.range_end),
11118
+ range_middle: G("zui:bg-[var(--zui-theme-action-primary)]/15 zui:text-[var(--zui-color-text)]", e.range_middle)
11117
11119
  };
11118
11120
  }, []), ke = e.useCallback((e) => {
11119
11121
  se((t) => {
@@ -11235,7 +11237,7 @@ function oy({ className: t, size: n = "default", title: r, required: i = !1, pla
11235
11237
  children: [
11236
11238
  r ? /* @__PURE__ */ (0, M.jsxs)("label", {
11237
11239
  htmlFor: T,
11238
- className: "zui:block zui:text-sm zui:font-medium zui:text-[var(--zui-theme-text-primary)]",
11240
+ className: "zui:block zui:text-sm zui:font-medium zui:text-[var(--zui-color-text)]",
11239
11241
  children: [r, E ? /* @__PURE__ */ (0, M.jsx)("span", {
11240
11242
  className: "zui:mr-1 zui:text-[var(--zui-theme-status-danger)]",
11241
11243
  children: "*"
@@ -11256,9 +11258,9 @@ function oy({ className: t, size: n = "default", title: r, required: i = !1, pla
11256
11258
  disabled: S,
11257
11259
  className: G(Cv({ size: n }), t),
11258
11260
  children: [/* @__PURE__ */ (0, M.jsx)("span", {
11259
- className: G("zui:truncate zui:text-sm zui:sm:text-base", ve ? "zui:text-[var(--zui-theme-text-primary)]" : "zui:text-[var(--zui-theme-text-muted)]"),
11261
+ className: G("zui:truncate zui:text-sm zui:sm:text-base", "zui:text-[var(--zui-color-text)]"),
11260
11262
  children: ye ?? be
11261
- }), /* @__PURE__ */ (0, M.jsx)(Xe, { className: "zui:size-4 zui:text-[var(--zui-theme-text-secondary)]" })]
11263
+ }), /* @__PURE__ */ (0, M.jsx)(Xe, { className: "zui:size-4 zui:text-[var(--zui-color-text)]" })]
11262
11264
  })
11263
11265
  }), /* @__PURE__ */ (0, M.jsx)(Ho, { children: /* @__PURE__ */ (0, M.jsx)(Uo, {
11264
11266
  "data-slot": "date-picker-content",
@@ -11730,795 +11732,14 @@ function lb({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, dir: i =
11730
11732
  }
11731
11733
  //#endregion
11732
11734
  //#region src/components/Input/Input.variant.ts
11733
- var ub = K(["zui:file:text-[var(--zui-theme-text-primary)] zui:placeholder:text-[var(--zui-theme-text-muted)] zui:selection:bg-[var(--zui-theme-action-primary)] zui:selection:text-[var(--zui-theme-text-inverse)] zui:flex zui:w-full zui:min-w-0 radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-transparent zui:px-3 zui:py-2 zui:text-base zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:file:inline-flex zui:file:h-7 zui:file:border-0 zui:file:bg-transparent zui:file:text-sm zui:file:font-medium zui:data-[has-value=true]:border-[var(--zui-theme-action-primary)] zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:bg-[var(--zui-color-muted-surface)] zui:disabled:opacity-50 zui:md:text-sm", xv].join(" "), {
11735
+ var ub = K(["zui:file:text-[var(--zui-color-text)] zui:placeholder:text-[var(--zui-color-text)] zui:selection:bg-[var(--zui-theme-action-primary)] zui:selection:text-[var(--zui-theme-text-inverse)] zui:flex zui:w-full zui:min-w-0 radius-xs zui:border zui:border-[var(--zui-color-border)] zui:bg-transparent zui:px-3 zui:py-2 zui:text-base zui:text-[var(--zui-color-text)] zui:outline-none zui:file:inline-flex zui:file:h-7 zui:file:border-0 zui:file:bg-transparent zui:file:text-sm zui:file:font-medium zui:data-[has-value=true]:border-[var(--zui-theme-action-primary)] zui:[&:not(:focus):not(:focus-visible):not([data-has-value=true])]:border-[var(--zui-color-border)] zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:bg-[var(--zui-color-muted-surface)] zui:disabled:opacity-50 zui:md:text-sm", xv].join(" "), {
11734
11736
  variants: { size: {
11735
11737
  sm: "zui:h-[2.88rem]",
11736
11738
  default: "zui:h-[3.24rem]",
11737
11739
  lg: "zui:h-[3.6rem]"
11738
11740
  } },
11739
11741
  defaultVariants: { size: "default" }
11740
- });
11741
- //#endregion
11742
- //#region src/components/Input/Input.tsx
11743
- function db(e) {
11744
- return e == null ? !1 : typeof e == "string" ? e.length > 0 : typeof e == "number" ? !0 : Array.isArray(e) ? e.length > 0 : !1;
11745
- }
11746
- function fb({ className: t, size: n = "default", type: r = "text", title: i, required: a = !1, characterLimit: o, placeholder: s, onChange: c, onBlur: l, onFocus: u, onInvalid: d, id: f, name: p, disabled: m = !1, readOnly: h = !1, autoComplete: g, "aria-label": _, value: v, defaultValue: y, maxLength: b }) {
11747
- let [x, S] = e.useState(!1), [C, w] = e.useState(() => db(v ?? y)), [T, E] = e.useState(!1), D = e.useId(), O = f ?? D, k = e.useRef(null), A = r === "search", j = r === "password", N = a, ee = j ? x ? "text" : "password" : r, P = v !== void 0;
11748
- e.useEffect(() => {
11749
- P && w(db(v));
11750
- }, [P, v]);
11751
- let te = e.useCallback((e) => {
11752
- P || w(db(e.target.value)), T && E(!1), c?.(e);
11753
- }, [
11754
- P,
11755
- T,
11756
- c
11757
- ]), F = e.useCallback((e) => {
11758
- w(db(e.target.value)), l?.(e);
11759
- }, [l]), I = e.useCallback((e) => {
11760
- E(!0), d?.(e);
11761
- }, [d]), L = e.useCallback(() => {
11762
- let e = k.current;
11763
- if (!e) return;
11764
- let t = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
11765
- t ? t.call(e, "") : e.value = "", w(!1), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus();
11766
- }, []);
11767
- return /* @__PURE__ */ (0, M.jsxs)("div", {
11768
- "data-slot": "input-field",
11769
- dir: "rtl",
11770
- className: "zui:w-full zui:space-y-1.5 zui:text-right",
11771
- children: [i ? /* @__PURE__ */ (0, M.jsxs)("label", {
11772
- htmlFor: O,
11773
- className: "zui:block zui:text-sm zui:font-medium zui:text-[var(--zui-theme-text-primary)]",
11774
- children: [i, N ? /* @__PURE__ */ (0, M.jsx)("span", {
11775
- className: "zui:mr-1 zui:text-base zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
11776
- children: "*"
11777
- }) : null]
11778
- }) : null, /* @__PURE__ */ (0, M.jsxs)("div", {
11779
- className: "zui:relative",
11780
- children: [
11781
- !i && N ? /* @__PURE__ */ (0, M.jsx)("span", {
11782
- "aria-hidden": "true",
11783
- className: "zui:pointer-events-none zui:absolute zui:-right-1 zui:-top-1 zui:z-10 zui:text-xs zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
11784
- children: "*"
11785
- }) : null,
11786
- A && !C ? /* @__PURE__ */ (0, M.jsx)(ft, {
11787
- className: "zui:pointer-events-none zui:absolute zui:right-3 zui:top-1/2 zui:size-4 zui:-translate-y-1/2 zui:text-[var(--zui-theme-text-primary)]",
11788
- "aria-hidden": "true"
11789
- }) : null,
11790
- /* @__PURE__ */ (0, M.jsx)("input", {
11791
- ref: k,
11792
- id: O,
11793
- "data-slot": "input",
11794
- type: ee,
11795
- maxLength: o ?? b,
11796
- required: N,
11797
- "aria-invalid": T || void 0,
11798
- "data-has-value": C,
11799
- placeholder: s,
11800
- name: p,
11801
- disabled: m,
11802
- readOnly: h,
11803
- autoComplete: g,
11804
- "aria-label": _,
11805
- onChange: te,
11806
- onBlur: F,
11807
- onFocus: u,
11808
- onInvalid: I,
11809
- value: v,
11810
- defaultValue: y,
11811
- className: G(ub({
11812
- size: n,
11813
- className: t
11814
- }), j || r === "number" ? "zui:text-center" : "zui:text-right", r === "number" ? "input-no-spinner" : void 0, A ? "input-search-cancel zui:pr-10 zui:pl-10" : void 0, j ? "zui:pl-10" : void 0)
11815
- }),
11816
- A && C ? /* @__PURE__ */ (0, M.jsx)("button", {
11817
- type: "button",
11818
- onClick: L,
11819
- className: "zui:absolute zui:left-3 zui:top-1/2 zui:-translate-y-1/2 zui:cursor-pointer zui:text-[var(--zui-theme-text-primary)] zui:transition-all zui:duration-200 zui:ease-out zui:hover:scale-110 zui:hover:opacity-80 zui:focus-visible:outline-none",
11820
- "aria-label": "Clear search",
11821
- children: /* @__PURE__ */ (0, M.jsx)(ht, {
11822
- className: "zui:size-5",
11823
- "aria-hidden": "true"
11824
- })
11825
- }) : null,
11826
- j ? /* @__PURE__ */ (0, M.jsx)("button", {
11827
- type: "button",
11828
- onClick: () => S((e) => !e),
11829
- className: "zui:absolute zui:left-3 zui:top-1/2 zui:-translate-y-1/2 zui:cursor-pointer zui:text-[var(--zui-theme-text-primary)] zui:transition-opacity zui:hover:opacity-80 zui:focus-visible:outline-none",
11830
- "aria-label": x ? "Hide password" : "Show password",
11831
- children: x ? /* @__PURE__ */ (0, M.jsx)(at, {
11832
- className: "zui:size-4",
11833
- "aria-hidden": "true"
11834
- }) : /* @__PURE__ */ (0, M.jsx)(ot, {
11835
- className: "zui:size-4",
11836
- "aria-hidden": "true"
11837
- })
11838
- }) : null
11839
- ]
11840
- })]
11841
- });
11842
- }
11843
- //#endregion
11844
- //#region src/services/convertToPersianDigits/convertToPersianDigits.ts
11845
- var pb = [
11846
- "۰",
11847
- "۱",
11848
- "۲",
11849
- "۳",
11850
- "۴",
11851
- "۵",
11852
- "۶",
11853
- "۷",
11854
- "۸",
11855
- "۹"
11856
- ];
11857
- function mb({ value: e }) {
11858
- return e.replace(/\d/g, (e) => pb[Number(e)]);
11859
- }
11860
- //#endregion
11861
- //#region src/components/Pagination/Pagination.variant.ts
11862
- var hb = K("zui:mx-auto zui:flex zui:w-full zui:justify-center"), gb = K("zui:flex zui:flex-row zui:items-center zui:gap-1"), _b = K(""), vb = K("zui:inline-flex zui:items-center zui:justify-center zui:gap-1 zui:whitespace-nowrap radius-sm zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-theme-bg-page)] zui:text-sm zui:font-medium zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:select-none zui:transition-all zui:duration-300 zui:ease-out zui:hover:border-[var(--zui-theme-border-strong)] zui:hover:bg-[var(--zui-theme-bg-elevated)] zui:focus-visible:ring-[3px] zui:focus-visible:ring-[var(--zui-theme-action-secondary)] zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:opacity-45", {
11863
- variants: {
11864
- size: {
11865
- default: "zui:h-9 zui:min-w-9 zui:px-3",
11866
- icon: "zui:size-9"
11867
- },
11868
- active: {
11869
- true: "zui:border-[var(--zui-theme-action-primary)] zui:text-[var(--zui-theme-action-primary)] zui:hover:border-[var(--zui-theme-action-primary-hover)] zui:hover:text-[var(--zui-theme-action-primary-hover)]",
11870
- false: ""
11871
- }
11872
- },
11873
- defaultVariants: {
11874
- size: "icon",
11875
- active: !1
11876
- }
11877
- }), yb = K("zui:gap-1.5 zui:pl-2.5 zui:pr-3"), bb = K("zui:gap-1.5 zui:pl-3 zui:pr-2.5"), xb = K("zui:flex zui:size-9 zui:items-center zui:justify-center zui:text-[var(--zui-theme-text-muted)]"), Sb = "صفحه بندی", Cb = "قبلی", wb = "بعدی", Tb = "صفحات بیشتر";
11878
- function Eb(e, t) {
11879
- if (typeof e != "number" || !Number.isFinite(e)) return t;
11880
- let n = Math.floor(e);
11881
- return n >= 1 ? n : t;
11882
- }
11883
- function Db(e, t) {
11884
- return Math.min(Math.max(e, 1), t);
11885
- }
11886
- function Ob({ currentPage: e, totalPages: t, siblingCount: n }) {
11887
- if (t <= 1) return [1];
11888
- if (t <= n * 2 + 5) return Array.from({ length: t }, (e, t) => t + 1);
11889
- let r = Math.max(e - n, 2), i = Math.min(e + n, t - 1), a = r > 2, o = i < t - 1, s = [1];
11890
- if (a) s.push("ellipsis");
11891
- else for (let e = 2; e < r; e += 1) s.push(e);
11892
- for (let e = r; e <= i; e += 1) s.push(e);
11893
- if (o) s.push("ellipsis");
11894
- else for (let e = i + 1; e < t; e += 1) s.push(e);
11895
- return s.push(t), s;
11896
- }
11897
- function kb(e) {
11898
- return mb({ value: String(e) });
11899
- }
11900
- function Ab({ totalPages: t = 1, page: n, defaultPage: r = 1, siblingCount: i = 1, showControls: a = !0, previousLabel: o = Cb, nextLabel: s = wb, dir: c = "rtl", className: l, onPageChange: u }) {
11901
- let d = Eb(t, 1), f = Db(Eb(r, 1), d), p = n !== void 0, [m, h] = e.useState(f), g = Eb(n, 1), _ = Db(p ? g : m, d), v = Math.max(0, Math.floor(i)), y = e.useMemo(() => Ob({
11902
- currentPage: _,
11903
- totalPages: d,
11904
- siblingCount: v
11905
- }), [
11906
- _,
11907
- v,
11908
- d
11909
- ]), b = e.useCallback((e) => {
11910
- let t = Db(e, d);
11911
- t !== _ && (p || h(t), u?.(t));
11912
- }, [
11913
- _,
11914
- p,
11915
- u,
11916
- d
11917
- ]), x = _ > 1, S = _ < d;
11918
- return /* @__PURE__ */ (0, M.jsx)("nav", {
11919
- role: "navigation",
11920
- "aria-label": Sb,
11921
- dir: c,
11922
- "data-slot": "pagination",
11923
- className: G(hb(), l),
11924
- children: /* @__PURE__ */ (0, M.jsxs)("ul", {
11925
- "data-slot": "pagination-content",
11926
- className: gb(),
11927
- children: [
11928
- a ? /* @__PURE__ */ (0, M.jsx)("li", {
11929
- "data-slot": "pagination-item",
11930
- className: _b(),
11931
- children: /* @__PURE__ */ (0, M.jsxs)("button", {
11932
- type: "button",
11933
- "data-slot": "pagination-previous",
11934
- "aria-label": o,
11935
- disabled: !x,
11936
- onClick: () => b(_ - 1),
11937
- className: G(vb({ size: "default" }), yb()),
11938
- children: [/* @__PURE__ */ (0, M.jsx)(et, {
11939
- className: "zui:size-4",
11940
- "aria-hidden": "true"
11941
- }), /* @__PURE__ */ (0, M.jsx)("span", { children: o })]
11942
- })
11943
- }) : null,
11944
- y.map((e, t) => {
11945
- if (e === "ellipsis") return /* @__PURE__ */ (0, M.jsx)("li", {
11946
- "data-slot": "pagination-item",
11947
- className: _b(),
11948
- children: /* @__PURE__ */ (0, M.jsxs)("span", {
11949
- "data-slot": "pagination-ellipsis",
11950
- "aria-hidden": "true",
11951
- className: xb(),
11952
- children: [/* @__PURE__ */ (0, M.jsx)(it, { className: "zui:size-4" }), /* @__PURE__ */ (0, M.jsx)("span", {
11953
- className: "zui:sr-only",
11954
- children: Tb
11955
- })]
11956
- })
11957
- }, `ellipsis-${t}`);
11958
- let n = e === _;
11959
- return /* @__PURE__ */ (0, M.jsx)("li", {
11960
- "data-slot": "pagination-item",
11961
- className: _b(),
11962
- children: /* @__PURE__ */ (0, M.jsx)("button", {
11963
- type: "button",
11964
- "data-slot": "pagination-link",
11965
- "aria-label": `${Sb} ${kb(e)}`,
11966
- "aria-current": n ? "page" : void 0,
11967
- onClick: () => b(e),
11968
- className: vb({
11969
- size: "icon",
11970
- active: n
11971
- }),
11972
- children: kb(e)
11973
- })
11974
- }, `page-${e}`);
11975
- }),
11976
- a ? /* @__PURE__ */ (0, M.jsx)("li", {
11977
- "data-slot": "pagination-item",
11978
- className: _b(),
11979
- children: /* @__PURE__ */ (0, M.jsxs)("button", {
11980
- type: "button",
11981
- "data-slot": "pagination-next",
11982
- "aria-label": s,
11983
- disabled: !S,
11984
- onClick: () => b(_ + 1),
11985
- className: G(vb({ size: "default" }), bb()),
11986
- children: [/* @__PURE__ */ (0, M.jsx)("span", { children: s }), /* @__PURE__ */ (0, M.jsx)(tt, {
11987
- className: "zui:size-4",
11988
- "aria-hidden": "true"
11989
- })]
11990
- })
11991
- }) : null
11992
- ]
11993
- })
11994
- });
11995
- }
11996
- //#endregion
11997
- //#region node_modules/@radix-ui/react-collection/dist/index.mjs
11998
- function jb(e) {
11999
- let n = e + "CollectionProvider", [r, i] = z(n), [a, o] = r(n, {
12000
- collectionRef: { current: null },
12001
- itemMap: /* @__PURE__ */ new Map()
12002
- }), s = (e) => {
12003
- let { scope: n, children: r } = e, i = t.useRef(null), o = t.useRef(/* @__PURE__ */ new Map()).current;
12004
- return /* @__PURE__ */ (0, M.jsx)(a, {
12005
- scope: n,
12006
- itemMap: o,
12007
- collectionRef: i,
12008
- children: r
12009
- });
12010
- };
12011
- s.displayName = n;
12012
- let c = e + "CollectionSlot", l = /* @__PURE__ */ he(c), u = t.forwardRef((e, t) => {
12013
- let { scope: n, children: r } = e;
12014
- return /* @__PURE__ */ (0, M.jsx)(l, {
12015
- ref: R(t, o(c, n).collectionRef),
12016
- children: r
12017
- });
12018
- });
12019
- u.displayName = c;
12020
- let d = e + "CollectionItemSlot", f = "data-radix-collection-item", p = /* @__PURE__ */ he(d), m = t.forwardRef((e, n) => {
12021
- let { scope: r, children: i, ...a } = e, s = t.useRef(null), c = R(n, s), l = o(d, r);
12022
- return t.useEffect(() => (l.itemMap.set(s, {
12023
- ref: s,
12024
- ...a
12025
- }), () => void l.itemMap.delete(s))), /* @__PURE__ */ (0, M.jsx)(p, {
12026
- [f]: "",
12027
- ref: c,
12028
- children: i
12029
- });
12030
- });
12031
- m.displayName = d;
12032
- function h(n) {
12033
- let r = o(e + "CollectionConsumer", n);
12034
- return t.useCallback(() => {
12035
- let e = r.collectionRef.current;
12036
- if (!e) return [];
12037
- let t = Array.from(e.querySelectorAll(`[${f}]`));
12038
- return Array.from(r.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
12039
- }, [r.collectionRef, r.itemMap]);
12040
- }
12041
- return [
12042
- {
12043
- Provider: s,
12044
- Slot: u,
12045
- ItemSlot: m
12046
- },
12047
- h,
12048
- i
12049
- ];
12050
- }
12051
- //#endregion
12052
- //#region node_modules/@radix-ui/react-direction/dist/index.mjs
12053
- var Mb = e.createContext(void 0);
12054
- function Nb(t) {
12055
- let n = e.useContext(Mb);
12056
- return t || n || "ltr";
12057
- }
12058
- //#endregion
12059
- //#region node_modules/@radix-ui/react-roving-focus/dist/index.mjs
12060
- var Pb = "rovingFocusGroup.onEntryFocus", Fb = {
12061
- bubbles: !1,
12062
- cancelable: !0
12063
- }, Ib = "RovingFocusGroup", [Lb, Rb, zb] = jb(Ib), [Bb, Vb] = z(Ib, [zb]), [Hb, Ub] = Bb(Ib), Wb = e.forwardRef((e, t) => /* @__PURE__ */ (0, M.jsx)(Lb.Provider, {
12064
- scope: e.__scopeRovingFocusGroup,
12065
- children: /* @__PURE__ */ (0, M.jsx)(Lb.Slot, {
12066
- scope: e.__scopeRovingFocusGroup,
12067
- children: /* @__PURE__ */ (0, M.jsx)(Gb, {
12068
- ...e,
12069
- ref: t
12070
- })
12071
- })
12072
- }));
12073
- Wb.displayName = Ib;
12074
- var Gb = e.forwardRef((t, n) => {
12075
- let { __scopeRovingFocusGroup: r, orientation: i, loop: a = !1, dir: o, currentTabStopId: s, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: l, onEntryFocus: u, preventScrollOnEntryFocus: d = !1, ...f } = t, p = e.useRef(null), m = R(n, p), h = Nb(o), [g, _] = H({
12076
- prop: s,
12077
- defaultProp: c ?? null,
12078
- onChange: l,
12079
- caller: Ib
12080
- }), [v, y] = e.useState(!1), b = wt(u), x = Rb(r), S = e.useRef(!1), [C, w] = e.useState(0);
12081
- return e.useEffect(() => {
12082
- let e = p.current;
12083
- if (e) return e.addEventListener(Pb, b), () => e.removeEventListener(Pb, b);
12084
- }, [b]), /* @__PURE__ */ (0, M.jsx)(Hb, {
12085
- scope: r,
12086
- orientation: i,
12087
- dir: h,
12088
- loop: a,
12089
- currentTabStopId: g,
12090
- onItemFocus: e.useCallback((e) => _(e), [_]),
12091
- onItemShiftTab: e.useCallback(() => y(!0), []),
12092
- onFocusableItemAdd: e.useCallback(() => w((e) => e + 1), []),
12093
- onFocusableItemRemove: e.useCallback(() => w((e) => e - 1), []),
12094
- children: /* @__PURE__ */ (0, M.jsx)(W.div, {
12095
- tabIndex: v || C === 0 ? -1 : 0,
12096
- "data-orientation": i,
12097
- ...f,
12098
- ref: m,
12099
- style: {
12100
- outline: "none",
12101
- ...t.style
12102
- },
12103
- onMouseDown: B(t.onMouseDown, () => {
12104
- S.current = !0;
12105
- }),
12106
- onFocus: B(t.onFocus, (e) => {
12107
- let t = !S.current;
12108
- if (e.target === e.currentTarget && t && !v) {
12109
- let t = new CustomEvent(Pb, Fb);
12110
- if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
12111
- let e = x().filter((e) => e.focusable);
12112
- Zb([
12113
- e.find((e) => e.active),
12114
- e.find((e) => e.id === g),
12115
- ...e
12116
- ].filter(Boolean).map((e) => e.ref.current), d);
12117
- }
12118
- }
12119
- S.current = !1;
12120
- }),
12121
- onBlur: B(t.onBlur, () => y(!1))
12122
- })
12123
- });
12124
- }), Kb = "RovingFocusGroupItem", qb = e.forwardRef((t, n) => {
12125
- let { __scopeRovingFocusGroup: r, focusable: i = !0, active: a = !1, tabStopId: o, children: s, ...c } = t, l = ln(), u = o || l, d = Ub(Kb, r), f = d.currentTabStopId === u, p = Rb(r), { onFocusableItemAdd: m, onFocusableItemRemove: h, currentTabStopId: g } = d;
12126
- return e.useEffect(() => {
12127
- if (i) return m(), () => h();
12128
- }, [
12129
- i,
12130
- m,
12131
- h
12132
- ]), /* @__PURE__ */ (0, M.jsx)(Lb.ItemSlot, {
12133
- scope: r,
12134
- id: u,
12135
- focusable: i,
12136
- active: a,
12137
- children: /* @__PURE__ */ (0, M.jsx)(W.span, {
12138
- tabIndex: f ? 0 : -1,
12139
- "data-orientation": d.orientation,
12140
- ...c,
12141
- ref: n,
12142
- onMouseDown: B(t.onMouseDown, (e) => {
12143
- i ? d.onItemFocus(u) : e.preventDefault();
12144
- }),
12145
- onFocus: B(t.onFocus, () => d.onItemFocus(u)),
12146
- onKeyDown: B(t.onKeyDown, (e) => {
12147
- if (e.key === "Tab" && e.shiftKey) {
12148
- d.onItemShiftTab();
12149
- return;
12150
- }
12151
- if (e.target !== e.currentTarget) return;
12152
- let t = Xb(e, d.orientation, d.dir);
12153
- if (t !== void 0) {
12154
- if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
12155
- e.preventDefault();
12156
- let n = p().filter((e) => e.focusable).map((e) => e.ref.current);
12157
- if (t === "last") n.reverse();
12158
- else if (t === "prev" || t === "next") {
12159
- t === "prev" && n.reverse();
12160
- let r = n.indexOf(e.currentTarget);
12161
- n = d.loop ? Qb(n, r + 1) : n.slice(r + 1);
12162
- }
12163
- setTimeout(() => Zb(n));
12164
- }
12165
- }),
12166
- children: typeof s == "function" ? s({
12167
- isCurrentTabStop: f,
12168
- hasTabStop: g != null
12169
- }) : s
12170
- })
12171
- });
12172
- });
12173
- qb.displayName = Kb;
12174
- var Jb = {
12175
- ArrowLeft: "prev",
12176
- ArrowUp: "prev",
12177
- ArrowRight: "next",
12178
- ArrowDown: "next",
12179
- PageUp: "first",
12180
- Home: "first",
12181
- PageDown: "last",
12182
- End: "last"
12183
- };
12184
- function Yb(e, t) {
12185
- return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
12186
- }
12187
- function Xb(e, t, n) {
12188
- let r = Yb(e.key, n);
12189
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return Jb[r];
12190
- }
12191
- function Zb(e, t = !1) {
12192
- let n = document.activeElement;
12193
- for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
12194
- }
12195
- function Qb(e, t) {
12196
- return e.map((n, r) => e[(t + r) % e.length]);
12197
- }
12198
- var $b = Wb, ex = qb, tx = "Radio", [nx, rx] = z(tx), [ix, ax] = nx(tx), ox = e.forwardRef((t, n) => {
12199
- let { __scopeRadio: r, name: i, checked: a = !1, required: o, disabled: s, value: c = "on", onCheck: l, form: u, ...d } = t, [f, p] = e.useState(null), m = R(n, (e) => p(e)), h = e.useRef(!1), g = f ? u || !!f.closest("form") : !0;
12200
- return /* @__PURE__ */ (0, M.jsxs)(ix, {
12201
- scope: r,
12202
- checked: a,
12203
- disabled: s,
12204
- children: [/* @__PURE__ */ (0, M.jsx)(W.button, {
12205
- type: "button",
12206
- role: "radio",
12207
- "aria-checked": a,
12208
- "data-state": dx(a),
12209
- "data-disabled": s ? "" : void 0,
12210
- disabled: s,
12211
- value: c,
12212
- ...d,
12213
- ref: m,
12214
- onClick: B(t.onClick, (e) => {
12215
- a || l?.(), g && (h.current = e.isPropagationStopped(), h.current || e.stopPropagation());
12216
- })
12217
- }), g && /* @__PURE__ */ (0, M.jsx)(ux, {
12218
- control: f,
12219
- bubbles: !h.current,
12220
- name: i,
12221
- value: c,
12222
- checked: a,
12223
- required: o,
12224
- disabled: s,
12225
- form: u,
12226
- style: { transform: "translateX(-100%)" }
12227
- })]
12228
- });
12229
- });
12230
- ox.displayName = tx;
12231
- var sx = "RadioIndicator", cx = e.forwardRef((e, t) => {
12232
- let { __scopeRadio: n, forceMount: r, ...i } = e, a = ax(sx, n);
12233
- return /* @__PURE__ */ (0, M.jsx)(de, {
12234
- present: r || a.checked,
12235
- children: /* @__PURE__ */ (0, M.jsx)(W.span, {
12236
- "data-state": dx(a.checked),
12237
- "data-disabled": a.disabled ? "" : void 0,
12238
- ...i,
12239
- ref: t
12240
- })
12241
- });
12242
- });
12243
- cx.displayName = sx;
12244
- var lx = "RadioBubbleInput", ux = e.forwardRef(({ __scopeRadio: t, control: n, checked: r, bubbles: i = !0, ...a }, o) => {
12245
- let s = e.useRef(null), c = R(s, o), l = ce(r), u = le(n);
12246
- return e.useEffect(() => {
12247
- let e = s.current;
12248
- if (!e) return;
12249
- let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set;
12250
- if (l !== r && n) {
12251
- let t = new Event("click", { bubbles: i });
12252
- n.call(e, r), e.dispatchEvent(t);
12253
- }
12254
- }, [
12255
- l,
12256
- r,
12257
- i
12258
- ]), /* @__PURE__ */ (0, M.jsx)(W.input, {
12259
- type: "radio",
12260
- "aria-hidden": !0,
12261
- defaultChecked: r,
12262
- ...a,
12263
- tabIndex: -1,
12264
- ref: c,
12265
- style: {
12266
- ...a.style,
12267
- ...u,
12268
- position: "absolute",
12269
- pointerEvents: "none",
12270
- opacity: 0,
12271
- margin: 0
12272
- }
12273
- });
12274
- });
12275
- ux.displayName = lx;
12276
- function dx(e) {
12277
- return e ? "checked" : "unchecked";
12278
- }
12279
- var fx = [
12280
- "ArrowUp",
12281
- "ArrowDown",
12282
- "ArrowLeft",
12283
- "ArrowRight"
12284
- ], px = "RadioGroup", [mx, hx] = z(px, [Vb, rx]), gx = Vb(), _x = rx(), [vx, yx] = mx(px), bx = e.forwardRef((e, t) => {
12285
- let { __scopeRadioGroup: n, name: r, defaultValue: i, value: a, required: o = !1, disabled: s = !1, orientation: c, dir: l, loop: u = !0, onValueChange: d, ...f } = e, p = gx(n), m = Nb(l), [h, g] = H({
12286
- prop: a,
12287
- defaultProp: i ?? null,
12288
- onChange: d,
12289
- caller: px
12290
- });
12291
- return /* @__PURE__ */ (0, M.jsx)(vx, {
12292
- scope: n,
12293
- name: r,
12294
- required: o,
12295
- disabled: s,
12296
- value: h,
12297
- onValueChange: g,
12298
- children: /* @__PURE__ */ (0, M.jsx)($b, {
12299
- asChild: !0,
12300
- ...p,
12301
- orientation: c,
12302
- dir: m,
12303
- loop: u,
12304
- children: /* @__PURE__ */ (0, M.jsx)(W.div, {
12305
- role: "radiogroup",
12306
- "aria-required": o,
12307
- "aria-orientation": c,
12308
- "data-disabled": s ? "" : void 0,
12309
- dir: m,
12310
- ...f,
12311
- ref: t
12312
- })
12313
- })
12314
- });
12315
- });
12316
- bx.displayName = px;
12317
- var xx = "RadioGroupItem", Sx = e.forwardRef((t, n) => {
12318
- let { __scopeRadioGroup: r, disabled: i, ...a } = t, o = yx(xx, r), s = o.disabled || i, c = gx(r), l = _x(r), u = e.useRef(null), d = R(n, u), f = o.value === a.value, p = e.useRef(!1);
12319
- return e.useEffect(() => {
12320
- let e = (e) => {
12321
- fx.includes(e.key) && (p.current = !0);
12322
- }, t = () => p.current = !1;
12323
- return document.addEventListener("keydown", e), document.addEventListener("keyup", t), () => {
12324
- document.removeEventListener("keydown", e), document.removeEventListener("keyup", t);
12325
- };
12326
- }, []), /* @__PURE__ */ (0, M.jsx)(ex, {
12327
- asChild: !0,
12328
- ...c,
12329
- focusable: !s,
12330
- active: f,
12331
- children: /* @__PURE__ */ (0, M.jsx)(ox, {
12332
- disabled: s,
12333
- required: o.required,
12334
- checked: f,
12335
- ...l,
12336
- ...a,
12337
- name: o.name,
12338
- ref: d,
12339
- onCheck: () => o.onValueChange(a.value),
12340
- onKeyDown: B((e) => {
12341
- e.key === "Enter" && e.preventDefault();
12342
- }),
12343
- onFocus: B(a.onFocus, () => {
12344
- p.current && u.current?.click();
12345
- })
12346
- })
12347
- });
12348
- });
12349
- Sx.displayName = xx;
12350
- var Cx = "RadioGroupIndicator", wx = e.forwardRef((e, t) => {
12351
- let { __scopeRadioGroup: n, ...r } = e;
12352
- return /* @__PURE__ */ (0, M.jsx)(cx, {
12353
- ..._x(n),
12354
- ...r,
12355
- ref: t
12356
- });
12357
- });
12358
- wx.displayName = Cx;
12359
- var Tx = bx, Ex = Sx, Dx = wx, Ox = K("zui:grid", {
12360
- variants: {
12361
- orientation: {
12362
- vertical: "zui:grid-cols-1",
12363
- horizontal: "zui:grid-cols-1 zui:sm:grid-cols-2"
12364
- },
12365
- gap: {
12366
- sm: "zui:gap-2",
12367
- default: "zui:gap-3",
12368
- lg: "zui:gap-4"
12369
- },
12370
- disabled: {
12371
- true: "zui:pointer-events-none zui:opacity-55",
12372
- false: ""
12373
- }
12374
- },
12375
- defaultVariants: {
12376
- orientation: "vertical",
12377
- gap: "default",
12378
- disabled: !1
12379
- }
12380
- }), kx = K("zui:group/radio zui:relative zui:inline-flex zui:size-[1.2rem] zui:shrink-0 zui:items-center zui:justify-center radius-full zui:border zui:border-[var(--zui-theme-border-strong)] zui:bg-[var(--zui-theme-bg-page)] zui:text-[var(--zui-theme-action-primary)] zui:shadow-xs zui:cursor-pointer zui:outline-none zui:select-none zui:transition-all zui:duration-300 zui:ease-out zui:data-[state=checked]:border-[var(--zui-theme-action-primary)] zui:data-[state=checked]:bg-[var(--zui-theme-bg-page)] zui:hover:-translate-y-0.5 zui:hover:border-[var(--zui-theme-action-primary-hover)] zui:hover:bg-[var(--zui-theme-bg-elevated)] zui:hover:shadow-[0_8px_20px_-12px_var(--zui-effect-shadow-ink-35)] zui:active:translate-y-px zui:focus-visible:border-[var(--zui-theme-action-secondary)] zui:focus-visible:ring-[3px] zui:focus-visible:ring-[var(--zui-theme-action-secondary)] zui:aria-invalid:border-[var(--zui-theme-status-danger)] zui:aria-invalid:ring-[var(--zui-theme-status-danger)] zui:disabled:cursor-not-allowed zui:disabled:pointer-events-none zui:disabled:opacity-50", {
12381
- variants: {
12382
- size: {
12383
- sm: "zui:size-[1.05rem]",
12384
- default: "zui:size-[1.2rem]",
12385
- lg: "zui:size-6"
12386
- },
12387
- disabled: {
12388
- true: "zui:pointer-events-none zui:opacity-50",
12389
- false: ""
12390
- }
12391
- },
12392
- defaultVariants: {
12393
- size: "default",
12394
- disabled: !1
12395
- }
12396
- }), Ax = K("zui:pointer-events-none zui:absolute zui:inset-0 zui:flex zui:items-center zui:justify-center zui:text-[var(--zui-theme-action-primary)] zui:data-[state=checked]:animate-in zui:data-[state=checked]:zoom-in-95 zui:data-[state=checked]:fade-in-0", {
12397
- variants: { size: {
12398
- sm: "",
12399
- default: "",
12400
- lg: ""
12401
- } },
12402
- defaultVariants: { size: "default" }
12403
- }), jx = K("zui:inline-flex zui:w-full zui:items-start zui:justify-between zui:gap-2.5 radius-md zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-theme-bg-page)] zui:px-3 zui:py-2.5 zui:transition-colors zui:duration-200 zui:has-[[data-state=checked]]:border-[var(--zui-theme-action-primary)]", {
12404
- variants: {
12405
- direction: {
12406
- rtl: "zui:flex-row-reverse zui:text-right",
12407
- ltr: "zui:flex-row zui:text-left"
12408
- },
12409
- disabled: {
12410
- true: "zui:cursor-not-allowed zui:opacity-60",
12411
- false: "zui:cursor-pointer"
12412
- }
12413
- },
12414
- defaultVariants: {
12415
- direction: "rtl",
12416
- disabled: !1
12417
- }
12418
- }), Mx = K("zui:text-sm zui:font-medium zui:leading-5 zui:text-[var(--zui-theme-text-primary)]", {
12419
- variants: { disabled: {
12420
- true: "zui:text-[var(--zui-theme-text-muted)]",
12421
- false: ""
12422
- } },
12423
- defaultVariants: { disabled: !1 }
12424
- }), Nx = K("zui:mt-0.5 zui:text-xs zui:text-[var(--zui-theme-text-muted)]"), Px = e.forwardRef(function({ value: t, defaultValue: n, onValueChange: r, name: i, required: a = !1, id: o, title: s, children: c, "aria-label": l, className: u, orientation: d = "vertical", gap: f = "default", dir: p = "rtl", disabled: m = !1, onInvalid: h }, g) {
12425
- let [_, v] = e.useState(!1), y = e.useCallback((e) => {
12426
- _ && v(!1), r?.(e);
12427
- }, [_, r]), b = e.useCallback((e) => {
12428
- v(!0), h?.(e);
12429
- }, [h]);
12430
- return /* @__PURE__ */ (0, M.jsxs)("div", {
12431
- "data-slot": "radio-group-field",
12432
- dir: p,
12433
- className: "zui:w-full zui:space-y-1.5 zui:text-right",
12434
- children: [s ? /* @__PURE__ */ (0, M.jsxs)("div", {
12435
- className: "zui:block zui:text-sm zui:font-medium zui:text-[var(--zui-theme-text-primary)]",
12436
- children: [s, a ? /* @__PURE__ */ (0, M.jsx)("span", {
12437
- className: "zui:mr-1 zui:text-base zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
12438
- children: "*"
12439
- }) : null]
12440
- }) : null, /* @__PURE__ */ (0, M.jsxs)("div", {
12441
- className: "zui:relative",
12442
- children: [!s && a ? /* @__PURE__ */ (0, M.jsx)("span", {
12443
- "aria-hidden": "true",
12444
- className: "zui:pointer-events-none zui:absolute zui:-right-1 zui:-top-1 zui:z-10 zui:text-xs zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
12445
- children: "*"
12446
- }) : null, /* @__PURE__ */ (0, M.jsx)(Tx, {
12447
- ref: g,
12448
- id: o,
12449
- "data-slot": "radio-group",
12450
- "aria-label": l,
12451
- "aria-invalid": _ || void 0,
12452
- "aria-required": a || void 0,
12453
- "aria-disabled": m || void 0,
12454
- dir: p,
12455
- className: G(_ ? "zui:[&_[data-slot=radio-group-item]]:border-[var(--zui-theme-status-danger)] zui:[&_[data-slot=radio-group-option]]:border-[var(--zui-theme-status-danger)]" : void 0, Ox({
12456
- orientation: d,
12457
- gap: f,
12458
- disabled: m,
12459
- className: u
12460
- })),
12461
- value: t,
12462
- defaultValue: n,
12463
- onValueChange: y,
12464
- onInvalid: b,
12465
- name: i,
12466
- required: a,
12467
- disabled: m,
12468
- children: c
12469
- })]
12470
- })]
12471
- });
12472
- }), Fx = e.forwardRef(function({ className: t, size: n = "default", disabled: r = !1, label: i, description: a, id: o, direction: s = "rtl", optionClassName: c, labelClassName: l, descriptionClassName: u, indicatorClassName: d, value: f, onFocus: p, onBlur: m }, h) {
12473
- let g = e.useId(), _ = o ?? g, v = n === "sm" ? "zui:size-[0.46rem]" : n === "lg" ? "zui:size-[0.7rem]" : "zui:size-[0.58rem]", y = /* @__PURE__ */ (0, M.jsx)(Ex, {
12474
- ref: h,
12475
- id: _,
12476
- "data-slot": "radio-group-item",
12477
- "aria-disabled": r || void 0,
12478
- className: G(kx({
12479
- size: n,
12480
- disabled: r,
12481
- className: t
12482
- })),
12483
- disabled: r,
12484
- value: f,
12485
- onFocus: p,
12486
- onBlur: m,
12487
- children: /* @__PURE__ */ (0, M.jsx)(Dx, {
12488
- "data-slot": "radio-group-indicator",
12489
- className: G(Ax({ size: n }), d),
12490
- children: /* @__PURE__ */ (0, M.jsx)("span", { className: G("zui:block radius-full zui:bg-[var(--zui-theme-action-primary)]", v) })
12491
- })
12492
- });
12493
- return !i && !a ? y : /* @__PURE__ */ (0, M.jsxs)("label", {
12494
- htmlFor: _,
12495
- "data-slot": "radio-group-option",
12496
- dir: s ?? void 0,
12497
- className: G(jx({
12498
- direction: s,
12499
- disabled: r,
12500
- className: c
12501
- })),
12502
- children: [y, /* @__PURE__ */ (0, M.jsxs)("span", {
12503
- className: "zui:min-w-0 zui:flex-1",
12504
- children: [i ? /* @__PURE__ */ (0, M.jsx)("span", {
12505
- className: G(Mx({ disabled: r }), l),
12506
- children: i
12507
- }) : null, a ? /* @__PURE__ */ (0, M.jsx)("span", {
12508
- className: G(Nx(), u),
12509
- children: a
12510
- }) : null]
12511
- })]
12512
- });
12513
- });
12514
- //#endregion
12515
- //#region node_modules/@radix-ui/number/dist/index.mjs
12516
- function Ix(e, [t, n]) {
12517
- return Math.min(n, Math.max(t, e));
12518
- }
12519
- //#endregion
12520
- //#region node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
12521
- var Lx = Object.freeze({
11742
+ }), db = Object.freeze({
12522
11743
  position: "absolute",
12523
11744
  border: 0,
12524
11745
  width: 1,
@@ -12529,1094 +11750,1878 @@ var Lx = Object.freeze({
12529
11750
  clip: "rect(0, 0, 0, 0)",
12530
11751
  whiteSpace: "nowrap",
12531
11752
  wordWrap: "normal"
12532
- }), Rx = "VisuallyHidden", zx = e.forwardRef((e, t) => /* @__PURE__ */ (0, M.jsx)(W.span, {
11753
+ }), fb = "VisuallyHidden", pb = e.forwardRef((e, t) => /* @__PURE__ */ (0, M.jsx)(W.span, {
12533
11754
  ...e,
12534
11755
  ref: t,
12535
11756
  style: {
12536
- ...Lx,
11757
+ ...db,
12537
11758
  ...e.style
12538
11759
  }
12539
11760
  }));
12540
- zx.displayName = Rx;
12541
- var Bx = zx, Vx = [
12542
- " ",
12543
- "Enter",
12544
- "ArrowUp",
12545
- "ArrowDown"
12546
- ], Hx = [" ", "Enter"], Ux = "Select", [Wx, Gx, Kx] = jb(Ux), [qx, Jx] = z(Ux, [Kx, Di]), Yx = Di(), [Xx, Zx] = qx(Ux), [Qx, $x] = qx(Ux), eS = (t) => {
12547
- let { __scopeSelect: n, children: r, open: i, defaultOpen: a, onOpenChange: o, value: s, defaultValue: c, onValueChange: l, dir: u, name: d, autoComplete: f, disabled: p, required: m, form: h } = t, g = Yx(n), [_, v] = e.useState(null), [y, b] = e.useState(null), [x, S] = e.useState(!1), C = Nb(u), [w, T] = H({
11761
+ pb.displayName = fb;
11762
+ var mb = pb, [hb, gb] = z("Tooltip", [Di]), _b = Di(), vb = "TooltipProvider", yb = 700, bb = "tooltip.open", [xb, Sb] = hb(vb), Cb = (t) => {
11763
+ let { __scopeTooltip: n, delayDuration: r = yb, skipDelayDuration: i = 300, disableHoverableContent: a = !1, children: o } = t, s = e.useRef(!0), c = e.useRef(!1), l = e.useRef(0);
11764
+ return e.useEffect(() => {
11765
+ let e = l.current;
11766
+ return () => window.clearTimeout(e);
11767
+ }, []), /* @__PURE__ */ (0, M.jsx)(xb, {
11768
+ scope: n,
11769
+ isOpenDelayedRef: s,
11770
+ delayDuration: r,
11771
+ onOpen: e.useCallback(() => {
11772
+ window.clearTimeout(l.current), s.current = !1;
11773
+ }, []),
11774
+ onClose: e.useCallback(() => {
11775
+ window.clearTimeout(l.current), l.current = window.setTimeout(() => s.current = !0, i);
11776
+ }, [i]),
11777
+ isPointerInTransitRef: c,
11778
+ onPointerInTransitChange: e.useCallback((e) => {
11779
+ c.current = e;
11780
+ }, []),
11781
+ disableHoverableContent: a,
11782
+ children: o
11783
+ });
11784
+ };
11785
+ Cb.displayName = vb;
11786
+ var wb = "Tooltip", [Tb, Eb] = hb(wb), Db = (t) => {
11787
+ let { __scopeTooltip: n, children: r, open: i, defaultOpen: a, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = t, l = Sb(wb, t.__scopeTooltip), u = _b(n), [d, f] = e.useState(null), p = ln(), m = e.useRef(0), h = s ?? l.disableHoverableContent, g = c ?? l.delayDuration, _ = e.useRef(!1), [v, y] = H({
12548
11788
  prop: i,
12549
11789
  defaultProp: a ?? !1,
12550
- onChange: o,
12551
- caller: Ux
12552
- }), [E, D] = H({
12553
- prop: s,
12554
- defaultProp: c,
12555
- onChange: l,
12556
- caller: Ux
12557
- }), O = e.useRef(null), k = _ ? h || !!_.closest("form") : !0, [A, j] = e.useState(/* @__PURE__ */ new Set()), N = Array.from(A).map((e) => e.props.value).join(";");
12558
- return /* @__PURE__ */ (0, M.jsx)(Ui, {
12559
- ...g,
12560
- children: /* @__PURE__ */ (0, M.jsxs)(Xx, {
12561
- required: m,
11790
+ onChange: (e) => {
11791
+ e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(bb))) : l.onClose(), o?.(e);
11792
+ },
11793
+ caller: wb
11794
+ }), b = e.useMemo(() => v ? _.current ? "delayed-open" : "instant-open" : "closed", [v]), x = e.useCallback(() => {
11795
+ window.clearTimeout(m.current), m.current = 0, _.current = !1, y(!0);
11796
+ }, [y]), S = e.useCallback(() => {
11797
+ window.clearTimeout(m.current), m.current = 0, y(!1);
11798
+ }, [y]), C = e.useCallback(() => {
11799
+ window.clearTimeout(m.current), m.current = window.setTimeout(() => {
11800
+ _.current = !0, y(!0), m.current = 0;
11801
+ }, g);
11802
+ }, [g, y]);
11803
+ return e.useEffect(() => () => {
11804
+ m.current &&= (window.clearTimeout(m.current), 0);
11805
+ }, []), /* @__PURE__ */ (0, M.jsx)(Ui, {
11806
+ ...u,
11807
+ children: /* @__PURE__ */ (0, M.jsx)(Tb, {
12562
11808
  scope: n,
12563
- trigger: _,
12564
- onTriggerChange: v,
12565
- valueNode: y,
12566
- onValueNodeChange: b,
12567
- valueNodeHasChildren: x,
12568
- onValueNodeHasChildrenChange: S,
12569
- contentId: ln(),
12570
- value: E,
12571
- onValueChange: D,
12572
- open: w,
12573
- onOpenChange: T,
12574
- dir: C,
12575
- triggerPointerDownPosRef: O,
12576
- disabled: p,
12577
- children: [/* @__PURE__ */ (0, M.jsx)(Wx.Provider, {
12578
- scope: n,
12579
- children: /* @__PURE__ */ (0, M.jsx)(Qx, {
12580
- scope: t.__scopeSelect,
12581
- onNativeOptionAdd: e.useCallback((e) => {
12582
- j((t) => new Set(t).add(e));
12583
- }, []),
12584
- onNativeOptionRemove: e.useCallback((e) => {
12585
- j((t) => {
12586
- let n = new Set(t);
12587
- return n.delete(e), n;
12588
- });
12589
- }, []),
12590
- children: r
12591
- })
12592
- }), k ? /* @__PURE__ */ (0, M.jsxs)(YS, {
12593
- "aria-hidden": !0,
12594
- required: m,
12595
- tabIndex: -1,
12596
- name: d,
12597
- autoComplete: f,
12598
- value: E,
12599
- onChange: (e) => D(e.target.value),
12600
- disabled: p,
12601
- form: h,
12602
- children: [E === void 0 ? /* @__PURE__ */ (0, M.jsx)("option", { value: "" }) : null, Array.from(A)]
12603
- }, N) : null]
11809
+ contentId: p,
11810
+ open: v,
11811
+ stateAttribute: b,
11812
+ trigger: d,
11813
+ onTriggerChange: f,
11814
+ onTriggerEnter: e.useCallback(() => {
11815
+ l.isOpenDelayedRef.current ? C() : x();
11816
+ }, [
11817
+ l.isOpenDelayedRef,
11818
+ C,
11819
+ x
11820
+ ]),
11821
+ onTriggerLeave: e.useCallback(() => {
11822
+ h ? S() : (window.clearTimeout(m.current), m.current = 0);
11823
+ }, [S, h]),
11824
+ onOpen: x,
11825
+ onClose: S,
11826
+ disableHoverableContent: h,
11827
+ children: r
12604
11828
  })
12605
11829
  });
12606
11830
  };
12607
- eS.displayName = Ux;
12608
- var tS = "SelectTrigger", nS = e.forwardRef((t, n) => {
12609
- let { __scopeSelect: r, disabled: i = !1, ...a } = t, o = Yx(r), s = Zx(tS, r), c = s.disabled || i, l = R(n, s.onTriggerChange), u = Gx(r), d = e.useRef("touch"), [f, p, m] = ZS((e) => {
12610
- let t = u().filter((e) => !e.disabled), n = QS(t, e, t.find((e) => e.value === s.value));
12611
- n !== void 0 && s.onValueChange(n.value);
12612
- }), h = (e) => {
12613
- c || (s.onOpenChange(!0), m()), e && (s.triggerPointerDownPosRef.current = {
12614
- x: Math.round(e.pageX),
12615
- y: Math.round(e.pageY)
12616
- });
12617
- };
12618
- return /* @__PURE__ */ (0, M.jsx)(Wi, {
11831
+ Db.displayName = wb;
11832
+ var Ob = "TooltipTrigger", kb = e.forwardRef((t, n) => {
11833
+ let { __scopeTooltip: r, ...i } = t, a = Eb(Ob, r), o = Sb(Ob, r), s = _b(r), c = R(n, e.useRef(null), a.onTriggerChange), l = e.useRef(!1), u = e.useRef(!1), d = e.useCallback(() => l.current = !1, []);
11834
+ return e.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ (0, M.jsx)(Wi, {
12619
11835
  asChild: !0,
12620
- ...o,
11836
+ ...s,
12621
11837
  children: /* @__PURE__ */ (0, M.jsx)(W.button, {
12622
- type: "button",
12623
- role: "combobox",
12624
- "aria-controls": s.contentId,
12625
- "aria-expanded": s.open,
12626
- "aria-required": s.required,
12627
- "aria-autocomplete": "none",
12628
- dir: s.dir,
12629
- "data-state": s.open ? "open" : "closed",
12630
- disabled: c,
12631
- "data-disabled": c ? "" : void 0,
12632
- "data-placeholder": XS(s.value) ? "" : void 0,
12633
- ...a,
12634
- ref: l,
12635
- onClick: B(a.onClick, (e) => {
12636
- e.currentTarget.focus(), d.current !== "mouse" && h(e);
11838
+ "aria-describedby": a.open ? a.contentId : void 0,
11839
+ "data-state": a.stateAttribute,
11840
+ ...i,
11841
+ ref: c,
11842
+ onPointerMove: B(t.onPointerMove, (e) => {
11843
+ e.pointerType !== "touch" && !u.current && !o.isPointerInTransitRef.current && (a.onTriggerEnter(), u.current = !0);
12637
11844
  }),
12638
- onPointerDown: B(a.onPointerDown, (e) => {
12639
- d.current = e.pointerType;
12640
- let t = e.target;
12641
- t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), e.button === 0 && e.ctrlKey === !1 && e.pointerType === "mouse" && (h(e), e.preventDefault());
11845
+ onPointerLeave: B(t.onPointerLeave, () => {
11846
+ a.onTriggerLeave(), u.current = !1;
12642
11847
  }),
12643
- onKeyDown: B(a.onKeyDown, (e) => {
12644
- let t = f.current !== "";
12645
- !(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && p(e.key), !(t && e.key === " ") && Vx.includes(e.key) && (h(), e.preventDefault());
11848
+ onPointerDown: B(t.onPointerDown, () => {
11849
+ a.open && a.onClose(), l.current = !0, document.addEventListener("pointerup", d, { once: !0 });
11850
+ }),
11851
+ onFocus: B(t.onFocus, () => {
11852
+ l.current || a.onOpen();
11853
+ }),
11854
+ onBlur: B(t.onBlur, a.onClose),
11855
+ onClick: B(t.onClick, a.onClose)
11856
+ })
11857
+ });
11858
+ });
11859
+ kb.displayName = Ob;
11860
+ var Ab = "TooltipPortal", [jb, Mb] = hb(Ab, { forceMount: void 0 }), Nb = (e) => {
11861
+ let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = Eb(Ab, t);
11862
+ return /* @__PURE__ */ (0, M.jsx)(jb, {
11863
+ scope: t,
11864
+ forceMount: n,
11865
+ children: /* @__PURE__ */ (0, M.jsx)(de, {
11866
+ present: n || a.open,
11867
+ children: /* @__PURE__ */ (0, M.jsx)(Ji, {
11868
+ asChild: !0,
11869
+ container: i,
11870
+ children: r
12646
11871
  })
12647
11872
  })
12648
11873
  });
11874
+ };
11875
+ Nb.displayName = Ab;
11876
+ var Pb = "TooltipContent", Fb = e.forwardRef((e, t) => {
11877
+ let n = Mb(Pb, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, o = Eb(Pb, e.__scopeTooltip);
11878
+ return /* @__PURE__ */ (0, M.jsx)(de, {
11879
+ present: r || o.open,
11880
+ children: o.disableHoverableContent ? /* @__PURE__ */ (0, M.jsx)(Bb, {
11881
+ side: i,
11882
+ ...a,
11883
+ ref: t
11884
+ }) : /* @__PURE__ */ (0, M.jsx)(Ib, {
11885
+ side: i,
11886
+ ...a,
11887
+ ref: t
11888
+ })
11889
+ });
11890
+ }), Ib = e.forwardRef((t, n) => {
11891
+ let r = Eb(Pb, t.__scopeTooltip), i = Sb(Pb, t.__scopeTooltip), a = e.useRef(null), o = R(n, a), [s, c] = e.useState(null), { trigger: l, onClose: u } = r, d = a.current, { onPointerInTransitChange: f } = i, p = e.useCallback(() => {
11892
+ c(null), f(!1);
11893
+ }, [f]), m = e.useCallback((e, t) => {
11894
+ let n = e.currentTarget, r = {
11895
+ x: e.clientX,
11896
+ y: e.clientY
11897
+ }, i = Wb(r, Ub(r, n.getBoundingClientRect())), a = Gb(t.getBoundingClientRect());
11898
+ c(qb([...i, ...a])), f(!0);
11899
+ }, [f]);
11900
+ return e.useEffect(() => () => p(), [p]), e.useEffect(() => {
11901
+ if (l && d) {
11902
+ let e = (e) => m(e, d), t = (e) => m(e, l);
11903
+ return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
11904
+ l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
11905
+ };
11906
+ }
11907
+ }, [
11908
+ l,
11909
+ d,
11910
+ m,
11911
+ p
11912
+ ]), e.useEffect(() => {
11913
+ if (s) {
11914
+ let e = (e) => {
11915
+ let t = e.target, n = {
11916
+ x: e.clientX,
11917
+ y: e.clientY
11918
+ }, r = l?.contains(t) || d?.contains(t), i = !Kb(n, s);
11919
+ r ? p() : i && (p(), u());
11920
+ };
11921
+ return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
11922
+ }
11923
+ }, [
11924
+ l,
11925
+ d,
11926
+ s,
11927
+ u,
11928
+ p
11929
+ ]), /* @__PURE__ */ (0, M.jsx)(Bb, {
11930
+ ...t,
11931
+ ref: o
11932
+ });
11933
+ }), [Lb, Rb] = hb(wb, { isInside: !1 }), zb = /* @__PURE__ */ ve("TooltipContent"), Bb = e.forwardRef((t, n) => {
11934
+ let { __scopeTooltip: r, children: i, "aria-label": a, onEscapeKeyDown: o, onPointerDownOutside: s, ...c } = t, l = Eb(Pb, r), u = _b(r), { onClose: d } = l;
11935
+ return e.useEffect(() => (document.addEventListener(bb, d), () => document.removeEventListener(bb, d)), [d]), e.useEffect(() => {
11936
+ if (l.trigger) {
11937
+ let e = (e) => {
11938
+ e.target?.contains(l.trigger) && d();
11939
+ };
11940
+ return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
11941
+ }
11942
+ }, [l.trigger, d]), /* @__PURE__ */ (0, M.jsx)(Mt, {
11943
+ asChild: !0,
11944
+ disableOutsidePointerEvents: !1,
11945
+ onEscapeKeyDown: o,
11946
+ onPointerDownOutside: s,
11947
+ onFocusOutside: (e) => e.preventDefault(),
11948
+ onDismiss: d,
11949
+ children: /* @__PURE__ */ (0, M.jsxs)(Gi, {
11950
+ "data-state": l.stateAttribute,
11951
+ ...u,
11952
+ ...c,
11953
+ ref: n,
11954
+ style: {
11955
+ ...c.style,
11956
+ "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
11957
+ "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
11958
+ "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
11959
+ "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
11960
+ "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
11961
+ },
11962
+ children: [/* @__PURE__ */ (0, M.jsx)(zb, { children: i }), /* @__PURE__ */ (0, M.jsx)(Lb, {
11963
+ scope: r,
11964
+ isInside: !0,
11965
+ children: /* @__PURE__ */ (0, M.jsx)(mb, {
11966
+ id: l.contentId,
11967
+ role: "tooltip",
11968
+ children: a || i
11969
+ })
11970
+ })]
11971
+ })
11972
+ });
12649
11973
  });
12650
- nS.displayName = tS;
12651
- var rS = "SelectValue", iS = e.forwardRef((e, t) => {
12652
- let { __scopeSelect: n, className: r, style: i, children: a, placeholder: o = "", ...s } = e, c = Zx(rS, n), { onValueNodeHasChildrenChange: l } = c, u = a !== void 0, d = R(t, c.onValueNodeChange);
12653
- return V(() => {
12654
- l(u);
12655
- }, [l, u]), /* @__PURE__ */ (0, M.jsx)(W.span, {
12656
- ...s,
12657
- ref: d,
12658
- style: { pointerEvents: "none" },
12659
- children: XS(c.value) ? /* @__PURE__ */ (0, M.jsx)(M.Fragment, { children: o }) : a
12660
- });
12661
- });
12662
- iS.displayName = rS;
12663
- var aS = "SelectIcon", oS = e.forwardRef((e, t) => {
12664
- let { __scopeSelect: n, children: r, ...i } = e;
12665
- return /* @__PURE__ */ (0, M.jsx)(W.span, {
12666
- "aria-hidden": !0,
11974
+ Fb.displayName = Pb;
11975
+ var Vb = "TooltipArrow", Hb = e.forwardRef((e, t) => {
11976
+ let { __scopeTooltip: n, ...r } = e, i = _b(n);
11977
+ return Rb(Vb, n).isInside ? null : /* @__PURE__ */ (0, M.jsx)(Ki, {
12667
11978
  ...i,
12668
- ref: t,
12669
- children: r || "▼"
11979
+ ...r,
11980
+ ref: t
12670
11981
  });
12671
11982
  });
12672
- oS.displayName = aS;
12673
- var sS = "SelectPortal", cS = (e) => /* @__PURE__ */ (0, M.jsx)(Ji, {
12674
- asChild: !0,
12675
- ...e
12676
- });
12677
- cS.displayName = sS;
12678
- var lS = "SelectContent", uS = e.forwardRef((t, n) => {
12679
- let r = Zx(lS, t.__scopeSelect), [i, a] = e.useState();
12680
- if (V(() => {
12681
- a(new DocumentFragment());
12682
- }, []), !r.open) {
12683
- let e = i;
12684
- return e ? f.createPortal(/* @__PURE__ */ (0, M.jsx)(fS, {
12685
- scope: t.__scopeSelect,
12686
- children: /* @__PURE__ */ (0, M.jsx)(Wx.Slot, {
12687
- scope: t.__scopeSelect,
12688
- children: /* @__PURE__ */ (0, M.jsx)("div", { children: t.children })
12689
- })
12690
- }), e) : null;
11983
+ Hb.displayName = Vb;
11984
+ function Ub(e, t) {
11985
+ let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
11986
+ switch (Math.min(n, r, i, a)) {
11987
+ case a: return "left";
11988
+ case i: return "right";
11989
+ case n: return "top";
11990
+ case r: return "bottom";
11991
+ default: throw Error("unreachable");
12691
11992
  }
12692
- return /* @__PURE__ */ (0, M.jsx)(gS, {
12693
- ...t,
12694
- ref: n
11993
+ }
11994
+ function Wb(e, t, n = 5) {
11995
+ let r = [];
11996
+ switch (t) {
11997
+ case "top":
11998
+ r.push({
11999
+ x: e.x - n,
12000
+ y: e.y + n
12001
+ }, {
12002
+ x: e.x + n,
12003
+ y: e.y + n
12004
+ });
12005
+ break;
12006
+ case "bottom":
12007
+ r.push({
12008
+ x: e.x - n,
12009
+ y: e.y - n
12010
+ }, {
12011
+ x: e.x + n,
12012
+ y: e.y - n
12013
+ });
12014
+ break;
12015
+ case "left":
12016
+ r.push({
12017
+ x: e.x + n,
12018
+ y: e.y - n
12019
+ }, {
12020
+ x: e.x + n,
12021
+ y: e.y + n
12022
+ });
12023
+ break;
12024
+ case "right":
12025
+ r.push({
12026
+ x: e.x - n,
12027
+ y: e.y - n
12028
+ }, {
12029
+ x: e.x - n,
12030
+ y: e.y + n
12031
+ });
12032
+ break;
12033
+ }
12034
+ return r;
12035
+ }
12036
+ function Gb(e) {
12037
+ let { top: t, right: n, bottom: r, left: i } = e;
12038
+ return [
12039
+ {
12040
+ x: i,
12041
+ y: t
12042
+ },
12043
+ {
12044
+ x: n,
12045
+ y: t
12046
+ },
12047
+ {
12048
+ x: n,
12049
+ y: r
12050
+ },
12051
+ {
12052
+ x: i,
12053
+ y: r
12054
+ }
12055
+ ];
12056
+ }
12057
+ function Kb(e, t) {
12058
+ let { x: n, y: r } = e, i = !1;
12059
+ for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
12060
+ let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
12061
+ l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
12062
+ }
12063
+ return i;
12064
+ }
12065
+ function qb(e) {
12066
+ let t = e.slice();
12067
+ return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), Jb(t);
12068
+ }
12069
+ function Jb(e) {
12070
+ if (e.length <= 1) return e.slice();
12071
+ let t = [];
12072
+ for (let n = 0; n < e.length; n++) {
12073
+ let r = e[n];
12074
+ for (; t.length >= 2;) {
12075
+ let e = t[t.length - 1], n = t[t.length - 2];
12076
+ if ((e.x - n.x) * (r.y - n.y) >= (e.y - n.y) * (r.x - n.x)) t.pop();
12077
+ else break;
12078
+ }
12079
+ t.push(r);
12080
+ }
12081
+ t.pop();
12082
+ let n = [];
12083
+ for (let t = e.length - 1; t >= 0; t--) {
12084
+ let r = e[t];
12085
+ for (; n.length >= 2;) {
12086
+ let e = n[n.length - 1], t = n[n.length - 2];
12087
+ if ((e.x - t.x) * (r.y - t.y) >= (e.y - t.y) * (r.x - t.x)) n.pop();
12088
+ else break;
12089
+ }
12090
+ n.push(r);
12091
+ }
12092
+ return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
12093
+ }
12094
+ var Yb = Cb, Xb = Db, Zb = kb, Qb = Nb, $b = Fb, ex = K("zui:z-[2147483647] zui:w-fit zui:origin-[var(--radix-tooltip-content-transform-origin)] zui:overflow-hidden zui:rounded-md zui:bg-[var(--zui-color-tooltip-surface)] zui:px-3 zui:py-1.5 zui:text-xs zui:leading-5 zui:text-[var(--zui-color-text)] zui:shadow-sm zui:animate-in zui:fade-in-0 zui:zoom-in-95 zui:data-[state=closed]:animate-out zui:data-[state=closed]:fade-out-0 zui:data-[state=closed]:zoom-out-95 zui:data-[state=open]:duration-300 zui:data-[state=closed]:duration-200 zui:data-[side=bottom]:slide-in-from-top-2 zui:data-[side=left]:slide-in-from-right-2 zui:data-[side=right]:slide-in-from-left-2 zui:data-[side=top]:slide-in-from-bottom-2");
12095
+ //#endregion
12096
+ //#region src/components/Tooltip/Tooltip.tsx
12097
+ function tx({ text: e, trigger: t, position: n = "top", className: r, disabled: i = !1, sideOffset: a = 4, delayDuration: o = 120, skipDelayDuration: s = 200, ...c }) {
12098
+ return /* @__PURE__ */ (0, M.jsx)(Yb, {
12099
+ "data-slot": "tooltip-provider",
12100
+ delayDuration: o,
12101
+ skipDelayDuration: s,
12102
+ children: /* @__PURE__ */ (0, M.jsxs)(Xb, {
12103
+ "data-slot": "tooltip",
12104
+ ...c,
12105
+ children: [/* @__PURE__ */ (0, M.jsx)(Zb, {
12106
+ asChild: !0,
12107
+ disabled: i,
12108
+ "data-slot": "tooltip-trigger",
12109
+ children: t
12110
+ }), /* @__PURE__ */ (0, M.jsx)(Qb, { children: /* @__PURE__ */ (0, M.jsx)($b, {
12111
+ "data-slot": "tooltip-content",
12112
+ side: n,
12113
+ sideOffset: a,
12114
+ className: G(ex(), r),
12115
+ children: e
12116
+ }) })]
12117
+ })
12695
12118
  });
12696
- });
12697
- uS.displayName = lS;
12698
- var dS = 10, [fS, pS] = qx(lS), mS = "SelectContentImpl", hS = /* @__PURE__ */ he("SelectContent.RemoveScroll"), gS = e.forwardRef((t, n) => {
12699
- let { __scopeSelect: r, position: i = "item-aligned", onCloseAutoFocus: a, onEscapeKeyDown: o, onPointerDownOutside: s, side: c, sideOffset: l, align: u, alignOffset: d, arrowPadding: f, collisionBoundary: p, collisionPadding: m, sticky: h, hideWhenDetached: g, avoidCollisions: _, ...v } = t, y = Zx(lS, r), [b, x] = e.useState(null), [S, C] = e.useState(null), w = R(n, (e) => x(e)), [T, E] = e.useState(null), [D, O] = e.useState(null), k = Gx(r), [A, j] = e.useState(!1), N = e.useRef(!1);
12119
+ }
12120
+ //#endregion
12121
+ //#region src/components/Input/Input.tsx
12122
+ function nx(e) {
12123
+ return e == null ? !1 : typeof e == "string" ? e.length > 0 : typeof e == "number" ? !0 : Array.isArray(e) ? e.length > 0 : !1;
12124
+ }
12125
+ function rx({ className: t, size: n = "default", type: r = "text", title: i, required: a = !1, characterLimit: o, placeholder: s, onChange: c, onBlur: l, onFocus: u, onInvalid: d, id: f, name: p, disabled: m = !1, readOnly: h = !1, autoComplete: g, "aria-label": _, value: v, defaultValue: y, maxLength: b }) {
12126
+ let [x, S] = e.useState(!1), [C, w] = e.useState(() => nx(v ?? y)), [T, E] = e.useState(!1), D = e.useId(), O = f ?? D, k = e.useRef(null), A = r === "search", j = r === "password", N = a, ee = j ? x ? "text" : "password" : r, P = v !== void 0;
12700
12127
  e.useEffect(() => {
12701
- if (b) return ra(b);
12702
- }, [b]), Ht();
12703
- let ee = e.useCallback((e) => {
12704
- let [t, ...n] = k().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
12705
- for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && S && (S.scrollTop = 0), n === r && S && (S.scrollTop = S.scrollHeight), n?.focus(), document.activeElement !== i)) return;
12706
- }, [k, S]), P = e.useCallback(() => ee([T, b]), [
12707
- ee,
12128
+ P && w(nx(v));
12129
+ }, [P, v]);
12130
+ let te = e.useCallback((e) => {
12131
+ P || w(nx(e.target.value)), T && E(!1), c?.(e);
12132
+ }, [
12133
+ P,
12708
12134
  T,
12709
- b
12710
- ]);
12711
- e.useEffect(() => {
12712
- A && P();
12713
- }, [A, P]);
12714
- let { onOpenChange: te, triggerPointerDownPosRef: F } = y;
12715
- e.useEffect(() => {
12716
- if (b) {
12717
- let e = {
12718
- x: 0,
12719
- y: 0
12720
- }, t = (t) => {
12721
- e = {
12722
- x: Math.abs(Math.round(t.pageX) - (F.current?.x ?? 0)),
12723
- y: Math.abs(Math.round(t.pageY) - (F.current?.y ?? 0))
12724
- };
12725
- }, n = (n) => {
12726
- e.x <= 10 && e.y <= 10 ? n.preventDefault() : b.contains(n.target) || te(!1), document.removeEventListener("pointermove", t), F.current = null;
12727
- };
12728
- return F.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
12729
- capture: !0,
12730
- once: !0
12731
- })), () => {
12732
- document.removeEventListener("pointermove", t), document.removeEventListener("pointerup", n, { capture: !0 });
12733
- };
12135
+ c
12136
+ ]), F = e.useCallback((e) => {
12137
+ w(nx(e.target.value)), l?.(e);
12138
+ }, [l]), I = e.useCallback((e) => {
12139
+ E(!0), d?.(e);
12140
+ }, [d]), L = e.useCallback(() => {
12141
+ let e = k.current;
12142
+ if (!e) return;
12143
+ let t = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
12144
+ t ? t.call(e, "") : e.value = "", w(!1), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus();
12145
+ }, []);
12146
+ return /* @__PURE__ */ (0, M.jsxs)("div", {
12147
+ "data-slot": "input-field",
12148
+ dir: "rtl",
12149
+ className: "zui:w-full zui:space-y-1.5 zui:text-right",
12150
+ children: [i ? /* @__PURE__ */ (0, M.jsxs)("label", {
12151
+ htmlFor: O,
12152
+ className: "zui:block zui:text-sm zui:font-medium zui:text-[var(--zui-color-text)]",
12153
+ children: [i, N ? /* @__PURE__ */ (0, M.jsx)("span", {
12154
+ className: "zui:mr-1 zui:text-base zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
12155
+ children: "*"
12156
+ }) : null]
12157
+ }) : null, /* @__PURE__ */ (0, M.jsxs)("div", {
12158
+ className: "zui:relative",
12159
+ children: [
12160
+ !i && N ? /* @__PURE__ */ (0, M.jsx)("span", {
12161
+ "aria-hidden": "true",
12162
+ className: "zui:pointer-events-none zui:absolute zui:-right-1 zui:-top-1 zui:z-10 zui:text-xs zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
12163
+ children: "*"
12164
+ }) : null,
12165
+ A ? /* @__PURE__ */ (0, M.jsx)(ft, {
12166
+ className: "zui:pointer-events-none zui:absolute zui:right-3 zui:top-1/2 zui:size-4 zui:-translate-y-1/2 zui:text-[var(--zui-color-text)]",
12167
+ "aria-hidden": "true"
12168
+ }) : null,
12169
+ /* @__PURE__ */ (0, M.jsx)("input", {
12170
+ ref: k,
12171
+ id: O,
12172
+ "data-slot": "input",
12173
+ type: ee,
12174
+ maxLength: o ?? b,
12175
+ required: N,
12176
+ "aria-invalid": T || void 0,
12177
+ "data-has-value": C,
12178
+ placeholder: s,
12179
+ name: p,
12180
+ disabled: m,
12181
+ readOnly: h,
12182
+ autoComplete: g,
12183
+ "aria-label": _,
12184
+ onChange: te,
12185
+ onBlur: F,
12186
+ onFocus: u,
12187
+ onInvalid: I,
12188
+ value: v,
12189
+ defaultValue: y,
12190
+ className: G(ub({
12191
+ size: n,
12192
+ className: t
12193
+ }), j || r === "number" ? "zui:text-center" : "zui:text-right", r === "number" ? "input-no-spinner" : void 0, A ? "input-search-cancel zui:pr-10 zui:pl-10" : void 0, j ? "zui:pl-10" : void 0)
12194
+ }),
12195
+ A && C ? /* @__PURE__ */ (0, M.jsx)(tx, {
12196
+ text: "پاک کردن",
12197
+ position: "top",
12198
+ disabled: m || h,
12199
+ trigger: /* @__PURE__ */ (0, M.jsx)("button", {
12200
+ type: "button",
12201
+ onClick: L,
12202
+ disabled: m || h,
12203
+ className: "zui:group/clear-search zui:absolute zui:left-3 zui:top-1/2 zui:inline-flex zui:-translate-y-1/2 zui:items-center zui:justify-center zui:cursor-pointer zui:border-0 zui:bg-transparent zui:p-0 zui:leading-none zui:text-[var(--zui-color-text)] zui:outline-none zui:transition-opacity zui:duration-200 zui:ease-out zui:hover:opacity-80 zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:opacity-50",
12204
+ "aria-label": "پاک کردن",
12205
+ children: /* @__PURE__ */ (0, M.jsx)(ht, {
12206
+ className: "zui:size-5 zui:text-[var(--zui-color-text)] zui:transition-transform zui:duration-200 zui:ease-out zui:group-hover/clear-search:scale-110",
12207
+ "aria-hidden": "true"
12208
+ })
12209
+ })
12210
+ }) : null,
12211
+ j ? /* @__PURE__ */ (0, M.jsx)("button", {
12212
+ type: "button",
12213
+ onClick: () => S((e) => !e),
12214
+ className: "zui:absolute zui:left-3 zui:top-1/2 zui:-translate-y-1/2 zui:cursor-pointer zui:text-[var(--zui-color-text)] zui:transition-opacity zui:hover:opacity-80 zui:focus-visible:outline-none",
12215
+ "aria-label": x ? "Hide password" : "Show password",
12216
+ children: x ? /* @__PURE__ */ (0, M.jsx)(at, {
12217
+ className: "zui:size-4",
12218
+ "aria-hidden": "true"
12219
+ }) : /* @__PURE__ */ (0, M.jsx)(ot, {
12220
+ className: "zui:size-4",
12221
+ "aria-hidden": "true"
12222
+ })
12223
+ }) : null
12224
+ ]
12225
+ })]
12226
+ });
12227
+ }
12228
+ //#endregion
12229
+ //#region src/services/convertToPersianDigits/convertToPersianDigits.ts
12230
+ var ix = [
12231
+ "۰",
12232
+ "۱",
12233
+ "۲",
12234
+ "۳",
12235
+ "۴",
12236
+ "۵",
12237
+ "۶",
12238
+ "۷",
12239
+ "۸",
12240
+ "۹"
12241
+ ];
12242
+ function ax({ value: e }) {
12243
+ return e.replace(/\d/g, (e) => ix[Number(e)]);
12244
+ }
12245
+ //#endregion
12246
+ //#region src/components/Pagination/Pagination.variant.ts
12247
+ var ox = K("zui:mx-auto zui:flex zui:w-full zui:justify-center"), sx = K("zui:flex zui:flex-row zui:items-center zui:gap-1"), cx = K(""), lx = K("zui:inline-flex zui:items-center zui:justify-center zui:gap-1 zui:whitespace-nowrap radius-sm zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-theme-bg-page)] zui:text-sm zui:font-medium zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:select-none zui:transition-all zui:duration-300 zui:ease-out zui:hover:border-[var(--zui-theme-border-strong)] zui:hover:bg-[var(--zui-theme-bg-elevated)] zui:focus-visible:ring-[3px] zui:focus-visible:ring-[var(--zui-theme-action-secondary)] zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:opacity-45", {
12248
+ variants: {
12249
+ size: {
12250
+ default: "zui:h-9 zui:min-w-9 zui:px-3",
12251
+ icon: "zui:size-9"
12252
+ },
12253
+ active: {
12254
+ true: "zui:border-[var(--zui-theme-action-primary)] zui:text-[var(--zui-theme-action-primary)] zui:hover:border-[var(--zui-theme-action-primary-hover)] zui:hover:text-[var(--zui-theme-action-primary-hover)]",
12255
+ false: ""
12734
12256
  }
12257
+ },
12258
+ defaultVariants: {
12259
+ size: "icon",
12260
+ active: !1
12261
+ }
12262
+ }), ux = K("zui:gap-1.5 zui:pl-2.5 zui:pr-3"), dx = K("zui:gap-1.5 zui:pl-3 zui:pr-2.5"), fx = K("zui:flex zui:size-9 zui:items-center zui:justify-center zui:text-[var(--zui-theme-text-muted)]"), px = "صفحه بندی", mx = "قبلی", hx = "بعدی", gx = "صفحات بیشتر";
12263
+ function _x(e, t) {
12264
+ if (typeof e != "number" || !Number.isFinite(e)) return t;
12265
+ let n = Math.floor(e);
12266
+ return n >= 1 ? n : t;
12267
+ }
12268
+ function vx(e, t) {
12269
+ return Math.min(Math.max(e, 1), t);
12270
+ }
12271
+ function yx({ currentPage: e, totalPages: t, siblingCount: n }) {
12272
+ if (t <= 1) return [1];
12273
+ if (t <= n * 2 + 5) return Array.from({ length: t }, (e, t) => t + 1);
12274
+ let r = Math.max(e - n, 2), i = Math.min(e + n, t - 1), a = r > 2, o = i < t - 1, s = [1];
12275
+ if (a) s.push("ellipsis");
12276
+ else for (let e = 2; e < r; e += 1) s.push(e);
12277
+ for (let e = r; e <= i; e += 1) s.push(e);
12278
+ if (o) s.push("ellipsis");
12279
+ else for (let e = i + 1; e < t; e += 1) s.push(e);
12280
+ return s.push(t), s;
12281
+ }
12282
+ function bx(e) {
12283
+ return ax({ value: String(e) });
12284
+ }
12285
+ function xx({ totalPages: t = 1, page: n, defaultPage: r = 1, siblingCount: i = 1, showControls: a = !0, previousLabel: o = mx, nextLabel: s = hx, dir: c = "rtl", className: l, onPageChange: u }) {
12286
+ let d = _x(t, 1), f = vx(_x(r, 1), d), p = n !== void 0, [m, h] = e.useState(f), g = _x(n, 1), _ = vx(p ? g : m, d), v = Math.max(0, Math.floor(i)), y = e.useMemo(() => yx({
12287
+ currentPage: _,
12288
+ totalPages: d,
12289
+ siblingCount: v
12290
+ }), [
12291
+ _,
12292
+ v,
12293
+ d
12294
+ ]), b = e.useCallback((e) => {
12295
+ let t = vx(e, d);
12296
+ t !== _ && (p || h(t), u?.(t));
12735
12297
  }, [
12736
- b,
12737
- te,
12738
- F
12739
- ]), e.useEffect(() => {
12740
- let e = () => te(!1);
12741
- return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
12742
- window.removeEventListener("blur", e), window.removeEventListener("resize", e);
12743
- };
12744
- }, [te]);
12745
- let [I, L] = ZS((e) => {
12746
- let t = k().filter((e) => !e.disabled), n = QS(t, e, t.find((e) => e.ref.current === document.activeElement));
12747
- n && setTimeout(() => n.ref.current.focus());
12748
- }), ne = e.useCallback((e, t, n) => {
12749
- let r = !N.current && !n;
12750
- (y.value !== void 0 && y.value === t || r) && (E(e), r && (N.current = !0));
12751
- }, [y.value]), re = e.useCallback(() => b?.focus(), [b]), ie = e.useCallback((e, t, n) => {
12752
- let r = !N.current && !n;
12753
- (y.value !== void 0 && y.value === t || r) && O(e);
12754
- }, [y.value]), z = i === "popper" ? bS : vS, ae = z === bS ? {
12755
- side: c,
12756
- sideOffset: l,
12757
- align: u,
12758
- alignOffset: d,
12759
- arrowPadding: f,
12760
- collisionBoundary: p,
12761
- collisionPadding: m,
12762
- sticky: h,
12763
- hideWhenDetached: g,
12764
- avoidCollisions: _
12765
- } : {};
12766
- return /* @__PURE__ */ (0, M.jsx)(fS, {
12767
- scope: r,
12768
- content: b,
12769
- viewport: S,
12770
- onViewportChange: C,
12771
- itemRefCallback: ne,
12772
- selectedItem: T,
12773
- onItemLeave: re,
12774
- itemTextRefCallback: ie,
12775
- focusSelectedItem: P,
12776
- selectedItemText: D,
12777
- position: i,
12778
- isPositioned: A,
12779
- searchRef: I,
12780
- children: /* @__PURE__ */ (0, M.jsx)(po, {
12781
- as: hS,
12782
- allowPinchZoom: !0,
12783
- children: /* @__PURE__ */ (0, M.jsx)(Jt, {
12784
- asChild: !0,
12785
- trapped: y.open,
12786
- onMountAutoFocus: (e) => {
12787
- e.preventDefault();
12788
- },
12789
- onUnmountAutoFocus: B(a, (e) => {
12790
- y.trigger?.focus({ preventScroll: !0 }), e.preventDefault();
12791
- }),
12792
- children: /* @__PURE__ */ (0, M.jsx)(Mt, {
12793
- asChild: !0,
12794
- disableOutsidePointerEvents: !0,
12795
- onEscapeKeyDown: o,
12796
- onPointerDownOutside: s,
12797
- onFocusOutside: (e) => e.preventDefault(),
12798
- onDismiss: () => y.onOpenChange(!1),
12799
- children: /* @__PURE__ */ (0, M.jsx)(z, {
12800
- role: "listbox",
12801
- id: y.contentId,
12802
- "data-state": y.open ? "open" : "closed",
12803
- dir: y.dir,
12804
- onContextMenu: (e) => e.preventDefault(),
12805
- ...v,
12806
- ...ae,
12807
- onPlaced: () => j(!0),
12808
- ref: w,
12809
- style: {
12810
- display: "flex",
12811
- flexDirection: "column",
12812
- outline: "none",
12813
- ...v.style
12814
- },
12815
- onKeyDown: B(v.onKeyDown, (e) => {
12816
- let t = e.ctrlKey || e.altKey || e.metaKey;
12817
- if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && L(e.key), [
12818
- "ArrowUp",
12819
- "ArrowDown",
12820
- "Home",
12821
- "End"
12822
- ].includes(e.key)) {
12823
- let t = k().filter((e) => !e.disabled).map((e) => e.ref.current);
12824
- if (["ArrowUp", "End"].includes(e.key) && (t = t.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(e.key)) {
12825
- let n = e.target, r = t.indexOf(n);
12826
- t = t.slice(r + 1);
12827
- }
12828
- setTimeout(() => ee(t)), e.preventDefault();
12829
- }
12298
+ _,
12299
+ p,
12300
+ u,
12301
+ d
12302
+ ]), x = _ > 1, S = _ < d;
12303
+ return /* @__PURE__ */ (0, M.jsx)("nav", {
12304
+ role: "navigation",
12305
+ "aria-label": px,
12306
+ dir: c,
12307
+ "data-slot": "pagination",
12308
+ className: G(ox(), l),
12309
+ children: /* @__PURE__ */ (0, M.jsxs)("ul", {
12310
+ "data-slot": "pagination-content",
12311
+ className: sx(),
12312
+ children: [
12313
+ a ? /* @__PURE__ */ (0, M.jsx)("li", {
12314
+ "data-slot": "pagination-item",
12315
+ className: cx(),
12316
+ children: /* @__PURE__ */ (0, M.jsxs)("button", {
12317
+ type: "button",
12318
+ "data-slot": "pagination-previous",
12319
+ "aria-label": o,
12320
+ disabled: !x,
12321
+ onClick: () => b(_ - 1),
12322
+ className: G(lx({ size: "default" }), ux()),
12323
+ children: [/* @__PURE__ */ (0, M.jsx)(et, {
12324
+ className: "zui:size-4",
12325
+ "aria-hidden": "true"
12326
+ }), /* @__PURE__ */ (0, M.jsx)("span", { children: o })]
12327
+ })
12328
+ }) : null,
12329
+ y.map((e, t) => {
12330
+ if (e === "ellipsis") return /* @__PURE__ */ (0, M.jsx)("li", {
12331
+ "data-slot": "pagination-item",
12332
+ className: cx(),
12333
+ children: /* @__PURE__ */ (0, M.jsxs)("span", {
12334
+ "data-slot": "pagination-ellipsis",
12335
+ "aria-hidden": "true",
12336
+ className: fx(),
12337
+ children: [/* @__PURE__ */ (0, M.jsx)(it, { className: "zui:size-4" }), /* @__PURE__ */ (0, M.jsx)("span", {
12338
+ className: "zui:sr-only",
12339
+ children: gx
12340
+ })]
12341
+ })
12342
+ }, `ellipsis-${t}`);
12343
+ let n = e === _;
12344
+ return /* @__PURE__ */ (0, M.jsx)("li", {
12345
+ "data-slot": "pagination-item",
12346
+ className: cx(),
12347
+ children: /* @__PURE__ */ (0, M.jsx)("button", {
12348
+ type: "button",
12349
+ "data-slot": "pagination-link",
12350
+ "aria-label": `${px} ${bx(e)}`,
12351
+ "aria-current": n ? "page" : void 0,
12352
+ onClick: () => b(e),
12353
+ className: lx({
12354
+ size: "icon",
12355
+ active: n
12356
+ }),
12357
+ children: bx(e)
12830
12358
  })
12359
+ }, `page-${e}`);
12360
+ }),
12361
+ a ? /* @__PURE__ */ (0, M.jsx)("li", {
12362
+ "data-slot": "pagination-item",
12363
+ className: cx(),
12364
+ children: /* @__PURE__ */ (0, M.jsxs)("button", {
12365
+ type: "button",
12366
+ "data-slot": "pagination-next",
12367
+ "aria-label": s,
12368
+ disabled: !S,
12369
+ onClick: () => b(_ + 1),
12370
+ className: G(lx({ size: "default" }), dx()),
12371
+ children: [/* @__PURE__ */ (0, M.jsx)("span", { children: s }), /* @__PURE__ */ (0, M.jsx)(tt, {
12372
+ className: "zui:size-4",
12373
+ "aria-hidden": "true"
12374
+ })]
12831
12375
  })
12832
- })
12833
- })
12376
+ }) : null
12377
+ ]
12834
12378
  })
12835
12379
  });
12836
- });
12837
- gS.displayName = mS;
12838
- var _S = "SelectItemAlignedPosition", vS = e.forwardRef((t, n) => {
12839
- let { __scopeSelect: r, onPlaced: i, ...a } = t, o = Zx(lS, r), s = pS(lS, r), [c, l] = e.useState(null), [u, d] = e.useState(null), f = R(n, (e) => d(e)), p = Gx(r), m = e.useRef(!1), h = e.useRef(!0), { viewport: g, selectedItem: _, selectedItemText: v, focusSelectedItem: y } = s, b = e.useCallback(() => {
12840
- if (o.trigger && o.valueNode && c && u && g && _ && v) {
12841
- let e = o.trigger.getBoundingClientRect(), t = u.getBoundingClientRect(), n = o.valueNode.getBoundingClientRect(), r = v.getBoundingClientRect();
12842
- if (o.dir !== "rtl") {
12843
- let i = r.left - t.left, a = n.left - i, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - dS, d = Ix(a, [dS, Math.max(dS, u - l)]);
12844
- c.style.minWidth = s + "px", c.style.left = d + "px";
12845
- } else {
12846
- let i = t.right - r.right, a = window.innerWidth - n.right - i, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - dS, d = Ix(a, [dS, Math.max(dS, u - l)]);
12847
- c.style.minWidth = s + "px", c.style.right = d + "px";
12848
- }
12849
- let a = p(), s = window.innerHeight - dS * 2, l = g.scrollHeight, d = window.getComputedStyle(u), f = parseInt(d.borderTopWidth, 10), h = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = f + h + l + b + y, S = Math.min(_.offsetHeight * 5, x), C = window.getComputedStyle(g), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), E = e.top + e.height / 2 - dS, D = s - E, O = _.offsetHeight / 2, k = _.offsetTop + O, A = f + h + k, j = x - A;
12850
- if (A <= E) {
12851
- let e = a.length > 0 && _ === a[a.length - 1].ref.current;
12852
- c.style.bottom = "0px";
12853
- let t = u.clientHeight - g.offsetTop - g.offsetHeight, n = A + Math.max(D, O + (e ? T : 0) + t + y);
12854
- c.style.height = n + "px";
12855
- } else {
12856
- let e = a.length > 0 && _ === a[0].ref.current;
12857
- c.style.top = "0px";
12858
- let t = Math.max(E, f + g.offsetTop + (e ? w : 0) + O) + j;
12859
- c.style.height = t + "px", g.scrollTop = A - E + g.offsetTop;
12860
- }
12861
- c.style.margin = `${dS}px 0`, c.style.minHeight = S + "px", c.style.maxHeight = s + "px", i?.(), requestAnimationFrame(() => m.current = !0);
12862
- }
12863
- }, [
12864
- p,
12865
- o.trigger,
12866
- o.valueNode,
12867
- c,
12868
- u,
12869
- g,
12870
- _,
12871
- v,
12872
- o.dir,
12380
+ }
12381
+ //#endregion
12382
+ //#region node_modules/@radix-ui/react-collection/dist/index.mjs
12383
+ function Sx(e) {
12384
+ let n = e + "CollectionProvider", [r, i] = z(n), [a, o] = r(n, {
12385
+ collectionRef: { current: null },
12386
+ itemMap: /* @__PURE__ */ new Map()
12387
+ }), s = (e) => {
12388
+ let { scope: n, children: r } = e, i = t.useRef(null), o = t.useRef(/* @__PURE__ */ new Map()).current;
12389
+ return /* @__PURE__ */ (0, M.jsx)(a, {
12390
+ scope: n,
12391
+ itemMap: o,
12392
+ collectionRef: i,
12393
+ children: r
12394
+ });
12395
+ };
12396
+ s.displayName = n;
12397
+ let c = e + "CollectionSlot", l = /* @__PURE__ */ he(c), u = t.forwardRef((e, t) => {
12398
+ let { scope: n, children: r } = e;
12399
+ return /* @__PURE__ */ (0, M.jsx)(l, {
12400
+ ref: R(t, o(c, n).collectionRef),
12401
+ children: r
12402
+ });
12403
+ });
12404
+ u.displayName = c;
12405
+ let d = e + "CollectionItemSlot", f = "data-radix-collection-item", p = /* @__PURE__ */ he(d), m = t.forwardRef((e, n) => {
12406
+ let { scope: r, children: i, ...a } = e, s = t.useRef(null), c = R(n, s), l = o(d, r);
12407
+ return t.useEffect(() => (l.itemMap.set(s, {
12408
+ ref: s,
12409
+ ...a
12410
+ }), () => void l.itemMap.delete(s))), /* @__PURE__ */ (0, M.jsx)(p, {
12411
+ [f]: "",
12412
+ ref: c,
12413
+ children: i
12414
+ });
12415
+ });
12416
+ m.displayName = d;
12417
+ function h(n) {
12418
+ let r = o(e + "CollectionConsumer", n);
12419
+ return t.useCallback(() => {
12420
+ let e = r.collectionRef.current;
12421
+ if (!e) return [];
12422
+ let t = Array.from(e.querySelectorAll(`[${f}]`));
12423
+ return Array.from(r.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
12424
+ }, [r.collectionRef, r.itemMap]);
12425
+ }
12426
+ return [
12427
+ {
12428
+ Provider: s,
12429
+ Slot: u,
12430
+ ItemSlot: m
12431
+ },
12432
+ h,
12873
12433
  i
12874
- ]);
12875
- V(() => b(), [b]);
12876
- let [x, S] = e.useState();
12877
- return V(() => {
12878
- u && S(window.getComputedStyle(u).zIndex);
12879
- }, [u]), /* @__PURE__ */ (0, M.jsx)(xS, {
12434
+ ];
12435
+ }
12436
+ //#endregion
12437
+ //#region node_modules/@radix-ui/react-direction/dist/index.mjs
12438
+ var Cx = e.createContext(void 0);
12439
+ function wx(t) {
12440
+ let n = e.useContext(Cx);
12441
+ return t || n || "ltr";
12442
+ }
12443
+ //#endregion
12444
+ //#region node_modules/@radix-ui/react-roving-focus/dist/index.mjs
12445
+ var Tx = "rovingFocusGroup.onEntryFocus", Ex = {
12446
+ bubbles: !1,
12447
+ cancelable: !0
12448
+ }, Dx = "RovingFocusGroup", [Ox, kx, Ax] = Sx(Dx), [jx, Mx] = z(Dx, [Ax]), [Nx, Px] = jx(Dx), Fx = e.forwardRef((e, t) => /* @__PURE__ */ (0, M.jsx)(Ox.Provider, {
12449
+ scope: e.__scopeRovingFocusGroup,
12450
+ children: /* @__PURE__ */ (0, M.jsx)(Ox.Slot, {
12451
+ scope: e.__scopeRovingFocusGroup,
12452
+ children: /* @__PURE__ */ (0, M.jsx)(Ix, {
12453
+ ...e,
12454
+ ref: t
12455
+ })
12456
+ })
12457
+ }));
12458
+ Fx.displayName = Dx;
12459
+ var Ix = e.forwardRef((t, n) => {
12460
+ let { __scopeRovingFocusGroup: r, orientation: i, loop: a = !1, dir: o, currentTabStopId: s, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: l, onEntryFocus: u, preventScrollOnEntryFocus: d = !1, ...f } = t, p = e.useRef(null), m = R(n, p), h = wx(o), [g, _] = H({
12461
+ prop: s,
12462
+ defaultProp: c ?? null,
12463
+ onChange: l,
12464
+ caller: Dx
12465
+ }), [v, y] = e.useState(!1), b = wt(u), x = kx(r), S = e.useRef(!1), [C, w] = e.useState(0);
12466
+ return e.useEffect(() => {
12467
+ let e = p.current;
12468
+ if (e) return e.addEventListener(Tx, b), () => e.removeEventListener(Tx, b);
12469
+ }, [b]), /* @__PURE__ */ (0, M.jsx)(Nx, {
12880
12470
  scope: r,
12881
- contentWrapper: c,
12882
- shouldExpandOnScrollRef: m,
12883
- onScrollButtonChange: e.useCallback((e) => {
12884
- e && h.current === !0 && (b(), y?.(), h.current = !1);
12885
- }, [b, y]),
12886
- children: /* @__PURE__ */ (0, M.jsx)("div", {
12887
- ref: l,
12471
+ orientation: i,
12472
+ dir: h,
12473
+ loop: a,
12474
+ currentTabStopId: g,
12475
+ onItemFocus: e.useCallback((e) => _(e), [_]),
12476
+ onItemShiftTab: e.useCallback(() => y(!0), []),
12477
+ onFocusableItemAdd: e.useCallback(() => w((e) => e + 1), []),
12478
+ onFocusableItemRemove: e.useCallback(() => w((e) => e - 1), []),
12479
+ children: /* @__PURE__ */ (0, M.jsx)(W.div, {
12480
+ tabIndex: v || C === 0 ? -1 : 0,
12481
+ "data-orientation": i,
12482
+ ...f,
12483
+ ref: m,
12888
12484
  style: {
12889
- display: "flex",
12890
- flexDirection: "column",
12891
- position: "fixed",
12892
- zIndex: x
12485
+ outline: "none",
12486
+ ...t.style
12893
12487
  },
12894
- children: /* @__PURE__ */ (0, M.jsx)(W.div, {
12895
- ...a,
12896
- ref: f,
12897
- style: {
12898
- boxSizing: "border-box",
12899
- maxHeight: "100%",
12900
- ...a.style
12488
+ onMouseDown: B(t.onMouseDown, () => {
12489
+ S.current = !0;
12490
+ }),
12491
+ onFocus: B(t.onFocus, (e) => {
12492
+ let t = !S.current;
12493
+ if (e.target === e.currentTarget && t && !v) {
12494
+ let t = new CustomEvent(Tx, Ex);
12495
+ if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
12496
+ let e = x().filter((e) => e.focusable);
12497
+ Hx([
12498
+ e.find((e) => e.active),
12499
+ e.find((e) => e.id === g),
12500
+ ...e
12501
+ ].filter(Boolean).map((e) => e.ref.current), d);
12502
+ }
12901
12503
  }
12902
- })
12504
+ S.current = !1;
12505
+ }),
12506
+ onBlur: B(t.onBlur, () => y(!1))
12903
12507
  })
12904
12508
  });
12905
- });
12906
- vS.displayName = _S;
12907
- var yS = "SelectPopperPosition", bS = e.forwardRef((e, t) => {
12908
- let { __scopeSelect: n, align: r = "start", collisionPadding: i = dS, ...a } = e, o = Yx(n);
12909
- return /* @__PURE__ */ (0, M.jsx)(Gi, {
12910
- ...o,
12911
- ...a,
12912
- ref: t,
12913
- align: r,
12914
- collisionPadding: i,
12915
- style: {
12916
- boxSizing: "border-box",
12917
- ...a.style,
12918
- "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
12919
- "--radix-select-content-available-width": "var(--radix-popper-available-width)",
12920
- "--radix-select-content-available-height": "var(--radix-popper-available-height)",
12921
- "--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
12922
- "--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
12923
- }
12924
- });
12925
- });
12926
- bS.displayName = yS;
12927
- var [xS, SS] = qx(lS, {}), CS = "SelectViewport", wS = e.forwardRef((t, n) => {
12928
- let { __scopeSelect: r, nonce: i, ...a } = t, o = pS(CS, r), s = SS(CS, r), c = R(n, o.onViewportChange), l = e.useRef(0);
12929
- return /* @__PURE__ */ (0, M.jsxs)(M.Fragment, { children: [/* @__PURE__ */ (0, M.jsx)("style", {
12930
- dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" },
12931
- nonce: i
12932
- }), /* @__PURE__ */ (0, M.jsx)(Wx.Slot, {
12509
+ }), Lx = "RovingFocusGroupItem", Rx = e.forwardRef((t, n) => {
12510
+ let { __scopeRovingFocusGroup: r, focusable: i = !0, active: a = !1, tabStopId: o, children: s, ...c } = t, l = ln(), u = o || l, d = Px(Lx, r), f = d.currentTabStopId === u, p = kx(r), { onFocusableItemAdd: m, onFocusableItemRemove: h, currentTabStopId: g } = d;
12511
+ return e.useEffect(() => {
12512
+ if (i) return m(), () => h();
12513
+ }, [
12514
+ i,
12515
+ m,
12516
+ h
12517
+ ]), /* @__PURE__ */ (0, M.jsx)(Ox.ItemSlot, {
12933
12518
  scope: r,
12934
- children: /* @__PURE__ */ (0, M.jsx)(W.div, {
12935
- "data-radix-select-viewport": "",
12936
- role: "presentation",
12937
- ...a,
12938
- ref: c,
12939
- style: {
12940
- position: "relative",
12941
- flex: 1,
12942
- overflow: "hidden auto",
12943
- ...a.style
12944
- },
12945
- onScroll: B(a.onScroll, (e) => {
12946
- let t = e.currentTarget, { contentWrapper: n, shouldExpandOnScrollRef: r } = s;
12947
- if (r?.current && n) {
12948
- let e = Math.abs(l.current - t.scrollTop);
12949
- if (e > 0) {
12950
- let r = window.innerHeight - dS * 2, i = parseFloat(n.style.minHeight), a = parseFloat(n.style.height), o = Math.max(i, a);
12951
- if (o < r) {
12952
- let i = o + e, a = Math.min(r, i), s = i - a;
12953
- n.style.height = a + "px", n.style.bottom === "0px" && (t.scrollTop = s > 0 ? s : 0, n.style.justifyContent = "flex-end");
12954
- }
12519
+ id: u,
12520
+ focusable: i,
12521
+ active: a,
12522
+ children: /* @__PURE__ */ (0, M.jsx)(W.span, {
12523
+ tabIndex: f ? 0 : -1,
12524
+ "data-orientation": d.orientation,
12525
+ ...c,
12526
+ ref: n,
12527
+ onMouseDown: B(t.onMouseDown, (e) => {
12528
+ i ? d.onItemFocus(u) : e.preventDefault();
12529
+ }),
12530
+ onFocus: B(t.onFocus, () => d.onItemFocus(u)),
12531
+ onKeyDown: B(t.onKeyDown, (e) => {
12532
+ if (e.key === "Tab" && e.shiftKey) {
12533
+ d.onItemShiftTab();
12534
+ return;
12535
+ }
12536
+ if (e.target !== e.currentTarget) return;
12537
+ let t = Vx(e, d.orientation, d.dir);
12538
+ if (t !== void 0) {
12539
+ if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
12540
+ e.preventDefault();
12541
+ let n = p().filter((e) => e.focusable).map((e) => e.ref.current);
12542
+ if (t === "last") n.reverse();
12543
+ else if (t === "prev" || t === "next") {
12544
+ t === "prev" && n.reverse();
12545
+ let r = n.indexOf(e.currentTarget);
12546
+ n = d.loop ? Ux(n, r + 1) : n.slice(r + 1);
12955
12547
  }
12548
+ setTimeout(() => Hx(n));
12956
12549
  }
12957
- l.current = t.scrollTop;
12958
- })
12550
+ }),
12551
+ children: typeof s == "function" ? s({
12552
+ isCurrentTabStop: f,
12553
+ hasTabStop: g != null
12554
+ }) : s
12959
12555
  })
12960
- })] });
12556
+ });
12557
+ });
12558
+ Rx.displayName = Lx;
12559
+ var zx = {
12560
+ ArrowLeft: "prev",
12561
+ ArrowUp: "prev",
12562
+ ArrowRight: "next",
12563
+ ArrowDown: "next",
12564
+ PageUp: "first",
12565
+ Home: "first",
12566
+ PageDown: "last",
12567
+ End: "last"
12568
+ };
12569
+ function Bx(e, t) {
12570
+ return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
12571
+ }
12572
+ function Vx(e, t, n) {
12573
+ let r = Bx(e.key, n);
12574
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return zx[r];
12575
+ }
12576
+ function Hx(e, t = !1) {
12577
+ let n = document.activeElement;
12578
+ for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
12579
+ }
12580
+ function Ux(e, t) {
12581
+ return e.map((n, r) => e[(t + r) % e.length]);
12582
+ }
12583
+ var Wx = Fx, Gx = Rx, Kx = "Radio", [qx, Jx] = z(Kx), [Yx, Xx] = qx(Kx), Zx = e.forwardRef((t, n) => {
12584
+ let { __scopeRadio: r, name: i, checked: a = !1, required: o, disabled: s, value: c = "on", onCheck: l, form: u, ...d } = t, [f, p] = e.useState(null), m = R(n, (e) => p(e)), h = e.useRef(!1), g = f ? u || !!f.closest("form") : !0;
12585
+ return /* @__PURE__ */ (0, M.jsxs)(Yx, {
12586
+ scope: r,
12587
+ checked: a,
12588
+ disabled: s,
12589
+ children: [/* @__PURE__ */ (0, M.jsx)(W.button, {
12590
+ type: "button",
12591
+ role: "radio",
12592
+ "aria-checked": a,
12593
+ "data-state": nS(a),
12594
+ "data-disabled": s ? "" : void 0,
12595
+ disabled: s,
12596
+ value: c,
12597
+ ...d,
12598
+ ref: m,
12599
+ onClick: B(t.onClick, (e) => {
12600
+ a || l?.(), g && (h.current = e.isPropagationStopped(), h.current || e.stopPropagation());
12601
+ })
12602
+ }), g && /* @__PURE__ */ (0, M.jsx)(tS, {
12603
+ control: f,
12604
+ bubbles: !h.current,
12605
+ name: i,
12606
+ value: c,
12607
+ checked: a,
12608
+ required: o,
12609
+ disabled: s,
12610
+ form: u,
12611
+ style: { transform: "translateX(-100%)" }
12612
+ })]
12613
+ });
12961
12614
  });
12962
- wS.displayName = CS;
12963
- var TS = "SelectGroup", [ES, DS] = qx(TS), OS = e.forwardRef((e, t) => {
12964
- let { __scopeSelect: n, ...r } = e, i = ln();
12965
- return /* @__PURE__ */ (0, M.jsx)(ES, {
12966
- scope: n,
12967
- id: i,
12968
- children: /* @__PURE__ */ (0, M.jsx)(W.div, {
12969
- role: "group",
12970
- "aria-labelledby": i,
12971
- ...r,
12615
+ Zx.displayName = Kx;
12616
+ var Qx = "RadioIndicator", $x = e.forwardRef((e, t) => {
12617
+ let { __scopeRadio: n, forceMount: r, ...i } = e, a = Xx(Qx, n);
12618
+ return /* @__PURE__ */ (0, M.jsx)(de, {
12619
+ present: r || a.checked,
12620
+ children: /* @__PURE__ */ (0, M.jsx)(W.span, {
12621
+ "data-state": nS(a.checked),
12622
+ "data-disabled": a.disabled ? "" : void 0,
12623
+ ...i,
12972
12624
  ref: t
12973
12625
  })
12974
12626
  });
12975
12627
  });
12976
- OS.displayName = TS;
12977
- var kS = "SelectLabel", AS = e.forwardRef((e, t) => {
12978
- let { __scopeSelect: n, ...r } = e, i = DS(kS, n);
12979
- return /* @__PURE__ */ (0, M.jsx)(W.div, {
12980
- id: i.id,
12981
- ...r,
12982
- ref: t
12628
+ $x.displayName = Qx;
12629
+ var eS = "RadioBubbleInput", tS = e.forwardRef(({ __scopeRadio: t, control: n, checked: r, bubbles: i = !0, ...a }, o) => {
12630
+ let s = e.useRef(null), c = R(s, o), l = ce(r), u = le(n);
12631
+ return e.useEffect(() => {
12632
+ let e = s.current;
12633
+ if (!e) return;
12634
+ let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set;
12635
+ if (l !== r && n) {
12636
+ let t = new Event("click", { bubbles: i });
12637
+ n.call(e, r), e.dispatchEvent(t);
12638
+ }
12639
+ }, [
12640
+ l,
12641
+ r,
12642
+ i
12643
+ ]), /* @__PURE__ */ (0, M.jsx)(W.input, {
12644
+ type: "radio",
12645
+ "aria-hidden": !0,
12646
+ defaultChecked: r,
12647
+ ...a,
12648
+ tabIndex: -1,
12649
+ ref: c,
12650
+ style: {
12651
+ ...a.style,
12652
+ ...u,
12653
+ position: "absolute",
12654
+ pointerEvents: "none",
12655
+ opacity: 0,
12656
+ margin: 0
12657
+ }
12983
12658
  });
12984
12659
  });
12985
- AS.displayName = kS;
12986
- var jS = "SelectItem", [MS, NS] = qx(jS), PS = e.forwardRef((t, n) => {
12987
- let { __scopeSelect: r, value: i, disabled: a = !1, textValue: o, ...s } = t, c = Zx(jS, r), l = pS(jS, r), u = c.value === i, [d, f] = e.useState(o ?? ""), [p, m] = e.useState(!1), h = R(n, (e) => l.itemRefCallback?.(e, i, a)), g = ln(), _ = e.useRef("touch"), v = () => {
12988
- a || (c.onValueChange(i), c.onOpenChange(!1));
12989
- };
12990
- if (i === "") throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
12991
- return /* @__PURE__ */ (0, M.jsx)(MS, {
12992
- scope: r,
12993
- value: i,
12994
- disabled: a,
12995
- textId: g,
12996
- isSelected: u,
12997
- onItemTextChange: e.useCallback((e) => {
12998
- f((t) => t || (e?.textContent ?? "").trim());
12999
- }, []),
13000
- children: /* @__PURE__ */ (0, M.jsx)(Wx.ItemSlot, {
13001
- scope: r,
13002
- value: i,
13003
- disabled: a,
13004
- textValue: d,
12660
+ tS.displayName = eS;
12661
+ function nS(e) {
12662
+ return e ? "checked" : "unchecked";
12663
+ }
12664
+ var rS = [
12665
+ "ArrowUp",
12666
+ "ArrowDown",
12667
+ "ArrowLeft",
12668
+ "ArrowRight"
12669
+ ], iS = "RadioGroup", [aS, oS] = z(iS, [Mx, Jx]), sS = Mx(), cS = Jx(), [lS, uS] = aS(iS), dS = e.forwardRef((e, t) => {
12670
+ let { __scopeRadioGroup: n, name: r, defaultValue: i, value: a, required: o = !1, disabled: s = !1, orientation: c, dir: l, loop: u = !0, onValueChange: d, ...f } = e, p = sS(n), m = wx(l), [h, g] = H({
12671
+ prop: a,
12672
+ defaultProp: i ?? null,
12673
+ onChange: d,
12674
+ caller: iS
12675
+ });
12676
+ return /* @__PURE__ */ (0, M.jsx)(lS, {
12677
+ scope: n,
12678
+ name: r,
12679
+ required: o,
12680
+ disabled: s,
12681
+ value: h,
12682
+ onValueChange: g,
12683
+ children: /* @__PURE__ */ (0, M.jsx)(Wx, {
12684
+ asChild: !0,
12685
+ ...p,
12686
+ orientation: c,
12687
+ dir: m,
12688
+ loop: u,
13005
12689
  children: /* @__PURE__ */ (0, M.jsx)(W.div, {
13006
- role: "option",
13007
- "aria-labelledby": g,
13008
- "data-highlighted": p ? "" : void 0,
13009
- "aria-selected": u && p,
13010
- "data-state": u ? "checked" : "unchecked",
13011
- "aria-disabled": a || void 0,
13012
- "data-disabled": a ? "" : void 0,
13013
- tabIndex: a ? void 0 : -1,
13014
- ...s,
13015
- ref: h,
13016
- onFocus: B(s.onFocus, () => m(!0)),
13017
- onBlur: B(s.onBlur, () => m(!1)),
13018
- onClick: B(s.onClick, () => {
13019
- _.current !== "mouse" && v();
13020
- }),
13021
- onPointerUp: B(s.onPointerUp, () => {
13022
- _.current === "mouse" && v();
13023
- }),
13024
- onPointerDown: B(s.onPointerDown, (e) => {
13025
- _.current = e.pointerType;
13026
- }),
13027
- onPointerMove: B(s.onPointerMove, (e) => {
13028
- _.current = e.pointerType, a ? l.onItemLeave?.() : _.current === "mouse" && e.currentTarget.focus({ preventScroll: !0 });
13029
- }),
13030
- onPointerLeave: B(s.onPointerLeave, (e) => {
13031
- e.currentTarget === document.activeElement && l.onItemLeave?.();
13032
- }),
13033
- onKeyDown: B(s.onKeyDown, (e) => {
13034
- l.searchRef?.current !== "" && e.key === " " || (Hx.includes(e.key) && v(), e.key === " " && e.preventDefault());
13035
- })
12690
+ role: "radiogroup",
12691
+ "aria-required": o,
12692
+ "aria-orientation": c,
12693
+ "data-disabled": s ? "" : void 0,
12694
+ dir: m,
12695
+ ...f,
12696
+ ref: t
13036
12697
  })
13037
12698
  })
13038
12699
  });
13039
12700
  });
13040
- PS.displayName = jS;
13041
- var FS = "SelectItemText", IS = e.forwardRef((t, n) => {
13042
- let { __scopeSelect: r, className: i, style: a, ...o } = t, s = Zx(FS, r), c = pS(FS, r), l = NS(FS, r), u = $x(FS, r), [d, p] = e.useState(null), m = R(n, (e) => p(e), l.onItemTextChange, (e) => c.itemTextRefCallback?.(e, l.value, l.disabled)), h = d?.textContent, g = e.useMemo(() => /* @__PURE__ */ (0, M.jsx)("option", {
13043
- value: l.value,
13044
- disabled: l.disabled,
13045
- children: h
13046
- }, l.value), [
13047
- l.disabled,
13048
- l.value,
13049
- h
13050
- ]), { onNativeOptionAdd: _, onNativeOptionRemove: v } = u;
13051
- return V(() => (_(g), () => v(g)), [
13052
- _,
13053
- v,
13054
- g
13055
- ]), /* @__PURE__ */ (0, M.jsxs)(M.Fragment, { children: [/* @__PURE__ */ (0, M.jsx)(W.span, {
13056
- id: l.textId,
13057
- ...o,
13058
- ref: m
13059
- }), l.isSelected && s.valueNode && !s.valueNodeHasChildren ? f.createPortal(o.children, s.valueNode) : null] });
13060
- });
13061
- IS.displayName = FS;
13062
- var LS = "SelectItemIndicator", RS = e.forwardRef((e, t) => {
13063
- let { __scopeSelect: n, ...r } = e;
13064
- return NS(LS, n).isSelected ? /* @__PURE__ */ (0, M.jsx)(W.span, {
13065
- "aria-hidden": !0,
13066
- ...r,
13067
- ref: t
13068
- }) : null;
13069
- });
13070
- RS.displayName = LS;
13071
- var zS = "SelectScrollUpButton", BS = e.forwardRef((t, n) => {
13072
- let r = pS(zS, t.__scopeSelect), i = SS(zS, t.__scopeSelect), [a, o] = e.useState(!1), s = R(n, i.onScrollButtonChange);
13073
- return V(() => {
13074
- if (r.viewport && r.isPositioned) {
13075
- let e = function() {
13076
- o(t.scrollTop > 0);
13077
- }, t = r.viewport;
13078
- return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
13079
- }
13080
- }, [r.viewport, r.isPositioned]), a ? /* @__PURE__ */ (0, M.jsx)(US, {
13081
- ...t,
13082
- ref: s,
13083
- onAutoScroll: () => {
13084
- let { viewport: e, selectedItem: t } = r;
13085
- e && t && (e.scrollTop -= t.offsetHeight);
13086
- }
13087
- }) : null;
13088
- });
13089
- BS.displayName = zS;
13090
- var VS = "SelectScrollDownButton", HS = e.forwardRef((t, n) => {
13091
- let r = pS(VS, t.__scopeSelect), i = SS(VS, t.__scopeSelect), [a, o] = e.useState(!1), s = R(n, i.onScrollButtonChange);
13092
- return V(() => {
13093
- if (r.viewport && r.isPositioned) {
13094
- let e = function() {
13095
- let e = t.scrollHeight - t.clientHeight;
13096
- o(Math.ceil(t.scrollTop) < e);
13097
- }, t = r.viewport;
13098
- return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
13099
- }
13100
- }, [r.viewport, r.isPositioned]), a ? /* @__PURE__ */ (0, M.jsx)(US, {
13101
- ...t,
13102
- ref: s,
13103
- onAutoScroll: () => {
13104
- let { viewport: e, selectedItem: t } = r;
13105
- e && t && (e.scrollTop += t.offsetHeight);
13106
- }
13107
- }) : null;
13108
- });
13109
- HS.displayName = VS;
13110
- var US = e.forwardRef((t, n) => {
13111
- let { __scopeSelect: r, onAutoScroll: i, ...a } = t, o = pS("SelectScrollButton", r), s = e.useRef(null), c = Gx(r), l = e.useCallback(() => {
13112
- s.current !== null && (window.clearInterval(s.current), s.current = null);
13113
- }, []);
13114
- return e.useEffect(() => () => l(), [l]), V(() => {
13115
- c().find((e) => e.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
13116
- }, [c]), /* @__PURE__ */ (0, M.jsx)(W.div, {
13117
- "aria-hidden": !0,
13118
- ...a,
13119
- ref: n,
13120
- style: {
13121
- flexShrink: 0,
13122
- ...a.style
13123
- },
13124
- onPointerDown: B(a.onPointerDown, () => {
13125
- s.current === null && (s.current = window.setInterval(i, 50));
13126
- }),
13127
- onPointerMove: B(a.onPointerMove, () => {
13128
- o.onItemLeave?.(), s.current === null && (s.current = window.setInterval(i, 50));
13129
- }),
13130
- onPointerLeave: B(a.onPointerLeave, () => {
13131
- l();
12701
+ dS.displayName = iS;
12702
+ var fS = "RadioGroupItem", pS = e.forwardRef((t, n) => {
12703
+ let { __scopeRadioGroup: r, disabled: i, ...a } = t, o = uS(fS, r), s = o.disabled || i, c = sS(r), l = cS(r), u = e.useRef(null), d = R(n, u), f = o.value === a.value, p = e.useRef(!1);
12704
+ return e.useEffect(() => {
12705
+ let e = (e) => {
12706
+ rS.includes(e.key) && (p.current = !0);
12707
+ }, t = () => p.current = !1;
12708
+ return document.addEventListener("keydown", e), document.addEventListener("keyup", t), () => {
12709
+ document.removeEventListener("keydown", e), document.removeEventListener("keyup", t);
12710
+ };
12711
+ }, []), /* @__PURE__ */ (0, M.jsx)(Gx, {
12712
+ asChild: !0,
12713
+ ...c,
12714
+ focusable: !s,
12715
+ active: f,
12716
+ children: /* @__PURE__ */ (0, M.jsx)(Zx, {
12717
+ disabled: s,
12718
+ required: o.required,
12719
+ checked: f,
12720
+ ...l,
12721
+ ...a,
12722
+ name: o.name,
12723
+ ref: d,
12724
+ onCheck: () => o.onValueChange(a.value),
12725
+ onKeyDown: B((e) => {
12726
+ e.key === "Enter" && e.preventDefault();
12727
+ }),
12728
+ onFocus: B(a.onFocus, () => {
12729
+ p.current && u.current?.click();
12730
+ })
13132
12731
  })
13133
12732
  });
13134
- }), WS = "SelectSeparator", GS = e.forwardRef((e, t) => {
13135
- let { __scopeSelect: n, ...r } = e;
13136
- return /* @__PURE__ */ (0, M.jsx)(W.div, {
13137
- "aria-hidden": !0,
13138
- ...r,
13139
- ref: t
13140
- });
13141
12733
  });
13142
- GS.displayName = WS;
13143
- var KS = "SelectArrow", qS = e.forwardRef((e, t) => {
13144
- let { __scopeSelect: n, ...r } = e, i = Yx(n), a = Zx(KS, n), o = pS(KS, n);
13145
- return a.open && o.position === "popper" ? /* @__PURE__ */ (0, M.jsx)(Ki, {
13146
- ...i,
12734
+ pS.displayName = fS;
12735
+ var mS = "RadioGroupIndicator", hS = e.forwardRef((e, t) => {
12736
+ let { __scopeRadioGroup: n, ...r } = e;
12737
+ return /* @__PURE__ */ (0, M.jsx)($x, {
12738
+ ...cS(n),
13147
12739
  ...r,
13148
12740
  ref: t
13149
- }) : null;
12741
+ });
13150
12742
  });
13151
- qS.displayName = KS;
13152
- var JS = "SelectBubbleInput", YS = e.forwardRef(({ __scopeSelect: t, value: n, ...r }, i) => {
13153
- let a = e.useRef(null), o = R(i, a), s = ce(n);
13154
- return e.useEffect(() => {
13155
- let e = a.current;
13156
- if (!e) return;
13157
- let t = window.HTMLSelectElement.prototype, r = Object.getOwnPropertyDescriptor(t, "value").set;
13158
- if (s !== n && r) {
13159
- let t = new Event("change", { bubbles: !0 });
13160
- r.call(e, n), e.dispatchEvent(t);
12743
+ hS.displayName = mS;
12744
+ var gS = dS, _S = pS, vS = hS, yS = K("zui:grid", {
12745
+ variants: {
12746
+ orientation: {
12747
+ vertical: "zui:grid-cols-1",
12748
+ horizontal: "zui:grid-cols-1 zui:sm:grid-cols-2"
12749
+ },
12750
+ gap: {
12751
+ sm: "zui:gap-2",
12752
+ default: "zui:gap-3",
12753
+ lg: "zui:gap-4"
12754
+ },
12755
+ disabled: {
12756
+ true: "zui:pointer-events-none zui:opacity-55",
12757
+ false: ""
13161
12758
  }
13162
- }, [s, n]), /* @__PURE__ */ (0, M.jsx)(W.select, {
13163
- ...r,
13164
- style: {
13165
- ...Lx,
13166
- ...r.style
12759
+ },
12760
+ defaultVariants: {
12761
+ orientation: "vertical",
12762
+ gap: "default",
12763
+ disabled: !1
12764
+ }
12765
+ }), bS = K("zui:group/radio zui:relative zui:inline-flex zui:size-[1.2rem] zui:shrink-0 zui:items-center zui:justify-center radius-full zui:border zui:border-[var(--zui-color-border)] zui:bg-[var(--zui-color-surface)] zui:text-[var(--zui-theme-action-primary)] zui:shadow-xs zui:cursor-pointer zui:outline-none zui:select-none zui:transition-all zui:duration-300 zui:ease-out zui:data-[state=checked]:border-[var(--zui-theme-action-primary)] zui:data-[state=checked]:bg-[var(--zui-color-surface)] zui:hover:-translate-y-0.5 zui:hover:border-[var(--zui-theme-action-primary-hover)] zui:hover:bg-[var(--zui-theme-bg-elevated)] zui:hover:shadow-[0_8px_20px_-12px_var(--zui-effect-shadow-ink-35)] zui:active:translate-y-px zui:focus-visible:border-[var(--zui-theme-action-secondary)] zui:focus-visible:ring-[3px] zui:focus-visible:ring-[var(--zui-theme-action-secondary)] zui:aria-invalid:border-[var(--zui-theme-status-danger)] zui:aria-invalid:ring-[var(--zui-theme-status-danger)] zui:disabled:cursor-not-allowed zui:disabled:pointer-events-none zui:disabled:opacity-50", {
12766
+ variants: {
12767
+ size: {
12768
+ sm: "zui:size-[1.05rem]",
12769
+ default: "zui:size-[1.2rem]",
12770
+ lg: "zui:size-6"
13167
12771
  },
13168
- ref: o,
13169
- defaultValue: n
13170
- });
13171
- });
13172
- YS.displayName = JS;
13173
- function XS(e) {
13174
- return e === "" || e === void 0;
13175
- }
13176
- function ZS(t) {
13177
- let n = wt(t), r = e.useRef(""), i = e.useRef(0), a = e.useCallback((e) => {
13178
- let t = r.current + e;
13179
- n(t), (function e(t) {
13180
- r.current = t, window.clearTimeout(i.current), t !== "" && (i.current = window.setTimeout(() => e(""), 1e3));
13181
- })(t);
13182
- }, [n]), o = e.useCallback(() => {
13183
- r.current = "", window.clearTimeout(i.current);
13184
- }, []);
13185
- return e.useEffect(() => () => window.clearTimeout(i.current), []), [
13186
- r,
13187
- a,
13188
- o
13189
- ];
13190
- }
13191
- function QS(e, t, n) {
13192
- let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = $S(e, Math.max(i, 0));
13193
- r.length === 1 && (a = a.filter((e) => e !== n));
13194
- let o = a.find((e) => e.textValue.toLowerCase().startsWith(r.toLowerCase()));
13195
- return o === n ? void 0 : o;
13196
- }
13197
- function $S(e, t) {
13198
- return e.map((n, r) => e[(t + r) % e.length]);
13199
- }
13200
- var eC = eS, tC = nS, nC = iS, rC = oS, iC = cS, aC = uS, oC = wS, sC = OS, cC = AS, lC = PS, uC = IS, dC = RS, fC = GS, pC = K([
13201
- "zui:flex zui:w-full zui:items-center zui:justify-between zui:gap-2 radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-transparent zui:px-3 zui:text-right zui:text-base zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:data-[placeholder]:text-[var(--zui-theme-text-muted)] zui:data-[has-value=true]:border-[var(--zui-theme-action-primary)] zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:bg-[var(--zui-color-muted-surface)] zui:disabled:opacity-50 zui:md:text-sm",
13202
- xv,
13203
- Sv
13204
- ].join(" "), {
12772
+ disabled: {
12773
+ true: "zui:pointer-events-none zui:opacity-50",
12774
+ false: ""
12775
+ }
12776
+ },
12777
+ defaultVariants: {
12778
+ size: "default",
12779
+ disabled: !1
12780
+ }
12781
+ }), xS = K("zui:pointer-events-none zui:absolute zui:inset-0 zui:flex zui:items-center zui:justify-center zui:text-[var(--zui-theme-action-primary)] zui:data-[state=checked]:animate-in zui:data-[state=checked]:zoom-in-95 zui:data-[state=checked]:fade-in-0", {
13205
12782
  variants: { size: {
13206
- sm: "zui:h-[2.88rem]",
13207
- default: "zui:h-[3.24rem]",
13208
- lg: "zui:h-[3.6rem]"
12783
+ sm: "",
12784
+ default: "",
12785
+ lg: ""
13209
12786
  } },
13210
12787
  defaultVariants: { size: "default" }
13211
- }), mC = K("zui:z-[120] zui:max-h-72 zui:min-w-[8rem] zui:overflow-hidden radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-color-muted-surface)] zui:text-[var(--zui-theme-text-primary)] zui:shadow-md zui:data-[state=open]:animate-in zui:data-[state=open]:fade-in-0 zui:data-[state=open]:zoom-in-95 zui:data-[side=bottom]:slide-in-from-top-2 zui:data-[side=left]:slide-in-from-right-2 zui:data-[side=right]:slide-in-from-left-2 zui:data-[side=top]:slide-in-from-bottom-2"), hC = K("zui:text-right zui:[&_[data-slot=select-label]]:px-2 zui:[&_[data-slot=select-label]]:py-1.5 zui:[&_[data-slot=select-label]]:text-xs zui:[&_[data-slot=select-label]]:font-semibold", {
13212
- variants: { hasSearch: {
13213
- true: "zui:px-1 zui:pb-1 zui:pt-0",
13214
- false: "zui:p-1"
12788
+ }), SS = K("zui:inline-flex zui:w-full zui:items-start zui:justify-between zui:gap-2.5 radius-md zui:border zui:border-[var(--zui-color-border)] zui:bg-[var(--zui-color-surface)] zui:px-3 zui:py-2.5 zui:transition-colors zui:duration-200 zui:has-[[data-state=checked]]:border-[var(--zui-theme-action-primary)]", {
12789
+ variants: {
12790
+ direction: {
12791
+ rtl: "zui:flex-row-reverse zui:text-right",
12792
+ ltr: "zui:flex-row zui:text-left"
12793
+ },
12794
+ disabled: {
12795
+ true: "zui:cursor-not-allowed zui:opacity-60",
12796
+ false: "zui:cursor-pointer"
12797
+ }
12798
+ },
12799
+ defaultVariants: {
12800
+ direction: "rtl",
12801
+ disabled: !1
12802
+ }
12803
+ }), CS = K("zui:text-sm zui:font-medium zui:leading-5 zui:text-[var(--zui-color-text)]", {
12804
+ variants: { disabled: {
12805
+ true: "zui:text-[var(--zui-theme-text-muted)]",
12806
+ false: ""
13215
12807
  } },
13216
- defaultVariants: { hasSearch: !1 }
13217
- }), gC = K("zui:relative zui:flex zui:w-full zui:cursor-pointer zui:items-center zui:border-b zui:border-[var(--zui-theme-border-default)] zui:py-1.5 zui:pl-8 zui:pr-2 zui:text-right zui:text-sm zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:select-none zui:transition-[background-color,color] zui:duration-150 zui:last:border-b-0 zui:data-[disabled]:pointer-events-none zui:data-[disabled]:cursor-not-allowed zui:data-[disabled]:opacity-45 zui:data-[highlighted]:bg-[var(--zui-theme-bg-muted)] zui:data-[highlighted]:text-[var(--zui-theme-text-primary)] zui:data-[state=checked]:bg-transparent"), _C = K("zui:px-2 zui:py-1.5 zui:text-right zui:text-xs zui:font-semibold zui:text-[var(--zui-theme-text-muted)]"), vC = K("zui:my-1 zui:h-px zui:bg-[var(--zui-theme-border-default)]"), yC = K(["zui:placeholder:text-[var(--zui-theme-text-muted)] zui:flex zui:h-9 zui:w-full zui:min-w-0 radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-transparent zui:px-3 zui:py-2 zui:text-right zui:text-sm zui:text-[var(--zui-theme-text-primary)] zui:outline-none", xv].join(" "));
13218
- //#endregion
13219
- //#region src/components/Select/Select.filter.ts
13220
- function bC(t) {
13221
- return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(bC).join(" ") : e.isValidElement(t) ? bC(t.props.children) : "";
13222
- }
13223
- function xC(t, n) {
13224
- return e.isValidElement(t) && t.type === n;
13225
- }
13226
- function SC(t, n) {
13227
- return e.isValidElement(t) ? t.type === n.item ? !0 : e.Children.toArray(t.props.children).some((e) => SC(e, n)) : !1;
13228
- }
13229
- function CC(e, t) {
13230
- let n = e.filter((e) => e != null && e !== !1 && !(typeof e == "string" && e.trim().length === 0));
13231
- return n.filter((e, r) => {
13232
- if (!xC(e, t.separator)) return !0;
13233
- let i = n[r - 1], a = n[r + 1];
13234
- return !(!i || !a || xC(i, t.separator) || xC(a, t.separator));
12808
+ defaultVariants: { disabled: !1 }
12809
+ }), wS = K("zui:mt-0.5 zui:text-xs zui:text-[var(--zui-color-text)]"), TS = e.forwardRef(function({ value: t, defaultValue: n, onValueChange: r, name: i, required: a = !1, id: o, title: s, children: c, "aria-label": l, className: u, orientation: d = "vertical", gap: f = "default", dir: p = "rtl", disabled: m = !1, onInvalid: h }, g) {
12810
+ let [_, v] = e.useState(!1), y = e.useCallback((e) => {
12811
+ _ && v(!1), r?.(e);
12812
+ }, [_, r]), b = e.useCallback((e) => {
12813
+ v(!0), h?.(e);
12814
+ }, [h]);
12815
+ return /* @__PURE__ */ (0, M.jsxs)("div", {
12816
+ "data-slot": "radio-group-field",
12817
+ dir: p,
12818
+ className: "zui:w-full zui:space-y-1.5 zui:text-right",
12819
+ children: [s ? /* @__PURE__ */ (0, M.jsxs)("div", {
12820
+ className: "zui:block zui:text-sm zui:font-medium zui:text-[var(--zui-theme-text-primary)]",
12821
+ children: [s, a ? /* @__PURE__ */ (0, M.jsx)("span", {
12822
+ className: "zui:mr-1 zui:text-base zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
12823
+ children: "*"
12824
+ }) : null]
12825
+ }) : null, /* @__PURE__ */ (0, M.jsxs)("div", {
12826
+ className: "zui:relative",
12827
+ children: [!s && a ? /* @__PURE__ */ (0, M.jsx)("span", {
12828
+ "aria-hidden": "true",
12829
+ className: "zui:pointer-events-none zui:absolute zui:-right-1 zui:-top-1 zui:z-10 zui:text-xs zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
12830
+ children: "*"
12831
+ }) : null, /* @__PURE__ */ (0, M.jsx)(gS, {
12832
+ ref: g,
12833
+ id: o,
12834
+ "data-slot": "radio-group",
12835
+ "aria-label": l,
12836
+ "aria-invalid": _ || void 0,
12837
+ "aria-required": a || void 0,
12838
+ "aria-disabled": m || void 0,
12839
+ dir: p,
12840
+ className: G(_ ? "zui:[&_[data-slot=radio-group-item]]:border-[var(--zui-theme-status-danger)] zui:[&_[data-slot=radio-group-option]]:border-[var(--zui-theme-status-danger)]" : void 0, yS({
12841
+ orientation: d,
12842
+ gap: f,
12843
+ disabled: m,
12844
+ className: u
12845
+ })),
12846
+ value: t,
12847
+ defaultValue: n,
12848
+ onValueChange: y,
12849
+ onInvalid: b,
12850
+ name: i,
12851
+ required: a,
12852
+ disabled: m,
12853
+ children: c
12854
+ })]
12855
+ })]
13235
12856
  });
13236
- }
13237
- function wC(t, n, r) {
13238
- if (!e.isValidElement(t)) return t;
13239
- if (xC(t, r.item)) return bC(t.props.children).toLocaleLowerCase().includes(n) ? t : null;
13240
- if (xC(t, r.separator)) return t;
13241
- let i = e.Children.toArray(t.props.children);
13242
- if (i.length === 0) return t;
13243
- let a = CC(i.map((e) => wC(e, n, r)).filter((e) => e !== null), r);
13244
- return xC(t, r.group) && !a.some((e) => SC(e, r)) ? null : e.cloneElement(t, t.props, a);
13245
- }
13246
- function TC(t, n, r) {
13247
- let i = n.trim().toLocaleLowerCase(), a = e.Children.toArray(t);
13248
- return CC(i ? a.map((e) => wC(e, i, r)).filter((e) => e !== null) : a, r);
13249
- }
13250
- //#endregion
13251
- //#region src/components/Skeleton/Skeleton.variant.ts
13252
- var EC = K("zui:animate-pulse radius-xs zui:bg-[var(--zui-color-tooltip-surface)]");
13253
- //#endregion
13254
- //#region src/components/Skeleton/Skeleton.tsx
13255
- function DC({ className: e, ...t }) {
13256
- return /* @__PURE__ */ (0, M.jsx)("div", {
13257
- "data-slot": "skeleton",
13258
- className: G(EC(), e),
13259
- ...t
12857
+ }), ES = e.forwardRef(function({ className: t, size: n = "default", disabled: r = !1, label: i, description: a, id: o, direction: s = "rtl", optionClassName: c, labelClassName: l, descriptionClassName: u, indicatorClassName: d, value: f, onFocus: p, onBlur: m }, h) {
12858
+ let g = e.useId(), _ = o ?? g, v = n === "sm" ? "zui:size-[0.46rem]" : n === "lg" ? "zui:size-[0.7rem]" : "zui:size-[0.58rem]", y = /* @__PURE__ */ (0, M.jsx)(_S, {
12859
+ ref: h,
12860
+ id: _,
12861
+ "data-slot": "radio-group-item",
12862
+ "aria-disabled": r || void 0,
12863
+ className: G(bS({
12864
+ size: n,
12865
+ disabled: r,
12866
+ className: t
12867
+ })),
12868
+ disabled: r,
12869
+ value: f,
12870
+ onFocus: p,
12871
+ onBlur: m,
12872
+ children: /* @__PURE__ */ (0, M.jsx)(vS, {
12873
+ "data-slot": "radio-group-indicator",
12874
+ className: G(xS({ size: n }), d),
12875
+ children: /* @__PURE__ */ (0, M.jsx)("span", { className: G("zui:block radius-full zui:bg-[var(--zui-theme-action-primary)]", v) })
12876
+ })
12877
+ });
12878
+ return !i && !a ? y : /* @__PURE__ */ (0, M.jsxs)("label", {
12879
+ htmlFor: _,
12880
+ "data-slot": "radio-group-option",
12881
+ dir: s ?? void 0,
12882
+ className: G(SS({
12883
+ direction: s,
12884
+ disabled: r,
12885
+ className: c
12886
+ })),
12887
+ children: [y, /* @__PURE__ */ (0, M.jsxs)("span", {
12888
+ className: "zui:min-w-0 zui:flex-1",
12889
+ children: [i ? /* @__PURE__ */ (0, M.jsx)("span", {
12890
+ className: G(CS({ disabled: r }), l),
12891
+ children: i
12892
+ }) : null, a ? /* @__PURE__ */ (0, M.jsx)("span", {
12893
+ className: G(wS(), u),
12894
+ children: a
12895
+ }) : null]
12896
+ })]
13260
12897
  });
12898
+ });
12899
+ //#endregion
12900
+ //#region node_modules/@radix-ui/number/dist/index.mjs
12901
+ function DS(e, [t, n]) {
12902
+ return Math.min(n, Math.max(t, e));
13261
12903
  }
13262
12904
  //#endregion
13263
- //#region node_modules/@radix-ui/react-tooltip/dist/index.mjs
13264
- var [OC, kC] = z("Tooltip", [Di]), AC = Di(), jC = "TooltipProvider", MC = 700, NC = "tooltip.open", [PC, FC] = OC(jC), IC = (t) => {
13265
- let { __scopeTooltip: n, delayDuration: r = MC, skipDelayDuration: i = 300, disableHoverableContent: a = !1, children: o } = t, s = e.useRef(!0), c = e.useRef(!1), l = e.useRef(0);
13266
- return e.useEffect(() => {
13267
- let e = l.current;
13268
- return () => window.clearTimeout(e);
13269
- }, []), /* @__PURE__ */ (0, M.jsx)(PC, {
13270
- scope: n,
13271
- isOpenDelayedRef: s,
13272
- delayDuration: r,
13273
- onOpen: e.useCallback(() => {
13274
- window.clearTimeout(l.current), s.current = !1;
13275
- }, []),
13276
- onClose: e.useCallback(() => {
13277
- window.clearTimeout(l.current), l.current = window.setTimeout(() => s.current = !0, i);
13278
- }, [i]),
13279
- isPointerInTransitRef: c,
13280
- onPointerInTransitChange: e.useCallback((e) => {
13281
- c.current = e;
13282
- }, []),
13283
- disableHoverableContent: a,
13284
- children: o
13285
- });
13286
- };
13287
- IC.displayName = jC;
13288
- var LC = "Tooltip", [RC, zC] = OC(LC), BC = (t) => {
13289
- let { __scopeTooltip: n, children: r, open: i, defaultOpen: a, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = t, l = FC(LC, t.__scopeTooltip), u = AC(n), [d, f] = e.useState(null), p = ln(), m = e.useRef(0), h = s ?? l.disableHoverableContent, g = c ?? l.delayDuration, _ = e.useRef(!1), [v, y] = H({
12905
+ //#region node_modules/@radix-ui/react-select/dist/index.mjs
12906
+ var OS = [
12907
+ " ",
12908
+ "Enter",
12909
+ "ArrowUp",
12910
+ "ArrowDown"
12911
+ ], kS = [" ", "Enter"], AS = "Select", [jS, MS, NS] = Sx(AS), [PS, FS] = z(AS, [NS, Di]), IS = Di(), [LS, RS] = PS(AS), [zS, BS] = PS(AS), VS = (t) => {
12912
+ let { __scopeSelect: n, children: r, open: i, defaultOpen: a, onOpenChange: o, value: s, defaultValue: c, onValueChange: l, dir: u, name: d, autoComplete: f, disabled: p, required: m, form: h } = t, g = IS(n), [_, v] = e.useState(null), [y, b] = e.useState(null), [x, S] = e.useState(!1), C = wx(u), [w, T] = H({
13290
12913
  prop: i,
13291
12914
  defaultProp: a ?? !1,
13292
- onChange: (e) => {
13293
- e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(NC))) : l.onClose(), o?.(e);
13294
- },
13295
- caller: LC
13296
- }), b = e.useMemo(() => v ? _.current ? "delayed-open" : "instant-open" : "closed", [v]), x = e.useCallback(() => {
13297
- window.clearTimeout(m.current), m.current = 0, _.current = !1, y(!0);
13298
- }, [y]), S = e.useCallback(() => {
13299
- window.clearTimeout(m.current), m.current = 0, y(!1);
13300
- }, [y]), C = e.useCallback(() => {
13301
- window.clearTimeout(m.current), m.current = window.setTimeout(() => {
13302
- _.current = !0, y(!0), m.current = 0;
13303
- }, g);
13304
- }, [g, y]);
13305
- return e.useEffect(() => () => {
13306
- m.current &&= (window.clearTimeout(m.current), 0);
13307
- }, []), /* @__PURE__ */ (0, M.jsx)(Ui, {
13308
- ...u,
13309
- children: /* @__PURE__ */ (0, M.jsx)(RC, {
13310
- scope: n,
13311
- contentId: p,
13312
- open: v,
13313
- stateAttribute: b,
13314
- trigger: d,
13315
- onTriggerChange: f,
13316
- onTriggerEnter: e.useCallback(() => {
13317
- l.isOpenDelayedRef.current ? C() : x();
13318
- }, [
13319
- l.isOpenDelayedRef,
13320
- C,
13321
- x
13322
- ]),
13323
- onTriggerLeave: e.useCallback(() => {
13324
- h ? S() : (window.clearTimeout(m.current), m.current = 0);
13325
- }, [S, h]),
13326
- onOpen: x,
13327
- onClose: S,
13328
- disableHoverableContent: h,
13329
- children: r
12915
+ onChange: o,
12916
+ caller: AS
12917
+ }), [E, D] = H({
12918
+ prop: s,
12919
+ defaultProp: c,
12920
+ onChange: l,
12921
+ caller: AS
12922
+ }), O = e.useRef(null), k = _ ? h || !!_.closest("form") : !0, [A, j] = e.useState(/* @__PURE__ */ new Set()), N = Array.from(A).map((e) => e.props.value).join(";");
12923
+ return /* @__PURE__ */ (0, M.jsx)(Ui, {
12924
+ ...g,
12925
+ children: /* @__PURE__ */ (0, M.jsxs)(LS, {
12926
+ required: m,
12927
+ scope: n,
12928
+ trigger: _,
12929
+ onTriggerChange: v,
12930
+ valueNode: y,
12931
+ onValueNodeChange: b,
12932
+ valueNodeHasChildren: x,
12933
+ onValueNodeHasChildrenChange: S,
12934
+ contentId: ln(),
12935
+ value: E,
12936
+ onValueChange: D,
12937
+ open: w,
12938
+ onOpenChange: T,
12939
+ dir: C,
12940
+ triggerPointerDownPosRef: O,
12941
+ disabled: p,
12942
+ children: [/* @__PURE__ */ (0, M.jsx)(jS.Provider, {
12943
+ scope: n,
12944
+ children: /* @__PURE__ */ (0, M.jsx)(zS, {
12945
+ scope: t.__scopeSelect,
12946
+ onNativeOptionAdd: e.useCallback((e) => {
12947
+ j((t) => new Set(t).add(e));
12948
+ }, []),
12949
+ onNativeOptionRemove: e.useCallback((e) => {
12950
+ j((t) => {
12951
+ let n = new Set(t);
12952
+ return n.delete(e), n;
12953
+ });
12954
+ }, []),
12955
+ children: r
12956
+ })
12957
+ }), k ? /* @__PURE__ */ (0, M.jsxs)(IC, {
12958
+ "aria-hidden": !0,
12959
+ required: m,
12960
+ tabIndex: -1,
12961
+ name: d,
12962
+ autoComplete: f,
12963
+ value: E,
12964
+ onChange: (e) => D(e.target.value),
12965
+ disabled: p,
12966
+ form: h,
12967
+ children: [E === void 0 ? /* @__PURE__ */ (0, M.jsx)("option", { value: "" }) : null, Array.from(A)]
12968
+ }, N) : null]
13330
12969
  })
13331
12970
  });
13332
12971
  };
13333
- BC.displayName = LC;
13334
- var VC = "TooltipTrigger", HC = e.forwardRef((t, n) => {
13335
- let { __scopeTooltip: r, ...i } = t, a = zC(VC, r), o = FC(VC, r), s = AC(r), c = R(n, e.useRef(null), a.onTriggerChange), l = e.useRef(!1), u = e.useRef(!1), d = e.useCallback(() => l.current = !1, []);
13336
- return e.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ (0, M.jsx)(Wi, {
12972
+ VS.displayName = AS;
12973
+ var HS = "SelectTrigger", US = e.forwardRef((t, n) => {
12974
+ let { __scopeSelect: r, disabled: i = !1, ...a } = t, o = IS(r), s = RS(HS, r), c = s.disabled || i, l = R(n, s.onTriggerChange), u = MS(r), d = e.useRef("touch"), [f, p, m] = RC((e) => {
12975
+ let t = u().filter((e) => !e.disabled), n = zC(t, e, t.find((e) => e.value === s.value));
12976
+ n !== void 0 && s.onValueChange(n.value);
12977
+ }), h = (e) => {
12978
+ c || (s.onOpenChange(!0), m()), e && (s.triggerPointerDownPosRef.current = {
12979
+ x: Math.round(e.pageX),
12980
+ y: Math.round(e.pageY)
12981
+ });
12982
+ };
12983
+ return /* @__PURE__ */ (0, M.jsx)(Wi, {
13337
12984
  asChild: !0,
13338
- ...s,
12985
+ ...o,
13339
12986
  children: /* @__PURE__ */ (0, M.jsx)(W.button, {
13340
- "aria-describedby": a.open ? a.contentId : void 0,
13341
- "data-state": a.stateAttribute,
13342
- ...i,
13343
- ref: c,
13344
- onPointerMove: B(t.onPointerMove, (e) => {
13345
- e.pointerType !== "touch" && !u.current && !o.isPointerInTransitRef.current && (a.onTriggerEnter(), u.current = !0);
13346
- }),
13347
- onPointerLeave: B(t.onPointerLeave, () => {
13348
- a.onTriggerLeave(), u.current = !1;
13349
- }),
13350
- onPointerDown: B(t.onPointerDown, () => {
13351
- a.open && a.onClose(), l.current = !0, document.addEventListener("pointerup", d, { once: !0 });
12987
+ type: "button",
12988
+ role: "combobox",
12989
+ "aria-controls": s.contentId,
12990
+ "aria-expanded": s.open,
12991
+ "aria-required": s.required,
12992
+ "aria-autocomplete": "none",
12993
+ dir: s.dir,
12994
+ "data-state": s.open ? "open" : "closed",
12995
+ disabled: c,
12996
+ "data-disabled": c ? "" : void 0,
12997
+ "data-placeholder": LC(s.value) ? "" : void 0,
12998
+ ...a,
12999
+ ref: l,
13000
+ onClick: B(a.onClick, (e) => {
13001
+ e.currentTarget.focus(), d.current !== "mouse" && h(e);
13352
13002
  }),
13353
- onFocus: B(t.onFocus, () => {
13354
- l.current || a.onOpen();
13003
+ onPointerDown: B(a.onPointerDown, (e) => {
13004
+ d.current = e.pointerType;
13005
+ let t = e.target;
13006
+ t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), e.button === 0 && e.ctrlKey === !1 && e.pointerType === "mouse" && (h(e), e.preventDefault());
13355
13007
  }),
13356
- onBlur: B(t.onBlur, a.onClose),
13357
- onClick: B(t.onClick, a.onClose)
13008
+ onKeyDown: B(a.onKeyDown, (e) => {
13009
+ let t = f.current !== "";
13010
+ !(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && p(e.key), !(t && e.key === " ") && OS.includes(e.key) && (h(), e.preventDefault());
13011
+ })
13012
+ })
13013
+ });
13014
+ });
13015
+ US.displayName = HS;
13016
+ var WS = "SelectValue", GS = e.forwardRef((e, t) => {
13017
+ let { __scopeSelect: n, className: r, style: i, children: a, placeholder: o = "", ...s } = e, c = RS(WS, n), { onValueNodeHasChildrenChange: l } = c, u = a !== void 0, d = R(t, c.onValueNodeChange);
13018
+ return V(() => {
13019
+ l(u);
13020
+ }, [l, u]), /* @__PURE__ */ (0, M.jsx)(W.span, {
13021
+ ...s,
13022
+ ref: d,
13023
+ style: { pointerEvents: "none" },
13024
+ children: LC(c.value) ? /* @__PURE__ */ (0, M.jsx)(M.Fragment, { children: o }) : a
13025
+ });
13026
+ });
13027
+ GS.displayName = WS;
13028
+ var KS = "SelectIcon", qS = e.forwardRef((e, t) => {
13029
+ let { __scopeSelect: n, children: r, ...i } = e;
13030
+ return /* @__PURE__ */ (0, M.jsx)(W.span, {
13031
+ "aria-hidden": !0,
13032
+ ...i,
13033
+ ref: t,
13034
+ children: r || "▼"
13035
+ });
13036
+ });
13037
+ qS.displayName = KS;
13038
+ var JS = "SelectPortal", YS = (e) => /* @__PURE__ */ (0, M.jsx)(Ji, {
13039
+ asChild: !0,
13040
+ ...e
13041
+ });
13042
+ YS.displayName = JS;
13043
+ var XS = "SelectContent", ZS = e.forwardRef((t, n) => {
13044
+ let r = RS(XS, t.__scopeSelect), [i, a] = e.useState();
13045
+ if (V(() => {
13046
+ a(new DocumentFragment());
13047
+ }, []), !r.open) {
13048
+ let e = i;
13049
+ return e ? f.createPortal(/* @__PURE__ */ (0, M.jsx)($S, {
13050
+ scope: t.__scopeSelect,
13051
+ children: /* @__PURE__ */ (0, M.jsx)(jS.Slot, {
13052
+ scope: t.__scopeSelect,
13053
+ children: /* @__PURE__ */ (0, M.jsx)("div", { children: t.children })
13054
+ })
13055
+ }), e) : null;
13056
+ }
13057
+ return /* @__PURE__ */ (0, M.jsx)(rC, {
13058
+ ...t,
13059
+ ref: n
13060
+ });
13061
+ });
13062
+ ZS.displayName = XS;
13063
+ var QS = 10, [$S, eC] = PS(XS), tC = "SelectContentImpl", nC = /* @__PURE__ */ he("SelectContent.RemoveScroll"), rC = e.forwardRef((t, n) => {
13064
+ let { __scopeSelect: r, position: i = "item-aligned", onCloseAutoFocus: a, onEscapeKeyDown: o, onPointerDownOutside: s, side: c, sideOffset: l, align: u, alignOffset: d, arrowPadding: f, collisionBoundary: p, collisionPadding: m, sticky: h, hideWhenDetached: g, avoidCollisions: _, ...v } = t, y = RS(XS, r), [b, x] = e.useState(null), [S, C] = e.useState(null), w = R(n, (e) => x(e)), [T, E] = e.useState(null), [D, O] = e.useState(null), k = MS(r), [A, j] = e.useState(!1), N = e.useRef(!1);
13065
+ e.useEffect(() => {
13066
+ if (b) return ra(b);
13067
+ }, [b]), Ht();
13068
+ let ee = e.useCallback((e) => {
13069
+ let [t, ...n] = k().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
13070
+ for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && S && (S.scrollTop = 0), n === r && S && (S.scrollTop = S.scrollHeight), n?.focus(), document.activeElement !== i)) return;
13071
+ }, [k, S]), P = e.useCallback(() => ee([T, b]), [
13072
+ ee,
13073
+ T,
13074
+ b
13075
+ ]);
13076
+ e.useEffect(() => {
13077
+ A && P();
13078
+ }, [A, P]);
13079
+ let { onOpenChange: te, triggerPointerDownPosRef: F } = y;
13080
+ e.useEffect(() => {
13081
+ if (b) {
13082
+ let e = {
13083
+ x: 0,
13084
+ y: 0
13085
+ }, t = (t) => {
13086
+ e = {
13087
+ x: Math.abs(Math.round(t.pageX) - (F.current?.x ?? 0)),
13088
+ y: Math.abs(Math.round(t.pageY) - (F.current?.y ?? 0))
13089
+ };
13090
+ }, n = (n) => {
13091
+ e.x <= 10 && e.y <= 10 ? n.preventDefault() : b.contains(n.target) || te(!1), document.removeEventListener("pointermove", t), F.current = null;
13092
+ };
13093
+ return F.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
13094
+ capture: !0,
13095
+ once: !0
13096
+ })), () => {
13097
+ document.removeEventListener("pointermove", t), document.removeEventListener("pointerup", n, { capture: !0 });
13098
+ };
13099
+ }
13100
+ }, [
13101
+ b,
13102
+ te,
13103
+ F
13104
+ ]), e.useEffect(() => {
13105
+ let e = () => te(!1);
13106
+ return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
13107
+ window.removeEventListener("blur", e), window.removeEventListener("resize", e);
13108
+ };
13109
+ }, [te]);
13110
+ let [I, L] = RC((e) => {
13111
+ let t = k().filter((e) => !e.disabled), n = zC(t, e, t.find((e) => e.ref.current === document.activeElement));
13112
+ n && setTimeout(() => n.ref.current.focus());
13113
+ }), ne = e.useCallback((e, t, n) => {
13114
+ let r = !N.current && !n;
13115
+ (y.value !== void 0 && y.value === t || r) && (E(e), r && (N.current = !0));
13116
+ }, [y.value]), re = e.useCallback(() => b?.focus(), [b]), ie = e.useCallback((e, t, n) => {
13117
+ let r = !N.current && !n;
13118
+ (y.value !== void 0 && y.value === t || r) && O(e);
13119
+ }, [y.value]), z = i === "popper" ? sC : aC, ae = z === sC ? {
13120
+ side: c,
13121
+ sideOffset: l,
13122
+ align: u,
13123
+ alignOffset: d,
13124
+ arrowPadding: f,
13125
+ collisionBoundary: p,
13126
+ collisionPadding: m,
13127
+ sticky: h,
13128
+ hideWhenDetached: g,
13129
+ avoidCollisions: _
13130
+ } : {};
13131
+ return /* @__PURE__ */ (0, M.jsx)($S, {
13132
+ scope: r,
13133
+ content: b,
13134
+ viewport: S,
13135
+ onViewportChange: C,
13136
+ itemRefCallback: ne,
13137
+ selectedItem: T,
13138
+ onItemLeave: re,
13139
+ itemTextRefCallback: ie,
13140
+ focusSelectedItem: P,
13141
+ selectedItemText: D,
13142
+ position: i,
13143
+ isPositioned: A,
13144
+ searchRef: I,
13145
+ children: /* @__PURE__ */ (0, M.jsx)(po, {
13146
+ as: nC,
13147
+ allowPinchZoom: !0,
13148
+ children: /* @__PURE__ */ (0, M.jsx)(Jt, {
13149
+ asChild: !0,
13150
+ trapped: y.open,
13151
+ onMountAutoFocus: (e) => {
13152
+ e.preventDefault();
13153
+ },
13154
+ onUnmountAutoFocus: B(a, (e) => {
13155
+ y.trigger?.focus({ preventScroll: !0 }), e.preventDefault();
13156
+ }),
13157
+ children: /* @__PURE__ */ (0, M.jsx)(Mt, {
13158
+ asChild: !0,
13159
+ disableOutsidePointerEvents: !0,
13160
+ onEscapeKeyDown: o,
13161
+ onPointerDownOutside: s,
13162
+ onFocusOutside: (e) => e.preventDefault(),
13163
+ onDismiss: () => y.onOpenChange(!1),
13164
+ children: /* @__PURE__ */ (0, M.jsx)(z, {
13165
+ role: "listbox",
13166
+ id: y.contentId,
13167
+ "data-state": y.open ? "open" : "closed",
13168
+ dir: y.dir,
13169
+ onContextMenu: (e) => e.preventDefault(),
13170
+ ...v,
13171
+ ...ae,
13172
+ onPlaced: () => j(!0),
13173
+ ref: w,
13174
+ style: {
13175
+ display: "flex",
13176
+ flexDirection: "column",
13177
+ outline: "none",
13178
+ ...v.style
13179
+ },
13180
+ onKeyDown: B(v.onKeyDown, (e) => {
13181
+ let t = e.ctrlKey || e.altKey || e.metaKey;
13182
+ if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && L(e.key), [
13183
+ "ArrowUp",
13184
+ "ArrowDown",
13185
+ "Home",
13186
+ "End"
13187
+ ].includes(e.key)) {
13188
+ let t = k().filter((e) => !e.disabled).map((e) => e.ref.current);
13189
+ if (["ArrowUp", "End"].includes(e.key) && (t = t.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(e.key)) {
13190
+ let n = e.target, r = t.indexOf(n);
13191
+ t = t.slice(r + 1);
13192
+ }
13193
+ setTimeout(() => ee(t)), e.preventDefault();
13194
+ }
13195
+ })
13196
+ })
13197
+ })
13198
+ })
13358
13199
  })
13359
13200
  });
13360
13201
  });
13361
- HC.displayName = VC;
13362
- var UC = "TooltipPortal", [WC, GC] = OC(UC, { forceMount: void 0 }), KC = (e) => {
13363
- let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = zC(UC, t);
13364
- return /* @__PURE__ */ (0, M.jsx)(WC, {
13365
- scope: t,
13366
- forceMount: n,
13367
- children: /* @__PURE__ */ (0, M.jsx)(de, {
13368
- present: n || a.open,
13369
- children: /* @__PURE__ */ (0, M.jsx)(Ji, {
13370
- asChild: !0,
13371
- container: i,
13372
- children: r
13202
+ rC.displayName = tC;
13203
+ var iC = "SelectItemAlignedPosition", aC = e.forwardRef((t, n) => {
13204
+ let { __scopeSelect: r, onPlaced: i, ...a } = t, o = RS(XS, r), s = eC(XS, r), [c, l] = e.useState(null), [u, d] = e.useState(null), f = R(n, (e) => d(e)), p = MS(r), m = e.useRef(!1), h = e.useRef(!0), { viewport: g, selectedItem: _, selectedItemText: v, focusSelectedItem: y } = s, b = e.useCallback(() => {
13205
+ if (o.trigger && o.valueNode && c && u && g && _ && v) {
13206
+ let e = o.trigger.getBoundingClientRect(), t = u.getBoundingClientRect(), n = o.valueNode.getBoundingClientRect(), r = v.getBoundingClientRect();
13207
+ if (o.dir !== "rtl") {
13208
+ let i = r.left - t.left, a = n.left - i, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - QS, d = DS(a, [QS, Math.max(QS, u - l)]);
13209
+ c.style.minWidth = s + "px", c.style.left = d + "px";
13210
+ } else {
13211
+ let i = t.right - r.right, a = window.innerWidth - n.right - i, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - QS, d = DS(a, [QS, Math.max(QS, u - l)]);
13212
+ c.style.minWidth = s + "px", c.style.right = d + "px";
13213
+ }
13214
+ let a = p(), s = window.innerHeight - QS * 2, l = g.scrollHeight, d = window.getComputedStyle(u), f = parseInt(d.borderTopWidth, 10), h = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = f + h + l + b + y, S = Math.min(_.offsetHeight * 5, x), C = window.getComputedStyle(g), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), E = e.top + e.height / 2 - QS, D = s - E, O = _.offsetHeight / 2, k = _.offsetTop + O, A = f + h + k, j = x - A;
13215
+ if (A <= E) {
13216
+ let e = a.length > 0 && _ === a[a.length - 1].ref.current;
13217
+ c.style.bottom = "0px";
13218
+ let t = u.clientHeight - g.offsetTop - g.offsetHeight, n = A + Math.max(D, O + (e ? T : 0) + t + y);
13219
+ c.style.height = n + "px";
13220
+ } else {
13221
+ let e = a.length > 0 && _ === a[0].ref.current;
13222
+ c.style.top = "0px";
13223
+ let t = Math.max(E, f + g.offsetTop + (e ? w : 0) + O) + j;
13224
+ c.style.height = t + "px", g.scrollTop = A - E + g.offsetTop;
13225
+ }
13226
+ c.style.margin = `${QS}px 0`, c.style.minHeight = S + "px", c.style.maxHeight = s + "px", i?.(), requestAnimationFrame(() => m.current = !0);
13227
+ }
13228
+ }, [
13229
+ p,
13230
+ o.trigger,
13231
+ o.valueNode,
13232
+ c,
13233
+ u,
13234
+ g,
13235
+ _,
13236
+ v,
13237
+ o.dir,
13238
+ i
13239
+ ]);
13240
+ V(() => b(), [b]);
13241
+ let [x, S] = e.useState();
13242
+ return V(() => {
13243
+ u && S(window.getComputedStyle(u).zIndex);
13244
+ }, [u]), /* @__PURE__ */ (0, M.jsx)(cC, {
13245
+ scope: r,
13246
+ contentWrapper: c,
13247
+ shouldExpandOnScrollRef: m,
13248
+ onScrollButtonChange: e.useCallback((e) => {
13249
+ e && h.current === !0 && (b(), y?.(), h.current = !1);
13250
+ }, [b, y]),
13251
+ children: /* @__PURE__ */ (0, M.jsx)("div", {
13252
+ ref: l,
13253
+ style: {
13254
+ display: "flex",
13255
+ flexDirection: "column",
13256
+ position: "fixed",
13257
+ zIndex: x
13258
+ },
13259
+ children: /* @__PURE__ */ (0, M.jsx)(W.div, {
13260
+ ...a,
13261
+ ref: f,
13262
+ style: {
13263
+ boxSizing: "border-box",
13264
+ maxHeight: "100%",
13265
+ ...a.style
13266
+ }
13373
13267
  })
13374
13268
  })
13375
13269
  });
13376
- };
13377
- KC.displayName = UC;
13378
- var qC = "TooltipContent", JC = e.forwardRef((e, t) => {
13379
- let n = GC(qC, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, o = zC(qC, e.__scopeTooltip);
13380
- return /* @__PURE__ */ (0, M.jsx)(de, {
13381
- present: r || o.open,
13382
- children: o.disableHoverableContent ? /* @__PURE__ */ (0, M.jsx)($C, {
13383
- side: i,
13384
- ...a,
13385
- ref: t
13386
- }) : /* @__PURE__ */ (0, M.jsx)(YC, {
13387
- side: i,
13270
+ });
13271
+ aC.displayName = iC;
13272
+ var oC = "SelectPopperPosition", sC = e.forwardRef((e, t) => {
13273
+ let { __scopeSelect: n, align: r = "start", collisionPadding: i = QS, ...a } = e, o = IS(n);
13274
+ return /* @__PURE__ */ (0, M.jsx)(Gi, {
13275
+ ...o,
13276
+ ...a,
13277
+ ref: t,
13278
+ align: r,
13279
+ collisionPadding: i,
13280
+ style: {
13281
+ boxSizing: "border-box",
13282
+ ...a.style,
13283
+ "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
13284
+ "--radix-select-content-available-width": "var(--radix-popper-available-width)",
13285
+ "--radix-select-content-available-height": "var(--radix-popper-available-height)",
13286
+ "--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
13287
+ "--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
13288
+ }
13289
+ });
13290
+ });
13291
+ sC.displayName = oC;
13292
+ var [cC, lC] = PS(XS, {}), uC = "SelectViewport", dC = e.forwardRef((t, n) => {
13293
+ let { __scopeSelect: r, nonce: i, ...a } = t, o = eC(uC, r), s = lC(uC, r), c = R(n, o.onViewportChange), l = e.useRef(0);
13294
+ return /* @__PURE__ */ (0, M.jsxs)(M.Fragment, { children: [/* @__PURE__ */ (0, M.jsx)("style", {
13295
+ dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" },
13296
+ nonce: i
13297
+ }), /* @__PURE__ */ (0, M.jsx)(jS.Slot, {
13298
+ scope: r,
13299
+ children: /* @__PURE__ */ (0, M.jsx)(W.div, {
13300
+ "data-radix-select-viewport": "",
13301
+ role: "presentation",
13388
13302
  ...a,
13303
+ ref: c,
13304
+ style: {
13305
+ position: "relative",
13306
+ flex: 1,
13307
+ overflow: "hidden auto",
13308
+ ...a.style
13309
+ },
13310
+ onScroll: B(a.onScroll, (e) => {
13311
+ let t = e.currentTarget, { contentWrapper: n, shouldExpandOnScrollRef: r } = s;
13312
+ if (r?.current && n) {
13313
+ let e = Math.abs(l.current - t.scrollTop);
13314
+ if (e > 0) {
13315
+ let r = window.innerHeight - QS * 2, i = parseFloat(n.style.minHeight), a = parseFloat(n.style.height), o = Math.max(i, a);
13316
+ if (o < r) {
13317
+ let i = o + e, a = Math.min(r, i), s = i - a;
13318
+ n.style.height = a + "px", n.style.bottom === "0px" && (t.scrollTop = s > 0 ? s : 0, n.style.justifyContent = "flex-end");
13319
+ }
13320
+ }
13321
+ }
13322
+ l.current = t.scrollTop;
13323
+ })
13324
+ })
13325
+ })] });
13326
+ });
13327
+ dC.displayName = uC;
13328
+ var fC = "SelectGroup", [pC, mC] = PS(fC), hC = e.forwardRef((e, t) => {
13329
+ let { __scopeSelect: n, ...r } = e, i = ln();
13330
+ return /* @__PURE__ */ (0, M.jsx)(pC, {
13331
+ scope: n,
13332
+ id: i,
13333
+ children: /* @__PURE__ */ (0, M.jsx)(W.div, {
13334
+ role: "group",
13335
+ "aria-labelledby": i,
13336
+ ...r,
13389
13337
  ref: t
13390
13338
  })
13391
13339
  });
13392
- }), YC = e.forwardRef((t, n) => {
13393
- let r = zC(qC, t.__scopeTooltip), i = FC(qC, t.__scopeTooltip), a = e.useRef(null), o = R(n, a), [s, c] = e.useState(null), { trigger: l, onClose: u } = r, d = a.current, { onPointerInTransitChange: f } = i, p = e.useCallback(() => {
13394
- c(null), f(!1);
13395
- }, [f]), m = e.useCallback((e, t) => {
13396
- let n = e.currentTarget, r = {
13397
- x: e.clientX,
13398
- y: e.clientY
13399
- }, i = rw(r, nw(r, n.getBoundingClientRect())), a = iw(t.getBoundingClientRect());
13400
- c(ow([...i, ...a])), f(!0);
13401
- }, [f]);
13402
- return e.useEffect(() => () => p(), [p]), e.useEffect(() => {
13403
- if (l && d) {
13404
- let e = (e) => m(e, d), t = (e) => m(e, l);
13405
- return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
13406
- l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
13407
- };
13340
+ });
13341
+ hC.displayName = fC;
13342
+ var gC = "SelectLabel", _C = e.forwardRef((e, t) => {
13343
+ let { __scopeSelect: n, ...r } = e, i = mC(gC, n);
13344
+ return /* @__PURE__ */ (0, M.jsx)(W.div, {
13345
+ id: i.id,
13346
+ ...r,
13347
+ ref: t
13348
+ });
13349
+ });
13350
+ _C.displayName = gC;
13351
+ var vC = "SelectItem", [yC, bC] = PS(vC), xC = e.forwardRef((t, n) => {
13352
+ let { __scopeSelect: r, value: i, disabled: a = !1, textValue: o, ...s } = t, c = RS(vC, r), l = eC(vC, r), u = c.value === i, [d, f] = e.useState(o ?? ""), [p, m] = e.useState(!1), h = R(n, (e) => l.itemRefCallback?.(e, i, a)), g = ln(), _ = e.useRef("touch"), v = () => {
13353
+ a || (c.onValueChange(i), c.onOpenChange(!1));
13354
+ };
13355
+ if (i === "") throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
13356
+ return /* @__PURE__ */ (0, M.jsx)(yC, {
13357
+ scope: r,
13358
+ value: i,
13359
+ disabled: a,
13360
+ textId: g,
13361
+ isSelected: u,
13362
+ onItemTextChange: e.useCallback((e) => {
13363
+ f((t) => t || (e?.textContent ?? "").trim());
13364
+ }, []),
13365
+ children: /* @__PURE__ */ (0, M.jsx)(jS.ItemSlot, {
13366
+ scope: r,
13367
+ value: i,
13368
+ disabled: a,
13369
+ textValue: d,
13370
+ children: /* @__PURE__ */ (0, M.jsx)(W.div, {
13371
+ role: "option",
13372
+ "aria-labelledby": g,
13373
+ "data-highlighted": p ? "" : void 0,
13374
+ "aria-selected": u && p,
13375
+ "data-state": u ? "checked" : "unchecked",
13376
+ "aria-disabled": a || void 0,
13377
+ "data-disabled": a ? "" : void 0,
13378
+ tabIndex: a ? void 0 : -1,
13379
+ ...s,
13380
+ ref: h,
13381
+ onFocus: B(s.onFocus, () => m(!0)),
13382
+ onBlur: B(s.onBlur, () => m(!1)),
13383
+ onClick: B(s.onClick, () => {
13384
+ _.current !== "mouse" && v();
13385
+ }),
13386
+ onPointerUp: B(s.onPointerUp, () => {
13387
+ _.current === "mouse" && v();
13388
+ }),
13389
+ onPointerDown: B(s.onPointerDown, (e) => {
13390
+ _.current = e.pointerType;
13391
+ }),
13392
+ onPointerMove: B(s.onPointerMove, (e) => {
13393
+ _.current = e.pointerType, a ? l.onItemLeave?.() : _.current === "mouse" && e.currentTarget.focus({ preventScroll: !0 });
13394
+ }),
13395
+ onPointerLeave: B(s.onPointerLeave, (e) => {
13396
+ e.currentTarget === document.activeElement && l.onItemLeave?.();
13397
+ }),
13398
+ onKeyDown: B(s.onKeyDown, (e) => {
13399
+ l.searchRef?.current !== "" && e.key === " " || (kS.includes(e.key) && v(), e.key === " " && e.preventDefault());
13400
+ })
13401
+ })
13402
+ })
13403
+ });
13404
+ });
13405
+ xC.displayName = vC;
13406
+ var SC = "SelectItemText", CC = e.forwardRef((t, n) => {
13407
+ let { __scopeSelect: r, className: i, style: a, ...o } = t, s = RS(SC, r), c = eC(SC, r), l = bC(SC, r), u = BS(SC, r), [d, p] = e.useState(null), m = R(n, (e) => p(e), l.onItemTextChange, (e) => c.itemTextRefCallback?.(e, l.value, l.disabled)), h = d?.textContent, g = e.useMemo(() => /* @__PURE__ */ (0, M.jsx)("option", {
13408
+ value: l.value,
13409
+ disabled: l.disabled,
13410
+ children: h
13411
+ }, l.value), [
13412
+ l.disabled,
13413
+ l.value,
13414
+ h
13415
+ ]), { onNativeOptionAdd: _, onNativeOptionRemove: v } = u;
13416
+ return V(() => (_(g), () => v(g)), [
13417
+ _,
13418
+ v,
13419
+ g
13420
+ ]), /* @__PURE__ */ (0, M.jsxs)(M.Fragment, { children: [/* @__PURE__ */ (0, M.jsx)(W.span, {
13421
+ id: l.textId,
13422
+ ...o,
13423
+ ref: m
13424
+ }), l.isSelected && s.valueNode && !s.valueNodeHasChildren ? f.createPortal(o.children, s.valueNode) : null] });
13425
+ });
13426
+ CC.displayName = SC;
13427
+ var wC = "SelectItemIndicator", TC = e.forwardRef((e, t) => {
13428
+ let { __scopeSelect: n, ...r } = e;
13429
+ return bC(wC, n).isSelected ? /* @__PURE__ */ (0, M.jsx)(W.span, {
13430
+ "aria-hidden": !0,
13431
+ ...r,
13432
+ ref: t
13433
+ }) : null;
13434
+ });
13435
+ TC.displayName = wC;
13436
+ var EC = "SelectScrollUpButton", DC = e.forwardRef((t, n) => {
13437
+ let r = eC(EC, t.__scopeSelect), i = lC(EC, t.__scopeSelect), [a, o] = e.useState(!1), s = R(n, i.onScrollButtonChange);
13438
+ return V(() => {
13439
+ if (r.viewport && r.isPositioned) {
13440
+ let e = function() {
13441
+ o(t.scrollTop > 0);
13442
+ }, t = r.viewport;
13443
+ return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
13408
13444
  }
13409
- }, [
13410
- l,
13411
- d,
13412
- m,
13413
- p
13414
- ]), e.useEffect(() => {
13415
- if (s) {
13416
- let e = (e) => {
13417
- let t = e.target, n = {
13418
- x: e.clientX,
13419
- y: e.clientY
13420
- }, r = l?.contains(t) || d?.contains(t), i = !aw(n, s);
13421
- r ? p() : i && (p(), u());
13422
- };
13423
- return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
13445
+ }, [r.viewport, r.isPositioned]), a ? /* @__PURE__ */ (0, M.jsx)(AC, {
13446
+ ...t,
13447
+ ref: s,
13448
+ onAutoScroll: () => {
13449
+ let { viewport: e, selectedItem: t } = r;
13450
+ e && t && (e.scrollTop -= t.offsetHeight);
13424
13451
  }
13425
- }, [
13426
- l,
13427
- d,
13428
- s,
13429
- u,
13430
- p
13431
- ]), /* @__PURE__ */ (0, M.jsx)($C, {
13452
+ }) : null;
13453
+ });
13454
+ DC.displayName = EC;
13455
+ var OC = "SelectScrollDownButton", kC = e.forwardRef((t, n) => {
13456
+ let r = eC(OC, t.__scopeSelect), i = lC(OC, t.__scopeSelect), [a, o] = e.useState(!1), s = R(n, i.onScrollButtonChange);
13457
+ return V(() => {
13458
+ if (r.viewport && r.isPositioned) {
13459
+ let e = function() {
13460
+ let e = t.scrollHeight - t.clientHeight;
13461
+ o(Math.ceil(t.scrollTop) < e);
13462
+ }, t = r.viewport;
13463
+ return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
13464
+ }
13465
+ }, [r.viewport, r.isPositioned]), a ? /* @__PURE__ */ (0, M.jsx)(AC, {
13432
13466
  ...t,
13433
- ref: o
13434
- });
13435
- }), [XC, ZC] = OC(LC, { isInside: !1 }), QC = /* @__PURE__ */ ve("TooltipContent"), $C = e.forwardRef((t, n) => {
13436
- let { __scopeTooltip: r, children: i, "aria-label": a, onEscapeKeyDown: o, onPointerDownOutside: s, ...c } = t, l = zC(qC, r), u = AC(r), { onClose: d } = l;
13437
- return e.useEffect(() => (document.addEventListener(NC, d), () => document.removeEventListener(NC, d)), [d]), e.useEffect(() => {
13438
- if (l.trigger) {
13439
- let e = (e) => {
13440
- e.target?.contains(l.trigger) && d();
13441
- };
13442
- return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
13467
+ ref: s,
13468
+ onAutoScroll: () => {
13469
+ let { viewport: e, selectedItem: t } = r;
13470
+ e && t && (e.scrollTop += t.offsetHeight);
13443
13471
  }
13444
- }, [l.trigger, d]), /* @__PURE__ */ (0, M.jsx)(Mt, {
13445
- asChild: !0,
13446
- disableOutsidePointerEvents: !1,
13447
- onEscapeKeyDown: o,
13448
- onPointerDownOutside: s,
13449
- onFocusOutside: (e) => e.preventDefault(),
13450
- onDismiss: d,
13451
- children: /* @__PURE__ */ (0, M.jsxs)(Gi, {
13452
- "data-state": l.stateAttribute,
13453
- ...u,
13454
- ...c,
13455
- ref: n,
13456
- style: {
13457
- ...c.style,
13458
- "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
13459
- "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
13460
- "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
13461
- "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
13462
- "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
13463
- },
13464
- children: [/* @__PURE__ */ (0, M.jsx)(QC, { children: i }), /* @__PURE__ */ (0, M.jsx)(XC, {
13465
- scope: r,
13466
- isInside: !0,
13467
- children: /* @__PURE__ */ (0, M.jsx)(Bx, {
13468
- id: l.contentId,
13469
- role: "tooltip",
13470
- children: a || i
13471
- })
13472
- })]
13472
+ }) : null;
13473
+ });
13474
+ kC.displayName = OC;
13475
+ var AC = e.forwardRef((t, n) => {
13476
+ let { __scopeSelect: r, onAutoScroll: i, ...a } = t, o = eC("SelectScrollButton", r), s = e.useRef(null), c = MS(r), l = e.useCallback(() => {
13477
+ s.current !== null && (window.clearInterval(s.current), s.current = null);
13478
+ }, []);
13479
+ return e.useEffect(() => () => l(), [l]), V(() => {
13480
+ c().find((e) => e.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
13481
+ }, [c]), /* @__PURE__ */ (0, M.jsx)(W.div, {
13482
+ "aria-hidden": !0,
13483
+ ...a,
13484
+ ref: n,
13485
+ style: {
13486
+ flexShrink: 0,
13487
+ ...a.style
13488
+ },
13489
+ onPointerDown: B(a.onPointerDown, () => {
13490
+ s.current === null && (s.current = window.setInterval(i, 50));
13491
+ }),
13492
+ onPointerMove: B(a.onPointerMove, () => {
13493
+ o.onItemLeave?.(), s.current === null && (s.current = window.setInterval(i, 50));
13494
+ }),
13495
+ onPointerLeave: B(a.onPointerLeave, () => {
13496
+ l();
13473
13497
  })
13474
13498
  });
13499
+ }), jC = "SelectSeparator", MC = e.forwardRef((e, t) => {
13500
+ let { __scopeSelect: n, ...r } = e;
13501
+ return /* @__PURE__ */ (0, M.jsx)(W.div, {
13502
+ "aria-hidden": !0,
13503
+ ...r,
13504
+ ref: t
13505
+ });
13475
13506
  });
13476
- JC.displayName = qC;
13477
- var ew = "TooltipArrow", tw = e.forwardRef((e, t) => {
13478
- let { __scopeTooltip: n, ...r } = e, i = AC(n);
13479
- return ZC(ew, n).isInside ? null : /* @__PURE__ */ (0, M.jsx)(Ki, {
13507
+ MC.displayName = jC;
13508
+ var NC = "SelectArrow", PC = e.forwardRef((e, t) => {
13509
+ let { __scopeSelect: n, ...r } = e, i = IS(n), a = RS(NC, n), o = eC(NC, n);
13510
+ return a.open && o.position === "popper" ? /* @__PURE__ */ (0, M.jsx)(Ki, {
13480
13511
  ...i,
13481
13512
  ...r,
13482
13513
  ref: t
13514
+ }) : null;
13515
+ });
13516
+ PC.displayName = NC;
13517
+ var FC = "SelectBubbleInput", IC = e.forwardRef(({ __scopeSelect: t, value: n, ...r }, i) => {
13518
+ let a = e.useRef(null), o = R(i, a), s = ce(n);
13519
+ return e.useEffect(() => {
13520
+ let e = a.current;
13521
+ if (!e) return;
13522
+ let t = window.HTMLSelectElement.prototype, r = Object.getOwnPropertyDescriptor(t, "value").set;
13523
+ if (s !== n && r) {
13524
+ let t = new Event("change", { bubbles: !0 });
13525
+ r.call(e, n), e.dispatchEvent(t);
13526
+ }
13527
+ }, [s, n]), /* @__PURE__ */ (0, M.jsx)(W.select, {
13528
+ ...r,
13529
+ style: {
13530
+ ...db,
13531
+ ...r.style
13532
+ },
13533
+ ref: o,
13534
+ defaultValue: n
13483
13535
  });
13484
13536
  });
13485
- tw.displayName = ew;
13486
- function nw(e, t) {
13487
- let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
13488
- switch (Math.min(n, r, i, a)) {
13489
- case a: return "left";
13490
- case i: return "right";
13491
- case n: return "top";
13492
- case r: return "bottom";
13493
- default: throw Error("unreachable");
13494
- }
13495
- }
13496
- function rw(e, t, n = 5) {
13497
- let r = [];
13498
- switch (t) {
13499
- case "top":
13500
- r.push({
13501
- x: e.x - n,
13502
- y: e.y + n
13503
- }, {
13504
- x: e.x + n,
13505
- y: e.y + n
13506
- });
13507
- break;
13508
- case "bottom":
13509
- r.push({
13510
- x: e.x - n,
13511
- y: e.y - n
13512
- }, {
13513
- x: e.x + n,
13514
- y: e.y - n
13515
- });
13516
- break;
13517
- case "left":
13518
- r.push({
13519
- x: e.x + n,
13520
- y: e.y - n
13521
- }, {
13522
- x: e.x + n,
13523
- y: e.y + n
13524
- });
13525
- break;
13526
- case "right":
13527
- r.push({
13528
- x: e.x - n,
13529
- y: e.y - n
13530
- }, {
13531
- x: e.x - n,
13532
- y: e.y + n
13533
- });
13534
- break;
13535
- }
13536
- return r;
13537
+ IC.displayName = FC;
13538
+ function LC(e) {
13539
+ return e === "" || e === void 0;
13537
13540
  }
13538
- function iw(e) {
13539
- let { top: t, right: n, bottom: r, left: i } = e;
13540
- return [
13541
- {
13542
- x: i,
13543
- y: t
13544
- },
13545
- {
13546
- x: n,
13547
- y: t
13548
- },
13549
- {
13550
- x: n,
13551
- y: r
13552
- },
13553
- {
13554
- x: i,
13555
- y: r
13556
- }
13541
+ function RC(t) {
13542
+ let n = wt(t), r = e.useRef(""), i = e.useRef(0), a = e.useCallback((e) => {
13543
+ let t = r.current + e;
13544
+ n(t), (function e(t) {
13545
+ r.current = t, window.clearTimeout(i.current), t !== "" && (i.current = window.setTimeout(() => e(""), 1e3));
13546
+ })(t);
13547
+ }, [n]), o = e.useCallback(() => {
13548
+ r.current = "", window.clearTimeout(i.current);
13549
+ }, []);
13550
+ return e.useEffect(() => () => window.clearTimeout(i.current), []), [
13551
+ r,
13552
+ a,
13553
+ o
13557
13554
  ];
13558
13555
  }
13559
- function aw(e, t) {
13560
- let { x: n, y: r } = e, i = !1;
13561
- for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
13562
- let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
13563
- l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
13564
- }
13565
- return i;
13556
+ function zC(e, t, n) {
13557
+ let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = BC(e, Math.max(i, 0));
13558
+ r.length === 1 && (a = a.filter((e) => e !== n));
13559
+ let o = a.find((e) => e.textValue.toLowerCase().startsWith(r.toLowerCase()));
13560
+ return o === n ? void 0 : o;
13566
13561
  }
13567
- function ow(e) {
13568
- let t = e.slice();
13569
- return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), sw(t);
13562
+ function BC(e, t) {
13563
+ return e.map((n, r) => e[(t + r) % e.length]);
13570
13564
  }
13571
- function sw(e) {
13572
- if (e.length <= 1) return e.slice();
13573
- let t = [];
13574
- for (let n = 0; n < e.length; n++) {
13575
- let r = e[n];
13576
- for (; t.length >= 2;) {
13577
- let e = t[t.length - 1], n = t[t.length - 2];
13578
- if ((e.x - n.x) * (r.y - n.y) >= (e.y - n.y) * (r.x - n.x)) t.pop();
13579
- else break;
13580
- }
13581
- t.push(r);
13582
- }
13583
- t.pop();
13584
- let n = [];
13585
- for (let t = e.length - 1; t >= 0; t--) {
13586
- let r = e[t];
13587
- for (; n.length >= 2;) {
13588
- let e = n[n.length - 1], t = n[n.length - 2];
13589
- if ((e.x - t.x) * (r.y - t.y) >= (e.y - t.y) * (r.x - t.x)) n.pop();
13590
- else break;
13591
- }
13592
- n.push(r);
13593
- }
13594
- return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
13565
+ var VC = VS, HC = US, UC = GS, WC = qS, GC = YS, KC = ZS, qC = dC, JC = hC, YC = _C, XC = xC, ZC = CC, QC = TC, $C = MC, ew = K([
13566
+ "zui:flex zui:w-full zui:items-center zui:justify-between zui:gap-2 radius-xs zui:border zui:border-[var(--zui-color-border)] zui:bg-transparent zui:px-3 zui:text-right zui:text-base zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:data-[placeholder]:text-[var(--zui-theme-text-muted)] zui:data-[has-value=true]:border-[var(--zui-theme-action-primary)] zui:disabled:pointer-events-none zui:disabled:cursor-not-allowed zui:disabled:bg-[var(--zui-color-muted-surface)] zui:disabled:opacity-50 zui:md:text-sm",
13567
+ xv,
13568
+ Sv
13569
+ ].join(" "), {
13570
+ variants: { size: {
13571
+ sm: "zui:h-[2.88rem]",
13572
+ default: "zui:h-[3.24rem]",
13573
+ lg: "zui:h-[3.6rem]"
13574
+ } },
13575
+ defaultVariants: { size: "default" }
13576
+ }), tw = K("zui:z-[120] zui:max-h-72 zui:min-w-[8rem] zui:overflow-hidden radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-color-muted-surface)] zui:text-[var(--zui-theme-text-primary)] zui:shadow-md zui:data-[state=open]:animate-in zui:data-[state=open]:fade-in-0 zui:data-[state=open]:zoom-in-95 zui:data-[side=bottom]:slide-in-from-top-2 zui:data-[side=left]:slide-in-from-right-2 zui:data-[side=right]:slide-in-from-left-2 zui:data-[side=top]:slide-in-from-bottom-2"), nw = K("zui:text-right zui:[&_[data-slot=select-label]]:px-2 zui:[&_[data-slot=select-label]]:py-1.5 zui:[&_[data-slot=select-label]]:text-xs zui:[&_[data-slot=select-label]]:font-semibold", {
13577
+ variants: { hasSearch: {
13578
+ true: "zui:px-1 zui:pb-1 zui:pt-0",
13579
+ false: "zui:p-1"
13580
+ } },
13581
+ defaultVariants: { hasSearch: !1 }
13582
+ }), rw = K("zui:relative zui:flex zui:w-full zui:cursor-pointer zui:items-center zui:border-b zui:border-[var(--zui-theme-border-default)] zui:py-1.5 zui:pl-8 zui:pr-2 zui:text-right zui:text-sm zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:select-none zui:transition-[background-color,color] zui:duration-150 zui:last:border-b-0 zui:data-[disabled]:pointer-events-none zui:data-[disabled]:cursor-not-allowed zui:data-[disabled]:opacity-45 zui:data-[highlighted]:bg-[var(--zui-theme-bg-muted)] zui:data-[highlighted]:text-[var(--zui-theme-text-primary)] zui:data-[state=checked]:bg-transparent"), iw = K("zui:px-2 zui:py-1.5 zui:text-right zui:text-xs zui:font-semibold zui:text-[var(--zui-theme-text-muted)]"), aw = K("zui:my-1 zui:h-px zui:bg-[var(--zui-theme-border-default)]"), ow = K(["zui:placeholder:text-[var(--zui-theme-text-muted)] zui:flex zui:h-9 zui:w-full zui:min-w-0 radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-transparent zui:px-3 zui:py-2 zui:text-right zui:text-sm zui:text-[var(--zui-theme-text-primary)] zui:outline-none", xv].join(" "));
13583
+ //#endregion
13584
+ //#region src/components/Select/Select.filter.ts
13585
+ function sw(t) {
13586
+ return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(sw).join(" ") : e.isValidElement(t) ? sw(t.props.children) : "";
13587
+ }
13588
+ function cw(t, n) {
13589
+ return e.isValidElement(t) && t.type === n;
13590
+ }
13591
+ function lw(t, n) {
13592
+ return e.isValidElement(t) ? t.type === n.item ? !0 : e.Children.toArray(t.props.children).some((e) => lw(e, n)) : !1;
13593
+ }
13594
+ function uw(e, t) {
13595
+ let n = e.filter((e) => e != null && e !== !1 && !(typeof e == "string" && e.trim().length === 0));
13596
+ return n.filter((e, r) => {
13597
+ if (!cw(e, t.separator)) return !0;
13598
+ let i = n[r - 1], a = n[r + 1];
13599
+ return !(!i || !a || cw(i, t.separator) || cw(a, t.separator));
13600
+ });
13601
+ }
13602
+ function dw(t, n, r) {
13603
+ if (!e.isValidElement(t)) return t;
13604
+ if (cw(t, r.item)) return sw(t.props.children).toLocaleLowerCase().includes(n) ? t : null;
13605
+ if (cw(t, r.separator)) return t;
13606
+ let i = e.Children.toArray(t.props.children);
13607
+ if (i.length === 0) return t;
13608
+ let a = uw(i.map((e) => dw(e, n, r)).filter((e) => e !== null), r);
13609
+ return cw(t, r.group) && !a.some((e) => lw(e, r)) ? null : e.cloneElement(t, t.props, a);
13610
+ }
13611
+ function fw(t, n, r) {
13612
+ let i = n.trim().toLocaleLowerCase(), a = e.Children.toArray(t);
13613
+ return uw(i ? a.map((e) => dw(e, i, r)).filter((e) => e !== null) : a, r);
13595
13614
  }
13596
- var cw = IC, lw = BC, uw = HC, dw = KC, fw = JC, pw = K("zui:z-50 zui:w-fit zui:origin-[var(--radix-tooltip-content-transform-origin)] zui:overflow-hidden zui:rounded-md zui:bg-[var(--zui-color-tooltip-surface)] zui:px-3 zui:py-1.5 zui:text-xs zui:leading-5 zui:text-[var(--zui-color-text)] zui:shadow-sm zui:animate-in zui:fade-in-0 zui:zoom-in-95 zui:data-[state=closed]:animate-out zui:data-[state=closed]:fade-out-0 zui:data-[state=closed]:zoom-out-95 zui:data-[state=open]:duration-300 zui:data-[state=closed]:duration-200 zui:data-[side=bottom]:slide-in-from-top-2 zui:data-[side=left]:slide-in-from-right-2 zui:data-[side=right]:slide-in-from-left-2 zui:data-[side=top]:slide-in-from-bottom-2");
13597
13615
  //#endregion
13598
- //#region src/components/Tooltip/Tooltip.tsx
13599
- function mw({ text: e, trigger: t, position: n = "top", className: r, disabled: i = !1, sideOffset: a = 4, delayDuration: o = 120, skipDelayDuration: s = 200, ...c }) {
13600
- return /* @__PURE__ */ (0, M.jsx)(cw, {
13601
- "data-slot": "tooltip-provider",
13602
- delayDuration: o,
13603
- skipDelayDuration: s,
13604
- children: /* @__PURE__ */ (0, M.jsxs)(lw, {
13605
- "data-slot": "tooltip",
13606
- ...c,
13607
- children: [/* @__PURE__ */ (0, M.jsx)(uw, {
13608
- asChild: !0,
13609
- disabled: i,
13610
- "data-slot": "tooltip-trigger",
13611
- children: t
13612
- }), /* @__PURE__ */ (0, M.jsx)(dw, { children: /* @__PURE__ */ (0, M.jsx)(fw, {
13613
- "data-slot": "tooltip-content",
13614
- side: n,
13615
- sideOffset: a,
13616
- className: G(pw(), r),
13617
- children: e
13618
- }) })]
13619
- })
13616
+ //#region src/components/Skeleton/Skeleton.variant.ts
13617
+ var pw = K("zui:animate-pulse radius-xs zui:bg-[var(--zui-color-tooltip-surface)]");
13618
+ //#endregion
13619
+ //#region src/components/Skeleton/Skeleton.tsx
13620
+ function mw({ className: e, ...t }) {
13621
+ return /* @__PURE__ */ (0, M.jsx)("div", {
13622
+ "data-slot": "skeleton",
13623
+ className: G(pw(), e),
13624
+ ...t
13620
13625
  });
13621
13626
  }
13622
13627
  //#endregion
@@ -13683,7 +13688,7 @@ function Lw() {
13683
13688
  return /* @__PURE__ */ (0, M.jsx)("div", {
13684
13689
  "data-slot": "select-loading",
13685
13690
  className: "zui:space-y-1 zui:px-2 zui:py-2",
13686
- children: Array.from({ length: Sw }, (e, t) => /* @__PURE__ */ (0, M.jsx)(DC, { className: G("zui:h-5 zui:max-w-full", t === 0 ? "zui:w-[88%]" : t === 1 ? "zui:w-[72%]" : "zui:w-[80%]") }, `select-loading-${t}`))
13691
+ children: Array.from({ length: Sw }, (e, t) => /* @__PURE__ */ (0, M.jsx)(mw, { className: G("zui:h-5 zui:max-w-full", t === 0 ? "zui:w-[88%]" : t === 1 ? "zui:w-[72%]" : "zui:w-[80%]") }, `select-loading-${t}`))
13687
13692
  });
13688
13693
  }
13689
13694
  function Rw(t) {
@@ -13870,7 +13875,7 @@ function Bw({ type: t = "single", title: n, required: r = !1, placeholder: i, op
13870
13875
  form: we,
13871
13876
  value: le.join(",")
13872
13877
  }) : null]
13873
- }) : /* @__PURE__ */ (0, M.jsx)(eC, {
13878
+ }) : /* @__PURE__ */ (0, M.jsx)(VC, {
13874
13879
  "data-slot": "select",
13875
13880
  dir: "rtl",
13876
13881
  disabled: D,
@@ -13915,7 +13920,7 @@ var Vw = e.forwardRef(function({ className: t, size: n = "default", children: r,
13915
13920
  "aria-haspopup": "listbox",
13916
13921
  "aria-invalid": f || void 0,
13917
13922
  disabled: i,
13918
- className: G(pC({
13923
+ className: G(ew({
13919
13924
  size: n,
13920
13925
  className: t
13921
13926
  }), "zui:text-right"),
@@ -13926,7 +13931,7 @@ var Vw = e.forwardRef(function({ className: t, size: n = "default", children: r,
13926
13931
  children: [r, /* @__PURE__ */ (0, M.jsx)($e, { className: G("zui:size-4 zui:opacity-70 zui:transition-transform zui:duration-200", e ? "zui:rotate-180" : "zui:rotate-0") })]
13927
13932
  });
13928
13933
  }
13929
- return /* @__PURE__ */ (0, M.jsxs)(tC, {
13934
+ return /* @__PURE__ */ (0, M.jsxs)(HC, {
13930
13935
  ref: l,
13931
13936
  "data-slot": "select-trigger",
13932
13937
  "data-has-value": d,
@@ -13935,12 +13940,12 @@ var Vw = e.forwardRef(function({ className: t, size: n = "default", children: r,
13935
13940
  asChild: a,
13936
13941
  disabled: s,
13937
13942
  onClick: o,
13938
- className: G(pC({
13943
+ className: G(ew({
13939
13944
  size: n,
13940
13945
  className: t
13941
13946
  }), "zui:text-right"),
13942
13947
  ...c,
13943
- children: [r, /* @__PURE__ */ (0, M.jsx)(rC, {
13948
+ children: [r, /* @__PURE__ */ (0, M.jsx)(WC, {
13944
13949
  asChild: !0,
13945
13950
  children: /* @__PURE__ */ (0, M.jsx)($e, { className: G("zui:size-4 zui:opacity-70 zui:transition-transform zui:duration-200", p ? "zui:rotate-180" : "zui:rotate-0") })
13946
13951
  })]
@@ -13964,7 +13969,7 @@ function Hw({ className: t, placeholder: n, children: r, ...i }) {
13964
13969
  className: G("zui:block zui:max-w-full zui:truncate zui:text-right", t),
13965
13970
  ...i,
13966
13971
  children: r ?? o.label
13967
- }) : /* @__PURE__ */ (0, M.jsx)(nC, {
13972
+ }) : /* @__PURE__ */ (0, M.jsx)(UC, {
13968
13973
  "data-slot": "select-value",
13969
13974
  className: t,
13970
13975
  placeholder: n,
@@ -14109,7 +14114,7 @@ var Uw = e.forwardRef(function({ className: t, children: n, position: r = "poppe
14109
14114
  l,
14110
14115
  c,
14111
14116
  de
14112
- ]), _e = e.useMemo(() => u && !C ? TC(oe, d, {
14117
+ ]), _e = e.useMemo(() => u && !C ? fw(oe, d, {
14113
14118
  group: Ww,
14114
14119
  item: Kw,
14115
14120
  separator: qw
@@ -14127,11 +14132,11 @@ var Uw = e.forwardRef(function({ className: t, children: n, position: r = "poppe
14127
14132
  "data-slot": "select-content",
14128
14133
  "data-state": "open",
14129
14134
  dir: "rtl",
14130
- className: G(mC(), "zui:!absolute zui:left-0 zui:right-0 zui:top-full zui:mt-1.5 zui:w-full", t),
14135
+ className: G(tw(), "zui:!absolute zui:left-0 zui:right-0 zui:top-full zui:mt-1.5 zui:w-full", t),
14131
14136
  children: /* @__PURE__ */ (0, M.jsxs)("div", {
14132
14137
  ref: T,
14133
14138
  "data-slot": "select-viewport",
14134
- className: G(hC({ hasSearch: u }), "zui:max-h-72 zui:overflow-y-auto"),
14139
+ className: G(nw({ hasSearch: u }), "zui:max-h-72 zui:overflow-y-auto"),
14135
14140
  onScroll: se,
14136
14141
  children: [
14137
14142
  u ? /* @__PURE__ */ (0, M.jsx)("div", {
@@ -14154,13 +14159,13 @@ var Uw = e.forwardRef(function({ className: t, children: n, position: r = "poppe
14154
14159
  value: d,
14155
14160
  placeholder: _w,
14156
14161
  "data-slot": "select-search-input",
14157
- className: G(yC(), "zui:pr-9"),
14162
+ className: G(ow(), "zui:pr-9"),
14158
14163
  onChange: (e) => f?.(e.target.value),
14159
14164
  onKeyDown: (e) => e.stopPropagation(),
14160
14165
  onPointerDown: (e) => e.stopPropagation()
14161
14166
  })]
14162
14167
  }),
14163
- /* @__PURE__ */ (0, M.jsx)(mw, {
14168
+ /* @__PURE__ */ (0, M.jsx)(tx, {
14164
14169
  text: gw,
14165
14170
  position: "top",
14166
14171
  disabled: c.isDisabled || y.length === 0,
@@ -14177,7 +14182,7 @@ var Uw = e.forwardRef(function({ className: t, children: n, position: r = "poppe
14177
14182
  })
14178
14183
  })
14179
14184
  }),
14180
- /* @__PURE__ */ (0, M.jsx)(mw, {
14185
+ /* @__PURE__ */ (0, M.jsx)(tx, {
14181
14186
  text: c.multiSelectAllLabel,
14182
14187
  position: "top",
14183
14188
  disabled: c.isDisabled || de.length === 0 || fe,
@@ -14239,18 +14244,18 @@ var Uw = e.forwardRef(function({ className: t, children: n, position: r = "poppe
14239
14244
  })
14240
14245
  });
14241
14246
  }
14242
- return /* @__PURE__ */ (0, M.jsx)(iC, { children: /* @__PURE__ */ (0, M.jsx)(aC, {
14247
+ return /* @__PURE__ */ (0, M.jsx)(GC, { children: /* @__PURE__ */ (0, M.jsx)(KC, {
14243
14248
  ref: s,
14244
14249
  "data-slot": "select-content",
14245
14250
  dir: "rtl",
14246
- className: G(mC(), r === "popper" && "zui:data-[side=bottom]:translate-y-1 zui:data-[side=left]:-translate-x-1 zui:data-[side=right]:translate-x-1 zui:data-[side=top]:-translate-y-1", t),
14251
+ className: G(tw(), r === "popper" && "zui:data-[side=bottom]:translate-y-1 zui:data-[side=left]:-translate-x-1 zui:data-[side=right]:translate-x-1 zui:data-[side=top]:-translate-y-1", t),
14247
14252
  position: r,
14248
14253
  sideOffset: i,
14249
14254
  ...o,
14250
- children: /* @__PURE__ */ (0, M.jsxs)(oC, {
14255
+ children: /* @__PURE__ */ (0, M.jsxs)(qC, {
14251
14256
  ref: T,
14252
14257
  "data-slot": "select-viewport",
14253
- className: G(hC({ hasSearch: u }), "zui:max-h-72 zui:overflow-y-auto", r === "popper" && "zui:min-w-[var(--radix-select-trigger-width)]"),
14258
+ className: G(nw({ hasSearch: u }), "zui:max-h-72 zui:overflow-y-auto", r === "popper" && "zui:min-w-[var(--radix-select-trigger-width)]"),
14254
14259
  onScroll: se,
14255
14260
  children: [
14256
14261
  u ? /* @__PURE__ */ (0, M.jsx)("div", {
@@ -14272,12 +14277,12 @@ var Uw = e.forwardRef(function({ className: t, children: n, position: r = "poppe
14272
14277
  value: d,
14273
14278
  placeholder: _w,
14274
14279
  "data-slot": "select-search-input",
14275
- className: G(yC(), "zui:pr-9"),
14280
+ className: G(ow(), "zui:pr-9"),
14276
14281
  onChange: (e) => f?.(e.target.value),
14277
14282
  onKeyDown: (e) => e.stopPropagation(),
14278
14283
  onPointerDown: (e) => e.stopPropagation()
14279
14284
  })]
14280
- }), /* @__PURE__ */ (0, M.jsx)(mw, {
14285
+ }), /* @__PURE__ */ (0, M.jsx)(tx, {
14281
14286
  text: gw,
14282
14287
  position: "top",
14283
14288
  disabled: (c?.isDisabled ?? !1) || !ye,
@@ -14318,38 +14323,38 @@ var Uw = e.forwardRef(function({ className: t, children: n, position: r = "poppe
14318
14323
  }) });
14319
14324
  });
14320
14325
  function Ww(e) {
14321
- return /* @__PURE__ */ (0, M.jsx)(sC, {
14326
+ return /* @__PURE__ */ (0, M.jsx)(JC, {
14322
14327
  "data-slot": "select-group",
14323
14328
  ...e
14324
14329
  });
14325
14330
  }
14326
14331
  var Gw = e.forwardRef(function({ className: e, ...t }, n) {
14327
- return /* @__PURE__ */ (0, M.jsx)(cC, {
14332
+ return /* @__PURE__ */ (0, M.jsx)(YC, {
14328
14333
  ref: n,
14329
14334
  "data-slot": "select-label",
14330
- className: G(_C(), e),
14335
+ className: G(iw(), e),
14331
14336
  ...t
14332
14337
  });
14333
14338
  }), Kw = e.forwardRef(function({ className: e, children: t, ...n }, r) {
14334
- return /* @__PURE__ */ (0, M.jsxs)(lC, {
14339
+ return /* @__PURE__ */ (0, M.jsxs)(XC, {
14335
14340
  ref: r,
14336
14341
  "data-slot": "select-item",
14337
14342
  dir: "rtl",
14338
- className: G(gC(), e),
14343
+ className: G(rw(), e),
14339
14344
  ...n,
14340
14345
  children: [/* @__PURE__ */ (0, M.jsx)("span", {
14341
14346
  className: "zui:absolute zui:left-2 zui:flex zui:size-[1.2rem] zui:items-center zui:justify-center zui:text-[var(--zui-theme-action-primary)]",
14342
- children: /* @__PURE__ */ (0, M.jsx)(dC, { children: /* @__PURE__ */ (0, M.jsx)(Qe, { className: Ew }) })
14343
- }), /* @__PURE__ */ (0, M.jsx)(uC, {
14347
+ children: /* @__PURE__ */ (0, M.jsx)(QC, { children: /* @__PURE__ */ (0, M.jsx)(Qe, { className: Ew }) })
14348
+ }), /* @__PURE__ */ (0, M.jsx)(ZC, {
14344
14349
  className: "zui:w-full zui:text-right",
14345
14350
  children: t
14346
14351
  })]
14347
14352
  });
14348
14353
  }), qw = e.forwardRef(function({ className: e, ...t }, n) {
14349
- return /* @__PURE__ */ (0, M.jsx)(fC, {
14354
+ return /* @__PURE__ */ (0, M.jsx)($C, {
14350
14355
  ref: n,
14351
14356
  "data-slot": "select-separator",
14352
- className: G(vC(), e),
14357
+ className: G(aw(), e),
14353
14358
  ...t
14354
14359
  });
14355
14360
  }), Jw = K("zui:fixed zui:inset-0 zui:z-[80] zui:bg-[var(--zui-theme-overlay-scrim)] zui:backdrop-blur-[1px] zui:data-[state=open]:animate-in zui:data-[state=closed]:animate-out zui:data-[state=closed]:fade-out-0 zui:data-[state=open]:fade-in-0"), Yw = K("zui:fixed zui:z-[90] zui:flex zui:h-fit zui:max-h-[calc(100dvh-1rem)] zui:min-w-[16rem] zui:max-w-[calc(100vw-1rem)] zui:flex-col zui:gap-4 zui:overflow-y-auto zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-[var(--zui-theme-bg-page)] zui:p-4 zui:text-[var(--zui-theme-text-primary)] zui:shadow-[0_24px_48px_-30px_var(--zui-effect-shadow-ink-55)] zui:transition zui:ease-in-out zui:data-[state=closed]:duration-300 zui:data-[state=open]:duration-500 zui:data-[state=open]:animate-in zui:data-[state=closed]:animate-out zui:sm:max-h-[calc(100dvh-2rem)] zui:sm:max-w-[calc(100vw-2rem)] zui:sm:p-6", {
@@ -14449,7 +14454,7 @@ function cT({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, dir: i =
14449
14454
  }
14450
14455
  //#endregion
14451
14456
  //#region src/components/Table/Table.constants.ts
14452
- var lT = "داده‌ای برای نمایش وجود ندارد.", uT = "ستون قابل‌نمایشی تعریف نشده است.", dT = "داده‌ای مطابق جستجو پیدا نشد.", fT = "عملیات", pT = "ردیف", mT = "افزودن", hT = "ویرایش", gT = "حذف", _T = "zui:size-4", vT = "zui:size-6", yT = "zui:border-0 zui:bg-transparent zui:shadow-none zui:hover:bg-transparent zui:hover:shadow-none zui:active:bg-transparent zui:focus-visible:ring-0", bT = "zui:w-32 zui:px-3 zui:text-center", xT = "zui:w-16 zui:px-3 zui:text-center", ST = "جستجو کنید", CT = "جستجوی جدول", wT = "تغییر به پیمایش بی‌نهایت", TT = "تغییر به صفحه‌بندی", ET = "صفحه قبل", DT = "صفحه بعد", OT = "zui:sticky zui:top-0 zui:z-20 zui:bg-[var(--zui-color-primary)]", kT = "208px 0px", AT = "در حال بارگذاری ردیف‌های بیشتر...", jT = "برای بارگذاری بیشتر به پایین اسکرول کنید.", MT = "همه ردیف‌ها نمایش داده شد.", NT = new Intl.DateTimeFormat("fa-IR", { dateStyle: "medium" }), PT = K("zui:relative zui:w-full zui:overflow-hidden"), FT = K("zui:w-full zui:table-fixed zui:text-sm"), IT = K(""), LT = K("zui:[&>tr:first-child>td]:pt-5 zui:[&>tr:nth-child(odd)>td]:bg-[var(--zui-color-muted-surface)] zui:[&>tr:nth-child(even)>td]:bg-[var(--zui-color-surface)]"), RT = K("zui:bg-[var(--zui-color-surface)] zui:font-medium zui:text-[var(--zui-color-text)]"), zT = K("zui:cursor-default"), BT = K("zui:relative zui:h-14 zui:whitespace-normal zui:break-words zui:bg-[var(--zui-color-primary)] zui:px-3 zui:text-right zui:align-middle zui:font-medium zui:text-[var(--zui-color-surface)] zui:[&:has([role=checkbox])]:pr-0 zui:[&>[role=checkbox]]:translate-y-[2px]"), VT = K("zui:px-3 zui:py-3 zui:whitespace-normal zui:break-words zui:align-middle zui:text-[var(--zui-color-text)] zui:[&:has([role=checkbox])]:pr-0 zui:[&>[role=checkbox]]:translate-y-[2px]");
14457
+ var lT = "داده‌ای برای نمایش وجود ندارد.", uT = "ستون قابل‌نمایشی تعریف نشده است.", dT = "داده‌ای مطابق جستجو پیدا نشد.", fT = "عملیات", pT = "ردیف", mT = "افزودن", hT = "ویرایش", gT = "حذف", _T = "zui:size-4", vT = "zui:size-6", yT = "zui:cursor-pointer zui:border-0 zui:bg-transparent zui:shadow-none zui:hover:bg-transparent zui:hover:shadow-none zui:active:bg-transparent zui:focus-visible:ring-0 zui:disabled:cursor-not-allowed", bT = "zui:w-32 zui:px-3 zui:text-center", xT = "zui:w-16 zui:px-3 zui:text-center", ST = "جستجو کنید", CT = "جستجوی جدول", wT = "تغییر به پیمایش بی‌نهایت", TT = "تغییر به صفحه‌بندی", ET = "صفحه قبل", DT = "صفحه بعد", OT = "zui:sticky zui:top-0 zui:z-20 zui:bg-[var(--zui-color-primary)]", kT = "208px 0px", AT = "در حال بارگذاری ردیف‌های بیشتر...", jT = "برای بارگذاری بیشتر به پایین اسکرول کنید.", MT = "همه ردیف‌ها نمایش داده شد.", NT = new Intl.DateTimeFormat("fa-IR", { dateStyle: "medium" }), PT = K("zui:relative zui:w-full zui:overflow-hidden"), FT = K("zui:w-full zui:table-fixed zui:text-sm"), IT = K(""), LT = K("zui:[&>tr:first-child>td]:pt-5 zui:[&>tr:nth-child(odd)>td]:bg-[var(--zui-color-muted-surface)] zui:[&>tr:nth-child(even)>td]:bg-[var(--zui-color-surface)]"), RT = K("zui:bg-[var(--zui-color-surface)] zui:font-medium zui:text-[var(--zui-color-text)]"), zT = K("zui:cursor-default"), BT = K("zui:relative zui:h-14 zui:whitespace-normal zui:break-words zui:bg-[var(--zui-color-primary)] zui:px-3 zui:text-right zui:align-middle zui:font-medium zui:text-[var(--zui-color-surface)] zui:[&:has([role=checkbox])]:pr-0 zui:[&>[role=checkbox]]:translate-y-[2px]"), VT = K("zui:px-3 zui:py-3 zui:whitespace-normal zui:break-words zui:align-middle zui:text-[var(--zui-color-text)] zui:[&:has([role=checkbox])]:pr-0 zui:[&>[role=checkbox]]:translate-y-[2px]");
14453
14458
  //#endregion
14454
14459
  //#region src/components/Table/TableEmptyState.tsx
14455
14460
  function HT({ colSpan: e, showSearchInput: t, normalizedSearchTerm: n }) {
@@ -14482,7 +14487,7 @@ function UT({ shouldRenderInfiniteMode: e, shouldShowInfiniteLoadingStatus: t, s
14482
14487
  }) : null, i ? /* @__PURE__ */ (0, M.jsx)("div", {
14483
14488
  "data-slot": "table-pagination",
14484
14489
  className: a || o ? "zui:pointer-events-none zui:opacity-65" : void 0,
14485
- children: /* @__PURE__ */ (0, M.jsx)(Ab, {
14490
+ children: /* @__PURE__ */ (0, M.jsx)(xx, {
14486
14491
  className: "zui:mt-4",
14487
14492
  dir: "rtl",
14488
14493
  totalPages: c,
@@ -14952,7 +14957,7 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
14952
14957
  children: [E ? /* @__PURE__ */ (0, M.jsx)("div", {
14953
14958
  "data-slot": "table-search-input",
14954
14959
  className: "zui:w-full zui:sm:min-w-0 zui:sm:flex-1",
14955
- children: /* @__PURE__ */ (0, M.jsx)(fb, {
14960
+ children: /* @__PURE__ */ (0, M.jsx)(rx, {
14956
14961
  type: "search",
14957
14962
  size: "sm",
14958
14963
  disabled: r || I,
@@ -14965,7 +14970,7 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
14965
14970
  }) : /* @__PURE__ */ (0, M.jsx)("div", { className: "zui:hidden zui:sm:block zui:sm:flex-1" }), x || ue ? /* @__PURE__ */ (0, M.jsxs)("div", {
14966
14971
  "data-slot": "table-add-action",
14967
14972
  className: "zui:flex zui:shrink-0 zui:items-center zui:justify-end zui:gap-1",
14968
- children: [ue ? /* @__PURE__ */ (0, M.jsx)(mw, {
14973
+ children: [ue ? /* @__PURE__ */ (0, M.jsx)(tx, {
14969
14974
  text: je,
14970
14975
  position: "top",
14971
14976
  disabled: r || I,
@@ -14989,7 +14994,7 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
14989
14994
  })
14990
14995
  })
14991
14996
  })
14992
- }) : null, x ? /* @__PURE__ */ (0, M.jsx)(mw, {
14997
+ }) : null, x ? /* @__PURE__ */ (0, M.jsx)(tx, {
14993
14998
  text: mT,
14994
14999
  position: "top",
14995
15000
  disabled: r || I,
@@ -15042,18 +15047,18 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
15042
15047
  children: [
15043
15048
  D ? /* @__PURE__ */ (0, M.jsx)(dE, {
15044
15049
  className: xT,
15045
- children: /* @__PURE__ */ (0, M.jsx)(DC, { className: "zui:mx-auto zui:h-4 zui:w-8" })
15050
+ children: /* @__PURE__ */ (0, M.jsx)(mw, { className: "zui:mx-auto zui:h-4 zui:w-8" })
15046
15051
  }) : null,
15047
- b.map((e) => /* @__PURE__ */ (0, M.jsx)(dE, { children: /* @__PURE__ */ (0, M.jsx)(DC, { className: G("zui:max-w-full", GT(e, t)) }) }, `loading-cell-${e.key}-${t}`)),
15052
+ b.map((e) => /* @__PURE__ */ (0, M.jsx)(dE, { children: /* @__PURE__ */ (0, M.jsx)(mw, { className: G("zui:max-w-full", GT(e, t)) }) }, `loading-cell-${e.key}-${t}`)),
15048
15053
  j ? /* @__PURE__ */ (0, M.jsx)(dE, {
15049
15054
  className: bT,
15050
15055
  children: /* @__PURE__ */ (0, M.jsxs)("div", {
15051
15056
  "data-slot": "table-row-actions-skeleton",
15052
15057
  className: "zui:flex zui:items-center zui:justify-center zui:gap-0.5",
15053
15058
  children: [
15054
- S ? /* @__PURE__ */ (0, M.jsx)(DC, { className: "zui:size-9" }) : null,
15055
- T ? w.map((e, t) => /* @__PURE__ */ (0, M.jsx)(DC, { className: "zui:size-9" }, `custom-action-skeleton-${t}`)) : null,
15056
- C ? /* @__PURE__ */ (0, M.jsx)(DC, { className: "zui:size-9" }) : null
15059
+ S ? /* @__PURE__ */ (0, M.jsx)(mw, { className: "zui:size-9" }) : null,
15060
+ T ? w.map((e, t) => /* @__PURE__ */ (0, M.jsx)(mw, { className: "zui:size-9" }, `custom-action-skeleton-${t}`)) : null,
15061
+ C ? /* @__PURE__ */ (0, M.jsx)(mw, { className: "zui:size-9" }) : null
15057
15062
  ]
15058
15063
  })
15059
15064
  }) : null
@@ -15067,7 +15072,7 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
15067
15072
  return /* @__PURE__ */ (0, M.jsxs)(lE, { children: [
15068
15073
  D ? /* @__PURE__ */ (0, M.jsx)(dE, {
15069
15074
  className: xT,
15070
- children: mb({ value: String(a) })
15075
+ children: ax({ value: String(a) })
15071
15076
  }) : null,
15072
15077
  b.map((r) => {
15073
15078
  let a = `cell-${r.key}-${i}`;
@@ -15094,7 +15099,7 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
15094
15099
  "data-slot": "table-row-actions",
15095
15100
  className: "zui:flex zui:items-center zui:justify-center zui:gap-0.5",
15096
15101
  children: [
15097
- S ? /* @__PURE__ */ (0, M.jsx)(mw, {
15102
+ S ? /* @__PURE__ */ (0, M.jsx)(tx, {
15098
15103
  text: hT,
15099
15104
  position: "top",
15100
15105
  disabled: I,
@@ -15111,7 +15116,7 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
15111
15116
  })
15112
15117
  })
15113
15118
  }) : null,
15114
- T ? w.map((r, i) => /* @__PURE__ */ (0, M.jsx)(mw, {
15119
+ T ? w.map((r, i) => /* @__PURE__ */ (0, M.jsx)(tx, {
15115
15120
  text: r.tooltip,
15116
15121
  position: "top",
15117
15122
  disabled: I,
@@ -15125,7 +15130,7 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
15125
15130
  children: r.icon
15126
15131
  })
15127
15132
  }, `${r.tooltip}-${i}`)) : null,
15128
- C ? /* @__PURE__ */ (0, M.jsx)(mw, {
15133
+ C ? /* @__PURE__ */ (0, M.jsx)(tx, {
15129
15134
  text: gT,
15130
15135
  position: "top",
15131
15136
  disabled: I,
@@ -15151,18 +15156,18 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
15151
15156
  children: [
15152
15157
  D ? /* @__PURE__ */ (0, M.jsx)(dE, {
15153
15158
  className: xT,
15154
- children: /* @__PURE__ */ (0, M.jsx)(DC, { className: "zui:mx-auto zui:h-4 zui:w-8" })
15159
+ children: /* @__PURE__ */ (0, M.jsx)(mw, { className: "zui:mx-auto zui:h-4 zui:w-8" })
15155
15160
  }) : null,
15156
- b.map((e) => /* @__PURE__ */ (0, M.jsx)(dE, { children: /* @__PURE__ */ (0, M.jsx)(DC, { className: G("zui:max-w-full", GT(e, t)) }) }, `infinite-loading-cell-${e.key}-${t}`)),
15161
+ b.map((e) => /* @__PURE__ */ (0, M.jsx)(dE, { children: /* @__PURE__ */ (0, M.jsx)(mw, { className: G("zui:max-w-full", GT(e, t)) }) }, `infinite-loading-cell-${e.key}-${t}`)),
15157
15162
  j ? /* @__PURE__ */ (0, M.jsx)(dE, {
15158
15163
  className: bT,
15159
15164
  children: /* @__PURE__ */ (0, M.jsxs)("div", {
15160
15165
  "data-slot": "table-row-actions-skeleton",
15161
15166
  className: "zui:flex zui:items-center zui:justify-center zui:gap-0.5",
15162
15167
  children: [
15163
- S ? /* @__PURE__ */ (0, M.jsx)(DC, { className: "zui:size-9" }) : null,
15164
- T ? w.map((e, t) => /* @__PURE__ */ (0, M.jsx)(DC, { className: "zui:size-9" }, `infinite-custom-action-skeleton-${t}`)) : null,
15165
- C ? /* @__PURE__ */ (0, M.jsx)(DC, { className: "zui:size-9" }) : null
15168
+ S ? /* @__PURE__ */ (0, M.jsx)(mw, { className: "zui:size-9" }) : null,
15169
+ T ? w.map((e, t) => /* @__PURE__ */ (0, M.jsx)(mw, { className: "zui:size-9" }, `infinite-custom-action-skeleton-${t}`)) : null,
15170
+ C ? /* @__PURE__ */ (0, M.jsx)(mw, { className: "zui:size-9" }) : null
15166
15171
  ]
15167
15172
  })
15168
15173
  }) : null
@@ -15236,7 +15241,7 @@ var iE = "zui:inline-flex zui:shrink-0 zui:[&>button]:!h-[2.88rem] zui:[&>button
15236
15241
  aE.displayName = "Table", oE.displayName = "TableHeader", sE.displayName = "TableBody", cE.displayName = "TableFooter", lE.displayName = "TableRow", uE.displayName = "TableHead", dE.displayName = "TableCell";
15237
15242
  //#endregion
15238
15243
  //#region src/components/Textarea/Textarea.variant.ts
15239
- var fE = K(["zui:placeholder:text-[var(--zui-theme-text-muted)] zui:selection:bg-[var(--zui-theme-action-primary)] zui:selection:text-[var(--zui-theme-text-inverse)] zui:field-sizing-content zui:flex zui:min-h-[4.8rem] zui:w-full radius-xs zui:border zui:border-[var(--zui-theme-border-default)] zui:bg-transparent zui:px-3 zui:py-2 zui:text-base zui:text-[var(--zui-theme-text-primary)] zui:outline-none zui:data-[has-value=true]:border-[var(--zui-theme-action-primary)] zui:disabled:cursor-not-allowed zui:disabled:bg-[var(--zui-color-muted-surface)] zui:disabled:opacity-50 zui:md:text-sm", xv].join(" "), {
15244
+ var fE = K(["zui:placeholder:text-[var(--zui-color-text)] zui:selection:bg-[var(--zui-theme-action-primary)] zui:selection:text-[var(--zui-theme-text-inverse)] zui:field-sizing-content zui:flex zui:min-h-[4.8rem] zui:w-full radius-xs zui:border zui:border-[var(--zui-color-border)] zui:bg-transparent zui:px-3 zui:py-2 zui:text-base zui:text-[var(--zui-color-text)] zui:outline-none zui:data-[has-value=true]:border-[var(--zui-theme-action-primary)] zui:[&:not(:focus):not(:focus-visible):not([data-has-value=true])]:border-[var(--zui-color-border)] zui:disabled:cursor-not-allowed zui:disabled:bg-[var(--zui-color-muted-surface)] zui:disabled:opacity-50 zui:md:text-sm", xv].join(" "), {
15240
15245
  variants: { resize: {
15241
15246
  none: "zui:resize-none",
15242
15247
  y: "zui:resize-y",
@@ -15271,7 +15276,7 @@ function mE({ className: t, resize: n = "none", title: r, required: i = !1, plac
15271
15276
  className: "zui:w-full zui:space-y-1.5 zui:text-right",
15272
15277
  children: [r ? /* @__PURE__ */ (0, M.jsxs)("label", {
15273
15278
  htmlFor: x,
15274
- className: "zui:block zui:text-sm zui:font-medium zui:text-[var(--zui-theme-text-primary)]",
15279
+ className: "zui:block zui:text-sm zui:font-medium zui:text-[var(--zui-color-text)]",
15275
15280
  children: [r, S ? /* @__PURE__ */ (0, M.jsx)("span", {
15276
15281
  className: "zui:mr-1 zui:text-base zui:leading-none zui:text-[var(--zui-theme-status-danger)]",
15277
15282
  children: "*"
@@ -15312,7 +15317,7 @@ function mE({ className: t, resize: n = "none", title: r, required: i = !1, plac
15312
15317
  }
15313
15318
  //#endregion
15314
15319
  //#region node_modules/@radix-ui/react-toast/dist/index.mjs
15315
- var hE = "ToastProvider", [gE, _E, vE] = jb("Toast"), [yE, bE] = z("Toast", [vE]), [xE, SE] = yE(hE), CE = (t) => {
15320
+ var hE = "ToastProvider", [gE, _E, vE] = Sx("Toast"), [yE, bE] = z("Toast", [vE]), [xE, SE] = yE(hE), CE = (t) => {
15316
15321
  let { __scopeToast: n, label: r = "Notification", duration: i = 5e3, swipeDirection: a = "right", swipeThreshold: o = 50, children: s } = t, [c, l] = e.useState(null), [u, d] = e.useState(0), f = e.useRef(!1), p = e.useRef(!1);
15317
15322
  return r.trim() || console.error(`Invalid prop \`label\` supplied to \`${hE}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ (0, M.jsx)(gE.Provider, {
15318
15323
  scope: n,
@@ -15421,7 +15426,7 @@ var wE = "ToastViewport", TE = ["F8"], EE = "toast.viewportPause", DE = "toast.v
15421
15426
  OE.displayName = wE;
15422
15427
  var kE = "ToastFocusProxy", AE = e.forwardRef((e, t) => {
15423
15428
  let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a = SE(kE, n);
15424
- return /* @__PURE__ */ (0, M.jsx)(zx, {
15429
+ return /* @__PURE__ */ (0, M.jsx)(pb, {
15425
15430
  tabIndex: 0,
15426
15431
  ...i,
15427
15432
  ref: t,
@@ -15568,7 +15573,7 @@ var [LE, RE] = yE(jE, { onClose() {} }), zE = e.forwardRef((t, n) => {
15568
15573
  return () => window.clearTimeout(e);
15569
15574
  }, []), c ? null : /* @__PURE__ */ (0, M.jsx)(Ji, {
15570
15575
  asChild: !0,
15571
- children: /* @__PURE__ */ (0, M.jsx)(zx, {
15576
+ children: /* @__PURE__ */ (0, M.jsx)(pb, {
15572
15577
  ...i,
15573
15578
  children: o && /* @__PURE__ */ (0, M.jsxs)(M.Fragment, { children: [
15574
15579
  a.label,
@@ -15873,4 +15878,4 @@ function LD({ duration: e, type: t }) {
15873
15878
  });
15874
15879
  }
15875
15880
  //#endregion
15876
- export { L as Button, Ct as Checkbox, oy as DatePicker, lb as Dialog, fb as Input, wD as PERSISTENT_DURATION, Ab as Pagination, Px as RadioGroup, Fx as RadioGroupItem, Bw as Select, Uw as SelectContent, Ww as SelectGroup, Kw as SelectItem, Gw as SelectLabel, qw as SelectSeparator, Vw as SelectTrigger, Hw as SelectValue, cT as Sheet, DC as Skeleton, N as Spinner, aE as Table, sE as TableBody, dE as TableCell, cE as TableFooter, uE as TableHead, oE as TableHeader, lE as TableRow, mE as Textarea, vD as Toast, yD as ToastAction, bD as ToastClose, SD as ToastDescription, FD as ToastHost, gD as ToastProvider, xD as ToastTitle, _D as ToastViewport, mw as Tooltip, T as applyTheme, w as createThemeCssVariables, iy as formatPersianDate, ay as formatPersianDateRangeLabel, C as resolveTheme, OD as showToast, DD as subscribeToast, y as theme, b as themeCssVariables };
15881
+ export { L as Button, Ct as Checkbox, oy as DatePicker, lb as Dialog, rx as Input, wD as PERSISTENT_DURATION, xx as Pagination, TS as RadioGroup, ES as RadioGroupItem, Bw as Select, Uw as SelectContent, Ww as SelectGroup, Kw as SelectItem, Gw as SelectLabel, qw as SelectSeparator, Vw as SelectTrigger, Hw as SelectValue, cT as Sheet, mw as Skeleton, N as Spinner, aE as Table, sE as TableBody, dE as TableCell, cE as TableFooter, uE as TableHead, oE as TableHeader, lE as TableRow, mE as Textarea, vD as Toast, yD as ToastAction, bD as ToastClose, SD as ToastDescription, FD as ToastHost, gD as ToastProvider, xD as ToastTitle, _D as ToastViewport, tx as Tooltip, T as applyTheme, w as createThemeCssVariables, iy as formatPersianDate, ay as formatPersianDateRangeLabel, C as resolveTheme, OD as showToast, DD as subscribeToast, x as theme, S as themeCssVariables };