ng-primitives 0.74.0 → 0.75.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.
- package/dialog/dialog/dialog-ref.d.ts +2 -2
- package/fesm2022/ng-primitives-dialog.mjs +2 -7
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +428 -1
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/package.json +15 -15
- package/schematics/ng-generate/templates/range-slider/range-slider.__fileSuffix@dasherize__.ts.template +136 -0
- package/slider/index.d.ts +5 -0
- package/slider/range-slider/range-slider/range-slider-state.d.ts +17 -0
- package/slider/range-slider/range-slider/range-slider.d.ts +115 -0
- package/slider/range-slider/range-slider-range/range-slider-range.d.ts +12 -0
- package/slider/range-slider/range-slider-thumb/range-slider-thumb.d.ts +44 -0
- package/slider/range-slider/range-slider-track/range-slider-track.d.ts +22 -0
|
@@ -303,9 +303,436 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
303
303
|
}]
|
|
304
304
|
}], ctorParameters: () => [] });
|
|
305
305
|
|
|
306
|
+
/**
|
|
307
|
+
* The state token for the Range Slider primitive.
|
|
308
|
+
*/
|
|
309
|
+
const NgpRangeSliderStateToken = createStateToken('RangeSlider');
|
|
310
|
+
/**
|
|
311
|
+
* Provides the Range Slider state.
|
|
312
|
+
*/
|
|
313
|
+
const provideRangeSliderState = createStateProvider(NgpRangeSliderStateToken);
|
|
314
|
+
/**
|
|
315
|
+
* Injects the Range Slider state.
|
|
316
|
+
*/
|
|
317
|
+
const injectRangeSliderState = createStateInjector(NgpRangeSliderStateToken);
|
|
318
|
+
/**
|
|
319
|
+
* The Range Slider state registration function.
|
|
320
|
+
*/
|
|
321
|
+
const rangeSliderState = createState(NgpRangeSliderStateToken);
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Apply the `ngpRangeSliderRange` directive to an element that represents the range between the low and high values.
|
|
325
|
+
*/
|
|
326
|
+
class NgpRangeSliderRange {
|
|
327
|
+
constructor() {
|
|
328
|
+
/**
|
|
329
|
+
* Access the range slider state.
|
|
330
|
+
*/
|
|
331
|
+
this.rangeSliderState = injectRangeSliderState();
|
|
332
|
+
}
|
|
333
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpRangeSliderRange, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
334
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpRangeSliderRange, isStandalone: true, selector: "[ngpRangeSliderRange]", host: { properties: { "attr.data-orientation": "rangeSliderState().orientation()", "attr.data-disabled": "rangeSliderState().disabled() ? \"\" : null", "style.width.%": "rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().rangePercentage() : undefined", "style.height.%": "rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().rangePercentage() : undefined", "style.inset-inline-start.%": "rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().lowPercentage() : undefined", "style.inset-block-start.%": "rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().lowPercentage() : undefined" } }, exportAs: ["ngpRangeSliderRange"], ngImport: i0 }); }
|
|
335
|
+
}
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpRangeSliderRange, decorators: [{
|
|
337
|
+
type: Directive,
|
|
338
|
+
args: [{
|
|
339
|
+
selector: '[ngpRangeSliderRange]',
|
|
340
|
+
exportAs: 'ngpRangeSliderRange',
|
|
341
|
+
host: {
|
|
342
|
+
'[attr.data-orientation]': 'rangeSliderState().orientation()',
|
|
343
|
+
'[attr.data-disabled]': 'rangeSliderState().disabled() ? "" : null',
|
|
344
|
+
'[style.width.%]': 'rangeSliderState().orientation() === "horizontal" ? rangeSliderState().rangePercentage() : undefined',
|
|
345
|
+
'[style.height.%]': 'rangeSliderState().orientation() === "vertical" ? rangeSliderState().rangePercentage() : undefined',
|
|
346
|
+
'[style.inset-inline-start.%]': 'rangeSliderState().orientation() === "horizontal" ? rangeSliderState().lowPercentage() : undefined',
|
|
347
|
+
'[style.inset-block-start.%]': 'rangeSliderState().orientation() === "vertical" ? rangeSliderState().lowPercentage() : undefined',
|
|
348
|
+
},
|
|
349
|
+
}]
|
|
350
|
+
}] });
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Apply the `ngpRangeSliderThumb` directive to an element that represents a thumb of the range slider.
|
|
354
|
+
* Each thumb can be configured to control either the 'low' or 'high' value.
|
|
355
|
+
*/
|
|
356
|
+
class NgpRangeSliderThumb {
|
|
357
|
+
constructor() {
|
|
358
|
+
/**
|
|
359
|
+
* Access the range slider state.
|
|
360
|
+
*/
|
|
361
|
+
this.state = injectRangeSliderState();
|
|
362
|
+
/**
|
|
363
|
+
* Access the thumb element.
|
|
364
|
+
*/
|
|
365
|
+
this.elementRef = injectElementRef();
|
|
366
|
+
/**
|
|
367
|
+
* Determines which value this thumb controls ('low' or 'high').
|
|
368
|
+
*/
|
|
369
|
+
this.thumb = computed(() => this.state().thumbs().indexOf(this) === 0 ? 'low' : 'high');
|
|
370
|
+
/**
|
|
371
|
+
* Store the dragging state.
|
|
372
|
+
*/
|
|
373
|
+
this.dragging = false;
|
|
374
|
+
/**
|
|
375
|
+
* Get the current value for this thumb.
|
|
376
|
+
*/
|
|
377
|
+
this.value = computed(() => this.thumb() === 'low' ? this.state().low() : this.state().high());
|
|
378
|
+
/**
|
|
379
|
+
* Get the current percentage for this thumb.
|
|
380
|
+
*/
|
|
381
|
+
this.percentage = computed(() => this.thumb() === 'low' ? this.state().lowPercentage() : this.state().highPercentage());
|
|
382
|
+
setupInteractions({
|
|
383
|
+
hover: true,
|
|
384
|
+
focusVisible: true,
|
|
385
|
+
press: true,
|
|
386
|
+
disabled: this.state().disabled,
|
|
387
|
+
});
|
|
388
|
+
this.state().addThumb(this);
|
|
389
|
+
}
|
|
390
|
+
ngOnDestroy() {
|
|
391
|
+
this.state().removeThumb(this);
|
|
392
|
+
}
|
|
393
|
+
handlePointerDown(event) {
|
|
394
|
+
event.preventDefault();
|
|
395
|
+
if (this.state().disabled()) {
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
this.dragging = true;
|
|
399
|
+
}
|
|
400
|
+
handlePointerUp() {
|
|
401
|
+
if (this.state().disabled()) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
this.dragging = false;
|
|
405
|
+
}
|
|
406
|
+
handlePointerMove(event) {
|
|
407
|
+
if (this.state().disabled() || !this.dragging) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
const rect = this.state().track()?.element.nativeElement.getBoundingClientRect();
|
|
411
|
+
if (!rect) {
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
const percentage = this.state().orientation() === 'horizontal'
|
|
415
|
+
? (event.clientX - rect.left) / rect.width
|
|
416
|
+
: (event.clientY - rect.top) / rect.height;
|
|
417
|
+
const value = this.state().min() +
|
|
418
|
+
(this.state().max() - this.state().min()) * Math.max(0, Math.min(1, percentage));
|
|
419
|
+
// Update the appropriate value based on thumb type
|
|
420
|
+
if (this.thumb() === 'low') {
|
|
421
|
+
this.state().setLowValue(value);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
this.state().setHighValue(value);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Handle keyboard events.
|
|
429
|
+
* @param event
|
|
430
|
+
*/
|
|
431
|
+
handleKeydown(event) {
|
|
432
|
+
const multiplier = event.shiftKey ? 10 : 1;
|
|
433
|
+
const currentValue = this.value();
|
|
434
|
+
const step = this.state().step() * multiplier;
|
|
435
|
+
// determine the document direction
|
|
436
|
+
const isRTL = getComputedStyle(this.elementRef.nativeElement).direction === 'rtl';
|
|
437
|
+
let newValue;
|
|
438
|
+
switch (event.key) {
|
|
439
|
+
case 'ArrowLeft':
|
|
440
|
+
newValue = isRTL
|
|
441
|
+
? Math.min(currentValue - step, this.state().max())
|
|
442
|
+
: Math.max(currentValue - step, this.state().min());
|
|
443
|
+
break;
|
|
444
|
+
case 'ArrowDown':
|
|
445
|
+
newValue = Math.max(currentValue - step, this.state().min());
|
|
446
|
+
break;
|
|
447
|
+
case 'ArrowRight':
|
|
448
|
+
newValue = isRTL
|
|
449
|
+
? Math.max(currentValue + step, this.state().min())
|
|
450
|
+
: Math.min(currentValue + step, this.state().max());
|
|
451
|
+
break;
|
|
452
|
+
case 'ArrowUp':
|
|
453
|
+
newValue = Math.min(currentValue + step, this.state().max());
|
|
454
|
+
break;
|
|
455
|
+
case 'Home':
|
|
456
|
+
newValue = isRTL ? this.state().max() : this.state().min();
|
|
457
|
+
break;
|
|
458
|
+
case 'End':
|
|
459
|
+
newValue = isRTL ? this.state().min() : this.state().max();
|
|
460
|
+
break;
|
|
461
|
+
default:
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
// Update the appropriate value based on thumb type
|
|
465
|
+
if (this.thumb() === 'low') {
|
|
466
|
+
this.state().setLowValue(newValue);
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
this.state().setHighValue(newValue);
|
|
470
|
+
}
|
|
471
|
+
event.preventDefault();
|
|
472
|
+
}
|
|
473
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpRangeSliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
474
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpRangeSliderThumb, isStandalone: true, selector: "[ngpRangeSliderThumb]", host: { attributes: { "role": "slider" }, listeners: { "pointerdown": "handlePointerDown($event)", "document:pointerup": "handlePointerUp()", "document:pointermove": "handlePointerMove($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.aria-valuemin": "state().min()", "attr.aria-valuemax": "state().max()", "attr.aria-valuenow": "value()", "attr.aria-orientation": "state().orientation()", "tabindex": "state().disabled() ? -1 : 0", "attr.data-orientation": "state().orientation()", "attr.data-disabled": "state().disabled() ? \"\" : null", "attr.data-thumb": "thumb()", "style.inset-inline-start.%": "state().orientation() === \"horizontal\" ? percentage() : undefined", "style.inset-block-start.%": "state().orientation() === \"vertical\" ? percentage() : undefined" } }, exportAs: ["ngpRangeSliderThumb"], ngImport: i0 }); }
|
|
475
|
+
}
|
|
476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpRangeSliderThumb, decorators: [{
|
|
477
|
+
type: Directive,
|
|
478
|
+
args: [{
|
|
479
|
+
selector: '[ngpRangeSliderThumb]',
|
|
480
|
+
exportAs: 'ngpRangeSliderThumb',
|
|
481
|
+
host: {
|
|
482
|
+
role: 'slider',
|
|
483
|
+
'[attr.aria-valuemin]': 'state().min()',
|
|
484
|
+
'[attr.aria-valuemax]': 'state().max()',
|
|
485
|
+
'[attr.aria-valuenow]': 'value()',
|
|
486
|
+
'[attr.aria-orientation]': 'state().orientation()',
|
|
487
|
+
'[tabindex]': 'state().disabled() ? -1 : 0',
|
|
488
|
+
'[attr.data-orientation]': 'state().orientation()',
|
|
489
|
+
'[attr.data-disabled]': 'state().disabled() ? "" : null',
|
|
490
|
+
'[attr.data-thumb]': 'thumb()',
|
|
491
|
+
'[style.inset-inline-start.%]': 'state().orientation() === "horizontal" ? percentage() : undefined',
|
|
492
|
+
'[style.inset-block-start.%]': 'state().orientation() === "vertical" ? percentage() : undefined',
|
|
493
|
+
},
|
|
494
|
+
}]
|
|
495
|
+
}], ctorParameters: () => [], propDecorators: { handlePointerDown: [{
|
|
496
|
+
type: HostListener,
|
|
497
|
+
args: ['pointerdown', ['$event']]
|
|
498
|
+
}], handlePointerUp: [{
|
|
499
|
+
type: HostListener,
|
|
500
|
+
args: ['document:pointerup']
|
|
501
|
+
}], handlePointerMove: [{
|
|
502
|
+
type: HostListener,
|
|
503
|
+
args: ['document:pointermove', ['$event']]
|
|
504
|
+
}], handleKeydown: [{
|
|
505
|
+
type: HostListener,
|
|
506
|
+
args: ['keydown', ['$event']]
|
|
507
|
+
}] } });
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Apply the `ngpRangeSliderTrack` directive to an element that represents the track of the range slider.
|
|
511
|
+
*/
|
|
512
|
+
class NgpRangeSliderTrack {
|
|
513
|
+
constructor() {
|
|
514
|
+
/**
|
|
515
|
+
* Access the range slider state.
|
|
516
|
+
*/
|
|
517
|
+
this.rangeSliderState = injectRangeSliderState();
|
|
518
|
+
/**
|
|
519
|
+
* The element that represents the slider track.
|
|
520
|
+
*/
|
|
521
|
+
this.element = injectElementRef();
|
|
522
|
+
this.rangeSliderState().track.set(this);
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* When the slider track is clicked, update the closest thumb value.
|
|
526
|
+
* @param event The click event.
|
|
527
|
+
*/
|
|
528
|
+
handlePointerDown(event) {
|
|
529
|
+
if (this.rangeSliderState().disabled()) {
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
// get the position the click occurred within the slider track
|
|
533
|
+
const position = this.rangeSliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;
|
|
534
|
+
const rect = this.element.nativeElement.getBoundingClientRect();
|
|
535
|
+
const percentage = (position - (this.rangeSliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /
|
|
536
|
+
(this.rangeSliderState().orientation() === 'horizontal' ? rect.width : rect.height);
|
|
537
|
+
// calculate the value based on the position
|
|
538
|
+
const value = this.rangeSliderState().min() +
|
|
539
|
+
(this.rangeSliderState().max() - this.rangeSliderState().min()) * percentage;
|
|
540
|
+
// determine which thumb to move based on proximity
|
|
541
|
+
const closestThumb = this.rangeSliderState().getClosestThumb(percentage * 100);
|
|
542
|
+
if (closestThumb === 'low') {
|
|
543
|
+
this.rangeSliderState().setLowValue(value);
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
this.rangeSliderState().setHighValue(value);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpRangeSliderTrack, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
550
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpRangeSliderTrack, isStandalone: true, selector: "[ngpRangeSliderTrack]", host: { listeners: { "pointerdown": "handlePointerDown($event)" }, properties: { "attr.data-orientation": "rangeSliderState().orientation()", "attr.data-disabled": "rangeSliderState().disabled() ? \"\" : null" } }, exportAs: ["ngpRangeSliderTrack"], ngImport: i0 }); }
|
|
551
|
+
}
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpRangeSliderTrack, decorators: [{
|
|
553
|
+
type: Directive,
|
|
554
|
+
args: [{
|
|
555
|
+
selector: '[ngpRangeSliderTrack]',
|
|
556
|
+
exportAs: 'ngpRangeSliderTrack',
|
|
557
|
+
host: {
|
|
558
|
+
'[attr.data-orientation]': 'rangeSliderState().orientation()',
|
|
559
|
+
'[attr.data-disabled]': 'rangeSliderState().disabled() ? "" : null',
|
|
560
|
+
},
|
|
561
|
+
}]
|
|
562
|
+
}], ctorParameters: () => [], propDecorators: { handlePointerDown: [{
|
|
563
|
+
type: HostListener,
|
|
564
|
+
args: ['pointerdown', ['$event']]
|
|
565
|
+
}] } });
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Apply the `ngpRangeSlider` directive to an element that represents the range slider and contains the track, range, and thumbs.
|
|
569
|
+
*/
|
|
570
|
+
class NgpRangeSlider {
|
|
571
|
+
constructor() {
|
|
572
|
+
/**
|
|
573
|
+
* The id of the range slider. If not provided, a unique id will be generated.
|
|
574
|
+
*/
|
|
575
|
+
this.id = input(uniqueId('ngp-range-slider'));
|
|
576
|
+
/**
|
|
577
|
+
* The low value of the range slider.
|
|
578
|
+
*/
|
|
579
|
+
this.low = input(0, {
|
|
580
|
+
alias: 'ngpRangeSliderLow',
|
|
581
|
+
transform: numberAttribute,
|
|
582
|
+
});
|
|
583
|
+
/**
|
|
584
|
+
* Emits when the low value changes.
|
|
585
|
+
*/
|
|
586
|
+
this.lowChange = output({
|
|
587
|
+
alias: 'ngpRangeSliderLowChange',
|
|
588
|
+
});
|
|
589
|
+
/**
|
|
590
|
+
* The high value of the range slider.
|
|
591
|
+
*/
|
|
592
|
+
this.high = input(100, {
|
|
593
|
+
alias: 'ngpRangeSliderHigh',
|
|
594
|
+
transform: numberAttribute,
|
|
595
|
+
});
|
|
596
|
+
/**
|
|
597
|
+
* Emits when the high value changes.
|
|
598
|
+
*/
|
|
599
|
+
this.highChange = output({
|
|
600
|
+
alias: 'ngpRangeSliderHighChange',
|
|
601
|
+
});
|
|
602
|
+
/**
|
|
603
|
+
* The minimum value of the range slider.
|
|
604
|
+
*/
|
|
605
|
+
this.min = input(0, {
|
|
606
|
+
alias: 'ngpRangeSliderMin',
|
|
607
|
+
transform: numberAttribute,
|
|
608
|
+
});
|
|
609
|
+
/**
|
|
610
|
+
* The maximum value of the range slider.
|
|
611
|
+
*/
|
|
612
|
+
this.max = input(100, {
|
|
613
|
+
alias: 'ngpRangeSliderMax',
|
|
614
|
+
transform: numberAttribute,
|
|
615
|
+
});
|
|
616
|
+
/**
|
|
617
|
+
* The step value of the range slider.
|
|
618
|
+
*/
|
|
619
|
+
this.step = input(1, {
|
|
620
|
+
alias: 'ngpRangeSliderStep',
|
|
621
|
+
transform: numberAttribute,
|
|
622
|
+
});
|
|
623
|
+
/**
|
|
624
|
+
* The orientation of the range slider.
|
|
625
|
+
*/
|
|
626
|
+
this.orientation = input('horizontal', {
|
|
627
|
+
alias: 'ngpRangeSliderOrientation',
|
|
628
|
+
});
|
|
629
|
+
/**
|
|
630
|
+
* The disabled state of the range slider.
|
|
631
|
+
*/
|
|
632
|
+
this.disabled = input(false, {
|
|
633
|
+
alias: 'ngpRangeSliderDisabled',
|
|
634
|
+
transform: booleanAttribute,
|
|
635
|
+
});
|
|
636
|
+
/**
|
|
637
|
+
* Access the slider track.
|
|
638
|
+
* @internal
|
|
639
|
+
*/
|
|
640
|
+
this.track = signal(undefined);
|
|
641
|
+
/**
|
|
642
|
+
* The thumbs of the range slider.
|
|
643
|
+
* @internal
|
|
644
|
+
*/
|
|
645
|
+
this.thumbs = signal([]);
|
|
646
|
+
/**
|
|
647
|
+
* The low value as a percentage based on the min and max values.
|
|
648
|
+
* @internal
|
|
649
|
+
*/
|
|
650
|
+
this.lowPercentage = computed(() => ((this.state.low() - this.state.min()) / (this.state.max() - this.state.min())) * 100);
|
|
651
|
+
/**
|
|
652
|
+
* The high value as a percentage based on the min and max values.
|
|
653
|
+
* @internal
|
|
654
|
+
*/
|
|
655
|
+
this.highPercentage = computed(() => ((this.state.high() - this.state.min()) / (this.state.max() - this.state.min())) * 100);
|
|
656
|
+
/**
|
|
657
|
+
* The range between low and high values as a percentage.
|
|
658
|
+
* @internal
|
|
659
|
+
*/
|
|
660
|
+
this.rangePercentage = computed(() => this.highPercentage() - this.lowPercentage());
|
|
661
|
+
/**
|
|
662
|
+
* The state of the range slider. We use this for the range slider state rather than relying on the inputs.
|
|
663
|
+
* @internal
|
|
664
|
+
*/
|
|
665
|
+
this.state = rangeSliderState(this);
|
|
666
|
+
setupFormControl({ id: this.state.id, disabled: this.state.disabled });
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Updates the low value, ensuring it doesn't exceed the high value.
|
|
670
|
+
* @param value The new low value
|
|
671
|
+
* @internal
|
|
672
|
+
*/
|
|
673
|
+
setLowValue(value) {
|
|
674
|
+
const clampedValue = Math.max(this.state.min(), Math.min(value, this.state.high()));
|
|
675
|
+
this.state.low.set(clampedValue);
|
|
676
|
+
this.lowChange.emit(clampedValue);
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Updates the high value, ensuring it doesn't go below the low value.
|
|
680
|
+
* @param value The new high value
|
|
681
|
+
* @internal
|
|
682
|
+
*/
|
|
683
|
+
setHighValue(value) {
|
|
684
|
+
const clampedValue = Math.min(this.state.max(), Math.max(value, this.state.low()));
|
|
685
|
+
this.state.high.set(clampedValue);
|
|
686
|
+
this.highChange.emit(clampedValue);
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Determines which thumb should be moved based on the position clicked.
|
|
690
|
+
* @param percentage The percentage position of the click
|
|
691
|
+
* @returns 'low' or 'high' indicating which thumb should move
|
|
692
|
+
*
|
|
693
|
+
* @internal
|
|
694
|
+
*/
|
|
695
|
+
getClosestThumb(percentage) {
|
|
696
|
+
const value = this.state.min() + (this.state.max() - this.state.min()) * (percentage / 100);
|
|
697
|
+
const distanceToLow = Math.abs(value - this.state.low());
|
|
698
|
+
const distanceToHigh = Math.abs(value - this.state.high());
|
|
699
|
+
return distanceToLow <= distanceToHigh ? 'low' : 'high';
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Updates the thumbs array when a new thumb is added.
|
|
703
|
+
* @param thumb The new thumb to add
|
|
704
|
+
* @internal
|
|
705
|
+
*/
|
|
706
|
+
addThumb(thumb) {
|
|
707
|
+
this.thumbs.update(thumbs => [...thumbs, thumb]);
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Removes a thumb from the thumbs array.
|
|
711
|
+
* @param thumb The thumb to remove
|
|
712
|
+
* @internal
|
|
713
|
+
*/
|
|
714
|
+
removeThumb(thumb) {
|
|
715
|
+
this.thumbs.update(thumbs => thumbs.filter(t => t !== thumb));
|
|
716
|
+
}
|
|
717
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpRangeSlider, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
718
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpRangeSlider, isStandalone: true, selector: "[ngpRangeSlider]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, low: { classPropertyName: "low", publicName: "ngpRangeSliderLow", isSignal: true, isRequired: false, transformFunction: null }, high: { classPropertyName: "high", publicName: "ngpRangeSliderHigh", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "ngpRangeSliderMin", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpRangeSliderMax", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "ngpRangeSliderStep", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "ngpRangeSliderOrientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRangeSliderDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lowChange: "ngpRangeSliderLowChange", highChange: "ngpRangeSliderHighChange" }, host: { properties: { "id": "id()", "attr.data-orientation": "state.orientation()" } }, providers: [provideRangeSliderState()], exportAs: ["ngpRangeSlider"], ngImport: i0 }); }
|
|
719
|
+
}
|
|
720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpRangeSlider, decorators: [{
|
|
721
|
+
type: Directive,
|
|
722
|
+
args: [{
|
|
723
|
+
selector: '[ngpRangeSlider]',
|
|
724
|
+
exportAs: 'ngpRangeSlider',
|
|
725
|
+
providers: [provideRangeSliderState()],
|
|
726
|
+
host: {
|
|
727
|
+
'[id]': 'id()',
|
|
728
|
+
'[attr.data-orientation]': 'state.orientation()',
|
|
729
|
+
},
|
|
730
|
+
}]
|
|
731
|
+
}], ctorParameters: () => [] });
|
|
732
|
+
|
|
306
733
|
/**
|
|
307
734
|
* Generated bundle index. Do not edit.
|
|
308
735
|
*/
|
|
309
736
|
|
|
310
|
-
export { NgpSlider, NgpSliderRange, NgpSliderThumb, NgpSliderTrack, injectSliderState, provideSliderState };
|
|
737
|
+
export { NgpRangeSlider, NgpRangeSliderRange, NgpRangeSliderThumb, NgpRangeSliderTrack, NgpSlider, NgpSliderRange, NgpSliderThumb, NgpSliderTrack, injectRangeSliderState, injectSliderState, provideRangeSliderState, provideSliderState };
|
|
311
738
|
//# sourceMappingURL=ng-primitives-slider.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-slider.mjs","sources":["../../../../packages/ng-primitives/slider/src/slider/slider-state.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track.ts","../../../../packages/ng-primitives/slider/src/slider/slider.ts","../../../../packages/ng-primitives/slider/src/ng-primitives-slider.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSlider } from './slider';\n\n/**\n * The state token for the Slider primitive.\n */\nexport const NgpSliderStateToken = createStateToken<NgpSlider>('Slider');\n\n/**\n * Provides the Slider state.\n */\nexport const provideSliderState = createStateProvider(NgpSliderStateToken);\n\n/**\n * Injects the Slider state.\n */\nexport const injectSliderState = createStateInjector<NgpSlider>(NgpSliderStateToken);\n\n/**\n * The Slider state registration function.\n */\nexport const sliderState = createState(NgpSliderStateToken);\n","import { Directive } from '@angular/core';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderRange` directive to an element that represents the range of the slider.\n */\n@Directive({\n selector: '[ngpSliderRange]',\n exportAs: 'ngpSliderRange',\n host: {\n '[attr.data-orientation]': 'sliderState().orientation()',\n '[attr.data-disabled]': 'sliderState().disabled() ? \"\" : null',\n '[style.width.%]':\n 'sliderState().orientation() === \"horizontal\" ? sliderState().percentage() : undefined',\n '[style.height.%]':\n 'sliderState().orientation() === \"vertical\" ? sliderState().percentage() : undefined',\n },\n})\nexport class NgpSliderRange {\n /**\n * Access the slider state.\n */\n protected readonly sliderState = injectSliderState();\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { setupInteractions } from 'ng-primitives/internal';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderThumb` directive to an element that represents the thumb of the slider.\n */\n@Directive({\n selector: '[ngpSliderThumb]',\n exportAs: 'ngpSliderThumb',\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'state().min()',\n '[attr.aria-valuemax]': 'state().max()',\n '[attr.aria-valuenow]': 'state().value()',\n '[attr.aria-orientation]': 'state().orientation()',\n '[tabindex]': 'state().disabled() ? -1 : 0',\n '[attr.data-orientation]': 'state().orientation()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n '[style.inset-inline-start.%]':\n 'state().orientation() === \"horizontal\" ? state().percentage() : undefined',\n '[style.inset-block-start.%]':\n 'state().orientation() === \"vertical\" ? state().percentage() : undefined',\n },\n})\nexport class NgpSliderThumb {\n /**\n * Access the slider state.\n */\n protected readonly state = injectSliderState();\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n constructor() {\n setupInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.state().disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.state().track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.state().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : 1 - (event.clientY - rect.top) / rect.height;\n\n const value =\n this.state().min() +\n (this.state().max() - this.state().min()) * Math.max(0, Math.min(1, percentage));\n\n this.state().value.set(value);\n this.state().valueChange.emit(value);\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const value = this.state().value();\n\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n this.state().value.set(\n Math.max(value - this.state().step() * multiplier, this.state().min()),\n );\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n this.state().value.set(\n Math.min(value + this.state().step() * multiplier, this.state().max()),\n );\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'Home':\n this.state().value.set(this.state().min());\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'End':\n this.state().value.set(this.state().max());\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n }\n }\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderTrack` directive to an element that represents the track of the slider.\n */\n@Directive({\n selector: '[ngpSliderTrack]',\n exportAs: 'ngpSliderTrack',\n host: {\n '[attr.data-orientation]': 'sliderState().orientation()',\n '[attr.data-disabled]': 'sliderState().disabled() ? \"\" : null',\n },\n})\nexport class NgpSliderTrack {\n /**\n * Access the slider state.\n */\n protected readonly sliderState = injectSliderState();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = injectElementRef<HTMLElement>();\n\n constructor() {\n this.sliderState().track.set(this);\n }\n\n /**\n * When the slider track is clicked, update the value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.sliderState().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position =\n this.sliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.sliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.sliderState().orientation() === 'horizontal' ? rect.width : rect.height);\n\n // update the value based on the position\n this.sliderState().value.set(\n this.sliderState().min() + (this.sliderState().max() - this.sliderState().min()) * percentage,\n );\n this.sliderState().valueChange.emit(this.sliderState().value());\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { uniqueId } from 'ng-primitives/utils';\nimport type { NgpSliderTrack } from '../slider-track/slider-track';\nimport { provideSliderState, sliderState } from './slider-state';\n\n/**\n * Apply the `ngpSlider` directive to an element that represents the slider and contains the track, range, and thumb.\n */\n@Directive({\n selector: '[ngpSlider]',\n exportAs: 'ngpSlider',\n providers: [provideSliderState()],\n host: {\n '[id]': 'id()',\n '[attr.data-orientation]': 'state.orientation()',\n },\n})\nexport class NgpSlider {\n /**\n * The id of the slider. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-slider'));\n\n /**\n * The value of the slider.\n */\n readonly value = input<number, NumberInput>(0, {\n alias: 'ngpSliderValue',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the value changes.\n */\n readonly valueChange = output<number>({\n alias: 'ngpSliderValueChange',\n });\n\n /**\n * The minimum value of the slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the slider.\n */\n readonly orientation = input<NgpOrientation>('horizontal', {\n alias: 'ngpSliderOrientation',\n });\n\n /**\n * The disabled state of the slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n * @internal\n */\n readonly track = signal<NgpSliderTrack | undefined>(undefined);\n\n /**\n * The value as a percentage based on the min and max values.\n */\n protected readonly percentage = computed(\n () => ((this.state.value() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The state of the slider. We use this for the slider state rather than relying on the inputs.\n * @internal\n */\n protected readonly state = sliderState<NgpSlider>(this);\n\n constructor() {\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBAAmB;AAEnF;;AAEG;AACI,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC;;ACvB3D;;AAEG;MAaU,cAAc,CAAA;AAZ3B,IAAA,WAAA,GAAA;AAaE;;AAEG;QACgB,IAAA,CAAA,WAAW,GAAG,iBAAiB,EAAE;AACrD,IAAA;+GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uBAAA,EAAA,6BAAA,EAAA,oBAAA,EAAA,wCAAA,EAAA,eAAA,EAAA,yFAAA,EAAA,gBAAA,EAAA,uFAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAA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,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,sBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,uBAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,SAAA,EANT,CAAC,kBAAkB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAMtB,SAAS,EAAA,UAAA,EAAA,CAAA;kBATrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE,CAAC,kBAAkB,EAAE,CAAC;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,yBAAyB,EAAE,qBAAqB;AACjD,qBAAA;AACF,iBAAA;;;AC3BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-slider.mjs","sources":["../../../../packages/ng-primitives/slider/src/slider/slider-state.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track.ts","../../../../packages/ng-primitives/slider/src/slider/slider.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider/range-slider-state.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-range/range-slider-range.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-thumb/range-slider-thumb.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider-track/range-slider-track.ts","../../../../packages/ng-primitives/slider/src/range-slider/range-slider/range-slider.ts","../../../../packages/ng-primitives/slider/src/ng-primitives-slider.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSlider } from './slider';\n\n/**\n * The state token for the Slider primitive.\n */\nexport const NgpSliderStateToken = createStateToken<NgpSlider>('Slider');\n\n/**\n * Provides the Slider state.\n */\nexport const provideSliderState = createStateProvider(NgpSliderStateToken);\n\n/**\n * Injects the Slider state.\n */\nexport const injectSliderState = createStateInjector<NgpSlider>(NgpSliderStateToken);\n\n/**\n * The Slider state registration function.\n */\nexport const sliderState = createState(NgpSliderStateToken);\n","import { Directive } from '@angular/core';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderRange` directive to an element that represents the range of the slider.\n */\n@Directive({\n selector: '[ngpSliderRange]',\n exportAs: 'ngpSliderRange',\n host: {\n '[attr.data-orientation]': 'sliderState().orientation()',\n '[attr.data-disabled]': 'sliderState().disabled() ? \"\" : null',\n '[style.width.%]':\n 'sliderState().orientation() === \"horizontal\" ? sliderState().percentage() : undefined',\n '[style.height.%]':\n 'sliderState().orientation() === \"vertical\" ? sliderState().percentage() : undefined',\n },\n})\nexport class NgpSliderRange {\n /**\n * Access the slider state.\n */\n protected readonly sliderState = injectSliderState();\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { setupInteractions } from 'ng-primitives/internal';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderThumb` directive to an element that represents the thumb of the slider.\n */\n@Directive({\n selector: '[ngpSliderThumb]',\n exportAs: 'ngpSliderThumb',\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'state().min()',\n '[attr.aria-valuemax]': 'state().max()',\n '[attr.aria-valuenow]': 'state().value()',\n '[attr.aria-orientation]': 'state().orientation()',\n '[tabindex]': 'state().disabled() ? -1 : 0',\n '[attr.data-orientation]': 'state().orientation()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n '[style.inset-inline-start.%]':\n 'state().orientation() === \"horizontal\" ? state().percentage() : undefined',\n '[style.inset-block-start.%]':\n 'state().orientation() === \"vertical\" ? state().percentage() : undefined',\n },\n})\nexport class NgpSliderThumb {\n /**\n * Access the slider state.\n */\n protected readonly state = injectSliderState();\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n constructor() {\n setupInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.state().disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.state().track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.state().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : 1 - (event.clientY - rect.top) / rect.height;\n\n const value =\n this.state().min() +\n (this.state().max() - this.state().min()) * Math.max(0, Math.min(1, percentage));\n\n this.state().value.set(value);\n this.state().valueChange.emit(value);\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const value = this.state().value();\n\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n this.state().value.set(\n Math.max(value - this.state().step() * multiplier, this.state().min()),\n );\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n this.state().value.set(\n Math.min(value + this.state().step() * multiplier, this.state().max()),\n );\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'Home':\n this.state().value.set(this.state().min());\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n case 'End':\n this.state().value.set(this.state().max());\n this.state().valueChange.emit(this.state().value());\n event.preventDefault();\n break;\n }\n }\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Apply the `ngpSliderTrack` directive to an element that represents the track of the slider.\n */\n@Directive({\n selector: '[ngpSliderTrack]',\n exportAs: 'ngpSliderTrack',\n host: {\n '[attr.data-orientation]': 'sliderState().orientation()',\n '[attr.data-disabled]': 'sliderState().disabled() ? \"\" : null',\n },\n})\nexport class NgpSliderTrack {\n /**\n * Access the slider state.\n */\n protected readonly sliderState = injectSliderState();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = injectElementRef<HTMLElement>();\n\n constructor() {\n this.sliderState().track.set(this);\n }\n\n /**\n * When the slider track is clicked, update the value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.sliderState().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position =\n this.sliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.sliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.sliderState().orientation() === 'horizontal' ? rect.width : rect.height);\n\n // update the value based on the position\n this.sliderState().value.set(\n this.sliderState().min() + (this.sliderState().max() - this.sliderState().min()) * percentage,\n );\n this.sliderState().valueChange.emit(this.sliderState().value());\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { uniqueId } from 'ng-primitives/utils';\nimport type { NgpSliderTrack } from '../slider-track/slider-track';\nimport { provideSliderState, sliderState } from './slider-state';\n\n/**\n * Apply the `ngpSlider` directive to an element that represents the slider and contains the track, range, and thumb.\n */\n@Directive({\n selector: '[ngpSlider]',\n exportAs: 'ngpSlider',\n providers: [provideSliderState()],\n host: {\n '[id]': 'id()',\n '[attr.data-orientation]': 'state.orientation()',\n },\n})\nexport class NgpSlider {\n /**\n * The id of the slider. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-slider'));\n\n /**\n * The value of the slider.\n */\n readonly value = input<number, NumberInput>(0, {\n alias: 'ngpSliderValue',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the value changes.\n */\n readonly valueChange = output<number>({\n alias: 'ngpSliderValueChange',\n });\n\n /**\n * The minimum value of the slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the slider.\n */\n readonly orientation = input<NgpOrientation>('horizontal', {\n alias: 'ngpSliderOrientation',\n });\n\n /**\n * The disabled state of the slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n * @internal\n */\n readonly track = signal<NgpSliderTrack | undefined>(undefined);\n\n /**\n * The value as a percentage based on the min and max values.\n */\n protected readonly percentage = computed(\n () => ((this.state.value() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The state of the slider. We use this for the slider state rather than relying on the inputs.\n * @internal\n */\n protected readonly state = sliderState<NgpSlider>(this);\n\n constructor() {\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpRangeSlider } from './range-slider';\n\n/**\n * The state token for the Range Slider primitive.\n */\nexport const NgpRangeSliderStateToken = createStateToken<NgpRangeSlider>('RangeSlider');\n\n/**\n * Provides the Range Slider state.\n */\nexport const provideRangeSliderState = createStateProvider(NgpRangeSliderStateToken);\n\n/**\n * Injects the Range Slider state.\n */\nexport const injectRangeSliderState = createStateInjector<NgpRangeSlider>(NgpRangeSliderStateToken);\n\n/**\n * The Range Slider state registration function.\n */\nexport const rangeSliderState = createState(NgpRangeSliderStateToken);\n","import { Directive } from '@angular/core';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderRange` directive to an element that represents the range between the low and high values.\n */\n@Directive({\n selector: '[ngpRangeSliderRange]',\n exportAs: 'ngpRangeSliderRange',\n host: {\n '[attr.data-orientation]': 'rangeSliderState().orientation()',\n '[attr.data-disabled]': 'rangeSliderState().disabled() ? \"\" : null',\n '[style.width.%]':\n 'rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().rangePercentage() : undefined',\n '[style.height.%]':\n 'rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().rangePercentage() : undefined',\n '[style.inset-inline-start.%]':\n 'rangeSliderState().orientation() === \"horizontal\" ? rangeSliderState().lowPercentage() : undefined',\n '[style.inset-block-start.%]':\n 'rangeSliderState().orientation() === \"vertical\" ? rangeSliderState().lowPercentage() : undefined',\n },\n})\nexport class NgpRangeSliderRange {\n /**\n * Access the range slider state.\n */\n protected readonly rangeSliderState = injectRangeSliderState();\n}\n","import { computed, Directive, HostListener, OnDestroy } from '@angular/core';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderThumb` directive to an element that represents a thumb of the range slider.\n * Each thumb can be configured to control either the 'low' or 'high' value.\n */\n@Directive({\n selector: '[ngpRangeSliderThumb]',\n exportAs: 'ngpRangeSliderThumb',\n host: {\n role: 'slider',\n '[attr.aria-valuemin]': 'state().min()',\n '[attr.aria-valuemax]': 'state().max()',\n '[attr.aria-valuenow]': 'value()',\n '[attr.aria-orientation]': 'state().orientation()',\n '[tabindex]': 'state().disabled() ? -1 : 0',\n '[attr.data-orientation]': 'state().orientation()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n '[attr.data-thumb]': 'thumb()',\n '[style.inset-inline-start.%]':\n 'state().orientation() === \"horizontal\" ? percentage() : undefined',\n '[style.inset-block-start.%]':\n 'state().orientation() === \"vertical\" ? percentage() : undefined',\n },\n})\nexport class NgpRangeSliderThumb implements OnDestroy {\n /**\n * Access the range slider state.\n */\n protected readonly state = injectRangeSliderState();\n\n /**\n * Access the thumb element.\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Determines which value this thumb controls ('low' or 'high').\n */\n protected readonly thumb = computed(() =>\n this.state().thumbs().indexOf(this) === 0 ? 'low' : 'high',\n );\n\n /**\n * Store the dragging state.\n */\n protected dragging = false;\n\n /**\n * Get the current value for this thumb.\n */\n protected readonly value = computed(() =>\n this.thumb() === 'low' ? this.state().low() : this.state().high(),\n );\n\n /**\n * Get the current percentage for this thumb.\n */\n protected readonly percentage = computed(() =>\n this.thumb() === 'low' ? this.state().lowPercentage() : this.state().highPercentage(),\n );\n\n constructor() {\n setupInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().addThumb(this);\n }\n\n ngOnDestroy(): void {\n this.state().removeThumb(this);\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = true;\n }\n\n @HostListener('document:pointerup')\n protected handlePointerUp(): void {\n if (this.state().disabled()) {\n return;\n }\n\n this.dragging = false;\n }\n\n @HostListener('document:pointermove', ['$event'])\n protected handlePointerMove(event: PointerEvent): void {\n if (this.state().disabled() || !this.dragging) {\n return;\n }\n\n const rect = this.state().track()?.element.nativeElement.getBoundingClientRect();\n\n if (!rect) {\n return;\n }\n\n const percentage =\n this.state().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : (event.clientY - rect.top) / rect.height;\n\n const value =\n this.state().min() +\n (this.state().max() - this.state().min()) * Math.max(0, Math.min(1, percentage));\n\n // Update the appropriate value based on thumb type\n if (this.thumb() === 'low') {\n this.state().setLowValue(value);\n } else {\n this.state().setHighValue(value);\n }\n }\n\n /**\n * Handle keyboard events.\n * @param event\n */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const currentValue = this.value();\n const step = this.state().step() * multiplier;\n\n // determine the document direction\n const isRTL = getComputedStyle(this.elementRef.nativeElement).direction === 'rtl';\n\n let newValue: number;\n\n switch (event.key) {\n case 'ArrowLeft':\n newValue = isRTL\n ? Math.min(currentValue - step, this.state().max())\n : Math.max(currentValue - step, this.state().min());\n break;\n case 'ArrowDown':\n newValue = Math.max(currentValue - step, this.state().min());\n break;\n case 'ArrowRight':\n newValue = isRTL\n ? Math.max(currentValue + step, this.state().min())\n : Math.min(currentValue + step, this.state().max());\n break;\n case 'ArrowUp':\n newValue = Math.min(currentValue + step, this.state().max());\n break;\n case 'Home':\n newValue = isRTL ? this.state().max() : this.state().min();\n break;\n case 'End':\n newValue = isRTL ? this.state().min() : this.state().max();\n break;\n default:\n return;\n }\n\n // Update the appropriate value based on thumb type\n if (this.thumb() === 'low') {\n this.state().setLowValue(newValue);\n } else {\n this.state().setHighValue(newValue);\n }\n\n event.preventDefault();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Apply the `ngpRangeSliderTrack` directive to an element that represents the track of the range slider.\n */\n@Directive({\n selector: '[ngpRangeSliderTrack]',\n exportAs: 'ngpRangeSliderTrack',\n host: {\n '[attr.data-orientation]': 'rangeSliderState().orientation()',\n '[attr.data-disabled]': 'rangeSliderState().disabled() ? \"\" : null',\n },\n})\nexport class NgpRangeSliderTrack {\n /**\n * Access the range slider state.\n */\n protected readonly rangeSliderState = injectRangeSliderState();\n\n /**\n * The element that represents the slider track.\n */\n readonly element = injectElementRef<HTMLElement>();\n\n constructor() {\n this.rangeSliderState().track.set(this);\n }\n\n /**\n * When the slider track is clicked, update the closest thumb value.\n * @param event The click event.\n */\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(event: PointerEvent): void {\n if (this.rangeSliderState().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const position =\n this.rangeSliderState().orientation() === 'horizontal' ? event.clientX : event.clientY;\n const rect = this.element.nativeElement.getBoundingClientRect();\n const percentage =\n (position - (this.rangeSliderState().orientation() === 'horizontal' ? rect.left : rect.top)) /\n (this.rangeSliderState().orientation() === 'horizontal' ? rect.width : rect.height);\n\n // calculate the value based on the position\n const value =\n this.rangeSliderState().min() +\n (this.rangeSliderState().max() - this.rangeSliderState().min()) * percentage;\n\n // determine which thumb to move based on proximity\n const closestThumb = this.rangeSliderState().getClosestThumb(percentage * 100);\n\n if (closestThumb === 'low') {\n this.rangeSliderState().setLowValue(value);\n } else {\n this.rangeSliderState().setHighValue(value);\n }\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n Directive,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpRangeSliderThumb } from '../range-slider-thumb/range-slider-thumb';\nimport type { NgpRangeSliderTrack } from '../range-slider-track/range-slider-track';\nimport { provideRangeSliderState, rangeSliderState } from './range-slider-state';\n\n/**\n * Apply the `ngpRangeSlider` directive to an element that represents the range slider and contains the track, range, and thumbs.\n */\n@Directive({\n selector: '[ngpRangeSlider]',\n exportAs: 'ngpRangeSlider',\n providers: [provideRangeSliderState()],\n host: {\n '[id]': 'id()',\n '[attr.data-orientation]': 'state.orientation()',\n },\n})\nexport class NgpRangeSlider {\n /**\n * The id of the range slider. If not provided, a unique id will be generated.\n */\n readonly id = input<string>(uniqueId('ngp-range-slider'));\n\n /**\n * The low value of the range slider.\n */\n readonly low = input<number, NumberInput>(0, {\n alias: 'ngpRangeSliderLow',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the low value changes.\n */\n readonly lowChange = output<number>({\n alias: 'ngpRangeSliderLowChange',\n });\n\n /**\n * The high value of the range slider.\n */\n readonly high = input<number, NumberInput>(100, {\n alias: 'ngpRangeSliderHigh',\n transform: numberAttribute,\n });\n\n /**\n * Emits when the high value changes.\n */\n readonly highChange = output<number>({\n alias: 'ngpRangeSliderHighChange',\n });\n\n /**\n * The minimum value of the range slider.\n */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpRangeSliderMin',\n transform: numberAttribute,\n });\n\n /**\n * The maximum value of the range slider.\n */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpRangeSliderMax',\n transform: numberAttribute,\n });\n\n /**\n * The step value of the range slider.\n */\n readonly step = input<number, NumberInput>(1, {\n alias: 'ngpRangeSliderStep',\n transform: numberAttribute,\n });\n\n /**\n * The orientation of the range slider.\n */\n readonly orientation = input<NgpOrientation>('horizontal', {\n alias: 'ngpRangeSliderOrientation',\n });\n\n /**\n * The disabled state of the range slider.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpRangeSliderDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the slider track.\n * @internal\n */\n readonly track = signal<NgpRangeSliderTrack | undefined>(undefined);\n\n /**\n * The thumbs of the range slider.\n * @internal\n */\n readonly thumbs = signal<NgpRangeSliderThumb[]>([]);\n\n /**\n * The low value as a percentage based on the min and max values.\n * @internal\n */\n readonly lowPercentage = computed(\n () => ((this.state.low() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The high value as a percentage based on the min and max values.\n * @internal\n */\n readonly highPercentage = computed(\n () => ((this.state.high() - this.state.min()) / (this.state.max() - this.state.min())) * 100,\n );\n\n /**\n * The range between low and high values as a percentage.\n * @internal\n */\n readonly rangePercentage = computed(() => this.highPercentage() - this.lowPercentage());\n\n /**\n * The state of the range slider. We use this for the range slider state rather than relying on the inputs.\n * @internal\n */\n protected readonly state = rangeSliderState<NgpRangeSlider>(this);\n\n constructor() {\n setupFormControl({ id: this.state.id, disabled: this.state.disabled });\n }\n\n /**\n * Updates the low value, ensuring it doesn't exceed the high value.\n * @param value The new low value\n * @internal\n */\n setLowValue(value: number): void {\n const clampedValue = Math.max(this.state.min(), Math.min(value, this.state.high()));\n this.state.low.set(clampedValue);\n this.lowChange.emit(clampedValue);\n }\n\n /**\n * Updates the high value, ensuring it doesn't go below the low value.\n * @param value The new high value\n * @internal\n */\n setHighValue(value: number): void {\n const clampedValue = Math.min(this.state.max(), Math.max(value, this.state.low()));\n this.state.high.set(clampedValue);\n this.highChange.emit(clampedValue);\n }\n\n /**\n * Determines which thumb should be moved based on the position clicked.\n * @param percentage The percentage position of the click\n * @returns 'low' or 'high' indicating which thumb should move\n *\n * @internal\n */\n getClosestThumb(percentage: number): 'low' | 'high' {\n const value = this.state.min() + (this.state.max() - this.state.min()) * (percentage / 100);\n const distanceToLow = Math.abs(value - this.state.low());\n const distanceToHigh = Math.abs(value - this.state.high());\n\n return distanceToLow <= distanceToHigh ? 'low' : 'high';\n }\n\n /**\n * Updates the thumbs array when a new thumb is added.\n * @param thumb The new thumb to add\n * @internal\n */\n addThumb(thumb: NgpRangeSliderThumb): void {\n this.thumbs.update(thumbs => [...thumbs, thumb]);\n }\n\n /**\n * Removes a thumb from the thumbs array.\n * @param thumb The thumb to remove\n * @internal\n */\n removeThumb(thumb: NgpRangeSliderThumb): void {\n this.thumbs.update(thumbs => thumbs.filter(t => t !== thumb));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAY,QAAQ,CAAC;AAExE;;AAEG;MACU,kBAAkB,GAAG,mBAAmB,CAAC,mBAAmB;AAEzE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAY,mBAAmB;AAEnF;;AAEG;AACI,MAAM,WAAW,GAAG,WAAW,CAAC,mBAAmB,CAAC;;ACvB3D;;AAEG;MAaU,cAAc,CAAA;AAZ3B,IAAA,WAAA,GAAA;AAaE;;AAEG;QACgB,IAAA,CAAA,WAAW,GAAG,iBAAiB,EAAE;AACrD,IAAA;+GALY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uBAAA,EAAA,6BAAA,EAAA,oBAAA,EAAA,wCAAA,EAAA,eAAA,EAAA,yFAAA,EAAA,gBAAA,EAAA,uFAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,E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