44 normalisedClient ,
55 isInRange ,
66 isSelected ,
7- getValueFromIndex
7+ getValueFromIndex ,
8+ isOutOfLimit
89} from " ../utils.js" ;
910export let range = false ;
1011export let min = 0 ;
@@ -16,6 +17,7 @@ export let vertical = false;
1617export let reversed = false ;
1718export let hoverable = true ;
1819export let disabled = false ;
20+ export let limits = null ;
1921export let pipstep = void 0 ;
2022export let all = true ;
2123export let first = void 0 ;
@@ -64,6 +66,7 @@ function labelUp(pipValue, event) {
6466 class = " pip first"
6567 class: selected= {isSelected (min, values, precision)}
6668 class: in - range= {isInRange (min, values, range)}
69+ class: out- of - limit= {isOutOfLimit (min, limits)}
6770 style= " {orientationStart}: 0%;"
6871 data- val= {coerceFloat (min, precision)}
6972 on: pointerdown= {(e ) => {
@@ -91,6 +94,7 @@ function labelUp(pipValue, event) {
9194 class = " pip"
9295 class: selected= {isSelected (val, values, precision)}
9396 class: in - range= {isInRange (val, values, range)}
97+ class: out- of - limit= {isOutOfLimit (val, limits)}
9498 style= " {orientationStart}: {valueAsPercent(val, min, max, precision)}%;"
9599 data- val= {val}
96100 on: pointerdown= {(e ) => {
@@ -117,6 +121,7 @@ function labelUp(pipValue, event) {
117121 class = " pip last"
118122 class: selected= {isSelected (max, values, precision)}
119123 class: in - range= {isInRange (max, values, range)}
124+ class: out- of - limit= {isOutOfLimit (max, limits)}
120125 style= " {orientationStart}: 100%;"
121126 data- val= {coerceFloat (max, precision)}
122127 on: pointerdown= {(e ) => {
@@ -151,6 +156,8 @@ function labelUp(pipValue, event) {
151156 -- pip- hover- text: var (-- range- pip- hover- text, var (-- pip- hover));
152157 -- pip- in - range: var (-- range- pip- in - range, var (-- pip- active));
153158 -- pip- in - range- text: var (-- range- pip- in - range- text, var (-- pip- active- text));
159+ -- pip- out- of - range: var (-- range- pip- out- of - range, #aebecf);
160+ -- pip- out- of - range- text: var (-- range- pip- out- of - range- text, var (-- pip- out- of - range));
154161 }
155162
156163 : global (.rangePips ) {
@@ -225,7 +232,7 @@ function labelUp(pipValue, event) {
225232 background- color: var (-- pip- active);
226233 }
227234
228- : global (.rangePips .hoverable : not (.disabled ) .pip : hover) {
235+ : global (.rangePips .hoverable : not (.disabled ) .pip : not (. out - of - limit) : hover) {
229236 color: darkslategrey;
230237 color: var (-- pip- hover- text);
231238 background- color: darkslategrey;
@@ -239,6 +246,13 @@ function labelUp(pipValue, event) {
239246 background- color: var (-- pip- in - range);
240247 }
241248
249+ : global (.rangePips .pip .out - of - limit ) {
250+ color: #aebecf;
251+ color: var (-- pip- out- of - range- text);
252+ background- color: #aebecf;
253+ background- color: var (-- pip- out- of - range);
254+ }
255+
242256 : global (.rangePips .pip .selected ) {
243257 height: 0 .75em ;
244258 }
@@ -258,11 +272,13 @@ function labelUp(pipValue, event) {
258272 left: 0 .75em ;
259273 }
260274
261- : global (.rangePips .hoverable : not (.disabled ) .pip : not (.selected ): hover) {
275+ : global (.rangePips .hoverable : not (.disabled ) .pip : not (.selected ): not (. out - of - limit) : hover) {
262276 transition: none;
263277 }
264278
265- : global (.rangePips .hoverable : not (.disabled ) .pip : not (.selected ): hover .pipVal ) {
279+ : global (
280+ .rangePips .hoverable : not (.disabled ) .pip : not (.selected ): not (.out - of - limit): hover .pipVal
281+ ) {
266282 transition: none;
267283 font- weight: bold;
268284 }
0 commit comments