@juspay/svelte-ui-components 2.45.0 → 2.46.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.
|
@@ -139,9 +139,10 @@
|
|
|
139
139
|
}
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
// Clicks on the search input are handled above (kept open while typing), so a click
|
|
143
|
+
// on the trigger chrome — including the chevron — can toggle even for a multi-select
|
|
144
|
+
// searchable Select. The previous multiple && searchable branch never closed on click.
|
|
145
|
+
if (open) {
|
|
145
146
|
close();
|
|
146
147
|
} else {
|
|
147
148
|
openDropdown();
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
step = 1,
|
|
9
9
|
disabled = false,
|
|
10
10
|
showValue = false,
|
|
11
|
+
labelFormatter,
|
|
11
12
|
testId,
|
|
12
13
|
onchange,
|
|
13
14
|
oninput,
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
}: SliderProperties = $props();
|
|
16
17
|
|
|
17
18
|
let percentage = $derived(((value - min) / (max - min)) * 100);
|
|
19
|
+
let displayValue = $derived(labelFormatter ? labelFormatter(value) : String(value));
|
|
18
20
|
|
|
19
21
|
function handleInput(e: Event) {
|
|
20
22
|
if (e.target instanceof HTMLInputElement) {
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
style="--slider-fill-percent: {percentage}%"
|
|
47
49
|
/>
|
|
48
50
|
{#if showValue}
|
|
49
|
-
<span class="slider-value">{
|
|
51
|
+
<span class="slider-value">{displayValue}</span>
|
|
50
52
|
{/if}
|
|
51
53
|
</div>
|
|
52
54
|
|
|
@@ -99,8 +101,11 @@
|
|
|
99
101
|
background: var(--slider-thumb-background, #ffffff);
|
|
100
102
|
border: var(--slider-thumb-border, 2px solid #2196f3);
|
|
101
103
|
box-shadow: var(--slider-thumb-shadow, 0 1px 3px rgba(0, 0, 0, 0.2));
|
|
104
|
+
opacity: var(--slider-thumb-opacity, 1);
|
|
102
105
|
cursor: pointer;
|
|
103
|
-
transition:
|
|
106
|
+
transition:
|
|
107
|
+
transform 0.15s ease,
|
|
108
|
+
opacity 0.15s ease;
|
|
104
109
|
}
|
|
105
110
|
|
|
106
111
|
.slider-input::-moz-range-thumb {
|
|
@@ -110,16 +115,21 @@
|
|
|
110
115
|
background: var(--slider-thumb-background, #ffffff);
|
|
111
116
|
border: var(--slider-thumb-border, 2px solid #2196f3);
|
|
112
117
|
box-shadow: var(--slider-thumb-shadow, 0 1px 3px rgba(0, 0, 0, 0.2));
|
|
118
|
+
opacity: var(--slider-thumb-opacity, 1);
|
|
113
119
|
cursor: pointer;
|
|
114
|
-
transition:
|
|
120
|
+
transition:
|
|
121
|
+
transform 0.15s ease,
|
|
122
|
+
opacity 0.15s ease;
|
|
115
123
|
}
|
|
116
124
|
|
|
117
125
|
.slider-input:hover::-webkit-slider-thumb {
|
|
118
126
|
transform: scale(var(--slider-thumb-hover-scale, 1.15));
|
|
127
|
+
opacity: var(--slider-thumb-hover-opacity, var(--slider-thumb-opacity, 1));
|
|
119
128
|
}
|
|
120
129
|
|
|
121
130
|
.slider-input:hover::-moz-range-thumb {
|
|
122
131
|
transform: scale(var(--slider-thumb-hover-scale, 1.15));
|
|
132
|
+
opacity: var(--slider-thumb-hover-opacity, var(--slider-thumb-opacity, 1));
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
.slider-input:focus-visible::-webkit-slider-thumb {
|