@spark-ui/components 16.0.1 → 16.0.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.
@@ -1,40 +1,41 @@
1
- import { jsxs as te, jsx as b } from "react/jsx-runtime";
2
- import { cva as ne, cx as fe } from "class-variance-authority";
3
- import { createContext as me, useContext as be, useId as ve, useRef as Z, useState as L, useEffect as $, useMemo as H, Children as re, isValidElement as se, cloneElement as ee } from "react";
4
- import { useFormFieldControl as xe } from "@spark-ui/components/form-field";
5
- import { I as Ie } from "../Icon-Ck-dhfLd.mjs";
6
- import { Minus as he } from "@spark-ui/icons/Minus";
7
- const ae = me(null), ge = () => {
8
- const e = be(ae);
1
+ import { jsxs as se, jsx as I } from "react/jsx-runtime";
2
+ import { cva as ae, cx as ve } from "class-variance-authority";
3
+ import { createContext as he, useContext as ye, useId as xe, useRef as te, useState as ne, useEffect as J, useMemo as L, Children as oe, isValidElement as ie, cloneElement as re } from "react";
4
+ import { useFormFieldControl as Ie } from "@spark-ui/components/form-field";
5
+ const ce = he(null), ge = () => {
6
+ const e = ye(ce);
9
7
  if (!e)
10
8
  throw new Error("InputOTP components must be used within InputOTP");
11
9
  return e;
12
10
  };
13
- ne(["relative", "inline-flex", "items-center", "gap-sm"]);
14
- const ie = ne(
11
+ ae(["relative", "inline-flex", "items-center", "gap-sm"]);
12
+ const le = ae(
15
13
  [
16
14
  // Base slot styles
17
- "relative",
18
- "border-sm first:rounded-l-lg last:rounded-r-lg",
19
- "size-sz-44",
20
- "text-center text-body-1",
21
- "text-on-surface",
15
+ "relative h-[50px] w-sz-40",
16
+ "border-sm rounded-md",
17
+ "text-center text-display-3 text-on-surface",
22
18
  "outline-hidden",
23
19
  "transition-colors",
24
20
  "flex items-center justify-center",
21
+ // Slot that receives focus when clicking the group (first empty or last slot)
22
+ // Use data-[focus-target=true]:... for distinct styles
25
23
  // Active state (when focused)
26
24
  "data-[active=true]:ring-1",
27
25
  "data-[active=true]:ring-inset",
28
26
  "data-[active=true]:ring-l-2",
29
27
  "data-[active=true]:border-focus",
30
- // 'data-[active=true]:ring-focus',
31
- // 'data-[active=true]:border-focus',
32
28
  "data-[active=true]:z-raised ring-focus",
33
29
  // Disabled state
34
30
  "data-[disabled=true]:cursor-not-allowed",
35
31
  "data-[disabled=true]:border-outline",
36
32
  "data-[disabled=true]:bg-on-surface/dim-5",
37
- "data-[disabled=true]:text-on-surface/dim-3"
33
+ "data-[disabled=true]:text-on-surface/dim-3",
34
+ // Read-only state (same as disabled but text stays normal)
35
+ "data-[readonly=true]:cursor-default",
36
+ "data-[readonly=true]:data-[active=false]:border-outline",
37
+ "data-[readonly=true]:bg-on-surface/dim-5",
38
+ "group-hover:data-[focus-target=true]:data-[disabled=false]:border-outline-high"
38
39
  ],
39
40
  {
40
41
  variants: {
@@ -42,7 +43,7 @@ const ie = ne(
42
43
  * Color scheme of the slot
43
44
  */
44
45
  intent: {
45
- neutral: ["bg-surface border-outline"],
46
+ neutral: ["data-[filled=true]:bg-neutral-container bg-surface border-outline"],
46
47
  success: ["border-success bg-success-container text-on-success-container"],
47
48
  alert: ["border-alert bg-alert-container text-on-alert-container"],
48
49
  error: ["border-error bg-error-container text-on-error-container"]
@@ -52,30 +53,33 @@ const ie = ne(
52
53
  intent: "neutral"
53
54
  }
54
55
  }
55
- ), Ke = ie, E = ({ index: e, className: a, ...t }) => {
56
- const o = ge(), r = e ?? 0, l = o.slots[r];
57
- if (!l)
56
+ ), Fe = le, E = ({ index: e, className: o, ...t }) => {
57
+ const i = ge(), r = e ?? 0, d = i.slots[r];
58
+ if (!d)
58
59
  return null;
59
- const { char: p, isActive: v, hasFakeCaret: h } = l, x = !p && !h && o.placeholder;
60
- return /* @__PURE__ */ te(
60
+ const { char: p, isActive: g, hasFakeCaret: v } = d, O = !p, T = O && !v && i.placeholder, h = r === i.activeIndex;
61
+ return /* @__PURE__ */ se(
61
62
  "div",
62
63
  {
63
- className: ie({
64
- intent: o.intent,
65
- className: a
64
+ className: le({
65
+ intent: i.intent,
66
+ className: o
66
67
  }),
67
- "data-active": v,
68
- "data-disabled": o.disabled,
69
- "data-valid": o.intent !== "error",
68
+ "data-active": g,
69
+ "data-disabled": i.disabled,
70
+ "data-readonly": i.readOnly,
71
+ "data-filled": !O,
72
+ "data-focus-target": h,
73
+ "data-valid": i.intent !== "error",
70
74
  ...t,
71
75
  children: [
72
- /* @__PURE__ */ b("span", { className: x ? "text-on-surface/dim-3" : "", children: o.type === "password" && p ? "•" : p || (!h && o.placeholder ? o.placeholder : "") }),
73
- h && /* @__PURE__ */ b(
76
+ /* @__PURE__ */ I("span", { className: T ? "text-on-surface/dim-3" : "", children: i.type === "password" && p ? "•" : p || (!v && i.placeholder ? i.placeholder : "") }),
77
+ v && /* @__PURE__ */ I(
74
78
  "span",
75
79
  {
76
80
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
77
81
  "aria-hidden": "true",
78
- children: /* @__PURE__ */ b("span", { className: "bg-on-surface animate-standalone-caret-blink h-sz-24 w-px" })
82
+ children: /* @__PURE__ */ I("span", { className: "bg-on-surface animate-standalone-caret-blink h-sz-24 w-sz-2" })
79
83
  }
80
84
  )
81
85
  ]
@@ -83,160 +87,166 @@ const ie = ne(
83
87
  );
84
88
  };
85
89
  E.displayName = "InputOTP.Slot";
86
- const ye = "Backspace", Pe = "ArrowLeft", Te = "ArrowUp", Oe = "ArrowRight", we = "ArrowDown", Ne = "e", Re = ({
90
+ const Oe = "Backspace", Pe = "ArrowLeft", Te = "ArrowUp", we = "ArrowRight", Ne = "ArrowDown", Re = "e", Se = ({
87
91
  maxLength: e,
88
- type: a,
92
+ type: o,
89
93
  value: t,
90
- defaultValue: o,
94
+ defaultValue: i,
91
95
  onValueChange: r,
92
- isValid: l,
96
+ isValid: d,
93
97
  disabledProp: p,
98
+ readOnlyProp: g,
94
99
  autoFocus: v,
95
- forceUppercase: h,
96
- filterKeys: P,
97
- pattern: x,
98
- placeholder: C,
99
- nameProp: G
100
+ forceUppercase: O,
101
+ filterKeys: T,
102
+ pattern: h,
103
+ placeholder: D,
104
+ nameProp: V
100
105
  }) => {
101
- const z = ve(), s = Z(null), B = Z(null), c = xe(), T = c.id ?? z, D = G ?? c.name, I = c.disabled ?? p, _ = c.isInvalid ?? !l, V = c.isRequired ?? !1, W = c.labelId, k = c.description, O = c.state, w = ["success", "alert", "error"].includes(O ?? "") ? O : _ ? "error" : "neutral", g = t !== void 0 ? t : o, F = h ? g.toUpperCase() : g, [q, N] = L(F), [R, K] = L(!1), u = t !== void 0 ? t : q, f = Math.min(u.length, e - 1);
102
- $(() => {
103
- s.current && s.current.setSelectionRange(f, f);
104
- }, [f, u.length, e]);
105
- const M = H(
106
- () => Array.from({ length: e }, (i, n) => ({
107
- char: u[n] || "",
108
- isActive: n === f && R,
109
- hasFakeCaret: n === f && !u[n] && !I && R
106
+ const W = xe(), s = te(null), Y = te(null), c = Ie(), w = c.id ?? W, k = V ?? c.name, f = c.disabled ?? p, y = c.readOnly ?? g, _ = c.isInvalid ?? !d, q = c.isRequired ?? !1, F = c.labelId, K = c.description, N = c.state, R = ["success", "alert", "error"].includes(N ?? "") ? N : _ ? "error" : "neutral", P = t !== void 0 ? t : i, M = O ? P.toUpperCase() : P, [$, S] = ne(M), [A, j] = ne(!1), l = t !== void 0 ? t : $, b = Math.min(l.length, e - 1);
107
+ J(() => {
108
+ s.current && s.current.setSelectionRange(b, b);
109
+ }, [b, l.length, e]);
110
+ const z = L(
111
+ () => Array.from({ length: e }, (n, a) => ({
112
+ char: l[a] || "",
113
+ isActive: a === b && A,
114
+ hasFakeCaret: a === b && !l[a] && !f && !y && A
110
115
  })),
111
- [e, u, f, R, I]
116
+ [e, l, b, A, f, y]
112
117
  );
113
- $(() => {
118
+ J(() => {
114
119
  s.current && t !== void 0 && (s.current.value = t);
115
- }, [t]), $(() => {
120
+ }, [t]), J(() => {
116
121
  v && s.current && s.current.focus();
117
122
  }, [v]);
118
- const S = (i) => {
119
- let n = i;
120
- if (h && (n = n.toUpperCase()), a === "number" && (n = n.replace(/[^\d]/g, "")), x)
123
+ const G = (n) => {
124
+ let a = n;
125
+ if (O && (a = a.toUpperCase()), o === "number" && (a = a.replace(/[^\d]/g, "")), h)
121
126
  try {
122
- let m = x;
123
- x.startsWith("^") || (m = `^${x}$`);
124
- const d = new RegExp(m);
125
- n = n.split("").filter((y) => d.test(y)).join("");
126
- } catch (m) {
127
- console.error("Invalid pattern provided to InputOTP:", x, m);
127
+ let x = h;
128
+ h.startsWith("^") || (x = `^${h}$`);
129
+ const u = new RegExp(x);
130
+ a = a.split("").filter((m) => u.test(m)).join("");
131
+ } catch (x) {
132
+ console.error("Invalid pattern provided to InputOTP:", h, x);
128
133
  }
129
- return n;
134
+ return a;
130
135
  };
131
136
  return {
132
- uuid: T,
137
+ uuid: w,
133
138
  inputRef: s,
134
- containerRef: B,
135
- name: D,
136
- disabled: I,
139
+ containerRef: Y,
140
+ name: k,
141
+ disabled: f,
142
+ readOnly: y,
137
143
  isInvalid: _,
138
- isRequired: V,
139
- description: k,
144
+ isRequired: q,
145
+ description: K,
140
146
  maxLength: e,
141
- intent: w,
142
- currentValue: u,
143
- activeIndex: f,
144
- slots: M,
147
+ intent: R,
148
+ currentValue: l,
149
+ activeIndex: b,
150
+ slots: z,
145
151
  contextValue: {
146
- value: u,
152
+ value: l,
147
153
  maxLength: e,
148
- slots: M,
149
- activeIndex: f,
150
- intent: w,
151
- disabled: I,
152
- placeholder: C,
153
- type: a
154
+ slots: z,
155
+ activeIndex: b,
156
+ intent: R,
157
+ disabled: f,
158
+ readOnly: y,
159
+ placeholder: D,
160
+ type: o
154
161
  },
155
- handleChange: (i) => {
156
- if (I) return;
157
- const n = i.target.value, d = S(n).slice(0, e);
158
- r && r(d), t === void 0 && N(d);
159
- const y = Math.min(d.length, e - 1);
160
- s.current && s.current.setSelectionRange(y, y);
162
+ handleChange: (n) => {
163
+ if (f || y) return;
164
+ const a = n.target.value, u = G(a).slice(0, e);
165
+ r && r(u), t === void 0 && S(u);
166
+ const m = Math.min(u.length, e - 1);
167
+ s.current && s.current.setSelectionRange(m, m);
161
168
  },
162
- handleKeyDown: (i) => {
163
- if (!I) {
164
- if (P.length > 0 && P.includes(i.key)) {
165
- i.preventDefault();
166
- return;
167
- }
168
- switch (i.key) {
169
- case ye:
170
- i.preventDefault();
171
- const n = u.length;
172
- if (n > 0) {
173
- const m = u.slice(0, n - 1);
174
- r && r(m), t === void 0 && N(m);
175
- const d = Math.max(0, m.length);
176
- s.current && s.current.setSelectionRange(d, d);
177
- }
178
- break;
179
- case Pe:
180
- case Oe:
181
- i.preventDefault();
182
- break;
183
- case Te:
184
- case we:
185
- i.preventDefault();
186
- break;
187
- case Ne:
188
- case "E":
189
- a === "number" && i.preventDefault();
190
- break;
191
- }
169
+ handleKeyDown: (n) => {
170
+ if (f || y) return;
171
+ const a = (n.ctrlKey || n.metaKey) && ["a", "c", "v", "x"].includes(n.key.toLowerCase());
172
+ if (T.length > 0 && T.includes(n.key) && !a) {
173
+ n.preventDefault();
174
+ return;
175
+ }
176
+ switch (n.key) {
177
+ case Oe:
178
+ n.preventDefault();
179
+ const x = l.length;
180
+ if (x > 0) {
181
+ const u = l.slice(0, x - 1);
182
+ r && r(u), t === void 0 && S(u);
183
+ const m = Math.max(0, u.length);
184
+ s.current && s.current.setSelectionRange(m, m);
185
+ }
186
+ break;
187
+ case Pe:
188
+ case we:
189
+ n.preventDefault();
190
+ break;
191
+ case Te:
192
+ case Ne:
193
+ n.preventDefault();
194
+ break;
195
+ case Re:
196
+ case "E":
197
+ o === "number" && n.preventDefault();
198
+ break;
192
199
  }
193
200
  },
194
- handlePaste: (i) => {
195
- if (I) return;
196
- i.preventDefault();
197
- const n = i.clipboardData.getData("text");
198
- if (!n) return;
199
- const d = S(n).slice(0, e);
200
- r && r(d), t === void 0 && N(d);
201
- const y = Math.min(d.length, e - 1);
202
- s.current && s.current.setSelectionRange(y, y);
201
+ handleCopy: (n) => {
202
+ f || (n.preventDefault(), l.length > 0 && n.clipboardData.setData("text/plain", l));
203
+ },
204
+ handlePaste: (n) => {
205
+ if (f || y) return;
206
+ n.preventDefault();
207
+ const a = n.clipboardData.getData("text");
208
+ if (!a) return;
209
+ const u = G(a).slice(0, e);
210
+ r && r(u), t === void 0 && S(u);
211
+ const m = Math.min(u.length, e - 1);
212
+ s.current && s.current.setSelectionRange(m, m);
203
213
  },
204
214
  handleFocus: () => {
205
- if (K(!0), s.current) {
206
- const i = Math.min(u.length, e - 1);
207
- s.current.setSelectionRange(i, i);
215
+ if (j(!0), s.current) {
216
+ const n = Math.min(l.length, e - 1);
217
+ s.current.setSelectionRange(n, n);
208
218
  }
209
219
  },
210
220
  handleBlur: () => {
211
- K(!1);
221
+ j(!1);
212
222
  },
213
223
  handleClick: () => {
214
224
  s.current && s.current.focus();
215
225
  },
216
- labelId: W
226
+ labelId: F
217
227
  };
218
- }, oe = (e) => {
219
- let a = 0;
220
- return re.forEach(e, (t) => {
221
- if (se(t)) {
222
- const o = t.props;
223
- t.type === E || t.type?.displayName === "InputOTP.Slot" ? a++ : o.children && (a += oe(o.children));
228
+ }, ue = (e) => {
229
+ let o = 0;
230
+ return oe.forEach(e, (t) => {
231
+ if (ie(t)) {
232
+ const i = t.props;
233
+ t.type === E || t.type?.displayName === "InputOTP.Slot" ? o++ : i.children && (o += ue(i.children));
224
234
  }
225
- }), a;
226
- }, ce = (e, a = 0) => {
227
- let t = a;
228
- return [re.map(e, (r) => {
229
- if (se(r)) {
230
- const l = r.props;
235
+ }), o;
236
+ }, de = (e, o = 0) => {
237
+ let t = o;
238
+ return [oe.map(e, (r) => {
239
+ if (ie(r)) {
240
+ const d = r.props;
231
241
  if (r.type === E || r.type?.displayName === "InputOTP.Slot") {
232
- const p = typeof l.index == "number" ? l.index : t++;
233
- return ee(r, {
234
- ...l,
242
+ const p = typeof d.index == "number" ? d.index : t++;
243
+ return re(r, {
244
+ ...d,
235
245
  index: p
236
246
  });
237
- } else if (l.children) {
238
- const [p, v] = ce(l.children, t);
239
- return t = v, ee(r, {
247
+ } else if (d.children) {
248
+ const [p, g] = de(d.children, t);
249
+ return t = g, re(r, {
240
250
  ...r.props,
241
251
  children: p
242
252
  });
@@ -244,149 +254,158 @@ const ye = "Backspace", Pe = "ArrowLeft", Te = "ArrowUp", Oe = "ArrowRight", we
244
254
  }
245
255
  return r;
246
256
  }), t];
247
- }, le = ({
257
+ }, pe = ({
248
258
  maxLength: e,
249
- type: a = "text",
259
+ type: o = "text",
250
260
  value: t,
251
- defaultValue: o = "",
261
+ defaultValue: i = "",
252
262
  onValueChange: r,
253
- isValid: l = !0,
263
+ isValid: d = !0,
254
264
  disabled: p = !1,
265
+ readOnly: g = !1,
255
266
  autoFocus: v = !1,
256
- autoComplete: h = "off",
257
- forceUppercase: P = !1,
258
- filterKeys: x = ["-", "."],
259
- pattern: C,
260
- inputMode: G,
261
- placeholder: z = "",
267
+ autoComplete: O = "off",
268
+ forceUppercase: T = !1,
269
+ filterKeys: h = ["-", "."],
270
+ pattern: D,
271
+ inputMode: V,
272
+ placeholder: W = "-",
262
273
  name: s,
263
- className: B,
274
+ className: Y,
264
275
  children: c,
265
- ...T
276
+ ...w
266
277
  }) => {
267
- const D = H(() => {
278
+ const k = L(() => {
268
279
  if (e !== void 0)
269
280
  return e;
270
- const A = oe(c);
271
- return A > 0 ? A : 4;
272
- }, [e, c]), I = H(() => {
273
- const [A] = ce(c);
274
- return A;
281
+ const C = ue(c);
282
+ return C > 0 ? C : 4;
283
+ }, [e, c]), f = L(() => {
284
+ const [C] = de(c);
285
+ return C;
275
286
  }, [c]), {
276
- uuid: _,
277
- inputRef: V,
278
- containerRef: W,
279
- name: k,
280
- disabled: O,
281
- isInvalid: Y,
282
- isRequired: w,
283
- description: g,
284
- currentValue: F,
285
- contextValue: q,
286
- handleChange: N,
287
- handleKeyDown: R,
288
- handlePaste: K,
289
- handleFocus: u,
290
- handleBlur: f,
291
- handleClick: M,
292
- labelId: S
293
- } = Re({
294
- maxLength: D,
295
- type: a,
287
+ uuid: y,
288
+ inputRef: _,
289
+ containerRef: q,
290
+ name: F,
291
+ disabled: K,
292
+ readOnly: N,
293
+ isInvalid: U,
294
+ isRequired: R,
295
+ description: P,
296
+ currentValue: M,
297
+ contextValue: $,
298
+ handleChange: S,
299
+ handleKeyDown: A,
300
+ handleCopy: j,
301
+ handlePaste: l,
302
+ handleFocus: b,
303
+ handleBlur: z,
304
+ handleClick: G,
305
+ labelId: H
306
+ } = Se({
307
+ maxLength: k,
308
+ type: o,
296
309
  value: t,
297
- defaultValue: o,
310
+ defaultValue: i,
298
311
  onValueChange: r,
299
- isValid: l,
312
+ isValid: d,
300
313
  disabledProp: p,
314
+ readOnlyProp: g,
301
315
  autoFocus: v,
302
- forceUppercase: P,
303
- filterKeys: x,
304
- pattern: C,
305
- placeholder: z,
316
+ forceUppercase: T,
317
+ filterKeys: h,
318
+ pattern: D,
319
+ placeholder: W,
306
320
  nameProp: s
307
- }), U = "aria-label" in T ? T["aria-label"] : void 0, { "aria-label": ue, ...Q } = T, j = S ? { "aria-labelledby": S } : U ? { "aria-label": U } : {};
308
- return /* @__PURE__ */ b(ae.Provider, { value: q, children: /* @__PURE__ */ te(
321
+ }), X = "aria-label" in w ? w["aria-label"] : void 0, { "aria-label": fe, ...ee } = w, B = H ? { "aria-labelledby": H } : X ? { "aria-label": X } : {};
322
+ return /* @__PURE__ */ I(ce.Provider, { value: $, children: /* @__PURE__ */ se(
309
323
  "div",
310
324
  {
311
- ref: W,
325
+ ref: q,
312
326
  "data-spark-component": "input-otp",
313
327
  role: "group",
314
- ...j,
315
- ...g ? { "aria-describedby": g } : {},
316
- className: fe(
317
- "gap-md relative inline-flex items-center",
318
- O ? "cursor-not-allowed" : "cursor-text",
319
- B
328
+ ...B,
329
+ ...P ? { "aria-describedby": P } : {},
330
+ className: ve(
331
+ "group gap-md relative inline-flex w-fit items-center default:cursor-text",
332
+ {
333
+ "cursor-not-allowed": K,
334
+ "cursor-default": N
335
+ },
336
+ Y
320
337
  ),
321
- onClick: M,
322
- ...Q,
338
+ onClick: G,
339
+ ...ee,
323
340
  children: [
324
- k && /* @__PURE__ */ b(
341
+ F && /* @__PURE__ */ I(
325
342
  "input",
326
343
  {
327
344
  type: "hidden",
328
- name: k,
329
- value: F,
330
- required: w,
331
- "aria-required": w,
332
- "aria-invalid": Y,
333
- ...j
345
+ name: F,
346
+ value: M,
347
+ required: R,
348
+ "aria-required": R,
349
+ "aria-invalid": U,
350
+ ...B
334
351
  }
335
352
  ),
336
- /* @__PURE__ */ b(
353
+ /* @__PURE__ */ I(
337
354
  "input",
338
355
  {
339
- ref: V,
340
- id: _,
341
- type: a === "password" ? "password" : "text",
342
- value: F,
343
- maxLength: D,
356
+ ref: _,
357
+ id: y,
358
+ type: o === "password" ? "password" : "text",
359
+ value: M,
360
+ maxLength: k,
344
361
  autoFocus: v,
345
- autoComplete: h,
346
- disabled: O,
347
- pattern: C,
348
- inputMode: G,
349
- ...j,
350
- ...g ? { "aria-describedby": g } : {},
351
- "aria-invalid": Y,
352
- onChange: N,
353
- onKeyDown: R,
354
- onPaste: K,
355
- onFocus: u,
356
- onBlur: f,
357
- className: "bg-success z-raised absolute inset-0 m-0 p-0 opacity-0 disabled:cursor-not-allowed",
362
+ autoComplete: O,
363
+ disabled: K,
364
+ readOnly: N,
365
+ pattern: D,
366
+ inputMode: V,
367
+ ...B,
368
+ ...P ? { "aria-describedby": P } : {},
369
+ "aria-invalid": U,
370
+ onChange: S,
371
+ onKeyDown: A,
372
+ onCopy: j,
373
+ onPaste: l,
374
+ onFocus: b,
375
+ onBlur: z,
376
+ className: "bg-success z-raised absolute inset-0 m-0 p-0 opacity-0 read-only:cursor-default disabled:cursor-not-allowed",
358
377
  tabIndex: 0
359
378
  }
360
379
  ),
361
- I
380
+ f
362
381
  ]
363
382
  }
364
383
  ) });
365
384
  };
366
- le.displayName = "InputOTP";
367
- const X = ({ children: e, className: a, ...t }) => /* @__PURE__ */ b("div", { className: `inline-flex [&>*:not(:first-child)]:-ml-px ${a || ""}`, ...t, children: e });
368
- X.displayName = "InputOTP.Group";
369
- const J = ({ className: e, ...a }) => /* @__PURE__ */ b(
385
+ pe.displayName = "InputOTP";
386
+ const Q = ({ children: e, className: o, ...t }) => /* @__PURE__ */ I("div", { className: `gap-md flex ${o}`, ...t, children: e });
387
+ Q.displayName = "InputOTP.Group";
388
+ const Z = ({ className: e, ...o }) => /* @__PURE__ */ I(
370
389
  "div",
371
390
  {
372
- className: `text-on-surface flex items-center justify-center ${e || ""}`,
373
- ...a,
374
- children: /* @__PURE__ */ b(Ie, { size: "md", children: /* @__PURE__ */ b(he, {}) })
391
+ className: `text-on-surface/dim-3 flex items-center justify-center ${e || ""}`,
392
+ ...o,
393
+ children: /* @__PURE__ */ I("div", { className: "h-sz-4 w-sz-8 bg-outline rounded-full" })
375
394
  }
376
395
  );
377
- J.displayName = "InputOTP.Separator";
378
- const Se = Object.assign(le, {
379
- Group: X,
396
+ Z.displayName = "InputOTP.Separator";
397
+ const Ae = Object.assign(pe, {
398
+ Group: Q,
380
399
  Slot: E,
381
- Separator: J
400
+ Separator: Z
382
401
  });
383
- Se.displayName = "InputOTP";
384
- X.displayName = "InputOTP.Group";
402
+ Ae.displayName = "InputOTP";
403
+ Q.displayName = "InputOTP.Group";
385
404
  E.displayName = "InputOTP.Slot";
386
- J.displayName = "InputOTP.Separator";
405
+ Z.displayName = "InputOTP.Separator";
387
406
  export {
388
- Se as InputOTP,
389
- ie as inputOTPSlotStyles,
390
- Ke as inputOTPStyles
407
+ Ae as InputOTP,
408
+ le as inputOTPSlotStyles,
409
+ Fe as inputOTPStyles
391
410
  };
392
411
  //# sourceMappingURL=index.mjs.map