Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `play()` no longer starts automatic cycling when `autoplay` is disabled.
- Playground examples animate again after switching to another example and back.

### Demo

- UI refinement across the playground: header, theme cycle, toolbar, tabs, dropdowns, sliders and switches.

## [0.1.0] - 2026-11-08

### Added
Expand Down
43 changes: 9 additions & 34 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<header class="site-header">
<div class="site-header-top">
<div class="identity">
<h1>rtl-text-transform</h1>
<h1><a class="site-title" href="./">rtl-text-transform</a></h1>
<span class="version">v0.1.0</span>
</div>
<div class="header-actions">
Expand All @@ -82,40 +82,15 @@ <h1>rtl-text-transform</h1>
aria-label="GitHub"
title="GitHub"
></a>
<a
class="icon-button"
data-icon="play"
href="./playground/"
aria-label="Playground"
title="Playground"
></a>
</nav>
<div class="theme-switch" role="group" aria-label="Theme">
<button
type="button"
data-theme-choice="light"
data-icon="sun"
aria-label="Light"
title="Light"
aria-pressed="false"
></button>
<button
type="button"
data-theme-choice="dark"
data-icon="moon"
aria-label="Dark"
title="Dark"
aria-pressed="false"
></button>
<button
type="button"
data-theme-choice="system"
data-icon="system"
aria-label="System"
title="System"
aria-pressed="false"
></button>
</div>
<button
class="theme-cycle icon-button"
type="button"
data-theme-cycle
data-icon="system"
aria-label="Theme: System"
title="Theme: System"
></button>
</div>
</div>
<p class="tagline">fluid text transition for rtl language</p>
Expand Down
24 changes: 17 additions & 7 deletions demo/inline-slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@

.inline-slider__fill-clip {
position: absolute;
inset: 0 2px;
inset: 3px;
z-index: 0;
overflow: hidden;
border-radius: inherit;
border-radius: 7px;
pointer-events: none;
}

Expand All @@ -101,14 +101,14 @@

.inline-slider__thumb {
position: absolute;
top: 8px;
top: 7px;
left: 0;
z-index: 3;
width: 4px;
height: 24px;
height: 26px;
color: inherit;
pointer-events: none;
transform: translateX(8px);
transform: translateX(3px);
will-change: transform;
}

Expand Down Expand Up @@ -160,9 +160,9 @@
.inline-slider .inline-slider__input[type="range"] {
position: absolute;
top: 0;
right: 12px;
right: 7px;
bottom: 0;
left: 8px;
left: 3px;
z-index: 4;
width: auto;
height: 100%;
Expand Down Expand Up @@ -234,3 +234,13 @@
transition: none;
}
}

@media (max-width: 380px) {
.inline-slider .inline-slider__label {
font-size: 12.5px;
}

.inline-slider .inline-slider__value {
font-size: 12px;
}
}
8 changes: 4 additions & 4 deletions demo/inline-slider.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import "./inline-slider.css";

const TICK_COUNT = 10;
const TRACK_START = 8;
const TRACK_END_INSET = 12;
const TRACK_START = 3;
const TRACK_END_INSET = 7;
const FILL_LEAD = 8;

export interface InlineSlider {
Expand Down Expand Up @@ -117,8 +117,8 @@ export function enhanceInlineSlider(
const x = TRACK_START + progress * (width - TRACK_START - TRACK_END_INSET);
thumb.style.transform = `translateX(${x}px)`;

const fillRight = progress >= 1 ? width - 2 : Math.min(width - 2, x + FILL_LEAD);
fill.style.transform = `translateX(${fillRight - (width - 2)}px)`;
const fillRight = progress >= 1 ? width - 3 : Math.min(width - 3, x + FILL_LEAD);
fill.style.transform = `translateX(${fillRight - (width - 3)}px)`;

const part = Math.max(overlapAt(x, labelStart, labelEnd), overlapAt(x, valueStart, valueEnd));
bar.style.opacity = String(1 - part);
Expand Down
Loading
Loading