diff --git a/src/uix/eidos/components/carousel/carousel.css b/src/uix/eidos/components/carousel/carousel.css index 16958dc51..368b9ab43 100644 --- a/src/uix/eidos/components/carousel/carousel.css +++ b/src/uix/eidos/components/carousel/carousel.css @@ -55,13 +55,28 @@ * level needs `100%` (or the token at the root) so the basis-100% along * the column main axis resolves to viewport block-size, not content. */ +/* + * Vertical layout flips the root flex axis to row, putting the viewport + * on the left (taking the available inline space) and the indicator + * group on the right as a narrow column of dots. This matches the + * common pattern in Mantine / ark-ui vertical carousels and stops the + * indicator-group from claiming the full inline width as a stretch + * child of a column flex container. + * + * The viewport / item-group / item each take 100% along the block axis + * so slide basis resolves to the bounded block-size. + */ [data-carousel][data-orientation='vertical'] { + flex-direction: row; + align-items: stretch; block-size: var(--_carousel-vertical-block-size); } [data-carousel][data-orientation='vertical'] [data-carousel-viewport] { + flex: 1 1 auto; block-size: 100%; min-block-size: 0; + min-inline-size: 0; } [data-carousel][data-orientation='vertical'] [data-carousel-item-group] { @@ -75,6 +90,13 @@ block-size: 100%; } +/* Indicator group becomes a narrow auto-sized column on the right. */ +[data-carousel][data-orientation='vertical'] [data-carousel-indicator-group] { + flex: 0 0 auto; + inline-size: max-content; + align-self: center; +} + [data-carousel][data-block] { inline-size: 100%; } diff --git a/web/routes/uix/components/carousel/+page.svelte b/web/routes/uix/components/carousel/+page.svelte index 5563e5e02..aa1655fdd 100644 --- a/web/routes/uix/components/carousel/+page.svelte +++ b/web/routes/uix/components/carousel/+page.svelte @@ -43,16 +43,14 @@ let disabled = $state(false); - // i18n — `dir` controls the keyboard arrow semantics (RTL swaps - // next/prev) AND flips the translation sign so horizontal advance - // follows reading direction. `locale` is forwarded for label - // formatting hooks (consumers using lang-aware aria-labels). - type DirCtl = 'auto' | 'ltr' | 'rtl'; - let dirCtl = $state('auto'); + // `dir` controls keyboard arrow semantics (RTL swaps next/prev) and + // flips the translation sign so horizontal advance follows reading + // direction. `locale` is forwarded for downstream lang-aware behavior + // (announcer text, future label formatting). + type Direction = 'ltr' | 'rtl'; + let dir = $state('ltr'); let locale = $state('en-US'); - const dir = $derived(dirCtl === 'auto' ? undefined : dirCtl); - let size = $state('md'); let variant = $state('surface'); let color = $state('primary'); @@ -137,7 +135,6 @@ autoplay && stopOnLastSnap && ' stopOnLastSnap', disabled && ' disabled', dir && ` dir="${dir}"`, - locale !== 'en-US' && ` locale="${locale}"`, '>', ' ', ' ', @@ -460,24 +457,21 @@
soma i18n - - dir flips arrow-key + drag semantics for horizontal RTL; locale is forwarded for downstream label formatting. -
diff --git a/web/routes/uix/components/range-calendar/+page.svelte b/web/routes/uix/components/range-calendar/+page.svelte index 1dd0c4995..b931e2b90 100644 --- a/web/routes/uix/components/range-calendar/+page.svelte +++ b/web/routes/uix/components/range-calendar/+page.svelte @@ -55,12 +55,8 @@ let readonly = $state(false); let weekStartsOn = $state('1'); let locale = $state('en-US'); - // `dir` reflows the calendar header + weekday strip + day grid. `auto` - // inherits the app preference set in the topbar; explicit `ltr`/`rtl` - // overrides it per-instance. - type DirCtl = 'auto' | 'ltr' | 'rtl'; - let dirCtl = $state('auto'); - const dir = $derived(dirCtl === 'auto' ? undefined : dirCtl); + type Direction = 'ltr' | 'rtl'; + let dir = $state('ltr'); let size = $state('md'); let variant = $state('surface'); let color = $state('primary'); @@ -464,22 +460,22 @@ -