@a4ui/core 0.38.1 → 0.39.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 +66 -9
- package/dist/{Collapse-Cr5cDqAl.js → Collapse-CrKiFD8K.js} +173 -124
- package/dist/charts/Sparkline.d.ts +2 -0
- package/dist/charts.js +8 -5
- package/dist/commerce.js +59 -59
- package/dist/elements.css +248 -151
- package/dist/elements.iife.js +1 -1
- package/dist/elements.js +1025 -1015
- package/dist/full.css +248 -151
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4723 -4656
- package/dist/lib/anchored.d.ts +7 -0
- package/dist/lib/direction.d.ts +18 -0
- package/dist/styles.css +27 -11
- package/dist/theme.css +1559 -0
- package/dist/ui/DirectionProvider.d.ts +47 -0
- package/dist/ui/Drawer.d.ts +6 -2
- package/dist/ui/Sidebar.d.ts +8 -2
- package/dist/ui/Toast.d.ts +5 -1
- package/package.json +5 -3
- package/preset.d.ts +2 -1
- package/preset.js +16 -5
- package/src/charts/BarList.tsx +1 -1
- package/src/charts/Sparkline.tsx +5 -1
- package/src/commerce/CartLine.tsx +1 -1
- package/src/commerce/FacetSidebar.tsx +1 -1
- package/src/commerce/ProductCard.tsx +1 -1
- package/src/index.ts +7 -1
- package/src/layout/NavGroup.tsx +2 -2
- package/src/lib/anchored.ts +13 -0
- package/src/lib/direction.ts +35 -0
- package/src/ui/Accordion.tsx +2 -2
- package/src/ui/ActivityFeed.tsx +2 -2
- package/src/ui/AlertDialog.tsx +2 -1
- package/src/ui/Anchor.tsx +1 -1
- package/src/ui/AnnouncementBar.tsx +3 -3
- package/src/ui/ArtifactPanel.tsx +1 -1
- package/src/ui/AvailabilityPicker.tsx +2 -2
- package/src/ui/AvatarGroup.tsx +2 -2
- package/src/ui/BackToTop.tsx +1 -1
- package/src/ui/Badge.tsx +1 -1
- package/src/ui/BlockEditor.tsx +1 -1
- package/src/ui/ButtonGroup.tsx +1 -1
- package/src/ui/Callout.tsx +1 -1
- package/src/ui/Carousel.tsx +17 -9
- package/src/ui/Cascader.tsx +2 -2
- package/src/ui/CategoryStrip.tsx +4 -1
- package/src/ui/CodeEditor.tsx +5 -5
- package/src/ui/CodeTabs.tsx +1 -1
- package/src/ui/Combobox.tsx +2 -1
- package/src/ui/Command.tsx +3 -2
- package/src/ui/Comment.tsx +1 -1
- package/src/ui/Configurator.tsx +2 -2
- package/src/ui/ContextMenu.tsx +2 -1
- package/src/ui/DateField.tsx +4 -4
- package/src/ui/DateRangePicker.tsx +4 -4
- package/src/ui/DiffViewer.tsx +4 -3
- package/src/ui/DirectionProvider.tsx +82 -0
- package/src/ui/Drawer.tsx +23 -5
- package/src/ui/Dropdown.tsx +2 -1
- package/src/ui/EmojiPicker.tsx +5 -2
- package/src/ui/Expandable.tsx +2 -2
- package/src/ui/Faq.tsx +1 -1
- package/src/ui/Field.tsx +1 -1
- package/src/ui/FloatingActionButton.tsx +2 -2
- package/src/ui/FollowingPointer.tsx +2 -2
- package/src/ui/Hero.tsx +2 -2
- package/src/ui/HoldToConfirm.tsx +2 -2
- package/src/ui/HoverCard.tsx +2 -1
- package/src/ui/Image.tsx +3 -2
- package/src/ui/InlineSelect.tsx +1 -1
- package/src/ui/InputGroup.tsx +2 -2
- package/src/ui/Item.tsx +1 -1
- package/src/ui/JsonViewer.tsx +2 -2
- package/src/ui/Kanban.tsx +1 -1
- package/src/ui/KpiBlock.tsx +1 -1
- package/src/ui/Lightbox.tsx +9 -6
- package/src/ui/MasterDetail.tsx +1 -1
- package/src/ui/Mentions.tsx +1 -1
- package/src/ui/Menubar.tsx +9 -8
- package/src/ui/Modal.tsx +3 -2
- package/src/ui/ModelPicker.tsx +2 -1
- package/src/ui/MultiSelect.tsx +5 -5
- package/src/ui/NativeSelect.tsx +2 -2
- package/src/ui/NavigationMenu.tsx +5 -4
- package/src/ui/NotificationCenter.tsx +1 -1
- package/src/ui/NotificationStack.tsx +1 -1
- package/src/ui/NumberInput.tsx +2 -2
- package/src/ui/OnboardingChecklist.tsx +2 -2
- package/src/ui/Pagination.tsx +2 -2
- package/src/ui/PillSearch.tsx +3 -3
- package/src/ui/PivotTable.tsx +0 -0
- package/src/ui/Popover.tsx +2 -1
- package/src/ui/Portal.tsx +3 -1
- package/src/ui/PresenceAvatars.tsx +4 -4
- package/src/ui/PricingTable.tsx +1 -1
- package/src/ui/Prose.tsx +3 -3
- package/src/ui/QueryBuilder.tsx +4 -4
- package/src/ui/Rating.tsx +6 -2
- package/src/ui/ReasoningTrace.tsx +1 -1
- package/src/ui/ScrollArea.tsx +1 -1
- package/src/ui/ScrollProgress.tsx +2 -2
- package/src/ui/SideRail.tsx +3 -3
- package/src/ui/Sidebar.tsx +43 -23
- package/src/ui/SlashMenu.tsx +1 -1
- package/src/ui/Snippet.tsx +6 -3
- package/src/ui/Sortable.tsx +1 -1
- package/src/ui/SpecSheet.tsx +1 -1
- package/src/ui/SpeedDial.tsx +1 -1
- package/src/ui/Splitter.tsx +8 -3
- package/src/ui/SpreadsheetGrid.tsx +4 -4
- package/src/ui/Stepper.tsx +1 -1
- package/src/ui/SuggestionChips.tsx +1 -1
- package/src/ui/Switch.tsx +1 -1
- package/src/ui/Table.tsx +5 -2
- package/src/ui/TimeField.tsx +8 -8
- package/src/ui/Timeline.tsx +2 -2
- package/src/ui/Toast.tsx +9 -3
- package/src/ui/ToolCallTimeline.tsx +2 -2
- package/src/ui/Tooltip.tsx +2 -1
- package/src/ui/Tour.tsx +1 -1
- package/src/ui/TransactionFeed.tsx +1 -1
- package/src/ui/Transfer.tsx +2 -2
- package/src/ui/Tree.tsx +2 -2
- package/src/ui/TreeSelect.tsx +2 -2
- package/src/ui/TreeTable.tsx +4 -4
- package/src/ui/UsageMeter.tsx +1 -1
- package/src/ui/VideoPlayerShell.tsx +2 -2
- package/src/ui/internal/CalendarCore.tsx +6 -6
package/dist/commerce.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as e } from "./motion-CTIBwMCA.js";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as t, b as n, c as r, l as i, n as a, r as o, t as s } from "./Collapse-CrKiFD8K.js";
|
|
3
3
|
import { For as c, Show as l, createMemo as u, createSignal as d } from "solid-js";
|
|
4
4
|
import { className as f, createComponent as p, delegateEvents as m, effect as h, insert as g, memo as _, setAttribute as v, setStyleProperty as y, template as b } from "solid-js/web";
|
|
5
5
|
import { CreditCard as x, Minus as S, Plus as C, Trash2 as w, X as ee } from "lucide-solid";
|
|
@@ -73,7 +73,7 @@ function L(e, t) {
|
|
|
73
73
|
return /sale|off|%|deal/.test(n) ? "sale" : /new/.test(n) ? "new" : "featured";
|
|
74
74
|
}
|
|
75
75
|
function R(n) {
|
|
76
|
-
return p(
|
|
76
|
+
return p(i, {
|
|
77
77
|
glass: !0,
|
|
78
78
|
glow: !0,
|
|
79
79
|
get tilt() {
|
|
@@ -94,7 +94,7 @@ function R(n) {
|
|
|
94
94
|
},
|
|
95
95
|
get children() {
|
|
96
96
|
var t = j();
|
|
97
|
-
return g(t, () => n.badge), h(() => f(t, e("absolute -
|
|
97
|
+
return g(t, () => n.badge), h(() => f(t, e("absolute -end-9 top-3.5 w-32 rotate-45 py-1 text-center text-[11px] font-semibold uppercase tracking-wide shadow-md", I[L(n.badge, n.badgeTone)]))), t;
|
|
98
98
|
}
|
|
99
99
|
}), null), h((e) => {
|
|
100
100
|
var t = n.image, i = n.title;
|
|
@@ -104,7 +104,7 @@ function R(n) {
|
|
|
104
104
|
t: void 0
|
|
105
105
|
}), t;
|
|
106
106
|
})(), (() => {
|
|
107
|
-
var e = F(),
|
|
107
|
+
var e = F(), r = e.firstChild;
|
|
108
108
|
return g(e, p(l, {
|
|
109
109
|
get when() {
|
|
110
110
|
return n.brand;
|
|
@@ -113,7 +113,7 @@ function R(n) {
|
|
|
113
113
|
var e = N();
|
|
114
114
|
return g(e, () => n.brand), e;
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), r), g(r, () => n.title), g(e, p(l, {
|
|
117
117
|
get when() {
|
|
118
118
|
return n.category;
|
|
119
119
|
},
|
|
@@ -126,7 +126,7 @@ function R(n) {
|
|
|
126
126
|
return n.rating !== void 0;
|
|
127
127
|
},
|
|
128
128
|
get children() {
|
|
129
|
-
return p(
|
|
129
|
+
return p(a, {
|
|
130
130
|
get value() {
|
|
131
131
|
return n.rating;
|
|
132
132
|
},
|
|
@@ -152,7 +152,7 @@ function R(n) {
|
|
|
152
152
|
return n.onAddToCart;
|
|
153
153
|
},
|
|
154
154
|
get children() {
|
|
155
|
-
return p(
|
|
155
|
+
return p(t, {
|
|
156
156
|
class: "mt-auto w-full",
|
|
157
157
|
onClick: (e) => {
|
|
158
158
|
e.stopPropagation(), n.onAddToCart?.();
|
|
@@ -174,7 +174,7 @@ function B(t) {
|
|
|
174
174
|
})();
|
|
175
175
|
}
|
|
176
176
|
// src/commerce/CartLine.tsx
|
|
177
|
-
var V = /*#__PURE__*/ b("<img class=\"h-16 w-16 shrink-0 rounded-md bg-muted object-cover\">"), H = /*#__PURE__*/ b("<button type=button aria-label=\"Remove item\"class=\"text-muted-foreground hover:text-foreground\">"), U = /*#__PURE__*/ b("<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-
|
|
177
|
+
var V = /*#__PURE__*/ b("<img class=\"h-16 w-16 shrink-0 rounded-md bg-muted object-cover\">"), H = /*#__PURE__*/ b("<button type=button aria-label=\"Remove item\"class=\"text-muted-foreground hover:text-foreground\">"), U = /*#__PURE__*/ b("<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-end font-medium tabular-nums text-foreground\">");
|
|
178
178
|
function W(t) {
|
|
179
179
|
let n = () => t.price * t.quantity, r = (e) => new Intl.NumberFormat(t.locale ?? "en-US", {
|
|
180
180
|
style: "currency",
|
|
@@ -227,35 +227,35 @@ function W(t) {
|
|
|
227
227
|
m(["click"]);
|
|
228
228
|
// src/commerce/CartSummary.tsx
|
|
229
229
|
var G = /*#__PURE__*/ b("<div><div class=\"my-3 border-t border-border\"></div><div class=\"flex items-center justify-between text-base font-bold text-foreground\"><span>Total</span><span class=tabular-nums>"), K = /*#__PURE__*/ b("<div class=\"flex items-center justify-between py-1 text-sm\"><span class=text-muted-foreground></span><span class=\"tabular-nums text-foreground\">");
|
|
230
|
-
function q(
|
|
231
|
-
let
|
|
230
|
+
function q(n) {
|
|
231
|
+
let r = (e) => new Intl.NumberFormat(n.locale ?? "en-US", {
|
|
232
232
|
style: "currency",
|
|
233
|
-
currency:
|
|
233
|
+
currency: n.currency ?? "USD"
|
|
234
234
|
}).format(e);
|
|
235
235
|
return (() => {
|
|
236
|
-
var
|
|
237
|
-
return g(
|
|
236
|
+
var i = G(), a = i.firstChild, o = a.nextSibling.firstChild.nextSibling;
|
|
237
|
+
return g(i, p(c, {
|
|
238
238
|
get each() {
|
|
239
|
-
return
|
|
239
|
+
return n.lines;
|
|
240
240
|
},
|
|
241
241
|
children: (e) => (() => {
|
|
242
|
-
var t = K(),
|
|
243
|
-
return g(
|
|
242
|
+
var t = K(), n = t.firstChild, i = n.nextSibling;
|
|
243
|
+
return g(n, () => e.label), g(i, () => r(e.amount)), t;
|
|
244
244
|
})()
|
|
245
|
-
}),
|
|
245
|
+
}), a), g(o, () => r(n.total)), g(i, p(l, {
|
|
246
246
|
get when() {
|
|
247
|
-
return
|
|
247
|
+
return n.onCheckout;
|
|
248
248
|
},
|
|
249
249
|
get children() {
|
|
250
|
-
return p(
|
|
250
|
+
return p(t, {
|
|
251
251
|
class: "mt-4 w-full",
|
|
252
|
-
onClick: () =>
|
|
252
|
+
onClick: () => n.onCheckout?.(),
|
|
253
253
|
get children() {
|
|
254
|
-
return
|
|
254
|
+
return n.checkoutLabel ?? "Checkout";
|
|
255
255
|
}
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
-
}), null), h(() => f(
|
|
258
|
+
}), null), h(() => f(i, e("card glow-edge rounded-xl p-5 text-card-foreground", n.class))), i;
|
|
259
259
|
})();
|
|
260
260
|
}
|
|
261
261
|
// src/commerce/FilterGroup.tsx
|
|
@@ -346,84 +346,84 @@ function oe(e) {
|
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
-
function se(
|
|
350
|
-
let
|
|
349
|
+
function se(n) {
|
|
350
|
+
let r = () => {
|
|
351
351
|
let e = [];
|
|
352
|
-
for (let
|
|
353
|
-
let r =
|
|
354
|
-
for (let
|
|
355
|
-
let r =
|
|
352
|
+
for (let t of n.sections) {
|
|
353
|
+
let r = n.selected[t.key] ?? [];
|
|
354
|
+
for (let n of r) {
|
|
355
|
+
let r = t.options.find((e) => e.value === n);
|
|
356
356
|
e.push({
|
|
357
|
-
sectionKey:
|
|
358
|
-
value:
|
|
359
|
-
label: r?.label ??
|
|
357
|
+
sectionKey: t.key,
|
|
358
|
+
value: n,
|
|
359
|
+
label: r?.label ?? n
|
|
360
360
|
});
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
return e;
|
|
364
|
-
}, r = (e) => {
|
|
365
|
-
let n = t.selected[e.sectionKey] ?? [];
|
|
366
|
-
t.onChange(e.sectionKey, n.filter((t) => t !== e.value));
|
|
367
364
|
}, i = (e) => {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
365
|
+
let t = n.selected[e.sectionKey] ?? [];
|
|
366
|
+
n.onChange(e.sectionKey, t.filter((t) => t !== e.value));
|
|
367
|
+
}, a = (e) => {
|
|
368
|
+
if (!n.price || !n.onPriceChange) return;
|
|
369
|
+
let t = Math.min(e, n.price.value[1]);
|
|
370
|
+
n.onPriceChange([t, n.price.value[1]]);
|
|
371
371
|
}, s = (e) => {
|
|
372
|
-
if (!
|
|
373
|
-
let
|
|
374
|
-
|
|
372
|
+
if (!n.price || !n.onPriceChange) return;
|
|
373
|
+
let t = Math.max(e, n.price.value[0]);
|
|
374
|
+
n.onPriceChange([n.price.value[0], t]);
|
|
375
375
|
};
|
|
376
376
|
return (() => {
|
|
377
377
|
var u = re(), d = u.firstChild;
|
|
378
378
|
return g(d, p(l, {
|
|
379
379
|
get when() {
|
|
380
|
-
return
|
|
380
|
+
return n.resultCount != null;
|
|
381
381
|
},
|
|
382
382
|
get children() {
|
|
383
|
-
var e = Q(),
|
|
384
|
-
return g(e, () =>
|
|
383
|
+
var e = Q(), t = e.firstChild;
|
|
384
|
+
return g(e, () => n.resultCount, t), e;
|
|
385
385
|
}
|
|
386
386
|
}), null), g(d, p(l, {
|
|
387
387
|
get when() {
|
|
388
|
-
return
|
|
388
|
+
return n.onClearAll;
|
|
389
389
|
},
|
|
390
390
|
get children() {
|
|
391
|
-
return p(
|
|
391
|
+
return p(t, {
|
|
392
392
|
variant: "ghost",
|
|
393
|
-
class: "
|
|
394
|
-
onClick: () =>
|
|
393
|
+
class: "ms-auto h-auto px-2 py-1 text-xs",
|
|
394
|
+
onClick: () => n.onClearAll?.(),
|
|
395
395
|
children: "Clear all"
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
}), null), g(u, p(l, {
|
|
399
399
|
get when() {
|
|
400
|
-
return
|
|
400
|
+
return r().length > 0;
|
|
401
401
|
},
|
|
402
402
|
get children() {
|
|
403
403
|
var e = ne();
|
|
404
404
|
return g(e, p(c, {
|
|
405
405
|
get each() {
|
|
406
|
-
return
|
|
406
|
+
return r();
|
|
407
407
|
},
|
|
408
408
|
children: (e) => (() => {
|
|
409
409
|
var t = ie(), n = t.firstChild;
|
|
410
|
-
return g(t, () => e.label, n), n.$$click = () =>
|
|
410
|
+
return g(t, () => e.label, n), n.$$click = () => i(e), g(n, p(ee, { class: "h-3 w-3" })), h(() => v(n, "aria-label", `Remove ${e.label}`)), t;
|
|
411
411
|
})()
|
|
412
412
|
})), e;
|
|
413
413
|
}
|
|
414
414
|
}), null), g(u, p(l, {
|
|
415
415
|
get when() {
|
|
416
|
-
return
|
|
416
|
+
return n.price;
|
|
417
417
|
},
|
|
418
418
|
children: (e) => (() => {
|
|
419
|
-
var t = ae(), n = t.firstChild, r = n.firstChild.nextSibling,
|
|
420
|
-
|
|
419
|
+
var t = ae(), n = t.firstChild, r = n.firstChild.nextSibling, i = r.firstChild.nextSibling;
|
|
420
|
+
i.nextSibling;
|
|
421
421
|
var c = n.nextSibling, l = c.firstChild;
|
|
422
|
-
return g(r, () => e().value[0],
|
|
422
|
+
return g(r, () => e().value[0], i), g(r, () => e().value[1], null), g(c, p(o, {
|
|
423
423
|
get value() {
|
|
424
424
|
return e().value[0];
|
|
425
425
|
},
|
|
426
|
-
onChange:
|
|
426
|
+
onChange: a,
|
|
427
427
|
get min() {
|
|
428
428
|
return e().min;
|
|
429
429
|
},
|
|
@@ -447,16 +447,16 @@ function se(t) {
|
|
|
447
447
|
})()
|
|
448
448
|
}), null), g(u, p(c, {
|
|
449
449
|
get each() {
|
|
450
|
-
return
|
|
450
|
+
return n.sections;
|
|
451
451
|
},
|
|
452
452
|
children: (e) => p(oe, {
|
|
453
453
|
section: e,
|
|
454
454
|
get selected() {
|
|
455
|
-
return
|
|
455
|
+
return n.selected[e.key] ?? [];
|
|
456
456
|
},
|
|
457
|
-
onChange: (
|
|
457
|
+
onChange: (t) => n.onChange(e.key, t)
|
|
458
458
|
})
|
|
459
|
-
}), null), h(() => f(u, e("space-y-5",
|
|
459
|
+
}), null), h(() => f(u, e("space-y-5", n.class))), u;
|
|
460
460
|
})();
|
|
461
461
|
}
|
|
462
462
|
m(["click"]);
|