@danxbot/ui 26.3.0 → 26.4.0
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 +45 -26
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/OTPInput.d.ts +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36315,37 +36315,56 @@ function bte({
|
|
|
36315
36315
|
length: e = 6,
|
|
36316
36316
|
groupAfter: t,
|
|
36317
36317
|
className: n,
|
|
36318
|
-
|
|
36319
|
-
|
|
36318
|
+
autoFocus: r,
|
|
36319
|
+
ref: o,
|
|
36320
|
+
...s
|
|
36320
36321
|
}) {
|
|
36321
|
-
|
|
36322
|
+
const i = be(null);
|
|
36323
|
+
return De(() => {
|
|
36324
|
+
r && i.current?.querySelector("input")?.focus();
|
|
36325
|
+
}, [r]), /* @__PURE__ */ u(
|
|
36322
36326
|
dI,
|
|
36323
36327
|
{
|
|
36324
|
-
ref:
|
|
36328
|
+
ref: (a) => {
|
|
36329
|
+
i.current = a, typeof o == "function" ? o(a) : o && (o.current = a);
|
|
36330
|
+
},
|
|
36325
36331
|
length: e,
|
|
36326
36332
|
className: B("flex items-center gap-2", n),
|
|
36327
|
-
...
|
|
36328
|
-
children: Array.from({ length: e }, (
|
|
36329
|
-
/* @__PURE__ */
|
|
36330
|
-
|
|
36331
|
-
|
|
36332
|
-
|
|
36333
|
-
|
|
36334
|
-
|
|
36335
|
-
|
|
36336
|
-
|
|
36337
|
-
|
|
36338
|
-
|
|
36339
|
-
|
|
36340
|
-
|
|
36341
|
-
|
|
36342
|
-
|
|
36343
|
-
|
|
36344
|
-
|
|
36345
|
-
|
|
36346
|
-
|
|
36347
|
-
|
|
36348
|
-
|
|
36333
|
+
...s,
|
|
36334
|
+
children: Array.from({ length: e }, (a, l) => /* @__PURE__ */ M("span", { className: "flex items-center gap-2", children: [
|
|
36335
|
+
/* @__PURE__ */ M("span", { className: "relative", children: [
|
|
36336
|
+
/* @__PURE__ */ u(
|
|
36337
|
+
fI,
|
|
36338
|
+
{
|
|
36339
|
+
className: B(
|
|
36340
|
+
"peer",
|
|
36341
|
+
"grid h-control-md w-11 place-items-center rounded-md",
|
|
36342
|
+
"border border-field-border bg-field",
|
|
36343
|
+
"text-center font-mono text-lg tabular-nums text-primary",
|
|
36344
|
+
"transition-[var(--tx-colors),box-shadow] duration-(--dur-fast) ease-hover",
|
|
36345
|
+
"hover:not-disabled:border-field-border-hover",
|
|
36346
|
+
/* DX-5127: the box holding real focus IS the active slot (the
|
|
36347
|
+
next digit goes into the focused box), so it gets the ring;
|
|
36348
|
+
Base UI has no per-slot "active" attribute. A filled box
|
|
36349
|
+
reads as filled: stronger border and a tinted background. */
|
|
36350
|
+
"focus:border-control focus:shadow-[0_0_0_3px_var(--control-focus-halo)]",
|
|
36351
|
+
"data-filled:border-border-strong data-filled:bg-surface-sunken",
|
|
36352
|
+
"data-invalid:border-danger",
|
|
36353
|
+
"disabled:opacity-45",
|
|
36354
|
+
"outline-none"
|
|
36355
|
+
)
|
|
36356
|
+
}
|
|
36357
|
+
),
|
|
36358
|
+
/* @__PURE__ */ u(
|
|
36359
|
+
"span",
|
|
36360
|
+
{
|
|
36361
|
+
"aria-hidden": !0,
|
|
36362
|
+
className: "pointer-events-none absolute left-1/2 top-1/2 hidden h-5 w-px -translate-x-1/2 -translate-y-1/2 bg-primary peer-focus:peer-not-data-filled:block motion-safe:peer-focus:peer-not-data-filled:animate-[dx-otp-caret_1s_steps(1)_infinite]"
|
|
36363
|
+
}
|
|
36364
|
+
)
|
|
36365
|
+
] }),
|
|
36366
|
+
t && l === t - 1 && l < e - 1 && /* @__PURE__ */ u("span", { "aria-hidden": !0, className: "h-px w-2.5 rounded-full bg-border-strong" })
|
|
36367
|
+
] }, l))
|
|
36349
36368
|
}
|
|
36350
36369
|
);
|
|
36351
36370
|
}
|