@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/lib/anchored.d.ts
CHANGED
|
@@ -14,3 +14,10 @@ export interface AnchorReflowOptions {
|
|
|
14
14
|
* from any ancestor container, and scroll events do not bubble to `window`.
|
|
15
15
|
*/
|
|
16
16
|
export declare function createAnchorReflow(options: AnchorReflowOptions): () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Viewport `left` for a fixed panel aligned with its trigger's inline-start edge,
|
|
19
|
+
* kept 8px inside the viewport. Under `dir="rtl"` that is the trigger's right
|
|
20
|
+
* edge, so the panel extends leftwards. The direction is read from the trigger,
|
|
21
|
+
* which also works for a `dir` set by a provider or an ancestor element.
|
|
22
|
+
*/
|
|
23
|
+
export declare function anchoredLeft(anchor: HTMLElement, panelWidth: number): number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
/** Text direction supported by {@link DirectionProvider}. */
|
|
3
|
+
export type Direction = 'ltr' | 'rtl';
|
|
4
|
+
/** Accessor of the nearest provider's direction, or `undefined` outside one. */
|
|
5
|
+
export declare const DirectionContext: import('solid-js').Context<Accessor<Direction> | undefined>;
|
|
6
|
+
/**
|
|
7
|
+
* Maps a physical horizontal arrow key to the key that means the same thing in
|
|
8
|
+
* reading order: under `rtl`, ArrowLeft moves forward and ArrowRight back, so
|
|
9
|
+
* handlers written for LTR can run on the swapped key. Other keys pass through.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readingKey(key: string, dir: Direction): string;
|
|
12
|
+
/**
|
|
13
|
+
* `ref` for a portal container (Solid `Portal` or any Kobalte `*.Portal`).
|
|
14
|
+
* Copies the nearest `DirectionProvider`'s direction onto the container so the
|
|
15
|
+
* overlay renders in the same direction as the tree that opened it. Outside a
|
|
16
|
+
* provider it does nothing, so the overlay inherits from `<body>` as before.
|
|
17
|
+
*/
|
|
18
|
+
export declare function portalDir(el: Element): void;
|
package/dist/styles.css
CHANGED
|
@@ -134,11 +134,22 @@ body {
|
|
|
134
134
|
animation: modal-content-out 0.15s ease-in;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/* Reading direction as a number, so horizontal slide offsets can mirror:
|
|
138
|
+
`translateX(calc(16px * var(--dir-x)))`. Inherited, so any element (including
|
|
139
|
+
portaled overlays, which get their own `dir`) sees the nearest `dir`. */
|
|
140
|
+
:root,
|
|
141
|
+
[dir='ltr'] {
|
|
142
|
+
--dir-x: 1;
|
|
143
|
+
}
|
|
144
|
+
[dir='rtl'] {
|
|
145
|
+
--dir-x: -1;
|
|
146
|
+
}
|
|
147
|
+
|
|
137
148
|
/* Toast — same animationend-only presence mechanism as Dialog. */
|
|
138
149
|
@keyframes toast-in {
|
|
139
150
|
from {
|
|
140
151
|
opacity: 0;
|
|
141
|
-
transform: translateX(16px);
|
|
152
|
+
transform: translateX(calc(16px * var(--dir-x, 1)));
|
|
142
153
|
}
|
|
143
154
|
to {
|
|
144
155
|
opacity: 1;
|
|
@@ -152,7 +163,7 @@ body {
|
|
|
152
163
|
}
|
|
153
164
|
to {
|
|
154
165
|
opacity: 0;
|
|
155
|
-
transform: translateX(16px);
|
|
166
|
+
transform: translateX(calc(16px * var(--dir-x, 1)));
|
|
156
167
|
}
|
|
157
168
|
}
|
|
158
169
|
.toast-item[data-opened] {
|
|
@@ -167,7 +178,7 @@ body {
|
|
|
167
178
|
on every theme; the sweep is a pure CSS animation (no engine). */
|
|
168
179
|
@keyframes skeleton-shimmer {
|
|
169
180
|
100% {
|
|
170
|
-
transform: translateX(100%);
|
|
181
|
+
transform: translateX(calc(100% * var(--dir-x, 1)));
|
|
171
182
|
}
|
|
172
183
|
}
|
|
173
184
|
.skeleton-shimmer {
|
|
@@ -178,8 +189,13 @@ body {
|
|
|
178
189
|
content: '';
|
|
179
190
|
position: absolute;
|
|
180
191
|
inset: 0;
|
|
181
|
-
transform: translateX(-100%);
|
|
182
|
-
background: linear-gradient(
|
|
192
|
+
transform: translateX(calc(-100% * var(--dir-x, 1)));
|
|
193
|
+
background: linear-gradient(
|
|
194
|
+
calc(90deg * var(--dir-x, 1)),
|
|
195
|
+
transparent,
|
|
196
|
+
hsl(var(--foreground) / 0.08),
|
|
197
|
+
transparent
|
|
198
|
+
);
|
|
183
199
|
animation: skeleton-shimmer 1.5s ease-in-out infinite;
|
|
184
200
|
}
|
|
185
201
|
|
|
@@ -298,7 +314,7 @@ body {
|
|
|
298
314
|
@keyframes questionnaire-step-in {
|
|
299
315
|
from {
|
|
300
316
|
opacity: 0;
|
|
301
|
-
transform: translateX(16px);
|
|
317
|
+
transform: translateX(calc(16px * var(--dir-x, 1)));
|
|
302
318
|
}
|
|
303
319
|
to {
|
|
304
320
|
opacity: 1;
|
|
@@ -308,7 +324,7 @@ body {
|
|
|
308
324
|
@keyframes questionnaire-step-in-back {
|
|
309
325
|
from {
|
|
310
326
|
opacity: 0;
|
|
311
|
-
transform: translateX(-16px);
|
|
327
|
+
transform: translateX(calc(-16px * var(--dir-x, 1)));
|
|
312
328
|
}
|
|
313
329
|
to {
|
|
314
330
|
opacity: 1;
|
|
@@ -342,7 +358,7 @@ body {
|
|
|
342
358
|
@keyframes navmenu-from-start {
|
|
343
359
|
from {
|
|
344
360
|
opacity: 0;
|
|
345
|
-
transform: translateX(-2.5rem);
|
|
361
|
+
transform: translateX(calc(-2.5rem * var(--dir-x, 1)));
|
|
346
362
|
}
|
|
347
363
|
to {
|
|
348
364
|
opacity: 1;
|
|
@@ -352,7 +368,7 @@ body {
|
|
|
352
368
|
@keyframes navmenu-from-end {
|
|
353
369
|
from {
|
|
354
370
|
opacity: 0;
|
|
355
|
-
transform: translateX(2.5rem);
|
|
371
|
+
transform: translateX(calc(2.5rem * var(--dir-x, 1)));
|
|
356
372
|
}
|
|
357
373
|
to {
|
|
358
374
|
opacity: 1;
|
|
@@ -367,7 +383,7 @@ body {
|
|
|
367
383
|
to {
|
|
368
384
|
opacity: 0;
|
|
369
385
|
visibility: hidden;
|
|
370
|
-
transform: translateX(-2.5rem);
|
|
386
|
+
transform: translateX(calc(-2.5rem * var(--dir-x, 1)));
|
|
371
387
|
}
|
|
372
388
|
}
|
|
373
389
|
@keyframes navmenu-to-end {
|
|
@@ -378,7 +394,7 @@ body {
|
|
|
378
394
|
to {
|
|
379
395
|
opacity: 0;
|
|
380
396
|
visibility: hidden;
|
|
381
|
-
transform: translateX(2.5rem);
|
|
397
|
+
transform: translateX(calc(2.5rem * var(--dir-x, 1)));
|
|
382
398
|
}
|
|
383
399
|
}
|
|
384
400
|
.navmenu-viewport[data-expanded] {
|