@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.
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 +2 -1
  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 +3 -2
  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 +23 -5
  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 +3 -2
  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 +3 -2
  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
@@ -1,40 +1,41 @@
1
1
  import { a as e, g as t } from "./motion-CTIBwMCA.js";
2
- import { For as n, Show as r, createSignal as i, onCleanup as a, onMount as o, splitProps as s } from "solid-js";
3
- import { className as c, createComponent as l, delegateEvents as u, effect as d, insert as f, mergeProps as p, setAttribute as m, spread as h, template as g, use as _ } from "solid-js/web";
4
- import { ChevronDown as v, Star as y } from "lucide-solid";
5
- import { NumberField as b } from "@kobalte/core/number-field";
2
+ import { For as n, Show as r, createContext as i, createEffect as a, createMemo as o, createSignal as s, onCleanup as c, onMount as l, splitProps as u, useContext as d } from "solid-js";
3
+ import { className as f, createComponent as p, delegateEvents as m, effect as h, insert as g, mergeProps as _, setAttribute as v, spread as y, template as b, use as x } from "solid-js/web";
4
+ import { ChevronDown as S, Star as C } from "lucide-solid";
5
+ import { I18nProvider as w, getReadingDirection as T } from "@kobalte/core/i18n";
6
+ import { NumberField as E } from "@kobalte/core/number-field";
6
7
  // src/ui/Badge.tsx
7
- var x = /*#__PURE__*/ g("<span class=\"relative flex h-1.5 w-1.5\"aria-hidden=true><span class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-75\"></span><span class=\"relative inline-flex h-1.5 w-1.5 rounded-full bg-current\">"), S = /*#__PURE__*/ g("<span>"), C = {
8
+ var D = /*#__PURE__*/ b("<span class=\"relative flex h-1.5 w-1.5\"aria-hidden=true><span class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-75\"></span><span class=\"relative inline-flex h-1.5 w-1.5 rounded-full bg-current\">"), O = /*#__PURE__*/ b("<span>"), ee = {
8
9
  neutral: "bg-muted text-muted-foreground ring-border",
9
10
  success: "bg-emerald-500/15 text-emerald-300 ring-emerald-500/30 light:text-emerald-700",
10
- warning: "bg-amber-500/15 text-amber-300 ring-amber-500/30 light:text-amber-700",
11
+ warning: "bg-amber-500/15 text-amber-300 ring-amber-500/30 light:text-amber-800",
11
12
  danger: "bg-rose-500/15 text-rose-300 ring-rose-500/30 light:text-rose-700",
12
13
  info: "bg-sky-500/15 text-sky-300 ring-sky-500/30 light:text-sky-700"
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 T(e) {
15
- let [n, i] = s(e, [
14
+ }, te = "badge inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-semibold ring-1 ring-inset whitespace-nowrap";
15
+ function ne(e) {
16
+ let [n, i] = u(e, [
16
17
  "tone",
17
18
  "class",
18
19
  "children",
19
20
  "pulse"
20
21
  ]);
21
22
  return (() => {
22
- var e = S();
23
- return h(e, p({ get class() {
24
- return t(w, C[n.tone ?? "neutral"], n.class);
25
- } }, i), !1, !0), f(e, l(r, {
23
+ var e = O();
24
+ return y(e, _({ get class() {
25
+ return t(te, ee[n.tone ?? "neutral"], n.class);
26
+ } }, i), !1, !0), g(e, p(r, {
26
27
  get when() {
27
28
  return n.pulse;
28
29
  },
29
30
  get children() {
30
- return x();
31
+ return D();
31
32
  }
32
- }), null), f(e, () => n.children, null), e;
33
+ }), null), g(e, () => n.children, null), e;
33
34
  })();
34
35
  }
35
36
  // src/ui/Ripple.tsx
36
- var E = /*#__PURE__*/ g("<span>");
37
- function D(t, n, r = {}) {
37
+ var re = /*#__PURE__*/ b("<span>");
38
+ function k(t, n, r = {}) {
38
39
  if (e()) return;
39
40
  let i = t.getBoundingClientRect(), a = n.clientX - i.left, o = n.clientY - i.top, s = 2 * Math.max(Math.hypot(a, o), Math.hypot(i.width - a, o), Math.hypot(a, i.height - o), Math.hypot(i.width - a, i.height - o)), c = document.createElement("span");
40
41
  c.setAttribute("aria-hidden", "true"), Object.assign(c.style, {
@@ -60,30 +61,30 @@ function D(t, n, r = {}) {
60
61
  }), u = () => c.remove();
61
62
  l.finished.then(u).catch(u);
62
63
  }
63
- function O(e) {
64
+ function A(e) {
64
65
  let n, r = (t) => {
65
- n && D(n, t, {
66
+ n && k(n, t, {
66
67
  color: e.color,
67
68
  opacity: e.opacity
68
69
  });
69
70
  };
70
71
  return (() => {
71
- var i = E();
72
+ var i = re();
72
73
  i.$$pointerdown = r;
73
74
  var a = n;
74
- return typeof a == "function" ? _(a, i) : n = i, f(i, () => e.children), d(() => c(i, t("relative inline-block overflow-hidden", e.class))), i;
75
+ return typeof a == "function" ? x(a, i) : n = i, g(i, () => e.children), h(() => f(i, t("relative inline-block overflow-hidden", e.class))), i;
75
76
  })();
76
77
  }
77
- u(["pointerdown"]);
78
+ m(["pointerdown"]);
78
79
  // src/ui/Button.tsx
79
- var k = /*#__PURE__*/ g("<a>"), A = /*#__PURE__*/ g("<button>"), j = {
80
+ var j = /*#__PURE__*/ b("<a>"), M = /*#__PURE__*/ b("<button>"), N = {
80
81
  primary: "bg-primary text-primary-foreground hover:bg-primary/90",
81
82
  secondary: "bg-muted text-foreground hover:bg-muted/70",
82
83
  outline: "border border-border bg-transparent text-foreground hover:bg-muted",
83
84
  ghost: "bg-transparent text-foreground hover:bg-muted"
84
- }, M = "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";
85
- function N(e) {
86
- let [n, i] = s(e, [
85
+ }, P = "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";
86
+ function F(e) {
87
+ let [n, i] = u(e, [
87
88
  "variant",
88
89
  "class",
89
90
  "type",
@@ -93,31 +94,31 @@ function N(e) {
93
94
  "href",
94
95
  "target",
95
96
  "rel"
96
- ]), a = () => t(M, j[n.variant ?? "primary"], n.ripple && "relative overflow-hidden", n.class), o = (e) => {
97
- n.ripple && D(e.currentTarget, e, { opacity: .35 });
97
+ ]), a = () => t(P, N[n.variant ?? "primary"], n.ripple && "relative overflow-hidden", n.class), o = (e) => {
98
+ n.ripple && k(e.currentTarget, e, { opacity: .35 });
98
99
  let t = n.onPointerDown;
99
100
  typeof t == "function" ? t(e) : t && t[0](t[1], e);
100
101
  };
101
- return l(r, {
102
+ return p(r, {
102
103
  get when() {
103
104
  return n.href !== void 0;
104
105
  },
105
106
  get fallback() {
106
107
  return (() => {
107
- var e = A();
108
- return e.$$pointerdown = o, h(e, p({
108
+ var e = M();
109
+ return e.$$pointerdown = o, y(e, _({
109
110
  get type() {
110
111
  return n.type ?? "button";
111
112
  },
112
113
  get class() {
113
114
  return a();
114
115
  }
115
- }, i), !1, !0), f(e, () => n.children), e;
116
+ }, i), !1, !0), g(e, () => n.children), e;
116
117
  })();
117
118
  },
118
119
  get children() {
119
- var e = k();
120
- return e.$$pointerdown = o, h(e, p({
120
+ var e = j();
121
+ return e.$$pointerdown = o, y(e, _({
121
122
  get href() {
122
123
  return n.href;
123
124
  },
@@ -130,14 +131,14 @@ function N(e) {
130
131
  get class() {
131
132
  return a();
132
133
  }
133
- }, i), !1, !0), f(e, () => n.children), e;
134
+ }, i), !1, !0), g(e, () => n.children), e;
134
135
  }
135
136
  });
136
137
  }
137
- u(["pointerdown"]);
138
+ m(["pointerdown"]);
138
139
  // src/ui/Spotlight.tsx
139
- var P = /*#__PURE__*/ g("<div>");
140
- function F(t, n = {}) {
140
+ var I = /*#__PURE__*/ b("<div>");
141
+ function L(t, n = {}) {
141
142
  if (e()) return () => {};
142
143
  let r = document.createElement("span");
143
144
  r.setAttribute("aria-hidden", "true"), r.className = "pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300", t.appendChild(r);
@@ -155,22 +156,22 @@ function F(t, n = {}) {
155
156
  t.removeEventListener("pointermove", s), t.removeEventListener("pointerenter", c), t.removeEventListener("pointerleave", l), r.remove();
156
157
  };
157
158
  }
158
- function I(e) {
159
+ function R(e) {
159
160
  let n;
160
- return o(() => {
161
- let t = F(n, {
161
+ return l(() => {
162
+ let t = L(n, {
162
163
  color: e.color,
163
164
  size: e.size
164
165
  });
165
- a(t);
166
+ c(t);
166
167
  }), (() => {
167
- var r = P(), i = n;
168
- return typeof i == "function" ? _(i, r) : n = r, f(r, () => e.children), d(() => c(r, t("relative overflow-hidden", e.class))), r;
168
+ var r = I(), i = n;
169
+ return typeof i == "function" ? x(i, r) : n = r, g(r, () => e.children), h(() => f(r, t("relative overflow-hidden", e.class))), r;
169
170
  })();
170
171
  }
171
172
  // src/ui/TiltCard.tsx
172
- var L = /*#__PURE__*/ g("<div style=perspective:800px><div style=transform-style:preserve-3d>");
173
- function R(t, n, r = {}) {
173
+ var z = /*#__PURE__*/ b("<div style=perspective:800px><div style=transform-style:preserve-3d>");
174
+ function B(t, n, r = {}) {
174
175
  if (e()) return () => {};
175
176
  n.style.willChange = "transform";
176
177
  let i = (e) => {
@@ -183,78 +184,125 @@ function R(t, n, r = {}) {
183
184
  t.removeEventListener("pointermove", i), t.removeEventListener("pointerleave", a), n.style.transform = "", n.style.transition = "", n.style.willChange = "";
184
185
  };
185
186
  }
186
- function z(e) {
187
+ function V(e) {
187
188
  let n, r;
188
- return o(() => {
189
- let t = R(n, r, { max: e.max });
190
- a(t);
189
+ return l(() => {
190
+ let t = B(n, r, { max: e.max });
191
+ c(t);
191
192
  }), (() => {
192
- var i = L(), a = i.firstChild, o = n;
193
- typeof o == "function" ? _(o, i) : n = i;
193
+ var i = z(), a = i.firstChild, o = n;
194
+ typeof o == "function" ? x(o, i) : n = i;
194
195
  var s = r;
195
- return typeof s == "function" ? _(s, a) : r = a, f(a, () => e.children), d(() => c(i, t("inline-block", e.class))), i;
196
+ return typeof s == "function" ? x(s, a) : r = a, g(a, () => e.children), h(() => f(i, t("inline-block", e.class))), i;
196
197
  })();
197
198
  }
198
199
  // src/ui/Card.tsx
199
- var B = /*#__PURE__*/ g("<div>"), V = /*#__PURE__*/ g("<h2>");
200
- function H(e) {
201
- let [n, r] = s(e, [
200
+ var H = /*#__PURE__*/ b("<div>"), U = /*#__PURE__*/ b("<h2>");
201
+ function W(e) {
202
+ let [n, r] = u(e, [
202
203
  "class",
203
204
  "children",
204
205
  "glass",
205
206
  "glow",
206
207
  "tilt",
207
208
  "spotlight"
208
- ]), i = () => (n.glow ?? n.glass) === !0, c;
209
- return o(() => {
210
- let e = [n.tilt && c ? R(c, c) : null, n.spotlight && c ? F(c) : null].filter((e) => e !== null);
211
- a(() => e.forEach((e) => e()));
209
+ ]), i = () => (n.glow ?? n.glass) === !0, a;
210
+ return l(() => {
211
+ let e = [n.tilt && a ? B(a, a) : null, n.spotlight && a ? L(a) : null].filter((e) => e !== null);
212
+ c(() => e.forEach((e) => e()));
212
213
  }), (() => {
213
- var e = B(), a = c;
214
- return typeof a == "function" ? _(a, e) : c = e, h(e, p({ get class() {
214
+ var e = H(), o = a;
215
+ return typeof o == "function" ? x(o, e) : a = e, y(e, _({ get class() {
215
216
  return t(n.glass ? "card rounded-xl text-card-foreground" : "rounded-xl border border-border bg-card text-card-foreground shadow-sm", i() && "glow-edge", n.spotlight && "relative overflow-hidden", n.tilt && "will-change-transform", n.class);
216
- } }, r), !1, !0), f(e, () => n.children), e;
217
+ } }, r), !1, !0), g(e, () => n.children), e;
217
218
  })();
218
219
  }
219
- function U(e) {
220
- let [n, r] = s(e, ["class", "children"]);
220
+ function ie(e) {
221
+ let [n, r] = u(e, ["class", "children"]);
221
222
  return (() => {
222
- var e = B();
223
- return h(e, p({ get class() {
223
+ var e = H();
224
+ return y(e, _({ get class() {
224
225
  return t("flex flex-col space-y-1.5 p-6", n.class);
225
- } }, r), !1, !0), f(e, () => n.children), e;
226
+ } }, r), !1, !0), g(e, () => n.children), e;
226
227
  })();
227
228
  }
228
- function W(e) {
229
- let [n, r] = s(e, ["class", "children"]);
229
+ function G(e) {
230
+ let [n, r] = u(e, ["class", "children"]);
230
231
  return (() => {
231
- var e = V();
232
- return h(e, p({ get class() {
232
+ var e = U();
233
+ return y(e, _({ get class() {
233
234
  return t("text-lg font-semibold leading-none tracking-tight", n.class);
234
- } }, r), !1, !0), f(e, () => n.children), e;
235
+ } }, r), !1, !0), g(e, () => n.children), e;
235
236
  })();
236
237
  }
237
- function G(e) {
238
- let [n, r] = s(e, ["class", "children"]);
238
+ function K(e) {
239
+ let [n, r] = u(e, ["class", "children"]);
239
240
  return (() => {
240
- var e = B();
241
- return h(e, p({ get class() {
241
+ var e = H();
242
+ return y(e, _({ get class() {
242
243
  return t("p-6 pt-0", n.class);
243
- } }, r), !1, !0), f(e, () => n.children), e;
244
+ } }, r), !1, !0), g(e, () => n.children), e;
244
245
  })();
245
246
  }
246
247
  // src/ui/Checkbox.tsx
247
- var K = /*#__PURE__*/ g("<label><input type=checkbox class=\"h-4 w-4 rounded border-input accent-primary\">");
248
- function q(e) {
248
+ var q = /*#__PURE__*/ b("<label><input type=checkbox class=\"h-4 w-4 rounded border-input accent-primary\">");
249
+ function J(e) {
249
250
  return (() => {
250
- var n = K(), r = n.firstChild;
251
- return r.addEventListener("change", (t) => e.onChange(t.currentTarget.checked)), f(n, () => e.label, null), d(() => c(n, t("inline-flex items-center gap-2 text-sm text-foreground", e.class))), d(() => r.checked = e.checked), n;
251
+ var n = q(), r = n.firstChild;
252
+ return r.addEventListener("change", (t) => e.onChange(t.currentTarget.checked)), g(n, () => e.label, null), h(() => f(n, t("inline-flex items-center gap-2 text-sm text-foreground", e.class))), h(() => r.checked = e.checked), n;
252
253
  })();
253
254
  }
255
+ // src/lib/direction.ts
256
+ var Y = i();
257
+ function X(e, t) {
258
+ return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
259
+ }
260
+ function ae(e) {
261
+ let t = d(Y);
262
+ t && a(() => e.setAttribute("dir", t()));
263
+ }
264
+ // src/ui/DirectionProvider.tsx
265
+ var oe = /*#__PURE__*/ b("<div>");
266
+ function se(e) {
267
+ let [n] = u(e, [
268
+ "dir",
269
+ "locale",
270
+ "class",
271
+ "children"
272
+ ]), r = o(() => {
273
+ let e = n.locale ? T(n.locale) : void 0;
274
+ if (n.dir && e && n.dir !== e) throw Error(`DirectionProvider: dir="${n.dir}" conflicts with locale "${n.locale}" (reading direction "${e}").`);
275
+ return n.dir ?? e ?? "ltr";
276
+ }), i = o(() => n.locale ?? (r() === "rtl" ? "ar" : "en-US"));
277
+ return p(Y.Provider, {
278
+ value: r,
279
+ get children() {
280
+ return p(w, {
281
+ get locale() {
282
+ return i();
283
+ },
284
+ get children() {
285
+ var e = oe();
286
+ return g(e, () => n.children), h((i) => {
287
+ var a = r(), o = n.locale, s = t("contents", n.class);
288
+ return a !== i.e && v(e, "dir", i.e = a), o !== i.t && v(e, "lang", i.t = o), s !== i.a && f(e, i.a = s), i;
289
+ }, {
290
+ e: void 0,
291
+ t: void 0,
292
+ a: void 0
293
+ }), e;
294
+ }
295
+ });
296
+ }
297
+ });
298
+ }
299
+ function Z() {
300
+ return d(Y) || (() => typeof document < "u" && document.documentElement.getAttribute("dir") === "rtl" ? "rtl" : "ltr");
301
+ }
254
302
  // src/ui/NumberInput.tsx
255
- var J = "grid h-9 w-9 shrink-0 place-items-center border border-input bg-background text-foreground transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50";
256
- function Y(e) {
257
- return l(b, {
303
+ var Q = "grid h-9 w-9 shrink-0 place-items-center border border-input bg-background text-foreground transition-colors hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50";
304
+ function ce(e) {
305
+ return p(E, {
258
306
  get rawValue() {
259
307
  return e.value;
260
308
  },
@@ -270,22 +318,22 @@ function Y(e) {
270
318
  },
271
319
  get children() {
272
320
  return [
273
- l(b.DecrementTrigger, {
321
+ p(E.DecrementTrigger, {
274
322
  get class() {
275
- return t(J, "rounded-l-md");
323
+ return t(Q, "rounded-s-md");
276
324
  },
277
325
  "aria-label": "Decrement",
278
326
  children: "−"
279
327
  }),
280
- l(b.Input, {
328
+ p(E.Input, {
281
329
  get "aria-label"() {
282
330
  return e["aria-label"];
283
331
  },
284
332
  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"
285
333
  }),
286
- l(b.IncrementTrigger, {
334
+ p(E.IncrementTrigger, {
287
335
  get class() {
288
- return t(J, "rounded-r-md");
336
+ return t(Q, "rounded-e-md");
289
337
  },
290
338
  "aria-label": "Increment",
291
339
  children: "+"
@@ -295,31 +343,31 @@ function Y(e) {
295
343
  });
296
344
  }
297
345
  // src/ui/Rating.tsx
298
- var X = /*#__PURE__*/ g("<div role=radiogroup>"), Z = /*#__PURE__*/ g("<div role=img>"), Q = /*#__PURE__*/ g("<button type=button role=radio class=\"rounded outline-none focus-visible:ring-2 focus-visible:ring-ring/40\">");
299
- function $(e) {
300
- let [a, o] = i(0), s = () => e.max ?? 5, u = () => Array.from({ length: s() }, (e, t) => t + 1), p = () => a() > 0 ? a() : e.value, h = (t) => {
346
+ var le = /*#__PURE__*/ b("<div role=radiogroup>"), $ = /*#__PURE__*/ b("<div role=img>"), ue = /*#__PURE__*/ b("<button type=button role=radio class=\"rounded outline-none focus-visible:ring-2 focus-visible:ring-ring/40\">");
347
+ function de(e) {
348
+ let i = Z(), [a, o] = s(0), c = () => e.max ?? 5, l = () => Array.from({ length: c() }, (e, t) => t + 1), u = () => a() > 0 ? a() : e.value, d = (t) => {
301
349
  e.readonly || e.onChange?.(t);
302
- }, g = (e) => t("h-5 w-5 transition-colors", e <= p() ? "fill-primary text-primary" : "fill-transparent text-muted-foreground");
303
- return l(r, {
350
+ }, m = (e) => t("h-5 w-5 transition-colors", e <= u() ? "fill-primary text-primary" : "fill-transparent text-muted-foreground");
351
+ return p(r, {
304
352
  get when() {
305
353
  return !e.readonly;
306
354
  },
307
355
  get fallback() {
308
356
  return (() => {
309
- var r = Z();
310
- return f(r, l(n, {
357
+ var r = $();
358
+ return g(r, p(n, {
311
359
  get each() {
312
- return u();
360
+ return l();
313
361
  },
314
- children: (e) => l(y, {
362
+ children: (e) => p(C, {
315
363
  get class() {
316
- return g(e);
364
+ return m(e);
317
365
  },
318
366
  "aria-hidden": "true"
319
367
  })
320
- })), d((n) => {
321
- var i = t("inline-flex items-center gap-1", e.class), a = `Rating ${e.value} of ${s()}`;
322
- return i !== n.e && c(r, n.e = i), a !== n.t && m(r, "aria-label", n.t = a), n;
368
+ })), h((n) => {
369
+ var i = t("inline-flex items-center gap-1", e.class), a = `Rating ${e.value} of ${c()}`;
370
+ return i !== n.e && f(r, n.e = i), a !== n.t && v(r, "aria-label", n.t = a), n;
323
371
  }, {
324
372
  e: void 0,
325
373
  t: void 0
@@ -327,43 +375,44 @@ function $(e) {
327
375
  })();
328
376
  },
329
377
  get children() {
330
- var r = X();
331
- return r.addEventListener("mouseleave", () => o(0)), f(r, l(n, {
378
+ var r = le();
379
+ return r.addEventListener("mouseleave", () => o(0)), g(r, p(n, {
332
380
  get each() {
333
- return u();
381
+ return l();
334
382
  },
335
383
  children: (t) => (() => {
336
- var n = Q();
384
+ var n = ue();
337
385
  return n.$$keydown = (t) => {
338
- t.key === "ArrowRight" || t.key === "ArrowUp" ? (t.preventDefault(), h(Math.min(e.value + 1, s()))) : (t.key === "ArrowLeft" || t.key === "ArrowDown") && (t.preventDefault(), h(Math.max(e.value - 1, 0)));
339
- }, n.$$click = () => h(t), n.addEventListener("blur", () => o(0)), n.addEventListener("focus", () => o(t)), n.addEventListener("mouseenter", () => o(t)), f(n, l(y, {
386
+ let n = X(t.key, i());
387
+ n === "ArrowRight" || n === "ArrowUp" ? (t.preventDefault(), d(Math.min(e.value + 1, c()))) : (n === "ArrowLeft" || n === "ArrowDown") && (t.preventDefault(), d(Math.max(e.value - 1, 0)));
388
+ }, n.$$click = () => d(t), n.addEventListener("blur", () => o(0)), n.addEventListener("focus", () => o(t)), n.addEventListener("mouseenter", () => o(t)), g(n, p(C, {
340
389
  get class() {
341
- return g(t);
390
+ return m(t);
342
391
  },
343
392
  "aria-hidden": "true"
344
- })), d((r) => {
345
- var i = e.value === t, a = `Rate ${t} of ${s()}`;
346
- return i !== r.e && m(n, "aria-checked", r.e = i), a !== r.t && m(n, "aria-label", r.t = a), r;
393
+ })), h((r) => {
394
+ var i = e.value === t, a = `Rate ${t} of ${c()}`;
395
+ return i !== r.e && v(n, "aria-checked", r.e = i), a !== r.t && v(n, "aria-label", r.t = a), r;
347
396
  }, {
348
397
  e: void 0,
349
398
  t: void 0
350
399
  }), n;
351
400
  })()
352
- })), d(() => c(r, t("inline-flex items-center gap-1", e.class))), r;
401
+ })), h(() => f(r, t("inline-flex items-center gap-1", e.class))), r;
353
402
  }
354
403
  });
355
404
  }
356
- u(["click", "keydown"]);
405
+ m(["click", "keydown"]);
357
406
  // src/ui/Collapse.tsx
358
- var ee = /*#__PURE__*/ g("<div><button type=button class=\"flex w-full items-center justify-between rounded-md px-3 py-2 text-sm font-medium text-foreground hover:bg-muted\"></button><div><div class=overflow-hidden><div class=\"px-3 py-2 text-sm text-muted-foreground\">");
359
- function te(e) {
407
+ var fe = /*#__PURE__*/ b("<div><button type=button class=\"flex w-full items-center justify-between rounded-md px-3 py-2 text-sm font-medium text-foreground hover:bg-muted\"></button><div><div class=overflow-hidden><div class=\"px-3 py-2 text-sm text-muted-foreground\">");
408
+ function pe(e) {
360
409
  return (() => {
361
- var n = ee(), r = n.firstChild, i = r.nextSibling, a = i.firstChild.firstChild;
362
- return r.$$click = () => e.onOpenChange(!e.open), f(r, () => e.title, null), f(r, l(v, { get class() {
410
+ var n = fe(), r = n.firstChild, i = r.nextSibling, a = i.firstChild.firstChild;
411
+ return r.$$click = () => e.onOpenChange(!e.open), g(r, () => e.title, null), g(r, p(S, { get class() {
363
412
  return t("h-4 w-4 shrink-0 transition-transform duration-200", e.open && "rotate-180");
364
- } }), null), f(a, () => e.children), d((a) => {
365
- var o = t(e.class), s = e.open, l = t("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none", e.open ? "grid-rows-[1fr]" : "grid-rows-[0fr]");
366
- return o !== a.e && c(n, a.e = o), s !== a.t && m(r, "aria-expanded", a.t = s), l !== a.a && c(i, a.a = l), a;
413
+ } }), null), g(a, () => e.children), h((a) => {
414
+ var o = t(e.class), s = e.open, c = t("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none", e.open ? "grid-rows-[1fr]" : "grid-rows-[0fr]");
415
+ return o !== a.e && f(n, a.e = o), s !== a.t && v(r, "aria-expanded", a.t = s), c !== a.a && f(i, a.a = c), a;
367
416
  }, {
368
417
  e: void 0,
369
418
  t: void 0,
@@ -371,5 +420,5 @@ function te(e) {
371
420
  }), n;
372
421
  })();
373
422
  }
374
- u(["click"]);
375
- export { H as a, W as c, I as d, F as f, T as g, D as h, q as i, z as l, O as m, $ as n, G as o, N as p, Y as r, U as s, te as t, R as u };
423
+ m(["click"]);
424
+ export { F as _, Z as a, ne as b, J as c, ie as d, G as f, L as g, R as h, se as i, W as l, B as m, de as n, ae as o, V as p, ce as r, X as s, pe as t, K as u, A as v, k as y };
@@ -9,6 +9,8 @@ export interface SparklineProps {
9
9
  tone?: 'primary' | 'accent' | 'destructive';
10
10
  /** Fill the area under the line faintly. Default false. */
11
11
  area?: boolean;
12
+ /** Accessible description, e.g. 'Revenue, rising'. Without it the chart is hidden from assistive tech as decoration. */
13
+ label?: string;
12
14
  class?: string;
13
15
  }
14
16
  /**
package/dist/charts.js CHANGED
@@ -2,7 +2,7 @@ import { a as e, g as t } from "./motion-CTIBwMCA.js";
2
2
  import { For as n, Show as r, createEffect as i, createMemo as a, createSignal as o, createUniqueId as s, on as c, onMount as l } from "solid-js";
3
3
  import { addEventListener as u, className as d, createComponent as f, delegateEvents as p, effect as m, insert as h, memo as g, setAttribute as _, setStyleProperty as v, template as y, use as b } from "solid-js/web";
4
4
  // src/charts/Sparkline.tsx
5
- var x = /*#__PURE__*/ y("<svg><path stroke=none></svg>", !1, !0, !1), S = /*#__PURE__*/ y("<svg><polyline fill=none stroke-width=2 stroke-linecap=round stroke-linejoin=round></svg>", !1, !0, !1), C = /*#__PURE__*/ y("<svg preserveAspectRatio=none role=img>"), w = /*#__PURE__*/ y("<svg><circle r=2></svg>", !1, !0, !1), T = 2;
5
+ var x = /*#__PURE__*/ y("<svg><path stroke=none></svg>", !1, !0, !1), S = /*#__PURE__*/ y("<svg><polyline fill=none stroke-width=2 stroke-linecap=round stroke-linejoin=round></svg>", !1, !0, !1), C = /*#__PURE__*/ y("<svg preserveAspectRatio=none>"), w = /*#__PURE__*/ y("<svg><circle r=2></svg>", !1, !0, !1), T = 2;
6
6
  function E(e, t, n) {
7
7
  if (e.length === 0) return [];
8
8
  if (e.length === 1) return [{
@@ -73,13 +73,16 @@ function D(e) {
73
73
  })];
74
74
  }
75
75
  })), m((r) => {
76
- var a = t("overflow-visible", e.class), o = n(), s = i(), c = `0 0 ${n()} ${i()}`;
77
- return a !== r.e && _(l, "class", r.e = a), o !== r.t && _(l, "width", r.t = o), s !== r.a && _(l, "height", r.a = s), c !== r.o && _(l, "viewBox", r.o = c), r;
76
+ var a = t("overflow-visible", e.class), o = n(), s = i(), c = `0 0 ${n()} ${i()}`, u = e.label ? "img" : void 0, d = e.label, f = e.label ? void 0 : "true";
77
+ return a !== r.e && _(l, "class", r.e = a), o !== r.t && _(l, "width", r.t = o), s !== r.a && _(l, "height", r.a = s), c !== r.o && _(l, "viewBox", r.o = c), u !== r.i && _(l, "role", r.i = u), d !== r.n && _(l, "aria-label", r.n = d), f !== r.s && _(l, "aria-hidden", r.s = f), r;
78
78
  }, {
79
79
  e: void 0,
80
80
  t: void 0,
81
81
  a: void 0,
82
- o: void 0
82
+ o: void 0,
83
+ i: void 0,
84
+ n: void 0,
85
+ s: void 0
83
86
  }), l;
84
87
  })();
85
88
  }
@@ -1020,7 +1023,7 @@ function yt(e) {
1020
1023
  return h(t, () => e.name), m(() => _(t, "href", e.href)), t;
1021
1024
  }
1022
1025
  }), s), h(s, () => a()(e.value)), m((n) => {
1023
- var r = t("absolute inset-y-0 left-0 rounded-md transition-all", o()), a = `${Math.max(e.value / c() * 100, 0)}%`;
1026
+ var r = t("absolute inset-y-0 start-0 rounded-md transition-all", o()), a = `${Math.max(e.value / c() * 100, 0)}%`;
1024
1027
  return r !== n.e && d(i, n.e = r), a !== n.t && v(i, "width", n.t = a), n;
1025
1028
  }, {
1026
1029
  e: void 0,