@a4ui/core 0.38.0 → 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.
Files changed (129) hide show
  1. package/README.md +66 -9
  2. package/dist/{Collapse-Cr5cDqAl.js → Collapse-CrKiFD8K.js} +173 -124
  3. package/dist/charts/Sparkline.d.ts +2 -0
  4. package/dist/charts.js +8 -5
  5. package/dist/commerce.js +59 -59
  6. package/dist/elements.css +248 -151
  7. package/dist/elements.iife.js +1 -1
  8. package/dist/elements.js +1025 -1015
  9. package/dist/full.css +248 -151
  10. package/dist/index.d.ts +2 -1
  11. package/dist/index.js +4723 -4656
  12. package/dist/lib/anchored.d.ts +7 -0
  13. package/dist/lib/direction.d.ts +18 -0
  14. package/dist/styles.css +27 -11
  15. package/dist/theme.css +1559 -0
  16. package/dist/ui/DirectionProvider.d.ts +47 -0
  17. package/dist/ui/Drawer.d.ts +6 -2
  18. package/dist/ui/Sidebar.d.ts +8 -2
  19. package/dist/ui/Toast.d.ts +5 -1
  20. package/package.json +5 -3
  21. package/preset.d.ts +2 -1
  22. package/preset.js +16 -5
  23. package/src/charts/BarList.tsx +1 -1
  24. package/src/charts/Sparkline.tsx +5 -1
  25. package/src/commerce/CartLine.tsx +1 -1
  26. package/src/commerce/FacetSidebar.tsx +1 -1
  27. package/src/commerce/ProductCard.tsx +1 -1
  28. package/src/index.ts +7 -1
  29. package/src/layout/NavGroup.tsx +2 -2
  30. package/src/lib/anchored.ts +13 -0
  31. package/src/lib/direction.ts +35 -0
  32. package/src/ui/Accordion.tsx +2 -2
  33. package/src/ui/ActivityFeed.tsx +2 -2
  34. package/src/ui/AlertDialog.tsx +8 -4
  35. package/src/ui/Anchor.tsx +1 -1
  36. package/src/ui/AnnouncementBar.tsx +3 -3
  37. package/src/ui/ArtifactPanel.tsx +1 -1
  38. package/src/ui/AvailabilityPicker.tsx +2 -2
  39. package/src/ui/AvatarGroup.tsx +2 -2
  40. package/src/ui/BackToTop.tsx +1 -1
  41. package/src/ui/Badge.tsx +1 -1
  42. package/src/ui/BlockEditor.tsx +1 -1
  43. package/src/ui/ButtonGroup.tsx +1 -1
  44. package/src/ui/Callout.tsx +1 -1
  45. package/src/ui/Carousel.tsx +17 -9
  46. package/src/ui/Cascader.tsx +2 -2
  47. package/src/ui/CategoryStrip.tsx +4 -1
  48. package/src/ui/CodeEditor.tsx +5 -5
  49. package/src/ui/CodeTabs.tsx +1 -1
  50. package/src/ui/Combobox.tsx +2 -1
  51. package/src/ui/Command.tsx +9 -5
  52. package/src/ui/Comment.tsx +1 -1
  53. package/src/ui/Configurator.tsx +2 -2
  54. package/src/ui/ContextMenu.tsx +2 -1
  55. package/src/ui/DateField.tsx +4 -4
  56. package/src/ui/DateRangePicker.tsx +4 -4
  57. package/src/ui/DiffViewer.tsx +4 -3
  58. package/src/ui/DirectionProvider.tsx +82 -0
  59. package/src/ui/Drawer.tsx +29 -8
  60. package/src/ui/Dropdown.tsx +2 -1
  61. package/src/ui/EmojiPicker.tsx +5 -2
  62. package/src/ui/Expandable.tsx +2 -2
  63. package/src/ui/Faq.tsx +1 -1
  64. package/src/ui/Field.tsx +1 -1
  65. package/src/ui/FloatingActionButton.tsx +2 -2
  66. package/src/ui/FollowingPointer.tsx +2 -2
  67. package/src/ui/Hero.tsx +2 -2
  68. package/src/ui/HoldToConfirm.tsx +2 -2
  69. package/src/ui/HoverCard.tsx +2 -1
  70. package/src/ui/Image.tsx +9 -5
  71. package/src/ui/InlineSelect.tsx +1 -1
  72. package/src/ui/InputGroup.tsx +2 -2
  73. package/src/ui/Item.tsx +1 -1
  74. package/src/ui/JsonViewer.tsx +2 -2
  75. package/src/ui/Kanban.tsx +1 -1
  76. package/src/ui/KpiBlock.tsx +1 -1
  77. package/src/ui/Lightbox.tsx +9 -6
  78. package/src/ui/MasterDetail.tsx +1 -1
  79. package/src/ui/Mentions.tsx +1 -1
  80. package/src/ui/Menubar.tsx +9 -8
  81. package/src/ui/Modal.tsx +9 -5
  82. package/src/ui/ModelPicker.tsx +2 -1
  83. package/src/ui/MultiSelect.tsx +5 -5
  84. package/src/ui/NativeSelect.tsx +2 -2
  85. package/src/ui/NavigationMenu.tsx +5 -4
  86. package/src/ui/NotificationCenter.tsx +1 -1
  87. package/src/ui/NotificationStack.tsx +1 -1
  88. package/src/ui/NumberInput.tsx +2 -2
  89. package/src/ui/OnboardingChecklist.tsx +2 -2
  90. package/src/ui/Pagination.tsx +2 -2
  91. package/src/ui/PillSearch.tsx +3 -3
  92. package/src/ui/PivotTable.tsx +0 -0
  93. package/src/ui/Popover.tsx +2 -1
  94. package/src/ui/Portal.tsx +3 -1
  95. package/src/ui/PresenceAvatars.tsx +4 -4
  96. package/src/ui/PricingTable.tsx +1 -1
  97. package/src/ui/Prose.tsx +3 -3
  98. package/src/ui/QueryBuilder.tsx +4 -4
  99. package/src/ui/Rating.tsx +6 -2
  100. package/src/ui/ReasoningTrace.tsx +1 -1
  101. package/src/ui/ScrollArea.tsx +1 -1
  102. package/src/ui/ScrollProgress.tsx +2 -2
  103. package/src/ui/SideRail.tsx +3 -3
  104. package/src/ui/Sidebar.tsx +43 -23
  105. package/src/ui/SlashMenu.tsx +1 -1
  106. package/src/ui/Snippet.tsx +6 -3
  107. package/src/ui/Sortable.tsx +1 -1
  108. package/src/ui/SpecSheet.tsx +1 -1
  109. package/src/ui/SpeedDial.tsx +1 -1
  110. package/src/ui/Splitter.tsx +8 -3
  111. package/src/ui/SpreadsheetGrid.tsx +4 -4
  112. package/src/ui/Stepper.tsx +1 -1
  113. package/src/ui/SuggestionChips.tsx +1 -1
  114. package/src/ui/Switch.tsx +1 -1
  115. package/src/ui/Table.tsx +5 -2
  116. package/src/ui/TimeField.tsx +8 -8
  117. package/src/ui/Timeline.tsx +2 -2
  118. package/src/ui/Toast.tsx +9 -3
  119. package/src/ui/ToolCallTimeline.tsx +2 -2
  120. package/src/ui/Tooltip.tsx +2 -1
  121. package/src/ui/Tour.tsx +1 -1
  122. package/src/ui/TransactionFeed.tsx +1 -1
  123. package/src/ui/Transfer.tsx +2 -2
  124. package/src/ui/Tree.tsx +2 -2
  125. package/src/ui/TreeSelect.tsx +2 -2
  126. package/src/ui/TreeTable.tsx +4 -4
  127. package/src/ui/UsageMeter.tsx +1 -1
  128. package/src/ui/VideoPlayerShell.tsx +2 -2
  129. 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 { a as t, g as n, i as r, n as i, p as a, r as o, t as s } from "./Collapse-Cr5cDqAl.js";
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(t, {
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 -right-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;
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(), t = e.firstChild;
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
- }), t), g(t, () => n.title), g(e, p(l, {
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(i, {
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(a, {
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-right font-medium tabular-nums text-foreground\">");
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(t) {
231
- let n = (e) => new Intl.NumberFormat(t.locale ?? "en-US", {
230
+ function q(n) {
231
+ let r = (e) => new Intl.NumberFormat(n.locale ?? "en-US", {
232
232
  style: "currency",
233
- currency: t.currency ?? "USD"
233
+ currency: n.currency ?? "USD"
234
234
  }).format(e);
235
235
  return (() => {
236
- var r = G(), i = r.firstChild, o = i.nextSibling.firstChild.nextSibling;
237
- return g(r, p(c, {
236
+ var i = G(), a = i.firstChild, o = a.nextSibling.firstChild.nextSibling;
237
+ return g(i, p(c, {
238
238
  get each() {
239
- return t.lines;
239
+ return n.lines;
240
240
  },
241
241
  children: (e) => (() => {
242
- var t = K(), r = t.firstChild, i = r.nextSibling;
243
- return g(r, () => e.label), g(i, () => n(e.amount)), t;
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
- }), i), g(o, () => n(t.total)), g(r, p(l, {
245
+ }), a), g(o, () => r(n.total)), g(i, p(l, {
246
246
  get when() {
247
- return t.onCheckout;
247
+ return n.onCheckout;
248
248
  },
249
249
  get children() {
250
- return p(a, {
250
+ return p(t, {
251
251
  class: "mt-4 w-full",
252
- onClick: () => t.onCheckout?.(),
252
+ onClick: () => n.onCheckout?.(),
253
253
  get children() {
254
- return t.checkoutLabel ?? "Checkout";
254
+ return n.checkoutLabel ?? "Checkout";
255
255
  }
256
256
  });
257
257
  }
258
- }), null), h(() => f(r, e("card glow-edge rounded-xl p-5 text-card-foreground", t.class))), r;
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(t) {
350
- let n = () => {
349
+ function se(n) {
350
+ let r = () => {
351
351
  let e = [];
352
- for (let n of t.sections) {
353
- let r = t.selected[n.key] ?? [];
354
- for (let t of r) {
355
- let r = n.options.find((e) => e.value === t);
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: n.key,
358
- value: t,
359
- label: r?.label ?? t
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
- if (!t.price || !t.onPriceChange) return;
369
- let n = Math.min(e, t.price.value[1]);
370
- t.onPriceChange([n, t.price.value[1]]);
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 (!t.price || !t.onPriceChange) return;
373
- let n = Math.max(e, t.price.value[0]);
374
- t.onPriceChange([t.price.value[0], n]);
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 t.resultCount != null;
380
+ return n.resultCount != null;
381
381
  },
382
382
  get children() {
383
- var e = Q(), n = e.firstChild;
384
- return g(e, () => t.resultCount, n), 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 t.onClearAll;
388
+ return n.onClearAll;
389
389
  },
390
390
  get children() {
391
- return p(a, {
391
+ return p(t, {
392
392
  variant: "ghost",
393
- class: "ml-auto h-auto px-2 py-1 text-xs",
394
- onClick: () => t.onClearAll?.(),
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 n().length > 0;
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 n();
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 = () => r(e), g(n, p(ee, { class: "h-3 w-3" })), h(() => v(n, "aria-label", `Remove ${e.label}`)), t;
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 t.price;
416
+ return n.price;
417
417
  },
418
418
  children: (e) => (() => {
419
- var t = ae(), n = t.firstChild, r = n.firstChild.nextSibling, a = r.firstChild.nextSibling;
420
- a.nextSibling;
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], a), g(r, () => e().value[1], null), g(c, p(o, {
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: i,
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 t.sections;
450
+ return n.sections;
451
451
  },
452
452
  children: (e) => p(oe, {
453
453
  section: e,
454
454
  get selected() {
455
- return t.selected[e.key] ?? [];
455
+ return n.selected[e.key] ?? [];
456
456
  },
457
- onChange: (n) => t.onChange(e.key, n)
457
+ onChange: (t) => n.onChange(e.key, t)
458
458
  })
459
- }), null), h(() => f(u, e("space-y-5", t.class))), u;
459
+ }), null), h(() => f(u, e("space-y-5", n.class))), u;
460
460
  })();
461
461
  }
462
462
  m(["click"]);