@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.
- 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 +8 -4
- 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 +9 -5
- 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 +29 -8
- 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 +9 -5
- 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 +9 -5
- 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/src/ui/TimeField.tsx
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { Clock } from 'lucide-solid'
|
|
7
7
|
import type { JSX } from 'solid-js'
|
|
8
8
|
import { For, Show, createEffect, createMemo, createSignal, onCleanup } from 'solid-js'
|
|
9
|
-
import { Portal } from '
|
|
9
|
+
import { Portal } from './Portal'
|
|
10
10
|
|
|
11
|
-
import { createAnchorReflow } from '../lib/anchored'
|
|
11
|
+
import { anchoredLeft, createAnchorReflow } from '../lib/anchored'
|
|
12
12
|
import { cn } from '../lib/cn'
|
|
13
13
|
|
|
14
14
|
type AmPm = 'AM' | 'PM'
|
|
@@ -108,7 +108,7 @@ export function TimeField(props: TimeFieldProps): JSX.Element {
|
|
|
108
108
|
if (!btnRef) return
|
|
109
109
|
const r = btnRef.getBoundingClientRect()
|
|
110
110
|
const w = popWidth()
|
|
111
|
-
const left =
|
|
111
|
+
const left = anchoredLeft(btnRef, w)
|
|
112
112
|
setPos({ top: r.bottom + 4, left })
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -200,7 +200,7 @@ export function TimeField(props: TimeFieldProps): JSX.Element {
|
|
|
200
200
|
|
|
201
201
|
const optionClass = (selected: boolean) =>
|
|
202
202
|
cn(
|
|
203
|
-
'rounded-md px-2 py-1 text-
|
|
203
|
+
'rounded-md px-2 py-1 text-start text-sm transition-colors',
|
|
204
204
|
selected ? 'bg-primary text-primary-foreground' : 'text-foreground hover:bg-muted',
|
|
205
205
|
)
|
|
206
206
|
|
|
@@ -211,7 +211,7 @@ export function TimeField(props: TimeFieldProps): JSX.Element {
|
|
|
211
211
|
type="button"
|
|
212
212
|
disabled={props.disabled}
|
|
213
213
|
onClick={() => (open() ? close() : openPopover())}
|
|
214
|
-
class="flex w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-2 text-
|
|
214
|
+
class="flex w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-2 text-start text-sm text-foreground outline-none transition-colors a4-field disabled:cursor-not-allowed disabled:opacity-50"
|
|
215
215
|
>
|
|
216
216
|
<span class={displayLabel(props.value, props.hour12 ?? false) ? '' : 'text-muted-foreground'}>
|
|
217
217
|
{displayLabel(props.value, props.hour12 ?? false) ?? props.label ?? 'Select time'}
|
|
@@ -226,12 +226,12 @@ export function TimeField(props: TimeFieldProps): JSX.Element {
|
|
|
226
226
|
data-a4-floating
|
|
227
227
|
style={{ position: 'fixed', top: `${pos().top}px`, left: `${pos().left}px` }}
|
|
228
228
|
class={cn(
|
|
229
|
-
'pointer-events-auto z-50 flex gap-1 divide-x divide-border rounded-lg border border-border bg-card p-2 text-card-foreground shadow-lg',
|
|
229
|
+
'pointer-events-auto z-50 flex gap-1 divide-x rtl:divide-x-reverse divide-border rounded-lg border border-border bg-card p-2 text-card-foreground shadow-lg',
|
|
230
230
|
props.hour12 ? 'w-56' : 'w-44',
|
|
231
231
|
)}
|
|
232
232
|
>
|
|
233
233
|
<div
|
|
234
|
-
class="flex max-h-56 flex-1 flex-col gap-0.5 overflow-y-auto
|
|
234
|
+
class="flex max-h-56 flex-1 flex-col gap-0.5 overflow-y-auto pe-1"
|
|
235
235
|
role="listbox"
|
|
236
236
|
aria-label="Hour"
|
|
237
237
|
>
|
|
@@ -278,7 +278,7 @@ export function TimeField(props: TimeFieldProps): JSX.Element {
|
|
|
278
278
|
|
|
279
279
|
<Show when={props.hour12}>
|
|
280
280
|
<div
|
|
281
|
-
class="flex max-h-56 flex-1 flex-col gap-0.5 overflow-y-auto
|
|
281
|
+
class="flex max-h-56 flex-1 flex-col gap-0.5 overflow-y-auto ps-1"
|
|
282
282
|
role="listbox"
|
|
283
283
|
aria-label="AM or PM"
|
|
284
284
|
>
|
package/src/ui/Timeline.tsx
CHANGED
|
@@ -55,12 +55,12 @@ export function Timeline(props: TimelineProps): JSX.Element {
|
|
|
55
55
|
<ol class={cn('relative flex flex-col gap-6', props.class)}>
|
|
56
56
|
<For each={props.items}>
|
|
57
57
|
{(item, index) => (
|
|
58
|
-
<li class="relative flex gap-4
|
|
58
|
+
<li class="relative flex gap-4 ps-2">
|
|
59
59
|
{/* Line segment: hidden on the last item so it doesn't extend past the dot. */}
|
|
60
60
|
<Show when={index() < props.items.length - 1}>
|
|
61
61
|
<span
|
|
62
62
|
aria-hidden="true"
|
|
63
|
-
class="absolute
|
|
63
|
+
class="absolute start-[calc(0.5rem+0.375rem)] top-3 -bottom-6 w-px -translate-x-1/2 bg-border"
|
|
64
64
|
/>
|
|
65
65
|
</Show>
|
|
66
66
|
<span
|
package/src/ui/Toast.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import type { JSX } from 'solid-js'
|
|
|
6
6
|
import { Show } from 'solid-js'
|
|
7
7
|
|
|
8
8
|
import { cn } from '../lib/cn'
|
|
9
|
+
import { useDirection } from './DirectionProvider'
|
|
9
10
|
|
|
10
11
|
/** Visual/semantic tone of a toast — controls its border/background accent color. */
|
|
11
12
|
export type ToastTone = 'success' | 'error' | 'info'
|
|
@@ -58,11 +59,16 @@ export const toast = {
|
|
|
58
59
|
info: (title: string, description?: string) => show('info', title, description),
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Mount once near the app root — hosts the toast viewport. Mount it inside a
|
|
64
|
+
* `DirectionProvider` for RTL: the viewport sits in the end corner (the left
|
|
65
|
+
* one under RTL) and swipe-to-dismiss follows the direction.
|
|
66
|
+
*/
|
|
62
67
|
export function Toaster(): JSX.Element {
|
|
68
|
+
const dir = useDirection()
|
|
63
69
|
return (
|
|
64
|
-
<KToast.Region duration={5000} swipeDirection=
|
|
65
|
-
<KToast.List class="fixed bottom-4
|
|
70
|
+
<KToast.Region duration={5000} swipeDirection={dir() === 'rtl' ? 'left' : 'right'}>
|
|
71
|
+
<KToast.List class="fixed bottom-4 end-4 z-50 flex w-80 flex-col gap-2 outline-none" />
|
|
66
72
|
</KToast.Region>
|
|
67
73
|
)
|
|
68
74
|
}
|
|
@@ -46,11 +46,11 @@ export function ToolCallTimeline(props: ToolCallTimelineProps): JSX.Element {
|
|
|
46
46
|
<ol class={cn('relative flex flex-col gap-4', props.class)}>
|
|
47
47
|
<For each={props.calls}>
|
|
48
48
|
{(call, index) => (
|
|
49
|
-
<li class="relative flex gap-3
|
|
49
|
+
<li class="relative flex gap-3 ps-1">
|
|
50
50
|
<Show when={index() < props.calls.length - 1}>
|
|
51
51
|
<span
|
|
52
52
|
aria-hidden="true"
|
|
53
|
-
class="absolute
|
|
53
|
+
class="absolute start-[calc(0.5rem+2px)] top-6 -bottom-4 w-px -translate-x-1/2 bg-border"
|
|
54
54
|
/>
|
|
55
55
|
</Show>
|
|
56
56
|
<StatusNode status={call.status} />
|
package/src/ui/Tooltip.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import { Tooltip as KTooltip } from '@kobalte/core/tooltip'
|
|
|
3
3
|
import type { JSX, ParentProps } from 'solid-js'
|
|
4
4
|
|
|
5
5
|
import { cn } from '../lib/cn'
|
|
6
|
+
import { portalDir } from '../lib/direction'
|
|
6
7
|
|
|
7
8
|
interface TooltipProps extends ParentProps {
|
|
8
9
|
/** Content shown inside the tooltip popover. */
|
|
@@ -26,7 +27,7 @@ export function Tooltip(props: TooltipProps): JSX.Element {
|
|
|
26
27
|
return (
|
|
27
28
|
<KTooltip>
|
|
28
29
|
<KTooltip.Trigger class="inline-flex">{props.children}</KTooltip.Trigger>
|
|
29
|
-
<KTooltip.Portal>
|
|
30
|
+
<KTooltip.Portal ref={portalDir}>
|
|
30
31
|
<KTooltip.Content
|
|
31
32
|
class={cn(
|
|
32
33
|
'z-50 rounded-md border border-border bg-card px-2.5 py-1.5 text-xs text-card-foreground shadow-md',
|
package/src/ui/Tour.tsx
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// highlight.
|
|
9
9
|
import type { JSX } from 'solid-js'
|
|
10
10
|
import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js'
|
|
11
|
-
import { Portal } from '
|
|
11
|
+
import { Portal } from './Portal'
|
|
12
12
|
|
|
13
13
|
import { cn } from '../lib/cn'
|
|
14
14
|
import { Button } from './Button'
|
|
@@ -86,7 +86,7 @@ export function TransactionFeed(props: TransactionFeedProps): JSX.Element {
|
|
|
86
86
|
<p class="truncate text-xs text-muted-foreground">{tx.subtitle}</p>
|
|
87
87
|
</Show>
|
|
88
88
|
</div>
|
|
89
|
-
<div class="shrink-0 text-
|
|
89
|
+
<div class="shrink-0 text-end">
|
|
90
90
|
<p
|
|
91
91
|
class={cn(
|
|
92
92
|
'text-sm font-medium tabular-nums',
|
package/src/ui/Transfer.tsx
CHANGED
|
@@ -100,10 +100,10 @@ export function Transfer(props: TransferProps): JSX.Element {
|
|
|
100
100
|
{pane(titles()[0], available)}
|
|
101
101
|
<div class="flex flex-col items-center justify-center gap-2">
|
|
102
102
|
<Button variant="outline" class="px-2" onClick={moveRight} aria-label="Move to selected">
|
|
103
|
-
<ChevronRight class="h-4 w-4" />
|
|
103
|
+
<ChevronRight class="h-4 w-4 rtl:-scale-x-100" />
|
|
104
104
|
</Button>
|
|
105
105
|
<Button variant="outline" class="px-2" onClick={moveLeft} aria-label="Move to available">
|
|
106
|
-
<ChevronLeft class="h-4 w-4" />
|
|
106
|
+
<ChevronLeft class="h-4 w-4 rtl:-scale-x-100" />
|
|
107
107
|
</Button>
|
|
108
108
|
</div>
|
|
109
109
|
{pane(titles()[1], chosen)}
|
package/src/ui/Tree.tsx
CHANGED
|
@@ -64,14 +64,14 @@ export function Tree(props: TreeProps): JSX.Element {
|
|
|
64
64
|
<li role="treeitem" aria-expanded={hasChildren() ? isExpanded() : undefined}>
|
|
65
65
|
<div
|
|
66
66
|
class="flex items-center gap-1.5 rounded-md px-2 py-1 text-sm text-foreground hover:bg-muted cursor-pointer"
|
|
67
|
-
style={{ 'padding-
|
|
67
|
+
style={{ 'padding-inline-start': `${nodeProps.depth * 1 + 0.5}rem` }}
|
|
68
68
|
onClick={() => hasChildren() && toggle(nodeProps.node.id)}
|
|
69
69
|
>
|
|
70
70
|
<Show when={hasChildren()} fallback={<span class="h-3.5 w-3.5 shrink-0" aria-hidden="true" />}>
|
|
71
71
|
<ChevronRight
|
|
72
72
|
class={cn(
|
|
73
73
|
'h-3.5 w-3.5 shrink-0 transition-transform duration-200',
|
|
74
|
-
isExpanded()
|
|
74
|
+
isExpanded() ? 'rotate-90' : 'rtl:-scale-x-100',
|
|
75
75
|
)}
|
|
76
76
|
aria-hidden="true"
|
|
77
77
|
/>
|
package/src/ui/TreeSelect.tsx
CHANGED
|
@@ -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-
|
|
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()
|
|
107
|
+
isExpanded() ? 'rotate-90' : 'rtl:-scale-x-100',
|
|
108
108
|
)}
|
|
109
109
|
aria-hidden="true"
|
|
110
110
|
/>
|
package/src/ui/TreeTable.tsx
CHANGED
|
@@ -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-
|
|
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-
|
|
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()
|
|
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-
|
|
162
|
+
<TableHeadCell class={cn(col.align === 'right' && 'text-end')}>{col.header}</TableHeadCell>
|
|
163
163
|
)}
|
|
164
164
|
</For>
|
|
165
165
|
</TableRow>
|
package/src/ui/UsageMeter.tsx
CHANGED
|
@@ -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="
|
|
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="
|
|
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="
|
|
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>
|