@a4ui/core 0.14.1 → 0.16.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # A4ui
2
2
 
3
- [![A4ui](https://a4ui.pages.dev/og.png)](https://a4ui.pages.dev/)
3
+ [![A4ui — glass cards, charts, ring progress and gradient title on the starfield backdrop](https://a4ui.pages.dev/hero.png)](https://a4ui.pages.dev/)
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@a4ui/core.svg)](https://www.npmjs.com/package/@a4ui/core)
6
6
  [![license](https://img.shields.io/npm/l/@a4ui/core.svg)](./LICENSE)
@@ -118,17 +118,17 @@ import { Button, Card } from '@a4ui/core' // just these two
118
118
  Approximate **gzipped** weights (measured on 0.13.0; JS excludes the `solid-js`,
119
119
  `@kobalte/core`, `lucide-solid` and `motion` externals your app already has):
120
120
 
121
- | Part | gzip | Notes |
122
- | ----------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
123
- | **First component** (e.g. `Button` + the `cn` helper) | ~10–11 kB | One-time baseline (includes `tailwind-merge`). Shared by every component. |
124
- | **Typical extra primitive** | ~0.1–0.5 kB | `Button` alone 10.7 kB → `Button + Card + Badge + Input` 11.1 kB. Heavier ones (`DataGrid`, `Calendar`, `Combobox`, `Tour`) cost more via their Kobalte/behavior deps. |
125
- | **Whole barrel** (`@a4ui/core`, all 75+ used) | ~53.0 kB | Only if you literally import everything — the realistic ceiling. |
126
- | `@a4ui/core/commerce` | ~3.0 kB | ProductCard, CartSummary, PriceTag… |
127
- | `@a4ui/core/charts` | ~2.5 kB | Sparkline, BarChart, DonutChart (native SVG). |
128
- | `@a4ui/core/styles.css` | ~5.3 kB | Tokens + motion keyframes (needs the Tailwind preset for utilities). |
129
- | `@a4ui/core/full.css` | ~14.1 kB | Every utility precompiled — for **no-Tailwind** apps. With Tailwind, your own purge ships far less. |
130
- | `@a4ui/core/elements` (Web Components) | ~63.9 kB JS + ~14 kB CSS | Self-contained (Solid + motion compiled in). For React/Vue/vanilla. |
131
- | `motion` (the animation engine) | ~45 kB | **External / opt-in** — pulled in **only** if you import an animated component (`Stat`, `HoldToConfirm`, `Curtain`, `Parallax`, `ScrambleText`, `FillText`, `TextReveal`, `NotificationStack`, `MultiStateBadge`, `Expandable`, `Ripple`, `SpeedDial`, or the `flyToCart`/`animate`/`createCountUp` helpers). CSS-only ones (`LoadingDots`, `NowPlaying`, `Typewriter`) and static UIs never load it. |
121
+ | Part | gzip | Notes |
122
+ | ----------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
123
+ | **First component** (e.g. `Button` + the `cn` helper) | ~10–11 kB | One-time baseline (includes `tailwind-merge`). Shared by every component. |
124
+ | **Typical extra primitive** | ~0.1–0.5 kB | `Button` alone 10.7 kB → `Button + Card + Badge + Input` 11.1 kB. Heavier ones (`DataGrid`, `Calendar`, `Combobox`, `Tour`) cost more via their Kobalte/behavior deps. |
125
+ | **Whole barrel** (`@a4ui/core`, all 75+ used) | ~53.0 kB | Only if you literally import everything — the realistic ceiling. |
126
+ | `@a4ui/core/commerce` | ~3.0 kB | ProductCard, CartSummary, PriceTag… |
127
+ | `@a4ui/core/charts` | ~2.5 kB | Sparkline, BarChart, DonutChart (native SVG). |
128
+ | `@a4ui/core/styles.css` | ~5.3 kB | Tokens + motion keyframes (needs the Tailwind preset for utilities). |
129
+ | `@a4ui/core/full.css` | ~14.1 kB | Every utility precompiled — for **no-Tailwind** apps. With Tailwind, your own purge ships far less. |
130
+ | `@a4ui/core/elements` (Web Components) | ~63.9 kB JS + ~14 kB CSS | Self-contained (Solid + motion compiled in). For React/Vue/vanilla. |
131
+ | `motion` (the animation engine) | ~45 kB | **External / opt-in** — pulled in **only** if you import an animated component (`Stat`, `HoldToConfirm`, `Curtain`, `Parallax`, `ScrambleText`, `FillText`, `TextReveal`, `NotificationStack`, `MultiStateBadge`, `Expandable`, `Magnetic`, `ScrollProgress`, `GradientText`, `SpeedDial`, or the `flyToCart`/`animate`/`createCountUp` helpers). Engine-free ones (`LoadingDots`, `NowPlaying`, `Typewriter`, `Spotlight`, `Ripple`, `TiltCard` — CSS/WAAPI) and static UIs never load it; that's also why `<Button ripple>` and `<Card tilt spotlight>` cost nothing. |
132
132
 
133
133
  **Performance note (Lighthouse / Cloudflare):** because `motion` is external and
134
134
  everything is tree-shaken, a page that uses only static components ships ~10–15 kB
@@ -186,17 +186,17 @@ mode switch — a theme recolors underneath either mode.
186
186
  **[docs site](https://a4ui.pages.dev/)** or `src/index.ts` for the
187
187
  full list):
188
188
 
189
- | Category | Representative components |
190
- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
191
- | Forms | `Input`, `Select`, `Checkbox`, `DateField`, `Combobox`, `TagInput`, `Slider`, `NumberInput` |
192
- | Overlays | `Modal`, `Drawer`, `Popover`, `Tooltip`, `AlertDialog`, `ContextMenu`, `HoverCard` |
193
- | Data & display | `Table`, `DataGrid`, `Tree`, `Calendar`, `Timeline`, `Stat`, `Descriptions`, `CalendarHeatmap` |
194
- | Navigation | `Tabs`, `Breadcrumb`, `Pagination`, `Command`, `Anchor`, `Stepper`, `BottomNavigation` |
195
- | Feedback | `Alert`, `Toast`, `Progress`, `Skeleton`, `Empty`, `Result`, `NotificationCenter` |
196
- | Layout | `AppShell`, `SpaceBackground`, `ThemedScenery`, `Card`, `Splitter`, `Affix`, `NavGroup` |
197
- | Commerce | `ProductCard`, `ProductGrid`, `PriceTag`, `QuantityStepper`, `CartLine`, `CartSummary`, `FilterGroup` |
198
- | Charts | `Sparkline`, `BarChart`, `DonutChart` (native SVG, theme-tinted) |
199
- | Motion | `ScrambleText`, `TextReveal`, `Typewriter`, `HoldToConfirm`, `LoadingDots`, `FillText`, `Curtain`, `Parallax`, `Ripple`, `NotificationStack`, `MultiStateBadge`, `NowPlaying`, `Expandable`, `flyToCart` |
189
+ | Category | Representative components |
190
+ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
191
+ | Forms | `Input`, `Select`, `Checkbox`, `DateField`, `Combobox`, `TagInput`, `Slider`, `NumberInput` |
192
+ | Overlays | `Modal`, `Drawer`, `Popover`, `Tooltip`, `AlertDialog`, `ContextMenu`, `HoverCard` |
193
+ | Data & display | `Table`, `DataGrid`, `Tree`, `Calendar`, `Timeline`, `Stat`, `Descriptions`, `CalendarHeatmap` |
194
+ | Navigation | `Tabs`, `Breadcrumb`, `Pagination`, `Command`, `Anchor`, `Stepper`, `BottomNavigation` |
195
+ | Feedback | `Alert`, `Toast`, `Progress`, `Skeleton`, `Empty`, `Result`, `NotificationCenter` |
196
+ | Layout | `AppShell`, `SpaceBackground`, `ThemedScenery`, `Card`, `Splitter`, `Affix`, `NavGroup` |
197
+ | Commerce | `ProductCard`, `ProductGrid`, `PriceTag`, `QuantityStepper`, `CartLine`, `CartSummary`, `FilterGroup` |
198
+ | Charts | `Sparkline`, `BarChart`, `DonutChart` (native SVG, theme-tinted) |
199
+ | Motion | `ScrambleText`, `TextReveal`, `Typewriter`, `GradientText`, `HoldToConfirm`, `LoadingDots`, `FillText`, `Curtain`, `Parallax`, `ScrollProgress`, `Ripple`, `Magnetic`, `TiltCard`, `Spotlight`, `NotificationStack`, `MultiStateBadge`, `NowPlaying`, `Expandable`, `flyToCart` |
200
200
 
201
201
  Domain-specific sets ship as **subpath entries** so the base package stays lean —
202
202
  e.g. commerce and chart components import from their own paths:
@@ -0,0 +1,400 @@
1
+ import { spread as p, mergeProps as y, insert as f, template as g, effect as h, className as v, use as w, delegateEvents as k, createComponent as $, setAttribute as C } from "solid-js/web";
2
+ import { splitProps as b, createSignal as _, createEffect as H, untrack as P, onCleanup as E, onMount as S, Show as K, For as T } from "solid-js";
3
+ import { c as m } from "./cn-B6yFEsav.js";
4
+ import { animate as L, inView as Q } from "motion";
5
+ import { Star as B } from "lucide-solid";
6
+ var q = /* @__PURE__ */ g("<span>");
7
+ const J = {
8
+ neutral: "bg-muted text-muted-foreground ring-border",
9
+ success: "bg-emerald-500/15 text-emerald-600 ring-emerald-500/30",
10
+ warning: "bg-amber-500/15 text-amber-600 ring-amber-500/30",
11
+ danger: "bg-rose-500/15 text-rose-600 ring-rose-500/30",
12
+ info: "bg-sky-500/15 text-sky-600 ring-sky-500/30"
13
+ }, W = "badge inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-semibold ring-1 ring-inset whitespace-nowrap";
14
+ function $e(t) {
15
+ const [e, r] = b(t, ["tone", "class", "children"]);
16
+ return (() => {
17
+ var n = q();
18
+ return p(n, y({
19
+ get class() {
20
+ return m(W, J[e.tone ?? "neutral"], e.class);
21
+ }
22
+ }, r), !1, !0), f(n, () => e.children), n;
23
+ })();
24
+ }
25
+ const F = "a4ui-effects";
26
+ function I() {
27
+ try {
28
+ return window.localStorage;
29
+ } catch {
30
+ return null;
31
+ }
32
+ }
33
+ function Z() {
34
+ var e;
35
+ try {
36
+ if (new URLSearchParams(window.location.search).get("calm") === "1") return !1;
37
+ } catch {
38
+ }
39
+ const t = (e = I()) == null ? void 0 : e.getItem(F);
40
+ return t === null ? !0 : t === "1";
41
+ }
42
+ function Y(t) {
43
+ typeof document > "u" || document.documentElement.classList.toggle("calm", !t);
44
+ }
45
+ const N = Z();
46
+ Y(N);
47
+ const [U, ee] = _(N);
48
+ function we() {
49
+ return U;
50
+ }
51
+ function te() {
52
+ return !U();
53
+ }
54
+ function _e(t) {
55
+ var e;
56
+ (e = I()) == null || e.setItem(F, t ? "1" : "0"), Y(t), ee(t);
57
+ }
58
+ const ne = "(prefers-reduced-motion: reduce)";
59
+ function re() {
60
+ return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(ne).matches;
61
+ }
62
+ const z = "a4ui-motion-forced";
63
+ function X() {
64
+ try {
65
+ return window.localStorage;
66
+ } catch {
67
+ return null;
68
+ }
69
+ }
70
+ var D;
71
+ const [R, oe] = _(((D = X()) == null ? void 0 : D.getItem(z)) === "1");
72
+ typeof document < "u" && document.documentElement.classList.toggle("force-motion", P(R));
73
+ function Ee() {
74
+ return R;
75
+ }
76
+ function Ce(t) {
77
+ var e;
78
+ (e = X()) == null || e.setItem(z, t ? "1" : "0"), typeof document < "u" && document.documentElement.classList.toggle("force-motion", t), oe(t);
79
+ }
80
+ function x() {
81
+ return te() || re() && !R();
82
+ }
83
+ function ke(t, e = 600) {
84
+ const [r, n] = _(0);
85
+ let o;
86
+ return H(() => {
87
+ const a = t();
88
+ if (o == null || o.stop(), x()) {
89
+ n(a);
90
+ return;
91
+ }
92
+ const s = P(r);
93
+ s !== a && (o = L(s, a, {
94
+ duration: e / 1e3,
95
+ ease: "easeOut",
96
+ onUpdate: (u) => n(u)
97
+ }));
98
+ }), E(() => o == null ? void 0 : o.stop()), r;
99
+ }
100
+ function Se(t, e = {}) {
101
+ x() || L(
102
+ t,
103
+ { opacity: [0, 1], y: [e.y ?? 8, 0] },
104
+ { duration: e.duration ?? 0.32, delay: e.delay ?? 0, ease: "easeOut" }
105
+ );
106
+ }
107
+ function Le(t, e = {}) {
108
+ if (x()) return () => {
109
+ };
110
+ t.style.opacity = "0";
111
+ let r = !1;
112
+ return Q(
113
+ t,
114
+ () => {
115
+ r || (r = !0, L(
116
+ t,
117
+ { opacity: [0, 1], y: [e.y ?? 16, 0] },
118
+ { duration: e.duration ?? 0.5, ease: "easeOut" }
119
+ ));
120
+ },
121
+ { amount: e.amount ?? 0.2 }
122
+ );
123
+ }
124
+ var ae = /* @__PURE__ */ g("<span>");
125
+ function j(t, e, r = {}) {
126
+ if (x()) return;
127
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, a = e.clientY - n.top, s = 2 * Math.max(Math.hypot(o, a), Math.hypot(n.width - o, a), Math.hypot(o, n.height - a), Math.hypot(n.width - o, n.height - a)), u = document.createElement("span");
128
+ u.setAttribute("aria-hidden", "true"), Object.assign(u.style, {
129
+ position: "absolute",
130
+ left: `${o}px`,
131
+ top: `${a}px`,
132
+ width: `${s}px`,
133
+ height: `${s}px`,
134
+ borderRadius: "9999px",
135
+ background: r.color ?? "currentColor",
136
+ pointerEvents: "none",
137
+ transform: "translate(-50%,-50%) scale(0)"
138
+ }), t.appendChild(u);
139
+ const l = u.animate([{
140
+ transform: "translate(-50%,-50%) scale(0)",
141
+ opacity: String(r.opacity ?? 0.3)
142
+ }, {
143
+ transform: "translate(-50%,-50%) scale(1)",
144
+ opacity: "0"
145
+ }], {
146
+ duration: 600,
147
+ easing: "ease-out"
148
+ }), i = () => u.remove();
149
+ l.finished.then(i).catch(i);
150
+ }
151
+ function Re(t) {
152
+ let e;
153
+ const r = (n) => {
154
+ e && j(e, n, {
155
+ color: t.color,
156
+ opacity: t.opacity
157
+ });
158
+ };
159
+ return (() => {
160
+ var n = ae();
161
+ n.$$pointerdown = r;
162
+ var o = e;
163
+ return typeof o == "function" ? w(o, n) : e = n, f(n, () => t.children), h(() => v(n, m("relative inline-block overflow-hidden", t.class))), n;
164
+ })();
165
+ }
166
+ k(["pointerdown"]);
167
+ var ie = /* @__PURE__ */ g("<button>");
168
+ const se = {
169
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90",
170
+ secondary: "bg-muted text-foreground hover:bg-muted/70",
171
+ outline: "border border-border bg-transparent text-foreground hover:bg-muted",
172
+ ghost: "bg-transparent text-foreground hover:bg-muted"
173
+ }, le = "inline-flex items-center justify-center rounded-md px-3 py-2 text-sm font-medium transition-[color,background-color,transform] duration-150 active:scale-[0.97] focus:outline-none focus:ring-2 focus:ring-ring disabled:pointer-events-none disabled:opacity-50";
174
+ function Me(t) {
175
+ const [e, r] = b(t, ["variant", "class", "type", "children", "ripple", "onPointerDown"]), n = (o) => {
176
+ e.ripple && j(o.currentTarget, o, {
177
+ opacity: 0.35
178
+ });
179
+ const a = e.onPointerDown;
180
+ typeof a == "function" ? a(o) : a && a[0](a[1], o);
181
+ };
182
+ return (() => {
183
+ var o = ie();
184
+ return o.$$pointerdown = n, p(o, y({
185
+ get type() {
186
+ return e.type ?? "button";
187
+ },
188
+ get class() {
189
+ return m(le, se[e.variant ?? "primary"], e.ripple && "relative overflow-hidden", e.class);
190
+ }
191
+ }, r), !1, !0), f(o, () => e.children), o;
192
+ })();
193
+ }
194
+ k(["pointerdown"]);
195
+ var ce = /* @__PURE__ */ g("<div>");
196
+ function G(t, e = {}) {
197
+ if (x()) return () => {
198
+ };
199
+ const r = document.createElement("span");
200
+ r.setAttribute("aria-hidden", "true"), r.className = "pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300", t.appendChild(r);
201
+ const n = e.size ?? 180, o = e.color ?? "hsl(var(--primary))", a = (i, c) => {
202
+ r.style.background = `radial-gradient(${n}px circle at ${i}px ${c}px, color-mix(in srgb, ${o} 30%, transparent), transparent 70%)`;
203
+ }, s = (i) => {
204
+ const c = t.getBoundingClientRect();
205
+ a(i.clientX - c.left, i.clientY - c.top);
206
+ }, u = () => {
207
+ r.style.opacity = "1";
208
+ }, l = () => {
209
+ r.style.opacity = "0";
210
+ };
211
+ return t.addEventListener("pointermove", s), t.addEventListener("pointerenter", u), t.addEventListener("pointerleave", l), () => {
212
+ t.removeEventListener("pointermove", s), t.removeEventListener("pointerenter", u), t.removeEventListener("pointerleave", l), r.remove();
213
+ };
214
+ }
215
+ function Ae(t) {
216
+ let e;
217
+ return S(() => {
218
+ const r = G(e, {
219
+ color: t.color,
220
+ size: t.size
221
+ });
222
+ E(r);
223
+ }), (() => {
224
+ var r = ce(), n = e;
225
+ return typeof n == "function" ? w(n, r) : e = r, f(r, () => t.children), h(() => v(r, m("relative overflow-hidden", t.class))), r;
226
+ })();
227
+ }
228
+ var ue = /* @__PURE__ */ g("<div style=perspective:800px><div style=transform-style:preserve-3d>");
229
+ function V(t, e, r = {}) {
230
+ if (x()) return () => {
231
+ };
232
+ e.style.willChange = "transform";
233
+ const n = (a) => {
234
+ const s = t.getBoundingClientRect(), u = (a.clientX - s.left) / s.width - 0.5, l = (a.clientY - s.top) / s.height - 0.5, i = r.max ?? 10;
235
+ e.style.transition = "transform 0.15s ease-out", e.style.transform = `perspective(800px) rotateX(${(l * -2 * i).toFixed(2)}deg) rotateY(${(u * 2 * i).toFixed(2)}deg) scale(1.02)`;
236
+ }, o = () => {
237
+ e.style.transition = "transform 0.4s ease", e.style.transform = "perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)";
238
+ };
239
+ return t.addEventListener("pointermove", n), t.addEventListener("pointerleave", o), () => {
240
+ t.removeEventListener("pointermove", n), t.removeEventListener("pointerleave", o), e.style.transform = "", e.style.transition = "", e.style.willChange = "";
241
+ };
242
+ }
243
+ function Oe(t) {
244
+ let e, r;
245
+ return S(() => {
246
+ const n = V(e, r, {
247
+ max: t.max
248
+ });
249
+ E(n);
250
+ }), (() => {
251
+ var n = ue(), o = n.firstChild, a = e;
252
+ typeof a == "function" ? w(a, n) : e = n;
253
+ var s = r;
254
+ return typeof s == "function" ? w(s, o) : r = o, f(o, () => t.children), h(() => v(n, m("inline-block", t.class))), n;
255
+ })();
256
+ }
257
+ var M = /* @__PURE__ */ g("<div>"), de = /* @__PURE__ */ g("<h2>");
258
+ function Te(t) {
259
+ const [e, r] = b(t, ["class", "children", "glass", "glow", "tilt", "spotlight"]), n = () => (e.glow ?? e.glass) === !0;
260
+ let o;
261
+ return S(() => {
262
+ const a = [e.tilt && o ? V(o, o) : null, e.spotlight && o ? G(o) : null].filter((s) => s !== null);
263
+ E(() => a.forEach((s) => s()));
264
+ }), (() => {
265
+ var a = M(), s = o;
266
+ return typeof s == "function" ? w(s, a) : o = a, p(a, y({
267
+ get class() {
268
+ return m(e.glass ? "card rounded-xl text-card-foreground" : "rounded-xl border border-border bg-card text-card-foreground shadow-sm", n() && "glow-edge", e.spotlight && "relative overflow-hidden", e.tilt && "will-change-transform", e.class);
269
+ }
270
+ }, r), !1, !0), f(a, () => e.children), a;
271
+ })();
272
+ }
273
+ function Be(t) {
274
+ const [e, r] = b(t, ["class", "children"]);
275
+ return (() => {
276
+ var n = M();
277
+ return p(n, y({
278
+ get class() {
279
+ return m("flex flex-col space-y-1.5 p-6", e.class);
280
+ }
281
+ }, r), !1, !0), f(n, () => e.children), n;
282
+ })();
283
+ }
284
+ function De(t) {
285
+ const [e, r] = b(t, ["class", "children"]);
286
+ return (() => {
287
+ var n = de();
288
+ return p(n, y({
289
+ get class() {
290
+ return m("text-lg font-semibold leading-none tracking-tight", e.class);
291
+ }
292
+ }, r), !1, !0), f(n, () => e.children), n;
293
+ })();
294
+ }
295
+ function Pe(t) {
296
+ const [e, r] = b(t, ["class", "children"]);
297
+ return (() => {
298
+ var n = M();
299
+ return p(n, y({
300
+ get class() {
301
+ return m("p-6 pt-0", e.class);
302
+ }
303
+ }, r), !1, !0), f(n, () => e.children), n;
304
+ })();
305
+ }
306
+ var fe = /* @__PURE__ */ g("<div role=radiogroup>"), me = /* @__PURE__ */ g("<div role=img>"), ge = /* @__PURE__ */ g('<button type=button role=radio class="rounded outline-none focus-visible:ring-2 focus-visible:ring-ring/40">');
307
+ function Fe(t) {
308
+ const [e, r] = _(0), n = () => t.max ?? 5, o = () => Array.from({
309
+ length: n()
310
+ }, (l, i) => i + 1), a = () => e() > 0 ? e() : t.value, s = (l) => {
311
+ var i;
312
+ t.readonly || (i = t.onChange) == null || i.call(t, l);
313
+ }, u = (l) => m("h-5 w-5 transition-colors", l <= a() ? "fill-primary text-primary" : "fill-transparent text-muted-foreground");
314
+ return $(K, {
315
+ get when() {
316
+ return !t.readonly;
317
+ },
318
+ get fallback() {
319
+ return (() => {
320
+ var l = me();
321
+ return f(l, $(T, {
322
+ get each() {
323
+ return o();
324
+ },
325
+ children: (i) => $(B, {
326
+ get class() {
327
+ return u(i);
328
+ },
329
+ "aria-hidden": "true"
330
+ })
331
+ })), h((i) => {
332
+ var c = m("inline-flex items-center gap-1", t.class), d = `Rating ${t.value} of ${n()}`;
333
+ return c !== i.e && v(l, i.e = c), d !== i.t && C(l, "aria-label", i.t = d), i;
334
+ }, {
335
+ e: void 0,
336
+ t: void 0
337
+ }), l;
338
+ })();
339
+ },
340
+ get children() {
341
+ var l = fe();
342
+ return l.addEventListener("mouseleave", () => r(0)), f(l, $(T, {
343
+ get each() {
344
+ return o();
345
+ },
346
+ children: (i) => (() => {
347
+ var c = ge();
348
+ return c.$$keydown = (d) => {
349
+ d.key === "ArrowRight" || d.key === "ArrowUp" ? (d.preventDefault(), s(Math.min(t.value + 1, n()))) : (d.key === "ArrowLeft" || d.key === "ArrowDown") && (d.preventDefault(), s(Math.max(t.value - 1, 0)));
350
+ }, c.$$click = () => s(i), c.addEventListener("blur", () => r(0)), c.addEventListener("focus", () => r(i)), c.addEventListener("mouseenter", () => r(i)), f(c, $(B, {
351
+ get class() {
352
+ return u(i);
353
+ },
354
+ "aria-hidden": "true"
355
+ })), h((d) => {
356
+ var A = t.value === i, O = `Rate ${i} of ${n()}`;
357
+ return A !== d.e && C(c, "aria-checked", d.e = A), O !== d.t && C(c, "aria-label", d.t = O), d;
358
+ }, {
359
+ e: void 0,
360
+ t: void 0
361
+ }), c;
362
+ })()
363
+ })), h(() => v(l, m("inline-flex items-center gap-1", t.class))), l;
364
+ }
365
+ });
366
+ }
367
+ k(["click", "keydown"]);
368
+ var he = /* @__PURE__ */ g('<label><input type=checkbox class="h-4 w-4 rounded border-input accent-primary">');
369
+ function Ie(t) {
370
+ return (() => {
371
+ var e = he(), r = e.firstChild;
372
+ return r.addEventListener("change", (n) => t.onChange(n.currentTarget.checked)), f(e, () => t.label, null), h(() => v(e, m("inline-flex items-center gap-2 text-sm text-foreground", t.class))), h(() => r.checked = t.checked), e;
373
+ })();
374
+ }
375
+ export {
376
+ $e as B,
377
+ Te as C,
378
+ Fe as R,
379
+ Ae as S,
380
+ Oe as T,
381
+ Me as a,
382
+ Ie as b,
383
+ ke as c,
384
+ Pe as d,
385
+ Se as e,
386
+ Be as f,
387
+ De as g,
388
+ Re as h,
389
+ G as i,
390
+ V as j,
391
+ te as k,
392
+ Ce as l,
393
+ x as m,
394
+ j as n,
395
+ Ee as o,
396
+ re as p,
397
+ Le as r,
398
+ _e as s,
399
+ we as u
400
+ };
package/dist/commerce.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { insert as n, createComponent as c, memo as A, effect as v, className as b, template as o, delegateEvents as y, setAttribute as x } from "solid-js/web";
2
2
  import { Show as g, For as C } from "solid-js";
3
3
  import { c as h } from "./cn-B6yFEsav.js";
4
- import { B as T, C as N, R as E, a as S, b as I } from "./Checkbox-DQcDOBLd.js";
4
+ import { B as T, C as N, R as E, a as S, b as I } from "./Checkbox-B5Gb3h5J.js";
5
5
  import { Minus as R, Plus as F, Trash2 as U } from "lucide-solid";
6
6
  var j = /* @__PURE__ */ o('<span class="text-muted-foreground line-through">'), q = /* @__PURE__ */ o("<div><span>");
7
7
  const B = {
package/dist/elements.css CHANGED
@@ -2379,6 +2379,9 @@ html.calm .tile-glass {
2379
2379
  .p-6 {
2380
2380
  padding: 1.5rem;
2381
2381
  }
2382
+ .p-8 {
2383
+ padding: 2rem;
2384
+ }
2382
2385
  .px-0\.5 {
2383
2386
  padding-left: 0.125rem;
2384
2387
  padding-right: 0.125rem;
@@ -2692,6 +2695,9 @@ html.calm .tile-glass {
2692
2695
  .accent-primary {
2693
2696
  accent-color: hsl(var(--primary) / 1);
2694
2697
  }
2698
+ .opacity-0 {
2699
+ opacity: 0;
2700
+ }
2695
2701
  .opacity-25 {
2696
2702
  opacity: 0.25;
2697
2703
  }