@webority/ui-react 0.9.6 → 0.9.8

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.
@@ -1,4 +1,4 @@
1
- export default function AppButton({ children, variant, size, type, loading, disabled, block, leftIcon, rightIcon, href, className, ...rest }: {
1
+ export default function AppButton({ children, variant, size, type, loading, disabled, block, leftIcon, rightIcon, href, static: isStatic, className, ...rest }: {
2
2
  [x: string]: any;
3
3
  block?: boolean;
4
4
  children: any;
@@ -9,6 +9,7 @@ export default function AppButton({ children, variant, size, type, loading, disa
9
9
  loading?: boolean;
10
10
  rightIcon?: any;
11
11
  size?: string;
12
+ static?: boolean;
12
13
  type?: string;
13
14
  variant?: string;
14
15
  }): import("react").JSX.Element;
@@ -34,6 +34,10 @@
34
34
  * @param {number} [props.maxLength] Character cap; the count turns red as it is approached.
35
35
  * @param {import('react').ReactNode} [props.prefix] A bordered box before the input (e.g. ₹, https://).
36
36
  * @param {import('react').ReactNode} [props.suffix] A bordered box after the input (e.g. .00, .com).
37
+ * @param {import('react').ReactNode} [props.action] A control rendered BESIDE the field, outside its
38
+ * border — a labelled action button (verify, apply, send code), or a confirmation once the field
39
+ * is resolved. The field flexes to fill the row; the action keeps its natural width. Exclusive
40
+ * with the in-field shells (unit / password / affix / trailing icon); pairs with a leading icon.
37
41
  * @param {boolean} [props.floatingLabel=false] Label sits inside as a placeholder, then slides up
38
42
  * on focus/fill. Opt-in variant; standalone only (no icon/unit/prefix in the same field).
39
43
  * @param {"bare"} [props.variant] Borderless variant — no border/background, inherits the
package/dist/ui-react.js CHANGED
@@ -172,13 +172,13 @@ function L() {
172
172
  I.clear();
173
173
  }), F;
174
174
  }
175
- var R = new Set(D), z = null, ee = null, B = /* @__PURE__ */ new Set();
175
+ var ee = new Set(D), R = null, z = null, B = /* @__PURE__ */ new Set();
176
176
  function te() {
177
- return ee ||= import("./iconCatalogFull.g-BKUr0SVj.js").then((e) => {
178
- z = e.FULL_GLYPHS;
177
+ return z ||= import("./iconCatalogFull.g-BKUr0SVj.js").then((e) => {
178
+ R = e.FULL_GLYPHS;
179
179
  for (let e of B) e();
180
180
  B.clear();
181
- }), ee;
181
+ }), z;
182
182
  }
183
183
  var ne = {
184
184
  outline: () => import("./iconCatalogFull.outline.g-AOnxJAAj.js"),
@@ -210,10 +210,10 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
210
210
  role: "img",
211
211
  "aria-label": r,
212
212
  children: e
213
- }) : e, h = O[e] !== void 0, g = !h && R.has(e), [, _] = d(0);
213
+ }) : e, h = O[e] !== void 0, g = !h && ee.has(e), [, _] = d(0);
214
214
  o(() => {
215
215
  let e = () => _((e) => e + 1);
216
- return l && h && !P && (I.add(e), L()), g && !z && (B.add(e), te()), l && g && !re[n] && ((ae[n] ||= /* @__PURE__ */ new Set()).add(e), oe(n)), () => {
216
+ return l && h && !P && (I.add(e), L()), g && !R && (B.add(e), te()), l && g && !re[n] && ((ae[n] ||= /* @__PURE__ */ new Set()).add(e), oe(n)), () => {
217
217
  I.delete(e), B.delete(e), ae[n]?.delete(e);
218
218
  };
219
219
  }, [
@@ -252,7 +252,7 @@ function V({ name: e, size: t = 16, variant: n, tooltip: r, className: i, color:
252
252
  }), /* @__PURE__ */ p("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
253
253
  })
254
254
  }));
255
- let y = l && (P?.[n]?.[e] || re?.[n]?.[e]) || O[e] || z?.[e];
255
+ let y = l && (P?.[n]?.[e] || re?.[n]?.[e]) || O[e] || R?.[e];
256
256
  return y ? f(/* @__PURE__ */ p("svg", {
257
257
  width: t,
258
258
  height: t,
@@ -387,7 +387,7 @@ function pe(e, t, n, r) {
387
387
  children: e
388
388
  }) : null;
389
389
  }
390
- function U({ variant: e = "info", children: t, title: n, icon: r, image: i, imageAlt: a = "", className: o = "", onClose: s, dismissible: c, bordered: l = !0, role: u = "alert", ...d }) {
390
+ function me({ variant: e = "info", children: t, title: n, icon: r, image: i, imageAlt: a = "", className: o = "", onClose: s, dismissible: c, bordered: l = !0, role: u = "alert", ...d }) {
391
391
  N("AppAlert", d);
392
392
  let g = r === void 0 ? fe[e] : r === "none" ? null : r, _ = !!i || !!g, v = n ? /* @__PURE__ */ p("div", {
393
393
  className: "alert-heading",
@@ -414,7 +414,7 @@ function U({ variant: e = "info", children: t, title: n, icon: r, image: i, imag
414
414
  }
415
415
  //#endregion
416
416
  //#region src/components/warnInvalidValue.js
417
- var me = () => {
417
+ var U = () => {
418
418
  try {
419
419
  return process.env.NODE_ENV !== "production";
420
420
  } catch {
@@ -422,7 +422,7 @@ var me = () => {
422
422
  }
423
423
  }, he = /* @__PURE__ */ new Set();
424
424
  function W(e, t, n, r) {
425
- if (!me() || n == null) return;
425
+ if (!U() || n == null) return;
426
426
  let i = r instanceof Set ? r : new Set(r);
427
427
  if (i.has(n)) return;
428
428
  let a = `${e}.${t}.${String(n)}`;
@@ -436,6 +436,7 @@ var ge = {
436
436
  outline: "outline-primary",
437
437
  ghost: "ghost",
438
438
  danger: "danger",
439
+ success: "success",
439
440
  "secondary-danger": "secondary-danger",
440
441
  "outline-danger": "outline-danger",
441
442
  light: "light",
@@ -459,22 +460,37 @@ function ve(e, t, n) {
459
460
  children: e
460
461
  });
461
462
  }
462
- function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "button", loading: i = !1, disabled: a = !1, block: o = !1, leftIcon: s = null, rightIcon: c = null, href: l, className: u = "", ...d }) {
463
- N("AppButton", d), W("AppButton", "variant", t, Object.keys(ge)), W("AppButton", "size", n, Object.keys(_e));
464
- let f = [
463
+ function ye({ children: e, variant: t = "primary", size: n = "md", type: r = "button", loading: i = !1, disabled: a = !1, block: o = !1, leftIcon: s = null, rightIcon: c = null, href: l, static: u = !1, className: d = "", ...f }) {
464
+ if (N("AppButton", f), W("AppButton", "variant", t, Object.keys(ge)), W("AppButton", "size", n, Object.keys(_e)), u) return /* @__PURE__ */ m("span", {
465
+ className: [
466
+ "btn",
467
+ `btn-${ge[t] ?? "primary"}`,
468
+ n === "sm" ? "btn-sm" : n === "lg" ? "btn-lg" : "",
469
+ o ? "w-100" : "",
470
+ "btn-static",
471
+ d
472
+ ].filter(Boolean).join(" "),
473
+ ...f,
474
+ children: [
475
+ ve(s, "left", n),
476
+ e,
477
+ ve(c, "right", n)
478
+ ]
479
+ });
480
+ let h = [
465
481
  o ? "w-100" : "",
466
482
  i ? "is-loading" : "",
467
- u
483
+ d
468
484
  ].filter(Boolean).join(" ");
469
485
  return /* @__PURE__ */ m(v, {
470
- type: (d.as === void 0 || d.as === "button") && l === void 0 ? r : void 0,
486
+ type: (f.as === void 0 || f.as === "button") && l === void 0 ? r : void 0,
471
487
  href: l,
472
488
  variant: ge[t] ?? "primary",
473
489
  size: n === "md" ? void 0 : n,
474
490
  disabled: a || i,
475
491
  "aria-busy": i || void 0,
476
- className: f || void 0,
477
- ...d,
492
+ className: h || void 0,
493
+ ...f,
478
494
  children: [
479
495
  i && /* @__PURE__ */ p("span", {
480
496
  className: "spinner-border spinner-border-sm me-2",
@@ -3367,7 +3383,14 @@ var pt = class extends HTMLElement {
3367
3383
  this.value = n;
3368
3384
  return;
3369
3385
  }
3370
- this._rendered && (e === "country" && (this._country = n || "IN", this._suppressCountryRender) || this.render());
3386
+ if (this._rendered) {
3387
+ if (e === "aria-label" || e === "aria-describedby") {
3388
+ let t = this.querySelector("input[type=tel]");
3389
+ t && (n == null ? t.removeAttribute(e) : t.setAttribute(e, n));
3390
+ return;
3391
+ }
3392
+ e === "country" && (this._country = n || "IN", this._suppressCountryRender) || this.render();
3393
+ }
3371
3394
  }
3372
3395
  formResetCallback() {
3373
3396
  this.value = this._defaultValue || "";
@@ -5448,66 +5471,81 @@ function wn({ columns: e = [], rows: t = [], caption: n, className: r = "", ...i
5448
5471
  }
5449
5472
  //#endregion
5450
5473
  //#region src/components/AppInput.jsx
5451
- var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: f, rightIcon: h, onRightIconClick: g, rightIconLabel: _, unit: v, id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, clearable: T = !1, showCount: E = !1, maxLength: D, prefix: O, suffix: k, floatingLabel: A = !1, variant: j, ...M }, P) {
5452
- N("AppInput", M);
5453
- let [F, I] = d(!1), L = s(), R = y || L, z = c === "password", ee = z && F ? "text" : c, B = u(null), te = (e) => {
5454
- B.current = e, typeof P == "function" ? P(e) : P && (P.current = e);
5455
- }, ne = String(M.value ?? M.defaultValue ?? ""), [re, ie] = d(() => !!ne), [ae, oe] = d(() => ne.length), se = T && !w, ce = T || E;
5474
+ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, helpLabel: a = "More information", type: c = "text", size: l = "md", leftIcon: f, rightIcon: h, onRightIconClick: g, rightIconLabel: _, unit: v, id: y, name: b, className: S = "", fieldClassName: C = "", disabled: w = !1, clearable: T = !1, showCount: E = !1, maxLength: D, prefix: O, suffix: k, action: A, floatingLabel: j = !1, variant: M, ...P }, F) {
5475
+ N("AppInput", P);
5476
+ let [I, L] = d(!1), ee = s(), R = y || ee, z = c === "password", B = z && I ? "text" : c, te = u(null), ne = (e) => {
5477
+ te.current = e, typeof F == "function" ? F(e) : F && (F.current = e);
5478
+ }, re = String(P.value ?? P.defaultValue ?? ""), [ie, ae] = d(() => !!re), [oe, se] = d(() => re.length), ce = T && !w, le = T || E;
5456
5479
  o(() => {
5457
- if (!ce || M.value === void 0) return;
5458
- let e = String(M.value ?? "");
5459
- ie(!!e), oe(e.length);
5460
- }, [M.value, ce]);
5461
- let le = (e) => {
5462
- ie(!!e.target.value), oe(e.target.value.length), M.onInput?.(e);
5463
- }, ue = se ? /* @__PURE__ */ p("button", {
5480
+ if (!le || P.value === void 0) return;
5481
+ let e = String(P.value ?? "");
5482
+ ae(!!e), se(e.length);
5483
+ }, [P.value, le]);
5484
+ let ue = (e) => {
5485
+ ae(!!e.target.value), se(e.target.value.length), P.onInput?.(e);
5486
+ }, H = ce ? /* @__PURE__ */ p("button", {
5464
5487
  type: "button",
5465
5488
  className: "input-clear",
5466
5489
  onClick: () => {
5467
- let e = B.current;
5490
+ let e = te.current;
5468
5491
  if (!e) return;
5469
5492
  let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
5470
- t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ie(!1), e.focus();
5493
+ t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ae(!1), e.focus();
5471
5494
  },
5472
5495
  "aria-label": "Clear",
5473
5496
  tabIndex: -1,
5474
- hidden: !re,
5497
+ hidden: !ie,
5475
5498
  children: /* @__PURE__ */ p(V, {
5476
5499
  name: "x",
5477
5500
  size: 16
5478
5501
  })
5479
- }) : null, H = n && R ? `${R}-error` : void 0, de = r && R ? `${R}-hint` : void 0, fe = H || de, pe = [
5502
+ }) : null, de = n && R ? `${R}-error` : void 0, fe = r && R ? `${R}-hint` : void 0, pe = de || fe, me = [
5480
5503
  "input",
5481
5504
  l === "sm" ? "input-sm" : "",
5482
5505
  l === "lg" ? "input-lg" : "",
5483
5506
  n ? "error" : "",
5484
5507
  z ? "pw" : "",
5485
5508
  v ? "num-input" : "",
5486
- !(A && e || O || k || v || z || h) && T && se ? "has-clear" : "",
5487
- j === "bare" ? "input-bare" : "",
5509
+ !(j && e || O || k || v || z || h) && T && ce ? "has-clear" : "",
5510
+ M === "bare" ? "input-bare" : "",
5488
5511
  S
5489
5512
  ].filter(Boolean).join(" "), U = /* @__PURE__ */ p(x.Control, {
5490
5513
  id: R,
5491
5514
  name: b,
5492
- type: ee,
5493
- className: pe,
5515
+ type: B,
5516
+ className: me,
5494
5517
  disabled: w,
5495
5518
  required: t,
5496
5519
  "aria-invalid": n ? "true" : "false",
5497
- "aria-describedby": fe,
5520
+ "aria-describedby": pe,
5498
5521
  maxLength: D,
5499
- ...M,
5500
- placeholder: A ? " " : M.placeholder,
5501
- ref: te,
5502
- onInput: ce ? le : M.onInput
5503
- }), me;
5504
- return me = A && e ? /* @__PURE__ */ m("div", {
5522
+ ...P,
5523
+ placeholder: j ? " " : P.placeholder,
5524
+ ref: ne,
5525
+ onInput: le ? ue : P.onInput
5526
+ }), he;
5527
+ return he = j && e ? /* @__PURE__ */ m("div", {
5505
5528
  className: "field-float",
5506
5529
  children: [U, /* @__PURE__ */ m("label", {
5507
5530
  className: "float-label",
5508
5531
  htmlFor: R,
5509
5532
  children: [e, t && /* @__PURE__ */ p(Z, {})]
5510
5533
  })]
5534
+ }) : A ? /* @__PURE__ */ m("div", {
5535
+ className: "input-action-row",
5536
+ children: [/* @__PURE__ */ m("div", {
5537
+ className: f ? "input-icon" : "input-wrap",
5538
+ children: [f && /* @__PURE__ */ p("span", {
5539
+ className: "ic",
5540
+ children: /* @__PURE__ */ p(V, {
5541
+ name: f,
5542
+ size: 16
5543
+ })
5544
+ }), U]
5545
+ }), /* @__PURE__ */ p("div", {
5546
+ className: "input-action",
5547
+ children: A
5548
+ })]
5511
5549
  }) : O || k ? /* @__PURE__ */ m("div", {
5512
5550
  className: "input-affixed",
5513
5551
  children: [
@@ -5541,11 +5579,11 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
5541
5579
  /* @__PURE__ */ p("button", {
5542
5580
  type: "button",
5543
5581
  className: "pw-toggle",
5544
- onClick: () => I((e) => !e),
5545
- "aria-label": F ? "Hide password" : "Show password",
5582
+ onClick: () => L((e) => !e),
5583
+ "aria-label": I ? "Hide password" : "Show password",
5546
5584
  tabIndex: -1,
5547
5585
  children: /* @__PURE__ */ p(V, {
5548
- name: F ? "eye-off" : "eye",
5586
+ name: I ? "eye-off" : "eye",
5549
5587
  size: 18
5550
5588
  })
5551
5589
  })
@@ -5575,7 +5613,7 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
5575
5613
  })
5576
5614
  }),
5577
5615
  U,
5578
- ue
5616
+ H
5579
5617
  ]
5580
5618
  }) : f ? /* @__PURE__ */ m("div", {
5581
5619
  className: "input-icon",
@@ -5589,7 +5627,7 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
5589
5627
  }) : U, /* @__PURE__ */ m(x.Group, {
5590
5628
  className: `field${C ? ` ${C}` : ""}`,
5591
5629
  children: [
5592
- e && !A && /* @__PURE__ */ m(x.Label, {
5630
+ e && !j && /* @__PURE__ */ m(x.Label, {
5593
5631
  className: "label",
5594
5632
  htmlFor: R,
5595
5633
  children: [
@@ -5601,19 +5639,19 @@ var Tn = i(function({ label: e, required: t = !1, error: n, hint: r, help: i, he
5601
5639
  })
5602
5640
  ]
5603
5641
  }),
5604
- me,
5642
+ he,
5605
5643
  n ? /* @__PURE__ */ p("div", {
5606
5644
  className: "field-error",
5607
- id: H,
5645
+ id: de,
5608
5646
  children: n
5609
5647
  }) : r ? /* @__PURE__ */ p("div", {
5610
5648
  className: "field-hint",
5611
- id: de,
5649
+ id: fe,
5612
5650
  children: r
5613
5651
  }) : null,
5614
5652
  E && /* @__PURE__ */ m("div", {
5615
- className: `field-count${D && ae >= D ? " at-limit" : ""}`,
5616
- children: [ae, D ? ` / ${D}` : ""]
5653
+ className: `field-count${D && oe >= D ? " at-limit" : ""}`,
5654
+ children: [oe, D ? ` / ${D}` : ""]
5617
5655
  })
5618
5656
  ]
5619
5657
  });
@@ -6592,16 +6630,16 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
6592
6630
  }
6593
6631
  let t = e.target.files?.[0] || null;
6594
6632
  t && (F(t) || (e.target.value = ""));
6595
- }, R = (e) => {
6633
+ }, ee = (e) => {
6596
6634
  if (e.preventDefault(), x(!1), i) {
6597
6635
  I(e.dataTransfer.files);
6598
6636
  return;
6599
6637
  }
6600
6638
  let t = e.dataTransfer.files?.[0];
6601
6639
  t && F(t);
6602
- }, z = (e) => {
6640
+ }, R = (e) => {
6603
6641
  C(""), r(D.filter((t, n) => n !== e));
6604
- }, ee = () => w.current?.click(), B = /* @__PURE__ */ p("input", {
6642
+ }, z = () => w.current?.click(), B = /* @__PURE__ */ p("input", {
6605
6643
  id: E,
6606
6644
  name: n,
6607
6645
  ref: w,
@@ -6630,7 +6668,7 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
6630
6668
  type: "button",
6631
6669
  className: "file-preview-open",
6632
6670
  "aria-label": `Change ${e}`,
6633
- onClick: ee,
6671
+ onClick: z,
6634
6672
  children: [j && P ? /* @__PURE__ */ p("img", {
6635
6673
  src: P,
6636
6674
  alt: `${e} preview`,
@@ -6680,7 +6718,7 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
6680
6718
  onDragLeave: (e) => {
6681
6719
  e.preventDefault(), x(!1);
6682
6720
  },
6683
- onDrop: R,
6721
+ onDrop: ee,
6684
6722
  children: [
6685
6723
  /* @__PURE__ */ m("label", {
6686
6724
  htmlFor: E,
@@ -6718,7 +6756,7 @@ function sr({ label: e, value: t, name: n, onPick: r, multiple: i = !1, maxFiles
6718
6756
  item: e,
6719
6757
  isImage: e instanceof File ? Lt(e) : k || Lt(e),
6720
6758
  noun: "file",
6721
- onRemove: () => z(t)
6759
+ onRemove: () => R(t)
6722
6760
  }, er(e)))
6723
6761
  })
6724
6762
  ]
@@ -6931,11 +6969,11 @@ var vr = {
6931
6969
  };
6932
6970
  function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a = !1, disabled: c = !1, accept: l = "image/png,image/jpeg,image/webp", maxSizeMb: f = 5, overlayIcon: h = "image", overlayLabel: g = "Update photo", ariaLabel: _ = "Upload photo", label: v, hint: y, error: b, layout: x = "stacked", title: S, subtitle: C, required: w = !1, variant: T = "initials", size: E = "md", shape: D = "circle", className: O = "", ...k }) {
6933
6971
  N("AppLogoPicker", k), W("AppLogoPicker", "size", typeof E == "string" ? E : null, Object.keys(vr));
6934
- let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [R, z] = d(!1), [ee, B] = d(!1);
6972
+ let A = u(null), j = s(), M = n || j, [P, F] = d(null), [I, L] = d(""), [ee, R] = d(!1), [z, B] = d(!1);
6935
6973
  o(() => () => P && URL.revokeObjectURL(P), [P]), o(() => {
6936
- F(null), z(!1);
6974
+ F(null), R(!1);
6937
6975
  }, [e]);
6938
- let te = a || c, ne = P || (e && !R ? e : null), re = b || I, ie = !te && (!!P || !!ne && !!i), ae = () => {
6976
+ let te = a || c, ne = P || (e && !ee ? e : null), re = b || I, ie = !te && (!!P || !!ne && !!i), ae = () => {
6939
6977
  te || A.current?.click();
6940
6978
  }, oe = (e) => {
6941
6979
  let t = Vt(e, {
@@ -6946,7 +6984,7 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
6946
6984
  L(t);
6947
6985
  return;
6948
6986
  }
6949
- L(""), z(!1), F(URL.createObjectURL(e)), r(e);
6987
+ L(""), R(!1), F(URL.createObjectURL(e)), r(e);
6950
6988
  }, se = (e) => {
6951
6989
  let t = e.target.files?.[0];
6952
6990
  e.target.value = "", t && oe(t);
@@ -6955,13 +6993,13 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
6955
6993
  let t = e.dataTransfer.files?.[0];
6956
6994
  t && oe(t);
6957
6995
  }, le = () => {
6958
- F(null), L(""), z(!1), A.current && (A.current.value = ""), i?.();
6996
+ F(null), L(""), R(!1), A.current && (A.current.value = ""), i?.();
6959
6997
  }, ue = typeof E == "number" ? E : vr[E] ?? vr.md, H = Math.max(14, Math.round(ue * .18)), de = Math.round(ue * .5), fe = [
6960
6998
  "set-uploader",
6961
6999
  T === "avatar" ? "set-uploader--avatar" : "",
6962
7000
  D === "rounded" ? "set-uploader--rounded" : D === "square" ? "set-uploader--square" : "",
6963
- ee && "is-dragging"
6964
- ].filter(Boolean).join(" "), pe = x === "inline", U = x === "profile", me = /* @__PURE__ */ m("div", {
7001
+ z && "is-dragging"
7002
+ ].filter(Boolean).join(" "), pe = x === "inline", me = x === "profile", U = /* @__PURE__ */ m("div", {
6965
7003
  className: "set-uploader-shell",
6966
7004
  children: [
6967
7005
  /* @__PURE__ */ p("button", {
@@ -6973,7 +7011,7 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
6973
7011
  onClick: ae,
6974
7012
  "aria-label": _,
6975
7013
  onDragOver: (e) => {
6976
- e.preventDefault(), !te && !ee && B(!0);
7014
+ e.preventDefault(), !te && !z && B(!0);
6977
7015
  },
6978
7016
  onDragLeave: (e) => {
6979
7017
  e.preventDefault(), B(!1);
@@ -6987,7 +7025,7 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
6987
7025
  className: "set-uploader-img",
6988
7026
  src: ne,
6989
7027
  alt: "",
6990
- onError: () => z(!0)
7028
+ onError: () => R(!0)
6991
7029
  }) : /* @__PURE__ */ p("span", {
6992
7030
  className: "set-uploader-logo",
6993
7031
  children: t || T === "avatar" && /* @__PURE__ */ p(V, {
@@ -7063,20 +7101,20 @@ function yr({ value: e, fallback: t, name: n, onPick: r, onRemove: i, loading: a
7063
7101
  className: `field set-uploader-field set-uploader-field--inline${O ? ` ${O}` : ""}`,
7064
7102
  children: [_e, /* @__PURE__ */ m("div", {
7065
7103
  className: "set-uploader-row",
7066
- children: [me, ve]
7104
+ children: [U, ve]
7067
7105
  })]
7068
- }) : U ? /* @__PURE__ */ m("div", {
7106
+ }) : me ? /* @__PURE__ */ m("div", {
7069
7107
  className: `field set-uploader-field set-uploader-field--profile${O ? ` ${O}` : ""}`,
7070
7108
  children: [
7071
7109
  _e,
7072
- me,
7110
+ U,
7073
7111
  ve
7074
7112
  ]
7075
7113
  }) : /* @__PURE__ */ m("div", {
7076
7114
  className: `field set-uploader-field${O ? ` ${O}` : ""}`,
7077
7115
  children: [
7078
7116
  _e,
7079
- me,
7117
+ U,
7080
7118
  he,
7081
7119
  ge
7082
7120
  ]
@@ -7199,7 +7237,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
7199
7237
  let F = (e) => {
7200
7238
  let t = (j(M) ?? A(0)) + e * h, n = A(k(t));
7201
7239
  P(String(n)), l?.(n);
7202
- }, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, R = w || I !== null && typeof f == "number" && I >= f, z = n && O ? `${O}-error` : void 0, ee = r && O ? `${O}-hint` : void 0, B = z || ee, te = [
7240
+ }, I = j(M), L = w || I !== null && typeof u == "number" && I <= u, ee = w || I !== null && typeof f == "number" && I >= f, R = n && O ? `${O}-error` : void 0, z = r && O ? `${O}-hint` : void 0, B = R || z, te = [
7203
7241
  "input",
7204
7242
  v === "sm" ? "input-sm" : "",
7205
7243
  v === "lg" ? "input-lg" : "",
@@ -7266,7 +7304,7 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
7266
7304
  className: "num-btn",
7267
7305
  "aria-label": "Increase",
7268
7306
  tabIndex: -1,
7269
- disabled: R,
7307
+ disabled: ee,
7270
7308
  onClick: () => F(1),
7271
7309
  children: /* @__PURE__ */ p(V, {
7272
7310
  name: "plus",
@@ -7293,11 +7331,11 @@ var wr = i(function({ values: e, onChange: t, options: n, placeholder: r = "Sele
7293
7331
  oe,
7294
7332
  n ? /* @__PURE__ */ p("div", {
7295
7333
  className: "field-error",
7296
- id: z,
7334
+ id: R,
7297
7335
  children: n
7298
7336
  }) : r ? /* @__PURE__ */ p("div", {
7299
7337
  className: "field-hint",
7300
- id: ee,
7338
+ id: z,
7301
7339
  children: r
7302
7340
  }) : null
7303
7341
  ]
@@ -7902,7 +7940,7 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
7902
7940
  }));
7903
7941
  Jt(t, e.options) || (e.options = t);
7904
7942
  }, [n, M]);
7905
- let P = x || S || A, F = d && h, I = _ && P ? `${P}-error` : void 0, L = v && P ? `${P}-hint` : void 0, R = /* @__PURE__ */ p("wui-select", {
7943
+ let P = x || S || A, F = d && h, I = _ && P ? `${P}-error` : void 0, L = v && P ? `${P}-hint` : void 0, ee = /* @__PURE__ */ p("wui-select", {
7906
7944
  "aria-label": T || (typeof h == "string" ? h : void 0),
7907
7945
  "aria-labelledby": E || void 0,
7908
7946
  "aria-describedby": I || L || D || void 0,
@@ -7920,7 +7958,7 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
7920
7958
  required: g ? "" : void 0,
7921
7959
  ...O
7922
7960
  });
7923
- return !h && !_ && !v ? R : /* @__PURE__ */ m("div", {
7961
+ return !h && !_ && !v ? ee : /* @__PURE__ */ m("div", {
7924
7962
  className: [
7925
7963
  "field",
7926
7964
  C,
@@ -7941,12 +7979,12 @@ var Hr = (e) => e == null ? "" : e.label ?? e.text ?? "", Ur = i(function({ valu
7941
7979
  }),
7942
7980
  F ? /* @__PURE__ */ m("div", {
7943
7981
  className: "field-float",
7944
- children: [R, /* @__PURE__ */ m("label", {
7982
+ children: [ee, /* @__PURE__ */ m("label", {
7945
7983
  className: "float-label",
7946
7984
  htmlFor: P,
7947
7985
  children: [h, g && /* @__PURE__ */ p(Z, {})]
7948
7986
  })]
7949
- }) : R,
7987
+ }) : ee,
7950
7988
  _ ? /* @__PURE__ */ p("div", {
7951
7989
  className: "field-error",
7952
7990
  id: I,
@@ -9435,4 +9473,4 @@ function Bi(e, t = 10) {
9435
9473
  };
9436
9474
  }
9437
9475
  //#endregion
9438
- export { ue as AppAccordion, de as AppActionIcon, U as AppAlert, Se as AppAsyncBlock, $t as AppAutocomplete, on as AppAvatar, ln as AppAvatarGroup, un as AppBadge, fn as AppBanner, pn as AppBreadcrumbs, ye as AppButton, hn as AppCallout, _n as AppCard, yn as AppCheckbox, bn as AppChip, xn as AppChoiceCard, Sn as AppChoiceChip, Cn as AppColorField, wn as AppCompareTable, Nn as AppConfirmDialog, Fn as AppCopyButton, Gn as AppDataTable, Kn as AppDatePicker, qn as AppDateRangePicker, Yn as AppDescriptions, Qn as AppDropdown, be as AppEmptyState, ar as AppFileAttachment, sr as AppFilePicker, cr as AppFloatingDock, lr as AppFormActions, ur as AppFormRow, dr as AppFormSection, V as AppIcon, fr as AppInfoList, Wt as AppInfoTip, Tn as AppInput, _r as AppKpiTile, yr as AppLogoPicker, Cr as AppMeter, An as AppModal, wr as AppMultiSelect, Tr as AppNumberInput, Er as AppOtpInput, Dr as AppPageHeader, Or as AppPagination, kr as AppPhoneNumberInput, Ut as AppPopover, Ar as AppPricingCard, Nr as AppProgress, Pr as AppRadio, Fr as AppRepeater, Z as AppRequiredMark, Ir as AppResourceCard, Rr as AppResult, zr as AppScrollbar, Br as AppSearch, Vr as AppSegmented, Ur as AppSelect, Bn as AppSelectMini, Wr as AppShell, qr as AppSidebarMenu, In as AppSkeleton, Ln as AppSkeletonRows, Jr as AppSlider, xe as AppSpinner, Xr as AppSplash, Zr as AppStatusBadge, Qr as AppStepper, ei as AppSwitch, ti as AppTableEmptyState, Hn as AppTablePagination, ii as AppTabs, ai as AppTagInput, oi as AppTextarea, li as AppTimePicker, ci as AppTimeline, Di as AppToast, ki as AppToolbar, ri as AppTooltip, Ai as AppWizard, ji as AppWorkspaceSwitcher, Mn as MODAL_ICONS, Ii as dismissAll, zi as errorToast, se as iconNames, le as registerIcons, Ri as toast, Bi as usePagination };
9476
+ export { ue as AppAccordion, de as AppActionIcon, me as AppAlert, Se as AppAsyncBlock, $t as AppAutocomplete, on as AppAvatar, ln as AppAvatarGroup, un as AppBadge, fn as AppBanner, pn as AppBreadcrumbs, ye as AppButton, hn as AppCallout, _n as AppCard, yn as AppCheckbox, bn as AppChip, xn as AppChoiceCard, Sn as AppChoiceChip, Cn as AppColorField, wn as AppCompareTable, Nn as AppConfirmDialog, Fn as AppCopyButton, Gn as AppDataTable, Kn as AppDatePicker, qn as AppDateRangePicker, Yn as AppDescriptions, Qn as AppDropdown, be as AppEmptyState, ar as AppFileAttachment, sr as AppFilePicker, cr as AppFloatingDock, lr as AppFormActions, ur as AppFormRow, dr as AppFormSection, V as AppIcon, fr as AppInfoList, Wt as AppInfoTip, Tn as AppInput, _r as AppKpiTile, yr as AppLogoPicker, Cr as AppMeter, An as AppModal, wr as AppMultiSelect, Tr as AppNumberInput, Er as AppOtpInput, Dr as AppPageHeader, Or as AppPagination, kr as AppPhoneNumberInput, Ut as AppPopover, Ar as AppPricingCard, Nr as AppProgress, Pr as AppRadio, Fr as AppRepeater, Z as AppRequiredMark, Ir as AppResourceCard, Rr as AppResult, zr as AppScrollbar, Br as AppSearch, Vr as AppSegmented, Ur as AppSelect, Bn as AppSelectMini, Wr as AppShell, qr as AppSidebarMenu, In as AppSkeleton, Ln as AppSkeletonRows, Jr as AppSlider, xe as AppSpinner, Xr as AppSplash, Zr as AppStatusBadge, Qr as AppStepper, ei as AppSwitch, ti as AppTableEmptyState, Hn as AppTablePagination, ii as AppTabs, ai as AppTagInput, oi as AppTextarea, li as AppTimePicker, ci as AppTimeline, Di as AppToast, ki as AppToolbar, ri as AppTooltip, Ai as AppWizard, ji as AppWorkspaceSwitcher, Mn as MODAL_ICONS, Ii as dismissAll, zi as errorToast, se as iconNames, le as registerIcons, Ri as toast, Bi as usePagination };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.9.6",
3
+ "version": "0.9.8",
4
4
  "description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
- "@webority/theme": "0.9.6",
32
- "@webority/ui-elements": "0.9.6"
31
+ "@webority/theme": "0.9.8",
32
+ "@webority/ui-elements": "0.9.8"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "bootstrap": "5.3.3",