refactor(ui): localize component styles

This commit is contained in:
2026-08-09 13:47:01 +05:30
parent b6bd5cfcb7
commit 54a93c1d14
37 changed files with 4508 additions and 3832 deletions
+137
View File
@@ -68,4 +68,141 @@ component RangeSlider {
{#if helperText}<small class="wire-next__field-help">{helperText}</small>{/if}<small class="wire-next__field-error" data-error="{name}">{error}</small>
</div>
}
style {
.wire-next__range-track {
display: grid;
flex: 1;
min-width: 0;
gap: 0.35rem;
}
.wire-next__range-control input {
width: 100%;
min-width: 0;
margin: 0;
flex: 1;
accent-color: var(--wire-field-color);
}
.wire-next__custom-slider {
position: relative;
width: 100%;
height: 1.5rem;
cursor: pointer;
touch-action: none;
}
.wire-next__custom-slider::before,
.wire-next__slider-fill {
position: absolute;
top: 50%;
height: 0.4rem;
border-radius: 999px;
transform: translateY(-50%);
content: "";
}
.wire-next__custom-slider::before {
right: 0;
left: 0;
background: var(--wire-color-surface-2);
box-shadow: inset 0 0 0 1px var(--wire-color-border);
}
.wire-next__slider-fill {
z-index: 1;
left: 0;
width: var(--wire-range-progress);
background: var(--wire-field-color);
}
.wire-next__slider-thumb {
position: absolute;
z-index: 3;
top: 50%;
left: var(--wire-range-progress);
width: 1.25rem;
height: 1.25rem;
border: 3px solid var(--wire-field-color);
border-radius: 50%;
background: var(--wire-color-surface);
box-shadow: var(--wire-shadow-1);
transform: translate(-50%, -50%);
}
.wire-next__custom-slider:focus-visible {
outline: 3px solid color-mix(in srgb, var(--wire-field-color) 28%, transparent);
outline-offset: 3px;
}
.wire-next__slider-marks button {
position: absolute;
z-index: 2;
top: 50%;
width: 0.55rem;
height: 0.55rem;
padding: 0;
border: 2px solid var(--wire-color-surface);
border-radius: 50%;
background: var(--wire-color-muted);
transform: translate(-50%, -50%);
}
.wire-next__range-control[data-show-steps="true"] input {
background-image: repeating-linear-gradient(
90deg,
transparent 0,
transparent calc(10% - 1px),
var(--wire-color-border) calc(10% - 1px),
var(--wire-color-border) 10%
);
}
.wire-next__range-bounds {
display: grid;
grid-template-columns: 1fr auto 1fr;
color: var(--wire-color-muted);
font-size: 0.78em;
font-variant-numeric: tabular-nums;
}
.wire-next__range-bounds span:nth-child(2) {
text-align: center;
}
.wire-next__range-bounds span:last-child {
text-align: right;
}
.wire-next__range-control output {
min-width: 3ch;
font-variant-numeric: tabular-nums;
}
.wire-next__range-stepper {
display: inline-grid;
width: 2.35rem;
height: 2.35rem;
flex: 0 0 auto;
place-items: center;
border: 1px solid var(--wire-color-border);
border-radius: 50%;
background: var(--wire-color-surface);
color: var(--wire-color-text);
font: inherit;
font-size: 1.2rem;
cursor: pointer;
}
.wire-next__range-stepper:hover:not(:disabled) {
border-color: var(--wire-field-color);
color: var(--wire-field-color);
}
.wire-next__range-stepper:disabled {
cursor: not-allowed;
opacity: 0.45;
}
}
}