@danxbot/ui 26.5.2 → 26.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -19390,12 +19390,17 @@ function Ko({
19390
19390
  children: d,
19391
19391
  ref: f
19392
19392
  }) {
19393
- const p = VE({ size: l }), h = pe().dialog, m = l === "full" ? "xs" : "sm", g = LE(t), v = FE(t, n), [b, x] = re(null), y = be(null), w = () => a ? b : y.current?.querySelector("[data-autofocus]") ?? !0, S = Ne(
19394
- (C) => {
19395
- y.current = C, x(C), typeof f == "function" ? f(C) : f && (f.current = C);
19393
+ const p = VE({ size: l }), h = pe().dialog, m = l === "full" ? "xs" : "sm", g = LE(t), v = FE(t, n), b = be(null), x = Ne(
19394
+ (w) => {
19395
+ b.current = w, typeof f == "function" ? f(w) : f && (f.current = w);
19396
19396
  },
19397
19397
  [f]
19398
- );
19398
+ ), y = (w) => {
19399
+ const S = b.current;
19400
+ if (a) return S;
19401
+ const C = S?.querySelector("[data-autofocus]");
19402
+ return C || (w === "touch" ? S : !0);
19403
+ };
19399
19404
  return /* @__PURE__ */ M(sb, { open: t, onOpenChange: v, children: [
19400
19405
  e && /* @__PURE__ */ u(tf, { render: e }),
19401
19406
  /* @__PURE__ */ M(yl, { children: [
@@ -19403,10 +19408,10 @@ function Ko({
19403
19408
  /* @__PURE__ */ M(
19404
19409
  xl,
19405
19410
  {
19406
- ref: S,
19411
+ ref: x,
19407
19412
  className: B(p.popup(), c),
19408
19413
  finalFocus: g,
19409
- initialFocus: w,
19414
+ initialFocus: y,
19410
19415
  children: [
19411
19416
  /* @__PURE__ */ M("div", { className: p.header(), children: [
19412
19417
  /* @__PURE__ */ M("div", { className: "min-w-0 flex-1 basis-40", children: [
@@ -36327,23 +36332,28 @@ function bte({
36327
36332
  ...s
36328
36333
  }) {
36329
36334
  const i = be(null);
36330
- return De(() => {
36335
+ De(() => {
36331
36336
  r && i.current?.querySelector("input")?.focus();
36332
- }, [r]), /* @__PURE__ */ u(
36337
+ }, [r]);
36338
+ const a = Ne(
36339
+ (l) => {
36340
+ i.current = l, typeof o == "function" ? o(l) : o && (o.current = l);
36341
+ },
36342
+ [o]
36343
+ );
36344
+ return /* @__PURE__ */ u(
36333
36345
  fI,
36334
36346
  {
36335
- ref: (a) => {
36336
- i.current = a, typeof o == "function" ? o(a) : o && (o.current = a);
36337
- },
36347
+ ref: a,
36338
36348
  length: e,
36339
36349
  className: B("flex items-center gap-2", n),
36340
36350
  ...s,
36341
- children: Array.from({ length: e }, (a, l) => /* @__PURE__ */ M("span", { className: "flex items-center gap-2", children: [
36351
+ children: Array.from({ length: e }, (l, c) => /* @__PURE__ */ M("span", { className: "flex items-center gap-2", children: [
36342
36352
  /* @__PURE__ */ M("span", { className: "relative", children: [
36343
36353
  /* @__PURE__ */ u(
36344
36354
  pI,
36345
36355
  {
36346
- "data-autofocus": r && l === 0 ? "" : void 0,
36356
+ "data-autofocus": r && c === 0 ? "" : void 0,
36347
36357
  className: B(
36348
36358
  "peer",
36349
36359
  "grid h-control-md w-11 place-items-center rounded-md",
@@ -36371,8 +36381,8 @@ function bte({
36371
36381
  }
36372
36382
  )
36373
36383
  ] }),
36374
- t && l === t - 1 && l < e - 1 && /* @__PURE__ */ u("span", { "aria-hidden": !0, className: "h-px w-2.5 rounded-full bg-border-strong" })
36375
- ] }, l))
36384
+ t && c === t - 1 && c < e - 1 && /* @__PURE__ */ u("span", { "aria-hidden": !0, className: "h-px w-2.5 rounded-full bg-border-strong" })
36385
+ ] }, c))
36376
36386
  }
36377
36387
  );
36378
36388
  }