@juspay/svelte-ui-components 2.117.0 → 2.118.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.
|
@@ -173,7 +173,9 @@
|
|
|
173
173
|
class={activeSlideIndex == index ? 'active-dot' : 'dot'}
|
|
174
174
|
onclick={() => moveSlideToIndex(index)}
|
|
175
175
|
{onkeydown}
|
|
176
|
-
role="
|
|
176
|
+
role="button"
|
|
177
|
+
tabindex="0"
|
|
178
|
+
aria-label={`Go to slide ${index + 1}`}
|
|
177
179
|
data-pw={typeof dotTestId === 'string' ? `${dotTestId}-${index + 1}` : null}
|
|
178
180
|
testID={typeof dotTestId === 'string' ? `${dotTestId}-${index + 1}` : null}
|
|
179
181
|
></div>
|
|
@@ -216,7 +218,7 @@
|
|
|
216
218
|
width: var(--dot-width, 5px);
|
|
217
219
|
height: var(--dot-height, 5px);
|
|
218
220
|
border-radius: 50%;
|
|
219
|
-
background: #c4c4c4;
|
|
221
|
+
background: var(--carousel-dot-color, #c4c4c4);
|
|
220
222
|
cursor: pointer;
|
|
221
223
|
transition: 0.3s ease;
|
|
222
224
|
}
|
|
@@ -226,7 +228,7 @@
|
|
|
226
228
|
height: var(--dot-height, 5px);
|
|
227
229
|
border-radius: 50%;
|
|
228
230
|
cursor: pointer;
|
|
229
|
-
background: #000000;
|
|
231
|
+
background: var(--carousel-dot-active-color, #000000);
|
|
230
232
|
transition: 0.3s ease;
|
|
231
233
|
}
|
|
232
234
|
/*
|
package/dist/Tabs/Tabs.svelte
CHANGED
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
{#if typeof tabItem?.icon === 'string' && tabItem.icon.length > 0}
|
|
284
284
|
<Img src={tabItem.icon} alt="" fallback="" classes="tabs-item-icon" />
|
|
285
285
|
{/if}
|
|
286
|
-
{label}
|
|
286
|
+
<span class="tabs-item-label" data-text={label}>{label}</span>
|
|
287
287
|
{#if tabItem?.status && tabItem.status !== 'none'}
|
|
288
288
|
<span class="tabs-item-status status-{tabItem.status}" aria-hidden="true"></span>
|
|
289
289
|
{/if}
|
|
@@ -448,6 +448,28 @@
|
|
|
448
448
|
flex-shrink: 0;
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
+
/* Reserves the active-state (bolder) width of the label so selecting a tab
|
|
452
|
+
never reflows the tab bar: without this, .tabs-item.active's font-weight
|
|
453
|
+
jump makes the tab (and every tab after it) physically resize, which
|
|
454
|
+
visibly shifts sibling tabs and defeats the indicator's slide animation
|
|
455
|
+
with a jump. The ::after ghost renders data-text at the active weight
|
|
456
|
+
with height:0/visibility:hidden -- invisible, but its width still sets
|
|
457
|
+
the shrink-to-fit width of the inline-block label, so the box is already
|
|
458
|
+
as wide as the active state needs even while showing the lighter weight. */
|
|
459
|
+
.tabs-item-label {
|
|
460
|
+
position: relative;
|
|
461
|
+
display: inline-block;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.tabs-item-label::after {
|
|
465
|
+
content: attr(data-text);
|
|
466
|
+
display: block;
|
|
467
|
+
height: 0;
|
|
468
|
+
overflow: hidden;
|
|
469
|
+
visibility: hidden;
|
|
470
|
+
font-weight: var(--tabs-active-font-weight, 600);
|
|
471
|
+
}
|
|
472
|
+
|
|
451
473
|
/* Trailing status dot for nav/menu tabs. margin-left:auto pushes it to the row's
|
|
452
474
|
end (e.g. a settings menu); harmless on a normal tab bar where the item shrinks
|
|
453
475
|
to content. */
|