@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
@@ -97,14 +97,14 @@ export function TreeSelect(props: TreeSelectProps): JSX.Element {
97
97
  'flex items-center gap-1.5 rounded-md px-2 py-1 text-sm text-foreground hover:bg-muted cursor-pointer',
98
98
  isSelected() && 'bg-accent text-accent-foreground',
99
99
  )}
100
- style={{ 'padding-left': `${nodeProps.depth * 1 + 0.5}rem` }}
100
+ style={{ 'padding-inline-start': `${nodeProps.depth * 1 + 0.5}rem` }}
101
101
  onClick={() => (hasChildren() ? toggle(nodeProps.node.id) : select(nodeProps.node))}
102
102
  >
103
103
  <Show when={hasChildren()} fallback={<span class="h-3.5 w-3.5 shrink-0" aria-hidden="true" />}>
104
104
  <ChevronRight
105
105
  class={cn(
106
106
  'h-3.5 w-3.5 shrink-0 transition-transform duration-200',
107
- isExpanded() && 'rotate-90',
107
+ isExpanded() ? 'rotate-90' : 'rtl:-scale-x-100',
108
108
  )}
109
109
  aria-hidden="true"
110
110
  />
@@ -100,7 +100,7 @@ export function TreeTable<T>(props: TreeTableProps<T>): JSX.Element {
100
100
  <TableRow>
101
101
  <For each={props.columns}>
102
102
  {(col, colIndex) => (
103
- <TableCell class={cn(col.align === 'right' && 'text-right tabular-nums')}>
103
+ <TableCell class={cn(col.align === 'right' && 'text-end tabular-nums')}>
104
104
  <Show
105
105
  when={colIndex() === 0}
106
106
  fallback={
@@ -111,7 +111,7 @@ export function TreeTable<T>(props: TreeTableProps<T>): JSX.Element {
111
111
  >
112
112
  <div
113
113
  class="flex items-center gap-1.5"
114
- style={{ 'padding-left': `${rowsProps.depth * 1}rem` }}
114
+ style={{ 'padding-inline-start': `${rowsProps.depth * 1}rem` }}
115
115
  >
116
116
  <Show
117
117
  when={hasChildren()}
@@ -127,7 +127,7 @@ export function TreeTable<T>(props: TreeTableProps<T>): JSX.Element {
127
127
  <ChevronRight
128
128
  class={cn(
129
129
  'h-3.5 w-3.5 transition-transform duration-200',
130
- isExpanded() && 'rotate-90',
130
+ isExpanded() ? 'rotate-90' : 'rtl:-scale-x-100',
131
131
  )}
132
132
  aria-hidden="true"
133
133
  />
@@ -159,7 +159,7 @@ export function TreeTable<T>(props: TreeTableProps<T>): JSX.Element {
159
159
  <TableRow>
160
160
  <For each={props.columns}>
161
161
  {(col) => (
162
- <TableHeadCell class={cn(col.align === 'right' && 'text-right')}>{col.header}</TableHeadCell>
162
+ <TableHeadCell class={cn(col.align === 'right' && 'text-end')}>{col.header}</TableHeadCell>
163
163
  )}
164
164
  </For>
165
165
  </TableRow>
@@ -51,7 +51,7 @@ export function UsageMeter(props: UsageMeterProps): JSX.Element {
51
51
  <Show when={props.label}>
52
52
  <KMeter.Label>{props.label}</KMeter.Label>
53
53
  </Show>
54
- <KMeter.ValueLabel class="ml-auto tabular-nums text-muted-foreground" />
54
+ <KMeter.ValueLabel class="ms-auto tabular-nums text-muted-foreground" />
55
55
  </div>
56
56
  <KMeter.Track class="h-2 overflow-hidden rounded-full bg-muted">
57
57
  <KMeter.Fill
@@ -242,7 +242,7 @@ export function VideoPlayerShell(props: VideoPlayerShellProps): JSX.Element {
242
242
  {formatTime(currentTime())} / {formatTime(duration())}
243
243
  </span>
244
244
 
245
- <div class="ml-1 flex items-center gap-1">
245
+ <div class="ms-1 flex items-center gap-1">
246
246
  <button type="button" aria-label={muted() ? 'Unmute' : 'Mute'} onClick={toggleMute} class="p-1">
247
247
  <Show when={!muted() && volume() > 0} fallback={<VolumeX class="h-4 w-4" />}>
248
248
  <Volume2 class="h-4 w-4" />
@@ -260,7 +260,7 @@ export function VideoPlayerShell(props: VideoPlayerShellProps): JSX.Element {
260
260
  />
261
261
  </div>
262
262
 
263
- <div class="ml-auto flex items-center gap-2">
263
+ <div class="ms-auto flex items-center gap-2">
264
264
  <Show when={pipSupported()}>
265
265
  <button type="button" aria-label="Picture in picture" onClick={togglePip} class="p-1">
266
266
  <PictureInPicture2 class="h-4 w-4" />
@@ -127,7 +127,7 @@ export function CalendarCore(props: CalendarCoreProps): JSX.Element {
127
127
  aria-label="Previous"
128
128
  onClick={() => (mode() === 'months' ? stepYear(-1) : setYearBase(yearBase() - YEARS_PER_PAGE))}
129
129
  >
130
- <ChevronLeft class="h-4 w-4" />
130
+ <ChevronLeft class="h-4 w-4 rtl:-scale-x-100" />
131
131
  </button>
132
132
  <button type="button" class={headerLabel} onClick={() => setMode('days')}>
133
133
  <Show when={mode() === 'months'} fallback={`${years()[0]} – ${years()[YEARS_PER_PAGE - 1]}`}>
@@ -140,7 +140,7 @@ export function CalendarCore(props: CalendarCoreProps): JSX.Element {
140
140
  aria-label="Next"
141
141
  onClick={() => (mode() === 'months' ? stepYear(1) : setYearBase(yearBase() + YEARS_PER_PAGE))}
142
142
  >
143
- <ChevronRight class="h-4 w-4" />
143
+ <ChevronRight class="h-4 w-4 rtl:-scale-x-100" />
144
144
  </button>
145
145
  </div>
146
146
  }
@@ -148,10 +148,10 @@ export function CalendarCore(props: CalendarCoreProps): JSX.Element {
148
148
  <div class="mb-2 flex items-center justify-between gap-1">
149
149
  <div class="flex items-center">
150
150
  <button type="button" class={navBtn} aria-label="Previous year" onClick={() => stepYear(-1)}>
151
- <ChevronsLeft class="h-4 w-4" />
151
+ <ChevronsLeft class="h-4 w-4 rtl:-scale-x-100" />
152
152
  </button>
153
153
  <button type="button" class={navBtn} aria-label="Previous month" onClick={() => stepMonth(-1)}>
154
- <ChevronLeft class="h-4 w-4" />
154
+ <ChevronLeft class="h-4 w-4 rtl:-scale-x-100" />
155
155
  </button>
156
156
  </div>
157
157
  <div class="flex items-center gap-0.5">
@@ -164,10 +164,10 @@ export function CalendarCore(props: CalendarCoreProps): JSX.Element {
164
164
  </div>
165
165
  <div class="flex items-center">
166
166
  <button type="button" class={navBtn} aria-label="Next month" onClick={() => stepMonth(1)}>
167
- <ChevronRight class="h-4 w-4" />
167
+ <ChevronRight class="h-4 w-4 rtl:-scale-x-100" />
168
168
  </button>
169
169
  <button type="button" class={navBtn} aria-label="Next year" onClick={() => stepYear(1)}>
170
- <ChevronsRight class="h-4 w-4" />
170
+ <ChevronsRight class="h-4 w-4 rtl:-scale-x-100" />
171
171
  </button>
172
172
  </div>
173
173
  </div>