@devalok/shilp-sutra 0.49.4 → 0.49.5

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,13 +1,14 @@
1
1
  "use client";
2
2
  import { durations as e, springs as t } from "./lib/motion.js";
3
3
  import { cn as n } from "./lib/utils.js";
4
- import { Z as r } from "../_chunks/vendor-client.js";
5
- import { Popover as i, PopoverContent as a, PopoverTrigger as o } from "../_chunks/popover.js";
6
- import * as s from "react";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
- import { AnimatePresence as u, motion as d } from "framer-motion";
4
+ import { useFormField as r } from "./form.js";
5
+ import { Z as i } from "../_chunks/vendor-client.js";
6
+ import { Popover as a, PopoverContent as o, PopoverTrigger as s } from "../_chunks/popover.js";
7
+ import * as c from "react";
8
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
+ import { AnimatePresence as d, motion as f } from "framer-motion";
9
10
  //#region src/ui/color-input.tsx
10
- function f(e) {
11
+ function p(e) {
11
12
  let t = /^#?([0-9a-f]{6})$/i.exec(e);
12
13
  if (!t) return null;
13
14
  let n = parseInt(t[1], 16);
@@ -17,15 +18,15 @@ function f(e) {
17
18
  b: n & 255
18
19
  };
19
20
  }
20
- function p(e, t, n) {
21
+ function m(e, t, n) {
21
22
  return "#" + [
22
23
  e,
23
24
  t,
24
25
  n
25
26
  ].map((e) => Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0")).join("");
26
27
  }
27
- function m(e) {
28
- let t = f(e);
28
+ function h(e) {
29
+ let t = p(e);
29
30
  if (!t) return null;
30
31
  let n = t.r / 255, r = t.g / 255, i = t.b / 255, a = Math.max(n, r, i), o = Math.min(n, r, i), s = (a + o) / 2;
31
32
  if (a === o) return {
@@ -40,14 +41,14 @@ function m(e) {
40
41
  l: Math.round(s * 100)
41
42
  };
42
43
  }
43
- function h(e, t, n) {
44
+ function g(e, t, n) {
44
45
  let r = t / 100, i = n / 100, a = r * Math.min(i, 1 - i), o = (t) => {
45
46
  let n = (t + e / 30) % 12, r = i - a * Math.max(Math.min(n - 3, 9 - n, 1), -1);
46
47
  return Math.round(255 * r);
47
48
  };
48
- return p(o(0), o(8), o(4));
49
+ return m(o(0), o(8), o(4));
49
50
  }
50
- var g = [
51
+ var _ = [
51
52
  {
52
53
  hex: "#C53637",
53
54
  label: "Red"
@@ -89,8 +90,8 @@ var g = [
89
90
  label: "Pink"
90
91
  }
91
92
  ];
92
- function _(e) {
93
- let t = f(e);
93
+ function v(e) {
94
+ let t = p(e);
94
95
  if (!t) return !1;
95
96
  let [n, r, i] = [
96
97
  t.r,
@@ -102,19 +103,19 @@ function _(e) {
102
103
  });
103
104
  return .2126 * n + .7152 * r + .0722 * i > .4;
104
105
  }
105
- function v({ label: e, value: t, onChange: r, onBlur: i, disabled: a, maxLength: o = 3, prefix: s, className: u, id: d }) {
106
- return /* @__PURE__ */ l("div", {
107
- className: n("flex flex-col gap-ds-01", u),
108
- children: [/* @__PURE__ */ c("label", {
106
+ function y({ label: e, value: t, onChange: r, onBlur: i, disabled: a, maxLength: o = 3, prefix: s, className: c, id: d }) {
107
+ return /* @__PURE__ */ u("div", {
108
+ className: n("flex flex-col gap-ds-01", c),
109
+ children: [/* @__PURE__ */ l("label", {
109
110
  htmlFor: d,
110
111
  className: "text-ds-xs font-medium uppercase tracking-wider text-surface-fg-muted",
111
112
  children: e
112
- }), /* @__PURE__ */ l("div", {
113
+ }), /* @__PURE__ */ u("div", {
113
114
  className: "flex items-center",
114
- children: [s && /* @__PURE__ */ c("span", {
115
+ children: [s && /* @__PURE__ */ l("span", {
115
116
  className: "text-ds-sm text-surface-fg-muted",
116
117
  children: s
117
- }), /* @__PURE__ */ c("input", {
118
+ }), /* @__PURE__ */ l("input", {
118
119
  id: d,
119
120
  type: "text",
120
121
  value: t,
@@ -127,65 +128,65 @@ function v({ label: e, value: t, onChange: r, onBlur: i, disabled: a, maxLength:
127
128
  })]
128
129
  });
129
130
  }
130
- var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled: S = !1, showPicker: C = !0, defaultFormat: w = "hex", align: T = "start", variant: E = "default", className: D, ...O }, k) => {
131
- let [A, j] = s.useState(w), [M, N] = s.useState(!1), P = s.useId(), [F, I] = s.useState(y);
132
- s.useEffect(() => {
133
- I(y);
134
- }, [y]);
135
- let [L, R] = s.useState(y), [z, B] = s.useState([]), V = s.useRef(!1), H = (e) => {
136
- S || (e && (R(F), B([])), N(e));
137
- }, U = (e) => {
138
- if (S) return;
139
- let t = (e.startsWith("#") ? e : `#${e}`).toLowerCase();
140
- B((e) => e[e.length - 1] === F ? e : [...e.slice(-19), F]), I(t), b?.(t);
131
+ var b = c.forwardRef(({ value: b = "#000000", onChange: x, presets: S, disabled: C = !1, showPicker: w = !0, defaultFormat: T = "hex", align: E = "start", variant: D = "default", className: O, id: k, ...ee }, te) => {
132
+ let [A, ne] = c.useState(T), [j, M] = c.useState(!1), N = c.useId(), P = r(), F = k ?? P.inputId, [I, L] = c.useState(b);
133
+ c.useEffect(() => {
134
+ L(b);
135
+ }, [b]);
136
+ let [R, z] = c.useState(b), [B, V] = c.useState([]), H = c.useRef(!1), U = (e) => {
137
+ C || (e && (z(I), V([])), M(e));
141
138
  }, W = (e) => {
142
- if (S) return;
139
+ if (C) return;
143
140
  let t = (e.startsWith("#") ? e : `#${e}`).toLowerCase();
144
- V.current || (V.current = !0, B((e) => e[e.length - 1] === F ? e : [...e.slice(-19), F])), I(t), b?.(t);
145
- }, G = () => {
146
- V.current = !1;
141
+ V((e) => e[e.length - 1] === I ? e : [...e.slice(-19), I]), L(t), x?.(t);
142
+ }, G = (e) => {
143
+ if (C) return;
144
+ let t = (e.startsWith("#") ? e : `#${e}`).toLowerCase();
145
+ H.current || (H.current = !0, V((e) => e[e.length - 1] === I ? e : [...e.slice(-19), I])), L(t), x?.(t);
147
146
  }, K = () => {
148
- if (z.length === 0) return;
149
- let e = z[z.length - 1];
150
- B((e) => e.slice(0, -1)), I(e), b?.(e);
147
+ H.current = !1;
151
148
  }, q = () => {
152
- I(L), b?.(L), B([]);
153
- }, J = x === !1 ? [] : x ? x.map((e) => typeof e == "string" ? {
149
+ if (B.length === 0) return;
150
+ let e = B[B.length - 1];
151
+ V((e) => e.slice(0, -1)), L(e), x?.(e);
152
+ }, J = () => {
153
+ L(R), x?.(R), V([]);
154
+ }, Y = S === !1 ? [] : S ? S.map((e) => typeof e == "string" ? {
154
155
  hex: e,
155
156
  label: e
156
- } : e) : g, Y = f(F), X = m(F), Z = (e, t) => {
157
- if (!Y) return;
157
+ } : e) : _, X = p(I), Z = h(I), Q = (e, t) => {
158
+ if (!X) return;
158
159
  let n = parseInt(t, 10);
159
160
  if (isNaN(n)) return;
160
161
  let r = Math.max(0, Math.min(255, n));
161
- U(p(e === "r" ? r : Y.r, e === "g" ? r : Y.g, e === "b" ? r : Y.b));
162
- }, Q = (e, t) => {
163
- if (!X) return;
162
+ W(m(e === "r" ? r : X.r, e === "g" ? r : X.g, e === "b" ? r : X.b));
163
+ }, $ = (e, t) => {
164
+ if (!Z) return;
164
165
  let n = parseInt(t, 10);
165
166
  if (isNaN(n)) return;
166
167
  let r = Math.max(0, Math.min(e === "h" ? 360 : 100, n));
167
- U(h(e === "h" ? r : X.h, e === "s" ? r : X.s, e === "l" ? r : X.l));
168
- }, $ = [
168
+ W(g(e === "h" ? r : Z.h, e === "s" ? r : Z.s, e === "l" ? r : Z.l));
169
+ }, re = [
169
170
  "hex",
170
171
  "rgb",
171
172
  "hsl"
172
173
  ];
173
- return /* @__PURE__ */ c("div", {
174
- ref: k,
175
- className: n("inline-flex flex-col", D),
176
- ...O,
177
- children: /* @__PURE__ */ l(i, {
178
- open: M,
179
- onOpenChange: H,
180
- children: [/* @__PURE__ */ c(o, {
174
+ return /* @__PURE__ */ l("div", {
175
+ ref: te,
176
+ className: n("inline-flex flex-col", O),
177
+ ...ee,
178
+ children: /* @__PURE__ */ u(a, {
179
+ open: j,
180
+ onOpenChange: U,
181
+ children: [/* @__PURE__ */ l(s, {
181
182
  asChild: !0,
182
- children: E === "inline" ? /* @__PURE__ */ c(d.button, {
183
+ children: D === "inline" ? /* @__PURE__ */ l(f.button, {
183
184
  type: "button",
184
- disabled: S,
185
- className: n("group flex items-center justify-center rounded-control px-ds-04 py-ds-02 font-mono text-ds-sm font-medium", "focus:outline-hidden focus:ring-2 focus:ring-accent-9 focus:ring-offset-2 focus:ring-offset-surface-base", S && "cursor-not-allowed opacity-50"),
185
+ disabled: C,
186
+ className: n("group flex items-center justify-center rounded-control px-ds-04 py-ds-02 font-mono text-ds-sm font-medium", "focus:outline-hidden focus:ring-2 focus:ring-accent-9 focus:ring-offset-2 focus:ring-offset-surface-base", C && "cursor-not-allowed opacity-50"),
186
187
  animate: {
187
- backgroundColor: F,
188
- color: _(F) ? "rgba(0,0,0,0.8)" : "rgba(255,255,255,0.95)"
188
+ backgroundColor: I,
189
+ color: v(I) ? "rgba(0,0,0,0.8)" : "rgba(255,255,255,0.95)"
189
190
  },
190
191
  whileHover: {
191
192
  y: -1,
@@ -193,76 +194,82 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
193
194
  },
194
195
  whileTap: { scale: .97 },
195
196
  transition: t.smooth,
196
- "aria-label": `Color picker: ${F}`,
197
- children: F.toUpperCase()
198
- }) : /* @__PURE__ */ l(d.button, {
197
+ id: F,
198
+ "aria-describedby": P.helperTextId,
199
+ "aria-invalid": P.state === "error" || void 0,
200
+ "aria-label": P.inputId ? void 0 : `Color picker: ${I}`,
201
+ children: I.toUpperCase()
202
+ }) : /* @__PURE__ */ u(f.button, {
199
203
  type: "button",
200
- disabled: S,
201
- className: n("group relative flex items-center overflow-hidden rounded-control border border-surface-border-strong", "hover:border-accent-7 focus:border-accent-7 focus:outline-hidden focus:ring-1 focus:ring-accent-9", S && "cursor-not-allowed opacity-50"),
204
+ disabled: C,
205
+ className: n("group relative flex items-center overflow-hidden rounded-control border border-surface-border-strong", "hover:border-accent-7 focus:border-accent-7 focus:outline-hidden focus:ring-1 focus:ring-accent-9", C && "cursor-not-allowed opacity-50"),
202
206
  whileHover: { scale: 1.02 },
203
207
  whileTap: { scale: .98 },
204
208
  transition: t.snappy,
205
- "aria-label": `Color picker: ${F}`,
209
+ id: F,
210
+ "aria-describedby": P.helperTextId,
211
+ "aria-invalid": P.state === "error" || void 0,
212
+ "aria-label": P.inputId ? void 0 : `Color picker: ${I}`,
206
213
  children: [
207
- /* @__PURE__ */ c(d.span, {
214
+ /* @__PURE__ */ l(f.span, {
208
215
  className: "absolute inset-0",
209
- animate: { background: `linear-gradient(to right, ${F} 0%, ${F} 35%, transparent 70%)` },
216
+ animate: { background: `linear-gradient(to right, ${I} 0%, ${I} 35%, transparent 70%)` },
210
217
  transition: { duration: .3 }
211
218
  }),
212
- /* @__PURE__ */ c("span", {
219
+ /* @__PURE__ */ l("span", {
213
220
  className: "absolute inset-0 bg-surface-overlay/60",
214
221
  style: {
215
222
  maskImage: "linear-gradient(to right, transparent 0%, black 40%)",
216
223
  WebkitMaskImage: "linear-gradient(to right, transparent 0%, black 40%)"
217
224
  }
218
225
  }),
219
- /* @__PURE__ */ c("span", {
226
+ /* @__PURE__ */ l("span", {
220
227
  className: "relative z-10 py-ds-02 pl-6 pr-ds-03 font-mono text-ds-sm text-surface-fg",
221
- children: F.toUpperCase()
228
+ children: I.toUpperCase()
222
229
  })
223
230
  ]
224
231
  })
225
- }), /* @__PURE__ */ c(a, {
232
+ }), /* @__PURE__ */ l(o, {
226
233
  role: "dialog",
227
234
  "aria-label": "Color picker",
228
- align: T,
235
+ align: E,
229
236
  sideOffset: 8,
230
237
  className: "w-[272px] rounded-overlay-lg bg-surface-overlay p-0 shadow-floating",
231
- children: /* @__PURE__ */ l("div", {
238
+ children: /* @__PURE__ */ u("div", {
232
239
  className: "flex flex-col",
233
240
  children: [
234
- C && /* @__PURE__ */ c("div", {
241
+ w && /* @__PURE__ */ l("div", {
235
242
  className: "p-ds-04 pb-ds-03",
236
- onPointerUp: G,
237
- onPointerLeave: G,
238
- children: /* @__PURE__ */ c(r, {
239
- color: F,
240
- onChange: W,
243
+ onPointerUp: K,
244
+ onPointerLeave: K,
245
+ children: /* @__PURE__ */ l(i, {
246
+ color: I,
247
+ onChange: G,
241
248
  className: "w-full!",
242
249
  style: { height: 160 }
243
250
  })
244
251
  }),
245
- /* @__PURE__ */ l("div", {
252
+ /* @__PURE__ */ u("div", {
246
253
  className: "border-t border-surface-border px-ds-04 py-ds-03",
247
- children: [/* @__PURE__ */ c("div", {
254
+ children: [/* @__PURE__ */ l("div", {
248
255
  className: "mb-ds-03 flex items-center gap-ds-01",
249
- children: $.map((e) => /* @__PURE__ */ l("button", {
256
+ children: re.map((e) => /* @__PURE__ */ u("button", {
250
257
  type: "button",
251
- onClick: () => j(e),
258
+ onClick: () => ne(e),
252
259
  className: n("relative min-h-6 rounded-control-inner px-ds-02 py-px text-ds-xs font-semibold uppercase tracking-wider transition-colors", A === e ? "text-accent-11" : "text-surface-fg-muted hover:text-surface-fg"),
253
- children: [A === e && /* @__PURE__ */ c(d.span, {
254
- layoutId: `color-input-format-pill-${P}`,
260
+ children: [A === e && /* @__PURE__ */ l(f.span, {
261
+ layoutId: `color-input-format-pill-${N}`,
255
262
  className: "absolute inset-0 rounded-control-inner bg-accent-3",
256
263
  transition: t.snappy
257
- }), /* @__PURE__ */ c("span", {
264
+ }), /* @__PURE__ */ l("span", {
258
265
  className: "relative z-10",
259
266
  children: e
260
267
  })]
261
268
  }, e))
262
- }), /* @__PURE__ */ l(u, {
269
+ }), /* @__PURE__ */ u(d, {
263
270
  mode: "wait",
264
271
  children: [
265
- A === "hex" && /* @__PURE__ */ c(d.div, {
272
+ A === "hex" && /* @__PURE__ */ l(f.div, {
266
273
  initial: {
267
274
  opacity: 0,
268
275
  y: 4
@@ -277,24 +284,24 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
277
284
  },
278
285
  transition: { duration: e.moderate01 },
279
286
  className: "flex gap-ds-02",
280
- children: /* @__PURE__ */ c(v, {
281
- id: `${P}-hex`,
287
+ children: /* @__PURE__ */ l(y, {
288
+ id: `${N}-hex`,
282
289
  label: "Hex",
283
- value: F.replace("#", "").toUpperCase(),
290
+ value: I.replace("#", "").toUpperCase(),
284
291
  onChange: (e) => {
285
292
  let t = e.replace(/[^0-9a-fA-F]/g, "").slice(0, 6);
286
- t.length === 6 && U(`#${t}`);
293
+ t.length === 6 && W(`#${t}`);
287
294
  },
288
295
  onBlur: () => {
289
- F.replace("#", "").toUpperCase().length !== 6 && I(F);
296
+ I.replace("#", "").toUpperCase().length !== 6 && L(I);
290
297
  },
291
- disabled: S,
298
+ disabled: C,
292
299
  maxLength: 6,
293
300
  prefix: "#",
294
301
  className: "flex-1"
295
302
  })
296
303
  }, "hex"),
297
- A === "rgb" && Y && /* @__PURE__ */ l(d.div, {
304
+ A === "rgb" && X && /* @__PURE__ */ u(f.div, {
298
305
  initial: {
299
306
  opacity: 0,
300
307
  y: 4
@@ -310,33 +317,33 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
310
317
  transition: { duration: e.moderate01 },
311
318
  className: "flex gap-ds-02",
312
319
  children: [
313
- /* @__PURE__ */ c(v, {
314
- id: `${P}-r`,
320
+ /* @__PURE__ */ l(y, {
321
+ id: `${N}-r`,
315
322
  label: "R",
316
- value: String(Y.r),
317
- onChange: (e) => Z("r", e),
318
- disabled: S,
323
+ value: String(X.r),
324
+ onChange: (e) => Q("r", e),
325
+ disabled: C,
319
326
  className: "flex-1"
320
327
  }),
321
- /* @__PURE__ */ c(v, {
322
- id: `${P}-g`,
328
+ /* @__PURE__ */ l(y, {
329
+ id: `${N}-g`,
323
330
  label: "G",
324
- value: String(Y.g),
325
- onChange: (e) => Z("g", e),
326
- disabled: S,
331
+ value: String(X.g),
332
+ onChange: (e) => Q("g", e),
333
+ disabled: C,
327
334
  className: "flex-1"
328
335
  }),
329
- /* @__PURE__ */ c(v, {
330
- id: `${P}-b`,
336
+ /* @__PURE__ */ l(y, {
337
+ id: `${N}-b`,
331
338
  label: "B",
332
- value: String(Y.b),
333
- onChange: (e) => Z("b", e),
334
- disabled: S,
339
+ value: String(X.b),
340
+ onChange: (e) => Q("b", e),
341
+ disabled: C,
335
342
  className: "flex-1"
336
343
  })
337
344
  ]
338
345
  }, "rgb"),
339
- A === "hsl" && X && /* @__PURE__ */ l(d.div, {
346
+ A === "hsl" && Z && /* @__PURE__ */ u(f.div, {
340
347
  initial: {
341
348
  opacity: 0,
342
349
  y: 4
@@ -352,28 +359,28 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
352
359
  transition: { duration: e.moderate01 },
353
360
  className: "flex gap-ds-02",
354
361
  children: [
355
- /* @__PURE__ */ c(v, {
356
- id: `${P}-h`,
362
+ /* @__PURE__ */ l(y, {
363
+ id: `${N}-h`,
357
364
  label: "H",
358
- value: String(X.h),
359
- onChange: (e) => Q("h", e),
360
- disabled: S,
365
+ value: String(Z.h),
366
+ onChange: (e) => $("h", e),
367
+ disabled: C,
361
368
  className: "flex-1"
362
369
  }),
363
- /* @__PURE__ */ c(v, {
364
- id: `${P}-s`,
370
+ /* @__PURE__ */ l(y, {
371
+ id: `${N}-s`,
365
372
  label: "S",
366
- value: String(X.s),
367
- onChange: (e) => Q("s", e),
368
- disabled: S,
373
+ value: String(Z.s),
374
+ onChange: (e) => $("s", e),
375
+ disabled: C,
369
376
  className: "flex-1"
370
377
  }),
371
- /* @__PURE__ */ c(v, {
372
- id: `${P}-l`,
378
+ /* @__PURE__ */ l(y, {
379
+ id: `${N}-l`,
373
380
  label: "L",
374
- value: String(X.l),
375
- onChange: (e) => Q("l", e),
376
- disabled: S,
381
+ value: String(Z.l),
382
+ onChange: (e) => $("l", e),
383
+ disabled: C,
377
384
  className: "flex-1"
378
385
  })
379
386
  ]
@@ -381,16 +388,16 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
381
388
  ]
382
389
  })]
383
390
  }),
384
- J.length > 0 && /* @__PURE__ */ c("div", {
391
+ Y.length > 0 && /* @__PURE__ */ l("div", {
385
392
  className: "border-t border-surface-border px-ds-04 py-ds-03",
386
- children: /* @__PURE__ */ c("div", {
393
+ children: /* @__PURE__ */ l("div", {
387
394
  className: "flex flex-wrap gap-ds-02",
388
- children: J.map((e, r) => {
389
- let i = F.toLowerCase() === e.hex.toLowerCase();
390
- return /* @__PURE__ */ c(d.button, {
395
+ children: Y.map((e, r) => {
396
+ let i = I.toLowerCase() === e.hex.toLowerCase();
397
+ return /* @__PURE__ */ l(f.button, {
391
398
  type: "button",
392
- disabled: S,
393
- onClick: () => U(e.hex),
399
+ disabled: C,
400
+ onClick: () => W(e.hex),
394
401
  initial: {
395
402
  opacity: 0,
396
403
  scale: .8
@@ -405,7 +412,7 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
405
412
  ...t.bouncy,
406
413
  delay: r * .02
407
414
  },
408
- className: n("h-6 w-6 rounded-control-inner border", i ? "border-accent-7 ring-2 ring-accent-9/30" : "border-surface-border hover:border-surface-border-strong", S && "cursor-not-allowed opacity-50"),
415
+ className: n("h-6 w-6 rounded-control-inner border", i ? "border-accent-7 ring-2 ring-accent-9/30" : "border-surface-border hover:border-surface-border-strong", C && "cursor-not-allowed opacity-50"),
409
416
  style: { backgroundColor: e.hex },
410
417
  title: e.label,
411
418
  "aria-label": `${e.label}: ${e.hex}`
@@ -413,7 +420,7 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
413
420
  })
414
421
  })
415
422
  }),
416
- (z.length > 0 || F !== L) && /* @__PURE__ */ l(d.div, {
423
+ (B.length > 0 || I !== R) && /* @__PURE__ */ u(f.div, {
417
424
  initial: {
418
425
  opacity: 0,
419
426
  height: 0
@@ -428,25 +435,25 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
428
435
  },
429
436
  className: "flex items-center gap-ds-02 border-t border-surface-border px-ds-04 py-ds-02",
430
437
  children: [
431
- /* @__PURE__ */ c("span", {
438
+ /* @__PURE__ */ l("span", {
432
439
  className: "h-4 w-4 shrink-0 rounded-pill border border-surface-border",
433
- style: { backgroundColor: L },
434
- title: `Original: ${L}`
440
+ style: { backgroundColor: R },
441
+ title: `Original: ${R}`
435
442
  }),
436
- /* @__PURE__ */ c("span", {
443
+ /* @__PURE__ */ l("span", {
437
444
  className: "text-ds-xs text-surface-fg-muted",
438
- children: L.toUpperCase()
445
+ children: R.toUpperCase()
439
446
  }),
440
- /* @__PURE__ */ c("span", { className: "flex-1" }),
441
- z.length > 0 && /* @__PURE__ */ c("button", {
447
+ /* @__PURE__ */ l("span", { className: "flex-1" }),
448
+ B.length > 0 && /* @__PURE__ */ l("button", {
442
449
  type: "button",
443
- onClick: K,
450
+ onClick: q,
444
451
  className: "min-h-6 rounded-control-inner px-ds-02 py-px text-ds-xs font-medium text-surface-fg-muted transition-colors hover:text-surface-fg",
445
452
  children: "Undo"
446
453
  }),
447
- F !== L && /* @__PURE__ */ c("button", {
454
+ I !== R && /* @__PURE__ */ l("button", {
448
455
  type: "button",
449
- onClick: q,
456
+ onClick: J,
450
457
  className: "min-h-6 rounded-control-inner px-ds-02 py-px text-ds-xs font-medium text-surface-fg-muted transition-colors hover:text-error-11",
451
458
  children: "Reset"
452
459
  })
@@ -458,6 +465,6 @@ var y = s.forwardRef(({ value: y = "#000000", onChange: b, presets: x, disabled:
458
465
  })
459
466
  });
460
467
  });
461
- y.displayName = "ColorInput";
468
+ b.displayName = "ColorInput";
462
469
  //#endregion
463
- export { y as ColorInput };
470
+ export { b as ColorInput };