@a4ui/core 0.23.0 → 0.24.1

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.
@@ -447,6 +447,9 @@ function He(e) {
447
447
  "aria-label": "Decrement",
448
448
  children: "−"
449
449
  }), h(_.Input, {
450
+ get "aria-label"() {
451
+ return e["aria-label"];
452
+ },
450
453
  class: "w-16 border-y border-input bg-background px-3 py-2 text-center text-sm text-foreground outline-none transition-colors a4-field"
451
454
  }), h(_.IncrementTrigger, {
452
455
  get class() {
package/dist/commerce.js CHANGED
@@ -1,7 +1,7 @@
1
- import { insert as n, createComponent as c, memo as k, effect as b, className as C, template as v, delegateEvents as A, setAttribute as w, setStyleProperty as j } from "solid-js/web";
2
- import { Show as $, For as S, createSignal as B, createMemo as R } from "solid-js";
1
+ import { insert as n, createComponent as c, memo as k, effect as $, className as C, template as v, delegateEvents as A, setAttribute as w, setStyleProperty as j } from "solid-js/web";
2
+ import { Show as b, For as S, createSignal as B, createMemo as R } from "solid-js";
3
3
  import { c as _ } from "./cn-B6yFEsav.js";
4
- import { B as D, C as O, R as G, a as M, b as z, N as U, c as K } from "./NumberInput-enx_0iVh.js";
4
+ import { B as D, C as O, R as G, a as M, b as z, N as U, c as K } from "./NumberInput-DcJlXNKq.js";
5
5
  import { Minus as Q, Plus as V, Trash2 as X, X as Z, CreditCard as H } from "lucide-solid";
6
6
  var J = /* @__PURE__ */ v('<span class="text-muted-foreground line-through">'), W = /* @__PURE__ */ v("<div><span>");
7
7
  const Y = {
@@ -16,7 +16,7 @@ function L(e) {
16
16
  }).format(s), o = () => (e.compareAt ?? 0) > e.amount, r = () => Math.round((1 - e.amount / e.compareAt) * 100);
17
17
  return (() => {
18
18
  var s = W(), d = s.firstChild;
19
- return n(d, () => i(e.amount)), n(s, c($, {
19
+ return n(d, () => i(e.amount)), n(s, c(b, {
20
20
  get when() {
21
21
  return o();
22
22
  },
@@ -31,7 +31,7 @@ function L(e) {
31
31
  }
32
32
  })];
33
33
  }
34
- }), null), b((a) => {
34
+ }), null), $((a) => {
35
35
  var t = _("inline-flex items-center gap-2", e.class), u = _("font-bold text-foreground", Y[e.size ?? "md"]);
36
36
  return t !== a.e && C(s, a.e = t), u !== a.t && C(d, a.t = u), a;
37
37
  }, {
@@ -49,7 +49,7 @@ function ee(e) {
49
49
  class: "h-4 w-4"
50
50
  })), n(u, () => e.value), f.$$click = d, n(f, c(V, {
51
51
  class: "h-4 w-4"
52
- })), b((l) => {
52
+ })), $((l) => {
53
53
  var g = _("inline-flex items-stretch rounded-md border border-input", e.class), h = e.disabled || e.value <= i(), m = e.disabled || e.value >= o();
54
54
  return g !== l.e && C(a, l.e = g), h !== l.t && (t.disabled = l.t = h), m !== l.a && (f.disabled = l.a = m), l;
55
55
  }, {
@@ -87,15 +87,15 @@ function De(e) {
87
87
  get children() {
88
88
  return [(() => {
89
89
  var i = ne(), o = i.firstChild;
90
- return n(i, c($, {
90
+ return n(i, c(b, {
91
91
  get when() {
92
92
  return e.badge;
93
93
  },
94
94
  get children() {
95
95
  var r = te();
96
- return n(r, () => e.badge), b(() => C(r, _("absolute -right-9 top-3.5 w-32 rotate-45 py-1 text-center text-[11px] font-semibold uppercase tracking-wide shadow-md", ie[ue(e.badge, e.badgeTone)]))), r;
96
+ return n(r, () => e.badge), $(() => C(r, _("absolute -right-9 top-3.5 w-32 rotate-45 py-1 text-center text-[11px] font-semibold uppercase tracking-wide shadow-md", ie[ue(e.badge, e.badgeTone)]))), r;
97
97
  }
98
- }), null), b((r) => {
98
+ }), null), $((r) => {
99
99
  var s = e.image, d = e.title;
100
100
  return s !== r.e && w(o, "src", r.e = s), d !== r.t && w(o, "alt", r.t = d), r;
101
101
  }, {
@@ -104,7 +104,7 @@ function De(e) {
104
104
  }), i;
105
105
  })(), (() => {
106
106
  var i = ae(), o = i.firstChild;
107
- return n(i, c($, {
107
+ return n(i, c(b, {
108
108
  get when() {
109
109
  return e.brand;
110
110
  },
@@ -112,7 +112,7 @@ function De(e) {
112
112
  var r = le();
113
113
  return n(r, () => e.brand), r;
114
114
  }
115
- }), o), n(o, () => e.title), n(i, c($, {
115
+ }), o), n(o, () => e.title), n(i, c(b, {
116
116
  get when() {
117
117
  return e.category;
118
118
  },
@@ -120,7 +120,7 @@ function De(e) {
120
120
  var r = re();
121
121
  return n(r, () => e.category), r;
122
122
  }
123
- }), null), n(i, c($, {
123
+ }), null), n(i, c(b, {
124
124
  get when() {
125
125
  return e.rating !== void 0;
126
126
  },
@@ -146,7 +146,7 @@ function De(e) {
146
146
  get locale() {
147
147
  return e.locale;
148
148
  }
149
- }), null), n(i, c($, {
149
+ }), null), n(i, c(b, {
150
150
  get when() {
151
151
  return e.onAddToCart;
152
152
  },
@@ -169,7 +169,7 @@ var ce = /* @__PURE__ */ v("<div>");
169
169
  function Le(e) {
170
170
  return (() => {
171
171
  var i = ce();
172
- return n(i, () => e.children), b(() => C(i, _("grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4", e.class))), i;
172
+ return n(i, () => e.children), $(() => C(i, _("grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4", e.class))), i;
173
173
  })();
174
174
  }
175
175
  var de = /* @__PURE__ */ v('<img class="h-16 w-16 shrink-0 rounded-md bg-muted object-cover">'), oe = /* @__PURE__ */ v('<button type=button aria-label="Remove item"class="text-muted-foreground hover:text-foreground">'), se = /* @__PURE__ */ v('<div><div class="min-w-[8rem] flex-1"><p class="line-clamp-1 font-medium text-foreground"></p></div><span class="min-w-[4rem] text-right font-medium tabular-nums text-foreground">');
@@ -180,13 +180,13 @@ function Oe(e) {
180
180
  }).format(r);
181
181
  return (() => {
182
182
  var r = se(), s = r.firstChild, d = s.firstChild, a = s.nextSibling;
183
- return n(r, c($, {
183
+ return n(r, c(b, {
184
184
  get when() {
185
185
  return e.image;
186
186
  },
187
187
  get children() {
188
188
  var t = de();
189
- return b((u) => {
189
+ return $((u) => {
190
190
  var f = e.image, l = e.title;
191
191
  return f !== u.e && w(t, "src", u.e = f), l !== u.t && w(t, "alt", u.t = l), u;
192
192
  }, {
@@ -214,7 +214,7 @@ function Oe(e) {
214
214
  return (u = e.onQuantityChange) == null ? void 0 : u.call(e, t);
215
215
  },
216
216
  min: 1
217
- }), a), n(a, () => o(i())), n(r, c($, {
217
+ }), a), n(a, () => o(i())), n(r, c(b, {
218
218
  get when() {
219
219
  return e.onRemove;
220
220
  },
@@ -227,7 +227,7 @@ function Oe(e) {
227
227
  class: "h-4 w-4"
228
228
  })), t;
229
229
  }
230
- }), null), b(() => C(r, _("flex flex-wrap items-center gap-4", e.class))), r;
230
+ }), null), $(() => C(r, _("flex flex-wrap items-center gap-4", e.class))), r;
231
231
  })();
232
232
  }
233
233
  A(["click"]);
@@ -247,7 +247,7 @@ function Ge(e) {
247
247
  var u = ge(), f = u.firstChild, l = f.nextSibling;
248
248
  return n(f, () => t.label), n(l, () => i(t.amount)), u;
249
249
  })()
250
- }), r), n(a, () => i(e.total)), n(o, c($, {
250
+ }), r), n(a, () => i(e.total)), n(o, c(b, {
251
251
  get when() {
252
252
  return e.onCheckout;
253
253
  },
@@ -263,7 +263,7 @@ function Ge(e) {
263
263
  }
264
264
  });
265
265
  }
266
- }), null), b(() => C(o, _("card glow-edge rounded-xl p-5 text-card-foreground", e.class))), o;
266
+ }), null), $(() => C(o, _("card glow-edge rounded-xl p-5 text-card-foreground", e.class))), o;
267
267
  })();
268
268
  }
269
269
  var fe = /* @__PURE__ */ v('<div><p class="text-sm font-semibold text-foreground"></p><div class=space-y-1.5>'), ve = /* @__PURE__ */ v('<span class="text-xs text-muted-foreground">'), he = /* @__PURE__ */ v('<div class="flex items-center justify-between gap-2">');
@@ -288,7 +288,7 @@ function q(e) {
288
288
  get label() {
289
289
  return d.label;
290
290
  }
291
- }), null), n(a, c($, {
291
+ }), null), n(a, c(b, {
292
292
  get when() {
293
293
  return d.count != null;
294
294
  },
@@ -298,13 +298,13 @@ function q(e) {
298
298
  }
299
299
  }), null), a;
300
300
  })()
301
- })), b(() => C(o, _("space-y-2", e.class))), o;
301
+ })), $(() => C(o, _("space-y-2", e.class))), o;
302
302
  })();
303
303
  }
304
- var xe = /* @__PURE__ */ v('<div class=space-y-2><p class="text-sm font-semibold text-foreground">'), $e = /* @__PURE__ */ v('<p class="text-sm text-muted-foreground"> results'), be = /* @__PURE__ */ v('<div class="flex flex-wrap gap-2">'), _e = /* @__PURE__ */ v('<div><div class="flex items-center justify-between gap-2">'), Ce = /* @__PURE__ */ v('<span class="inline-flex items-center gap-1 rounded-full border border-border bg-muted px-2 py-0.5 text-xs"><button type=button class="text-muted-foreground hover:text-foreground">'), we = /* @__PURE__ */ v('<div class=space-y-2><div class="flex items-center justify-between"><p class="text-sm font-semibold text-foreground">Price</p><p class="text-xs text-muted-foreground">$<!> – $</p></div><div class="flex items-center gap-2"><span class="text-sm text-muted-foreground">–');
304
+ var xe = /* @__PURE__ */ v('<div class=space-y-2><p class="text-sm font-semibold text-foreground">'), be = /* @__PURE__ */ v('<p class="text-sm text-muted-foreground"> results'), $e = /* @__PURE__ */ v('<div class="flex flex-wrap gap-2">'), _e = /* @__PURE__ */ v('<div><div class="flex items-center justify-between gap-2">'), Ce = /* @__PURE__ */ v('<span class="inline-flex items-center gap-1 rounded-full border border-border bg-muted px-2 py-0.5 text-xs"><button type=button class="text-muted-foreground hover:text-foreground">'), we = /* @__PURE__ */ v('<div class=space-y-2><div class="flex items-center justify-between"><p class="text-sm font-semibold text-foreground">Price</p><p class="text-xs text-muted-foreground">$<!> – $</p></div><div class="flex items-center gap-2"><span class="text-sm text-muted-foreground">–');
305
305
  function ye(e) {
306
306
  const [i, o] = B(e.section.defaultOpen ?? !0);
307
- return c($, {
307
+ return c(b, {
308
308
  get when() {
309
309
  return e.section.collapsible ?? !0;
310
310
  },
@@ -381,15 +381,15 @@ function ze(e) {
381
381
  };
382
382
  return (() => {
383
383
  var d = _e(), a = d.firstChild;
384
- return n(a, c($, {
384
+ return n(a, c(b, {
385
385
  get when() {
386
386
  return e.resultCount != null;
387
387
  },
388
388
  get children() {
389
- var t = $e(), u = t.firstChild;
389
+ var t = be(), u = t.firstChild;
390
390
  return n(t, () => e.resultCount, u), t;
391
391
  }
392
- }), null), n(a, c($, {
392
+ }), null), n(a, c(b, {
393
393
  get when() {
394
394
  return e.onClearAll;
395
395
  },
@@ -404,12 +404,12 @@ function ze(e) {
404
404
  children: "Clear all"
405
405
  });
406
406
  }
407
- }), null), n(d, c($, {
407
+ }), null), n(d, c(b, {
408
408
  get when() {
409
409
  return i().length > 0;
410
410
  },
411
411
  get children() {
412
- var t = be();
412
+ var t = $e();
413
413
  return n(t, c(S, {
414
414
  get each() {
415
415
  return i();
@@ -418,11 +418,11 @@ function ze(e) {
418
418
  var f = Ce(), l = f.firstChild;
419
419
  return n(f, () => u.label, l), l.$$click = () => o(u), n(l, c(Z, {
420
420
  class: "h-3 w-3"
421
- })), b(() => w(l, "aria-label", `Remove ${u.label}`)), f;
421
+ })), $(() => w(l, "aria-label", `Remove ${u.label}`)), f;
422
422
  })()
423
423
  })), t;
424
424
  }
425
- }), null), n(d, c($, {
425
+ }), null), n(d, c(b, {
426
426
  get when() {
427
427
  return e.price;
428
428
  },
@@ -440,7 +440,8 @@ function ze(e) {
440
440
  },
441
441
  get max() {
442
442
  return t().value[1];
443
- }
443
+ },
444
+ "aria-label": "Minimum price"
444
445
  }), y), n(x, c(U, {
445
446
  get value() {
446
447
  return t().value[1];
@@ -451,7 +452,8 @@ function ze(e) {
451
452
  },
452
453
  get max() {
453
454
  return t().max;
454
- }
455
+ },
456
+ "aria-label": "Maximum price"
455
457
  }), null), u;
456
458
  })()
457
459
  }), null), n(d, c(S, {
@@ -465,7 +467,7 @@ function ze(e) {
465
467
  },
466
468
  onChange: (u) => e.onChange(t.key, u)
467
469
  })
468
- }), null), b(() => C(d, _("space-y-5", e.class))), d;
470
+ }), null), $(() => C(d, _("space-y-5", e.class))), d;
469
471
  })();
470
472
  }
471
473
  A(["click"]);
@@ -492,7 +494,7 @@ function Ke(e) {
492
494
  };
493
495
  return (() => {
494
496
  var t = Ae(), u = t.firstChild, f = u.firstChild;
495
- return n(f, () => i(e.amount)), n(u, c($, {
497
+ return n(f, () => i(e.amount)), n(u, c(b, {
496
498
  get when() {
497
499
  return o();
498
500
  },
@@ -507,13 +509,13 @@ function Ke(e) {
507
509
  }
508
510
  })];
509
511
  }
510
- }), null), n(t, c($, {
512
+ }), null), n(t, c(b, {
511
513
  get when() {
512
514
  return e.coupon;
513
515
  },
514
516
  children: (l) => (() => {
515
517
  var g = Pe(), h = g.firstChild, m = h.firstChild;
516
- return n(h, () => l().label ?? "Coupon", m), n(h, () => l().code, null), n(g, c($, {
518
+ return n(h, () => l().label ?? "Coupon", m), n(h, () => l().code, null), n(g, c(b, {
517
519
  get when() {
518
520
  return l().amount !== void 0;
519
521
  },
@@ -523,7 +525,7 @@ function Ke(e) {
523
525
  }
524
526
  }), null), g;
525
527
  })()
526
- }), null), n(t, c($, {
528
+ }), null), n(t, c(b, {
527
529
  get when() {
528
530
  return e.financing;
529
531
  },
@@ -533,14 +535,14 @@ function Ke(e) {
533
535
  class: "h-4 w-4"
534
536
  }), g), n(l, () => i(a()), h), l;
535
537
  }
536
- }), null), n(t, c($, {
538
+ }), null), n(t, c(b, {
537
539
  get when() {
538
540
  return e.note;
539
541
  },
540
542
  get children() {
541
543
  return e.note;
542
544
  }
543
- }), null), b((l) => {
545
+ }), null), $((l) => {
544
546
  var g = _("flex flex-col gap-1", e.class), h = _("font-bold text-foreground", Te[e.size ?? "lg"]);
545
547
  return g !== l.e && C(t, l.e = g), h !== l.t && C(f, l.t = h), l;
546
548
  }, {
@@ -582,7 +584,7 @@ function Qe(e) {
582
584
  return n(u, () => {
583
585
  var m;
584
586
  return (m = d()) == null ? void 0 : m.label;
585
- }), n(t, c($, {
587
+ }), n(t, c(b, {
586
588
  get when() {
587
589
  return e.showValue ?? !0;
588
590
  },
@@ -598,7 +600,7 @@ function Qe(e) {
598
600
  var x = Ne();
599
601
  return n(x, () => m == null ? void 0 : m.label), x;
600
602
  })()
601
- })), b((m) => {
603
+ })), $((m) => {
602
604
  var F;
603
605
  var x = _("flex flex-col gap-2", e.class), y = i(), P = o(), T = e.value, E = ((F = d()) == null ? void 0 : F.label) ?? "Condition", I = `${s()}%`, N = `${s()}%`;
604
606
  return x !== m.e && C(a, m.e = x), y !== m.t && w(f, "aria-valuemin", m.t = y), P !== m.a && w(f, "aria-valuemax", m.a = P), T !== m.o && w(f, "aria-valuenow", m.o = T), E !== m.i && w(f, "aria-label", m.i = E), I !== m.n && j(l, "width", m.n = I), N !== m.s && j(g, "left", m.s = N), m;