@vireo-ai/trellis-ui 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/package.json +4 -1
  2. package/src/components/accordion/styles.css +16 -0
  3. package/src/components/brand/styles.css +8 -0
  4. package/src/components/button/styles.css +178 -0
  5. package/src/components/date-picker/styles.css +426 -0
  6. package/src/components/field/styles.css +12 -0
  7. package/src/components/file-upload/styles.css +28 -0
  8. package/src/components/input/styles.css +11 -0
  9. package/src/components/radio/styles.css +112 -0
  10. package/src/components/scroll-area/styles.css +27 -0
  11. package/src/components/select/styles.css +51 -0
  12. package/src/components/sidebar/styles.css +10 -0
  13. package/src/components/toast/styles.css +43 -0
  14. package/src/components.css +20 -0
  15. package/src/theme.css +332 -46
  16. package/trellis_ui/static/trellis_ui/css/styles.css +955 -214
  17. package/trellis_ui/static/trellis_ui/js/esm/index.js +1149 -910
  18. package/trellis_ui/static/trellis_ui/js/esm/index.js.map +1 -1
  19. package/trellis_ui/static/trellis_ui/js/index.js +7 -7
  20. package/types/components/app/contract.d.ts +7 -2
  21. package/types/components/badge/contract.d.ts +8 -6
  22. package/types/components/box/contract.d.ts +29 -21
  23. package/types/components/box/index.d.ts +1 -1
  24. package/types/components/button/contract.d.ts +10 -7
  25. package/types/components/card/contract.d.ts +25 -11
  26. package/types/components/combobox/contract.d.ts +6 -3
  27. package/types/components/common.d.ts +239 -2
  28. package/types/components/date-picker/contract.d.ts +7 -4
  29. package/types/components/file-upload/index.d.ts +1 -0
  30. package/types/components/frame/contract.d.ts +43 -18
  31. package/types/components/frame/index.d.ts +2 -2
  32. package/types/components/heading/contract.d.ts +3 -2
  33. package/types/components/input/contract.d.ts +7 -3
  34. package/types/components/menu/contract.d.ts +1 -1
  35. package/types/components/modal/contract.d.ts +12 -6
  36. package/types/components/select/contract.d.ts +10 -7
  37. package/types/components/sidebar/contract.d.ts +1 -1
  38. package/types/components/table/contract.d.ts +1 -1
  39. package/types/components/tabs/index.d.ts +1 -0
  40. package/types/components/text/contract.d.ts +3 -2
  41. package/types/components/textarea/contract.d.ts +1 -0
  42. package/types/components/toast/contract.d.ts +11 -5
  43. package/types/components/toast/index.d.ts +2 -1
  44. package/types/index.d.ts +4 -4
  45. package/types/motion/animate.d.ts +4 -0
  46. package/types/motion/presence.d.ts +1 -1
  47. package/types/runtime/index.d.ts +4 -4
  48. package/types/runtime/manifest.d.ts +5 -1
  49. package/types/runtime/merge-bindings.d.ts +9 -0
  50. package/types/runtime/theme.d.ts +8 -3
  51. package/types/runtime/props.d.ts +0 -9
@@ -3856,6 +3856,10 @@ var $o = Qo(), es = (e) => ({
3856
3856
  sidebar: {
3857
3857
  duration: I.slow,
3858
3858
  ease: L.out
3859
+ },
3860
+ sheet: {
3861
+ duration: I.slow,
3862
+ ease: L.out
3859
3863
  }
3860
3864
  }, cs = "(prefers-reduced-motion: reduce)", ls = () => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(cs).matches, us = (e = "user") => e === "always" ? !0 : e === "never" ? !1 : ls(), ds = (e, t = {}, n = "user") => us(n) ? {
3861
3865
  ...e,
@@ -3923,6 +3927,10 @@ var $o = Qo(), es = (e) => ({
3923
3927
  let t = n?.dataset.side === "right" ? "translateX(100%)" : "translateX(-100%)";
3924
3928
  return e === "enter" ? { transform: [t, "translateX(0)"] } : { transform: ["translateX(0)", t] };
3925
3929
  }
3930
+ if (t === "sheet") {
3931
+ let t = n?.dataset.side, r = t === "right" ? "inset(0 0 0 100%)" : t === "left" ? "inset(0 100% 0 0)" : t === "bottom" ? "inset(100% 0 0 0)" : "inset(0 0 100% 0)";
3932
+ return e === "enter" ? { clipPath: [r, "inset(0 0 0 0)"] } : { clipPath: ["inset(0 0 0 0)", r] };
3933
+ }
3926
3934
  if (t === "toast") {
3927
3935
  let t = n?.style, r = Number.parseFloat(t?.getPropertyValue("--ui-toast-stack-offset") || "0") || 0, i = Number.parseFloat(t?.getPropertyValue("--ui-toast-stack-scale") || "1") || 1, a = Number.parseFloat(t?.getPropertyValue("--ui-toast-stack-direction") || "1") || 1, o = Number.parseFloat(t?.getPropertyValue("--ui-toast-stack-opacity") || "1") || 1, s = (e, t) => `translateY(${r + e * a}px) scale(${i * t})`;
3928
3936
  return e === "enter" ? {
@@ -6996,39 +7004,45 @@ var yf = 60, bf = 1, xf = 8, Sf = 24, Cf = "[x-ui-resizable\\:handle], [data-ui-
6996
7004
  window.localStorage.setItem(Sp(), e);
6997
7005
  } catch {}
6998
7006
  }, Ep = () => window.matchMedia("(prefers-color-scheme: dark)").matches, Dp = (e) => e === "dark" || e === "system" && Ep(), Op = (e) => {
6999
- let t = Dp(e), n = document.documentElement;
7000
- return n.classList.toggle("dark", t), n.dataset.theme = e, n.dispatchEvent(new CustomEvent("ui:theme-change", {
7007
+ let t = Dp(e), n = t ? "dark" : "light", r = document.documentElement;
7008
+ return r.classList.toggle("dark", t), r.dataset.theme = e, r.dataset.resolvedTheme = n, r.dispatchEvent(new CustomEvent("ui:theme-change", {
7001
7009
  detail: {
7002
7010
  mode: e,
7011
+ resolved: n,
7012
+ dark: t,
7003
7013
  on: t
7004
7014
  },
7005
7015
  bubbles: !0
7006
7016
  })), {
7007
7017
  mode: e,
7018
+ resolved: n,
7019
+ dark: t,
7008
7020
  on: t
7009
7021
  };
7010
7022
  }, kp = () => {
7011
7023
  let e = Op(wp());
7012
7024
  return {
7013
7025
  mode: e.mode,
7026
+ resolved: e.resolved,
7027
+ dark: e.dark,
7014
7028
  on: e.on,
7015
7029
  set(e) {
7016
7030
  let t = xp(e);
7017
7031
  Tp(t);
7018
7032
  let n = Op(t);
7019
- this.mode = n.mode, this.on = n.on;
7033
+ this.mode = n.mode, this.resolved = n.resolved, this.dark = n.dark, this.on = n.on;
7020
7034
  },
7021
7035
  toggle() {
7022
- this.set(this.on ? "light" : "dark");
7036
+ this.set(this.dark ? "light" : "dark");
7023
7037
  }
7024
7038
  };
7025
7039
  }, Ap = (e) => {
7026
7040
  if (typeof e.store != "function") return;
7027
- let t = e.store("darkMode") ?? kp();
7028
- e.store("darkMode", t), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
7041
+ let t = e.store("theme") ?? kp();
7042
+ e.store("theme", t), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
7029
7043
  if (t.mode !== "system") return;
7030
7044
  let e = Op("system");
7031
- t.mode = e.mode, t.on = e.on;
7045
+ t.mode = e.mode, t.resolved = e.resolved, t.dark = e.dark, t.on = e.on;
7032
7046
  });
7033
7047
  }, jp = 0, Mp = null, Np = () => {
7034
7048
  if (jp === 0) {
@@ -7065,7 +7079,7 @@ var yf = 60, bf = 1, xf = 8, Sf = 24, Cf = "[x-ui-resizable\\:handle], [data-ui-
7065
7079
  parseItemData: Iu,
7066
7080
  splitControlValues: Fu,
7067
7081
  createResizable: If,
7068
- props: nu,
7082
+ mergeBindings: nu,
7069
7083
  propsFromSchema: Bf,
7070
7084
  resolveStyle: X,
7071
7085
  className: Il,
@@ -7078,7 +7092,7 @@ var yf = 60, bf = 1, xf = 8, Sf = 24, Cf = "[x-ui-resizable\\:handle], [data-ui-
7078
7092
  connectStream: _p,
7079
7093
  dispatchStreamEvent: np,
7080
7094
  applyThemeMode: Op,
7081
- createDarkModeStore: kp,
7095
+ createThemeStore: kp,
7082
7096
  lockDocumentScroll: Np,
7083
7097
  registerConfirm: Jl,
7084
7098
  registerResizable: Lf,
@@ -7130,60 +7144,122 @@ var yf = 60, bf = 1, xf = 8, Sf = 24, Cf = "[x-ui-resizable\\:handle], [data-ui-
7130
7144
  "h4",
7131
7145
  "h5",
7132
7146
  "h6"
7133
- ], Kp = [
7134
- "flex w-full min-w-0 items-center gap-control rounded-control border text-control-fg outline-none",
7135
- "focus-within:border-control-border-focus",
7136
- "data-disabled:cursor-not-allowed data-disabled:opacity-50",
7137
- "data-invalid:border-control-border-invalid data-invalid:focus-within:border-control-border-invalid-focus"
7138
- ], qp = [
7139
- "data-[state=open]:border-control-border-focus",
7140
- "data-invalid:data-[state=open]:border-control-border-invalid-focus",
7141
- "data-invalid:focus-within:shadow-danger-focus data-invalid:data-[state=open]:shadow-danger-focus"
7142
- ], Jp = {
7147
+ ], Kp = {
7148
+ inherit: "text-inherit",
7149
+ muted: "text-foreground-muted",
7150
+ subtle: "text-foreground-subtle",
7151
+ accent: "text-accent-text",
7152
+ danger: "text-danger-text"
7153
+ };
7154
+ Kp.muted, Kp.subtle, Kp.accent, Kp.danger;
7155
+ var qp = [
7156
+ "none",
7157
+ "xs",
7158
+ "sm",
7159
+ "md",
7160
+ "lg",
7161
+ "full"
7162
+ ], Jp = ["solid", "alpha"], Yp = {
7163
+ none: "bg-transparent text-inherit",
7164
+ app: "bg-app text-foreground",
7165
+ chrome: "bg-chrome text-foreground",
7166
+ subtle: "bg-surface-subtle text-foreground",
7167
+ panel: "bg-surface-panel text-foreground",
7168
+ raised: "bg-surface-raised text-foreground",
7169
+ overlay: "bg-surface-overlay text-foreground",
7170
+ accent: "bg-surface-accent text-surface-accent-fg",
7171
+ inverse: "bg-surface-inverse text-surface-inverse-fg"
7172
+ }, Xp = {
7173
+ solid: "",
7174
+ alpha: ""
7175
+ }, Zp = {
7176
+ xs: {
7177
+ none: "",
7178
+ xs: "rounded-1",
7179
+ sm: "rounded-1",
7180
+ md: "rounded-2",
7181
+ lg: "rounded-3",
7182
+ full: "rounded-full"
7183
+ },
7184
+ sm: {
7185
+ none: "",
7186
+ xs: "rounded-1",
7187
+ sm: "rounded-2",
7188
+ md: "rounded-2",
7189
+ lg: "rounded-3",
7190
+ full: "rounded-full"
7191
+ },
7192
+ md: {
7193
+ none: "",
7194
+ xs: "rounded-1",
7195
+ sm: "rounded-2",
7196
+ md: "rounded-3",
7197
+ lg: "rounded-4",
7198
+ full: "rounded-full"
7199
+ },
7200
+ lg: {
7201
+ none: "",
7202
+ xs: "rounded-2",
7203
+ sm: "rounded-3",
7204
+ md: "rounded-4",
7205
+ lg: "rounded-5",
7206
+ full: "rounded-full"
7207
+ },
7208
+ xlg: {
7209
+ none: "",
7210
+ xs: "rounded-2",
7211
+ sm: "rounded-3",
7212
+ md: "rounded-4",
7213
+ lg: "rounded-5",
7214
+ full: "rounded-full"
7215
+ }
7216
+ }, Qp = ((e) => Fp.flatMap((t) => qp.map((n) => ({
7217
+ when: {
7218
+ size: t,
7219
+ radius: n
7220
+ },
7221
+ class: e[t][n]
7222
+ }))))(Zp), $p = ["flex w-full min-w-0 items-center gap-control text-control-fg outline-none", "data-disabled:cursor-not-allowed data-disabled:opacity-50"], em = ["data-invalid:focus-within:shadow-danger-focus data-invalid:data-[state=open]:shadow-danger-focus"], tm = {
7143
7223
  xs: "min-h-control-xs px-1.5 text-xs",
7144
7224
  sm: "min-h-control-sm px-2 text-xs",
7145
7225
  md: "min-h-control-md px-3 text-sm",
7146
7226
  lg: "min-h-control-lg px-3 text-sm",
7147
7227
  xlg: "min-h-control-xlg px-4 text-sm"
7148
- }, Yp = {
7149
- outline: "border-control-border bg-control shadow-control",
7150
- filled: "border-transparent bg-control-hover shadow-none hover:bg-control-active"
7151
- }, Xp = ["border-0 bg-transparent p-0 text-inherit text-control-fg outline-none", "placeholder:text-control-placeholder disabled:cursor-not-allowed"], Zp = [
7228
+ }, nm = {
7229
+ outline: "bg-control shadow-control",
7230
+ filled: "bg-control-hover shadow-none hover:bg-control-active"
7231
+ }, rm = ["border-0 bg-transparent p-0 text-inherit text-control-fg outline-none", "placeholder:text-control-placeholder disabled:cursor-not-allowed"], im = [
7152
7232
  "inline-flex size-control-xs shrink-0 items-center justify-center rounded-2 border-0 bg-transparent",
7153
7233
  "text-icon outline-none hover:bg-control-hover hover:text-control-fg",
7154
7234
  "focus-visible:ring-2 focus-visible:ring-focus"
7155
- ], Qp = [
7156
- "min-h-control-lg w-full rounded-control border border-control-border bg-control px-3 text-sm text-control-fg shadow-control outline-none",
7157
- "focus:border-control-border-focus disabled:cursor-not-allowed disabled:opacity-50",
7158
- "aria-[invalid=true]:border-control-border-invalid aria-[invalid=true]:focus:border-control-border-invalid-focus aria-[invalid=true]:focus:shadow-danger-focus"
7159
- ], $p = ["absolute left-0 top-0 z-popover m-0 grid", "rounded-3 bg-popover text-popover-fg shadow-popover outline-none"], em = [
7235
+ ], am = ["w-full bg-control text-control-fg shadow-control outline-none", "disabled:cursor-not-allowed disabled:opacity-50"], om = ["absolute left-0 top-0 z-popover m-0 grid", "rounded-3 bg-popover text-popover-fg shadow-popover outline-none"], sm = [
7160
7236
  "ui-interactive:hover:bg-interactive-hover",
7161
7237
  "ui-interactive:ui-active:bg-interactive-active",
7162
7238
  "ui-interactive:ui-selected:bg-interactive-selected",
7163
7239
  "ui-interactive:ui-selected:hover:bg-interactive-selected-hover"
7164
7240
  ];
7165
- [...em];
7166
- var tm = [
7241
+ [...sm];
7242
+ var cm = [
7167
7243
  "flex h-menu-item w-full cursor-default select-none items-center gap-2 rounded-2 px-menu-item-x",
7168
7244
  "text-left text-sm font-normal text-menu-item-fg outline-none",
7169
- em,
7245
+ sm,
7170
7246
  "data-disabled:pointer-events-none data-disabled:opacity-50"
7171
- ], nm = "size-icon shrink-0 fill-current text-current opacity-70", rm = "ml-auto size-icon shrink-0 fill-current text-current opacity-0 data-selected:opacity-100", im = ["single", "multiple"], am = Hp, om = ["trailing", "leading"];
7172
- [...om];
7173
- var sm = Gp;
7174
- [...sm];
7175
- var cm = {
7176
- mode: J(im, "single"),
7247
+ ], lm = "size-icon shrink-0 fill-current text-current opacity-70", um = "ml-auto size-icon shrink-0 fill-current text-current opacity-0 data-selected:opacity-100", dm = ["single", "multiple"], fm = Hp, pm = ["trailing", "leading"];
7248
+ [...pm];
7249
+ var mm = Gp;
7250
+ [...mm];
7251
+ var hm = {
7252
+ mode: J(dm, "single"),
7177
7253
  collapsible: q,
7178
7254
  disabled: q,
7179
- orientation: J(am, "vertical"),
7255
+ orientation: J(fm, "vertical"),
7180
7256
  defaultValue: G,
7181
7257
  defaultValues: G,
7182
7258
  loop: q.default(!0),
7183
- iconPosition: J(om, "trailing"),
7184
- headingAs: J(sm, "h3"),
7259
+ iconPosition: J(pm, "trailing"),
7260
+ headingAs: J(mm, "h3"),
7185
7261
  class: G
7186
- }, lm = Y({ definition: {
7262
+ }, gm = Y({ definition: {
7187
7263
  component: "ui.accordion",
7188
7264
  parts: {
7189
7265
  root: {
@@ -7207,7 +7283,7 @@ var cm = {
7207
7283
  content: { base: "overflow-hidden text-sm text-foreground-muted" },
7208
7284
  contentInner: { base: "min-w-0 px-3 pb-3 pt-1" }
7209
7285
  }
7210
- } }), um = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), dm = (e) => e ? "open" : "closed", fm = (e) => e instanceof HTMLButtonElement, pm = () => ({
7286
+ } }), _m = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), vm = (e) => e ? "open" : "closed", ym = (e) => e instanceof HTMLButtonElement, bm = () => ({
7211
7287
  props: null,
7212
7288
  openValues: /* @__PURE__ */ new Set(),
7213
7289
  collection: null,
@@ -7215,15 +7291,15 @@ var cm = {
7215
7291
  init() {
7216
7292
  this.props = W({
7217
7293
  el: this.$el,
7218
- schema: cm
7294
+ schema: hm
7219
7295
  }), this.openValues = new Set(this.initialValues()), this.setupTriggers(), this.syncAll();
7220
7296
  },
7221
7297
  destroy() {
7222
7298
  this.props.disconnect(), this.teardown();
7223
7299
  },
7224
7300
  get root() {
7225
- return Q.props({ inputs: [Q.resolveStyle({
7226
- part: lm.parts.root,
7301
+ return Q.mergeBindings({ inputs: [Q.resolveStyle({
7302
+ part: gm.parts.root,
7227
7303
  props: this.props,
7228
7304
  className: this.props.class
7229
7305
  }), {
@@ -7235,7 +7311,7 @@ var cm = {
7235
7311
  items() {
7236
7312
  return Array.from(this.$el.querySelectorAll("[data-ui-accordion-item]")).map((e, t) => {
7237
7313
  let n = e.querySelector("[data-ui-accordion-trigger]"), r = e.querySelector("[data-ui-accordion-content]");
7238
- return !fm(n) || !r ? null : (e.dataset.value || (e.dataset.value = `item-${t + 1}`), {
7314
+ return !ym(n) || !r ? null : (e.dataset.value || (e.dataset.value = `item-${t + 1}`), {
7239
7315
  item: e,
7240
7316
  heading: e.querySelector("[data-ui-accordion-heading]"),
7241
7317
  trigger: n,
@@ -7249,7 +7325,7 @@ var cm = {
7249
7325
  return this.items().find((t) => t.trigger === e) ?? null;
7250
7326
  },
7251
7327
  initialValues() {
7252
- return this.props.mode === "multiple" && this.props.defaultValues ? this.normalizeValues(um(this.props.defaultValues)) : this.props.mode === "single" && this.props.defaultValue ? this.normalizeValues([this.props.defaultValue]) : this.normalizeValues(this.items().filter((e) => Q.asBool({ value: e.item.dataset.open }) || e.item.dataset.state === "open").map((e) => e.value));
7328
+ return this.props.mode === "multiple" && this.props.defaultValues ? this.normalizeValues(_m(this.props.defaultValues)) : this.props.mode === "single" && this.props.defaultValue ? this.normalizeValues([this.props.defaultValue]) : this.normalizeValues(this.items().filter((e) => Q.asBool({ value: e.item.dataset.open }) || e.item.dataset.state === "open").map((e) => e.value));
7253
7329
  },
7254
7330
  normalizeValues(e) {
7255
7331
  let t = Array.from(new Set(e.filter(Boolean)));
@@ -7283,13 +7359,13 @@ var cm = {
7283
7359
  this.$el.dataset.orientation = this.props.orientation, this.$el.dataset.iconPosition = this.props.iconPosition, this.$el.dataset.mode = this.props.mode, this.props.disabled ? this.$el.setAttribute("data-disabled", "") : this.$el.removeAttribute("data-disabled");
7284
7360
  },
7285
7361
  syncItem(e) {
7286
- let t = this.isItemOpen(e), n = dm(t), r = this.isItemDisabled(e), i = t && !this.canCollapseOpenItem(e);
7362
+ let t = this.isItemOpen(e), n = vm(t), r = this.isItemDisabled(e), i = t && !this.canCollapseOpenItem(e);
7287
7363
  if (e.item.dataset.state = n, e.item.dataset.orientation = this.props.orientation, e.item.className = Q.resolveStyle({
7288
- part: lm.parts.item,
7364
+ part: gm.parts.item,
7289
7365
  props: this.props,
7290
7366
  className: e.item.dataset.class ?? ""
7291
7367
  }), e.heading?.setAttribute("data-state", n), e.heading?.setAttribute("data-orientation", this.props.orientation), e.trigger.id ||= this.$id(`accordion-trigger-${e.value}`), e.content.id ||= this.$id(`accordion-content-${e.value}`), e.trigger.type = "button", e.trigger.dataset.state = n, e.trigger.dataset.orientation = this.props.orientation, e.trigger.className = Q.resolveStyle({
7292
- part: lm.parts.trigger,
7368
+ part: gm.parts.trigger,
7293
7369
  props: this.props,
7294
7370
  className: e.trigger.dataset.class ?? ""
7295
7371
  }), e.trigger.setAttribute("aria-expanded", t ? "true" : "false"), e.trigger.setAttribute("aria-controls", e.content.id), e.content.dataset.state = n, e.content.dataset.orientation = this.props.orientation, e.content.setAttribute("aria-labelledby", e.trigger.id), this.syncContent(e.content, t), r) {
@@ -7387,14 +7463,14 @@ var cm = {
7387
7463
  detail: t
7388
7464
  });
7389
7465
  }
7390
- }), mm = (e) => {
7391
- e.data("UiAccordion", () => pm());
7466
+ }), xm = (e) => {
7467
+ e.data("UiAccordion", () => bm());
7392
7468
  };
7393
7469
  Y({ definition: {
7394
7470
  component: "ui.button",
7395
7471
  parts: {
7396
7472
  root: {
7397
- base: ["relative inline-flex min-w-0 shrink-0 select-none items-center gap-2 whitespace-nowrap rounded-3 font-normal outline-none", "focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app"],
7473
+ base: ["relative inline-flex min-w-0 shrink-0 select-none items-center gap-2 whitespace-nowrap font-normal outline-none", "focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app"],
7398
7474
  variants: {
7399
7475
  align: {
7400
7476
  start: "justify-start",
@@ -7413,18 +7489,16 @@ Y({ definition: {
7413
7489
  false: ""
7414
7490
  },
7415
7491
  variant: {
7416
- default: "bg-surface text-foreground shadow-border hover:shadow-border-hover",
7417
- outline: "bg-surface text-foreground shadow-border hover:shadow-border-hover",
7418
- subtle: "bg-base-a2 text-foreground shadow-none",
7419
- filled: "shadow-none",
7420
- ghost: "bg-transparent text-foreground shadow-none",
7492
+ ghost: "bg-transparent shadow-none",
7493
+ soft: "shadow-none",
7494
+ surface: "shadow-border hover:shadow-border-hover",
7495
+ outline: "bg-transparent shadow-none ring-1 ring-inset",
7496
+ solid: "shadow-none",
7421
7497
  link: "bg-transparent px-0 shadow-none"
7422
7498
  },
7423
7499
  color: {
7424
7500
  neutral: "",
7425
7501
  accent: "",
7426
- success: "",
7427
- warning: "",
7428
7502
  danger: ""
7429
7503
  },
7430
7504
  insetLeft: {
@@ -7515,6 +7589,7 @@ Y({ definition: {
7515
7589
  },
7516
7590
  class: "w-control-xlg px-0"
7517
7591
  },
7592
+ ...Qp,
7518
7593
  {
7519
7594
  when: {
7520
7595
  insetLeft: !0,
@@ -7587,24 +7662,108 @@ Y({ definition: {
7587
7662
  },
7588
7663
  {
7589
7664
  when: {
7590
- variant: "filled",
7665
+ variant: "ghost",
7666
+ color: "neutral"
7667
+ },
7668
+ class: "text-foreground"
7669
+ },
7670
+ {
7671
+ when: {
7672
+ variant: "ghost",
7591
7673
  color: "accent"
7592
7674
  },
7593
- class: "bg-accent-solid text-accent-contrast shadow-1"
7675
+ class: "text-accent-text"
7594
7676
  },
7595
7677
  {
7596
7678
  when: {
7597
- variant: "filled",
7679
+ variant: "ghost",
7598
7680
  color: "danger"
7599
7681
  },
7600
- class: "bg-danger-solid text-danger-contrast shadow-1"
7682
+ class: "text-danger-text"
7601
7683
  },
7602
7684
  {
7603
7685
  when: {
7604
- variant: "filled",
7686
+ variant: "soft",
7605
7687
  color: "neutral"
7606
7688
  },
7607
- class: "bg-base-a3 text-foreground"
7689
+ class: "bg-base-a2 text-foreground"
7690
+ },
7691
+ {
7692
+ when: {
7693
+ variant: "soft",
7694
+ color: "accent"
7695
+ },
7696
+ class: "bg-accent-surface text-accent-text"
7697
+ },
7698
+ {
7699
+ when: {
7700
+ variant: "soft",
7701
+ color: "danger"
7702
+ },
7703
+ class: "bg-danger-surface text-danger-text"
7704
+ },
7705
+ {
7706
+ when: {
7707
+ variant: "surface",
7708
+ color: "neutral"
7709
+ },
7710
+ class: "bg-control text-foreground"
7711
+ },
7712
+ {
7713
+ when: {
7714
+ variant: "surface",
7715
+ color: "accent"
7716
+ },
7717
+ class: "bg-control text-accent-text"
7718
+ },
7719
+ {
7720
+ when: {
7721
+ variant: "surface",
7722
+ color: "danger"
7723
+ },
7724
+ class: "bg-control text-danger-text"
7725
+ },
7726
+ {
7727
+ when: {
7728
+ variant: "outline",
7729
+ color: "neutral"
7730
+ },
7731
+ class: "text-foreground ring-border-interactive"
7732
+ },
7733
+ {
7734
+ when: {
7735
+ variant: "outline",
7736
+ color: "accent"
7737
+ },
7738
+ class: "text-accent-text ring-accent-border"
7739
+ },
7740
+ {
7741
+ when: {
7742
+ variant: "outline",
7743
+ color: "danger"
7744
+ },
7745
+ class: "text-danger-text ring-danger-border"
7746
+ },
7747
+ {
7748
+ when: {
7749
+ variant: "solid",
7750
+ color: "neutral"
7751
+ },
7752
+ class: "bg-base-12 text-base-1 shadow-1"
7753
+ },
7754
+ {
7755
+ when: {
7756
+ variant: "solid",
7757
+ color: "accent"
7758
+ },
7759
+ class: "bg-accent-solid text-accent-contrast shadow-1"
7760
+ },
7761
+ {
7762
+ when: {
7763
+ variant: "solid",
7764
+ color: "danger"
7765
+ },
7766
+ class: "bg-danger-solid text-danger-contrast shadow-1"
7608
7767
  },
7609
7768
  {
7610
7769
  when: {
@@ -7625,14 +7784,15 @@ Y({ definition: {
7625
7784
  variant: "link",
7626
7785
  color: "danger"
7627
7786
  },
7628
- class: "text-danger-text hover:text-danger-contrast"
7787
+ class: "text-danger-text hover:text-danger-12"
7629
7788
  }
7630
7789
  ],
7631
7790
  defaults: {
7632
7791
  align: "center",
7633
7792
  size: "md",
7793
+ radius: "md",
7634
7794
  padded: !0,
7635
- variant: "default",
7795
+ variant: "surface",
7636
7796
  color: "neutral",
7637
7797
  insetLeft: !1,
7638
7798
  insetRight: !1,
@@ -7664,8 +7824,7 @@ Y({ definition: {
7664
7824
  } });
7665
7825
  //#endregion
7666
7826
  //#region src/components/button/index.ts
7667
- var hm = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", gm = [
7668
- "hx-",
7827
+ var Sm = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", Cm = [
7669
7828
  "data-on",
7670
7829
  "data-bind",
7671
7830
  "data-ref",
@@ -7674,47 +7833,37 @@ var hm = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", gm = [
7674
7833
  "data-request",
7675
7834
  "data-ui-request",
7676
7835
  "wire:"
7677
- ], _m = [
7678
- "ui:request-complete",
7679
- "ui:loading-complete",
7680
- "htmx:afterRequest",
7681
- "htmx:sendError",
7682
- "htmx:responseError",
7683
- "htmx:timeout",
7684
- "htmx:abort",
7685
- "datastar:afterRequest",
7686
- "datastar:responseError"
7687
- ], vm = null, ym = (e) => e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement, bm = (e) => {
7836
+ ], wm = ["ui:request-complete", "ui:loading-complete"], Tm = null, Em = (e) => e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement, Dm = (e) => {
7688
7837
  if (!(e instanceof Element)) return null;
7689
- let t = e.closest(hm);
7690
- return ym(t) ? t : null;
7691
- }, xm = (e) => e.getAttributeNames().some((e) => gm.some((t) => e.startsWith(t))), Sm = (e) => e instanceof HTMLButtonElement && e.type === "submit", Cm = (e) => e.dataset.uiLoadingMode === "true" || Sm(e) || xm(e), wm = (e) => e.dataset.uiSubmitting === "true" || e.getAttribute("aria-disabled") === "true" || e.hasAttribute("disabled"), Tm = (e) => {
7838
+ let t = e.closest(Sm);
7839
+ return Em(t) ? t : null;
7840
+ }, Om = (e) => e.getAttributeNames().some((e) => Cm.some((t) => e.startsWith(t))), km = (e) => e instanceof HTMLButtonElement && e.type === "submit", Am = (e) => e instanceof HTMLButtonElement && (e.dataset.uiConfirm !== void 0 || e.form?.dataset.uiConfirm !== void 0), jm = (e, t) => t?.dataset.uiConfirm !== void 0 || e?.dataset.uiConfirm !== void 0, Mm = (e) => e.dataset.uiLoadingMode === "true" || km(e) || Om(e), Nm = (e) => e.dataset.uiSubmitting === "true" || e.getAttribute("aria-disabled") === "true" || e.hasAttribute("disabled"), Pm = (e) => e.dataset.uiSubmitting === "true" || e.hasAttribute("disabled"), Fm = (e) => {
7692
7841
  e.dataset.uiSubmitting = "true", e.setAttribute("data-ui-loading", ""), e.setAttribute("aria-disabled", "true"), e.setAttribute("aria-busy", "true"), e.dispatchEvent(new CustomEvent("ui:loading-start", { bubbles: !0 })), e instanceof HTMLButtonElement ? e.disabled = !0 : e.tabIndex = -1;
7693
- }, Em = (e) => {
7842
+ }, Im = (e) => {
7694
7843
  e.dataset.initialLoading !== "true" && (delete e.dataset.uiSubmitting, e.removeAttribute("data-ui-loading"), e.removeAttribute("aria-busy"), e.dataset.initialDisabled !== "true" && (e.removeAttribute("aria-disabled"), e instanceof HTMLButtonElement ? e.disabled = !1 : e.removeAttribute("tabindex"), e.dispatchEvent(new CustomEvent("ui:loading-end", { bubbles: !0 }))));
7695
- }, Dm = (e, t) => {
7844
+ }, Lm = (e, t) => {
7696
7845
  window.setTimeout(() => {
7697
- !e.isConnected || wm(e) || Tm(e);
7846
+ !e.isConnected || Pm(e) || Fm(e);
7698
7847
  }, 0);
7699
- }, Om = (e) => {
7700
- let t = bm(e.target);
7701
- if (!(!t || !Cm(t))) {
7702
- if (wm(t)) {
7848
+ }, Rm = (e) => {
7849
+ let t = Dm(e.target);
7850
+ if (!(!t || !Mm(t))) {
7851
+ if (Nm(t)) {
7703
7852
  e.preventDefault(), e.stopImmediatePropagation();
7704
7853
  return;
7705
7854
  }
7706
- t instanceof HTMLButtonElement && t.form && !t.form.checkValidity() || Dm(t, e);
7855
+ t instanceof HTMLButtonElement && t.form && !t.form.checkValidity() || Am(t) || Lm(t, e);
7707
7856
  }
7708
- }, km = (e) => {
7709
- let t = e, n = ym(t.submitter) ? t.submitter : null, r = e.target instanceof HTMLFormElement ? e.target : null, i = n?.matches(hm) ? n : r?.querySelector(hm) ?? null;
7710
- !i || !Sm(i) || Dm(i, e);
7711
- }, Am = () => {
7712
- document.querySelectorAll("[data-ui-button][data-ui-submitting=\"true\"]").forEach((e) => Em(e));
7713
- }, jm = () => {
7714
- vm ||= (document.addEventListener("click", Om, !0), document.addEventListener("submit", km), _m.forEach((e) => document.addEventListener(e, Am)), () => {
7715
- document.removeEventListener("click", Om, !0), document.removeEventListener("submit", km), _m.forEach((e) => document.removeEventListener(e, Am)), vm = null;
7857
+ }, zm = (e) => {
7858
+ let t = e, n = t.submitter instanceof HTMLElement ? t.submitter : null, r = Em(n) ? n : null, i = e.target instanceof HTMLFormElement ? e.target : null, a = r ? r.matches(Sm) ? r : null : i?.querySelector(Sm) ?? null;
7859
+ e.defaultPrevented && jm(i, n) || !a || !km(a) || Lm(a, e);
7860
+ }, Bm = () => {
7861
+ document.querySelectorAll("[data-ui-button][data-ui-submitting=\"true\"]").forEach((e) => Im(e));
7862
+ }, Vm = () => {
7863
+ Tm ||= (document.addEventListener("click", Rm, !0), document.addEventListener("submit", zm, !0), wm.forEach((e) => document.addEventListener(e, Bm)), () => {
7864
+ document.removeEventListener("click", Rm, !0), document.removeEventListener("submit", zm, !0), wm.forEach((e) => document.removeEventListener(e, Bm)), Tm = null;
7716
7865
  });
7717
- }, Mm = Hp, Nm = Wp, Pm = Up, Fm = Fp, Im = Wp, Lm = {
7866
+ }, Hm = Hp, Um = Wp, Wm = Up, Gm = Fp, Km = Wp, qm = {
7718
7867
  value: G.default("on"),
7719
7868
  name: G,
7720
7869
  label: G,
@@ -7725,10 +7874,10 @@ var hm = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", gm = [
7725
7874
  required: q,
7726
7875
  invalid: q,
7727
7876
  indicator: q.default(!0),
7728
- placement: J(Pm, "leading"),
7877
+ placement: J(Wm, "leading"),
7729
7878
  icon: G,
7730
- variant: J(Im, "default"),
7731
- size: J(Fm, "md"),
7879
+ variant: J(Km, "default"),
7880
+ size: J(Gm, "md"),
7732
7881
  inputClass: G,
7733
7882
  indicatorClass: G,
7734
7883
  indicatorIconClass: G,
@@ -7738,22 +7887,22 @@ var hm = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", gm = [
7738
7887
  descriptionClass: G,
7739
7888
  class: G
7740
7889
  };
7741
- ({ ...Lm });
7742
- var Rm = {
7890
+ ({ ...qm });
7891
+ var Jm = {
7743
7892
  name: G,
7744
- orientation: J(Mm, "vertical"),
7745
- variant: J(Nm, "default"),
7893
+ orientation: J(Hm, "vertical"),
7894
+ variant: J(Um, "default"),
7746
7895
  indicator: q.default(!0),
7747
- placement: J(Pm, "leading"),
7896
+ placement: J(Wm, "leading"),
7748
7897
  disabled: q,
7749
7898
  required: q,
7750
7899
  invalid: q,
7751
7900
  class: G
7752
7901
  };
7753
- J(Fm, "md");
7902
+ J(Gm, "md");
7754
7903
  //#endregion
7755
7904
  //#region src/components/checkbox/index.ts
7756
- var zm = (e) => {
7905
+ var Ym = (e) => {
7757
7906
  let t = e.querySelector("[data-ui-checkbox-input]");
7758
7907
  return t ? {
7759
7908
  root: e,
@@ -7766,7 +7915,7 @@ var zm = (e) => {
7766
7915
  required: e.hasAttribute("data-required") || t.required,
7767
7916
  invalid: e.hasAttribute("data-invalid") || t.getAttribute("aria-invalid") === "true"
7768
7917
  } : null;
7769
- }, Bm = (e, t = {}) => {
7918
+ }, Xm = (e, t = {}) => {
7770
7919
  let n = t.disabled ?? e.disabled, r = t.required ?? e.required, i = t.invalid ?? e.invalid, a = e.input.indeterminate || e.root.hasAttribute("data-indeterminate"), o = e.input.checked && !a, s = a ? "indeterminate" : o ? "checked" : "unchecked";
7771
7920
  e.input.indeterminate = a, Q.syncNativeControl({
7772
7921
  input: e.input,
@@ -7833,13 +7982,13 @@ var zm = (e) => {
7833
7982
  el: e.indeterminateIcon,
7834
7983
  attr: "data-checked"
7835
7984
  }));
7836
- }, Vm = () => ({
7985
+ }, Zm = () => ({
7837
7986
  props: null,
7838
7987
  listeners: [],
7839
7988
  init() {
7840
7989
  this.props = W({
7841
7990
  el: this.$el,
7842
- schema: Lm
7991
+ schema: qm
7843
7992
  });
7844
7993
  let e = this.input();
7845
7994
  (this.props.indeterminate || this.$el.hasAttribute("data-indeterminate")) && (e.indeterminate = !0), Q.addListener({
@@ -7860,26 +8009,26 @@ var zm = (e) => {
7860
8009
  return e;
7861
8010
  },
7862
8011
  item() {
7863
- let e = zm(this.$el);
8012
+ let e = Ym(this.$el);
7864
8013
  if (!e) throw Error("Checkbox requires a native checkbox input.");
7865
8014
  return e;
7866
8015
  },
7867
8016
  sync() {
7868
8017
  let e = this.item();
7869
- this.props.name && (e.input.name = this.props.name), this.props.value && (e.input.value = this.props.value), Bm(e, {
8018
+ this.props.name && (e.input.name = this.props.name), this.props.value && (e.input.value = this.props.value), Xm(e, {
7870
8019
  disabled: this.props.disabled || e.disabled,
7871
8020
  required: this.props.required || e.required,
7872
8021
  invalid: this.props.invalid || e.invalid
7873
8022
  });
7874
8023
  }
7875
- }), Hm = () => ({
8024
+ }), Qm = () => ({
7876
8025
  props: null,
7877
8026
  listeners: [],
7878
8027
  observer: null,
7879
8028
  init() {
7880
8029
  this.props = W({
7881
8030
  el: this.$el,
7882
- schema: Rm
8031
+ schema: Jm
7883
8032
  }), Q.addListener({
7884
8033
  target: this.$el,
7885
8034
  event: "change",
@@ -7897,7 +8046,7 @@ var zm = (e) => {
7897
8046
  this.props.disconnect(), this.listeners.forEach((e) => e()), this.listeners = [], this.observer?.disconnect();
7898
8047
  },
7899
8048
  items() {
7900
- return Array.from(this.$el.querySelectorAll("[data-ui-checkbox]")).map(zm).filter((e) => e !== null);
8049
+ return Array.from(this.$el.querySelectorAll("[data-ui-checkbox]")).map(Ym).filter((e) => e !== null);
7901
8050
  },
7902
8051
  sync() {
7903
8052
  let e = this.$el;
@@ -7915,15 +8064,15 @@ var zm = (e) => {
7915
8064
  }), this.items().forEach((e) => this.syncItem(e));
7916
8065
  },
7917
8066
  syncItem(e) {
7918
- this.props.name && !e.name && (e.input.name = this.props.name), Bm(e, {
8067
+ this.props.name && !e.name && (e.input.name = this.props.name), Xm(e, {
7919
8068
  disabled: this.props.disabled || e.disabled,
7920
8069
  required: this.props.required || e.required,
7921
8070
  invalid: this.props.invalid || e.invalid
7922
8071
  });
7923
8072
  }
7924
- }), Um = (e) => {
7925
- e.data("UiCheckbox", () => Vm()), e.data("UiCheckboxGroup", () => Hm());
7926
- }, Wm = Fp, Gm = Ip, Km = Bp, qm = zp, Jm = Lp, Ym = {
8073
+ }), $m = (e) => {
8074
+ e.data("UiCheckbox", () => Zm()), e.data("UiCheckboxGroup", () => Qm());
8075
+ }, eh = Fp, th = Ip, nh = qp, rh = Bp, ih = zp, ah = Lp, oh = {
7927
8076
  name: G,
7928
8077
  value: G,
7929
8078
  values: G,
@@ -7939,47 +8088,50 @@ var zm = (e) => {
7939
8088
  filter: q.default(!0),
7940
8089
  path: G,
7941
8090
  loop: q.default(!0),
7942
- size: J(Wm, "lg"),
7943
- variant: J(Gm, "outline"),
7944
- side: J(Km, "bottom"),
7945
- align: J(qm, "start"),
8091
+ size: J(eh, "lg"),
8092
+ variant: J(th, "outline"),
8093
+ radius: J(nh, "md"),
8094
+ side: J(rh, "bottom"),
8095
+ align: J(ih, "start"),
7946
8096
  offset: K.clamp(-100, 100).default(0),
7947
8097
  gap: K.clamp(0, 50).default(4),
7948
8098
  icon: G,
7949
8099
  iconTrailing: G.default("chevron__down"),
7950
- iconVariant: J(Jm, "outline"),
8100
+ iconVariant: J(ah, "outline"),
7951
8101
  inputClass: G,
7952
8102
  listboxClass: G,
7953
8103
  chipClass: G,
7954
8104
  class: G
7955
8105
  };
7956
- J(Jm, "outline");
8106
+ J(ah, "outline");
7957
8107
  //#endregion
7958
8108
  //#region src/components/combobox/styles.ts
7959
- var Xm = Y({ definition: {
8109
+ var sh = Y({ definition: {
7960
8110
  component: "ui.combobox",
7961
8111
  parts: {
7962
8112
  root: { base: "relative inline-grid w-full min-w-0" },
7963
8113
  control: {
7964
- base: Kp,
8114
+ base: $p,
7965
8115
  variants: {
7966
- size: Jp,
7967
- variant: Yp
8116
+ size: tm,
8117
+ variant: nm
7968
8118
  },
7969
8119
  defaults: {
7970
8120
  size: "lg",
7971
- variant: "outline"
7972
- }
8121
+ variant: "outline",
8122
+ radius: "md"
8123
+ },
8124
+ compounds: Qp
7973
8125
  },
7974
8126
  chips: { base: "-ml-1.5 flex min-w-0 flex-wrap items-center gap-1" },
7975
- chip: { base: ["inline-flex h-control-sm max-w-48 min-w-0 items-center gap-1 rounded-2 border border-border bg-base-a2 px-2", "text-sm font-normal text-foreground"] },
8127
+ chip: { base: ["inline-flex h-control-sm max-w-48 min-w-0 items-center gap-1 rounded-2 border border-border bg-current/10 px-2", "text-sm font-normal text-foreground"] },
7976
8128
  chipLabel: { base: "min-w-0 flex-1" },
7977
8129
  chipRemove: { base: [
7978
8130
  "-mr-1 inline-flex size-control-xs shrink-0 items-center justify-center rounded-2 border-0 bg-transparent",
7979
8131
  "text-icon outline-none hover:bg-base-a3 hover:text-foreground",
7980
8132
  "focus-visible:ring-2 focus-visible:ring-focus"
7981
8133
  ] },
7982
- input: { base: ["w-full min-w-16 flex-1", Xp] },
8134
+ input: { base: ["w-full min-w-16 flex-1", rm] },
7983
8135
  icon: {
7984
8136
  base: "size-icon shrink-0 fill-current text-icon",
7985
8137
  variants: { position: {
@@ -7988,27 +8140,27 @@ var Xm = Y({ definition: {
7988
8140
  } },
7989
8141
  defaults: { position: "leading" }
7990
8142
  },
7991
- clear: { base: Zp },
7992
- listbox: { base: [$p, "auto-rows-min content-start max-h-combobox-listbox min-w-48 gap-1 overflow-auto p-popover"] },
7993
- option: { base: tm },
8143
+ clear: { base: im },
8144
+ listbox: { base: [om, "auto-rows-min content-start max-h-combobox-listbox min-w-48 gap-1 overflow-auto p-popover"] },
8145
+ option: { base: cm },
7994
8146
  optionLabel: { base: "min-w-0 flex-1" },
7995
8147
  optionMeta: { base: "ml-auto text-menu-item-muted" },
7996
8148
  optionIcon: {
7997
- base: nm,
8149
+ base: lm,
7998
8150
  variants: { position: {
7999
8151
  leading: "",
8000
8152
  trailing: "ml-auto"
8001
8153
  } },
8002
8154
  defaults: { position: "leading" }
8003
8155
  },
8004
- optionIndicator: { base: rm },
8156
+ optionIndicator: { base: um },
8005
8157
  group: { base: "grid auto-rows-min content-start gap-1" },
8006
8158
  label: { base: "px-menu-item-x py-1 text-menu-heading-fg" },
8007
8159
  empty: { base: "px-menu-item-x py-2 text-sm text-foreground-muted" },
8008
8160
  separatorRoot: { base: "-mx-popover my-popover h-px" },
8009
8161
  separatorRule: { base: "h-px w-full border-0 bg-menu-separator" }
8010
8162
  }
8011
- } }), Zm = () => ({
8163
+ } }), ch = () => ({
8012
8164
  isOpen: !1,
8013
8165
  query: "",
8014
8166
  selectedValues: [],
@@ -8026,7 +8178,7 @@ var Xm = Y({ definition: {
8026
8178
  init() {
8027
8179
  this.props = W({
8028
8180
  el: this.$el,
8029
- schema: Ym
8181
+ schema: oh
8030
8182
  }), this.inputId = this.$id("combobox-input"), this.listboxId = this.$id("combobox-listbox"), this.isOpen = this.props.open;
8031
8183
  let e = this.options(), t = this.props.multiple ? [...Q.splitControlValues(this.props.values), ...Q.splitControlValues(this.props.value)] : Q.splitControlValues(this.props.value).slice(0, 1), n = e.filter((e) => Q.asBool({ value: e.el.dataset.selected })).map((e) => e.value);
8032
8184
  this.selectedValues = t.length > 0 ? t : n, this.props.multiple || (this.selectedValues = this.selectedValues.slice(0, 1)), this.selectedLabels = this.selectedValues.map((t) => e.find((e) => e.value === t)?.label ?? t), this.query = this.props.multiple ? "" : this.selectedLabels[0] ?? "", this.popover = Q.createAnchoredPopover({
@@ -8046,8 +8198,8 @@ var Xm = Y({ definition: {
8046
8198
  this.props.disconnect(), this.listboxMotion?.destroy(), this.listeners.forEach((e) => e()), this.listeners = [], this.observer?.disconnect(), this.unmount();
8047
8199
  },
8048
8200
  get root() {
8049
- return Q.props({ inputs: [X({
8050
- part: Xm.parts.root,
8201
+ return Q.mergeBindings({ inputs: [X({
8202
+ part: sh.parts.root,
8051
8203
  props: this.props,
8052
8204
  className: this.props.class
8053
8205
  }), {
@@ -8306,7 +8458,7 @@ var Xm = Y({ definition: {
8306
8458
  },
8307
8459
  syncControl() {
8308
8460
  let e = this.control(), t = X({
8309
- part: Xm.parts.control,
8461
+ part: sh.parts.control,
8310
8462
  props: this.props
8311
8463
  });
8312
8464
  e.setAttribute("class", t), e.setAttribute("data-ui-control", ""), e.setAttribute("data-ui-combobox-control", ""), e.dataset.state = this.isOpen ? "open" : "closed", e.dataset.variant = this.props.variant, Q.syncControlPresence({
@@ -8320,7 +8472,7 @@ var Xm = Y({ definition: {
8320
8472
  },
8321
8473
  syncListbox() {
8322
8474
  let e = this.listbox(), t = X({
8323
- part: Xm.parts.listbox,
8475
+ part: sh.parts.listbox,
8324
8476
  props: this.props,
8325
8477
  className: this.props.listboxClass
8326
8478
  });
@@ -8353,10 +8505,10 @@ var Xm = Y({ definition: {
8353
8505
  });
8354
8506
  if (n === this.renderedChipsKey || (this.renderedChipsKey = n, e.replaceChildren(), e.hidden)) return;
8355
8507
  let r = X({
8356
- part: Xm.parts.chip,
8508
+ part: sh.parts.chip,
8357
8509
  props: {},
8358
8510
  className: this.props.chipClass
8359
- }), i = X({ part: Xm.parts.chipLabel }), a = X({ part: Xm.parts.chipRemove });
8511
+ }), i = X({ part: sh.parts.chipLabel }), a = X({ part: sh.parts.chipRemove });
8360
8512
  this.selectedValues.forEach((t, n) => {
8361
8513
  let o = this.selectedLabels[n] ?? t, s = document.createElement("span");
8362
8514
  s.className = r, s.setAttribute("data-ui-combobox-chip", "");
@@ -8472,23 +8624,23 @@ var Xm = Y({ definition: {
8472
8624
  optionValue(e, t) {
8473
8625
  return e.dataset.value || t;
8474
8626
  }
8475
- }), Qm = (e) => {
8476
- e.data("UiCombobox", () => Zm());
8477
- }, $m = ["single", "range"], eh = ["enhanced", "native"], th = [
8627
+ }), lh = (e) => {
8628
+ e.data("UiCombobox", () => ch());
8629
+ }, uh = ["single", "range"], dh = ["enhanced", "native"], fh = [
8478
8630
  "popover",
8479
8631
  "modal",
8480
8632
  "native"
8481
- ], nh = ["select", "confirm"], rh = ["neutral", "accent"], ih = [
8633
+ ], ph = ["select", "confirm"], mh = ["neutral", "accent"], hh = qp, gh = [
8482
8634
  "left",
8483
8635
  "right",
8484
8636
  "top",
8485
8637
  "bottom"
8486
- ], ah = {
8638
+ ], _h = {
8487
8639
  name: G,
8488
8640
  value: G,
8489
8641
  startName: G,
8490
8642
  endName: G,
8491
- mode: J($m, "single"),
8643
+ mode: J(uh, "single"),
8492
8644
  placeholder: G,
8493
8645
  min: G,
8494
8646
  max: G,
@@ -8512,12 +8664,13 @@ var Xm = Y({ definition: {
8512
8664
  align: J(zp, "start"),
8513
8665
  offset: K.clamp(-100, 100).default(0),
8514
8666
  gap: K.clamp(0, 50).default(4),
8515
- mobile: J(th, "modal"),
8516
- variant: J(eh, "enhanced"),
8517
- color: J(rh, "neutral"),
8518
- close: J(nh, "select"),
8667
+ mobile: J(fh, "modal"),
8668
+ variant: J(dh, "enhanced"),
8669
+ color: J(mh, "neutral"),
8670
+ radius: J(hh, "md"),
8671
+ close: J(ph, "select"),
8519
8672
  presets: vu.array([]),
8520
- presetsPosition: J(ih, "left"),
8673
+ presetsPosition: J(gh, "left"),
8521
8674
  preset: G,
8522
8675
  presetName: G,
8523
8676
  triggerClass: G,
@@ -8529,30 +8682,38 @@ var Xm = Y({ definition: {
8529
8682
  class: G,
8530
8683
  form: G
8531
8684
  };
8532
- J(ih, "left");
8685
+ J(gh, "left");
8533
8686
  //#endregion
8534
8687
  //#region src/components/date-picker/styles.ts
8535
- var oh = Y({ definition: {
8688
+ var vh = Y({ definition: {
8536
8689
  component: "ui.date-picker",
8537
8690
  parts: {
8538
8691
  root: { base: "relative inline-grid w-full min-w-0" },
8539
- trigger: { base: [
8540
- Kp,
8541
- qp,
8542
- Jp.lg,
8543
- Yp.outline,
8544
- "text-left"
8545
- ] },
8546
- customTrigger: { base: [
8547
- "inline-flex min-h-control-lg min-w-control-lg shrink-0 items-center justify-center gap-control rounded-control border border-control-border bg-control px-2 text-sm text-control-fg shadow-control outline-none",
8548
- "hover:bg-control-hover hover:text-control-fg",
8549
- "focus-visible:ring-2 focus-visible:ring-focus",
8550
- "data-disabled:cursor-not-allowed data-disabled:opacity-50"
8551
- ] },
8552
- input: { base: ["min-w-0 flex-1 text-sm", Xp] },
8692
+ trigger: {
8693
+ base: [
8694
+ $p,
8695
+ em,
8696
+ tm.lg,
8697
+ nm.outline,
8698
+ "text-left"
8699
+ ],
8700
+ variants: { radius: Zp.lg },
8701
+ defaults: { radius: "md" }
8702
+ },
8703
+ customTrigger: {
8704
+ base: [
8705
+ "inline-flex min-h-control-lg min-w-control-lg shrink-0 items-center justify-center gap-control bg-control px-2 text-sm text-control-fg shadow-control outline-none",
8706
+ "hover:bg-control-hover hover:text-control-fg",
8707
+ "focus-visible:ring-2 focus-visible:ring-focus",
8708
+ "data-disabled:cursor-not-allowed data-disabled:opacity-50"
8709
+ ],
8710
+ variants: { radius: Zp.lg },
8711
+ defaults: { radius: "md" }
8712
+ },
8713
+ input: { base: ["min-w-0 flex-1 text-sm", rm] },
8553
8714
  icon: { base: "size-icon shrink-0 fill-current text-icon" },
8554
- action: { base: Zp },
8555
- popover: { base: [$p, "max-h-lg overflow-hidden"] },
8715
+ action: { base: im },
8716
+ popover: { base: [om, "max-h-lg overflow-hidden"] },
8556
8717
  panel: {
8557
8718
  base: "grid min-w-72 max-w-[calc(100vw-2rem)] gap-0 overflow-hidden",
8558
8719
  variants: {
@@ -8588,31 +8749,35 @@ var oh = Y({ definition: {
8588
8749
  calendarWrap: { base: "relative grid size-full place-items-center overflow-x-auto overflow-y-auto p-popover" },
8589
8750
  calendar: { base: "grid max-w-full gap-2 text-sm text-foreground" },
8590
8751
  presets: { base: ["grid content-start gap-1 border-popover-border p-popover", "sm:data-[position=left]:border-r sm:data-[position=right]:border-l data-[position=top]:border-b data-[position=bottom]:border-t"] },
8591
- preset: { base: tm },
8752
+ preset: { base: cm },
8592
8753
  footer: { base: "flex items-center justify-end gap-2 border-t border-popover-border p-popover" },
8593
8754
  nativeWrapper: { base: "relative w-full min-w-0" },
8594
- native: { base: [Qp] }
8755
+ native: {
8756
+ base: [am, tm.lg],
8757
+ variants: { radius: Zp.lg },
8758
+ defaults: { radius: "md" }
8759
+ }
8595
8760
  }
8596
- } }), sh = /^\d{4}-\d{2}-\d{2}$/, ch = /^\d{4}-\d{2}-\d{2}\/\d{4}-\d{2}-\d{2}$/, lh = 100, uh = 10, dh = null, fh = () => typeof customElements > "u" || customElements.get("calendar-ctx") ? Promise.resolve() : (dh ??= import("./chunks/cally-TZl4LpyH.js").then(() => void 0).catch((e) => {
8761
+ } }), yh = /^\d{4}-\d{2}-\d{2}$/, bh = /^\d{4}-\d{2}-\d{2}\/\d{4}-\d{2}-\d{2}$/, xh = 100, Sh = 10, Ch = null, wh = () => typeof customElements > "u" || customElements.get("calendar-ctx") ? Promise.resolve() : (Ch ??= import("./chunks/cally-TZl4LpyH.js").then(() => void 0).catch((e) => {
8597
8762
  if (!customElements.get("calendar-ctx")) throw e;
8598
- }), dh), ph = (e) => {
8763
+ }), Ch), Th = (e) => {
8599
8764
  let [t = "", n = ""] = e.split("/");
8600
8765
  return [t, n];
8601
- }, mh = (e, t) => e === "" || (t ? ch.test(e) : sh.test(e)), hh = () => (/* @__PURE__ */ new Date()).getFullYear(), gh = () => `${hh() - lh}-01-01`, _h = () => `${hh() + uh}-12-31`, vh = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), yh = (e, t) => {
8602
- if (!e.match(sh)) return "";
8766
+ }, Eh = (e, t) => e === "" || (t ? bh.test(e) : yh.test(e)), Dh = () => (/* @__PURE__ */ new Date()).getFullYear(), Oh = () => `${Dh() - xh}-01-01`, kh = () => `${Dh() + Sh}-12-31`, Ah = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), jh = (e, t) => {
8767
+ if (!e.match(yh)) return "";
8603
8768
  let n = /* @__PURE__ */ new Date(`${e}T00:00:00.000Z`);
8604
8769
  return new Intl.DateTimeFormat(t || void 0, {
8605
8770
  month: "long",
8606
8771
  timeZone: "UTC",
8607
8772
  year: "numeric"
8608
8773
  }).format(n);
8609
- }, bh = (e) => ({
8774
+ }, Mh = (e) => ({
8610
8775
  value: e.dataset.value ?? "",
8611
8776
  label: e.dataset.label ?? e.textContent?.trim() ?? "",
8612
8777
  start: e.dataset.start ?? "",
8613
8778
  end: e.dataset.end ?? "",
8614
8779
  disabled: Q.asBool({ value: e.dataset.disabled })
8615
- }), xh = () => ({
8780
+ }), Nh = () => ({
8616
8781
  isOpen: !1,
8617
8782
  value: "",
8618
8783
  pendingValue: "",
@@ -8629,7 +8794,7 @@ var oh = Y({ definition: {
8629
8794
  init() {
8630
8795
  this.props = W({
8631
8796
  el: this.$el,
8632
- schema: ah
8797
+ schema: _h
8633
8798
  }), this.value = this.props.value, this.pendingValue = this.value, this.presetValue = this.props.preset, this.triggerId = this.$id("date-picker-trigger"), this.popoverId = this.$id("date-picker-popover"), this.popover = Q.createAnchoredPopover({
8634
8799
  reference: () => this.trigger(),
8635
8800
  floating: () => this.popoverEl(),
@@ -8641,14 +8806,14 @@ var oh = Y({ definition: {
8641
8806
  }), this.popoverMotion = Q.motion.createPresenceLifecycle({
8642
8807
  element: () => this.popoverEl(),
8643
8808
  preset: "popover"
8644
- }), this.setup(), this.sync(), fh().then(() => this.sync());
8809
+ }), this.setup(), this.sync(), wh().then(() => this.sync());
8645
8810
  },
8646
8811
  destroy() {
8647
8812
  this.props.disconnect(), this.popoverMotion?.destroy(), this.listeners.forEach((e) => e()), this.listeners = [], this.popover?.unmount();
8648
8813
  },
8649
8814
  get root() {
8650
- return Q.props({ inputs: [X({
8651
- part: oh.parts.root,
8815
+ return Q.mergeBindings({ inputs: [X({
8816
+ part: vh.parts.root,
8652
8817
  props: this.props,
8653
8818
  className: this.props.class
8654
8819
  }), {
@@ -8687,7 +8852,7 @@ var oh = Y({ definition: {
8687
8852
  return this.$el.querySelector("[data-ui-date-picker-preset-inputs]");
8688
8853
  },
8689
8854
  presetItems() {
8690
- let e = Array.from(this.$el.querySelectorAll("[data-ui-date-picker-preset]")).map(bh).filter((e) => e.value && e.start && e.end);
8855
+ let e = Array.from(this.$el.querySelectorAll("[data-ui-date-picker-preset]")).map(Mh).filter((e) => e.value && e.start && e.end);
8691
8856
  return e.length ? e : this.props.presets;
8692
8857
  },
8693
8858
  isRange() {
@@ -8699,7 +8864,7 @@ var oh = Y({ definition: {
8699
8864
  displayValue() {
8700
8865
  if (!this.value) return "";
8701
8866
  if (!this.isRange()) return this.value;
8702
- let [e, t] = ph(this.value);
8867
+ let [e, t] = Th(this.value);
8703
8868
  return e && t ? `${e} to ${t}` : this.value;
8704
8869
  },
8705
8870
  effectivePlaceholder() {
@@ -8714,7 +8879,7 @@ var oh = Y({ definition: {
8714
8879
  this.isOpen = !0, this.pendingValue = this.value, this.sync(), t || this.popoverMotion?.enter({ before: () => {
8715
8880
  let e = this.popoverEl();
8716
8881
  e.hidden = !1, e.showPopover?.(), this.popover?.mount();
8717
- } }), e instanceof KeyboardEvent && fh().then(() => {
8882
+ } }), e instanceof KeyboardEvent && wh().then(() => {
8718
8883
  queueMicrotask(() => this.calendar()?.focus({ preventScroll: !0 }));
8719
8884
  }), Q.dispatch({
8720
8885
  el: this.$el,
@@ -8775,7 +8940,7 @@ var oh = Y({ definition: {
8775
8940
  },
8776
8941
  selectPreset(e, t) {
8777
8942
  t?.preventDefault();
8778
- let n = bh(e);
8943
+ let n = Mh(e);
8779
8944
  if (n.disabled) return;
8780
8945
  let r = this.isRange() ? `${n.start}/${n.end}` : n.start;
8781
8946
  this.presetValue = n.value, this.commitValue(r), this.close();
@@ -8784,7 +8949,7 @@ var oh = Y({ definition: {
8784
8949
  let t = e.target;
8785
8950
  if (!(t instanceof HTMLInputElement)) return;
8786
8951
  let n = t.value.trim(), r = this.isRange() ? n.replace(/\s+to\s+/i, "/") : n;
8787
- mh(r, this.isRange()) && r !== this.value && this.commitValue(r);
8952
+ Eh(r, this.isRange()) && r !== this.value && this.commitValue(r);
8788
8953
  },
8789
8954
  handleKeydown(e) {
8790
8955
  if ((e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && !this.isOpen) {
@@ -8795,7 +8960,7 @@ var oh = Y({ definition: {
8795
8960
  },
8796
8961
  handleCalendarChange(e) {
8797
8962
  let t = e.currentTarget;
8798
- this.pendingValue = t.value, this.isRange() && (this.liveMessage = this.pendingValue.includes("/") ? "Range selected" : "Start date selected"), this.closeMode() === "select" && (!this.isRange() || ch.test(this.pendingValue)) ? (this.commitValue(this.pendingValue), this.close()) : this.sync();
8963
+ this.pendingValue = t.value, this.isRange() && (this.liveMessage = this.pendingValue.includes("/") ? "Range selected" : "Start date selected"), this.closeMode() === "select" && (!this.isRange() || bh.test(this.pendingValue)) ? (this.commitValue(this.pendingValue), this.close()) : this.sync();
8799
8964
  },
8800
8965
  handleCalendarFocus(e) {
8801
8966
  let t = e.detail;
@@ -8827,9 +8992,9 @@ var oh = Y({ definition: {
8827
8992
  syncCalendar() {
8828
8993
  let e = this.calendar();
8829
8994
  if (!e) return;
8830
- e.setAttribute("value", this.pendingValue), this.isRange() && !this.pendingValue && e.setAttribute("tentative", ""), e.setAttribute("months", String(this.effectiveMonths())), e.style.setProperty("--ui-date-picker-month-columns", String(this.effectiveMonths())), e.setAttribute("format-weekday", "short"), e.setAttribute("min", this.props.min || gh()), e.setAttribute("max", this.props.max || _h()), this.props.today && e.setAttribute("today", this.props.today);
8831
- let t = this.props.forceOpenTo ? this.props.openTo : this.value || this.props.openTo || this.props.today || vh();
8832
- e.setAttribute("focused-date", ph(t)[0]), this.props.locale && e.setAttribute("locale", this.props.locale), this.props.firstDayOfWeek >= 0 && e.setAttribute("first-day-of-week", String(this.props.firstDayOfWeek));
8995
+ e.setAttribute("value", this.pendingValue), this.isRange() && !this.pendingValue && e.setAttribute("tentative", ""), e.setAttribute("months", String(this.effectiveMonths())), e.style.setProperty("--ui-date-picker-month-columns", String(this.effectiveMonths())), e.setAttribute("format-weekday", "short"), e.setAttribute("min", this.props.min || Oh()), e.setAttribute("max", this.props.max || kh()), this.props.today && e.setAttribute("today", this.props.today);
8996
+ let t = this.props.forceOpenTo ? this.props.openTo : this.value || this.props.openTo || this.props.today || Ah();
8997
+ e.setAttribute("focused-date", Th(t)[0]), this.props.locale && e.setAttribute("locale", this.props.locale), this.props.firstDayOfWeek >= 0 && e.setAttribute("first-day-of-week", String(this.props.firstDayOfWeek));
8833
8998
  let n = !this.props.selectableHeader && this.effectiveMonths() === 1;
8834
8999
  Q.setPresence({
8835
9000
  el: e,
@@ -8858,12 +9023,12 @@ var oh = Y({ definition: {
8858
9023
  },
8859
9024
  syncCalendarHeading(e) {
8860
9025
  let t = this.$el.querySelector("[data-ui-date-picker-calendar-heading]");
8861
- t && (t.textContent = yh(e || ph(this.value || this.props.openTo || this.props.today || vh())[0], this.props.locale));
9026
+ t && (t.textContent = jh(e || Th(this.value || this.props.openTo || this.props.today || Ah())[0], this.props.locale));
8862
9027
  },
8863
9028
  syncTodayButton() {
8864
9029
  let e = this.$el.querySelector("[data-ui-date-picker-calendar-today]"), t = this.$el.querySelector("[data-ui-date-picker-today-day]");
8865
9030
  if (!e || !t) return;
8866
- let n = this.props.today || vh(), r = n.match(sh) ? String(Number(n.slice(-2))) : "";
9031
+ let n = this.props.today || Ah(), r = n.match(yh) ? String(Number(n.slice(-2))) : "";
8867
9032
  t.textContent = r, e.setAttribute("aria-label", r ? `Go to today, ${n}` : "Go to today");
8868
9033
  },
8869
9034
  syncHiddenInputs() {
@@ -8882,7 +9047,7 @@ var oh = Y({ definition: {
8882
9047
  });
8883
9048
  return;
8884
9049
  }
8885
- let [t, n] = ph(this.value);
9050
+ let [t, n] = Th(this.value);
8886
9051
  if (this.props.startName || this.props.endName) {
8887
9052
  let r = JSON.stringify({
8888
9053
  startName: this.props.startName,
@@ -8929,7 +9094,7 @@ var oh = Y({ definition: {
8929
9094
  syncPresets() {
8930
9095
  let e = this.pendingValue || this.value;
8931
9096
  Array.from(this.$el.querySelectorAll("[data-ui-date-picker-preset]")).forEach((t) => {
8932
- let n = bh(t), r = this.isRange() ? `${n.start}/${n.end}` : n.start;
9097
+ let n = Mh(t), r = this.isRange() ? `${n.start}/${n.end}` : n.start;
8933
9098
  Q.setPresence({
8934
9099
  el: t,
8935
9100
  attr: "data-selected",
@@ -9017,14 +9182,14 @@ var oh = Y({ definition: {
9017
9182
  onDismiss: () => this.close()
9018
9183
  }));
9019
9184
  }
9020
- }), Sh = (e) => {
9021
- e.data("UiDatePicker", () => xh());
9022
- }, Ch = Y({ definition: {
9185
+ }), Ph = (e) => {
9186
+ e.data("UiDatePicker", () => Nh());
9187
+ }, Fh = Y({ definition: {
9023
9188
  component: "ui.menu",
9024
9189
  parts: {
9025
- menu: { base: [$p, "auto-rows-min content-start min-w-48 gap-1 overflow-hidden p-popover"] },
9190
+ menu: { base: [om, "auto-rows-min content-start min-w-48 gap-1 overflow-hidden p-popover"] },
9026
9191
  item: {
9027
- base: [tm],
9192
+ base: [cm],
9028
9193
  variants: {
9029
9194
  variant: {
9030
9195
  default: "",
@@ -9048,7 +9213,7 @@ var oh = Y({ definition: {
9048
9213
  itemLabel: { base: "min-w-0 flex-1" },
9049
9214
  itemMeta: { base: "ml-auto text-menu-item-muted" },
9050
9215
  itemIcon: {
9051
- base: nm,
9216
+ base: lm,
9052
9217
  variants: { position: {
9053
9218
  leading: "",
9054
9219
  trailing: "ml-auto"
@@ -9072,18 +9237,18 @@ var oh = Y({ definition: {
9072
9237
  defaults: { orientation: "horizontal" }
9073
9238
  }
9074
9239
  }
9075
- } }), wh = Bp, Th = zp, Eh = {
9076
- side: J(wh, "bottom"),
9077
- align: J(Th, "start"),
9240
+ } }), Ih = Bp, Lh = zp, Rh = {
9241
+ side: J(Ih, "bottom"),
9242
+ align: J(Lh, "start"),
9078
9243
  offset: K.clamp(-100, 100).default(0),
9079
9244
  gap: K.clamp(0, 50).default(4),
9080
9245
  open: q,
9081
9246
  disabled: q,
9082
9247
  class: G
9083
- }, Dh = Y({ definition: {
9248
+ }, zh = Y({ definition: {
9084
9249
  component: "ui.dropdown",
9085
9250
  parts: { root: { base: "contents" } }
9086
- } }), Oh = () => ({
9251
+ } }), Bh = () => ({
9087
9252
  isOpen: !1,
9088
9253
  menuMotion: null,
9089
9254
  triggerId: "",
@@ -9096,7 +9261,7 @@ var oh = Y({ definition: {
9096
9261
  init() {
9097
9262
  this.props = W({
9098
9263
  el: this.$el,
9099
- schema: Eh
9264
+ schema: Rh
9100
9265
  }), this.triggerId = this.$id("dropdown-trigger"), this.menuId = this.$id("dropdown-menu"), this.collection = Q.createCollectionNavigation({
9101
9266
  root: () => this.menuEl(),
9102
9267
  itemSelector: "[data-ui-menu-item]",
@@ -9135,8 +9300,8 @@ var oh = Y({ definition: {
9135
9300
  this.props.disconnect(), this.menuMotion?.destroy(), this.teardownTrigger(), this.teardownMenu(), this.unmount();
9136
9301
  },
9137
9302
  get root() {
9138
- return Q.props({ inputs: [X({
9139
- part: Dh.parts.root,
9303
+ return Q.mergeBindings({ inputs: [X({
9304
+ part: zh.parts.root,
9140
9305
  props: this.props,
9141
9306
  className: this.props.class
9142
9307
  }), {
@@ -9146,8 +9311,8 @@ var oh = Y({ definition: {
9146
9311
  }] });
9147
9312
  },
9148
9313
  menu(e) {
9149
- return Q.props({ inputs: [X({
9150
- part: Ch.parts.menu,
9314
+ return Q.mergeBindings({ inputs: [X({
9315
+ part: Fh.parts.menu,
9151
9316
  props: {},
9152
9317
  className: e.dataset.class
9153
9318
  }), {
@@ -9162,8 +9327,8 @@ var oh = Y({ definition: {
9162
9327
  },
9163
9328
  menuItem(e) {
9164
9329
  let t = e.dataset.variant || "default", n = e.dataset.color || "neutral", r = Q.asBool({ value: e.dataset.disabled }), i = e instanceof HTMLButtonElement ? e.getAttribute("type") || e.dataset.type || "button" : void 0;
9165
- return Q.props({ inputs: [X({
9166
- part: Ch.parts.item,
9330
+ return Q.mergeBindings({ inputs: [X({
9331
+ part: Fh.parts.item,
9167
9332
  props: {
9168
9333
  variant: t,
9169
9334
  color: n
@@ -9339,14 +9504,14 @@ var oh = Y({ definition: {
9339
9504
  return;
9340
9505
  }
9341
9506
  let n = Q.asBool({ value: this.menuEl().dataset.keepOpen });
9342
- (e.dataset.keepOpen === void 0 || e.dataset.keepOpen === "" ? n : Q.asBool({ value: e.dataset.keepOpen })) || this.close(t);
9507
+ (e.dataset.keepOpen === void 0 || e.dataset.keepOpen === "" ? n : Q.asBool({ value: e.dataset.keepOpen })) || this.close();
9343
9508
  }
9344
- }), kh = (e) => {
9345
- e.data("UiDropdown", () => Oh());
9346
- }, Ah = "input:not([type=\"hidden\"]), textarea, select, button, [data-ui-control-target]", jh = (e, t) => {
9509
+ }), Vh = (e) => {
9510
+ e.data("UiDropdown", () => Bh());
9511
+ }, Hh = "input:not([type=\"hidden\"]), textarea, select, button, [data-ui-control-target]", Uh = (e, t) => {
9347
9512
  let n = new Set((e ?? "").split(/\s+/).filter(Boolean));
9348
9513
  return n.add(t), Array.from(n).join(" ");
9349
- }, Mh = (e, t) => (e.id ||= `ui-${t}-${crypto.randomUUID()}`, e.id), Nh = () => ({
9514
+ }, Wh = (e, t) => (e.id ||= `ui-${t}-${crypto.randomUUID()}`, e.id), Gh = () => ({
9350
9515
  observer: null,
9351
9516
  listeners: [],
9352
9517
  init() {
@@ -9359,22 +9524,22 @@ var oh = Y({ definition: {
9359
9524
  this.observer?.disconnect(), this.listeners.forEach((e) => e()), this.listeners = [];
9360
9525
  },
9361
9526
  sync() {
9362
- let e = this.$el, t = Array.from(e.querySelectorAll(Ah)).filter((t) => !t.closest("[data-ui-field], [data-ui-fieldset]") || t.closest("[data-ui-field], [data-ui-fieldset]") === e)[0], n = e.querySelector(":scope > [data-ui-field-label]"), r = e.querySelector(":scope > [data-ui-fieldset-legend]"), i = Array.from(e.querySelectorAll(":scope > [data-ui-field-description]")), a = Array.from(e.querySelectorAll(":scope > [data-ui-field-error]")), o = [...i, ...a].filter((e) => !e.hasAttribute("hidden")).map((e) => Mh(e, e.hasAttribute("data-ui-field-error") ? "field-error" : "field-description"));
9527
+ let e = this.$el, t = Array.from(e.querySelectorAll(Hh)).filter((t) => !t.closest("[data-ui-field], [data-ui-fieldset]") || t.closest("[data-ui-field], [data-ui-fieldset]") === e)[0], n = e.querySelector(":scope > [data-ui-field-label]"), r = e.querySelector(":scope > [data-ui-fieldset-legend]"), i = Array.from(e.querySelectorAll(":scope > [data-ui-field-description]")), a = Array.from(e.querySelectorAll(":scope > [data-ui-field-error]")), o = [...i, ...a].filter((e) => !e.hasAttribute("hidden")).map((e) => Wh(e, e.hasAttribute("data-ui-field-error") ? "field-error" : "field-description"));
9363
9528
  if (t) {
9364
- let i = Mh(t, "control");
9529
+ let i = Wh(t, "control");
9365
9530
  if (n && !n.htmlFor && (n.htmlFor = i), r) {
9366
- let e = Mh(r, "fieldset-legend");
9531
+ let e = Wh(r, "fieldset-legend");
9367
9532
  Q.setAttribute({
9368
9533
  el: t,
9369
9534
  attr: "aria-labelledby",
9370
- value: jh(t.getAttribute("aria-labelledby"), e)
9535
+ value: Uh(t.getAttribute("aria-labelledby"), e)
9371
9536
  });
9372
9537
  }
9373
9538
  o.forEach((e) => {
9374
9539
  Q.setAttribute({
9375
9540
  el: t,
9376
9541
  attr: "aria-describedby",
9377
- value: jh(t.getAttribute("aria-describedby"), e)
9542
+ value: Uh(t.getAttribute("aria-describedby"), e)
9378
9543
  });
9379
9544
  }), e.hasAttribute("data-invalid") && !t.hasAttribute("aria-invalid") && t.setAttribute("aria-invalid", "true");
9380
9545
  }
@@ -9382,19 +9547,19 @@ var oh = Y({ definition: {
9382
9547
  Q.setAttribute({
9383
9548
  el: e,
9384
9549
  attr: "aria-describedby",
9385
- value: jh(e.getAttribute("aria-describedby"), t)
9550
+ value: Uh(e.getAttribute("aria-describedby"), t)
9386
9551
  });
9387
9552
  });
9388
9553
  }
9389
- }), Ph = (e) => {
9390
- e.data("UiField", Nh);
9554
+ }), Kh = (e) => {
9555
+ e.data("UiField", Gh);
9391
9556
  };
9392
9557
  //#endregion
9393
9558
  //#region node_modules/.pnpm/@atlaskit+pragmatic-drag-and-drop@2.0.1/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/external/file.js
9394
- function Fh(e) {
9559
+ function qh(e) {
9395
9560
  return e.source.types.includes("Files");
9396
9561
  }
9397
- function Ih(e) {
9562
+ function Jh(e) {
9398
9563
  return e.source.items.filter(function(e) {
9399
9564
  return e.kind === "file";
9400
9565
  }).map(function(e) {
@@ -9405,41 +9570,41 @@ function Ih(e) {
9405
9570
  }
9406
9571
  //#endregion
9407
9572
  //#region node_modules/.pnpm/@atlaskit+pragmatic-drag-and-drop@2.0.1/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-entering-window.js
9408
- function Lh(e) {
9573
+ function Yh(e) {
9409
9574
  var t = e.dragEnter, n = t.type, r = t.relatedTarget;
9410
9575
  return n === "dragenter" ? Sd() ? wd({ dragEnter: t }) : r == null ? !0 : xd() ? Dd(r) : r instanceof HTMLIFrameElement : !1;
9411
9576
  }
9412
9577
  //#endregion
9413
9578
  //#region node_modules/.pnpm/@atlaskit+pragmatic-drag-and-drop@2.0.1/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/external-adapter.js
9414
- function Rh(e) {
9579
+ function Xh(e) {
9415
9580
  var t = e.type, n = e.value;
9416
9581
  return !(t === "application/vnd.pdnd" || t === "text/plain" && n === "pdnd:android-fallback");
9417
9582
  }
9418
- function zh(e) {
9583
+ function Zh(e) {
9419
9584
  return Array.from(e.types).filter(function(t) {
9420
- return Rh({
9585
+ return Xh({
9421
9586
  type: t,
9422
9587
  value: e.getData(t)
9423
9588
  });
9424
9589
  });
9425
9590
  }
9426
- function Bh(e) {
9591
+ function Qh(e) {
9427
9592
  return Array.from(e.items).filter(function(t) {
9428
- return t.kind === "file" || Rh({
9593
+ return t.kind === "file" || Xh({
9429
9594
  type: t.type,
9430
9595
  value: e.getData(t.type)
9431
9596
  });
9432
9597
  });
9433
9598
  }
9434
- var Vh = !1, Hh = sf({
9599
+ var $h = !1, eg = sf({
9435
9600
  typeKey: "external",
9436
9601
  defaultDropEffect: "copy",
9437
9602
  mount: function(e) {
9438
9603
  return (0, Ku.bind)(window, {
9439
9604
  type: "dragenter",
9440
9605
  listener: function(t) {
9441
- if (!Vh && t.dataTransfer && e.canStart(t) && Lh({ dragEnter: t })) {
9442
- var n = zh(t.dataTransfer);
9606
+ if (!$h && t.dataTransfer && e.canStart(t) && Yh({ dragEnter: t })) {
9607
+ var n = Zh(t.dataTransfer);
9443
9608
  if (n.length) {
9444
9609
  var r = {
9445
9610
  types: n,
@@ -9456,14 +9621,14 @@ var Vh = !1, Hh = sf({
9456
9621
  payload: r,
9457
9622
  getDropPayload: function(e) {
9458
9623
  if (!e.dataTransfer) return r;
9459
- var t = Bh(e.dataTransfer), i = e.dataTransfer.getData.bind(e.dataTransfer);
9624
+ var t = Qh(e.dataTransfer), i = e.dataTransfer.getData.bind(e.dataTransfer);
9460
9625
  return {
9461
9626
  types: n,
9462
9627
  items: t,
9463
9628
  getStringData: function(e) {
9464
9629
  if (!n.includes(e)) return null;
9465
9630
  var t = i(e);
9466
- return Rh({
9631
+ return Xh({
9467
9632
  type: e,
9468
9633
  value: t
9469
9634
  }) ? t : null;
@@ -9478,18 +9643,18 @@ var Vh = !1, Hh = sf({
9478
9643
  });
9479
9644
  }
9480
9645
  });
9481
- function Uh(e) {
9482
- return Hh.dropTarget(e);
9646
+ function tg(e) {
9647
+ return eg.dropTarget(e);
9483
9648
  }
9484
- function Wh(e) {
9485
- return Hh.monitor(e);
9649
+ function ng(e) {
9650
+ return eg.monitor(e);
9486
9651
  }
9487
9652
  (function() {
9488
9653
  if (typeof window > "u") return;
9489
- Hh.registerUsage();
9654
+ eg.registerUsage();
9490
9655
  var e = { type: "idle" }, t = e;
9491
9656
  function n() {
9492
- t.type === "dragging" && (Vh = !1, t.cleanup(), t = e);
9657
+ t.type === "dragging" && ($h = !1, t.cleanup(), t = e);
9493
9658
  }
9494
9659
  function r() {
9495
9660
  return (0, Ku.bindAll)(window, [{
@@ -9500,7 +9665,7 @@ function Wh(e) {
9500
9665
  (0, Ku.bind)(window, {
9501
9666
  type: "dragstart",
9502
9667
  listener: function() {
9503
- t.type === "idle" && (Vh = !0, t = {
9668
+ t.type === "idle" && ($h = !0, t = {
9504
9669
  type: "dragging",
9505
9670
  cleanup: r()
9506
9671
  });
@@ -9510,15 +9675,15 @@ function Wh(e) {
9510
9675
  })();
9511
9676
  //#endregion
9512
9677
  //#region src/components/file-upload/contract.ts
9513
- var Gh = ["stack", "inline"], Kh = [
9678
+ var rg = ["stack", "inline"], ig = [
9514
9679
  "auto",
9515
9680
  "image",
9516
9681
  "none"
9517
- ], qh = [
9682
+ ], ag = [
9518
9683
  "sm",
9519
9684
  "md",
9520
9685
  "lg"
9521
- ], Jh = {
9686
+ ], og = {
9522
9687
  name: G,
9523
9688
  accept: G,
9524
9689
  capture: G,
@@ -9526,9 +9691,9 @@ var Gh = ["stack", "inline"], Kh = [
9526
9691
  required: q,
9527
9692
  disabled: q,
9528
9693
  invalid: q,
9529
- preview: J(Kh, "auto"),
9530
- layout: J(Gh, "stack"),
9531
- size: J(qh, "md"),
9694
+ preview: J(ig, "auto"),
9695
+ layout: J(rg, "stack"),
9696
+ size: J(ag, "md"),
9532
9697
  heading: G.default("Drop files here or browse"),
9533
9698
  text: G,
9534
9699
  browseLabel: G,
@@ -9541,22 +9706,20 @@ var Gh = ["stack", "inline"], Kh = [
9541
9706
  itemClass: G,
9542
9707
  class: G
9543
9708
  };
9544
- G.default("Drop files here or browse"), G.default("cloud__upload"), J(Gh, "stack"), J(qh, "md"), G.default("document__blank"), G.default("Remove file");
9709
+ G.default("Drop files here or browse"), G.default("cloud__upload"), J(rg, "stack"), J(ag, "md"), G.default("document__blank"), G.default("Remove file");
9545
9710
  //#endregion
9546
9711
  //#region src/components/file-upload/styles.ts
9547
- var Yh = Y({ definition: {
9712
+ var sg = Y({ definition: {
9548
9713
  component: "ui.file-upload",
9549
9714
  parts: {
9550
9715
  root: { base: ["grid w-full min-w-0 gap-3", "data-disabled:cursor-not-allowed"] },
9551
- control: { base: "grid min-w-0 gap-3" },
9552
- input: { base: ["absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0", "disabled:cursor-not-allowed"] },
9716
+ control: { base: "relative grid min-w-0 gap-3" },
9717
+ input: { base: "sr-only" },
9553
9718
  dropzone: {
9554
9719
  base: [
9555
- "relative grid min-w-0 overflow-hidden rounded-4 border border-border bg-surface text-foreground shadow-control outline-none",
9556
- "focus-within:border-control-border-focus focus-within:shadow-focus",
9557
- "hover:bg-base-a2 data-dragging:border-control-border-focus data-dragging:bg-base-a3",
9558
- "data-invalid:border-control-border-invalid data-invalid:focus-within:border-control-border-invalid-focus data-invalid:focus-within:shadow-danger-focus",
9559
- "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:bg-surface data-disabled:hover:bg-surface"
9720
+ "relative grid min-w-0 overflow-hidden rounded-4 bg-surface-panel text-foreground shadow-control outline-none",
9721
+ "hover:bg-base-a2 data-dragging:bg-base-a3",
9722
+ "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:bg-surface-panel data-disabled:hover:bg-surface-panel"
9560
9723
  ],
9561
9724
  variants: {
9562
9725
  layout: {
@@ -9582,7 +9745,7 @@ var Yh = Y({ definition: {
9582
9745
  list: { base: "grid min-w-0 gap-2" },
9583
9746
  empty: { base: "text-xs text-foreground-muted" },
9584
9747
  item: { base: [
9585
- "grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 rounded-3 bg-surface px-3 py-2 shadow-border",
9748
+ "grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 rounded-3 bg-surface-panel px-3 py-2 shadow-border",
9586
9749
  "hover:shadow-border-hover",
9587
9750
  "data-invalid:shadow-danger-focus"
9588
9751
  ] },
@@ -9601,7 +9764,7 @@ var Yh = Y({ definition: {
9601
9764
  removeIcon: { base: "size-icon-xs fill-current leading-none" },
9602
9765
  clear: { base: "sr-only" }
9603
9766
  }
9604
- } }), Xh = (e) => {
9767
+ } }), cg = (e) => {
9605
9768
  if (e === 0) return "0 B";
9606
9769
  let t = [
9607
9770
  "B",
@@ -9610,42 +9773,43 @@ var Yh = Y({ definition: {
9610
9773
  "GB"
9611
9774
  ], n = Math.min(Math.floor(Math.log(e) / Math.log(1024)), t.length - 1), r = e / 1024 ** n;
9612
9775
  return `${r >= 10 || n === 0 ? Math.round(r) : Number(r.toFixed(1))} ${t[n]}`;
9613
- }, Zh = (e, t) => [
9776
+ }, lg = (e, t) => [
9614
9777
  t,
9615
9778
  e.name,
9616
9779
  e.size,
9617
9780
  e.lastModified
9618
- ].join(":"), Qh = (e) => e.type.startsWith("image/"), $h = (e, t) => t !== "none" && (t === "image" || Qh(e)), eg = (e) => e ? Array.from(e) : [], tg = (e, t) => {
9781
+ ].join(":"), ug = (e) => e.type.startsWith("image/"), dg = (e, t) => t !== "none" && (t === "image" || ug(e)), fg = (e) => e ? Array.from(e) : [], pg = (e, t) => {
9619
9782
  let n = t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
9620
9783
  if (n.length === 0) return !0;
9621
9784
  let r = e.name.toLowerCase(), i = e.type.toLowerCase();
9622
9785
  return n.some((e) => e.startsWith(".") ? r.endsWith(e) : e.endsWith("/*") ? i.startsWith(`${e.slice(0, -1)}`) : e.includes("/") ? i === e : !1);
9623
- }, ng = (e, t) => e.filter((e) => tg(e, t)), rg = (e, t) => e.maxItems > 0 && t >= e.maxItems, ig = (e) => {
9786
+ }, mg = (e, t) => e.filter((e) => pg(e, t)), hg = (e, t) => e.maxItems > 0 && t >= e.maxItems, gg = (e) => {
9624
9787
  if (typeof DataTransfer > "u") return null;
9625
9788
  let t = new DataTransfer();
9626
9789
  return e.forEach((e) => t.items.add(e)), t.files;
9627
- }, ag = (e, t) => {
9628
- let n = ig(t);
9790
+ }, _g = (e, t) => {
9791
+ let n = gg(t);
9629
9792
  if (!n) return !1;
9630
9793
  try {
9631
9794
  return e.files = n, !0;
9632
9795
  } catch {
9633
9796
  return !1;
9634
9797
  }
9635
- }, og = (e) => {
9798
+ }, vg = (e) => {
9636
9799
  e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
9637
- }, sg = (e) => {
9800
+ }, yg = (e) => {
9638
9801
  let t = "http://www.w3.org/2000/svg", n = document.createElementNS(t, "svg"), r = document.createElementNS(t, "polygon");
9639
9802
  return n.setAttribute("viewBox", "0 0 32 32"), n.setAttribute("aria-hidden", "true"), n.setAttribute("class", e), r.setAttribute("points", "17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16"), n.append(r), n;
9640
- }, cg = () => ({
9803
+ }, bg = () => ({
9641
9804
  props: null,
9642
9805
  listeners: [],
9643
9806
  files: [],
9644
9807
  limitReached: !1,
9808
+ emptyInputChangeClears: !1,
9645
9809
  init() {
9646
9810
  this.props = W({
9647
9811
  el: this.$el,
9648
- schema: Jh
9812
+ schema: og
9649
9813
  });
9650
9814
  let e = this.input(), t = this.dropzone();
9651
9815
  Q.addListener({
@@ -9682,17 +9846,17 @@ var Yh = Y({ definition: {
9682
9846
  r && (e.preventDefault(), this.clearExisting(r));
9683
9847
  },
9684
9848
  cleanup: this.listeners
9685
- }), t && (this.listeners.push(Uh({
9849
+ }), t && (this.listeners.push(tg({
9686
9850
  element: t,
9687
- canDrop: ({ source: e }) => !this.isInputUnavailable() && Fh({ source: e }),
9851
+ canDrop: ({ source: e }) => !this.isInputUnavailable() && qh({ source: e }),
9688
9852
  getDropEffect: () => "copy",
9689
9853
  onDragEnter: () => this.setDragging(!0),
9690
9854
  onDragLeave: () => this.setDragging(!1),
9691
9855
  onDrop: ({ source: e }) => {
9692
- this.setDragging(!1), !(this.isInputUnavailable() || !Fh({ source: e })) && this.addFiles(Ih({ source: e }));
9856
+ this.setDragging(!1), !(this.isInputUnavailable() || !qh({ source: e })) && this.addFiles(Jh({ source: e }));
9693
9857
  }
9694
- })), this.listeners.push(Wh({
9695
- canMonitor: ({ source: e }) => Fh({ source: e }),
9858
+ })), this.listeners.push(ng({
9859
+ canMonitor: ({ source: e }) => qh({ source: e }),
9696
9860
  onDrop: () => this.setDragging(!1)
9697
9861
  }))), this.syncFromInput(), this.sync();
9698
9862
  },
@@ -9716,7 +9880,7 @@ var Yh = Y({ definition: {
9716
9880
  return this.$el.querySelector("[data-ui-file-upload-list]");
9717
9881
  },
9718
9882
  isInputUnavailable() {
9719
- return this.props.disabled || rg(this.props, eg(this.input().files).length);
9883
+ return this.props.disabled || hg(this.props, fg(this.input().files).length);
9720
9884
  },
9721
9885
  sync() {
9722
9886
  let e = this.root(), t = this.dropzone(), n = !!e.querySelector("[data-ui-file-upload-item][data-existing-file]:not([hidden])"), r = this.files.length > 0 || n, i = this.isInputUnavailable();
@@ -9790,20 +9954,25 @@ var Yh = Y({ definition: {
9790
9954
  }), e.multiple = this.props.multiple, this.props.accept ? e.accept = this.props.accept : e.removeAttribute("accept"), this.props.capture ? e.setAttribute("capture", this.props.capture) : e.removeAttribute("capture"), this.isInputUnavailable() && !this.props.disabled ? (e.setAttribute("aria-disabled", "true"), e.tabIndex = -1) : this.props.disabled || (e.removeAttribute("aria-disabled"), e.removeAttribute("tabindex"));
9791
9955
  },
9792
9956
  syncFromInput() {
9793
- let e = this.input(), t = eg(e.files), n = ng(t, this.props.accept), r = this.props.multiple ? this.props.maxItems : 1, i = r > 0 ? n.slice(0, r) : n, a = t.length - n.length, o = n.length - i.length, s = a + o;
9794
- this.limitReached = rg(this.props, i.length), s > 0 && (ag(e, i), o > 0 && Q.dispatch({
9957
+ let e = this.input(), t = fg(e.files), n = this.emptyInputChangeClears;
9958
+ if (this.emptyInputChangeClears = !1, t.length === 0 && this.files.length > 0 && !n) {
9959
+ _g(e, this.files.map(({ file: e }) => e)), this.sync();
9960
+ return;
9961
+ }
9962
+ let r = mg(t, this.props.accept), i = this.props.multiple ? this.props.maxItems : 1, a = i > 0 ? r.slice(0, i) : r, o = t.length - r.length, s = r.length - a.length, c = o + s;
9963
+ this.limitReached = hg(this.props, a.length), c > 0 && (_g(e, a), s > 0 && Q.dispatch({
9795
9964
  el: this.root(),
9796
9965
  name: "ui:file-upload-limit",
9797
- detail: { rejectedCount: o }
9966
+ detail: { rejectedCount: s }
9798
9967
  })), this.files.forEach((e) => {
9799
9968
  e.previewUrl && URL.revokeObjectURL(e.previewUrl);
9800
- }), this.files = i.map((e, t) => ({
9801
- id: Zh(e, t),
9969
+ }), this.files = a.map((e, t) => ({
9970
+ id: lg(e, t),
9802
9971
  file: e,
9803
9972
  name: e.name,
9804
- size: Xh(e.size),
9973
+ size: cg(e.size),
9805
9974
  type: e.type || "File",
9806
- previewUrl: $h(e, this.props.preview) ? URL.createObjectURL(e) : ""
9975
+ previewUrl: dg(e, this.props.preview) ? URL.createObjectURL(e) : ""
9807
9976
  })), this.renderFiles(), this.sync(), Q.dispatch({
9808
9977
  el: this.root(),
9809
9978
  name: "ui:file-upload-change",
@@ -9816,29 +9985,29 @@ var Yh = Y({ definition: {
9816
9985
  },
9817
9986
  addFiles(e) {
9818
9987
  if (this.isInputUnavailable() || e.length === 0) return;
9819
- let t = this.input(), n = ng(e, this.props.accept), r = this.props.multiple ? eg(t.files) : [], i = this.props.maxItems > 0 ? Math.max(this.props.maxItems - r.length, 0) : n.length, a = this.props.multiple ? n.slice(0, i) : n.slice(0, 1), o = n.length - a.length, s = this.props.multiple ? [...r, ...a] : a;
9988
+ let t = this.input(), n = mg(e, this.props.accept), r = this.props.multiple ? fg(t.files) : [], i = this.props.maxItems > 0 ? Math.max(this.props.maxItems - r.length, 0) : n.length, a = this.props.multiple ? n.slice(0, i) : n.slice(0, 1), o = n.length - a.length, s = this.props.multiple ? [...r, ...a] : a;
9820
9989
  if (o > 0 && Q.dispatch({
9821
9990
  el: this.root(),
9822
9991
  name: "ui:file-upload-limit",
9823
9992
  detail: { rejectedCount: o }
9824
- }), this.props.maxItems > 0 ? this.limitReached = rg(this.props, s.length) : this.limitReached = !1, s.length === 0) {
9993
+ }), this.props.maxItems > 0 ? this.limitReached = hg(this.props, s.length) : this.limitReached = !1, s.length === 0) {
9825
9994
  this.sync();
9826
9995
  return;
9827
9996
  }
9828
- if (!ag(t, s)) {
9997
+ if (!_g(t, s)) {
9829
9998
  t.click();
9830
9999
  return;
9831
10000
  }
9832
- og(t);
10001
+ vg(t);
9833
10002
  },
9834
10003
  removePending(e) {
9835
10004
  if (this.props.disabled || !Number.isInteger(e)) return;
9836
- let t = this.input(), n = eg(t.files).filter((t, n) => n !== e);
10005
+ let t = this.input(), n = fg(t.files).filter((t, n) => n !== e);
9837
10006
  if (n.length === 0) {
9838
- t.value = "", og(t);
10007
+ this.emptyInputChangeClears = !0, _g(t, []) || (t.value = ""), vg(t);
9839
10008
  return;
9840
10009
  }
9841
- ag(t, n) || (t.value = ""), og(t);
10010
+ _g(t, n) || (t.value = ""), vg(t);
9842
10011
  },
9843
10012
  clearExisting(e) {
9844
10013
  if (this.props.disabled || !this.props.clearable) return;
@@ -9854,10 +10023,10 @@ var Yh = Y({ definition: {
9854
10023
  let t = e.querySelector("[data-ui-file-upload-empty]");
9855
10024
  t && (t.hidden = this.files.length > 0 || !!e.querySelector("[data-existing-file]:not([hidden])"));
9856
10025
  let n = X({
9857
- part: Yh.parts.item,
10026
+ part: sg.parts.item,
9858
10027
  props: {},
9859
10028
  className: this.props.itemClass
9860
- }), r = X({ part: Yh.parts.preview }), i = ["relative block overflow-hidden ui-image-outline", X({ part: Yh.parts.previewImage })].filter(Boolean).join(" "), a = X({ part: Yh.parts.itemBody }), o = X({ part: Yh.parts.itemName }), s = X({ part: Yh.parts.itemMeta }), c = X({ part: Yh.parts.remove }), l = X({ part: Yh.parts.removeIcon });
10029
+ }), r = X({ part: sg.parts.preview }), i = ["relative block overflow-hidden ui-image-outline", X({ part: sg.parts.previewImage })].filter(Boolean).join(" "), a = X({ part: sg.parts.itemBody }), o = X({ part: sg.parts.itemName }), s = X({ part: sg.parts.itemMeta }), c = X({ part: sg.parts.remove }), l = X({ part: sg.parts.removeIcon });
9861
10030
  this.files.forEach((t, u) => {
9862
10031
  let d = document.createElement("li");
9863
10032
  d.dataset.uiFileUploadItem = "", d.dataset.uiFileUploadPending = "", d.dataset.fileIndex = String(u), d.className = n;
@@ -9866,7 +10035,7 @@ var Yh = Y({ definition: {
9866
10035
  let e = document.createElement("span");
9867
10036
  e.dataset.uiImage = "", e.className = i;
9868
10037
  let n = document.createElement("img");
9869
- n.src = t.previewUrl, n.alt = "", n.loading = "lazy", n.decoding = "async", n.dataset.uiImageImg = "", n.className = "block size-full object-cover", e.append(n), f.append(e);
10038
+ n.src = t.previewUrl, n.alt = "", n.loading = "lazy", n.decoding = "async", n.dataset.uiImageImg = "", n.className = "outline outline-1 -outline-offset-1 outline-black/10 dark:outline-white/10 block size-full object-cover", e.append(n), f.append(e);
9870
10039
  } else f.textContent = t.name.slice(0, 1).toUpperCase();
9871
10040
  let p = document.createElement("span");
9872
10041
  p.className = a;
@@ -9875,7 +10044,7 @@ var Yh = Y({ definition: {
9875
10044
  let h = document.createElement("span");
9876
10045
  h.dataset.uiFileUploadItemMeta = "", h.className = s, h.textContent = [t.size, t.type].filter(Boolean).join(" · "), p.append(m, h);
9877
10046
  let g = document.createElement("button");
9878
- g.type = "button", g.dataset.uiFileUploadRemove = "", g.dataset.fileIndex = String(u), g.className = c, g.setAttribute("aria-label", `Remove ${t.name}`), g.append(sg(l)), d.append(f, p, g), e.append(d);
10047
+ g.type = "button", g.dataset.uiFileUploadRemove = "", g.dataset.fileIndex = String(u), g.className = c, g.setAttribute("aria-label", `Remove ${t.name}`), g.append(yg(l)), d.append(f, p, g), e.append(d);
9879
10048
  });
9880
10049
  },
9881
10050
  setDragging(e) {
@@ -9892,22 +10061,23 @@ var Yh = Y({ definition: {
9892
10061
  value: "true"
9893
10062
  });
9894
10063
  }
9895
- }), lg = (e) => {
9896
- e.data("UiFileUpload", () => cg());
9897
- }, ug = Fp, dg = Ip, fg = Lp, pg = {
10064
+ }), xg = (e) => {
10065
+ e.data("UiFileUpload", () => bg());
10066
+ }, Sg = Fp, Cg = Ip, wg = qp, Tg = Lp, Eg = {
9898
10067
  type: G.default("text"),
9899
10068
  name: G,
9900
10069
  value: G,
9901
10070
  placeholder: G,
9902
- size: J(ug, "lg"),
9903
- variant: J(dg, "outline"),
10071
+ size: J(Sg, "lg"),
10072
+ variant: J(Cg, "outline"),
10073
+ radius: J(wg, "md"),
9904
10074
  disabled: q,
9905
10075
  readonly: q,
9906
10076
  required: q,
9907
10077
  invalid: q,
9908
10078
  icon: G,
9909
10079
  iconTrailing: G,
9910
- iconVariant: J(fg, "outline"),
10080
+ iconVariant: J(Tg, "outline"),
9911
10081
  clearable: q,
9912
10082
  copyable: q,
9913
10083
  kbd: G,
@@ -9917,17 +10087,17 @@ var Yh = Y({ definition: {
9917
10087
  controlClass: G,
9918
10088
  class: G
9919
10089
  };
9920
- J(ug, "lg"), J(dg, "outline");
10090
+ J(Sg, "lg"), J(Cg, "outline"), J(wg, "md");
9921
10091
  //#endregion
9922
10092
  //#region src/components/input/index.ts
9923
- var mg = () => ({
10093
+ var Dg = () => ({
9924
10094
  props: null,
9925
10095
  listeners: [],
9926
10096
  copiedTimer: null,
9927
10097
  init() {
9928
10098
  this.props = W({
9929
10099
  el: this.$el,
9930
- schema: pg
10100
+ schema: Eg
9931
10101
  });
9932
10102
  let e = this.input();
9933
10103
  Q.addListener({
@@ -10004,26 +10174,26 @@ var mg = () => ({
10004
10174
  });
10005
10175
  }, 1200);
10006
10176
  }
10007
- }), hg = (e) => {
10008
- e.data("UiInput", () => mg());
10009
- }, gg = [
10010
- "modal",
10011
- "sheet",
10012
- "drawer",
10013
- "flyout",
10014
- "floating"
10015
- ], _g = Vp, vg = [
10177
+ }), Og = (e) => {
10178
+ e.data("UiInput", () => Dg());
10179
+ }, kg = ["modal", "sheet"], Ag = Vp, jg = [
10016
10180
  "sm",
10017
10181
  "md",
10018
10182
  "lg",
10019
10183
  "xl",
10020
10184
  "full"
10021
- ], yg = Gp, bg = {
10185
+ ], Mg = [
10186
+ "overlay",
10187
+ "panel",
10188
+ "inverse"
10189
+ ], Ng = Jp, Pg = Gp, Fg = {
10022
10190
  name: G,
10023
10191
  open: q,
10024
- mode: J(gg, "modal"),
10025
- side: J(_g, "right"),
10026
- size: J(vg, "md"),
10192
+ mode: J(kg, "modal"),
10193
+ side: J(Ag, "right"),
10194
+ size: J(jg, "md"),
10195
+ surface: J(Mg, "overlay"),
10196
+ tone: J(Ng, "solid"),
10027
10197
  dismissible: q.default(!0),
10028
10198
  closable: q.default(!0),
10029
10199
  disabled: q,
@@ -10033,28 +10203,34 @@ var mg = () => ({
10033
10203
  panelClass: G,
10034
10204
  overlayClass: G,
10035
10205
  class: G
10036
- }, xg = {
10206
+ }, Ig = {
10037
10207
  name: G,
10038
10208
  disabled: q,
10039
10209
  class: G
10040
10210
  };
10041
- G.default("ui-modal-root"), J(yg, "h2"), G.default("Close");
10211
+ G.default("ui-modal-root"), J(Pg, "h2"), G.default("Close");
10042
10212
  //#endregion
10043
10213
  //#region src/components/modal/styles.ts
10044
- var Sg = Y({ definition: {
10214
+ var Lg = {
10215
+ overlay: Yp.overlay,
10216
+ panel: Yp.panel,
10217
+ inverse: Yp.inverse
10218
+ }, Rg = [
10219
+ "grid-rows-[auto_auto_minmax(0,1fr)_auto]",
10220
+ "[&>[data-ui-modal-body]]:-mx-1 [&>[data-ui-modal-body]]:min-h-0 [&>[data-ui-modal-body]]:content-start",
10221
+ "[&>[data-ui-modal-body]]:overflow-x-hidden [&>[data-ui-modal-body]]:overflow-y-auto [&>[data-ui-modal-body]]:px-1",
10222
+ "[&>[data-ui-modal-footer]]:self-end"
10223
+ ], zg = Y({ definition: {
10045
10224
  component: "ui.modal",
10046
10225
  parts: {
10047
10226
  instance: { base: "contents" },
10048
10227
  root: { base: ["fixed inset-0 z-dialog m-0 h-auto max-h-none w-auto max-w-none overflow-visible border-0 bg-transparent p-0 text-foreground", "backdrop:bg-transparent"] },
10049
10228
  viewport: {
10050
- base: "fixed inset-0 z-dialog flex min-h-dvh overflow-y-auto",
10229
+ base: "fixed inset-0 z-dialog flex min-h-dvh",
10051
10230
  variants: {
10052
10231
  mode: {
10053
- modal: "items-center justify-center p-4",
10054
- sheet: "",
10055
- drawer: "",
10056
- flyout: "",
10057
- floating: "p-4"
10232
+ modal: "items-center justify-center overflow-y-auto p-4",
10233
+ sheet: ""
10058
10234
  },
10059
10235
  side: {
10060
10236
  top: "",
@@ -10076,7 +10252,7 @@ var Sg = Y({ definition: {
10076
10252
  mode: "sheet",
10077
10253
  side: "right"
10078
10254
  },
10079
- class: "items-center justify-end"
10255
+ class: "items-center justify-end overflow-hidden"
10080
10256
  },
10081
10257
  {
10082
10258
  when: {
@@ -10090,91 +10266,7 @@ var Sg = Y({ definition: {
10090
10266
  mode: "sheet",
10091
10267
  side: "left"
10092
10268
  },
10093
- class: "items-center justify-start"
10094
- },
10095
- {
10096
- when: {
10097
- mode: "drawer",
10098
- side: "top"
10099
- },
10100
- class: "items-start justify-center"
10101
- },
10102
- {
10103
- when: {
10104
- mode: "drawer",
10105
- side: "right"
10106
- },
10107
- class: "items-center justify-end"
10108
- },
10109
- {
10110
- when: {
10111
- mode: "drawer",
10112
- side: "bottom"
10113
- },
10114
- class: "items-end justify-center"
10115
- },
10116
- {
10117
- when: {
10118
- mode: "drawer",
10119
- side: "left"
10120
- },
10121
- class: "items-center justify-start"
10122
- },
10123
- {
10124
- when: {
10125
- mode: "flyout",
10126
- side: "top"
10127
- },
10128
- class: "items-start justify-center"
10129
- },
10130
- {
10131
- when: {
10132
- mode: "flyout",
10133
- side: "right"
10134
- },
10135
- class: "items-center justify-end"
10136
- },
10137
- {
10138
- when: {
10139
- mode: "flyout",
10140
- side: "bottom"
10141
- },
10142
- class: "items-end justify-center"
10143
- },
10144
- {
10145
- when: {
10146
- mode: "flyout",
10147
- side: "left"
10148
- },
10149
- class: "items-center justify-start"
10150
- },
10151
- {
10152
- when: {
10153
- mode: "floating",
10154
- side: "top"
10155
- },
10156
- class: "items-start justify-center"
10157
- },
10158
- {
10159
- when: {
10160
- mode: "floating",
10161
- side: "right"
10162
- },
10163
- class: "items-center justify-end"
10164
- },
10165
- {
10166
- when: {
10167
- mode: "floating",
10168
- side: "bottom"
10169
- },
10170
- class: "items-end justify-center"
10171
- },
10172
- {
10173
- when: {
10174
- mode: "floating",
10175
- side: "left"
10176
- },
10177
- class: "items-center justify-start"
10269
+ class: "items-center justify-start overflow-hidden"
10178
10270
  }
10179
10271
  ],
10180
10272
  defaults: {
@@ -10182,16 +10274,15 @@ var Sg = Y({ definition: {
10182
10274
  side: "right"
10183
10275
  }
10184
10276
  },
10185
- overlay: { base: "fixed inset-0 bg-overlay" },
10277
+ overlay: { base: "fixed inset-0 bg-overlay transition-opacity duration-150 data-[state=closed]:opacity-0" },
10186
10278
  panel: {
10187
- base: ["relative z-dialog grid w-full min-w-0 gap-4 overflow-auto bg-surface-raised p-5 text-foreground shadow-panel outline-none", "max-h-full"],
10279
+ base: ["relative z-dialog grid w-full min-w-0 gap-4 overflow-auto p-5 shadow-modal outline-none", "max-h-full"],
10188
10280
  variants: {
10281
+ surface: Lg,
10282
+ tone: Xp,
10189
10283
  mode: {
10190
10284
  modal: "rounded-4",
10191
- sheet: "rounded-4",
10192
- drawer: "rounded-4",
10193
- flyout: "rounded-4",
10194
- floating: "rounded-4"
10285
+ sheet: ""
10195
10286
  },
10196
10287
  side: {
10197
10288
  top: "",
@@ -10213,115 +10304,47 @@ var Sg = Y({ definition: {
10213
10304
  mode: "sheet",
10214
10305
  side: "right"
10215
10306
  },
10216
- class: "min-h-dvh max-w-lg rounded-r-none"
10307
+ class: ["min-h-dvh max-w-lg", Rg]
10217
10308
  },
10218
10309
  {
10219
10310
  when: {
10220
10311
  mode: "sheet",
10221
10312
  side: "left"
10222
10313
  },
10223
- class: "min-h-dvh max-w-lg rounded-l-none"
10314
+ class: ["min-h-dvh max-w-lg", Rg]
10224
10315
  },
10225
10316
  {
10226
10317
  when: {
10227
10318
  mode: "sheet",
10228
10319
  side: "top"
10229
10320
  },
10230
- class: "max-w-full rounded-t-none"
10321
+ class: "max-w-full"
10231
10322
  },
10232
10323
  {
10233
10324
  when: {
10234
10325
  mode: "sheet",
10235
10326
  side: "bottom"
10236
10327
  },
10237
- class: "max-w-full rounded-b-none"
10238
- },
10239
- {
10240
- when: {
10241
- mode: "drawer",
10242
- side: "right"
10243
- },
10244
- class: "min-h-dvh max-w-md rounded-r-none"
10245
- },
10246
- {
10247
- when: {
10248
- mode: "drawer",
10249
- side: "left"
10250
- },
10251
- class: "min-h-dvh max-w-md rounded-l-none"
10252
- },
10253
- {
10254
- when: {
10255
- mode: "drawer",
10256
- side: "top"
10257
- },
10258
- class: "max-w-full rounded-t-none"
10259
- },
10260
- {
10261
- when: {
10262
- mode: "drawer",
10263
- side: "bottom"
10264
- },
10265
- class: "max-w-full rounded-b-none"
10266
- },
10267
- {
10268
- when: {
10269
- mode: "flyout",
10270
- side: "right"
10271
- },
10272
- class: "min-h-dvh max-w-sm rounded-r-none"
10273
- },
10274
- {
10275
- when: {
10276
- mode: "flyout",
10277
- side: "left"
10278
- },
10279
- class: "min-h-dvh max-w-sm rounded-l-none"
10280
- },
10281
- {
10282
- when: {
10283
- mode: "flyout",
10284
- side: "top"
10285
- },
10286
- class: "max-w-md rounded-t-none"
10287
- },
10288
- {
10289
- when: {
10290
- mode: "flyout",
10291
- side: "bottom"
10292
- },
10293
- class: "max-w-md rounded-b-none"
10294
- },
10295
- {
10296
- when: {
10297
- mode: "floating",
10298
- side: "right"
10299
- },
10300
- class: "h-full"
10328
+ class: "max-w-full"
10301
10329
  },
10302
10330
  {
10303
10331
  when: {
10304
- mode: "floating",
10305
- side: "left"
10332
+ surface: "overlay",
10333
+ tone: "alpha"
10306
10334
  },
10307
- class: "h-full"
10335
+ class: "bg-surface-overlay-alpha"
10308
10336
  },
10309
10337
  {
10310
10338
  when: {
10311
- mode: "floating",
10312
- side: "top"
10339
+ surface: "panel",
10340
+ tone: "alpha"
10313
10341
  },
10314
- class: "max-w-full"
10315
- },
10316
- {
10317
- when: {
10318
- mode: "floating",
10319
- side: "bottom"
10320
- },
10321
- class: "max-w-full"
10342
+ class: "bg-surface-panel-alpha"
10322
10343
  }
10323
10344
  ],
10324
10345
  defaults: {
10346
+ surface: "overlay",
10347
+ tone: "solid",
10325
10348
  mode: "modal",
10326
10349
  side: "right",
10327
10350
  size: "md"
@@ -10336,7 +10359,7 @@ var Sg = Y({ definition: {
10336
10359
  close: { base: ["absolute right-3 top-3 inline-flex size-control-md items-center justify-center rounded-2 border border-transparent text-icon outline-none", "hover:bg-base-a2 focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app"] },
10337
10360
  closeIcon: { base: "size-icon fill-current" }
10338
10361
  }
10339
- } }), Cg = /* @__PURE__ */ new Set(), wg = /* @__PURE__ */ new Set(), Tg = [
10362
+ } }), Bg = /* @__PURE__ */ new Set(), Vg = /* @__PURE__ */ new Set(), Hg = [
10340
10363
  "a[href]",
10341
10364
  "area[href]",
10342
10365
  "button:not([disabled])",
@@ -10345,13 +10368,13 @@ var Sg = Y({ definition: {
10345
10368
  "textarea:not([disabled])",
10346
10369
  "[tabindex]:not([tabindex=\"-1\"])",
10347
10370
  "[contenteditable=\"true\"]"
10348
- ].join(","), Eg = (e) => e ? "open" : "closed", Dg = (e) => Array.from(Cg).find((t) => t.name === e) ?? null, Og = (e) => Array.from(wg).filter((t) => t.name === e), kg = (e) => {
10371
+ ].join(","), Ug = (e) => e ? "open" : "closed", Wg = (e) => (e.side === "left" || e.side === "right") && e.mode === "sheet" ? "sheet" : "modal", Gg = (e) => Array.from(Bg).find((t) => t.name === e) ?? null, Kg = (e) => Array.from(Vg).filter((t) => t.name === e), qg = (e) => {
10349
10372
  let t = e.detail;
10350
- t?.name && Dg(t.name)?.close(e);
10351
- }, Ag = (e) => !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true" && !e.hidden && e.tabIndex !== -1, jg = (e) => e.matches(Tg) && Ag(e) ? e : e.querySelector(Tg) ?? e, Mg = (e, t) => {
10352
- let n = Eg(t);
10373
+ t?.name && Gg(t.name)?.close(e);
10374
+ }, Jg = (e) => !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true" && !e.hidden && e.tabIndex !== -1, Yg = (e) => e.matches(Hg) && Jg(e) ? e : e.querySelector(Hg) ?? e, Xg = (e, t) => {
10375
+ let n = Ug(t);
10353
10376
  e.setAttribute("data-state", n), e.setAttribute("aria-expanded", t ? "true" : "false");
10354
- }, Ng = () => ({
10377
+ }, Zg = () => ({
10355
10378
  props: null,
10356
10379
  isOpen: !1,
10357
10380
  dialogId: "",
@@ -10370,13 +10393,13 @@ var Sg = Y({ definition: {
10370
10393
  init() {
10371
10394
  this.props = W({
10372
10395
  el: this.$el,
10373
- schema: bg
10396
+ schema: Fg
10374
10397
  }), this.isOpen = this.props.open, this.dialogId = this.dialogEl().id || this.$id(`modal${this.props.name ? `-${this.props.name}` : ""}`), this.register(), this.mountLocalTrigger(), this.setupDialog(), this.overlayMotion = Q.motion.createPresenceLifecycle({
10375
10398
  element: () => this.overlayEl(),
10376
10399
  preset: "fade"
10377
10400
  }), this.panelMotion = Q.motion.createPresenceLifecycle({
10378
10401
  element: () => this.panelEl(),
10379
- preset: "modal"
10402
+ preset: Wg(this.props)
10380
10403
  }), this.syncAll(), this.$watch("isOpen", (e) => {
10381
10404
  e ? this.applyOpenState() : this.applyClosedState();
10382
10405
  }), this.isOpen && queueMicrotask(() => this.applyOpenState());
@@ -10385,8 +10408,8 @@ var Sg = Y({ definition: {
10385
10408
  this.props.disconnect(), this.overlayMotion?.destroy(), this.panelMotion?.destroy(), this.hasScrollLock &&= (Pp(), !1), this.unregister(), this.teardownLocalTrigger(), this.teardown();
10386
10409
  },
10387
10410
  get root() {
10388
- return Q.props({ inputs: [Q.resolveStyle({
10389
- part: Sg.parts.instance,
10411
+ return Q.mergeBindings({ inputs: [Q.resolveStyle({
10412
+ part: zg.parts.instance,
10390
10413
  props: {},
10391
10414
  className: ""
10392
10415
  }), { "data-ui-modal-instance": "" }] });
@@ -10424,10 +10447,10 @@ var Sg = Y({ definition: {
10424
10447
  return Array.from(this.$el.children).find((e) => e instanceof HTMLElement && e.matches("[data-ui-modal-trigger]")) ?? null;
10425
10448
  },
10426
10449
  triggerTarget(e) {
10427
- return jg(e);
10450
+ return Yg(e);
10428
10451
  },
10429
10452
  focusableEls() {
10430
- return Array.from(this.panelEl().querySelectorAll(Tg)).filter(Ag);
10453
+ return Array.from(this.panelEl().querySelectorAll(Hg)).filter(Jg);
10431
10454
  },
10432
10455
  firstAutofocusEl() {
10433
10456
  return this.panelEl().querySelector("[autofocus]");
@@ -10493,10 +10516,10 @@ var Sg = Y({ definition: {
10493
10516
  }));
10494
10517
  },
10495
10518
  register() {
10496
- this.isRegistered ||= (Cg.add(this), !0);
10519
+ this.isRegistered ||= (Bg.add(this), !0);
10497
10520
  },
10498
10521
  unregister() {
10499
- Cg.delete(this), this.isRegistered = !1;
10522
+ Bg.delete(this), this.isRegistered = !1;
10500
10523
  },
10501
10524
  open(e) {
10502
10525
  if (e?.preventDefault(), this.props.disabled) return;
@@ -10521,30 +10544,30 @@ var Sg = Y({ definition: {
10521
10544
  });
10522
10545
  },
10523
10546
  syncExternalTrigger(e, t) {
10524
- if (Mg(e, this.isOpen), e.setAttribute("aria-controls", this.dialogId), e.setAttribute("data-ui-modal-trigger-target", this.dialogId), e.setAttribute("data-state", Eg(this.isOpen)), t || this.props.disabled) {
10525
- e.setAttribute("aria-disabled", "true"), e.setAttribute("data-disabled", ""), e instanceof HTMLButtonElement && (e.disabled = !0), e.matches(Tg) || (e.tabIndex = -1);
10547
+ if (Xg(e, this.isOpen), e.setAttribute("aria-controls", this.dialogId), e.setAttribute("data-ui-modal-trigger-target", this.dialogId), e.setAttribute("data-state", Ug(this.isOpen)), t || this.props.disabled) {
10548
+ e.setAttribute("aria-disabled", "true"), e.setAttribute("data-disabled", ""), e instanceof HTMLButtonElement && (e.disabled = !0), e.matches(Hg) || (e.tabIndex = -1);
10526
10549
  return;
10527
10550
  }
10528
- e.removeAttribute("aria-disabled"), e.removeAttribute("data-disabled"), e instanceof HTMLButtonElement && (e.disabled = !1), e.matches(Tg) || (e.tabIndex = 0);
10551
+ e.removeAttribute("aria-disabled"), e.removeAttribute("data-disabled"), e instanceof HTMLButtonElement && (e.disabled = !1), e.matches(Hg) || (e.tabIndex = 0);
10529
10552
  },
10530
10553
  syncAll() {
10531
10554
  this.syncDialog(), this.syncLocalTrigger(), this.syncNamedTriggers();
10532
10555
  },
10533
10556
  syncDialog() {
10534
- let e = this.dialogEl(), t = this.viewportEl(), n = this.overlayEl(), r = this.panelEl(), i = this.titleEl(), a = this.descriptionEl(), o = Eg(this.isOpen);
10535
- e.id = this.dialogId, e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.setAttribute("data-state", o), e.dataset.mode = this.props.mode, e.dataset.side = this.props.side, e.dataset.size = this.props.size, e.className = Q.resolveStyle({
10536
- part: Sg.parts.root,
10557
+ let e = this.dialogEl(), t = this.viewportEl(), n = this.overlayEl(), r = this.panelEl(), i = this.titleEl(), a = this.descriptionEl(), o = Ug(this.isOpen);
10558
+ e.id = this.dialogId, e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.setAttribute("data-state", o), e.dataset.mode = this.props.mode, e.dataset.side = this.props.side, e.dataset.size = this.props.size, e.dataset.surface = this.props.surface, e.dataset.tone = this.props.tone, e.className = Q.resolveStyle({
10559
+ part: zg.parts.root,
10537
10560
  props: this.props,
10538
10561
  className: this.props.class
10539
10562
  }), t.setAttribute("data-state", o), t.dataset.mode = this.props.mode, t.dataset.side = this.props.side, t.className = Q.resolveStyle({
10540
- part: Sg.parts.viewport,
10563
+ part: zg.parts.viewport,
10541
10564
  props: this.props
10542
10565
  }), n.setAttribute("data-state", o), n.className = Q.resolveStyle({
10543
- part: Sg.parts.overlay,
10566
+ part: zg.parts.overlay,
10544
10567
  props: this.props,
10545
10568
  className: this.props.overlayClass
10546
- }), r.id ||= this.$id(`modal-panel${this.props.name ? `-${this.props.name}` : ""}`), r.setAttribute("data-state", o), r.dataset.mode = this.props.mode, r.dataset.side = this.props.side, r.dataset.size = this.props.size, r.tabIndex = -1, r.className = Q.resolveStyle({
10547
- part: Sg.parts.panel,
10569
+ }), r.id ||= this.$id(`modal-panel${this.props.name ? `-${this.props.name}` : ""}`), r.setAttribute("data-state", o), r.dataset.mode = this.props.mode, r.dataset.side = this.props.side, r.dataset.size = this.props.size, r.dataset.surface = this.props.surface, r.dataset.tone = this.props.tone, r.tabIndex = -1, r.className = Q.resolveStyle({
10570
+ part: zg.parts.panel,
10548
10571
  props: this.props,
10549
10572
  className: this.props.panelClass
10550
10573
  }), i ? (i.id ||= this.$id(`modal-title${this.props.name ? `-${this.props.name}` : ""}`), e.setAttribute("aria-labelledby", i.id), e.removeAttribute("aria-label"), this.props.autofocusTitle && (i.tabIndex = -1)) : this.props.label && (e.setAttribute("aria-label", this.props.label), e.removeAttribute("aria-labelledby")), a && (a.id ||= this.$id(`modal-description${this.props.name ? `-${this.props.name}` : ""}`)), this.props.descriptionId === "none" ? e.removeAttribute("aria-describedby") : this.props.descriptionId ? e.setAttribute("aria-describedby", this.props.descriptionId) : a && e.setAttribute("aria-describedby", a.id);
@@ -10554,7 +10577,7 @@ var Sg = Y({ definition: {
10554
10577
  e && this.syncExternalTrigger(this.triggerTarget(e), this.props.disabled);
10555
10578
  },
10556
10579
  syncNamedTriggers() {
10557
- this.props.name && Og(this.props.name).forEach((e) => e.sync());
10580
+ this.props.name && Kg(this.props.name).forEach((e) => e.sync());
10558
10581
  },
10559
10582
  applyOpenState() {
10560
10583
  this.modalMotionRun += 1;
@@ -10580,7 +10603,7 @@ var Sg = Y({ definition: {
10580
10603
  },
10581
10604
  focusInitial() {
10582
10605
  let e = this.firstAutofocusEl();
10583
- if (e && Ag(e)) {
10606
+ if (e && Jg(e)) {
10584
10607
  e.focus({ preventScroll: !0 });
10585
10608
  return;
10586
10609
  }
@@ -10623,7 +10646,7 @@ var Sg = Y({ definition: {
10623
10646
  teardown() {
10624
10647
  this.cleanup.forEach((e) => e()), this.cleanup = [];
10625
10648
  }
10626
- }), Pg = () => ({
10649
+ }), Qg = () => ({
10627
10650
  props: null,
10628
10651
  target: null,
10629
10652
  cleanup: [],
@@ -10633,8 +10656,8 @@ var Sg = Y({ definition: {
10633
10656
  init() {
10634
10657
  this.props = W({
10635
10658
  el: this.$el,
10636
- schema: xg
10637
- }), this.target = this.targetEl(), wg.add(this), this.sync(), Q.addListener({
10659
+ schema: Ig
10660
+ }), this.target = this.targetEl(), Vg.add(this), this.sync(), Q.addListener({
10638
10661
  target: this.target,
10639
10662
  event: "click",
10640
10663
  handler: (e) => this.open(e),
@@ -10649,11 +10672,11 @@ var Sg = Y({ definition: {
10649
10672
  });
10650
10673
  },
10651
10674
  destroy() {
10652
- this.props.disconnect(), wg.delete(this), this.cleanup.forEach((e) => e()), this.cleanup = [];
10675
+ this.props.disconnect(), Vg.delete(this), this.cleanup.forEach((e) => e()), this.cleanup = [];
10653
10676
  },
10654
10677
  get root() {
10655
- return Q.props({ inputs: [Q.resolveStyle({
10656
- part: Sg.parts.trigger,
10678
+ return Q.mergeBindings({ inputs: [Q.resolveStyle({
10679
+ part: zg.parts.trigger,
10657
10680
  props: {},
10658
10681
  className: this.props.class
10659
10682
  }), {
@@ -10668,44 +10691,44 @@ var Sg = Y({ definition: {
10668
10691
  e.syncExternalTrigger(this.target, this.props.disabled);
10669
10692
  return;
10670
10693
  }
10671
- Mg(this.target, !1), this.props.disabled ? (this.target.setAttribute("aria-disabled", "true"), this.target.setAttribute("data-disabled", "")) : (this.target.removeAttribute("aria-disabled"), this.target.removeAttribute("data-disabled"));
10694
+ Xg(this.target, !1), this.props.disabled ? (this.target.setAttribute("aria-disabled", "true"), this.target.setAttribute("data-disabled", "")) : (this.target.removeAttribute("aria-disabled"), this.target.removeAttribute("data-disabled"));
10672
10695
  },
10673
10696
  modal() {
10674
- return this.props.name ? Dg(this.props.name) : null;
10697
+ return this.props.name ? Gg(this.props.name) : null;
10675
10698
  },
10676
10699
  open(e) {
10677
10700
  e?.preventDefault(), !this.props.disabled && this.modal()?.openFrom(this.target);
10678
10701
  },
10679
10702
  targetEl() {
10680
- return jg(this.$el);
10703
+ return Yg(this.$el);
10681
10704
  }
10682
- }), Fg = (e) => {
10683
- e.data("UiModal", () => Ng()), e.data("UiModalTrigger", () => Pg()), document.addEventListener("ui:modal-close", kg);
10684
- }, Ig = Hp, Lg = [
10705
+ }), $g = (e) => {
10706
+ e.data("UiModal", () => Zg()), e.data("UiModalTrigger", () => Qg()), document.addEventListener("ui:modal-close", qg);
10707
+ }, e_ = Hp, t_ = [
10685
10708
  "default",
10686
10709
  "cards",
10687
10710
  "pills"
10688
- ], Rg = Up, zg = Fp, Bg = [
10711
+ ], n_ = Up, r_ = Fp, i_ = [
10689
10712
  "default",
10690
10713
  "cards",
10691
10714
  "pills"
10692
- ], Vg = {
10715
+ ], a_ = {
10693
10716
  name: G,
10694
10717
  value: G,
10695
- orientation: J(Ig, "vertical"),
10696
- variant: J(Lg, "default"),
10718
+ orientation: J(e_, "vertical"),
10719
+ variant: J(t_, "default"),
10697
10720
  indicator: q.default(!0),
10698
- placement: J(Rg, "leading"),
10721
+ placement: J(n_, "leading"),
10699
10722
  disabled: q,
10700
10723
  required: q,
10701
10724
  invalid: q,
10702
10725
  loop: q.default(!0),
10703
10726
  class: G
10704
10727
  };
10705
- q.default(!0), J(Rg, "leading"), J(Bg, "default"), J(zg, "md"), J(zg, "md");
10728
+ q.default(!0), J(n_, "leading"), J(i_, "default"), J(r_, "md"), J(r_, "md");
10706
10729
  //#endregion
10707
10730
  //#region src/components/radio/index.ts
10708
- var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug = () => ({
10731
+ var o_ = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", s_ = () => ({
10709
10732
  props: null,
10710
10733
  value: "",
10711
10734
  listeners: [],
@@ -10713,7 +10736,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
10713
10736
  init() {
10714
10737
  this.props = W({
10715
10738
  el: this.$el,
10716
- schema: Vg
10739
+ schema: a_
10717
10740
  });
10718
10741
  let e = this.items().find((e) => e.input.checked);
10719
10742
  this.value = this.props.value || e?.value || "", Q.addListener({
@@ -10754,7 +10777,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
10754
10777
  input: t,
10755
10778
  indicator: e.querySelector("[data-ui-radio-indicator]"),
10756
10779
  dot: e.querySelector("[data-ui-radio-indicator-dot]"),
10757
- value: Hg(e, t),
10780
+ value: o_(e, t),
10758
10781
  disabled: n
10759
10782
  };
10760
10783
  }).filter((e) => e !== null);
@@ -10858,9 +10881,9 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
10858
10881
  }
10859
10882
  ["ArrowUp", "ArrowLeft"].includes(t.key) && (t.preventDefault(), this.move(e, -1)), ["ArrowDown", "ArrowRight"].includes(t.key) && (t.preventDefault(), this.move(e, 1));
10860
10883
  }
10861
- }), Wg = (e) => {
10862
- e.data("UiRadioGroup", () => Ug());
10863
- }, Gg = {
10884
+ }), c_ = (e) => {
10885
+ e.data("UiRadioGroup", () => s_());
10886
+ }, l_ = {
10864
10887
  orientation: J([
10865
10888
  "vertical",
10866
10889
  "horizontal",
@@ -10880,7 +10903,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
10880
10903
  scrollbarClass: G,
10881
10904
  thumbClass: G,
10882
10905
  cornerClass: G
10883
- }, Kg = Y({ definition: {
10906
+ }, u_ = Y({ definition: {
10884
10907
  component: "ui.scroll-area",
10885
10908
  parts: {
10886
10909
  root: {
@@ -10949,27 +10972,27 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
10949
10972
  "data-visible:opacity-100"
10950
10973
  ] }
10951
10974
  }
10952
- } }), qg = 18, Jg = 1e3, Yg = null, Xg = (e, t, n) => Math.min(n, Math.max(t, e)), Zg = (e, t) => e === "both" || e === "horizontal" && t === "x" || e === "vertical" && t === "y", Qg = () => {
10953
- if (Yg) return Yg;
10975
+ } }), d_ = 18, f_ = 1e3, p_ = null, m_ = (e, t, n) => Math.min(n, Math.max(t, e)), h_ = (e, t) => e === "both" || e === "horizontal" && t === "x" || e === "vertical" && t === "y", g_ = () => {
10976
+ if (p_) return p_;
10954
10977
  let e = document.createElement("div"), t = document.createElement("div");
10955
- return e.dir = "rtl", e.style.cssText = "position:absolute;left:-9999px;width:4px;height:1px;overflow:scroll;", t.style.cssText = "width:8px;height:1px;", e.append(t), document.body.append(e), e.scrollLeft = 1, e.scrollLeft === 0 ? Yg = "negative" : (e.scrollLeft = 0, Yg = e.scrollLeft === 0 ? "reverse" : "default"), e.remove(), Yg;
10956
- }, $g = (e) => {
10978
+ return e.dir = "rtl", e.style.cssText = "position:absolute;left:-9999px;width:4px;height:1px;overflow:scroll;", t.style.cssText = "width:8px;height:1px;", e.append(t), document.body.append(e), e.scrollLeft = 1, e.scrollLeft === 0 ? p_ = "negative" : (e.scrollLeft = 0, p_ = e.scrollLeft === 0 ? "reverse" : "default"), e.remove(), p_;
10979
+ }, __ = (e) => {
10957
10980
  let t = Math.max(0, e.scrollWidth - e.clientWidth);
10958
10981
  if (!Q.isRtl({ el: e })) return e.scrollLeft;
10959
- let n = Qg();
10982
+ let n = g_();
10960
10983
  return n === "negative" ? -e.scrollLeft : n === "reverse" ? t - e.scrollLeft : e.scrollLeft;
10961
- }, e_ = (e, t) => {
10962
- let n = Math.max(0, e.scrollWidth - e.clientWidth), r = Xg(t, 0, n);
10984
+ }, v_ = (e, t) => {
10985
+ let n = Math.max(0, e.scrollWidth - e.clientWidth), r = m_(t, 0, n);
10963
10986
  if (!Q.isRtl({ el: e })) {
10964
10987
  e.scrollLeft = r;
10965
10988
  return;
10966
10989
  }
10967
- let i = Qg();
10990
+ let i = g_();
10968
10991
  i === "negative" ? e.scrollLeft = -r : i === "reverse" ? e.scrollLeft = n - r : e.scrollLeft = r;
10969
- }, t_ = (e) => e.dataset.orientation === "horizontal" ? "x" : "y", n_ = (e) => e instanceof HTMLElement, r_ = (e, t) => {
10992
+ }, y_ = (e) => e.dataset.orientation === "horizontal" ? "x" : "y", b_ = (e) => e instanceof HTMLElement, x_ = (e, t) => {
10970
10993
  let n = e.querySelector(`:scope > ${t}`);
10971
- return n_(n) ? n : null;
10972
- }, i_ = () => ({
10994
+ return b_(n) ? n : null;
10995
+ }, S_ = () => ({
10973
10996
  props: null,
10974
10997
  listeners: [],
10975
10998
  resizeObserver: null,
@@ -10988,7 +11011,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
10988
11011
  init() {
10989
11012
  this.props = W({
10990
11013
  el: this.$el,
10991
- schema: Gg
11014
+ schema: l_
10992
11015
  });
10993
11016
  let e = this.elements();
10994
11017
  this.resizeObserver = new ResizeObserver(() => this.scheduleSync()), this.resizeObserver.observe(e.viewport), e.content && this.resizeObserver.observe(e.content), this.mutationObserver = new MutationObserver(() => this.scheduleSync()), e.content && this.mutationObserver.observe(e.content, {
@@ -11064,8 +11087,8 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11064
11087
  this.props.disconnect(), this.listeners.splice(0).forEach((e) => e()), this.resizeObserver?.disconnect(), this.mutationObserver?.disconnect(), this.clearFadeTimer(), this.frame && cancelAnimationFrame(this.frame), this.positionFrame && cancelAnimationFrame(this.positionFrame), this.frame = 0, this.positionFrame = 0, this.dragging = null;
11065
11088
  },
11066
11089
  get root() {
11067
- return Q.props({ inputs: [X({
11068
- part: Kg.parts.root,
11090
+ return Q.mergeBindings({ inputs: [X({
11091
+ part: u_.parts.root,
11069
11092
  props: {
11070
11093
  fill: this.props.fill,
11071
11094
  size: this.props.size
@@ -11081,8 +11104,8 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11081
11104
  }] });
11082
11105
  },
11083
11106
  viewport(e) {
11084
- return Q.props({ inputs: [X({
11085
- part: Kg.parts.viewport,
11107
+ return Q.mergeBindings({ inputs: [X({
11108
+ part: u_.parts.viewport,
11086
11109
  props: {
11087
11110
  orientation: this.props.orientation,
11088
11111
  fill: this.props.fill
@@ -11096,9 +11119,9 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11096
11119
  }] });
11097
11120
  },
11098
11121
  scrollbar(e) {
11099
- let t = t_(e) === "x" ? "horizontal" : "vertical";
11100
- return Q.props({ inputs: [X({
11101
- part: Kg.parts.scrollbar,
11122
+ let t = y_(e) === "x" ? "horizontal" : "vertical";
11123
+ return Q.mergeBindings({ inputs: [X({
11124
+ part: u_.parts.scrollbar,
11102
11125
  props: { orientation: t },
11103
11126
  className: e.dataset.class
11104
11127
  }), {
@@ -11108,9 +11131,9 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11108
11131
  }] });
11109
11132
  },
11110
11133
  thumb(e) {
11111
- let t = t_(e), n = t === "x" ? "horizontal" : "vertical";
11112
- return Q.props({ inputs: [X({
11113
- part: Kg.parts.thumb,
11134
+ let t = y_(e), n = t === "x" ? "horizontal" : "vertical";
11135
+ return Q.mergeBindings({ inputs: [X({
11136
+ part: u_.parts.thumb,
11114
11137
  props: { orientation: n },
11115
11138
  className: e.dataset.class
11116
11139
  }), {
@@ -11121,8 +11144,8 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11121
11144
  }] });
11122
11145
  },
11123
11146
  corner(e) {
11124
- return Q.props({ inputs: [X({
11125
- part: Kg.parts.corner,
11147
+ return Q.mergeBindings({ inputs: [X({
11148
+ part: u_.parts.corner,
11126
11149
  className: e.dataset.class
11127
11150
  }), {
11128
11151
  "data-ui-scroll-area-corner": "",
@@ -11130,16 +11153,16 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11130
11153
  }] });
11131
11154
  },
11132
11155
  elements() {
11133
- let e = this.$el, t = r_(e, "[data-ui-scroll-area-viewport]") ?? e;
11156
+ let e = this.$el, t = x_(e, "[data-ui-scroll-area-viewport]") ?? e;
11134
11157
  return {
11135
11158
  root: e,
11136
11159
  viewport: t,
11137
- content: r_(t, "[data-ui-scroll-area-content]"),
11138
- verticalScrollbar: r_(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"vertical\"]"),
11139
- horizontalScrollbar: r_(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"horizontal\"]"),
11140
- verticalThumb: r_(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"vertical\"] > [data-ui-scroll-area-thumb][data-orientation=\"vertical\"]"),
11141
- horizontalThumb: r_(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"horizontal\"] > [data-ui-scroll-area-thumb][data-orientation=\"horizontal\"]"),
11142
- corner: r_(e, "[data-ui-scroll-area-corner]")
11160
+ content: x_(t, "[data-ui-scroll-area-content]"),
11161
+ verticalScrollbar: x_(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"vertical\"]"),
11162
+ horizontalScrollbar: x_(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"horizontal\"]"),
11163
+ verticalThumb: x_(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"vertical\"] > [data-ui-scroll-area-thumb][data-orientation=\"vertical\"]"),
11164
+ horizontalThumb: x_(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"horizontal\"] > [data-ui-scroll-area-thumb][data-orientation=\"horizontal\"]"),
11165
+ corner: x_(e, "[data-ui-scroll-area-corner]")
11143
11166
  };
11144
11167
  },
11145
11168
  scheduleSync() {
@@ -11154,7 +11177,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11154
11177
  },
11155
11178
  sync() {
11156
11179
  let e = this.elements(), { viewport: t } = e;
11157
- this.overflowX = Zg(this.props.orientation, "x") && t.scrollWidth > t.clientWidth + 1, this.overflowY = Zg(this.props.orientation, "y") && t.scrollHeight > t.clientHeight + 1, Q.setPresence({
11180
+ this.overflowX = h_(this.props.orientation, "x") && t.scrollWidth > t.clientWidth + 1, this.overflowY = h_(this.props.orientation, "y") && t.scrollHeight > t.clientHeight + 1, Q.setPresence({
11158
11181
  el: this.$el,
11159
11182
  attr: "data-overflow-x",
11160
11183
  present: this.overflowX
@@ -11187,7 +11210,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11187
11210
  updateGeometry(e) {
11188
11211
  let { viewport: t } = e, n = (e, n, r, i) => {
11189
11212
  if (!n || !r || !i) return r && (r.style.width = "", r.style.height = "", r.style.transform = ""), null;
11190
- let a = e === "y" ? n.clientHeight : n.clientWidth, o = e === "y" ? t.clientHeight : t.clientWidth, s = e === "y" ? t.scrollHeight : t.scrollWidth, c = Math.max(1, s - o), l = Math.min(a, Math.max(qg, o / s * a)), u = Math.max(0, a - l);
11213
+ let a = e === "y" ? n.clientHeight : n.clientWidth, o = e === "y" ? t.clientHeight : t.clientWidth, s = e === "y" ? t.scrollHeight : t.scrollWidth, c = Math.max(1, s - o), l = Math.min(a, Math.max(d_, o / s * a)), u = Math.max(0, a - l);
11191
11214
  return e === "y" ? (r.style.height = `${l}px`, r.style.width = "") : (r.style.width = `${l}px`, r.style.height = ""), {
11192
11215
  trackLength: a,
11193
11216
  thumbLength: l,
@@ -11200,11 +11223,11 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11200
11223
  updateThumbPositions(e) {
11201
11224
  let { viewport: t } = e;
11202
11225
  if (e.verticalThumb && this.verticalGeometry) {
11203
- let { maxOffset: n, maxScroll: r } = this.verticalGeometry, i = n * Xg(t.scrollTop / r, 0, 1);
11226
+ let { maxOffset: n, maxScroll: r } = this.verticalGeometry, i = n * m_(t.scrollTop / r, 0, 1);
11204
11227
  e.verticalThumb.style.transform = `translate3d(0, ${i}px, 0)`;
11205
11228
  }
11206
11229
  if (e.horizontalThumb && this.horizontalGeometry) {
11207
- let { maxOffset: n, maxScroll: r } = this.horizontalGeometry, i = n * Xg($g(t) / r, 0, 1);
11230
+ let { maxOffset: n, maxScroll: r } = this.horizontalGeometry, i = n * m_(__(t) / r, 0, 1);
11208
11231
  e.horizontalThumb.style.transform = `translate3d(${i}px, 0, 0)`;
11209
11232
  }
11210
11233
  },
@@ -11232,7 +11255,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11232
11255
  e && Q.setPresence({
11233
11256
  el: e,
11234
11257
  attr: "data-dragging",
11235
- present: this.dragging?.axis === t_(e)
11258
+ present: this.dragging?.axis === y_(e)
11236
11259
  });
11237
11260
  }), e.corner && Q.setPresence({
11238
11261
  el: e.corner,
@@ -11247,7 +11270,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11247
11270
  attr: "data-scrolling",
11248
11271
  present: !1
11249
11272
  }), this.updateVisibility(this.elements());
11250
- }, Jg);
11273
+ }, f_);
11251
11274
  },
11252
11275
  clearFadeTimer() {
11253
11276
  this.fadeTimer &&= (window.clearTimeout(this.fadeTimer), 0);
@@ -11264,7 +11287,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11264
11287
  if (this.props.disabled) return;
11265
11288
  let n = this.elements(), r = n.viewport, i = t === "y" ? n.verticalScrollbar : n.horizontalScrollbar, a = t === "y" ? n.verticalThumb : n.horizontalThumb, o = t === "y" ? this.overflowY : this.overflowX;
11266
11289
  if (!i || !a || !o) return;
11267
- let s = t === "y" ? i.clientHeight : i.clientWidth, c = t === "y" ? a.offsetHeight : a.offsetWidth, l = t === "y" ? Math.max(0, r.scrollHeight - r.clientHeight) : Math.max(0, r.scrollWidth - r.clientWidth), u = t === "y" ? r.scrollTop : $g(r);
11290
+ let s = t === "y" ? i.clientHeight : i.clientWidth, c = t === "y" ? a.offsetHeight : a.offsetWidth, l = t === "y" ? Math.max(0, r.scrollHeight - r.clientHeight) : Math.max(0, r.scrollWidth - r.clientWidth), u = t === "y" ? r.scrollTop : __(r);
11268
11291
  this.dragging = {
11269
11292
  axis: t,
11270
11293
  pointerId: e.pointerId,
@@ -11283,7 +11306,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11283
11306
  if (!this.dragging || this.dragging.pointerId !== e.pointerId) return;
11284
11307
  e.preventDefault();
11285
11308
  let t = this.elements().viewport, n = (this.dragging.axis === "y" ? e.clientY : e.clientX) - this.dragging.startPointer, r = Math.max(1, this.dragging.trackLength - this.dragging.thumbLength), i = this.dragging.startScroll + n / r * this.dragging.maxScroll;
11286
- this.dragging.axis === "y" ? t.scrollTop = Xg(i, 0, this.dragging.maxScroll) : e_(t, i), this.schedulePositionSync();
11309
+ this.dragging.axis === "y" ? t.scrollTop = m_(i, 0, this.dragging.maxScroll) : v_(t, i), this.schedulePositionSync();
11287
11310
  },
11288
11311
  onPointerUp(e) {
11289
11312
  if (!this.dragging || this.dragging.pointerId !== e.pointerId) return;
@@ -11293,9 +11316,9 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11293
11316
  } catch {}
11294
11317
  this.dragging = null, this.startFadeTimer(), this.sync();
11295
11318
  }
11296
- }), a_ = (e) => {
11297
- e.data("UiScrollArea", () => i_());
11298
- }, o_ = Y({ definition: {
11319
+ }), C_ = (e) => {
11320
+ e.data("UiScrollArea", () => S_());
11321
+ }, w_ = Y({ definition: {
11299
11322
  component: "ui.badge",
11300
11323
  parts: {
11301
11324
  root: {
@@ -11306,8 +11329,8 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11306
11329
  ],
11307
11330
  variants: {
11308
11331
  variant: {
11309
- soft: "bg-base-a2 text-foreground-muted",
11310
- surface: "bg-surface text-foreground shadow-border",
11332
+ soft: "bg-current/10 text-foreground-muted",
11333
+ surface: "bg-surface-panel text-foreground shadow-border",
11311
11334
  outline: "border border-border bg-transparent text-foreground-muted",
11312
11335
  solid: "bg-base-12 text-base-1 shadow-1"
11313
11336
  },
@@ -11325,10 +11348,6 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11325
11348
  lg: "min-h-control-lg px-3 text-sm",
11326
11349
  xlg: "min-h-control-xlg px-4 text-sm"
11327
11350
  },
11328
- rounded: {
11329
- true: "rounded-full",
11330
- false: "rounded-2"
11331
- },
11332
11351
  insetLeft: {
11333
11352
  true: "",
11334
11353
  false: ""
@@ -11352,56 +11371,56 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11352
11371
  variant: "soft",
11353
11372
  color: "accent"
11354
11373
  },
11355
- class: "bg-accent-surface text-accent-text"
11374
+ class: "text-accent-text"
11356
11375
  },
11357
11376
  {
11358
11377
  when: {
11359
11378
  variant: "soft",
11360
11379
  color: "success"
11361
11380
  },
11362
- class: "bg-success-surface text-success-text"
11381
+ class: "text-success-text"
11363
11382
  },
11364
11383
  {
11365
11384
  when: {
11366
11385
  variant: "soft",
11367
11386
  color: "warning"
11368
11387
  },
11369
- class: "bg-warning-surface text-warning-text"
11388
+ class: "text-warning-text"
11370
11389
  },
11371
11390
  {
11372
11391
  when: {
11373
11392
  variant: "soft",
11374
11393
  color: "danger"
11375
11394
  },
11376
- class: "bg-danger-surface text-danger-text"
11395
+ class: "text-danger-text"
11377
11396
  },
11378
11397
  {
11379
11398
  when: {
11380
11399
  variant: "surface",
11381
11400
  color: "accent"
11382
11401
  },
11383
- class: "border border-accent-border bg-surface text-accent-text shadow-none"
11402
+ class: "border border-accent-border bg-surface-panel text-accent-text shadow-none"
11384
11403
  },
11385
11404
  {
11386
11405
  when: {
11387
11406
  variant: "surface",
11388
11407
  color: "success"
11389
11408
  },
11390
- class: "border border-success-border bg-surface text-success-text shadow-none"
11409
+ class: "border border-success-border bg-surface-panel text-success-text shadow-none"
11391
11410
  },
11392
11411
  {
11393
11412
  when: {
11394
11413
  variant: "surface",
11395
11414
  color: "warning"
11396
11415
  },
11397
- class: "border border-warning-border bg-surface text-warning-text shadow-none"
11416
+ class: "border border-warning-border bg-surface-panel text-warning-text shadow-none"
11398
11417
  },
11399
11418
  {
11400
11419
  when: {
11401
11420
  variant: "surface",
11402
11421
  color: "danger"
11403
11422
  },
11404
- class: "border border-danger-border bg-surface text-danger-text shadow-none"
11423
+ class: "border border-danger-border bg-surface-panel text-danger-text shadow-none"
11405
11424
  },
11406
11425
  {
11407
11426
  when: {
@@ -11459,6 +11478,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11459
11478
  },
11460
11479
  class: "bg-danger-solid text-danger-contrast shadow-1"
11461
11480
  },
11481
+ ...Qp,
11462
11482
  {
11463
11483
  when: {
11464
11484
  insetLeft: !0,
@@ -11506,7 +11526,7 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11506
11526
  variant: "soft",
11507
11527
  color: "neutral",
11508
11528
  size: "sm",
11509
- rounded: !1,
11529
+ radius: "sm",
11510
11530
  insetLeft: !1,
11511
11531
  insetRight: !1,
11512
11532
  insetTop: !1,
@@ -11551,39 +11571,43 @@ var Hg = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Ug
11551
11571
  },
11552
11572
  closeIcon: { base: "size-icon-xs shrink-0 fill-current text-current" }
11553
11573
  }
11554
- } }), s_ = [
11574
+ } }), T_ = [
11555
11575
  "soft",
11556
11576
  "surface",
11557
11577
  "outline",
11558
11578
  "solid"
11559
- ], c_ = [
11579
+ ], E_ = [
11560
11580
  "neutral",
11561
11581
  "accent",
11562
11582
  "success",
11563
11583
  "warning",
11564
11584
  "danger"
11565
- ], l_ = Fp, u_ = ["span", "button"], d_ = Rp, f_ = Lp;
11566
- J(s_, "soft"), J(c_, "neutral"), J(l_, "sm"), J(u_, "span"), J(d_, "button"), J(f_, "mini"), J(d_, "button"), G.default("close"), J(f_, "mini"), J(l_, "sm"), G.default("Remove");
11585
+ ], D_ = Fp, O_ = ["span", "button"], k_ = Rp, A_ = Lp, j_ = qp;
11586
+ J(T_, "soft"), J(E_, "neutral"), J(D_, "sm"), J(j_, "sm"), J(O_, "span"), J(k_, "button"), J(A_, "mini"), J(k_, "button"), G.default("close"), J(A_, "mini"), J(D_, "sm"), G.default("Remove");
11567
11587
  //#endregion
11568
11588
  //#region src/components/select/contract.ts
11569
- var p_ = [
11589
+ var M_ = [
11570
11590
  "listbox",
11571
11591
  "combobox",
11572
11592
  "pillbox",
11573
11593
  "native"
11574
- ], m_ = Ip, h_ = Fp, g_ = Bp, __ = zp, v_ = Lp, y_ = {
11594
+ ], N_ = Ip, P_ = Fp, F_ = qp, I_ = Bp, L_ = zp, R_ = Lp, z_ = {
11575
11595
  name: G,
11576
11596
  value: G,
11577
11597
  values: G,
11578
11598
  placeholder: G,
11579
- mode: J(p_, "listbox"),
11599
+ mode: J(M_, "listbox"),
11580
11600
  multiple: q,
11581
11601
  searchable: q,
11582
11602
  filter: q.default(!0),
11583
11603
  clearable: q,
11584
11604
  clear: J(["stay", "close"], "stay"),
11585
11605
  suffix: G.default("selected"),
11586
- mark: J(["check", "checkbox"], "check"),
11606
+ mark: J([
11607
+ "check",
11608
+ "checkbox",
11609
+ "none"
11610
+ ], "check"),
11587
11611
  open: q,
11588
11612
  disabled: q,
11589
11613
  readonly: q,
@@ -11592,10 +11616,11 @@ var p_ = [
11592
11616
  autoHighlight: q.default(!0),
11593
11617
  loop: q.default(!0),
11594
11618
  path: G,
11595
- size: J(h_, "lg"),
11596
- variant: J(m_, "outline"),
11597
- side: J(g_, "bottom"),
11598
- align: J(__, "start"),
11619
+ size: J(P_, "lg"),
11620
+ variant: J(N_, "outline"),
11621
+ radius: J(F_, "md"),
11622
+ side: J(I_, "bottom"),
11623
+ align: J(L_, "start"),
11599
11624
  offset: K.clamp(-100, 100).default(0),
11600
11625
  gap: K.clamp(0, 50).default(4),
11601
11626
  empty: G.default("No results found."),
@@ -11603,33 +11628,33 @@ var p_ = [
11603
11628
  searchIcon: G.default("search"),
11604
11629
  icon: G,
11605
11630
  iconTrailing: G.default("chevron__down"),
11606
- iconVariant: J(v_, "outline"),
11631
+ iconVariant: J(R_, "outline"),
11607
11632
  buttonClass: G,
11608
11633
  inputClass: G,
11609
11634
  searchClass: G,
11610
11635
  listboxClass: G,
11611
11636
  optionClass: G,
11612
- chipVariant: J(s_, "soft"),
11613
- chipColor: J(c_, "neutral"),
11637
+ chipVariant: J(T_, "soft"),
11638
+ chipColor: J(E_, "neutral"),
11614
11639
  chipClass: G,
11615
11640
  class: G
11616
11641
  };
11617
- J(v_, "outline"), K.clamp(0, 100).default(0);
11642
+ J(R_, "outline"), K.clamp(0, 100).default(0);
11618
11643
  //#endregion
11619
11644
  //#region src/components/select/styles.ts
11620
- var b_ = Y({ definition: {
11645
+ var B_ = Y({ definition: {
11621
11646
  component: "ui.select",
11622
11647
  parts: {
11623
11648
  root: { base: "relative inline-grid w-full min-w-0" },
11624
11649
  control: {
11625
- base: [Kp, qp],
11650
+ base: [$p, em],
11626
11651
  variants: {
11627
- size: Jp,
11628
- variant: Yp,
11652
+ size: tm,
11653
+ variant: nm,
11629
11654
  mode: {
11630
11655
  listbox: "",
11631
11656
  combobox: "",
11632
- pillbox: "flex-wrap gap-1 py-1",
11657
+ pillbox: "flex-wrap gap-1 py-0.5",
11633
11658
  native: ""
11634
11659
  },
11635
11660
  empty: {
@@ -11643,10 +11668,11 @@ var b_ = Y({ definition: {
11643
11668
  empty: !1
11644
11669
  },
11645
11670
  class: "!pl-1.5"
11646
- }],
11671
+ }, ...Qp],
11647
11672
  defaults: {
11648
11673
  size: "lg",
11649
11674
  variant: "outline",
11675
+ radius: "md",
11650
11676
  mode: "listbox",
11651
11677
  empty: !1
11652
11678
  }
@@ -11654,9 +11680,9 @@ var b_ = Y({ definition: {
11654
11680
  button: { base: ["flex min-w-0 flex-1 items-center gap-2 border-0 bg-transparent p-0 text-left text-inherit outline-none", "disabled:cursor-not-allowed"] },
11655
11681
  value: { base: "min-w-0 flex-1" },
11656
11682
  placeholder: { base: "min-w-0 flex-1 text-foreground" },
11657
- input: { base: ["w-full min-w-16 flex-1", Xp] },
11683
+ input: { base: ["w-full min-w-16 flex-1", rm] },
11658
11684
  search: { base: ["flex min-h-control-xlg shrink-0 items-center gap-2 border-b border-popover-border px-3", "text-sm text-foreground"] },
11659
- searchInput: { base: ["min-w-0 flex-1 text-sm", Xp] },
11685
+ searchInput: { base: ["min-w-0 flex-1 text-sm", rm] },
11660
11686
  chips: { base: "flex min-w-0 flex-wrap items-center gap-1" },
11661
11687
  chip: { base: ["max-w-64"] },
11662
11688
  chipLabel: { base: "block min-w-0 flex-1 truncate" },
@@ -11669,48 +11695,61 @@ var b_ = Y({ definition: {
11669
11695
  } },
11670
11696
  defaults: { position: "leading" }
11671
11697
  },
11672
- action: { base: Zp },
11673
- popover: { base: [$p, "max-h-combobox-listbox overflow-hidden"] },
11674
- viewport: { base: "grid auto-rows-min content-start max-h-combobox-listbox gap-1 overflow-auto p-popover" },
11675
- option: { base: tm },
11676
- optionLabel: { base: "min-w-0 flex-1" },
11698
+ action: { base: im },
11699
+ popover: { base: [om, "overflow-hidden"] },
11700
+ viewport: { base: "grid auto-rows-min content-start max-h-combobox-listbox gap-1 overflow-x-hidden overflow-y-auto p-popover" },
11701
+ option: { base: [
11702
+ cm,
11703
+ "[&:has([data-ui-select-option-label]>*+*)]:h-auto",
11704
+ "[&:has([data-ui-select-option-label]>*+*)]:items-start",
11705
+ "[&:has([data-ui-select-option-label]>*+*)]:py-2"
11706
+ ] },
11707
+ optionLabel: { base: "min-w-0 flex-1 truncate" },
11677
11708
  optionMeta: { base: "ml-auto text-menu-item-muted" },
11678
11709
  optionIcon: {
11679
- base: nm,
11710
+ base: lm,
11680
11711
  variants: { position: {
11681
11712
  leading: "",
11682
11713
  trailing: "ml-auto"
11683
11714
  } },
11684
11715
  defaults: { position: "leading" }
11685
11716
  },
11686
- optionIndicator: { base: rm },
11687
- optionCheckbox: { base: ["ml-auto inline-flex size-icon-sm shrink-0 items-center justify-center rounded-1 border border-border bg-surface text-accent-contrast", "data-selected:border-accent-solid data-selected:bg-accent-solid"] },
11717
+ optionIndicator: { base: um },
11718
+ optionCheckbox: { base: ["ml-auto inline-flex size-icon-sm shrink-0 items-center justify-center rounded-1 border border-border bg-surface-panel text-accent-contrast", "data-selected:border-accent-solid data-selected:bg-accent-solid"] },
11688
11719
  group: { base: "grid auto-rows-min content-start gap-1" },
11689
11720
  label: { base: "px-menu-item-x py-1 text-menu-heading-fg" },
11690
11721
  empty: { base: "px-menu-item-x py-2 text-sm text-foreground-muted" },
11691
11722
  separatorRoot: { base: "-mx-popover my-popover h-px" },
11692
11723
  separatorRule: { base: "h-px w-full border-0 bg-menu-separator" },
11693
11724
  nativeWrapper: { base: "relative w-full min-w-0" },
11694
- native: { base: [Qp, "appearance-none pe-10"] },
11725
+ native: {
11726
+ base: [am, "appearance-none pe-10"],
11727
+ variants: { size: tm },
11728
+ compounds: Qp,
11729
+ defaults: {
11730
+ size: "lg",
11731
+ radius: "md"
11732
+ }
11733
+ },
11695
11734
  nativeIcon: { base: "pointer-events-none absolute right-3 top-1/2 size-icon -translate-y-1/2 fill-current text-icon" }
11696
11735
  }
11697
- } }), x_ = "[data-ui-select-option], [data-ui-select-option-create]", S_ = "template[data-ui-select-option-selected-template]", C_ = /* @__PURE__ */ new WeakSet(), w_ = (e, t) => e.composedPath().some((e) => e instanceof Element && e.matches(t)), T_ = (e) => {
11736
+ } }), V_ = "[data-ui-select-option], [data-ui-select-option-create]", H_ = "template[data-ui-select-option-selected-template]", U_ = /* @__PURE__ */ new WeakSet(), W_ = (e, t) => e.composedPath().some((e) => e instanceof Element && e.matches(t)), G_ = (e) => {
11698
11737
  if (!(e instanceof Element)) {
11699
- e.childNodes.forEach((e) => T_(e));
11738
+ e.childNodes.forEach((e) => G_(e));
11700
11739
  return;
11701
11740
  }
11702
11741
  Array.from(e.attributes).forEach((t) => {
11703
11742
  let n = t.name;
11704
11743
  (n === "id" || n === "role" || n === "tabindex" || n.startsWith("aria-selected") || n.startsWith("aria-disabled") || n.startsWith("data-ui-select-option") || n.startsWith("data-selected") || n.startsWith("data-highlighted") || n.startsWith("data-disabled") || n.startsWith("x-") || n.startsWith("@") || n.startsWith(":") || n.startsWith("on")) && e.removeAttribute(n);
11705
- }), e.childNodes.forEach((e) => T_(e)), e.setAttribute("x-ignore", "true");
11706
- }, E_ = (e) => {
11744
+ }), e.childNodes.forEach((e) => G_(e)), e.setAttribute("x-ignore", "true");
11745
+ }, K_ = (e) => {
11707
11746
  let t = document.createDocumentFragment();
11708
11747
  return Array.from(e).forEach((e) => {
11709
- if (e instanceof HTMLTemplateElement && e.matches(S_)) return;
11748
+ if (e instanceof HTMLTemplateElement && e.matches(H_)) return;
11710
11749
  let n = e.cloneNode(!0);
11711
- T_(n), t.append(n);
11750
+ G_(n), t.append(n);
11712
11751
  }), t;
11713
- }, D_ = () => ({
11752
+ }, q_ = () => ({
11714
11753
  isOpen: !1,
11715
11754
  search: "",
11716
11755
  selectedValues: [],
@@ -11730,7 +11769,7 @@ var b_ = Y({ definition: {
11730
11769
  init() {
11731
11770
  this.props = W({
11732
11771
  el: this.$el,
11733
- schema: y_
11772
+ schema: z_
11734
11773
  }), this.buttonId = this.$id("select-button"), this.inputId = this.$id("select-input"), this.listboxId = this.$id("select-listbox"), this.isOpen = this.props.open && !this.props.disabled && !this.props.readonly;
11735
11774
  let e = this.options(), t = this.props.multiple ? [...Q.splitControlValues(this.props.values), ...Q.splitControlValues(this.props.value)] : Q.splitControlValues(this.props.value).slice(0, 1), n = e.filter((e) => Q.asBool({ value: e.el.dataset.selected })).map((e) => e.value);
11736
11775
  this.selectedValues = t.length > 0 ? t : n, this.props.multiple || (this.selectedValues = this.selectedValues.slice(0, 1)), this.selectedLabels = this.selectedValues.map((t) => e.find((e) => e.value === t)?.selectedLabel ?? t), this.popover = Q.createAnchoredPopover({
@@ -11750,8 +11789,8 @@ var b_ = Y({ definition: {
11750
11789
  this.props.disconnect(), this.popoverMotion?.destroy(), this.listeners.forEach((e) => e()), this.listeners = [], this.observer?.disconnect(), this.unmount();
11751
11790
  },
11752
11791
  get root() {
11753
- return Q.props({ inputs: [X({
11754
- part: b_.parts.root,
11792
+ return Q.mergeBindings({ inputs: [X({
11793
+ part: B_.parts.root,
11755
11794
  props: this.props,
11756
11795
  className: this.props.class
11757
11796
  }), {
@@ -11794,7 +11833,7 @@ var b_ = Y({ definition: {
11794
11833
  return this.$el.querySelector("[data-ui-select-hidden-inputs]");
11795
11834
  },
11796
11835
  options() {
11797
- let e = Q.normalizeOptionText(this.search), t = Array.from(this.$el.querySelectorAll(x_)).map((t, n) => {
11836
+ let e = Q.normalizeOptionText(this.search), t = Array.from(this.$el.querySelectorAll(V_)).map((t, n) => {
11798
11837
  let r = this.resolveOptionLabel(t), i = this.optionValue(t, r), a = this.resolveSelectedLabel(t, r), o = Q.asBool({ value: t.dataset.disabled }), s = this.selectedValues.includes(i), c = t.hasAttribute("data-ui-select-option-create"), l = !this.props.filter || e === "" || Q.normalizeOptionText(`${r} ${t.dataset.suffix ?? ""}`).includes(e), u = e !== "" && Q.normalizeOptionText(r) === e, d = Number(t.dataset.minLength ?? "0"), f = c ? e.length >= d && !u : l;
11799
11838
  return {
11800
11839
  el: t,
@@ -12052,7 +12091,7 @@ var b_ = Y({ definition: {
12052
12091
  syncControl() {
12053
12092
  let e = this.control();
12054
12093
  e.setAttribute("class", X({
12055
- part: b_.parts.control,
12094
+ part: B_.parts.control,
12056
12095
  props: {
12057
12096
  ...this.props,
12058
12097
  mode: this.controlLayoutMode(),
@@ -12096,7 +12135,7 @@ var b_ = Y({ definition: {
12096
12135
  e.id ||= this.inputId;
12097
12136
  let t = this.selectedSummary();
12098
12137
  e.className = X({
12099
- part: b_.parts.input,
12138
+ part: B_.parts.input,
12100
12139
  className: this.props.inputClass
12101
12140
  }), this.isPillbox() ? (e.value = this.search, e.placeholder = this.hasSelection() ? "" : this.props.placeholder) : (e.value = this.isOpen && this.inputSearching ? this.search : t, e.placeholder = this.props.placeholder), e.setAttribute("role", "combobox"), e.setAttribute("autocomplete", "off"), e.setAttribute("aria-autocomplete", "list"), e.setAttribute("aria-expanded", this.isOpen ? "true" : "false"), e.setAttribute("aria-controls", this.listboxId), Q.syncNativeControl({
12102
12141
  input: e,
@@ -12120,7 +12159,7 @@ var b_ = Y({ definition: {
12120
12159
  syncListbox() {
12121
12160
  let e = this.popoverEl(), t = this.listbox();
12122
12161
  e.id = `${this.listboxId}-popover`, e.setAttribute("class", X({
12123
- part: b_.parts.popover,
12162
+ part: B_.parts.popover,
12124
12163
  props: this.props,
12125
12164
  className: this.props.listboxClass
12126
12165
  })), e.setAttribute("popover", "manual"), e.dataset.state = this.isOpen ? "open" : "closed", e.hidden = !this.isOpen, t.id = this.listboxId, t.setAttribute("role", "listbox"), t.setAttribute("tabindex", "-1"), t.setAttribute("aria-labelledby", this.trigger().id), this.props.multiple ? t.setAttribute("aria-multiselectable", "true") : t.removeAttribute("aria-multiselectable");
@@ -12176,26 +12215,26 @@ var b_ = Y({ definition: {
12176
12215
  });
12177
12216
  if (i === this.renderedChipsKey || (this.renderedChipsKey = i, e.replaceChildren(), e.hidden)) return;
12178
12217
  let a = X({
12179
- part: o_.parts.root,
12218
+ part: w_.parts.root,
12180
12219
  props: {
12181
12220
  variant: this.props.chipVariant,
12182
12221
  color: this.props.chipColor,
12183
12222
  size: "sm",
12184
- rounded: !1
12223
+ radius: "sm"
12185
12224
  },
12186
12225
  className: X({
12187
- part: b_.parts.chip,
12226
+ part: B_.parts.chip,
12188
12227
  props: {},
12189
12228
  className: this.props.chipClass
12190
12229
  })
12191
- }), o = X({ part: b_.parts.chipLabel }), s = X({
12192
- part: o_.parts.close,
12230
+ }), o = X({ part: B_.parts.chipLabel }), s = X({
12231
+ part: w_.parts.close,
12193
12232
  props: { size: "sm" },
12194
- className: X({ part: b_.parts.chipRemove })
12233
+ className: X({ part: B_.parts.chipRemove })
12195
12234
  });
12196
12235
  r.forEach((t) => {
12197
12236
  let n = document.createElement("span");
12198
- n.className = a, n.setAttribute("data-ui-badge", ""), n.setAttribute("data-ui-select-chip", ""), n.dataset.variant = this.props.chipVariant, n.dataset.color = this.props.chipColor, n.dataset.size = "sm", n.dataset.value = t.value, Q.setPresence({
12237
+ n.className = a, n.setAttribute("data-ui-badge", ""), n.setAttribute("data-ui-select-chip", ""), n.dataset.variant = this.props.chipVariant, n.dataset.color = this.props.chipColor, n.dataset.size = "sm", n.dataset.radius = "sm", n.dataset.value = t.value, Q.setPresence({
12199
12238
  el: n,
12200
12239
  attr: "data-disabled",
12201
12240
  present: t.disabled,
@@ -12242,7 +12281,7 @@ var b_ = Y({ definition: {
12242
12281
  target: t,
12243
12282
  event: "click",
12244
12283
  handler: (e) => {
12245
- C_.add(e);
12284
+ U_.add(e);
12246
12285
  let n = e.target;
12247
12286
  if (n instanceof Element && n.closest("[data-ui-select-clear], [data-ui-select-button-clear]")) {
12248
12287
  this.clear(e);
@@ -12283,8 +12322,8 @@ var b_ = Y({ definition: {
12283
12322
  return;
12284
12323
  }
12285
12324
  if (n.closest("[data-ui-select-chip-remove]")) return;
12286
- if (w_(e, "[data-ui-select-trigger]")) {
12287
- if (C_.has(e)) return;
12325
+ if (W_(e, "[data-ui-select-trigger]")) {
12326
+ if (U_.has(e)) return;
12288
12327
  if (this.trigger().focus({ preventScroll: !0 }), t instanceof HTMLInputElement) {
12289
12328
  this.isOpen || this.openSelect(e);
12290
12329
  return;
@@ -12339,7 +12378,7 @@ var b_ = Y({ definition: {
12339
12378
  event: "pointerdown",
12340
12379
  handler: (e) => {
12341
12380
  let t = e.target;
12342
- t instanceof Element && t.closest(x_) && e.preventDefault();
12381
+ t instanceof Element && t.closest(V_) && e.preventDefault();
12343
12382
  },
12344
12383
  cleanup: this.listeners
12345
12384
  }), Q.addListener({
@@ -12352,7 +12391,7 @@ var b_ = Y({ definition: {
12352
12391
  this.setSearch("");
12353
12392
  return;
12354
12393
  }
12355
- let n = t.closest(x_), r = n ? this.options().find((e) => e.el === n) : void 0;
12394
+ let n = t.closest(V_), r = n ? this.options().find((e) => e.el === n) : void 0;
12356
12395
  r && this.selectOption(r, e);
12357
12396
  },
12358
12397
  cleanup: this.listeners
@@ -12362,7 +12401,7 @@ var b_ = Y({ definition: {
12362
12401
  handler: (e) => {
12363
12402
  let t = e.target;
12364
12403
  if (!(t instanceof Element)) return;
12365
- let n = t.closest(x_), r = n ? this.options().find((e) => e.el === n) : void 0;
12404
+ let n = t.closest(V_), r = n ? this.options().find((e) => e.el === n) : void 0;
12366
12405
  r && !r.disabled && this.setActive(r);
12367
12406
  },
12368
12407
  cleanup: this.listeners
@@ -12389,10 +12428,10 @@ var b_ = Y({ definition: {
12389
12428
  return e ? this.options().find((t) => t.value === e) ?? null : null;
12390
12429
  },
12391
12430
  selectedContent(e) {
12392
- let t = e.el.querySelector(S_);
12393
- if (t) return E_(t.content.childNodes);
12431
+ let t = e.el.querySelector(H_);
12432
+ if (t) return K_(t.content.childNodes);
12394
12433
  let n = e.el.querySelector("[data-ui-select-option-selected-content]") ?? e.el.querySelector("[data-ui-select-option-label]");
12395
- if (n) return E_(n.childNodes);
12434
+ if (n) return K_(n.childNodes);
12396
12435
  let r = document.createDocumentFragment();
12397
12436
  return r.append(document.createTextNode(e.selectedLabel)), r;
12398
12437
  },
@@ -12410,24 +12449,24 @@ var b_ = Y({ definition: {
12410
12449
  optionValue(e, t) {
12411
12450
  return e.dataset.value || t;
12412
12451
  }
12413
- }), O_ = (e) => {
12414
- e.data("UiSelect", () => D_());
12415
- }, k_ = ["left", "right"], A_ = [
12452
+ }), J_ = (e) => {
12453
+ e.data("UiSelect", () => q_());
12454
+ }, Y_ = ["left", "right"], X_ = [
12416
12455
  "none",
12417
12456
  "mobile",
12418
12457
  "desktop",
12419
12458
  "both"
12420
- ], j_ = [
12459
+ ], Z_ = [
12421
12460
  "toggle",
12422
12461
  "open",
12423
12462
  "close",
12424
12463
  "stash",
12425
12464
  "expand"
12426
- ], M_ = ["a", "button"], N_ = ["ghost", "surface"], P_ = ["neutral", "accent"], F_ = {
12465
+ ], Q_ = ["a", "button"], $_ = ["ghost", "surface"], ev = ["neutral", "accent"], tv = {
12427
12466
  id: G.default("ui-sidebar"),
12428
- side: J(k_, "left"),
12467
+ side: J(Y_, "left"),
12429
12468
  sticky: q.default(!0),
12430
- collapse: J(A_, "mobile"),
12469
+ collapse: J(X_, "mobile"),
12431
12470
  open: q,
12432
12471
  stashed: q,
12433
12472
  persist: q.default(!0),
@@ -12440,20 +12479,20 @@ var b_ = Y({ definition: {
12440
12479
  resizable: q,
12441
12480
  class: G
12442
12481
  };
12443
- J(M_, "a"), J(N_, "ghost"), J(P_, "neutral"), q.default(!0);
12444
- var I_ = {
12482
+ J(Q_, "a"), J($_, "ghost"), J(ev, "neutral"), q.default(!0);
12483
+ var nv = {
12445
12484
  target: G,
12446
12485
  icon: G.default("side_panel"),
12447
12486
  label: G.default("Toggle sidebar"),
12448
- action: J(j_, "toggle"),
12487
+ action: J(Z_, "toggle"),
12449
12488
  class: G
12450
- }, L_ = Y({ definition: {
12489
+ }, rv = Y({ definition: {
12451
12490
  component: "ui.sidebar",
12452
12491
  parts: {
12453
12492
  root: {
12454
12493
  base: [
12455
12494
  "fixed inset-y-0 z-dialog flex min-h-0 w-[var(--ui-sidebar-mobile-width)] flex-col overflow-hidden",
12456
- "border-base-a3 bg-surface-muted text-foreground shadow-2 outline-none",
12495
+ "border-base-a3 bg-chrome text-foreground shadow-2 outline-none",
12457
12496
  "data-[mobile-state=closed]:-translate-x-full data-[mobile-state=open]:translate-x-0",
12458
12497
  "lg:top-0 lg:z-auto lg:w-[var(--ui-sidebar-width)] lg:translate-x-0 lg:data-[mobile-state=closed]:translate-x-0 lg:data-[mobile-state=open]:translate-x-0 lg:shadow-none",
12459
12498
  "lg:data-[desktop-state=stashed]:data-[drawer-state=closed]:data-[sidebar-exiting=false]:hidden",
@@ -12483,9 +12522,10 @@ var I_ = {
12483
12522
  nav: { base: "grid gap-1" },
12484
12523
  item: {
12485
12524
  base: [
12486
- "group/sidebar-item flex h-control-md w-full min-w-0 items-center gap-2 rounded-3 px-2",
12525
+ "group/sidebar-item flex h-control-md w-full min-w-0 select-none items-center gap-2 rounded-3 px-2",
12487
12526
  "border border-transparent text-left text-sm font-medium text-foreground outline-none",
12488
- em,
12527
+ "cursor-default",
12528
+ sm,
12489
12529
  "focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app",
12490
12530
  "data-disabled:pointer-events-none data-disabled:opacity-50"
12491
12531
  ],
@@ -12524,7 +12564,7 @@ var I_ = {
12524
12564
  group: { base: "relative grid gap-1" },
12525
12565
  groupSummary: {
12526
12566
  base: [
12527
- "block h-control-md cursor-pointer list-none rounded-3 text-xs font-medium text-foreground-muted outline-none",
12567
+ "block h-control-md cursor-default select-none list-none rounded-3 text-xs font-medium text-foreground-muted outline-none",
12528
12568
  "hover:bg-base-a2 hover:text-foreground focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app",
12529
12569
  "[&::-webkit-details-marker]:hidden"
12530
12570
  ],
@@ -12535,7 +12575,7 @@ var I_ = {
12535
12575
  defaults: { hasActions: !1 }
12536
12576
  },
12537
12577
  groupSummaryInner: { base: "flex h-full min-w-0 items-center gap-2 px-2" },
12538
- groupHeading: { base: "flex min-h-control-md min-w-0 items-center gap-2 px-2 py-1" },
12578
+ groupHeading: { base: "flex min-h-control-md min-w-0 select-none items-center gap-2 px-2 py-1 cursor-default" },
12539
12579
  groupIcon: { base: "size-icon-xs shrink-0 fill-current text-icon group-open/sidebar-group:rotate-90" },
12540
12580
  groupLabel: { base: "min-w-0 flex-1" },
12541
12581
  groupHeadingLabel: { base: "min-w-0 flex-1" },
@@ -12569,35 +12609,35 @@ var I_ = {
12569
12609
  defaults: { side: "left" }
12570
12610
  }
12571
12611
  }
12572
- } }), R_ = {
12573
- target: I_.target,
12574
- action: I_.action,
12575
- class: I_.class
12576
- }, z_ = {
12577
- target: I_.target,
12578
- action: I_.action,
12579
- class: I_.class
12580
- }, B_ = /* @__PURE__ */ new Set(), V_ = {
12612
+ } }), iv = {
12613
+ target: nv.target,
12614
+ action: nv.action,
12615
+ class: nv.class
12616
+ }, av = {
12617
+ target: nv.target,
12618
+ action: nv.action,
12619
+ class: nv.class
12620
+ }, ov = /* @__PURE__ */ new Set(), sv = {
12581
12621
  sm: 640,
12582
12622
  md: 768,
12583
12623
  lg: 1024,
12584
12624
  xl: 1280,
12585
12625
  "2xl": 1536
12586
- }, H_ = (e, t) => !t?.id || t.id === e.id, U_ = (e) => {
12587
- let t = V_[e];
12588
- return t ? `(min-width: ${t}px)` : /^\d+$/.test(e) ? `(min-width: ${e}px)` : /^\d+(\.\d+)?(px|rem|em)$/.test(e) ? `(min-width: ${e})` : `(min-width: ${V_.lg}px)`;
12589
- }, W_ = (e) => e instanceof CustomEvent && typeof e.detail == "object" && e.detail !== null ? e.detail : {}, G_ = (e) => e.target instanceof Element && e.target.hasAttribute("data-ui-sidebar"), K_ = (e, t) => {
12590
- if (G_(e)) return;
12591
- let n = W_(e);
12592
- B_.forEach((e) => {
12593
- H_(e, n) && e.perform(n.action ?? t, n.trigger ?? null);
12626
+ }, cv = (e, t) => !t?.id || t.id === e.id, lv = (e) => {
12627
+ let t = sv[e];
12628
+ return t ? `(min-width: ${t}px)` : /^\d+$/.test(e) ? `(min-width: ${e}px)` : /^\d+(\.\d+)?(px|rem|em)$/.test(e) ? `(min-width: ${e})` : `(min-width: ${sv.lg}px)`;
12629
+ }, uv = (e) => e instanceof CustomEvent && typeof e.detail == "object" && e.detail !== null ? e.detail : {}, dv = (e) => e.target instanceof Element && e.target.hasAttribute("data-ui-sidebar"), fv = (e, t) => {
12630
+ if (dv(e)) return;
12631
+ let n = uv(e);
12632
+ ov.forEach((e) => {
12633
+ cv(e, n) && e.perform(n.action ?? t, n.trigger ?? null);
12594
12634
  });
12595
- }, q_ = (() => {
12635
+ }, pv = (() => {
12596
12636
  let e = !1;
12597
12637
  return () => {
12598
- e || typeof document > "u" || (document.addEventListener("ui:sidebar-open", (e) => K_(e, "open")), document.addEventListener("ui:sidebar-close", (e) => K_(e, "close")), document.addEventListener("ui:sidebar-toggle", (e) => K_(e, "toggle")), e = !0);
12638
+ e || typeof document > "u" || (document.addEventListener("ui:sidebar-open", (e) => fv(e, "open")), document.addEventListener("ui:sidebar-close", (e) => fv(e, "close")), document.addEventListener("ui:sidebar-toggle", (e) => fv(e, "toggle")), e = !0);
12599
12639
  };
12600
- })(), J_ = () => ({
12640
+ })(), mv = () => ({
12601
12641
  props: null,
12602
12642
  mobileOpen: !1,
12603
12643
  desktopStashed: !1,
@@ -12622,18 +12662,18 @@ var I_ = {
12622
12662
  return this.$el.id || this.props.id || "ui-sidebar";
12623
12663
  },
12624
12664
  init() {
12625
- q_(), this.props = W({
12665
+ pv(), this.props = W({
12626
12666
  el: this.$el,
12627
- schema: F_
12667
+ schema: tv
12628
12668
  });
12629
12669
  let e = this.storedStashed();
12630
- this.currentWidth = this.props.width, this.mobileOpen = this.props.open, this.desktopStashed = e ?? this.props.stashed, this.mediaQuery = window.matchMedia(U_(this.props.breakpoint)), this.desktopMode = this.isDesktop(), this.drawerMotion = Q.motion.createPresenceLifecycle({
12670
+ this.currentWidth = this.props.width, this.mobileOpen = this.props.open, this.desktopStashed = e ?? this.props.stashed, this.mediaQuery = window.matchMedia(lv(this.props.breakpoint)), this.desktopMode = this.isDesktop(), this.drawerMotion = Q.motion.createPresenceLifecycle({
12631
12671
  element: () => this.$el,
12632
12672
  preset: "sidebar"
12633
12673
  }), this.backdropMotion = Q.motion.createPresenceLifecycle({
12634
12674
  element: () => this.backdropEl(),
12635
12675
  preset: "fade"
12636
- }), B_.add(this), Q.addListener({
12676
+ }), ov.add(this), Q.addListener({
12637
12677
  target: this.mediaQuery,
12638
12678
  event: "change",
12639
12679
  handler: () => this.handleBreakpointChange(),
@@ -12694,11 +12734,11 @@ var I_ = {
12694
12734
  })), this.setupGroups(), this.syncAll();
12695
12735
  },
12696
12736
  destroy() {
12697
- this.props.disconnect(), this.drawerMotion?.destroy(), this.backdropMotion?.destroy(), this.clearSidebarExitFreeze(), B_.delete(this), this.cleanup.forEach((e) => e()), this.cleanup = [], this.hasScrollLock &&= (Pp(), !1);
12737
+ this.props.disconnect(), this.drawerMotion?.destroy(), this.backdropMotion?.destroy(), this.clearSidebarExitFreeze(), ov.delete(this), this.cleanup.forEach((e) => e()), this.cleanup = [], this.hasScrollLock &&= (Pp(), !1);
12698
12738
  },
12699
12739
  get root() {
12700
- return Q.props({ inputs: [Q.resolveStyle({
12701
- part: L_.parts.root,
12740
+ return Q.mergeBindings({ inputs: [Q.resolveStyle({
12741
+ part: rv.parts.root,
12702
12742
  props: this.props,
12703
12743
  className: this.props.class
12704
12744
  }), {
@@ -13014,20 +13054,20 @@ var I_ = {
13014
13054
  window.localStorage.setItem(this.storageKey(), this.desktopStashed ? "true" : "false");
13015
13055
  } catch {}
13016
13056
  }
13017
- }), Y_ = () => ({
13057
+ }), hv = () => ({
13018
13058
  props: null,
13019
13059
  init() {
13020
13060
  this.props = W({
13021
13061
  el: this.$el,
13022
- schema: R_
13062
+ schema: iv
13023
13063
  });
13024
13064
  },
13025
13065
  destroy() {
13026
13066
  this.props.disconnect();
13027
13067
  },
13028
13068
  get root() {
13029
- return Q.props({ inputs: [Q.resolveStyle({
13030
- part: L_.parts.toggle,
13069
+ return Q.mergeBindings({ inputs: [Q.resolveStyle({
13070
+ part: rv.parts.toggle,
13031
13071
  props: {},
13032
13072
  className: this.props.class
13033
13073
  }), {
@@ -13050,20 +13090,20 @@ var I_ = {
13050
13090
  }
13051
13091
  }));
13052
13092
  }
13053
- }), X_ = () => ({
13093
+ }), gv = () => ({
13054
13094
  props: null,
13055
13095
  init() {
13056
13096
  this.props = W({
13057
13097
  el: this.$el,
13058
- schema: z_
13098
+ schema: av
13059
13099
  });
13060
13100
  },
13061
13101
  destroy() {
13062
13102
  this.props.disconnect();
13063
13103
  },
13064
13104
  get root() {
13065
- return Q.props({ inputs: [Q.resolveStyle({
13066
- part: L_.parts.edge,
13105
+ return Q.mergeBindings({ inputs: [Q.resolveStyle({
13106
+ part: rv.parts.edge,
13067
13107
  props: { side: this.$el.dataset.side || "left" },
13068
13108
  className: this.props.class
13069
13109
  }), {
@@ -13089,9 +13129,9 @@ var I_ = {
13089
13129
  }
13090
13130
  }));
13091
13131
  }
13092
- }), Z_ = (e) => {
13093
- e.data("UiSidebar", () => J_()), e.data("UiSidebarEdge", () => X_()), e.data("UiSidebarToggle", () => Y_());
13094
- }, Q_ = Fp, $_ = Wp, ev = Hp, tv = {
13132
+ }), _v = (e) => {
13133
+ e.data("UiSidebar", () => mv()), e.data("UiSidebarEdge", () => gv()), e.data("UiSidebarToggle", () => hv());
13134
+ }, vv = Fp, yv = Wp, bv = Hp, xv = {
13095
13135
  name: G,
13096
13136
  value: G.default("0"),
13097
13137
  defaultValue: G,
@@ -13101,9 +13141,9 @@ var I_ = {
13101
13141
  bigStep: K.default(10),
13102
13142
  minStepsBetween: K.default(0),
13103
13143
  range: q,
13104
- orientation: J(ev, "horizontal"),
13105
- size: J(Q_, "md"),
13106
- variant: J($_, "default"),
13144
+ orientation: J(bv, "horizontal"),
13145
+ size: J(vv, "md"),
13146
+ variant: J(yv, "default"),
13107
13147
  disabled: q,
13108
13148
  required: q,
13109
13149
  invalid: q,
@@ -13131,11 +13171,11 @@ var I_ = {
13131
13171
  K.default(0);
13132
13172
  //#endregion
13133
13173
  //#region src/components/slider/index.ts
13134
- var nv = (e, t, n) => {
13174
+ var Sv = (e, t, n) => {
13135
13175
  if (!Number.isFinite(n) || n <= 0) return e;
13136
13176
  let r = Math.round((e - t) / n) * n + t, i = Math.max(0, `${n}`.split(".")[1]?.length ?? 0);
13137
13177
  return Number(r.toFixed(i));
13138
- }, $ = (e, t, n) => Math.min(n, Math.max(t, e)), rv = (e) => {
13178
+ }, $ = (e, t, n) => Math.min(n, Math.max(t, e)), Cv = (e) => {
13139
13179
  let t = Math.min(e.min, e.max), n = Math.max(e.min, e.max), r = e.step > 0 ? e.step : 1;
13140
13180
  return {
13141
13181
  min: t,
@@ -13143,28 +13183,28 @@ var nv = (e, t, n) => {
13143
13183
  step: r,
13144
13184
  bigStep: e.bigStep > 0 ? e.bigStep : r * 10
13145
13185
  };
13146
- }, iv = (e, t) => {
13186
+ }, wv = (e, t) => {
13147
13187
  let n = Number(e);
13148
13188
  return Number.isFinite(n) ? n : t;
13149
- }, av = (e, t) => {
13150
- let { min: n, max: r, step: i } = rv(e), a = (e.value || e.defaultValue || "").split(",").map((e) => e.trim()), o = t.lowerInput ?? t.singleInput, s = t.upperInput, c = (e.range, o?.value || a[0] || `${n}`), l = e.range ? s?.value || a[1] || `${r}` : c, u = nv($(iv(c, n), n, r), n, i), d = nv($(iv(l, r), n, r), n, i);
13189
+ }, Tv = (e, t) => {
13190
+ let { min: n, max: r, step: i } = Cv(e), a = (e.value || e.defaultValue || "").split(",").map((e) => e.trim()), o = t.lowerInput ?? t.singleInput, s = t.upperInput, c = (e.range, o?.value || a[0] || `${n}`), l = e.range ? s?.value || a[1] || `${r}` : c, u = Sv($(wv(c, n), n, r), n, i), d = Sv($(wv(l, r), n, r), n, i);
13151
13191
  if (!e.range) return {
13152
13192
  lower: u,
13153
13193
  upper: u
13154
13194
  };
13155
13195
  u > d && ([u, d] = [d, u]);
13156
13196
  let f = Math.max(0, e.minStepsBetween) * i;
13157
- return d - u < f && (d = $(nv(u + f, n, i), n, r), d - u < f && (u = $(nv(d - f, n, i), n, r))), {
13197
+ return d - u < f && (d = $(Sv(u + f, n, i), n, r), d - u < f && (u = $(Sv(d - f, n, i), n, r))), {
13158
13198
  lower: u,
13159
13199
  upper: d
13160
13200
  };
13161
- }, ov = (e, t, n) => n <= t ? 0 : $((e - t) / (n - t) * 100, 0, 100), sv = (e, t) => {
13201
+ }, Ev = (e, t, n) => n <= t ? 0 : $((e - t) / (n - t) * 100, 0, 100), Dv = (e, t) => {
13162
13202
  let n = (t) => e.format === "percent" ? `${Math.round(t)}%` : String(t);
13163
13203
  return e.range ? `${n(t.lower)} - ${n(t.upper)}` : n(t.lower);
13164
- }, cv = (e, t, n) => {
13165
- let { min: r, max: i, step: a } = rv(n), o = e.getBoundingClientRect();
13166
- return nv($(r + $(n.orientation === "vertical" ? 1 - (t.clientY - o.top) / Math.max(o.height, 1) : (t.clientX - o.left) / Math.max(o.width, 1), 0, 1) * (i - r), r, i), r, a);
13167
- }, lv = (e, t) => Math.abs(e - t.lower) <= Math.abs(e - t.upper) ? "lower" : "upper", uv = (e, t, n) => {
13204
+ }, Ov = (e, t, n) => {
13205
+ let { min: r, max: i, step: a } = Cv(n), o = e.getBoundingClientRect();
13206
+ return Sv($(r + $(n.orientation === "vertical" ? 1 - (t.clientY - o.top) / Math.max(o.height, 1) : (t.clientX - o.left) / Math.max(o.width, 1), 0, 1) * (i - r), r, i), r, a);
13207
+ }, kv = (e, t) => Math.abs(e - t.lower) <= Math.abs(e - t.upper) ? "lower" : "upper", Av = (e, t, n) => {
13168
13208
  e && (Q.setPresence({
13169
13209
  el: e,
13170
13210
  attr: "data-focus",
@@ -13174,7 +13214,7 @@ var nv = (e, t, n) => {
13174
13214
  attr: "data-invalid",
13175
13215
  present: n
13176
13216
  }));
13177
- }, dv = ({ input: e, props: t, value: n, min: r, max: i, label: a, valueText: o, nativeRequired: s }) => {
13217
+ }, jv = ({ input: e, props: t, value: n, min: r, max: i, label: a, valueText: o, nativeRequired: s }) => {
13178
13218
  e && (e.min = String(r), e.max = String(i), e.step = String(t.step > 0 ? t.step : 1), Q.syncNativeControl({
13179
13219
  input: e,
13180
13220
  state: {
@@ -13186,15 +13226,15 @@ var nv = (e, t, n) => {
13186
13226
  invalid: t.invalid
13187
13227
  }
13188
13228
  }), e.setAttribute("aria-valuemin", String(r)), e.setAttribute("aria-valuemax", String(i)), e.setAttribute("aria-valuenow", String(n)), o ? e.setAttribute("aria-valuetext", o) : e.removeAttribute("aria-valuetext"), a && e.setAttribute("aria-label", a), t.orientation === "vertical" ? e.setAttribute("aria-orientation", "vertical") : e.removeAttribute("aria-orientation"));
13189
- }, fv = (e, t, n) => {
13190
- let { min: r, max: i } = rv(e), a = ov(n.lower, r, i), o = ov(n.upper, r, i), s = e.range ? a : 0, c = e.range ? o : a;
13229
+ }, Mv = (e, t, n) => {
13230
+ let { min: r, max: i } = Cv(e), a = Ev(n.lower, r, i), o = Ev(n.upper, r, i), s = e.range ? a : 0, c = e.range ? o : a;
13191
13231
  t.root.style.setProperty("--ui-slider-lower-percent", `${a}%`), t.root.style.setProperty("--ui-slider-upper-percent", `${o}%`), e.orientation === "vertical" ? (t.range && (t.range.style.bottom = `${s}%`, t.range.style.height = `${Math.max(0, c - s)}%`, t.range.style.left = "", t.range.style.width = ""), t.singleThumb && (t.singleThumb.style.bottom = `${a}%`), t.lowerThumb && (t.lowerThumb.style.bottom = `${a}%`), t.upperThumb && (t.upperThumb.style.bottom = `${o}%`)) : (t.range && (t.range.style.left = `${s}%`, t.range.style.width = `${Math.max(0, c - s)}%`, t.range.style.bottom = "", t.range.style.height = ""), t.singleThumb && (t.singleThumb.style.left = `${a}%`), t.lowerThumb && (t.lowerThumb.style.left = `${a}%`), t.upperThumb && (t.upperThumb.style.left = `${o}%`)), t.ticks.forEach((t) => {
13192
- let n = ov(iv(t.dataset.value ?? "", r), r, i);
13232
+ let n = Ev(wv(t.dataset.value ?? "", r), r, i);
13193
13233
  e.orientation === "vertical" ? (t.style.bottom = `${n}%`, t.style.left = "") : (t.style.left = `${n}%`, t.style.bottom = "");
13194
13234
  });
13195
- }, pv = (e, t, n, r) => {
13196
- let { min: i, max: a, step: o } = rv(e), s = e.range ? Math.max(0, e.minStepsBetween) * o : 0, c = nv($(n.lower, i, a), i, o), l = nv($(n.upper, i, a), i, o);
13197
- e.range ? (c > l && ([c, l] = [l, c]), l - c < s && (r?.dataset.thumb === "lower" ? c = $(nv(l - s, i, o), i, a) : l = $(nv(c + s, i, o), i, a))) : l = c, dv({
13235
+ }, Nv = (e, t, n, r) => {
13236
+ let { min: i, max: a, step: o } = Cv(e), s = e.range ? Math.max(0, e.minStepsBetween) * o : 0, c = Sv($(n.lower, i, a), i, o), l = Sv($(n.upper, i, a), i, o);
13237
+ e.range ? (c > l && ([c, l] = [l, c]), l - c < s && (r?.dataset.thumb === "lower" ? c = $(Sv(l - s, i, o), i, a) : l = $(Sv(c + s, i, o), i, a))) : l = c, jv({
13198
13238
  input: t.singleInput,
13199
13239
  props: e,
13200
13240
  value: c,
@@ -13203,7 +13243,7 @@ var nv = (e, t, n) => {
13203
13243
  label: e.label,
13204
13244
  valueText: e.valueText,
13205
13245
  nativeRequired: e.required
13206
- }), dv({
13246
+ }), jv({
13207
13247
  input: t.lowerInput,
13208
13248
  props: e,
13209
13249
  value: c,
@@ -13212,7 +13252,7 @@ var nv = (e, t, n) => {
13212
13252
  label: e.lowerLabel,
13213
13253
  valueText: e.lowerValueText,
13214
13254
  nativeRequired: !1
13215
- }), dv({
13255
+ }), jv({
13216
13256
  input: t.upperInput,
13217
13257
  props: e,
13218
13258
  value: l,
@@ -13226,7 +13266,7 @@ var nv = (e, t, n) => {
13226
13266
  lower: c,
13227
13267
  upper: l
13228
13268
  };
13229
- return fv(e, t, u), t.value && (t.value.textContent = sv(e, u)), Q.syncControlPresence({
13269
+ return Mv(e, t, u), t.value && (t.value.textContent = Dv(e, u)), Q.syncControlPresence({
13230
13270
  el: t.root,
13231
13271
  state: e
13232
13272
  }), t.track && Q.syncControlPresence({
@@ -13235,8 +13275,8 @@ var nv = (e, t, n) => {
13235
13275
  disabled: e.disabled,
13236
13276
  invalid: e.invalid
13237
13277
  }
13238
- }), uv(t.singleThumb, t.singleInput === document.activeElement, e.invalid), uv(t.lowerThumb, t.lowerInput === document.activeElement, e.invalid), uv(t.upperThumb, t.upperInput === document.activeElement, e.invalid), u;
13239
- }, mv = () => ({
13278
+ }), Av(t.singleThumb, t.singleInput === document.activeElement, e.invalid), Av(t.lowerThumb, t.lowerInput === document.activeElement, e.invalid), Av(t.upperThumb, t.upperInput === document.activeElement, e.invalid), u;
13279
+ }, Pv = () => ({
13240
13280
  props: null,
13241
13281
  listeners: [],
13242
13282
  hiddenInputsKey: "",
@@ -13244,7 +13284,7 @@ var nv = (e, t, n) => {
13244
13284
  init() {
13245
13285
  this.props = W({
13246
13286
  el: this.$el,
13247
- schema: tv
13287
+ schema: xv
13248
13288
  });
13249
13289
  let e = this.elements();
13250
13290
  [
@@ -13332,7 +13372,7 @@ var nv = (e, t, n) => {
13332
13372
  };
13333
13373
  },
13334
13374
  sync() {
13335
- let e = this.elements(), t = pv(this.props, e, av(this.props, e));
13375
+ let e = this.elements(), t = Nv(this.props, e, Tv(this.props, e));
13336
13376
  this.props.range && e.hiddenInputs ? this.hiddenInputsKey = Q.syncRepeatedHiddenInputs({
13337
13377
  container: e.hiddenInputs,
13338
13378
  currentKey: this.hiddenInputsKey,
@@ -13353,8 +13393,8 @@ var nv = (e, t, n) => {
13353
13393
  }));
13354
13394
  },
13355
13395
  syncFromInput(e) {
13356
- let t = e.target instanceof HTMLInputElement ? e.target : null, n = this.elements(), r = av(this.props, n);
13357
- t?.dataset.thumb === "upper" ? r.upper = iv(t.value, r.upper) : r.lower = iv(t?.value ?? "", r.lower), pv(this.props, n, r, t), this.sync();
13396
+ let t = e.target instanceof HTMLInputElement ? e.target : null, n = this.elements(), r = Tv(this.props, n);
13397
+ t?.dataset.thumb === "upper" ? r.upper = wv(t.value, r.upper) : r.lower = wv(t?.value ?? "", r.lower), Nv(this.props, n, r, t), this.sync();
13358
13398
  },
13359
13399
  commitFromInput(e) {
13360
13400
  this.syncFromInput(e);
@@ -13366,31 +13406,31 @@ var nv = (e, t, n) => {
13366
13406
  "PageDown",
13367
13407
  "ArrowDown",
13368
13408
  "ArrowLeft"
13369
- ].includes(e.key) ? -1 : 1, { bigStep: r } = rv(this.props);
13370
- t.value = String(iv(t.value, this.props.min) + n * r), t.dispatchEvent(new Event("input", { bubbles: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0 }));
13409
+ ].includes(e.key) ? -1 : 1, { bigStep: r } = Cv(this.props);
13410
+ t.value = String(wv(t.value, this.props.min) + n * r), t.dispatchEvent(new Event("input", { bubbles: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0 }));
13371
13411
  },
13372
13412
  handlePointerDown(e) {
13373
13413
  if (this.props.disabled) return;
13374
- let t = this.elements(), n = cv(t.root, e, this.props), r = av(this.props, t);
13375
- this.draggingThumb = this.props.range ? lv(n, r) : "single", this.draggingThumb === "upper" ? r.upper = n : r.lower = n;
13414
+ let t = this.elements(), n = Ov(t.root, e, this.props), r = Tv(this.props, t);
13415
+ this.draggingThumb = this.props.range ? kv(n, r) : "single", this.draggingThumb === "upper" ? r.upper = n : r.lower = n;
13376
13416
  let i = this.draggingThumb === "upper" ? t.upperInput : this.props.range ? t.lowerInput : t.singleInput;
13377
- i?.focus(), pv(this.props, t, r, i), this.sync(), t.root.setPointerCapture?.(e.pointerId), e.preventDefault();
13417
+ i?.focus(), Nv(this.props, t, r, i), this.sync(), t.root.setPointerCapture?.(e.pointerId), e.preventDefault();
13378
13418
  },
13379
13419
  handlePointerMove(e) {
13380
13420
  if (!this.draggingThumb || this.props.disabled) return;
13381
- let t = this.elements(), n = av(this.props, t), r = cv(t.root, e, this.props);
13421
+ let t = this.elements(), n = Tv(this.props, t), r = Ov(t.root, e, this.props);
13382
13422
  this.draggingThumb === "upper" ? n.upper = r : n.lower = r;
13383
13423
  let i = this.draggingThumb === "upper" ? t.upperInput : this.props.range ? t.lowerInput : t.singleInput;
13384
- pv(this.props, t, n, i), i?.dispatchEvent(new Event("input", { bubbles: !0 }));
13424
+ Nv(this.props, t, n, i), i?.dispatchEvent(new Event("input", { bubbles: !0 }));
13385
13425
  },
13386
13426
  handlePointerUp(e) {
13387
13427
  if (!this.draggingThumb) return;
13388
13428
  let t = this.elements();
13389
13429
  (this.draggingThumb === "upper" ? t.upperInput : this.props.range ? t.lowerInput : t.singleInput)?.dispatchEvent(new Event("change", { bubbles: !0 })), t.root.releasePointerCapture?.(e.pointerId), this.draggingThumb = null;
13390
13430
  }
13391
- }), hv = (e) => {
13392
- e.data("UiSlider", () => mv());
13393
- }, gv = ["trailing", "leading"], _v = Fp, vv = Wp, yv = {
13431
+ }), Fv = (e) => {
13432
+ e.data("UiSlider", () => Pv());
13433
+ }, Iv = ["trailing", "leading"], Lv = Fp, Rv = Wp, zv = {
13394
13434
  value: G.default("on"),
13395
13435
  name: G,
13396
13436
  label: G,
@@ -13399,9 +13439,9 @@ var nv = (e, t, n) => {
13399
13439
  disabled: q,
13400
13440
  required: q,
13401
13441
  invalid: q,
13402
- placement: J(gv, "trailing"),
13403
- variant: J(vv, "default"),
13404
- size: J(_v, "md"),
13442
+ placement: J(Iv, "trailing"),
13443
+ variant: J(Rv, "default"),
13444
+ size: J(Lv, "md"),
13405
13445
  inputClass: G,
13406
13446
  trackClass: G,
13407
13447
  thumbClass: G,
@@ -13410,10 +13450,10 @@ var nv = (e, t, n) => {
13410
13450
  descriptionClass: G,
13411
13451
  class: G
13412
13452
  };
13413
- ({ ...yv });
13453
+ ({ ...zv });
13414
13454
  //#endregion
13415
13455
  //#region src/components/switch/index.ts
13416
- var bv = (e) => {
13456
+ var Bv = (e) => {
13417
13457
  let t = e.querySelector("[data-ui-switch-input]");
13418
13458
  return t ? {
13419
13459
  root: e,
@@ -13424,7 +13464,7 @@ var bv = (e) => {
13424
13464
  required: e.hasAttribute("data-required") || t.required,
13425
13465
  invalid: e.hasAttribute("data-invalid") || t.getAttribute("aria-invalid") === "true"
13426
13466
  } : null;
13427
- }, xv = (e, t = {}) => {
13467
+ }, Vv = (e, t = {}) => {
13428
13468
  let n = t.disabled ?? e.disabled, r = t.required ?? e.required, i = t.invalid ?? e.invalid, a = e.input.checked, o = a ? "checked" : "unchecked";
13429
13469
  Q.syncNativeControl({
13430
13470
  input: e.input,
@@ -13483,13 +13523,13 @@ var bv = (e) => {
13483
13523
  attr: "data-disabled",
13484
13524
  present: n
13485
13525
  }));
13486
- }, Sv = () => ({
13526
+ }, Hv = () => ({
13487
13527
  props: null,
13488
13528
  listeners: [],
13489
13529
  init() {
13490
13530
  this.props = W({
13491
13531
  el: this.$el,
13492
- schema: yv
13532
+ schema: zv
13493
13533
  });
13494
13534
  let e = this.input();
13495
13535
  Q.addListener({
@@ -13515,13 +13555,13 @@ var bv = (e) => {
13515
13555
  return e;
13516
13556
  },
13517
13557
  item() {
13518
- let e = bv(this.$el);
13558
+ let e = Bv(this.$el);
13519
13559
  if (!e) throw Error("Switch requires a native checkbox input.");
13520
13560
  return e;
13521
13561
  },
13522
13562
  sync() {
13523
13563
  let e = this.item();
13524
- this.props.name && (e.input.name = this.props.name), this.props.value && (e.input.value = this.props.value), xv(e, {
13564
+ this.props.name && (e.input.name = this.props.name), this.props.value && (e.input.value = this.props.value), Vv(e, {
13525
13565
  disabled: this.props.disabled || e.disabled,
13526
13566
  required: this.props.required || e.required,
13527
13567
  invalid: this.props.invalid || e.invalid
@@ -13532,20 +13572,20 @@ var bv = (e) => {
13532
13572
  let t = this.input();
13533
13573
  t.disabled || (e.preventDefault(), t.checked = !t.checked, t.dispatchEvent(new Event("input", { bubbles: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0 })));
13534
13574
  }
13535
- }), Cv = (e) => {
13536
- e.data("UiSwitch", () => Sv());
13537
- }, wv = ["manual", "automatic"], Tv = Hp;
13538
- [...Tv];
13539
- var Ev = {
13575
+ }), Uv = (e) => {
13576
+ e.data("UiSwitch", () => Hv());
13577
+ }, Wv = ["manual", "automatic"], Gv = Hp;
13578
+ [...Gv];
13579
+ var Kv = {
13540
13580
  id: G.default("ui-tabs"),
13541
13581
  defaultValue: G,
13542
13582
  value: G,
13543
- activation: J(wv, "manual"),
13544
- orientation: J(Tv, "horizontal"),
13583
+ activation: J(Wv, "manual"),
13584
+ orientation: J(Gv, "horizontal"),
13545
13585
  loop: q.default(!0),
13546
13586
  panels: G,
13547
13587
  class: G
13548
- }, Dv = Y({ definition: {
13588
+ }, qv = Y({ definition: {
13549
13589
  component: "ui.tabs",
13550
13590
  parts: {
13551
13591
  root: {
@@ -13610,8 +13650,8 @@ var Ev = {
13610
13650
  variant: {
13611
13651
  subtle: "rounded-2 px-2 hover:bg-base-a2 ui-selected:font-medium",
13612
13652
  line: ["-mb-px rounded-none border-x-0 border-b-2 border-t-0 border-transparent px-0", "ui-selected:border-foreground ui-selected:font-medium"],
13613
- segmented: ["rounded-2 px-3 hover:bg-base-a2", "ui-selected:bg-surface ui-selected:font-medium ui-selected:shadow-border"],
13614
- pills: ["rounded-full bg-surface px-3 shadow-border hover:bg-base-a2", "ui-selected:bg-base-a3 ui-selected:font-medium ui-selected:shadow-border-hover"]
13653
+ segmented: ["rounded-2 px-3 hover:bg-base-a2", "ui-selected:bg-surface-panel ui-selected:font-medium ui-selected:shadow-border"],
13654
+ pills: ["rounded-full bg-surface-panel px-3 shadow-border hover:bg-base-a2", "ui-selected:bg-base-a3 ui-selected:font-medium ui-selected:shadow-border-hover"]
13615
13655
  },
13616
13656
  size: {
13617
13657
  sm: "h-control-sm text-xs",
@@ -13653,7 +13693,7 @@ var Ev = {
13653
13693
  panel: { base: "min-w-0 text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app" },
13654
13694
  panelInner: { base: "min-w-0" }
13655
13695
  }
13656
- } }), Ov = "ui-tabs", kv = (e) => e ? "active" : "inactive", Av = (e) => e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement, jv = (e) => Array.from(new Set(e)), Mv = (e) => e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || "tab", Nv = (e, t) => `${e}-tab-${Mv(t)}`, Pv = (e, t) => `${e}-panel-${Mv(t)}`, Fv = (e) => Q.asBool({ value: e }), Iv = () => ({
13696
+ } }), Jv = "ui-tabs", Yv = (e) => e ? "active" : "inactive", Xv = (e) => e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement, Zv = (e) => Array.from(new Set(e)), Qv = (e) => e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || "tab", $v = (e, t) => `${e}-tab-${Qv(t)}`, ey = (e, t) => `${e}-panel-${Qv(t)}`, ty = (e) => Q.asBool({ value: e }), ny = () => ({
13657
13697
  props: null,
13658
13698
  activeValue: "",
13659
13699
  collection: null,
@@ -13661,15 +13701,15 @@ var Ev = {
13661
13701
  init() {
13662
13702
  this.props = W({
13663
13703
  el: this.$el,
13664
- schema: Ev
13704
+ schema: Kv
13665
13705
  }), this.activeValue = this.initialValue(), this.setupEvents(), this.syncAll();
13666
13706
  },
13667
13707
  destroy() {
13668
13708
  this.props.disconnect(), this.teardown();
13669
13709
  },
13670
13710
  get root() {
13671
- return Q.props({ inputs: [Q.resolveStyle({
13672
- part: Dv.parts.root,
13711
+ return Q.mergeBindings({ inputs: [Q.resolveStyle({
13712
+ part: qv.parts.root,
13673
13713
  props: this.props,
13674
13714
  className: this.props.class
13675
13715
  }), {
@@ -13679,10 +13719,13 @@ var Ev = {
13679
13719
  }] });
13680
13720
  },
13681
13721
  owner() {
13682
- return this.$el.id || this.props.id || this.$el.dataset.owner || Ov;
13722
+ return this.$el.id || this.props.id || this.$el.dataset.owner || Jv;
13723
+ },
13724
+ ownsElement(e) {
13725
+ return e.closest("[data-ui-tabs]") === this.$el;
13683
13726
  },
13684
13727
  lists() {
13685
- return Array.from(this.$el.querySelectorAll("[data-ui-tabs-list]"));
13728
+ return Array.from(this.$el.querySelectorAll("[data-ui-tabs-list]")).filter((e) => this.ownsElement(e));
13686
13729
  },
13687
13730
  primaryList() {
13688
13731
  return this.lists()[0] ?? null;
@@ -13699,20 +13742,23 @@ var Ev = {
13699
13742
  return t === "vertical" || t === "horizontal" ? t : this.props.orientation;
13700
13743
  },
13701
13744
  tabs() {
13702
- return Array.from(this.$el.querySelectorAll("[data-ui-tabs-tab]")).map((e, t) => Av(e) ? (e.dataset.value || (e.dataset.value = `tab-${t + 1}`), {
13745
+ return Array.from(this.$el.querySelectorAll("[data-ui-tabs-tab]")).filter((e) => this.ownsElement(e)).map((e, t) => Xv(e) ? (e.dataset.value || (e.dataset.value = `tab-${t + 1}`), {
13703
13746
  tab: e,
13704
13747
  value: e.dataset.value,
13705
- isDisabled: Fv(e.dataset.disabled) || e.hasAttribute("disabled"),
13748
+ isDisabled: ty(e.dataset.disabled) || e.hasAttribute("disabled"),
13706
13749
  panel: this.panelForValue(e.dataset.value)
13707
13750
  }) : null).filter((e) => e !== null);
13708
13751
  },
13709
13752
  panels() {
13710
- let e = `[data-ui-tabs-panel][data-ui-tabs-owner="${this.owner()}"]`, t = Array.from(this.$el.querySelectorAll("[data-ui-tabs-panel]"));
13753
+ let e = this.owner(), t = `[data-ui-tabs-panel][data-ui-tabs-owner="${e}"]`, n = (t) => {
13754
+ let n = t.closest("[data-ui-tabs]");
13755
+ return (!n || n === this.$el) && (t.dataset.uiTabsOwner === e || t.dataset.owner === e);
13756
+ }, r = Array.from(this.$el.querySelectorAll("[data-ui-tabs-panel]")).filter((e) => this.ownsElement(e));
13711
13757
  if (this.props.panels) {
13712
13758
  let e = document.querySelector(this.props.panels);
13713
- e && t.push(...Array.from(e.querySelectorAll("[data-ui-tabs-panel]")));
13759
+ e && r.push(...Array.from(e.querySelectorAll("[data-ui-tabs-panel]")).filter(n));
13714
13760
  }
13715
- return t.push(...Array.from(document.querySelectorAll(e))), jv(t);
13761
+ return r.push(...Array.from(document.querySelectorAll(t)).filter(n)), Zv(r);
13716
13762
  },
13717
13763
  panelForValue(e) {
13718
13764
  return this.panels().find((t) => t.dataset.value === e) ?? null;
@@ -13720,8 +13766,8 @@ var Ev = {
13720
13766
  initialValue() {
13721
13767
  if (this.props.value) return this.props.value;
13722
13768
  if (this.props.defaultValue) return this.props.defaultValue;
13723
- let e = this.tabs().find((e) => Fv(e.tab.dataset.selected) || e.tab.getAttribute("aria-selected") === "true");
13724
- return e ? e.value : this.panels().find((e) => Fv(e.dataset.selected))?.dataset.value || this.fallbackValue();
13769
+ let e = this.tabs().find((e) => ty(e.tab.dataset.selected) || e.tab.getAttribute("aria-selected") === "true");
13770
+ return e ? e.value : this.panels().find((e) => ty(e.dataset.selected))?.dataset.value || this.fallbackValue();
13725
13771
  },
13726
13772
  fallbackValue() {
13727
13773
  return this.tabs().find((e) => !e.isDisabled)?.value ?? "";
@@ -13742,20 +13788,20 @@ var Ev = {
13742
13788
  syncList(e) {
13743
13789
  let t = this.listOrientation(e);
13744
13790
  e.setAttribute("role", "tablist"), e.dataset.orientation = t, e.className = Q.resolveStyle({
13745
- part: Dv.parts.list,
13791
+ part: qv.parts.list,
13746
13792
  props: {
13747
13793
  variant: e.dataset.variant || "line",
13748
13794
  size: e.dataset.size || "md",
13749
13795
  orientation: t,
13750
- scrollable: Fv(e.dataset.scrollable)
13796
+ scrollable: ty(e.dataset.scrollable)
13751
13797
  },
13752
13798
  className: e.dataset.class ?? ""
13753
13799
  }), t === "vertical" ? e.setAttribute("aria-orientation", "vertical") : e.removeAttribute("aria-orientation");
13754
13800
  },
13755
13801
  syncTab(e) {
13756
- let t = e.value === this.activeValue, n = e.tab.getAttribute("data-active") === "true" || document.activeElement === e.tab, r = kv(t), i = e.tab.dataset.uiTabsOwner || e.tab.dataset.owner || this.owner(), a = e.panel?.id || Pv(i, e.value), o = this.listOrientation(e.tab.closest("[data-ui-tabs-list]")), s = e.tab.closest("[data-ui-tabs-list]")?.dataset.variant || this.listVariant(), c = e.tab.closest("[data-ui-tabs-list]")?.dataset.size || this.listSize(), l = e.tab.querySelector("[data-ui-tabs-tab-selected-icon]");
13757
- if (e.tab.id ||= Nv(i, e.value), e.tab.dataset.state = r, e.tab.dataset.orientation = o, e.tab.dataset.variant = s, e.tab.dataset.size = c, e.tab.setAttribute("role", "tab"), e.tab.setAttribute("aria-selected", t ? "true" : "false"), e.tab.setAttribute("aria-controls", a), e.tab.tabIndex = t || n ? 0 : -1, e.tab.className = Q.resolveStyle({
13758
- part: Dv.parts.tab,
13802
+ let t = e.value === this.activeValue, n = e.tab.getAttribute("data-active") === "true" || document.activeElement === e.tab, r = Yv(t), i = e.tab.dataset.uiTabsOwner || e.tab.dataset.owner || this.owner(), a = e.panel?.id || ey(i, e.value), o = this.listOrientation(e.tab.closest("[data-ui-tabs-list]")), s = e.tab.closest("[data-ui-tabs-list]")?.dataset.variant || this.listVariant(), c = e.tab.closest("[data-ui-tabs-list]")?.dataset.size || this.listSize(), l = e.tab.querySelector("[data-ui-tabs-tab-selected-icon]");
13803
+ if (e.tab.id ||= $v(i, e.value), e.tab.dataset.state = r, e.tab.dataset.orientation = o, e.tab.dataset.variant = s, e.tab.dataset.size = c, e.tab.setAttribute("role", "tab"), e.tab.setAttribute("aria-selected", t ? "true" : "false"), e.tab.setAttribute("aria-controls", a), e.tab.tabIndex = t || n ? 0 : -1, e.tab.className = Q.resolveStyle({
13804
+ part: qv.parts.tab,
13759
13805
  props: {
13760
13806
  variant: s,
13761
13807
  size: c,
@@ -13774,9 +13820,9 @@ var Ev = {
13774
13820
  e.tab.removeAttribute("data-disabled"), e.tab.removeAttribute("aria-disabled"), e.tab instanceof HTMLButtonElement && (e.tab.disabled = !1);
13775
13821
  },
13776
13822
  syncPanel(e) {
13777
- let t = e.dataset.value || "", n = t === this.activeValue, r = e.dataset.uiTabsOwner || e.dataset.owner || this.owner(), i = Nv(r, t), a = Pv(r, t);
13778
- t && !e.id && (e.id = a), !e.getAttribute("data-ui-key") && t && e.setAttribute("data-ui-key", e.id || a), e.dataset.state = kv(n), e.dataset.orientation = this.props.orientation, e.setAttribute("role", "tabpanel"), e.setAttribute("aria-labelledby", i), e.hasAttribute("tabindex") || (e.tabIndex = 0), e.hidden = !n, e.className = Q.resolveStyle({
13779
- part: Dv.parts.panel,
13823
+ let t = e.dataset.value || "", n = t === this.activeValue, r = e.dataset.uiTabsOwner || e.dataset.owner || this.owner(), i = $v(r, t), a = ey(r, t);
13824
+ t && !e.id && (e.id = a), !e.getAttribute("data-ui-key") && t && e.setAttribute("data-ui-key", e.id || a), e.dataset.state = Yv(n), e.dataset.orientation = this.props.orientation, e.setAttribute("role", "tabpanel"), e.setAttribute("aria-labelledby", i), e.hasAttribute("tabindex") || (e.tabIndex = 0), e.hidden = !n, e.className = Q.resolveStyle({
13825
+ part: qv.parts.panel,
13780
13826
  props: this.props,
13781
13827
  className: e.dataset.class ?? ""
13782
13828
  }), Q.setPresence({
@@ -13810,7 +13856,7 @@ var Ev = {
13810
13856
  },
13811
13857
  tabFromEvent(e) {
13812
13858
  let t = (e.target instanceof Element ? e.target : null)?.closest("[data-ui-tabs-tab]") ?? null;
13813
- return !Av(t) || !this.$el.contains(t) ? null : t;
13859
+ return !Xv(t) || !this.ownsElement(t) ? null : t;
13814
13860
  },
13815
13861
  itemFromTab(e) {
13816
13862
  return this.tabs().find((t) => t.tab === e) ?? null;
@@ -13819,7 +13865,7 @@ var Ev = {
13819
13865
  return this.collection ||= Q.createCollectionNavigation({
13820
13866
  root: () => this.$el,
13821
13867
  itemSelector: "[data-ui-tabs-tab]",
13822
- isDisabled: (e) => Fv(e.dataset.disabled) || e.hasAttribute("disabled"),
13868
+ isDisabled: (e) => !this.ownsElement(e) || ty(e.dataset.disabled) || e.hasAttribute("disabled"),
13823
13869
  loop: () => this.props.loop
13824
13870
  }), this.collection;
13825
13871
  },
@@ -13889,7 +13935,7 @@ var Ev = {
13889
13935
  activateFocused() {
13890
13936
  if (this.props.activation !== "automatic") return;
13891
13937
  let e = document.activeElement;
13892
- if (!Av(e)) return;
13938
+ if (!Xv(e)) return;
13893
13939
  let t = this.itemFromTab(e);
13894
13940
  t && !t.isDisabled && this.setActiveValue(t.value, e);
13895
13941
  },
@@ -13910,86 +13956,258 @@ var Ev = {
13910
13956
  }
13911
13957
  });
13912
13958
  }
13913
- }), Lv = (e) => {
13914
- e.data("UiTabs", () => Iv());
13915
- }, Rv = [
13959
+ }), ry = (e) => {
13960
+ e.data("UiTabs", () => ny());
13961
+ }, iy = [
13916
13962
  "info",
13917
13963
  "success",
13918
13964
  "warning",
13919
13965
  "danger",
13920
13966
  "debug"
13921
- ], zv = [
13922
- "default",
13923
- "info",
13967
+ ], ay = [
13968
+ "auto",
13969
+ "neutral",
13970
+ "accent",
13924
13971
  "success",
13925
13972
  "warning",
13926
- "danger",
13927
- "debug"
13928
- ], Bv = [
13973
+ "danger"
13974
+ ], oy = [
13975
+ "default",
13976
+ "soft",
13977
+ "surface",
13978
+ "solid",
13979
+ "outline"
13980
+ ], sy = [
13929
13981
  "top-right",
13930
13982
  "top-left",
13931
13983
  "top-center",
13932
13984
  "bottom-right",
13933
13985
  "bottom-left",
13934
13986
  "bottom-center"
13935
- ], Vv = {
13936
- level: J(Rv, "info"),
13937
- variant: J(zv, "default"),
13987
+ ], cy = {
13988
+ level: J(iy, "info"),
13989
+ color: J(ay, "auto"),
13990
+ variant: J(oy, "default"),
13938
13991
  title: G,
13992
+ description: G,
13939
13993
  duration: K.default(5e3).min(0),
13940
13994
  dismissible: q.default(!0),
13941
13995
  class: G,
13942
13996
  contentClass: G,
13943
13997
  closeClass: G
13944
- }, Hv = {
13998
+ }, ly = {
13945
13999
  id: G.default("ui-toast-root"),
13946
- position: J(Bv, "top-right"),
14000
+ position: J(sy, "top-right"),
13947
14001
  duration: K.default(5e3).min(0),
13948
14002
  includeMessages: q.default(!0),
13949
14003
  class: G
13950
- }, Uv = Y({ definition: {
14004
+ }, uy = Y({ definition: {
13951
14005
  component: "ui.toast",
13952
14006
  parts: {
13953
14007
  root: {
13954
- base: ["pointer-events-auto relative grid w-full min-w-0 gap-3 overflow-hidden rounded-4 bg-toast p-3 text-foreground shadow-popover outline-none", "data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0"],
14008
+ base: ["group/toast pointer-events-auto relative grid w-full min-w-0 items-center gap-x-3 gap-y-1 overflow-hidden rounded-4 border px-3 py-2.5 text-foreground outline-none", "data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0"],
13955
14009
  variants: {
13956
14010
  variant: {
13957
- default: "grid-cols-[1fr_auto]",
13958
- info: "grid-cols-[auto_1fr_auto]",
13959
- success: "grid-cols-[auto_1fr_auto]",
13960
- warning: "grid-cols-[auto_1fr_auto]",
13961
- danger: "grid-cols-[auto_1fr_auto]",
13962
- debug: "grid-cols-[auto_1fr_auto]"
13963
- },
13964
- level: {
13965
- info: "",
14011
+ default: "border-transparent bg-toast shadow-popover",
14012
+ soft: "border-transparent bg-base-a2 shadow-popover",
14013
+ surface: "border-border bg-toast text-foreground shadow-popover",
14014
+ solid: "border-transparent bg-base-12 text-base-1 shadow-popover",
14015
+ outline: "border-border bg-transparent shadow-none"
14016
+ },
14017
+ color: {
14018
+ neutral: "",
14019
+ accent: "",
13966
14020
  success: "",
13967
14021
  warning: "",
13968
- danger: "",
13969
- debug: ""
14022
+ danger: ""
14023
+ },
14024
+ hasMarker: {
14025
+ true: "grid-cols-[auto_minmax(0,1fr)_auto]",
14026
+ false: "grid-cols-[minmax(0,1fr)_auto]"
14027
+ },
14028
+ hasDescription: {
14029
+ true: "",
14030
+ false: ""
13970
14031
  }
13971
14032
  },
14033
+ compounds: [
14034
+ {
14035
+ when: {
14036
+ variant: "soft",
14037
+ color: "accent"
14038
+ },
14039
+ class: "bg-accent-surface text-accent-text shadow-popover"
14040
+ },
14041
+ {
14042
+ when: {
14043
+ variant: "soft",
14044
+ color: "success"
14045
+ },
14046
+ class: "bg-success-surface text-success-text shadow-popover"
14047
+ },
14048
+ {
14049
+ when: {
14050
+ variant: "soft",
14051
+ color: "warning"
14052
+ },
14053
+ class: "bg-warning-surface text-warning-text shadow-popover"
14054
+ },
14055
+ {
14056
+ when: {
14057
+ variant: "soft",
14058
+ color: "danger"
14059
+ },
14060
+ class: "bg-danger-surface text-danger-text shadow-popover"
14061
+ },
14062
+ {
14063
+ when: {
14064
+ variant: "surface",
14065
+ color: "accent"
14066
+ },
14067
+ class: "border-accent-border bg-toast text-foreground shadow-popover"
14068
+ },
14069
+ {
14070
+ when: {
14071
+ variant: "surface",
14072
+ color: "success"
14073
+ },
14074
+ class: "border-success-border bg-toast text-foreground shadow-popover"
14075
+ },
14076
+ {
14077
+ when: {
14078
+ variant: "surface",
14079
+ color: "warning"
14080
+ },
14081
+ class: "border-warning-border bg-toast text-foreground shadow-popover"
14082
+ },
14083
+ {
14084
+ when: {
14085
+ variant: "surface",
14086
+ color: "danger"
14087
+ },
14088
+ class: "border-danger-border bg-toast text-foreground shadow-popover"
14089
+ },
14090
+ {
14091
+ when: {
14092
+ variant: "outline",
14093
+ color: "accent"
14094
+ },
14095
+ class: "border-accent-border text-accent-text shadow-none"
14096
+ },
14097
+ {
14098
+ when: {
14099
+ variant: "outline",
14100
+ color: "success"
14101
+ },
14102
+ class: "border-success-border text-success-text shadow-none"
14103
+ },
14104
+ {
14105
+ when: {
14106
+ variant: "outline",
14107
+ color: "warning"
14108
+ },
14109
+ class: "border-warning-border text-warning-text shadow-none"
14110
+ },
14111
+ {
14112
+ when: {
14113
+ variant: "outline",
14114
+ color: "danger"
14115
+ },
14116
+ class: "border-danger-border text-danger-text shadow-none"
14117
+ },
14118
+ {
14119
+ when: {
14120
+ variant: "solid",
14121
+ color: "accent"
14122
+ },
14123
+ class: "border-transparent bg-accent-solid text-accent-contrast shadow-popover"
14124
+ },
14125
+ {
14126
+ when: {
14127
+ variant: "solid",
14128
+ color: "success"
14129
+ },
14130
+ class: "border-transparent bg-success-solid text-success-contrast shadow-popover"
14131
+ },
14132
+ {
14133
+ when: {
14134
+ variant: "solid",
14135
+ color: "warning"
14136
+ },
14137
+ class: "border-transparent bg-warning-solid text-warning-contrast shadow-popover"
14138
+ },
14139
+ {
14140
+ when: {
14141
+ variant: "solid",
14142
+ color: "danger"
14143
+ },
14144
+ class: "border-transparent bg-danger-solid text-danger-contrast shadow-popover"
14145
+ }
14146
+ ],
13972
14147
  defaults: {
13973
14148
  variant: "default",
13974
- level: "info"
14149
+ color: "neutral",
14150
+ hasMarker: !1,
14151
+ hasDescription: !1
13975
14152
  }
13976
14153
  },
13977
14154
  marker: {
13978
- base: "mt-1 size-2 shrink-0 rounded-full",
14155
+ base: "size-2 self-center rounded-full",
14156
+ variants: {
14157
+ color: {
14158
+ neutral: "hidden",
14159
+ accent: "bg-accent-solid",
14160
+ success: "bg-success-solid",
14161
+ warning: "bg-warning-solid",
14162
+ danger: "bg-danger-solid"
14163
+ },
14164
+ variant: {
14165
+ default: "hidden",
14166
+ soft: "",
14167
+ surface: "",
14168
+ solid: "hidden",
14169
+ outline: ""
14170
+ }
14171
+ },
14172
+ defaults: {
14173
+ color: "neutral",
14174
+ variant: "default"
14175
+ }
14176
+ },
14177
+ content: { base: "grid min-w-0 gap-0.5 self-center" },
14178
+ title: {
14179
+ base: "min-w-0",
13979
14180
  variants: { variant: {
13980
- default: "hidden",
13981
- info: "bg-accent-solid",
13982
- success: "bg-success-solid",
13983
- warning: "bg-warning-solid",
13984
- danger: "bg-danger-solid",
13985
- debug: "bg-base-9"
14181
+ default: "",
14182
+ soft: "text-current",
14183
+ surface: "",
14184
+ solid: "text-current",
14185
+ outline: "text-current"
14186
+ } },
14187
+ defaults: { variant: "default" }
14188
+ },
14189
+ description: {
14190
+ base: "min-w-0",
14191
+ variants: { variant: {
14192
+ default: "",
14193
+ soft: "text-current opacity-80",
14194
+ surface: "",
14195
+ solid: "text-current opacity-80",
14196
+ outline: "text-current opacity-80"
14197
+ } },
14198
+ defaults: { variant: "default" }
14199
+ },
14200
+ close: {
14201
+ base: ["-mr-1 inline-flex size-control-md shrink-0 items-center justify-center self-center rounded-2 text-icon outline-none", "hover:bg-base-a2 focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app"],
14202
+ variants: { variant: {
14203
+ default: "",
14204
+ soft: "text-current hover:bg-current/10 focus-visible:ring-current focus-visible:ring-offset-transparent",
14205
+ surface: "",
14206
+ solid: "text-current hover:bg-current/10 focus-visible:ring-current focus-visible:ring-offset-transparent",
14207
+ outline: "text-current hover:bg-current/10 focus-visible:ring-current focus-visible:ring-offset-transparent"
13986
14208
  } },
13987
14209
  defaults: { variant: "default" }
13988
14210
  },
13989
- content: { base: "grid min-w-0 gap-0.5" },
13990
- title: { base: "min-w-0" },
13991
- description: { base: "min-w-0" },
13992
- close: { base: ["-mr-1 -mt-1 inline-flex size-control-md shrink-0 items-center justify-center rounded-2 text-icon outline-none", "hover:bg-base-a2 focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app"] },
13993
14211
  closeIcon: { base: "size-icon fill-current" },
13994
14212
  outlet: {
13995
14213
  base: ["pointer-events-none fixed z-toast flex w-[min(24rem,calc(100vw-2rem))] flex-col gap-2"],
@@ -14004,49 +14222,52 @@ var Ev = {
14004
14222
  defaults: { position: "top-right" }
14005
14223
  }
14006
14224
  }
14007
- } }), Wv = (e) => e === "info" || e === "success" || e === "warning" || e === "danger" || e === "debug", Gv = (e) => e === "default" || e === "info" || e === "success" || e === "warning" || e === "danger" || e === "debug", Kv = (e, t) => {
14225
+ } }), dy = (e) => e === "info" || e === "success" || e === "warning" || e === "danger" || e === "debug", fy = (e) => e === "auto" || e === "neutral" || e === "accent" || e === "success" || e === "warning" || e === "danger", py = (e) => e === "default" || e === "soft" || e === "surface" || e === "solid" || e === "outline", my = (e) => e === "info" ? "accent" : e === "success" || e === "warning" || e === "danger" ? e : "neutral", hy = (e, t) => fy(e) && e !== "auto" ? e : my(t), gy = (e, t) => {
14008
14226
  let n = typeof e == "number" ? e : Number(e);
14009
14227
  return Number.isFinite(n) && n >= 0 ? n : t;
14010
- }, qv = (e) => Math.min(e, 3), Jv = /* @__PURE__ */ new WeakMap(), Yv = (e) => {
14228
+ }, _y = (e) => Math.min(e, 3), vy = /* @__PURE__ */ new WeakMap(), yy = (e) => {
14011
14229
  let t = Array.from(e.querySelectorAll(":scope > [data-ui-toast]"));
14012
14230
  e.dataset.stack = t.length > 1 ? "collapsed" : "single";
14013
- let n = window.getComputedStyle(e), r = Number.parseFloat(n.rowGap || n.gap || "0") || 0, i = t.map((e) => Math.ceil(e.scrollHeight || e.getBoundingClientRect().height)), a = i[0] ?? 0, o = Number.parseFloat(n.getPropertyValue("--ui-toast-stack-peek")) || 8, s = e.dataset.position?.startsWith("bottom") ? -1 : 1, c = qv(Math.max(0, t.length - 1)), l = i.reduce((e, t) => e + t, 0) + Math.max(0, t.length - 1) * r, u = a + c * o;
14231
+ let n = window.getComputedStyle(e), r = Number.parseFloat(n.rowGap || n.gap || "0") || 0, i = t.map((e) => Math.ceil(e.scrollHeight || e.getBoundingClientRect().height)), a = i[0] ?? 0, o = Number.parseFloat(n.getPropertyValue("--ui-toast-stack-peek")) || 8, s = e.dataset.position?.startsWith("bottom") ? -1 : 1, c = _y(Math.max(0, t.length - 1)), l = i.reduce((e, t) => e + t, 0) + Math.max(0, t.length - 1) * r, u = a + c * o;
14014
14232
  e.style.setProperty("--ui-toast-front-height", `${a}px`), e.style.setProperty("--ui-toast-stack-height", `${u}px`), e.style.setProperty("--ui-toast-stack-expanded-height", `${l}px`), t.forEach((e, n) => {
14015
- let r = qv(n), i = Math.max(.91, 1 - r * .03), a = Math.max(.72, 1 - r * .08);
14016
- e.dataset.stackIndex = String(n), e.style.setProperty("--ui-toast-stack-index", String(n)), e.style.setProperty("--ui-toast-stack-depth", String(r)), e.style.setProperty("--ui-toast-stack-direction", String(s)), e.style.setProperty("--ui-toast-stack-offset", `${r * o * s}px`), e.style.setProperty("--ui-toast-stack-scale", String(i)), e.style.setProperty("--ui-toast-stack-opacity", String(a)), e.style.zIndex = String(t.length - n);
14233
+ let r = _y(n), i = Math.max(.91, 1 - r * .03), a = Math.max(.72, 1 - r * .08);
14234
+ e.dataset.state !== "closed" && (e.style.removeProperty("opacity"), e.style.removeProperty("transform")), e.dataset.stackIndex = String(n), e.style.setProperty("--ui-toast-stack-index", String(n)), e.style.setProperty("--ui-toast-stack-depth", String(r)), e.style.setProperty("--ui-toast-stack-direction", String(s)), e.style.setProperty("--ui-toast-stack-offset", `${r * o * s}px`), e.style.setProperty("--ui-toast-stack-scale", String(i)), e.style.setProperty("--ui-toast-stack-opacity", String(a)), e.style.zIndex = String(t.length - n);
14017
14235
  });
14018
- }, Xv = (e) => {
14236
+ }, by = (e) => {
14019
14237
  let t = e.parentElement instanceof HTMLElement ? e.parentElement : null;
14020
- e.dataset.state = "closed", e.remove(), t?.matches("[data-ui-toast-outlet]") && Yv(t);
14021
- }, Zv = (e) => {
14022
- Jv.get(e)?.cancel();
14238
+ e.dataset.state = "closed", e.remove(), t?.matches("[data-ui-toast-outlet]") && yy(t);
14239
+ }, xy = (e) => {
14240
+ vy.get(e)?.cancel();
14023
14241
  let t = Q.motion.animatePresence(e, "enter", "toast");
14024
- Jv.set(e, t), t.finished.finally(() => {
14025
- Jv.get(e) === t && Jv.delete(e);
14242
+ vy.set(e, t), t.finished.finally(() => {
14243
+ if (vy.get(e) !== t) return;
14244
+ vy.delete(e), e.style.removeProperty("opacity"), e.style.removeProperty("transform");
14245
+ let n = e.parentElement instanceof HTMLElement && e.parentElement.matches("[data-ui-toast-outlet]") ? e.parentElement : null;
14246
+ n && yy(n);
14026
14247
  });
14027
- }, Qv = (e) => {
14248
+ }, Sy = (e) => {
14028
14249
  if (!e.isConnected) return;
14029
- e.dataset.state = "closed", Jv.get(e)?.cancel();
14250
+ e.dataset.state = "closed", vy.get(e)?.cancel();
14030
14251
  let t = Q.motion.animatePresence(e, "exit", "toast");
14031
- Jv.set(e, t), t.finished.finally(() => {
14032
- Jv.get(e) === t && (Jv.delete(e), Xv(e));
14252
+ vy.set(e, t), t.finished.finally(() => {
14253
+ vy.get(e) === t && (vy.delete(e), by(e));
14033
14254
  });
14034
- }, $v = (e) => {
14255
+ }, Cy = (e) => {
14035
14256
  let t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
14036
14257
  t.setAttribute("viewBox", "0 0 32 32"), t.setAttribute("aria-hidden", "true"), t.setAttribute("data-ui-toast-close-icon", ""), t.setAttribute("class", e);
14037
14258
  let n = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
14038
14259
  return n.setAttribute("points", "17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16"), t.append(n), t;
14039
- }, ey = () => ({
14260
+ }, wy = () => ({
14040
14261
  props: null,
14041
14262
  cleanup: [],
14042
14263
  timer: null,
14043
14264
  init() {
14044
14265
  this.props = W({
14045
14266
  el: this.$el,
14046
- schema: Vv
14267
+ schema: cy
14047
14268
  });
14048
14269
  let e = this.$el, t = e.parentElement instanceof HTMLElement && e.parentElement.matches("[data-ui-toast-outlet]") ? e.parentElement : null;
14049
- e.dataset.state = "open", e.setAttribute("data-ui-motion-owner", "component"), t && Yv(t), Zv(e), this.props.dismissible && Q.addListener({
14270
+ e.dataset.state = "open", e.setAttribute("data-ui-motion-owner", "component"), t && yy(t), xy(e), this.props.dismissible && Q.addListener({
14050
14271
  target: e,
14051
14272
  event: "click",
14052
14273
  handler: (e) => {
@@ -14057,50 +14278,67 @@ var Ev = {
14057
14278
  }), this.props.duration > 0 && (this.timer = window.setTimeout(() => this.dismiss(), this.props.duration));
14058
14279
  },
14059
14280
  destroy() {
14060
- this.props.disconnect(), this.cleanup.forEach((e) => e()), this.cleanup = [], this.timer !== null && window.clearTimeout(this.timer), Jv.get(this.$el)?.cancel();
14281
+ this.props.disconnect(), this.cleanup.forEach((e) => e()), this.cleanup = [], this.timer !== null && window.clearTimeout(this.timer), vy.get(this.$el)?.cancel();
14061
14282
  },
14062
14283
  dismiss() {
14063
14284
  let e = this.$el;
14064
14285
  this.timer !== null && window.clearTimeout(this.timer), Q.dispatch({
14065
14286
  el: e,
14066
14287
  name: "ui:dismiss"
14067
- }), Qv(e);
14288
+ }), Sy(e);
14068
14289
  }
14069
- }), ty = (e, t) => {
14070
- let n = Wv(e.level) ? e.level : "info", r = Gv(e.variant) ? e.variant : Wv(e.level) ? e.level : "default", i = typeof e.title == "string" ? e.title : "", a = typeof e.message == "string" ? e.message : "", o = Kv(e.duration, t), s = typeof e.dismissible == "boolean" ? e.dismissible : !0, c = n === "danger" || n === "warning", l = document.createElement("div");
14071
- l.dataset.uiToast = "", l.dataset.level = n, l.dataset.variant = r, l.dataset.duration = String(o), l.dataset.dismissible = String(s), l.dataset.state = "open", l.setAttribute("role", c ? "alert" : "status"), l.setAttribute("aria-live", c ? "assertive" : "polite"), l.setAttribute("aria-atomic", "true"), l.className = Q.resolveStyle({
14072
- part: Uv.parts.root,
14290
+ }), Ty = (e, t) => {
14291
+ let n = dy(e.level) ? e.level : "info", r = hy(e.color, n), i = py(e.variant) ? e.variant : "default", a = typeof e.title == "string" ? e.title : "", o = typeof e.description == "string" ? e.description : "", s = o.trim().length > 0, c = r !== "neutral" && i !== "solid" && i !== "default", l = gy(e.duration, t), u = typeof e.dismissible == "boolean" ? e.dismissible : !0, d = n === "danger" || n === "warning", f = document.createElement("div");
14292
+ f.dataset.uiToast = "", f.dataset.level = n, f.dataset.color = r, f.dataset.variant = i, f.dataset.duration = String(l), f.dataset.dismissible = String(u), f.dataset.description = String(s), f.dataset.state = "open", f.setAttribute("role", d ? "alert" : "status"), f.setAttribute("aria-live", d ? "assertive" : "polite"), f.setAttribute("aria-atomic", "true"), f.className = Q.resolveStyle({
14293
+ part: uy.parts.root,
14073
14294
  props: {
14074
- level: n,
14075
- variant: r
14295
+ variant: i,
14296
+ color: r,
14297
+ hasDescription: s,
14298
+ hasMarker: c
14076
14299
  }
14077
14300
  });
14078
- let u = document.createElement("span");
14079
- u.dataset.uiToastMarker = "", u.setAttribute("aria-hidden", "true"), u.className = Q.resolveStyle({
14080
- part: Uv.parts.marker,
14081
- props: { variant: r }
14082
- }), l.append(u);
14083
- let d = document.createElement("div");
14084
- if (d.dataset.uiToastContent = "", d.className = Q.resolveStyle({ part: Uv.parts.content }), i) {
14301
+ let p = document.createElement("span");
14302
+ p.dataset.uiToastMarker = "", p.setAttribute("aria-hidden", "true"), p.className = Q.resolveStyle({
14303
+ part: uy.parts.marker,
14304
+ props: {
14305
+ variant: i,
14306
+ color: r
14307
+ }
14308
+ }), f.append(p);
14309
+ let m = document.createElement("div");
14310
+ if (m.dataset.uiToastContent = "", m.className = Q.resolveStyle({ part: uy.parts.content }), a) {
14085
14311
  let e = document.createElement("strong");
14086
- e.dataset.uiToastTitle = "", e.className = `${Q.resolveStyle({ part: Uv.parts.title })} text-sm font-medium text-foreground`, e.textContent = i, d.append(e);
14312
+ e.dataset.uiToastTitle = "", e.className = `text-sm font-medium text-foreground ${Q.resolveStyle({
14313
+ part: uy.parts.title,
14314
+ props: { variant: i }
14315
+ })}`, e.textContent = a, m.append(e);
14316
+ }
14317
+ if (s) {
14318
+ let e = document.createElement("div");
14319
+ e.dataset.uiToastDescription = "", e.className = `text-sm text-foreground-muted ${Q.resolveStyle({
14320
+ part: uy.parts.description,
14321
+ props: { variant: i }
14322
+ })}`, e.textContent = o, m.append(e);
14087
14323
  }
14088
- let f = document.createElement("div");
14089
- if (f.dataset.uiToastDescription = "", f.className = `${Q.resolveStyle({ part: Uv.parts.description })} text-sm text-foreground-muted`, f.textContent = a, d.append(f), l.append(d), s) {
14324
+ if (f.append(m), u) {
14090
14325
  let e = document.createElement("button");
14091
- e.type = "button", e.dataset.uiToastClose = "", e.setAttribute("aria-label", "Dismiss notification"), e.className = Q.resolveStyle({ part: Uv.parts.close }), e.append($v(Q.resolveStyle({ part: Uv.parts.closeIcon }))), e.addEventListener("click", () => Qv(l)), l.append(e);
14326
+ e.type = "button", e.dataset.uiToastClose = "", e.setAttribute("aria-label", "Dismiss notification"), e.className = Q.resolveStyle({
14327
+ part: uy.parts.close,
14328
+ props: { variant: i }
14329
+ }), e.append(Cy(Q.resolveStyle({ part: uy.parts.closeIcon }))), e.addEventListener("click", () => Sy(f)), f.append(e);
14092
14330
  }
14093
- return o > 0 && window.setTimeout(() => Qv(l), o), l;
14094
- }, ny = () => ({
14331
+ return l > 0 && window.setTimeout(() => Sy(f), l), f;
14332
+ }, Ey = () => ({
14095
14333
  props: null,
14096
14334
  cleanup: [],
14097
14335
  init() {
14098
14336
  this.props = W({
14099
14337
  el: this.$el,
14100
- schema: Hv
14338
+ schema: ly
14101
14339
  });
14102
14340
  let e = this.$el;
14103
- Yv(e), Q.addListener({
14341
+ yy(e), Q.addListener({
14104
14342
  target: e,
14105
14343
  event: "pointerover",
14106
14344
  handler: () => {
@@ -14145,13 +14383,14 @@ var Ev = {
14145
14383
  this.props.disconnect(), this.cleanup.forEach((e) => e()), this.cleanup = [];
14146
14384
  },
14147
14385
  add(e) {
14148
- if (!(typeof e.message == "string" && e.message)) return;
14149
- let t = this.$el, n = ty(e, this.props.duration);
14150
- n.setAttribute("data-ui-motion-owner", "component"), t.append(n), Yv(t), Zv(n);
14151
- }
14152
- }), ry = (e) => {
14153
- e.data("UiToast", () => ey()), e.data("UiToastOutlet", () => ny());
14154
- }, iy = {
14386
+ let t = typeof e.title == "string" ? e.title : "", n = typeof e.description == "string" ? e.description : "";
14387
+ if (!t.trim() && !n.trim()) return;
14388
+ let r = this.$el, i = Ty(e, this.props.duration);
14389
+ i.setAttribute("data-ui-motion-owner", "component"), r.append(i), yy(r), xy(i);
14390
+ }
14391
+ }), Dy = (e) => {
14392
+ e.data("UiToast", () => wy()), e.data("UiToastOutlet", () => Ey());
14393
+ }, Oy = {
14155
14394
  bool: q,
14156
14395
  className: Il,
14157
14396
  create: Zl,
@@ -14161,21 +14400,21 @@ var Ev = {
14161
14400
  defineProps: W,
14162
14401
  defineStyles: Y,
14163
14402
  json: vu,
14403
+ mergeBindings: nu,
14164
14404
  motion: Ws,
14165
14405
  number: K,
14166
14406
  oneOf: J,
14167
- props: nu,
14168
14407
  propsFromSchema: Bf,
14169
14408
  resolveStyle: X,
14170
14409
  string: G
14171
- }, ay = (e) => {
14410
+ }, ky = (e) => {
14172
14411
  if (e.ajax) return;
14173
14412
  let t = {}, n = document.querySelector("meta[name=\"csrf-token\"]");
14174
14413
  n && (t.headers = { "X-CSRFToken": n.content }), e.plugin(de), e.plugin(C.configure(t));
14175
- }, oy = (e) => {
14176
- _u(e.reactive), ay(e), Ys(e), Ap(e), Jl(), jm(), mm(e), Um(e), Qm(e), Sh(e), kh(e), Ph(e), lg(e), hg(e), Fg(e), Wg(e), a_(e), O_(e), Z_(e), hv(e), Lf(e), vp(e), Cv(e), Lv(e), ry(e);
14414
+ }, Ay = (e) => {
14415
+ _u(e.reactive), ky(e), Ys(e), Ap(e), Jl(), Vm(), xm(e), $m(e), lh(e), Ph(e), Vh(e), Kh(e), xg(e), Og(e), $g(e), c_(e), C_(e), J_(e), _v(e), Fv(e), Lf(e), vp(e), Uv(e), ry(e), Dy(e);
14177
14416
  };
14178
14417
  //#endregion
14179
- export { q as bool, Il as className, Zl as create, If as createResizable, Ll as cx, oy as default, oy as trellisUi, zf as defineManifest, W as defineProps, Y as defineStyles, vu as json, Ws as motion, K as number, J as oneOf, nu as props, Bf as propsFromSchema, X as resolveStyle, G as string, iy as ui };
14418
+ export { q as bool, Il as className, Zl as create, If as createResizable, Ll as cx, Ay as default, Ay as trellisUi, zf as defineManifest, W as defineProps, Y as defineStyles, vu as json, nu as mergeBindings, Ws as motion, K as number, J as oneOf, Bf as propsFromSchema, X as resolveStyle, G as string, Oy as ui };
14180
14419
 
14181
14420
  //# sourceMappingURL=index.js.map