ng-primitives 0.102.2 → 0.103.1
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.
|
@@ -71,6 +71,7 @@ const [NgpSliderRangeStateToken, ngpSliderRange, injectSliderRangeState, provide
|
|
|
71
71
|
dataBinding(element, 'data-disabled', () => slider().disabled());
|
|
72
72
|
styleBinding(element, 'width.%', () => slider().orientation() === 'horizontal' ? slider().percentage() : null);
|
|
73
73
|
styleBinding(element, 'height.%', () => slider().orientation() === 'vertical' ? slider().percentage() : null);
|
|
74
|
+
styleBinding(element, 'inset-block-end.%', () => slider().orientation() === 'vertical' ? 0 : null);
|
|
74
75
|
return {};
|
|
75
76
|
});
|
|
76
77
|
|
|
@@ -99,6 +100,7 @@ const [NgpSliderThumbStateToken, ngpSliderThumb, injectSliderThumbState, provide
|
|
|
99
100
|
const injector = inject(Injector);
|
|
100
101
|
const document = inject(DOCUMENT);
|
|
101
102
|
let dragging = false;
|
|
103
|
+
let activePointerId = null;
|
|
102
104
|
let cleanupDocumentListeners = [];
|
|
103
105
|
const ariaValueNow = computed(() => slider().value(), ...(ngDevMode ? [{ debugName: "ariaValueNow" }] : []));
|
|
104
106
|
const tabindex = computed(() => (slider().disabled() ? -1 : 0), ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
@@ -112,7 +114,7 @@ const [NgpSliderThumbStateToken, ngpSliderThumb, injectSliderThumbState, provide
|
|
|
112
114
|
dataBinding(elementRef, 'data-orientation', () => slider().orientation());
|
|
113
115
|
dataBinding(elementRef, 'data-disabled', () => slider().disabled());
|
|
114
116
|
styleBinding(elementRef, 'inset-inline-start.%', () => slider().orientation() === 'horizontal' ? slider().percentage() : null);
|
|
115
|
-
styleBinding(elementRef, 'inset-block-start.%', () => slider().orientation() === 'vertical' ? slider().percentage() : null);
|
|
117
|
+
styleBinding(elementRef, 'inset-block-start.%', () => slider().orientation() === 'vertical' ? 100 - slider().percentage() : null);
|
|
116
118
|
ngpInteractions({
|
|
117
119
|
hover: true,
|
|
118
120
|
focusVisible: true,
|
|
@@ -126,6 +128,7 @@ const [NgpSliderThumbStateToken, ngpSliderThumb, injectSliderThumbState, provide
|
|
|
126
128
|
return;
|
|
127
129
|
}
|
|
128
130
|
dragging = true;
|
|
131
|
+
activePointerId = event.pointerId;
|
|
129
132
|
onDragStart?.();
|
|
130
133
|
// Clean up any existing listeners
|
|
131
134
|
cleanupDocumentListeners.forEach(cleanup => cleanup());
|
|
@@ -145,7 +148,7 @@ const [NgpSliderThumbStateToken, ngpSliderThumb, injectSliderThumbState, provide
|
|
|
145
148
|
cleanupDocumentListeners = [pointerMoveCleanup, pointerUpCleanup, pointerCancelCleanup];
|
|
146
149
|
});
|
|
147
150
|
function onPointerMove(event) {
|
|
148
|
-
if (slider().disabled() || !dragging) {
|
|
151
|
+
if (slider().disabled() || !dragging || event.pointerId !== activePointerId) {
|
|
149
152
|
return;
|
|
150
153
|
}
|
|
151
154
|
const track = slider().track();
|
|
@@ -159,8 +162,12 @@ const [NgpSliderThumbStateToken, ngpSliderThumb, injectSliderThumbState, provide
|
|
|
159
162
|
const value = slider().min() + (slider().max() - slider().min()) * Math.max(0, Math.min(1, percentage));
|
|
160
163
|
slider().setValue(value);
|
|
161
164
|
}
|
|
162
|
-
function onPointerEnd() {
|
|
165
|
+
function onPointerEnd(event) {
|
|
166
|
+
if (event.pointerId !== activePointerId) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
163
169
|
dragging = false;
|
|
170
|
+
activePointerId = null;
|
|
164
171
|
onDragEnd?.();
|
|
165
172
|
cleanupDocumentListeners.forEach(cleanup => cleanup());
|
|
166
173
|
cleanupDocumentListeners = [];
|
|
@@ -199,12 +206,16 @@ const [NgpSliderThumbStateToken, ngpSliderThumb, injectSliderThumbState, provide
|
|
|
199
206
|
default:
|
|
200
207
|
return;
|
|
201
208
|
}
|
|
209
|
+
// prevent the default action to prevent the page from scrolling
|
|
210
|
+
event.preventDefault();
|
|
202
211
|
if (newValue === currentValue) {
|
|
203
212
|
return;
|
|
204
213
|
}
|
|
205
214
|
slider().setValue(newValue);
|
|
206
|
-
event.preventDefault();
|
|
207
215
|
});
|
|
216
|
+
/**
|
|
217
|
+
* Moves keyboard focus to the host element without scrolling the page.
|
|
218
|
+
*/
|
|
208
219
|
function focus() {
|
|
209
220
|
elementRef.nativeElement.focus({ preventScroll: true });
|
|
210
221
|
}
|
|
@@ -264,11 +275,12 @@ const [NgpSliderTrackStateToken, ngpSliderTrack, injectSliderTrackState, provide
|
|
|
264
275
|
// prevent text selection
|
|
265
276
|
event.preventDefault();
|
|
266
277
|
const rect = element.nativeElement.getBoundingClientRect();
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
const
|
|
271
|
-
|
|
278
|
+
const isHorizontal = slider().orientation() === 'horizontal';
|
|
279
|
+
const position = isHorizontal ? event.clientX - rect.left : event.clientY - rect.top;
|
|
280
|
+
const size = isHorizontal ? rect.width : rect.height;
|
|
281
|
+
const rawPercentage = size === 0 ? 0 : position / size;
|
|
282
|
+
// Invert percentage for vertical sliders so bottom = min, top = max
|
|
283
|
+
const percentage = isHorizontal ? rawPercentage : 1 - rawPercentage;
|
|
272
284
|
const value = slider().min() + (slider().max() - slider().min()) * Math.max(0, Math.min(1, percentage));
|
|
273
285
|
slider().setValue(value);
|
|
274
286
|
});
|
|
@@ -500,9 +512,9 @@ const [NgpRangeSliderRangeStateToken, ngpRangeSliderRange, injectRangeSliderRang
|
|
|
500
512
|
// Horizontal
|
|
501
513
|
styleBinding(element, 'width.%', () => rangeSlider().orientation() === 'horizontal' ? rangeSlider().rangePercentage() : null);
|
|
502
514
|
styleBinding(element, 'inset-inline-start.%', () => rangeSlider().orientation() === 'horizontal' ? rangeSlider().lowPercentage() : null);
|
|
503
|
-
// Vertical
|
|
515
|
+
// Vertical - position from top: 100% - highPercentage places the top of the range at the high thumb
|
|
504
516
|
styleBinding(element, 'height.%', () => rangeSlider().orientation() === 'vertical' ? rangeSlider().rangePercentage() : null);
|
|
505
|
-
styleBinding(element, 'inset-block-start.%', () => rangeSlider().orientation() === 'vertical' ? rangeSlider().
|
|
517
|
+
styleBinding(element, 'inset-block-start.%', () => rangeSlider().orientation() === 'vertical' ? 100 - rangeSlider().highPercentage() : null);
|
|
506
518
|
return {};
|
|
507
519
|
});
|
|
508
520
|
|
|
@@ -531,6 +543,7 @@ const [NgpRangeSliderThumbStateToken, ngpRangeSliderThumb, injectRangeSliderThum
|
|
|
531
543
|
const document = inject(DOCUMENT);
|
|
532
544
|
// Store dragging state
|
|
533
545
|
let dragging = false;
|
|
546
|
+
let activePointerId = null;
|
|
534
547
|
let cleanupDocumentListeners = [];
|
|
535
548
|
// Determine which thumb this is based on registration order
|
|
536
549
|
const thumb = computed(() => (rangeSlider().thumbs().indexOf(element) === 0 ? 'low' : 'high'), ...(ngDevMode ? [{ debugName: "thumb" }] : []));
|
|
@@ -554,13 +567,21 @@ const [NgpRangeSliderThumbStateToken, ngpRangeSliderThumb, injectRangeSliderThum
|
|
|
554
567
|
dataBinding(element, 'data-disabled', () => rangeSlider().disabled());
|
|
555
568
|
dataBinding(element, 'data-thumb', thumb);
|
|
556
569
|
styleBinding(element, 'inset-inline-start.%', () => rangeSlider().orientation() === 'horizontal' ? percentage() : null);
|
|
557
|
-
styleBinding(element, 'inset-block-start.%', () => rangeSlider().orientation() === 'vertical' ? percentage() : null);
|
|
570
|
+
styleBinding(element, 'inset-block-start.%', () => rangeSlider().orientation() === 'vertical' ? 100 - percentage() : null);
|
|
571
|
+
/**
|
|
572
|
+
* Initiates a thumb drag: prevents default, marks dragging active, calls `onDragStart`, and attaches document-level pointer listeners.
|
|
573
|
+
*
|
|
574
|
+
* If the parent slider is disabled, the function no-ops after preventing the default event. Otherwise it replaces any existing document listeners with new move/up/cancel listeners and stores their cleanup functions.
|
|
575
|
+
*
|
|
576
|
+
* @param event - The pointerdown event that started the drag
|
|
577
|
+
*/
|
|
558
578
|
function handlePointerDown(event) {
|
|
559
579
|
event.preventDefault();
|
|
560
580
|
if (rangeSlider().disabled()) {
|
|
561
581
|
return;
|
|
562
582
|
}
|
|
563
583
|
dragging = true;
|
|
584
|
+
activePointerId = event.pointerId;
|
|
564
585
|
onDragStart?.();
|
|
565
586
|
// Clean up any existing listeners
|
|
566
587
|
cleanupDocumentListeners.forEach(cleanup => cleanup());
|
|
@@ -579,14 +600,25 @@ const [NgpRangeSliderThumbStateToken, ngpRangeSliderThumb, injectRangeSliderThum
|
|
|
579
600
|
});
|
|
580
601
|
cleanupDocumentListeners = [pointerMoveCleanup, pointerUpCleanup, pointerCancelCleanup];
|
|
581
602
|
}
|
|
582
|
-
function handlePointerEnd() {
|
|
603
|
+
function handlePointerEnd(event) {
|
|
604
|
+
if (event.pointerId !== activePointerId) {
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
583
607
|
dragging = false;
|
|
608
|
+
activePointerId = null;
|
|
584
609
|
onDragEnd?.();
|
|
585
610
|
cleanupDocumentListeners.forEach(cleanup => cleanup());
|
|
586
611
|
cleanupDocumentListeners = [];
|
|
587
612
|
}
|
|
613
|
+
/**
|
|
614
|
+
* Update the thumb's value from a pointer event while dragging.
|
|
615
|
+
*
|
|
616
|
+
* Computes the pointer position relative to the slider track (inverting vertical coordinates so bottom = 0%, top = 100%), clamps it to [0, 100], maps it into the slider's value range, and sets the corresponding low or high value on the parent slider.
|
|
617
|
+
*
|
|
618
|
+
* @param event - The pointer event used to compute the new thumb position and value
|
|
619
|
+
*/
|
|
588
620
|
function handlePointerMove(event) {
|
|
589
|
-
if (rangeSlider().disabled() || !dragging) {
|
|
621
|
+
if (rangeSlider().disabled() || !dragging || event.pointerId !== activePointerId) {
|
|
590
622
|
return;
|
|
591
623
|
}
|
|
592
624
|
const track = rangeSlider().track();
|
|
@@ -596,9 +628,12 @@ const [NgpRangeSliderThumbStateToken, ngpRangeSliderThumb, injectRangeSliderThum
|
|
|
596
628
|
const rect = track.nativeElement.getBoundingClientRect();
|
|
597
629
|
// Calculate the pointer position as a percentage of the track
|
|
598
630
|
// p.ex. for horizontal: (pointerX - trackLeft) / trackWidth
|
|
599
|
-
|
|
631
|
+
// For vertical, invert so bottom = 0%, top = 100%
|
|
632
|
+
const isHorizontal = rangeSlider().orientation() === 'horizontal';
|
|
633
|
+
const rawPercentage = isHorizontal
|
|
600
634
|
? ((event.clientX - rect.left) / rect.width) * 100
|
|
601
635
|
: ((event.clientY - rect.top) / rect.height) * 100;
|
|
636
|
+
const percentage = isHorizontal ? rawPercentage : 100 - rawPercentage;
|
|
602
637
|
const min = rangeSlider().min();
|
|
603
638
|
const max = rangeSlider().max();
|
|
604
639
|
const rangeSize = max - min;
|
|
@@ -708,6 +743,13 @@ const [NgpRangeSliderTrackStateToken, ngpRangeSliderTrack, injectRangeSliderTrac
|
|
|
708
743
|
// Host bindings
|
|
709
744
|
dataBinding(element, 'data-orientation', () => rangeSlider().orientation());
|
|
710
745
|
dataBinding(element, 'data-disabled', () => rangeSlider().disabled());
|
|
746
|
+
/**
|
|
747
|
+
* Convert a pointer down on the track into a slider value and move the nearest thumb to that value.
|
|
748
|
+
*
|
|
749
|
+
* If the slider is disabled the function returns without action. For vertical orientation the pointer-to-value mapping is inverted so the bottom of the track corresponds to the minimum value. The nearest thumb ("low" or "high") is updated to the computed value.
|
|
750
|
+
*
|
|
751
|
+
* @param event - The pointer event originating from the user interaction
|
|
752
|
+
*/
|
|
711
753
|
function handlePointerDown(event) {
|
|
712
754
|
if (rangeSlider().disabled()) {
|
|
713
755
|
return;
|
|
@@ -720,7 +762,9 @@ const [NgpRangeSliderTrackStateToken, ngpRangeSliderTrack, injectRangeSliderTrac
|
|
|
720
762
|
const rect = element.nativeElement.getBoundingClientRect();
|
|
721
763
|
const start = isHorizontal ? rect.left : rect.top;
|
|
722
764
|
const size = isHorizontal ? rect.width : rect.height;
|
|
723
|
-
const
|
|
765
|
+
const rawPercentage = (position - start) / size;
|
|
766
|
+
// Invert percentage for vertical sliders so bottom = min, top = max
|
|
767
|
+
const percentage = isHorizontal ? rawPercentage : 1 - rawPercentage;
|
|
724
768
|
// calculate the value based on the position
|
|
725
769
|
const value = min + (max - min) * percentage;
|
|
726
770
|
// determine which thumb to move based on proximity
|
|
@@ -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-state.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb-state.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track-state.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-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-state.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-state.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 { computed, ElementRef, Signal, signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n emitter,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\n\n/**\n * Public state surface for the Slider primitive.\n */\nexport interface NgpSliderState {\n /**\n * The id of the slider.\n */\n readonly id: Signal<string>;\n /**\n * The slider value.\n */\n readonly value: WritableSignal<number>;\n /**\n * The slider orientation.\n */\n readonly orientation: WritableSignal<NgpOrientation>;\n /**\n * Whether the slider is disabled (includes form control state).\n */\n readonly disabled: WritableSignal<boolean>;\n /**\n * The percentage position of the thumb.\n */\n readonly percentage: Signal<number>;\n /**\n * The minimum value of the slider.\n */\n readonly min: Signal<number>;\n /**\n * The maximum value of the slider.\n */\n readonly max: Signal<number>;\n /**\n * The step value of the slider.\n */\n readonly step: Signal<number>;\n /**\n * @internal The track element reference.\n */\n readonly track: Signal<ElementRef<HTMLElement> | undefined>;\n /**\n * Emit when the value changes.\n */\n readonly valueChange: Observable<number>;\n /**\n * Set the current value (clamped).\n */\n setValue(value: number): void;\n /**\n * Register the track element.\n */\n setTrack(track: ElementRef<HTMLElement> | undefined): void;\n /**\n * Set the disabled state.\n */\n setDisabled(disabled: boolean): void;\n /**\n * Set the orientation.\n */\n setOrientation(orientation: NgpOrientation): void;\n}\n\n/**\n * Inputs for configuring the Slider primitive.\n */\nexport interface NgpSliderProps {\n /**\n * The id of the slider.\n */\n readonly id?: Signal<string>;\n /**\n * The slider value.\n */\n readonly value?: Signal<number>;\n /**\n * The minimum value.\n */\n readonly min?: Signal<number>;\n /**\n * The maximum value.\n */\n readonly max?: Signal<number>;\n /**\n * The step value.\n */\n readonly step?: Signal<number>;\n /**\n * The slider orientation.\n */\n readonly orientation?: Signal<NgpOrientation>;\n /**\n * Whether the slider is disabled.\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Callback fired when the value changes.\n */\n readonly onValueChange?: (value: number) => void;\n}\n\nexport const [NgpSliderStateToken, ngpSlider, injectSliderState, provideSliderState] =\n createPrimitive(\n 'NgpSlider',\n ({\n id = signal(uniqueId('ngp-slider')),\n value: _value = signal(0),\n min = signal(0),\n max = signal(100),\n step = signal(1),\n orientation: _orientation = signal<NgpOrientation>('horizontal'),\n disabled: _disabled = signal(false),\n onValueChange,\n }: NgpSliderProps): NgpSliderState => {\n const element = injectElementRef();\n const value = controlled(_value);\n const disabled = controlled(_disabled);\n const orientation = controlled(_orientation);\n\n const valueChange = emitter<number>();\n const track = signal<ElementRef<HTMLElement> | undefined>(undefined);\n\n // Form control integration\n const status = ngpFormControl({ id, disabled });\n\n const percentage = computed(() => {\n const range = max() - min();\n if (range <= 0) {\n return 0;\n }\n const pct = ((value() - min()) / range) * 100;\n return Math.min(100, Math.max(0, pct));\n });\n\n // Host bindings\n attrBinding(element, 'id', id);\n dataBinding(element, 'data-orientation', orientation);\n dataBinding(element, 'data-disabled', () => status().disabled);\n\n function setTrack(newTrack: ElementRef<HTMLElement> | undefined): void {\n track.set(newTrack);\n }\n\n function setValue(newValue: number): void {\n const clamped = Math.min(max(), Math.max(min(), newValue));\n const stepped = Math.round((clamped - min()) / step()) * step() + min();\n const finalValue = Math.min(max(), Math.max(min(), stepped));\n value.set(finalValue);\n onValueChange?.(finalValue);\n valueChange.emit(finalValue);\n }\n\n function setDisabled(isDisabled: boolean): void {\n disabled.set(isDisabled);\n }\n\n function setOrientation(newOrientation: NgpOrientation): void {\n orientation.set(newOrientation);\n }\n\n return {\n id,\n value,\n min,\n max,\n step,\n orientation: deprecatedSetter(orientation, 'setOrientation'),\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n valueChange: valueChange.asObservable(),\n percentage,\n track,\n setValue,\n setTrack,\n setDisabled,\n setOrientation,\n } satisfies NgpSliderState;\n },\n );\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding, styleBinding } from 'ng-primitives/state';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Public state surface for the Slider Range primitive.\n */\nexport interface NgpSliderRangeState {}\n\n/**\n * Inputs for configuring the Slider Range primitive.\n */\nexport interface NgpSliderRangeProps {}\n\nexport const [\n NgpSliderRangeStateToken,\n ngpSliderRange,\n injectSliderRangeState,\n provideSliderRangeState,\n] = createPrimitive('NgpSliderRange', ({}: NgpSliderRangeProps): NgpSliderRangeState => {\n const element = injectElementRef<HTMLElement>();\n const slider = injectSliderState();\n\n // Host bindings\n dataBinding(element, 'data-orientation', () => slider().orientation());\n dataBinding(element, 'data-disabled', () => slider().disabled());\n styleBinding(element, 'width.%', () =>\n slider().orientation() === 'horizontal' ? slider().percentage() : null,\n );\n styleBinding(element, 'height.%', () =>\n slider().orientation() === 'vertical' ? slider().percentage() : null,\n );\n\n return {} satisfies NgpSliderRangeState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpSliderRange, provideSliderRangeState } from './slider-range-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 providers: [provideSliderRangeState()],\n})\nexport class NgpSliderRange {\n constructor() {\n ngpSliderRange({});\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { computed, inject, Injector, Signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n createPrimitive,\n dataBinding,\n listener,\n styleBinding,\n} from 'ng-primitives/state';\nimport { injectSliderState } from '../slider/slider-state';\n\ntype SliderKey = 'ArrowLeft' | 'ArrowDown' | 'ArrowRight' | 'ArrowUp' | 'Home' | 'End';\n\n/**\n * Public state surface for the Slider Thumb primitive.\n */\nexport interface NgpSliderThumbState {\n /**\n * Whether the thumb is currently dragging.\n */\n readonly dragging: Signal<boolean>;\n /**\n * Focus the thumb element.\n */\n focus(): void;\n}\n\n/**\n * Inputs for configuring the Slider Thumb primitive.\n */\nexport interface NgpSliderThumbProps {\n /**\n * Callback fired when dragging starts.\n */\n readonly onDragStart?: () => void;\n /**\n * Callback fired when dragging ends.\n */\n readonly onDragEnd?: () => void;\n}\n\nexport const [\n NgpSliderThumbStateToken,\n ngpSliderThumb,\n injectSliderThumbState,\n provideSliderThumbState,\n] = createPrimitive(\n 'NgpSliderThumb',\n ({ onDragStart, onDragEnd }: NgpSliderThumbProps): NgpSliderThumbState => {\n const elementRef = injectElementRef<HTMLElement>();\n const slider = injectSliderState();\n const injector = inject(Injector);\n const document = inject(DOCUMENT);\n\n let dragging = false;\n let cleanupDocumentListeners: (() => void)[] = [];\n\n const ariaValueNow = computed(() => slider().value());\n const tabindex = computed(() => (slider().disabled() ? -1 : 0));\n\n // Host bindings\n attrBinding(elementRef, 'role', 'slider');\n attrBinding(elementRef, 'aria-valuemin', () => slider().min().toString());\n attrBinding(elementRef, 'aria-valuemax', () => slider().max().toString());\n attrBinding(elementRef, 'aria-valuenow', () => ariaValueNow().toString());\n attrBinding(elementRef, 'aria-orientation', () => slider().orientation());\n attrBinding(elementRef, 'tabindex', () => tabindex().toString());\n dataBinding(elementRef, 'data-orientation', () => slider().orientation());\n dataBinding(elementRef, 'data-disabled', () => slider().disabled());\n styleBinding(elementRef, 'inset-inline-start.%', () =>\n slider().orientation() === 'horizontal' ? slider().percentage() : null,\n );\n styleBinding(elementRef, 'inset-block-start.%', () =>\n slider().orientation() === 'vertical' ? slider().percentage() : null,\n );\n\n ngpInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: slider().disabled,\n });\n\n // Pointer interactions\n listener(elementRef, 'pointerdown', (event: PointerEvent) => {\n event.preventDefault();\n\n if (slider().disabled()) {\n return;\n }\n\n dragging = true;\n onDragStart?.();\n\n // Clean up any existing listeners\n cleanupDocumentListeners.forEach(cleanup => cleanup());\n\n // Set up document-level listeners to handle pointer events anywhere\n const pointerMoveCleanup = listener(document, 'pointermove', onPointerMove, {\n config: false,\n injector,\n });\n\n const pointerUpCleanup = listener(document, 'pointerup', onPointerEnd, {\n config: false,\n injector,\n });\n\n const pointerCancelCleanup = listener(document, 'pointercancel', onPointerEnd, {\n config: false,\n injector,\n });\n\n cleanupDocumentListeners = [pointerMoveCleanup, pointerUpCleanup, pointerCancelCleanup];\n });\n\n function onPointerMove(event: PointerEvent): void {\n if (slider().disabled() || !dragging) {\n return;\n }\n\n const track = slider().track();\n const rect = track?.nativeElement.getBoundingClientRect();\n if (!rect) {\n return;\n }\n\n const percentage =\n slider().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : 1 - (event.clientY - rect.top) / rect.height;\n\n const value =\n slider().min() + (slider().max() - slider().min()) * Math.max(0, Math.min(1, percentage));\n\n slider().setValue(value);\n }\n\n function onPointerEnd(): void {\n dragging = false;\n onDragEnd?.();\n cleanupDocumentListeners.forEach(cleanup => cleanup());\n cleanupDocumentListeners = [];\n }\n\n // Keyboard interactions\n listener(elementRef, 'keydown', (event: KeyboardEvent) => {\n const multiplier = event.shiftKey ? 10 : 1;\n const step = slider().step() * multiplier;\n const currentValue = slider().value();\n\n // determine the document direction\n const isRTL = getComputedStyle(elementRef.nativeElement).direction === 'rtl';\n\n let newValue: number;\n\n switch (event.key as SliderKey) {\n case 'ArrowLeft':\n newValue = isRTL\n ? Math.min(currentValue + step, slider().max())\n : Math.max(currentValue - step, slider().min());\n break;\n case 'ArrowDown':\n newValue = Math.max(currentValue - step, slider().min());\n break;\n case 'ArrowRight':\n newValue = isRTL\n ? Math.max(currentValue - step, slider().min())\n : Math.min(currentValue + step, slider().max());\n break;\n case 'ArrowUp':\n newValue = Math.min(currentValue + step, slider().max());\n break;\n case 'Home':\n newValue = isRTL ? slider().max() : slider().min();\n break;\n case 'End':\n newValue = isRTL ? slider().min() : slider().max();\n break;\n default:\n return;\n }\n\n if (newValue === currentValue) {\n return;\n }\n\n slider().setValue(newValue);\n event.preventDefault();\n });\n\n function focus(): void {\n elementRef.nativeElement.focus({ preventScroll: true });\n }\n\n return {\n dragging: computed(() => dragging),\n focus,\n } satisfies NgpSliderThumbState;\n },\n);\n","import { Directive, output } from '@angular/core';\nimport { ngpSliderThumb, provideSliderThumbState } from './slider-thumb-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 providers: [provideSliderThumbState()],\n})\nexport class NgpSliderThumb {\n /**\n * Emits when the thumb drag starts.\n */\n readonly dragStart = output<void>({\n alias: 'ngpSliderThumbDragStart',\n });\n\n /**\n * Emits when the thumb drag ends.\n */\n readonly dragEnd = output<void>({\n alias: 'ngpSliderThumbDragEnd',\n });\n\n constructor() {\n ngpSliderThumb({\n onDragStart: () => this.dragStart.emit(),\n onDragEnd: () => this.dragEnd.emit(),\n });\n }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Public state surface for the Slider Track primitive.\n */\nexport interface NgpSliderTrackState {}\n\n/**\n * Inputs for configuring the Slider Track primitive.\n */\nexport interface NgpSliderTrackProps {}\n\nexport const [\n NgpSliderTrackStateToken,\n ngpSliderTrack,\n injectSliderTrackState,\n provideSliderTrackState,\n] = createPrimitive('NgpSliderTrack', ({}: NgpSliderTrackProps): NgpSliderTrackState => {\n const element = injectElementRef<HTMLElement>();\n const slider = injectSliderState();\n\n // Host bindings\n dataBinding(element, 'data-orientation', () => slider().orientation());\n dataBinding(element, 'data-disabled', () => slider().disabled());\n\n // Register track for thumb measurements\n slider().setTrack(element);\n\n // Listener for pointer interactions to set value\n listener(element, 'pointerdown', (event: PointerEvent) => {\n if (slider().disabled()) {\n return;\n }\n\n // prevent text selection\n event.preventDefault();\n\n const rect = element.nativeElement.getBoundingClientRect();\n const position =\n slider().orientation() === 'horizontal'\n ? event.clientX - rect.left\n : event.clientY - rect.top;\n const size = slider().orientation() === 'horizontal' ? rect.width : rect.height;\n const percentage = size === 0 ? 0 : position / size;\n const value =\n slider().min() + (slider().max() - slider().min()) * Math.max(0, Math.min(1, percentage));\n\n slider().setValue(value);\n });\n\n return {} satisfies NgpSliderTrackState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpSliderTrack, provideSliderTrackState } from './slider-track-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 providers: [provideSliderTrackState()],\n})\nexport class NgpSliderTrack {\n constructor() {\n ngpSliderTrack({});\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, numberAttribute, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpSlider, provideSliderState } 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})\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 * 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 = ngpSlider({\n id: this.id,\n value: this.value,\n min: this.min,\n max: this.max,\n step: this.step,\n orientation: this.orientation,\n disabled: this.disabled,\n onValueChange: value => this.valueChange.emit(value),\n });\n\n /**\n * Set the value of the slider.\n */\n setValue(value: number): void {\n this.state.setValue(value);\n }\n /**\n * Set the disabled state.\n */\n setDisabled(disabled: boolean): void {\n this.state.setDisabled(disabled);\n }\n\n /**\n * Set the orientation.\n */\n setOrientation(orientation: NgpOrientation): void {\n this.state.setOrientation(orientation);\n }\n}\n","import { computed, ElementRef, Signal, signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n emitter,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\n\n/**\n * Inputs for configuring the RangeSlider primitive.\n */\nexport interface NgpRangeSliderProps {\n /**\n * The id of the range slider.\n */\n readonly id?: Signal<string>;\n /**\n * The low value of the range slider.\n */\n readonly low?: Signal<number>;\n /**\n * The high value of the range slider.\n */\n readonly high?: Signal<number>;\n /**\n * The minimum value.\n */\n readonly min?: Signal<number>;\n /**\n * The maximum value.\n */\n readonly max?: Signal<number>;\n /**\n * The step value.\n */\n readonly step?: Signal<number>;\n /**\n * The range slider orientation.\n */\n readonly orientation?: Signal<NgpOrientation>;\n /**\n * Whether the range slider is disabled.\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Callback fired when the low value changes.\n */\n readonly onLowChange?: (value: number) => void;\n /**\n * Callback fired when the high value changes.\n */\n readonly onHighChange?: (value: number) => void;\n}\n\n/**\n * Public state surface for the RangeSlider primitive.\n */\nexport interface NgpRangeSliderState {\n /**\n * The id of the range slider.\n */\n readonly id: Signal<string>;\n /**\n * The low value of the range slider.\n */\n readonly low: WritableSignal<number>;\n /**\n * The high value of the range slider.\n */\n readonly high: WritableSignal<number>;\n /**\n * The minimum value of the range slider.\n */\n readonly min: Signal<number>;\n /**\n * The maximum value of the range slider.\n */\n readonly max: Signal<number>;\n /**\n * The step value of the range slider.\n */\n readonly step: Signal<number>;\n /**\n * The orientation of the range slider.\n */\n readonly orientation: WritableSignal<NgpOrientation>;\n /**\n * Whether the range slider is disabled.\n */\n readonly disabled: WritableSignal<boolean>;\n /**\n * The low value as a percentage based on the min and max values.\n * @internal\n */\n readonly lowPercentage: Signal<number>;\n /**\n * The high value as a percentage based on the min and max values.\n * @internal\n */\n readonly highPercentage: Signal<number>;\n /**\n * The range between low and high values as a percentage.\n * @internal\n */\n readonly rangePercentage: Signal<number>;\n /**\n * @internal The track element reference.\n */\n readonly track: Signal<ElementRef<HTMLElement> | undefined>;\n /**\n * @internal The thumbs array.\n */\n readonly thumbs: Signal<ElementRef<HTMLElement>[]>;\n /**\n * Emit when the low value changes.\n */\n readonly lowChange: Observable<number>;\n /**\n * Emit when the high value changes.\n */\n readonly highChange: Observable<number>;\n /**\n * Updates the low value, ensuring it doesn't exceed the high value.\n */\n setLowValue(value: number): void;\n /**\n * Updates the high value, ensuring it doesn't go below the low value.\n */\n setHighValue(value: number): void;\n /**\n * Determines which thumb should be moved based on the position clicked.\n */\n getClosestThumb(percentage: number): 'low' | 'high';\n /**\n * Updates the thumbs array when a new thumb is added.\n */\n addThumb(thumb: ElementRef<HTMLElement>): void;\n /**\n * Removes a thumb from the thumbs array.\n */\n removeThumb(thumb: ElementRef<HTMLElement>): void;\n /**\n * Set the track element reference.\n */\n setTrack(track: ElementRef<HTMLElement>): void;\n /**\n * Set the disabled state.\n */\n setDisabled(disabled: boolean): void;\n /**\n * Set the orientation.\n */\n setOrientation(orientation: NgpOrientation): void;\n}\n\nexport const [\n NgpRangeSliderStateToken,\n ngpRangeSlider,\n injectRangeSliderState,\n provideRangeSliderState,\n] = createPrimitive(\n 'NgpRangeSlider',\n ({\n id = signal(uniqueId('ngp-range-slider')),\n low: _low = signal(0),\n high: _high = signal(100),\n min = signal(0),\n max = signal(100),\n step = signal(1),\n orientation: _orientation = signal<NgpOrientation>('horizontal'),\n disabled: _disabled = signal(false),\n onLowChange,\n onHighChange,\n }: NgpRangeSliderProps): NgpRangeSliderState => {\n const element = injectElementRef();\n const low = controlled(_low);\n const high = controlled(_high);\n const disabled = controlled(_disabled);\n const orientation = controlled(_orientation);\n\n const lowChange = emitter<number>();\n const highChange = emitter<number>();\n const track = signal<ElementRef<HTMLElement> | undefined>(undefined);\n const thumbs = signal<ElementRef<HTMLElement>[]>([]);\n\n // Form control integration\n const status = ngpFormControl({ id, disabled });\n\n const lowPercentage = computed(() => {\n const range = max() - min();\n if (range <= 0) return 0;\n return ((low() - min()) / range) * 100;\n });\n\n const highPercentage = computed(() => {\n const range = max() - min();\n if (range <= 0) return 100;\n return ((high() - min()) / range) * 100;\n });\n\n const rangePercentage = computed(() => highPercentage() - lowPercentage());\n\n // Host bindings\n attrBinding(element, 'id', id);\n dataBinding(element, 'data-orientation', orientation);\n dataBinding(element, 'data-disabled', status().disabled);\n\n function setLowValue(value: number): void {\n const clampedValue = Math.max(min(), Math.min(value, high()));\n const steppedValue = Math.round((clampedValue - min()) / step()) * step() + min();\n low.set(steppedValue);\n onLowChange?.(steppedValue);\n lowChange.emit(steppedValue);\n }\n\n function setHighValue(value: number): void {\n const clampedValue = Math.min(max(), Math.max(value, low()));\n const steppedValue = Math.round((clampedValue - min()) / step()) * step() + min();\n high.set(steppedValue);\n onHighChange?.(steppedValue);\n highChange.emit(steppedValue);\n }\n\n function getClosestThumb(percentage: number): 'low' | 'high' {\n const value = min() + (max() - min()) * (percentage / 100);\n const distanceToLow = Math.abs(value - low());\n const distanceToHigh = Math.abs(value - high());\n return distanceToLow <= distanceToHigh ? 'low' : 'high';\n }\n\n function addThumb(thumb: ElementRef<HTMLElement>): void {\n thumbs.update(t => [...t, thumb]);\n }\n\n function removeThumb(thumb: ElementRef<HTMLElement>): void {\n thumbs.update(t => t.filter(existing => existing !== thumb));\n }\n\n function setDisabled(isDisabled: boolean): void {\n disabled.set(isDisabled);\n }\n\n function setOrientation(newOrientation: NgpOrientation): void {\n orientation.set(newOrientation);\n }\n\n function setTrack(newTrack: ElementRef<HTMLElement>): void {\n track.set(newTrack);\n }\n\n return {\n id,\n low,\n high,\n min,\n max,\n step,\n orientation: deprecatedSetter(orientation, 'setOrientation'),\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n lowPercentage,\n highPercentage,\n rangePercentage,\n track,\n thumbs,\n lowChange: lowChange.asObservable(),\n highChange: highChange.asObservable(),\n setLowValue,\n setHighValue,\n getClosestThumb,\n addThumb,\n removeThumb,\n setDisabled,\n setOrientation,\n setTrack,\n } satisfies NgpRangeSliderState;\n },\n);\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding, styleBinding } from 'ng-primitives/state';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Public state surface for the RangeSliderRange primitive.\n */\nexport interface NgpRangeSliderRangeState {}\n\n/**\n * Inputs for configuring the RangeSliderRange primitive.\n */\nexport interface NgpRangeSliderRangeProps {}\n\nexport const [\n NgpRangeSliderRangeStateToken,\n ngpRangeSliderRange,\n injectRangeSliderRangeState,\n provideRangeSliderRangeState,\n] = createPrimitive('NgpRangeSliderRange', ({}: NgpRangeSliderRangeProps) => {\n const element = injectElementRef();\n const rangeSlider = injectRangeSliderState();\n\n // Host bindings\n dataBinding(element, 'data-orientation', () => rangeSlider().orientation());\n dataBinding(element, 'data-disabled', () => rangeSlider().disabled());\n\n // Horizontal\n styleBinding(element, 'width.%', () =>\n rangeSlider().orientation() === 'horizontal' ? rangeSlider().rangePercentage() : null,\n );\n styleBinding(element, 'inset-inline-start.%', () =>\n rangeSlider().orientation() === 'horizontal' ? rangeSlider().lowPercentage() : null,\n );\n\n // Vertical\n styleBinding(element, 'height.%', () =>\n rangeSlider().orientation() === 'vertical' ? rangeSlider().rangePercentage() : null,\n );\n styleBinding(element, 'inset-block-start.%', () =>\n rangeSlider().orientation() === 'vertical' ? rangeSlider().lowPercentage() : null,\n );\n\n return {} satisfies NgpRangeSliderRangeState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpRangeSliderRange } from './range-slider-range-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})\nexport class NgpRangeSliderRange {\n constructor() {\n ngpRangeSliderRange({});\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { computed, inject, Injector, Signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n createPrimitive,\n dataBinding,\n listener,\n onDestroy,\n styleBinding,\n} from 'ng-primitives/state';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Public state surface for the RangeSliderThumb primitive.\n */\nexport interface NgpRangeSliderThumbState {\n /**\n * Which value this thumb controls ('low' or 'high').\n */\n readonly thumb: Signal<'low' | 'high'>;\n /**\n * The current value for this thumb.\n */\n readonly value: Signal<number>;\n /**\n * The current percentage for this thumb.\n */\n readonly percentage: Signal<number>;\n}\n\n/**\n * Inputs for configuring the RangeSliderThumb primitive.\n */\nexport interface NgpRangeSliderThumbProps {\n /**\n * Callback fired when dragging starts.\n */\n readonly onDragStart?: () => void;\n /**\n * Callback fired when dragging ends.\n */\n readonly onDragEnd?: () => void;\n}\n\nexport const [\n NgpRangeSliderThumbStateToken,\n ngpRangeSliderThumb,\n injectRangeSliderThumbState,\n provideRangeSliderThumbState,\n] = createPrimitive(\n 'NgpRangeSliderThumb',\n ({ onDragStart, onDragEnd }: NgpRangeSliderThumbProps) => {\n const element = injectElementRef();\n const rangeSlider = injectRangeSliderState();\n const injector = inject(Injector);\n const document = inject(DOCUMENT);\n\n // Store dragging state\n let dragging = false;\n let cleanupDocumentListeners: (() => void)[] = [];\n\n // Determine which thumb this is based on registration order\n const thumb = computed(() => (rangeSlider().thumbs().indexOf(element) === 0 ? 'low' : 'high'));\n\n const value = computed(() => (thumb() === 'low' ? rangeSlider().low() : rangeSlider().high()));\n\n const percentage = computed(() =>\n thumb() === 'low' ? rangeSlider().lowPercentage() : rangeSlider().highPercentage(),\n );\n\n // Setup interactions\n ngpInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: rangeSlider().disabled,\n });\n\n // Host bindings\n attrBinding(element, 'role', 'slider');\n attrBinding(element, 'aria-valuemin', () => rangeSlider().min());\n attrBinding(element, 'aria-valuemax', () => rangeSlider().max());\n attrBinding(element, 'aria-valuenow', value);\n attrBinding(element, 'aria-orientation', () => rangeSlider().orientation());\n attrBinding(element, 'tabindex', () => (rangeSlider().disabled() ? -1 : 0));\n dataBinding(element, 'data-orientation', () => rangeSlider().orientation());\n dataBinding(element, 'data-disabled', () => rangeSlider().disabled());\n dataBinding(element, 'data-thumb', thumb);\n styleBinding(element, 'inset-inline-start.%', () =>\n rangeSlider().orientation() === 'horizontal' ? percentage() : null,\n );\n styleBinding(element, 'inset-block-start.%', () =>\n rangeSlider().orientation() === 'vertical' ? percentage() : null,\n );\n\n function handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (rangeSlider().disabled()) {\n return;\n }\n\n dragging = true;\n onDragStart?.();\n\n // Clean up any existing listeners\n cleanupDocumentListeners.forEach(cleanup => cleanup());\n\n // Set up document-level listeners to handle pointer events anywhere\n const pointerMoveCleanup = listener(document, 'pointermove', handlePointerMove, {\n config: false,\n injector,\n });\n\n const pointerUpCleanup = listener(document, 'pointerup', handlePointerEnd, {\n config: false,\n injector,\n });\n\n const pointerCancelCleanup = listener(document, 'pointercancel', handlePointerEnd, {\n config: false,\n injector,\n });\n\n cleanupDocumentListeners = [pointerMoveCleanup, pointerUpCleanup, pointerCancelCleanup];\n }\n\n function handlePointerEnd(): void {\n dragging = false;\n onDragEnd?.();\n cleanupDocumentListeners.forEach(cleanup => cleanup());\n cleanupDocumentListeners = [];\n }\n\n function handlePointerMove(event: PointerEvent): void {\n if (rangeSlider().disabled() || !dragging) {\n return;\n }\n\n const track = rangeSlider().track();\n if (!track) {\n return;\n }\n\n const rect = track.nativeElement.getBoundingClientRect();\n\n // Calculate the pointer position as a percentage of the track\n // p.ex. for horizontal: (pointerX - trackLeft) / trackWidth\n const percentage =\n rangeSlider().orientation() === 'horizontal'\n ? ((event.clientX - rect.left) / rect.width) * 100\n : ((event.clientY - rect.top) / rect.height) * 100;\n\n const min = rangeSlider().min();\n const max = rangeSlider().max();\n const rangeSize = max - min;\n\n const clampedPercentage = Math.max(0, Math.min(100, percentage));\n const computedValue = min + rangeSize * (clampedPercentage / 100);\n\n // Update the appropriate value based on thumb type\n if (thumb() === 'low') {\n rangeSlider().setLowValue(computedValue);\n } else {\n rangeSlider().setHighValue(computedValue);\n }\n }\n\n function handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const currentValue = value();\n const step = rangeSlider().step() * multiplier;\n\n // determine the document direction\n const isRTL = getComputedStyle(element.nativeElement).direction === 'rtl';\n\n let newValue: number;\n\n switch (event.key) {\n case 'ArrowLeft':\n newValue = isRTL\n ? Math.min(currentValue - step, rangeSlider().max())\n : Math.max(currentValue - step, rangeSlider().min());\n break;\n case 'ArrowDown':\n newValue = Math.max(currentValue - step, rangeSlider().min());\n break;\n case 'ArrowRight':\n newValue = isRTL\n ? Math.max(currentValue + step, rangeSlider().min())\n : Math.min(currentValue + step, rangeSlider().max());\n break;\n case 'ArrowUp':\n newValue = Math.min(currentValue + step, rangeSlider().max());\n break;\n case 'Home':\n newValue = isRTL ? rangeSlider().max() : rangeSlider().min();\n break;\n case 'End':\n newValue = isRTL ? rangeSlider().min() : rangeSlider().max();\n break;\n default:\n return;\n }\n\n // Update the appropriate value based on thumb type\n if (thumb() === 'low') {\n rangeSlider().setLowValue(newValue);\n } else {\n rangeSlider().setHighValue(newValue);\n }\n\n event.preventDefault();\n }\n\n // Event listeners\n listener(element, 'pointerdown', handlePointerDown);\n listener(element, 'keydown', handleKeydown);\n\n // Register thumb with parent\n rangeSlider().addThumb(element);\n\n // Cleanup on destroy\n onDestroy(() => rangeSlider().removeThumb(element));\n\n return {\n thumb,\n value,\n percentage,\n } satisfies NgpRangeSliderThumbState;\n },\n);\n","import { Directive, output } from '@angular/core';\nimport { ngpRangeSliderThumb } from './range-slider-thumb-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})\nexport class NgpRangeSliderThumb {\n /**\n * Emits when the thumb drag starts.\n */\n readonly dragStart = output<void>({\n alias: 'ngpRangeSliderThumbDragStart',\n });\n\n /**\n * Emits when the thumb drag ends.\n */\n readonly dragEnd = output<void>({\n alias: 'ngpRangeSliderThumbDragEnd',\n });\n\n constructor() {\n ngpRangeSliderThumb({\n onDragStart: () => this.dragStart.emit(),\n onDragEnd: () => this.dragEnd.emit(),\n });\n }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Public state surface for the RangeSliderTrack primitive.\n */\nexport interface NgpRangeSliderTrackState {}\n\n/**\n * Inputs for configuring the RangeSliderTrack primitive.\n */\nexport interface NgpRangeSliderTrackProps {}\n\nexport const [\n NgpRangeSliderTrackStateToken,\n ngpRangeSliderTrack,\n injectRangeSliderTrackState,\n provideRangeSliderTrackState,\n] = createPrimitive('NgpRangeSliderTrack', ({}: NgpRangeSliderTrackProps) => {\n const element = injectElementRef<HTMLElement>();\n const rangeSlider = injectRangeSliderState();\n\n // Host bindings\n dataBinding(element, 'data-orientation', () => rangeSlider().orientation());\n dataBinding(element, 'data-disabled', () => rangeSlider().disabled());\n\n function handlePointerDown(event: PointerEvent): void {\n if (rangeSlider().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const isHorizontal = rangeSlider().orientation() === 'horizontal';\n const max = rangeSlider().max();\n const min = rangeSlider().min();\n const position = isHorizontal ? event.clientX : event.clientY;\n const rect = element.nativeElement.getBoundingClientRect();\n\n const start = isHorizontal ? rect.left : rect.top;\n const size = isHorizontal ? rect.width : rect.height;\n const percentage = (position - start) / size;\n\n // calculate the value based on the position\n const value = min + (max - min) * percentage;\n\n // determine which thumb to move based on proximity\n const closestThumb = rangeSlider().getClosestThumb(percentage * 100);\n\n if (closestThumb === 'low') {\n rangeSlider().setLowValue(value);\n } else {\n rangeSlider().setHighValue(value);\n }\n }\n\n // Event listener\n listener(element, 'pointerdown', handlePointerDown);\n\n // Register track with parent\n rangeSlider().setTrack(element);\n\n return {} satisfies NgpRangeSliderTrackState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpRangeSliderTrack } from './range-slider-track-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})\nexport class NgpRangeSliderTrack {\n constructor() {\n ngpRangeSliderTrack({});\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, numberAttribute, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpRangeSlider, provideRangeSliderState } 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})\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 * The state of the range slider.\n */\n private readonly state = ngpRangeSlider({\n id: this.id,\n low: this.low,\n high: this.high,\n min: this.min,\n max: this.max,\n step: this.step,\n orientation: this.orientation,\n disabled: this.disabled,\n onLowChange: value => this.lowChange.emit(value),\n onHighChange: value => this.highChange.emit(value),\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAmHO,MAAM,CAAC,mBAAmB,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,GAClF,eAAe,CACb,WAAW,EACX,CAAC,EACC,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EACnC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC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A,SAAS,EAAE,CAAC,uBAAuB,EAAE,CAAC;AACvC,iBAAA;;;ACbD;;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-state.ts","../../../../packages/ng-primitives/slider/src/slider-range/slider-range.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb-state.ts","../../../../packages/ng-primitives/slider/src/slider-thumb/slider-thumb.ts","../../../../packages/ng-primitives/slider/src/slider-track/slider-track-state.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-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-state.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-state.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 { computed, ElementRef, Signal, signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n emitter,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\n\n/**\n * Public state surface for the Slider primitive.\n */\nexport interface NgpSliderState {\n /**\n * The id of the slider.\n */\n readonly id: Signal<string>;\n /**\n * The slider value.\n */\n readonly value: WritableSignal<number>;\n /**\n * The slider orientation.\n */\n readonly orientation: WritableSignal<NgpOrientation>;\n /**\n * Whether the slider is disabled (includes form control state).\n */\n readonly disabled: WritableSignal<boolean>;\n /**\n * The percentage position of the thumb.\n */\n readonly percentage: Signal<number>;\n /**\n * The minimum value of the slider.\n */\n readonly min: Signal<number>;\n /**\n * The maximum value of the slider.\n */\n readonly max: Signal<number>;\n /**\n * The step value of the slider.\n */\n readonly step: Signal<number>;\n /**\n * @internal The track element reference.\n */\n readonly track: Signal<ElementRef<HTMLElement> | undefined>;\n /**\n * Emit when the value changes.\n */\n readonly valueChange: Observable<number>;\n /**\n * Set the current value (clamped).\n */\n setValue(value: number): void;\n /**\n * Register the track element.\n */\n setTrack(track: ElementRef<HTMLElement> | undefined): void;\n /**\n * Set the disabled state.\n */\n setDisabled(disabled: boolean): void;\n /**\n * Set the orientation.\n */\n setOrientation(orientation: NgpOrientation): void;\n}\n\n/**\n * Inputs for configuring the Slider primitive.\n */\nexport interface NgpSliderProps {\n /**\n * The id of the slider.\n */\n readonly id?: Signal<string>;\n /**\n * The slider value.\n */\n readonly value?: Signal<number>;\n /**\n * The minimum value.\n */\n readonly min?: Signal<number>;\n /**\n * The maximum value.\n */\n readonly max?: Signal<number>;\n /**\n * The step value.\n */\n readonly step?: Signal<number>;\n /**\n * The slider orientation.\n */\n readonly orientation?: Signal<NgpOrientation>;\n /**\n * Whether the slider is disabled.\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Callback fired when the value changes.\n */\n readonly onValueChange?: (value: number) => void;\n}\n\nexport const [NgpSliderStateToken, ngpSlider, injectSliderState, provideSliderState] =\n createPrimitive(\n 'NgpSlider',\n ({\n id = signal(uniqueId('ngp-slider')),\n value: _value = signal(0),\n min = signal(0),\n max = signal(100),\n step = signal(1),\n orientation: _orientation = signal<NgpOrientation>('horizontal'),\n disabled: _disabled = signal(false),\n onValueChange,\n }: NgpSliderProps): NgpSliderState => {\n const element = injectElementRef();\n const value = controlled(_value);\n const disabled = controlled(_disabled);\n const orientation = controlled(_orientation);\n\n const valueChange = emitter<number>();\n const track = signal<ElementRef<HTMLElement> | undefined>(undefined);\n\n // Form control integration\n const status = ngpFormControl({ id, disabled });\n\n const percentage = computed(() => {\n const range = max() - min();\n if (range <= 0) {\n return 0;\n }\n const pct = ((value() - min()) / range) * 100;\n return Math.min(100, Math.max(0, pct));\n });\n\n // Host bindings\n attrBinding(element, 'id', id);\n dataBinding(element, 'data-orientation', orientation);\n dataBinding(element, 'data-disabled', () => status().disabled);\n\n function setTrack(newTrack: ElementRef<HTMLElement> | undefined): void {\n track.set(newTrack);\n }\n\n function setValue(newValue: number): void {\n const clamped = Math.min(max(), Math.max(min(), newValue));\n const stepped = Math.round((clamped - min()) / step()) * step() + min();\n const finalValue = Math.min(max(), Math.max(min(), stepped));\n value.set(finalValue);\n onValueChange?.(finalValue);\n valueChange.emit(finalValue);\n }\n\n function setDisabled(isDisabled: boolean): void {\n disabled.set(isDisabled);\n }\n\n function setOrientation(newOrientation: NgpOrientation): void {\n orientation.set(newOrientation);\n }\n\n return {\n id,\n value,\n min,\n max,\n step,\n orientation: deprecatedSetter(orientation, 'setOrientation'),\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n valueChange: valueChange.asObservable(),\n percentage,\n track,\n setValue,\n setTrack,\n setDisabled,\n setOrientation,\n } satisfies NgpSliderState;\n },\n );\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding, styleBinding } from 'ng-primitives/state';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Public state surface for the Slider Range primitive.\n */\nexport interface NgpSliderRangeState {}\n\n/**\n * Inputs for configuring the Slider Range primitive.\n */\nexport interface NgpSliderRangeProps {}\n\nexport const [\n NgpSliderRangeStateToken,\n ngpSliderRange,\n injectSliderRangeState,\n provideSliderRangeState,\n] = createPrimitive('NgpSliderRange', ({}: NgpSliderRangeProps): NgpSliderRangeState => {\n const element = injectElementRef<HTMLElement>();\n const slider = injectSliderState();\n\n // Host bindings\n dataBinding(element, 'data-orientation', () => slider().orientation());\n dataBinding(element, 'data-disabled', () => slider().disabled());\n styleBinding(element, 'width.%', () =>\n slider().orientation() === 'horizontal' ? slider().percentage() : null,\n );\n styleBinding(element, 'height.%', () =>\n slider().orientation() === 'vertical' ? slider().percentage() : null,\n );\n styleBinding(element, 'inset-block-end.%', () =>\n slider().orientation() === 'vertical' ? 0 : null,\n );\n\n return {} satisfies NgpSliderRangeState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpSliderRange, provideSliderRangeState } from './slider-range-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 providers: [provideSliderRangeState()],\n})\nexport class NgpSliderRange {\n constructor() {\n ngpSliderRange({});\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { computed, inject, Injector, Signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n createPrimitive,\n dataBinding,\n listener,\n styleBinding,\n} from 'ng-primitives/state';\nimport { injectSliderState } from '../slider/slider-state';\n\ntype SliderKey = 'ArrowLeft' | 'ArrowDown' | 'ArrowRight' | 'ArrowUp' | 'Home' | 'End';\n\n/**\n * Public state surface for the Slider Thumb primitive.\n */\nexport interface NgpSliderThumbState {\n /**\n * Whether the thumb is currently dragging.\n */\n readonly dragging: Signal<boolean>;\n /**\n * Focus the thumb element.\n */\n focus(): void;\n}\n\n/**\n * Inputs for configuring the Slider Thumb primitive.\n */\nexport interface NgpSliderThumbProps {\n /**\n * Callback fired when dragging starts.\n */\n readonly onDragStart?: () => void;\n /**\n * Callback fired when dragging ends.\n */\n readonly onDragEnd?: () => void;\n}\n\nexport const [\n NgpSliderThumbStateToken,\n ngpSliderThumb,\n injectSliderThumbState,\n provideSliderThumbState,\n] = createPrimitive(\n 'NgpSliderThumb',\n ({ onDragStart, onDragEnd }: NgpSliderThumbProps): NgpSliderThumbState => {\n const elementRef = injectElementRef<HTMLElement>();\n const slider = injectSliderState();\n const injector = inject(Injector);\n const document = inject(DOCUMENT);\n\n let dragging = false;\n let activePointerId: number | null = null;\n let cleanupDocumentListeners: (() => void)[] = [];\n\n const ariaValueNow = computed(() => slider().value());\n const tabindex = computed(() => (slider().disabled() ? -1 : 0));\n\n // Host bindings\n attrBinding(elementRef, 'role', 'slider');\n attrBinding(elementRef, 'aria-valuemin', () => slider().min().toString());\n attrBinding(elementRef, 'aria-valuemax', () => slider().max().toString());\n attrBinding(elementRef, 'aria-valuenow', () => ariaValueNow().toString());\n attrBinding(elementRef, 'aria-orientation', () => slider().orientation());\n attrBinding(elementRef, 'tabindex', () => tabindex().toString());\n dataBinding(elementRef, 'data-orientation', () => slider().orientation());\n dataBinding(elementRef, 'data-disabled', () => slider().disabled());\n styleBinding(elementRef, 'inset-inline-start.%', () =>\n slider().orientation() === 'horizontal' ? slider().percentage() : null,\n );\n styleBinding(elementRef, 'inset-block-start.%', () =>\n slider().orientation() === 'vertical' ? 100 - slider().percentage() : null,\n );\n\n ngpInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: slider().disabled,\n });\n\n // Pointer interactions\n listener(elementRef, 'pointerdown', (event: PointerEvent) => {\n event.preventDefault();\n\n if (slider().disabled()) {\n return;\n }\n\n dragging = true;\n activePointerId = event.pointerId;\n onDragStart?.();\n\n // Clean up any existing listeners\n cleanupDocumentListeners.forEach(cleanup => cleanup());\n\n // Set up document-level listeners to handle pointer events anywhere\n const pointerMoveCleanup = listener(document, 'pointermove', onPointerMove, {\n config: false,\n injector,\n });\n\n const pointerUpCleanup = listener(document, 'pointerup', onPointerEnd, {\n config: false,\n injector,\n });\n\n const pointerCancelCleanup = listener(document, 'pointercancel', onPointerEnd, {\n config: false,\n injector,\n });\n\n cleanupDocumentListeners = [pointerMoveCleanup, pointerUpCleanup, pointerCancelCleanup];\n });\n\n function onPointerMove(event: PointerEvent): void {\n if (slider().disabled() || !dragging || event.pointerId !== activePointerId) {\n return;\n }\n\n const track = slider().track();\n const rect = track?.nativeElement.getBoundingClientRect();\n if (!rect) {\n return;\n }\n\n const percentage =\n slider().orientation() === 'horizontal'\n ? (event.clientX - rect.left) / rect.width\n : 1 - (event.clientY - rect.top) / rect.height;\n\n const value =\n slider().min() + (slider().max() - slider().min()) * Math.max(0, Math.min(1, percentage));\n\n slider().setValue(value);\n }\n\n function onPointerEnd(event: PointerEvent): void {\n if (event.pointerId !== activePointerId) {\n return;\n }\n\n dragging = false;\n activePointerId = null;\n onDragEnd?.();\n cleanupDocumentListeners.forEach(cleanup => cleanup());\n cleanupDocumentListeners = [];\n }\n\n // Keyboard interactions\n listener(elementRef, 'keydown', (event: KeyboardEvent) => {\n const multiplier = event.shiftKey ? 10 : 1;\n const step = slider().step() * multiplier;\n const currentValue = slider().value();\n\n // determine the document direction\n const isRTL = getComputedStyle(elementRef.nativeElement).direction === 'rtl';\n\n let newValue: number;\n\n switch (event.key as SliderKey) {\n case 'ArrowLeft':\n newValue = isRTL\n ? Math.min(currentValue + step, slider().max())\n : Math.max(currentValue - step, slider().min());\n break;\n case 'ArrowDown':\n newValue = Math.max(currentValue - step, slider().min());\n break;\n case 'ArrowRight':\n newValue = isRTL\n ? Math.max(currentValue - step, slider().min())\n : Math.min(currentValue + step, slider().max());\n break;\n case 'ArrowUp':\n newValue = Math.min(currentValue + step, slider().max());\n break;\n case 'Home':\n newValue = isRTL ? slider().max() : slider().min();\n break;\n case 'End':\n newValue = isRTL ? slider().min() : slider().max();\n break;\n default:\n return;\n }\n\n // prevent the default action to prevent the page from scrolling\n event.preventDefault();\n\n if (newValue === currentValue) {\n return;\n }\n\n slider().setValue(newValue);\n });\n\n /**\n * Moves keyboard focus to the host element without scrolling the page.\n */\n function focus(): void {\n elementRef.nativeElement.focus({ preventScroll: true });\n }\n\n return {\n dragging: computed(() => dragging),\n focus,\n } satisfies NgpSliderThumbState;\n },\n);\n","import { Directive, output } from '@angular/core';\nimport { ngpSliderThumb, provideSliderThumbState } from './slider-thumb-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 providers: [provideSliderThumbState()],\n})\nexport class NgpSliderThumb {\n /**\n * Emits when the thumb drag starts.\n */\n readonly dragStart = output<void>({\n alias: 'ngpSliderThumbDragStart',\n });\n\n /**\n * Emits when the thumb drag ends.\n */\n readonly dragEnd = output<void>({\n alias: 'ngpSliderThumbDragEnd',\n });\n\n constructor() {\n ngpSliderThumb({\n onDragStart: () => this.dragStart.emit(),\n onDragEnd: () => this.dragEnd.emit(),\n });\n }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { injectSliderState } from '../slider/slider-state';\n\n/**\n * Public state surface for the Slider Track primitive.\n */\nexport interface NgpSliderTrackState {}\n\n/**\n * Inputs for configuring the Slider Track primitive.\n */\nexport interface NgpSliderTrackProps {}\n\nexport const [\n NgpSliderTrackStateToken,\n ngpSliderTrack,\n injectSliderTrackState,\n provideSliderTrackState,\n] = createPrimitive('NgpSliderTrack', ({}: NgpSliderTrackProps): NgpSliderTrackState => {\n const element = injectElementRef<HTMLElement>();\n const slider = injectSliderState();\n\n // Host bindings\n dataBinding(element, 'data-orientation', () => slider().orientation());\n dataBinding(element, 'data-disabled', () => slider().disabled());\n\n // Register track for thumb measurements\n slider().setTrack(element);\n\n // Listener for pointer interactions to set value\n listener(element, 'pointerdown', (event: PointerEvent) => {\n if (slider().disabled()) {\n return;\n }\n\n // prevent text selection\n event.preventDefault();\n\n const rect = element.nativeElement.getBoundingClientRect();\n const isHorizontal = slider().orientation() === 'horizontal';\n const position = isHorizontal ? event.clientX - rect.left : event.clientY - rect.top;\n const size = isHorizontal ? rect.width : rect.height;\n const rawPercentage = size === 0 ? 0 : position / size;\n // Invert percentage for vertical sliders so bottom = min, top = max\n const percentage = isHorizontal ? rawPercentage : 1 - rawPercentage;\n const value =\n slider().min() + (slider().max() - slider().min()) * Math.max(0, Math.min(1, percentage));\n\n slider().setValue(value);\n });\n\n return {} satisfies NgpSliderTrackState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpSliderTrack, provideSliderTrackState } from './slider-track-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 providers: [provideSliderTrackState()],\n})\nexport class NgpSliderTrack {\n constructor() {\n ngpSliderTrack({});\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, numberAttribute, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpSlider, provideSliderState } 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})\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 * 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 = ngpSlider({\n id: this.id,\n value: this.value,\n min: this.min,\n max: this.max,\n step: this.step,\n orientation: this.orientation,\n disabled: this.disabled,\n onValueChange: value => this.valueChange.emit(value),\n });\n\n /**\n * Set the value of the slider.\n */\n setValue(value: number): void {\n this.state.setValue(value);\n }\n /**\n * Set the disabled state.\n */\n setDisabled(disabled: boolean): void {\n this.state.setDisabled(disabled);\n }\n\n /**\n * Set the orientation.\n */\n setOrientation(orientation: NgpOrientation): void {\n this.state.setOrientation(orientation);\n }\n}\n","import { computed, ElementRef, Signal, signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n emitter,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\n\n/**\n * Inputs for configuring the RangeSlider primitive.\n */\nexport interface NgpRangeSliderProps {\n /**\n * The id of the range slider.\n */\n readonly id?: Signal<string>;\n /**\n * The low value of the range slider.\n */\n readonly low?: Signal<number>;\n /**\n * The high value of the range slider.\n */\n readonly high?: Signal<number>;\n /**\n * The minimum value.\n */\n readonly min?: Signal<number>;\n /**\n * The maximum value.\n */\n readonly max?: Signal<number>;\n /**\n * The step value.\n */\n readonly step?: Signal<number>;\n /**\n * The range slider orientation.\n */\n readonly orientation?: Signal<NgpOrientation>;\n /**\n * Whether the range slider is disabled.\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Callback fired when the low value changes.\n */\n readonly onLowChange?: (value: number) => void;\n /**\n * Callback fired when the high value changes.\n */\n readonly onHighChange?: (value: number) => void;\n}\n\n/**\n * Public state surface for the RangeSlider primitive.\n */\nexport interface NgpRangeSliderState {\n /**\n * The id of the range slider.\n */\n readonly id: Signal<string>;\n /**\n * The low value of the range slider.\n */\n readonly low: WritableSignal<number>;\n /**\n * The high value of the range slider.\n */\n readonly high: WritableSignal<number>;\n /**\n * The minimum value of the range slider.\n */\n readonly min: Signal<number>;\n /**\n * The maximum value of the range slider.\n */\n readonly max: Signal<number>;\n /**\n * The step value of the range slider.\n */\n readonly step: Signal<number>;\n /**\n * The orientation of the range slider.\n */\n readonly orientation: WritableSignal<NgpOrientation>;\n /**\n * Whether the range slider is disabled.\n */\n readonly disabled: WritableSignal<boolean>;\n /**\n * The low value as a percentage based on the min and max values.\n * @internal\n */\n readonly lowPercentage: Signal<number>;\n /**\n * The high value as a percentage based on the min and max values.\n * @internal\n */\n readonly highPercentage: Signal<number>;\n /**\n * The range between low and high values as a percentage.\n * @internal\n */\n readonly rangePercentage: Signal<number>;\n /**\n * @internal The track element reference.\n */\n readonly track: Signal<ElementRef<HTMLElement> | undefined>;\n /**\n * @internal The thumbs array.\n */\n readonly thumbs: Signal<ElementRef<HTMLElement>[]>;\n /**\n * Emit when the low value changes.\n */\n readonly lowChange: Observable<number>;\n /**\n * Emit when the high value changes.\n */\n readonly highChange: Observable<number>;\n /**\n * Updates the low value, ensuring it doesn't exceed the high value.\n */\n setLowValue(value: number): void;\n /**\n * Updates the high value, ensuring it doesn't go below the low value.\n */\n setHighValue(value: number): void;\n /**\n * Determines which thumb should be moved based on the position clicked.\n */\n getClosestThumb(percentage: number): 'low' | 'high';\n /**\n * Updates the thumbs array when a new thumb is added.\n */\n addThumb(thumb: ElementRef<HTMLElement>): void;\n /**\n * Removes a thumb from the thumbs array.\n */\n removeThumb(thumb: ElementRef<HTMLElement>): void;\n /**\n * Set the track element reference.\n */\n setTrack(track: ElementRef<HTMLElement>): void;\n /**\n * Set the disabled state.\n */\n setDisabled(disabled: boolean): void;\n /**\n * Set the orientation.\n */\n setOrientation(orientation: NgpOrientation): void;\n}\n\nexport const [\n NgpRangeSliderStateToken,\n ngpRangeSlider,\n injectRangeSliderState,\n provideRangeSliderState,\n] = createPrimitive(\n 'NgpRangeSlider',\n ({\n id = signal(uniqueId('ngp-range-slider')),\n low: _low = signal(0),\n high: _high = signal(100),\n min = signal(0),\n max = signal(100),\n step = signal(1),\n orientation: _orientation = signal<NgpOrientation>('horizontal'),\n disabled: _disabled = signal(false),\n onLowChange,\n onHighChange,\n }: NgpRangeSliderProps): NgpRangeSliderState => {\n const element = injectElementRef();\n const low = controlled(_low);\n const high = controlled(_high);\n const disabled = controlled(_disabled);\n const orientation = controlled(_orientation);\n\n const lowChange = emitter<number>();\n const highChange = emitter<number>();\n const track = signal<ElementRef<HTMLElement> | undefined>(undefined);\n const thumbs = signal<ElementRef<HTMLElement>[]>([]);\n\n // Form control integration\n const status = ngpFormControl({ id, disabled });\n\n const lowPercentage = computed(() => {\n const range = max() - min();\n if (range <= 0) return 0;\n return ((low() - min()) / range) * 100;\n });\n\n const highPercentage = computed(() => {\n const range = max() - min();\n if (range <= 0) return 100;\n return ((high() - min()) / range) * 100;\n });\n\n const rangePercentage = computed(() => highPercentage() - lowPercentage());\n\n // Host bindings\n attrBinding(element, 'id', id);\n dataBinding(element, 'data-orientation', orientation);\n dataBinding(element, 'data-disabled', status().disabled);\n\n function setLowValue(value: number): void {\n const clampedValue = Math.max(min(), Math.min(value, high()));\n const steppedValue = Math.round((clampedValue - min()) / step()) * step() + min();\n low.set(steppedValue);\n onLowChange?.(steppedValue);\n lowChange.emit(steppedValue);\n }\n\n function setHighValue(value: number): void {\n const clampedValue = Math.min(max(), Math.max(value, low()));\n const steppedValue = Math.round((clampedValue - min()) / step()) * step() + min();\n high.set(steppedValue);\n onHighChange?.(steppedValue);\n highChange.emit(steppedValue);\n }\n\n function getClosestThumb(percentage: number): 'low' | 'high' {\n const value = min() + (max() - min()) * (percentage / 100);\n const distanceToLow = Math.abs(value - low());\n const distanceToHigh = Math.abs(value - high());\n return distanceToLow <= distanceToHigh ? 'low' : 'high';\n }\n\n function addThumb(thumb: ElementRef<HTMLElement>): void {\n thumbs.update(t => [...t, thumb]);\n }\n\n function removeThumb(thumb: ElementRef<HTMLElement>): void {\n thumbs.update(t => t.filter(existing => existing !== thumb));\n }\n\n function setDisabled(isDisabled: boolean): void {\n disabled.set(isDisabled);\n }\n\n function setOrientation(newOrientation: NgpOrientation): void {\n orientation.set(newOrientation);\n }\n\n function setTrack(newTrack: ElementRef<HTMLElement>): void {\n track.set(newTrack);\n }\n\n return {\n id,\n low,\n high,\n min,\n max,\n step,\n orientation: deprecatedSetter(orientation, 'setOrientation'),\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n lowPercentage,\n highPercentage,\n rangePercentage,\n track,\n thumbs,\n lowChange: lowChange.asObservable(),\n highChange: highChange.asObservable(),\n setLowValue,\n setHighValue,\n getClosestThumb,\n addThumb,\n removeThumb,\n setDisabled,\n setOrientation,\n setTrack,\n } satisfies NgpRangeSliderState;\n },\n);\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding, styleBinding } from 'ng-primitives/state';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Public state surface for the RangeSliderRange primitive.\n */\nexport interface NgpRangeSliderRangeState {}\n\n/**\n * Inputs for configuring the RangeSliderRange primitive.\n */\nexport interface NgpRangeSliderRangeProps {}\n\nexport const [\n NgpRangeSliderRangeStateToken,\n ngpRangeSliderRange,\n injectRangeSliderRangeState,\n provideRangeSliderRangeState,\n] = createPrimitive('NgpRangeSliderRange', ({}: NgpRangeSliderRangeProps) => {\n const element = injectElementRef();\n const rangeSlider = injectRangeSliderState();\n\n // Host bindings\n dataBinding(element, 'data-orientation', () => rangeSlider().orientation());\n dataBinding(element, 'data-disabled', () => rangeSlider().disabled());\n\n // Horizontal\n styleBinding(element, 'width.%', () =>\n rangeSlider().orientation() === 'horizontal' ? rangeSlider().rangePercentage() : null,\n );\n styleBinding(element, 'inset-inline-start.%', () =>\n rangeSlider().orientation() === 'horizontal' ? rangeSlider().lowPercentage() : null,\n );\n\n // Vertical - position from top: 100% - highPercentage places the top of the range at the high thumb\n styleBinding(element, 'height.%', () =>\n rangeSlider().orientation() === 'vertical' ? rangeSlider().rangePercentage() : null,\n );\n styleBinding(element, 'inset-block-start.%', () =>\n rangeSlider().orientation() === 'vertical' ? 100 - rangeSlider().highPercentage() : null,\n );\n\n return {} satisfies NgpRangeSliderRangeState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpRangeSliderRange } from './range-slider-range-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})\nexport class NgpRangeSliderRange {\n constructor() {\n ngpRangeSliderRange({});\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { computed, inject, Injector, Signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n attrBinding,\n createPrimitive,\n dataBinding,\n listener,\n onDestroy,\n styleBinding,\n} from 'ng-primitives/state';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Public state surface for the RangeSliderThumb primitive.\n */\nexport interface NgpRangeSliderThumbState {\n /**\n * Which value this thumb controls ('low' or 'high').\n */\n readonly thumb: Signal<'low' | 'high'>;\n /**\n * The current value for this thumb.\n */\n readonly value: Signal<number>;\n /**\n * The current percentage for this thumb.\n */\n readonly percentage: Signal<number>;\n}\n\n/**\n * Inputs for configuring the RangeSliderThumb primitive.\n */\nexport interface NgpRangeSliderThumbProps {\n /**\n * Callback fired when dragging starts.\n */\n readonly onDragStart?: () => void;\n /**\n * Callback fired when dragging ends.\n */\n readonly onDragEnd?: () => void;\n}\n\nexport const [\n NgpRangeSliderThumbStateToken,\n ngpRangeSliderThumb,\n injectRangeSliderThumbState,\n provideRangeSliderThumbState,\n] = createPrimitive(\n 'NgpRangeSliderThumb',\n ({ onDragStart, onDragEnd }: NgpRangeSliderThumbProps) => {\n const element = injectElementRef();\n const rangeSlider = injectRangeSliderState();\n const injector = inject(Injector);\n const document = inject(DOCUMENT);\n\n // Store dragging state\n let dragging = false;\n let activePointerId: number | null = null;\n let cleanupDocumentListeners: (() => void)[] = [];\n\n // Determine which thumb this is based on registration order\n const thumb = computed(() => (rangeSlider().thumbs().indexOf(element) === 0 ? 'low' : 'high'));\n\n const value = computed(() => (thumb() === 'low' ? rangeSlider().low() : rangeSlider().high()));\n\n const percentage = computed(() =>\n thumb() === 'low' ? rangeSlider().lowPercentage() : rangeSlider().highPercentage(),\n );\n\n // Setup interactions\n ngpInteractions({\n hover: true,\n focusVisible: true,\n press: true,\n disabled: rangeSlider().disabled,\n });\n\n // Host bindings\n attrBinding(element, 'role', 'slider');\n attrBinding(element, 'aria-valuemin', () => rangeSlider().min());\n attrBinding(element, 'aria-valuemax', () => rangeSlider().max());\n attrBinding(element, 'aria-valuenow', value);\n attrBinding(element, 'aria-orientation', () => rangeSlider().orientation());\n attrBinding(element, 'tabindex', () => (rangeSlider().disabled() ? -1 : 0));\n dataBinding(element, 'data-orientation', () => rangeSlider().orientation());\n dataBinding(element, 'data-disabled', () => rangeSlider().disabled());\n dataBinding(element, 'data-thumb', thumb);\n styleBinding(element, 'inset-inline-start.%', () =>\n rangeSlider().orientation() === 'horizontal' ? percentage() : null,\n );\n styleBinding(element, 'inset-block-start.%', () =>\n rangeSlider().orientation() === 'vertical' ? 100 - percentage() : null,\n );\n\n /**\n * Initiates a thumb drag: prevents default, marks dragging active, calls `onDragStart`, and attaches document-level pointer listeners.\n *\n * If the parent slider is disabled, the function no-ops after preventing the default event. Otherwise it replaces any existing document listeners with new move/up/cancel listeners and stores their cleanup functions.\n *\n * @param event - The pointerdown event that started the drag\n */\n function handlePointerDown(event: PointerEvent): void {\n event.preventDefault();\n\n if (rangeSlider().disabled()) {\n return;\n }\n\n dragging = true;\n activePointerId = event.pointerId;\n onDragStart?.();\n\n // Clean up any existing listeners\n cleanupDocumentListeners.forEach(cleanup => cleanup());\n\n // Set up document-level listeners to handle pointer events anywhere\n const pointerMoveCleanup = listener(document, 'pointermove', handlePointerMove, {\n config: false,\n injector,\n });\n\n const pointerUpCleanup = listener(document, 'pointerup', handlePointerEnd, {\n config: false,\n injector,\n });\n\n const pointerCancelCleanup = listener(document, 'pointercancel', handlePointerEnd, {\n config: false,\n injector,\n });\n\n cleanupDocumentListeners = [pointerMoveCleanup, pointerUpCleanup, pointerCancelCleanup];\n }\n\n function handlePointerEnd(event: PointerEvent): void {\n if (event.pointerId !== activePointerId) {\n return;\n }\n\n dragging = false;\n activePointerId = null;\n onDragEnd?.();\n cleanupDocumentListeners.forEach(cleanup => cleanup());\n cleanupDocumentListeners = [];\n }\n\n /**\n * Update the thumb's value from a pointer event while dragging.\n *\n * Computes the pointer position relative to the slider track (inverting vertical coordinates so bottom = 0%, top = 100%), clamps it to [0, 100], maps it into the slider's value range, and sets the corresponding low or high value on the parent slider.\n *\n * @param event - The pointer event used to compute the new thumb position and value\n */\n function handlePointerMove(event: PointerEvent): void {\n if (rangeSlider().disabled() || !dragging || event.pointerId !== activePointerId) {\n return;\n }\n\n const track = rangeSlider().track();\n if (!track) {\n return;\n }\n\n const rect = track.nativeElement.getBoundingClientRect();\n\n // Calculate the pointer position as a percentage of the track\n // p.ex. for horizontal: (pointerX - trackLeft) / trackWidth\n // For vertical, invert so bottom = 0%, top = 100%\n const isHorizontal = rangeSlider().orientation() === 'horizontal';\n const rawPercentage = isHorizontal\n ? ((event.clientX - rect.left) / rect.width) * 100\n : ((event.clientY - rect.top) / rect.height) * 100;\n const percentage = isHorizontal ? rawPercentage : 100 - rawPercentage;\n\n const min = rangeSlider().min();\n const max = rangeSlider().max();\n const rangeSize = max - min;\n\n const clampedPercentage = Math.max(0, Math.min(100, percentage));\n const computedValue = min + rangeSize * (clampedPercentage / 100);\n\n // Update the appropriate value based on thumb type\n if (thumb() === 'low') {\n rangeSlider().setLowValue(computedValue);\n } else {\n rangeSlider().setHighValue(computedValue);\n }\n }\n\n function handleKeydown(event: KeyboardEvent): void {\n const multiplier = event.shiftKey ? 10 : 1;\n const currentValue = value();\n const step = rangeSlider().step() * multiplier;\n\n // determine the document direction\n const isRTL = getComputedStyle(element.nativeElement).direction === 'rtl';\n\n let newValue: number;\n\n switch (event.key) {\n case 'ArrowLeft':\n newValue = isRTL\n ? Math.min(currentValue - step, rangeSlider().max())\n : Math.max(currentValue - step, rangeSlider().min());\n break;\n case 'ArrowDown':\n newValue = Math.max(currentValue - step, rangeSlider().min());\n break;\n case 'ArrowRight':\n newValue = isRTL\n ? Math.max(currentValue + step, rangeSlider().min())\n : Math.min(currentValue + step, rangeSlider().max());\n break;\n case 'ArrowUp':\n newValue = Math.min(currentValue + step, rangeSlider().max());\n break;\n case 'Home':\n newValue = isRTL ? rangeSlider().max() : rangeSlider().min();\n break;\n case 'End':\n newValue = isRTL ? rangeSlider().min() : rangeSlider().max();\n break;\n default:\n return;\n }\n\n // Update the appropriate value based on thumb type\n if (thumb() === 'low') {\n rangeSlider().setLowValue(newValue);\n } else {\n rangeSlider().setHighValue(newValue);\n }\n\n event.preventDefault();\n }\n\n // Event listeners\n listener(element, 'pointerdown', handlePointerDown);\n listener(element, 'keydown', handleKeydown);\n\n // Register thumb with parent\n rangeSlider().addThumb(element);\n\n // Cleanup on destroy\n onDestroy(() => rangeSlider().removeThumb(element));\n\n return {\n thumb,\n value,\n percentage,\n } satisfies NgpRangeSliderThumbState;\n },\n);\n","import { Directive, output } from '@angular/core';\nimport { ngpRangeSliderThumb } from './range-slider-thumb-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})\nexport class NgpRangeSliderThumb {\n /**\n * Emits when the thumb drag starts.\n */\n readonly dragStart = output<void>({\n alias: 'ngpRangeSliderThumbDragStart',\n });\n\n /**\n * Emits when the thumb drag ends.\n */\n readonly dragEnd = output<void>({\n alias: 'ngpRangeSliderThumbDragEnd',\n });\n\n constructor() {\n ngpRangeSliderThumb({\n onDragStart: () => this.dragStart.emit(),\n onDragEnd: () => this.dragEnd.emit(),\n });\n }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { injectRangeSliderState } from '../range-slider/range-slider-state';\n\n/**\n * Public state surface for the RangeSliderTrack primitive.\n */\nexport interface NgpRangeSliderTrackState {}\n\n/**\n * Inputs for configuring the RangeSliderTrack primitive.\n */\nexport interface NgpRangeSliderTrackProps {}\n\nexport const [\n NgpRangeSliderTrackStateToken,\n ngpRangeSliderTrack,\n injectRangeSliderTrackState,\n provideRangeSliderTrackState,\n] = createPrimitive('NgpRangeSliderTrack', ({}: NgpRangeSliderTrackProps) => {\n const element = injectElementRef<HTMLElement>();\n const rangeSlider = injectRangeSliderState();\n\n // Host bindings\n dataBinding(element, 'data-orientation', () => rangeSlider().orientation());\n dataBinding(element, 'data-disabled', () => rangeSlider().disabled());\n\n /**\n * Convert a pointer down on the track into a slider value and move the nearest thumb to that value.\n *\n * If the slider is disabled the function returns without action. For vertical orientation the pointer-to-value mapping is inverted so the bottom of the track corresponds to the minimum value. The nearest thumb (\"low\" or \"high\") is updated to the computed value.\n *\n * @param event - The pointer event originating from the user interaction\n */\n function handlePointerDown(event: PointerEvent): void {\n if (rangeSlider().disabled()) {\n return;\n }\n\n // get the position the click occurred within the slider track\n const isHorizontal = rangeSlider().orientation() === 'horizontal';\n const max = rangeSlider().max();\n const min = rangeSlider().min();\n const position = isHorizontal ? event.clientX : event.clientY;\n const rect = element.nativeElement.getBoundingClientRect();\n\n const start = isHorizontal ? rect.left : rect.top;\n const size = isHorizontal ? rect.width : rect.height;\n const rawPercentage = (position - start) / size;\n // Invert percentage for vertical sliders so bottom = min, top = max\n const percentage = isHorizontal ? rawPercentage : 1 - rawPercentage;\n\n // calculate the value based on the position\n const value = min + (max - min) * percentage;\n\n // determine which thumb to move based on proximity\n const closestThumb = rangeSlider().getClosestThumb(percentage * 100);\n\n if (closestThumb === 'low') {\n rangeSlider().setLowValue(value);\n } else {\n rangeSlider().setHighValue(value);\n }\n }\n\n // Event listener\n listener(element, 'pointerdown', handlePointerDown);\n\n // Register track with parent\n rangeSlider().setTrack(element);\n\n return {} satisfies NgpRangeSliderTrackState;\n});\n","import { Directive } from '@angular/core';\nimport { ngpRangeSliderTrack } from './range-slider-track-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})\nexport class NgpRangeSliderTrack {\n constructor() {\n ngpRangeSliderTrack({});\n }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, numberAttribute, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpRangeSlider, provideRangeSliderState } 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})\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 * The state of the range slider.\n */\n private readonly state = ngpRangeSlider({\n id: this.id,\n low: this.low,\n high: this.high,\n min: this.min,\n max: this.max,\n step: this.step,\n orientation: this.orientation,\n disabled: this.disabled,\n onLowChange: value => this.lowChange.emit(value),\n onHighChange: value => this.highChange.emit(value),\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAmHO,MAAM,CAAC,mBAAmB,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,GAClF,eAAe,CACb,WAAW,EACX,CAAC,EACC,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EACnC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,EACzB,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EACf,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,EACjB,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,EAChB,WAAW,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BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,yBAAA,EAAA,UAAA,EAAA,0BAAA,EAAA,EAAA,SAAA,EAFd,CAAC,uBAAuB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAE3B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,SAAS,EAAE,CAAC,uBAAuB,EAAE,CAAC;AACvC,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -18,6 +18,7 @@ const defaultToastConfig = {
|
|
|
18
18
|
maxToasts: 3,
|
|
19
19
|
zIndex: 9999999,
|
|
20
20
|
ariaLive: 'polite',
|
|
21
|
+
sequential: false,
|
|
21
22
|
};
|
|
22
23
|
const NgpToastConfigToken = new InjectionToken('NgpToastConfigToken');
|
|
23
24
|
/**
|
|
@@ -89,6 +90,7 @@ class NgpToastManager {
|
|
|
89
90
|
expanded: computed(() => this.expanded().includes(placement)),
|
|
90
91
|
dismissible: options.dismissible ?? this.config.dismissible,
|
|
91
92
|
swipeDirections: options.swipeDirections ?? this.config.swipeDirections,
|
|
93
|
+
sequential: options.sequential ?? this.config.sequential,
|
|
92
94
|
}),
|
|
93
95
|
],
|
|
94
96
|
}), {
|
|
@@ -328,9 +330,11 @@ class NgpToast {
|
|
|
328
330
|
// Start the timer when the toast is created
|
|
329
331
|
this.timer.start();
|
|
330
332
|
// Pause the timer when the toast is expanded or when the user is interacting with it
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
333
|
+
// Also pause when in sequential mode and this toast is not at the front
|
|
334
|
+
explicitEffect([this.options.expanded, this.isInteracting, this.index, () => this.options.sequential], ([expanded, interacting, index, sequential]) => {
|
|
335
|
+
// If the toast is expanded, or if the user is interacting with it, pause the timer
|
|
336
|
+
// In sequential mode, also pause if this toast is not at the front
|
|
337
|
+
if (expanded || interacting || (sequential && index > 0)) {
|
|
334
338
|
this.timer.pause();
|
|
335
339
|
}
|
|
336
340
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-toast.mjs","sources":["../../../../packages/ng-primitives/toast/src/config/toast-config.ts","../../../../packages/ng-primitives/toast/src/toast/toast-context.ts","../../../../packages/ng-primitives/toast/src/toast/toast-options.ts","../../../../packages/ng-primitives/toast/src/toast/toast-manager.ts","../../../../packages/ng-primitives/toast/src/toast/toast-timer.ts","../../../../packages/ng-primitives/toast/src/toast/toast.ts","../../../../packages/ng-primitives/toast/src/ng-primitives-toast.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpToastPlacement, NgpToastSwipeDirection } from '../toast/toast';\n\nexport interface NgpToastConfig {\n /**\n * The position of the toast.\n */\n placement: NgpToastPlacement;\n\n /**\n * The duration of each toast.\n */\n duration: number;\n\n /**\n * The offset from the top of the viewport in pixels.\n */\n offsetTop: number;\n\n /**\n * The offset from the bottom of the viewport in pixels.\n */\n offsetBottom: number;\n\n /**\n * The offset from the left of the viewport in pixels.\n */\n offsetLeft: number;\n\n /**\n * The offset from the right of the viewport in pixels.\n */\n offsetRight: number;\n\n /**\n * Whether a toast can be dismissed by swiping.\n */\n dismissible: boolean;\n\n /**\n * The amount a toast must be swiped before it is considered dismissed.\n */\n swipeThreshold: number;\n\n /**\n * The default swipe directions supported by the toast.\n */\n swipeDirections: NgpToastSwipeDirection[];\n\n /**\n * The maximum number of toasts that can be displayed at once.\n */\n maxToasts: number;\n\n /**\n * The aria live setting.\n */\n ariaLive: string;\n\n /**\n * The gap between each toast.\n */\n gap: number;\n\n /**\n * The z-index of the toast container.\n * This is used to ensure that the toast container is always on top of other elements.\n */\n zIndex: number;\n}\n\nexport const defaultToastConfig: NgpToastConfig = {\n gap: 14,\n duration: 3000,\n placement: 'top-end',\n offsetTop: 24,\n offsetBottom: 24,\n offsetLeft: 24,\n offsetRight: 24,\n swipeThreshold: 45,\n swipeDirections: ['left', 'right', 'top', 'bottom'],\n dismissible: true,\n maxToasts: 3,\n zIndex: 9999999,\n ariaLive: 'polite',\n};\n\nexport const NgpToastConfigToken = new InjectionToken<NgpToastConfig>('NgpToastConfigToken');\n\n/**\n * Provide the default Toast configuration\n * @param config The Toast configuration\n * @returns The provider\n */\nexport function provideToastConfig(config: Partial<NgpToastConfig>): Provider[] {\n return [\n {\n provide: NgpToastConfigToken,\n useValue: { ...defaultToastConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Toast configuration\n * @returns The global Toast configuration\n */\nexport function injectToastConfig(): NgpToastConfig {\n return inject(NgpToastConfigToken, { optional: true }) ?? defaultToastConfig;\n}\n","import { inject, InjectionToken, ValueProvider } from '@angular/core';\n\nconst NgpToastContext = new InjectionToken<unknown>('NgpToastContext');\n\nexport function provideToastContext<T>(context: T): ValueProvider {\n return { provide: NgpToastContext, useValue: context };\n}\n\nexport function injectToastContext<T>(): T {\n return inject(NgpToastContext) as T;\n}\n","import { inject, InjectionToken, Signal, ValueProvider } from '@angular/core';\nimport type { NgpToast, NgpToastSwipeDirection, NgpToastPlacement } from './toast';\n\nconst NgpToastOptions = new InjectionToken<NgpToastOptions>('NgpToastOptions');\n\nexport function provideToastOptions(context: NgpToastOptions): ValueProvider {\n return { provide: NgpToastOptions, useValue: context };\n}\n\nexport function injectToastOptions(): NgpToastOptions {\n return inject(NgpToastOptions);\n}\n\nexport interface NgpToastOptions {\n /**\n * The position of the toast.\n */\n placement: NgpToastPlacement;\n\n /**\n * The duration of the toast in milliseconds.\n */\n duration: number;\n\n /**\n * A function to register the toast instance with the manager.\n * @internal\n */\n register: (toast: NgpToast) => void;\n\n /**\n * Whether the toast region is expanded.\n * @internal\n */\n expanded: Signal<boolean>;\n\n /**\n * Whether the toast supports swipe dismiss.\n * @internal\n */\n dismissible: boolean;\n\n /**\n * The swipe directions supported by the toast.\n * @internal\n */\n swipeDirections: NgpToastSwipeDirection[];\n}\n","import {\n ApplicationRef,\n computed,\n inject,\n Injectable,\n Injector,\n RendererFactory2,\n signal,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport { createPortal, NgpPortal } from 'ng-primitives/portal';\nimport { injectToastConfig } from '../config/toast-config';\nimport { NgpToast, NgpToastPlacement, NgpToastSwipeDirection } from './toast';\nimport { provideToastContext } from './toast-context';\nimport { provideToastOptions } from './toast-options';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgpToastManager {\n private readonly config = injectToastConfig();\n private readonly applicationRef = inject(ApplicationRef);\n private readonly rendererFactory = inject(RendererFactory2);\n private readonly renderer = this.rendererFactory.createRenderer(null, null);\n private readonly injector = inject(Injector);\n // Map to store containers by placement\n private readonly containers = new Map<string, HTMLElement>();\n\n readonly toasts = signal<NgpToastRecord[]>([]);\n\n /** Signal that tracks which placements are expanded */\n private readonly expanded = signal<NgpToastPlacement[]>([]);\n\n /** Show a toast notification */\n show(toast: TemplateRef<void> | Type<unknown>, options: NgpToastOptions = {}): NgpToastRef {\n // services can't access the view container directly, so this is a workaround\n const viewContainerRef = this.applicationRef.components[0].injector.get(ViewContainerRef);\n\n let instance: NgpToast | null = null;\n const placement = options.placement ?? this.config.placement;\n const duration = options.duration ?? this.config.duration;\n const container = this.getOrCreateContainer(placement);\n\n const portal = createPortal(\n toast,\n viewContainerRef,\n Injector.create({\n parent: this.injector,\n providers: [\n provideToastContext(options.context),\n provideToastOptions({\n placement,\n duration,\n register: (toast: NgpToast) => (instance = toast),\n expanded: computed(() => this.expanded().includes(placement)),\n dismissible: options.dismissible ?? this.config.dismissible,\n swipeDirections: options.swipeDirections ?? this.config.swipeDirections,\n }),\n ],\n }),\n {\n // Hide the toast when the dismiss method is called\n dismiss: () => this.dismiss(instance!),\n context: options.context,\n },\n );\n\n portal.attach(container);\n\n // Add the toast to the list of toasts\n if (!instance) {\n throw new Error('A toast must have the NgpToast directive applied.');\n }\n\n this.toasts.update(toasts => [{ instance: instance!, portal }, ...toasts]);\n\n return {\n dismiss: () => this.dismiss(instance!),\n };\n }\n\n /** Hide a toast notification */\n async dismiss(toast: NgpToast): Promise<void> {\n const ref = this.toasts().find(t => t.instance === toast);\n\n if (ref) {\n // Detach the portal from the container\n await ref.portal.detach();\n\n // Remove the toast from the list of toasts\n this.toasts.update(toasts => toasts.filter(t => t !== ref));\n\n // if there are no more toasts, ensure the container is no longer considered expanded\n if (this.toasts().length === 0) {\n this.expanded.update(expanded => expanded.filter(p => p !== toast.options.placement));\n }\n }\n }\n\n /**\n * Lazily create or get a container for a given placement.\n */\n private getOrCreateContainer(placement: string): HTMLElement {\n if (this.containers.has(placement)) {\n return this.containers.get(placement)!;\n }\n const container = this.createContainer(placement);\n this.containers.set(placement, container);\n return container;\n }\n\n /**\n * Create a section in which toasts will be rendered for a specific placement.\n */\n private createContainer(placement: string): HTMLElement {\n const container = this.renderer.createElement('section') as HTMLElement;\n this.renderer.setAttribute(container, 'aria-live', this.config.ariaLive);\n this.renderer.setAttribute(container, 'aria-atomic', 'false');\n this.renderer.setAttribute(container, 'tabindex', '-1');\n this.renderer.setAttribute(container, 'data-ngp-toast-container', placement);\n container.style.setProperty('position', 'fixed');\n container.style.setProperty('z-index', `${this.config.zIndex}`);\n container.style.setProperty('--ngp-toast-offset-top', `${this.config.offsetTop}px`);\n container.style.setProperty('--ngp-toast-offset-bottom', `${this.config.offsetBottom}px`);\n container.style.setProperty('--ngp-toast-offset-left', `${this.config.offsetLeft}px`);\n container.style.setProperty('--ngp-toast-offset-right', `${this.config.offsetRight}px`);\n container.style.setProperty('--ngp-toast-gap', `${this.config.gap}px`);\n\n // mark the container as expanded\n this.renderer.listen(container, 'mouseenter', () =>\n this.expanded.update(expanded => [...expanded, placement as NgpToastPlacement]),\n );\n\n this.renderer.listen(container, 'mouseleave', () => {\n this.expanded.update(expanded =>\n expanded.filter(p => p !== (placement as NgpToastPlacement)),\n );\n });\n\n // Set placement styles\n switch (placement) {\n case 'top-start':\n container.style.setProperty('top', `${this.config.offsetTop}px`);\n container.style.setProperty('left', `${this.config.offsetLeft}px`);\n break;\n case 'top-center':\n container.style.setProperty('top', `${this.config.offsetTop}px`);\n container.style.setProperty('left', '50%');\n container.style.setProperty('transform', 'translateX(-50%)');\n break;\n case 'top-end':\n container.style.setProperty('top', `${this.config.offsetTop}px`);\n container.style.setProperty('right', `${this.config.offsetRight}px`);\n break;\n case 'bottom-start':\n container.style.setProperty('bottom', `${this.config.offsetBottom}px`);\n container.style.setProperty('left', `${this.config.offsetLeft}px`);\n break;\n case 'bottom-center':\n container.style.setProperty('bottom', `${this.config.offsetBottom}px`);\n container.style.setProperty('left', '50%');\n container.style.setProperty('transform', 'translateX(-50%)');\n break;\n case 'bottom-end':\n container.style.setProperty('bottom', `${this.config.offsetBottom}px`);\n container.style.setProperty('right', `${this.config.offsetRight}px`);\n break;\n default:\n throw new Error(`Unknown toast placement: ${placement}`);\n }\n\n this.renderer.appendChild(document.body, container);\n return container;\n }\n}\n\nexport interface NgpToastOptions<T = unknown> {\n /** The position of the toast */\n placement?: NgpToastPlacement;\n\n /** The duration of the toast in milliseconds */\n duration?: number;\n\n /** Whether the toast is dismissible */\n dismissible?: boolean;\n\n /** The swipe directions supported by the toast */\n swipeDirections?: NgpToastSwipeDirection[];\n\n /** The context to make available to the toast */\n context?: T;\n}\n\ninterface NgpToastRecord {\n instance: NgpToast;\n portal: NgpPortal;\n}\n\nexport interface NgpToastRef {\n dismiss(): Promise<void>;\n}\n","class NgpToastTimer {\n private startTime: number | null = null;\n private remaining: number;\n private timeoutId: ReturnType<typeof setTimeout> | null = null;\n private isRunning = false;\n\n constructor(\n private duration: number,\n private callback: () => void,\n ) {\n this.remaining = duration;\n }\n\n start(): void {\n if (this.isRunning) return;\n\n this.isRunning = true;\n this.startTime = Date.now();\n\n this.timeoutId = setTimeout(() => {\n this.isRunning = false;\n this.callback();\n }, this.remaining);\n }\n\n pause(): void {\n if (!this.isRunning || this.startTime === null) return;\n\n this.isRunning = false;\n clearTimeout(this.timeoutId!);\n\n const elapsed = Date.now() - this.startTime;\n this.remaining -= elapsed;\n this.startTime = null;\n this.timeoutId = null;\n }\n\n stop(): void {\n this.isRunning = false;\n clearTimeout(this.timeoutId!);\n this.timeoutId = null;\n this.startTime = null;\n this.remaining = this.duration;\n }\n}\n\nexport function toastTimer(duration: number, callback: () => void): NgpToastTimer {\n return new NgpToastTimer(duration, callback);\n}\n","import { InteractivityChecker } from '@angular/cdk/a11y';\nimport {\n afterNextRender,\n computed,\n Directive,\n HostListener,\n inject,\n Injector,\n signal,\n} from '@angular/core';\nimport { explicitEffect, injectDimensions } from 'ng-primitives/internal';\nimport { injectToastConfig } from '../config/toast-config';\nimport { NgpToastManager } from './toast-manager';\nimport { injectToastOptions } from './toast-options';\nimport { toastTimer } from './toast-timer';\n\n@Directive({\n selector: '[ngpToast]',\n exportAs: 'ngpToast',\n host: {\n '[attr.data-position-x]': 'x',\n '[attr.data-position-y]': 'y',\n '[attr.data-visible]': 'visible()',\n '[attr.data-front]': 'index() === 0',\n '[attr.data-swiping]': 'swiping()',\n '[attr.data-swipe-direction]': 'swipeOutDirection()',\n '[attr.data-expanded]': 'options.expanded()',\n '[style.--ngp-toast-gap.px]': 'config.gap',\n '[style.--ngp-toast-z-index]': 'zIndex()',\n '[style.--ngp-toasts-before]': 'index()',\n '[style.--ngp-toast-index]': 'index() + 1',\n '[style.--ngp-toast-height.px]': 'dimensions().height',\n '[style.--ngp-toast-offset.px]': 'offset()',\n '[style.--ngp-toast-front-height.px]': 'frontToastHeight()',\n '[style.--ngp-toast-swipe-amount-x.px]': 'swipeAmount().x',\n '[style.--ngp-toast-swipe-amount-y.px]': 'swipeAmount().y',\n '[style.--ngp-toast-swipe-x]': 'swipeAmount().x',\n '[style.--ngp-toast-swipe-y]': 'swipeAmount().y',\n },\n})\nexport class NgpToast {\n private readonly manager = inject(NgpToastManager);\n private readonly injector = inject(Injector);\n protected readonly config = injectToastConfig();\n /** @internal */\n readonly options = injectToastOptions();\n private readonly interactivityChecker = inject(InteractivityChecker);\n private readonly isInteracting = signal(false);\n\n private pointerStartRef: { x: number; y: number } | null = null;\n private dragStartTime: Date | null = null;\n protected readonly swiping = signal(false);\n protected readonly swipeDirection = signal<'x' | 'y' | null>(null);\n protected readonly swipeAmount = signal({ x: 0, y: 0 });\n\n protected readonly swipeOutDirection = computed(() => {\n const direction = this.swipeDirection();\n if (direction === 'x') {\n return this.swipeAmount().x > 0 ? 'right' : 'left';\n } else if (direction === 'y') {\n return this.swipeAmount().y > 0 ? 'bottom' : 'top';\n }\n return null;\n });\n\n /**\n * Get all toasts that are currently being displayed in the same position.\n */\n private readonly toasts = computed(() =>\n this.manager\n .toasts()\n .filter(toast => toast.instance.options.placement === this.options.placement),\n );\n\n /**\n * The number of toasts that are currently being displayed before this toast.\n */\n protected readonly index = computed(() => {\n return this.toasts().findIndex(toast => toast.instance === this);\n });\n\n /**\n * Determine the position of the toast in the list of toasts.\n * This is the combination of the heights of all the toasts before this one, plus the gap between them.\n */\n protected readonly offset = computed(() => {\n const gap = this.config.gap;\n\n return this.toasts()\n .slice(0, this.index())\n .reduce((acc, toast) => acc + toast.instance.dimensions().height + gap, 0);\n });\n\n /**\n * Determine if this toast is visible.\n * Visible considers the maximum number of toasts that can be displayed at once, and the last x toasts that are currently being displayed.\n */\n protected readonly visible = computed(() => {\n const maxToasts = this.config.maxToasts;\n // determine if this toast is within the maximum number of toasts that can be displayed\n return this.index() < maxToasts || this.toasts().length <= maxToasts;\n });\n\n /**\n * Determine the height of the front toast.\n * This is used to determine the height of the toast when it is not expanded.\n */\n protected readonly frontToastHeight = computed(() => {\n // get the first toast in the list with height - as when a new toast is added, it may not initially have dimensions\n return (\n this.toasts()\n .find(toast => toast.instance.dimensions().height)\n ?.instance.dimensions().height || 0\n );\n });\n\n /**\n * Determine the z-index of the toast. This is the inverse of the index.\n * The first toast will have the highest z-index, and the last toast will have the lowest z-index.\n * This is used to ensure that the first toast is always on top of the others.\n */\n protected readonly zIndex = computed(() => this.toasts().length - this.index());\n\n /**\n * The height of the toast in pixels.\n */\n protected readonly dimensions = injectDimensions();\n\n /**\n * The x position of the toast.\n */\n readonly x = this.options.placement.split('-')[1] || 'end';\n\n /**\n * The y position of the toast.\n */\n readonly y = this.options.placement.split('-')[0] || 'top';\n\n /**\n * The toast timer instance.\n */\n private readonly timer = toastTimer(this.options.duration, () => this.manager.dismiss(this));\n\n constructor() {\n this.options.register(this);\n\n // Start the timer when the toast is created\n this.timer.start();\n\n // Pause the timer when the toast is expanded or when the user is interacting with it\n explicitEffect([this.options.expanded, this.isInteracting], ([expanded, interacting]) => {\n // If the toast is expanded, or if the user is interacting with it, reset the timer\n if (expanded || interacting) {\n this.timer.pause();\n } else {\n this.timer.start();\n }\n });\n }\n\n @HostListener('pointerdown', ['$event'])\n protected onPointerDown(event: PointerEvent): void {\n // right click should not trigger swipe and we check if the toast is dismissible\n if (event.button === 2 || !this.options.dismissible) {\n return;\n }\n\n this.isInteracting.set(true);\n\n // we need to check if the pointer is on an interactive element, if so, we should not start swiping\n if (this.interactivityChecker.isFocusable(event.target as HTMLElement)) {\n return;\n }\n\n this.dragStartTime = new Date();\n // Ensure we maintain correct pointer capture even when going outside of the toast (e.g. when swiping)\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n this.swiping.set(true);\n this.pointerStartRef = { x: event.clientX, y: event.clientY };\n }\n\n @HostListener('pointermove', ['$event'])\n protected onPointerMove(event: PointerEvent): void {\n if (!this.pointerStartRef || !this.options.dismissible) {\n return;\n }\n\n const isHighlighted = window.getSelection()?.toString().length ?? 0 > 0;\n\n if (isHighlighted) {\n return;\n }\n\n const yDelta = event.clientY - this.pointerStartRef.y;\n const xDelta = event.clientX - this.pointerStartRef.x;\n\n const swipeDirections = this.options.swipeDirections;\n\n // Determine swipe direction if not already locked\n if (!this.swipeDirection() && (Math.abs(xDelta) > 1 || Math.abs(yDelta) > 1)) {\n this.swipeDirection.set(Math.abs(xDelta) > Math.abs(yDelta) ? 'x' : 'y');\n }\n\n const swipeAmount = { x: 0, y: 0 };\n\n const getDampening = (delta: number) => {\n const factor = Math.abs(delta) / 20;\n\n return 1 / (1.5 + factor);\n };\n\n // Only apply swipe in the locked direction\n if (this.swipeDirection() === 'y') {\n // Handle vertical swipes\n if (swipeDirections.includes('top') || swipeDirections.includes('bottom')) {\n if (\n (swipeDirections.includes('top') && yDelta < 0) ||\n (swipeDirections.includes('bottom') && yDelta > 0)\n ) {\n swipeAmount.y = yDelta;\n } else {\n // Smoothly transition to dampened movement\n const dampenedDelta = yDelta * getDampening(yDelta);\n // Ensure we don't jump when transitioning to dampened movement\n swipeAmount.y = Math.abs(dampenedDelta) < Math.abs(yDelta) ? dampenedDelta : yDelta;\n }\n }\n } else if (this.swipeDirection() === 'x') {\n // Handle horizontal swipes\n if (swipeDirections.includes('left') || swipeDirections.includes('right')) {\n if (\n (swipeDirections.includes('left') && xDelta < 0) ||\n (swipeDirections.includes('right') && xDelta > 0)\n ) {\n swipeAmount.x = xDelta;\n } else {\n // Smoothly transition to dampened movement\n const dampenedDelta = xDelta * getDampening(xDelta);\n // Ensure we don't jump when transitioning to dampened movement\n swipeAmount.x = Math.abs(dampenedDelta) < Math.abs(xDelta) ? dampenedDelta : xDelta;\n }\n }\n }\n\n this.swipeAmount.set({ x: swipeAmount.x, y: swipeAmount.y });\n\n if (Math.abs(swipeAmount.x) > 0 || Math.abs(swipeAmount.y) > 0) {\n this.swiping.set(true);\n }\n }\n\n @HostListener('pointerup')\n protected onPointerUp(): void {\n this.isInteracting.set(false);\n\n if (\n !this.config.dismissible ||\n !this.pointerStartRef ||\n !this.swiping() ||\n !this.dragStartTime\n ) {\n return;\n }\n\n this.pointerStartRef = null;\n\n const swipeAmountX = this.swipeAmount().x;\n const swipeAmountY = this.swipeAmount().y;\n const timeTaken = new Date().getTime() - this.dragStartTime.getTime();\n\n const swipeAmount = this.swipeDirection() === 'x' ? swipeAmountX : swipeAmountY;\n const velocity = Math.abs(swipeAmount) / timeTaken;\n\n if (Math.abs(swipeAmount) >= this.config.swipeThreshold || velocity > 0.11) {\n afterNextRender({ write: () => this.manager.dismiss(this) }, { injector: this.injector });\n return;\n } else {\n this.swipeAmount.set({ x: 0, y: 0 });\n }\n\n // Reset swipe state\n this.swipeDirection.set(null);\n this.swiping.set(false);\n }\n}\n\nexport type NgpToastSwipeDirection = 'top' | 'right' | 'bottom' | 'left';\n\nexport type NgpToastPlacement =\n | 'top-start'\n | 'top-end'\n | 'top-center'\n | 'bottom-start'\n | 'bottom-end'\n | 'bottom-center';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAuEO,MAAM,kBAAkB,GAAmB;AAChD,IAAA,GAAG,EAAE,EAAE;AACP,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,SAAS,EAAE,EAAE;AACb,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,cAAc,EAAE,EAAE;IAClB,eAAe,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;AACnD,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,SAAS,E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A;kBAxBpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,IAAI,EAAE;AACJ,wBAAA,wBAAwB,EAAE,GAAG;AAC7B,wBAAA,wBAAwB,EAAE,GAAG;AAC7B,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,mBAAmB,EAAE,eAAe;AACpC,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,6BAA6B,EAAE,qBAAqB;AACpD,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,4BAA4B,EAAE,YAAY;AAC1C,wBAAA,6BAA6B,EAAE,UAAU;AACzC,wBAAA,6BAA6B,EAAE,SAAS;AACxC,wBAAA,2BAA2B,EAAE,aAAa;AAC1C,wBAAA,+BAA+B,EAAE,qBAAqB;AACtD,wBAAA,+BAA+B,EAAE,UAAU;AAC3C,wBAAA,qCAAqC,EAAE,oBAAoB;AAC3D,wBAAA,uCAAuC,EAAE,iBAAiB;AAC1D,wBAAA,uCAAuC,EAAE,iBAAiB;AAC1D,wBAAA,6BAA6B,EAAE,iBAAiB;AAChD,wBAAA,6BAA6B,EAAE,iBAAiB;AACjD,qBAAA;AACF,iBAAA;;sBAyHE,YAAY;uBAAC,aAAa,EAAE,CAAC,QAAQ,CAAC;;sBAqBtC,YAAY;uBAAC,aAAa,EAAE,CAAC,QAAQ,CAAC;;sBAsEtC,YAAY;uBAAC,WAAW;;;AC3P3B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-toast.mjs","sources":["../../../../packages/ng-primitives/toast/src/config/toast-config.ts","../../../../packages/ng-primitives/toast/src/toast/toast-context.ts","../../../../packages/ng-primitives/toast/src/toast/toast-options.ts","../../../../packages/ng-primitives/toast/src/toast/toast-manager.ts","../../../../packages/ng-primitives/toast/src/toast/toast-timer.ts","../../../../packages/ng-primitives/toast/src/toast/toast.ts","../../../../packages/ng-primitives/toast/src/ng-primitives-toast.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpToastPlacement, NgpToastSwipeDirection } from '../toast/toast';\n\nexport interface NgpToastConfig {\n /**\n * The position of the toast.\n */\n placement: NgpToastPlacement;\n\n /**\n * The duration of each toast.\n */\n duration: number;\n\n /**\n * The offset from the top of the viewport in pixels.\n */\n offsetTop: number;\n\n /**\n * The offset from the bottom of the viewport in pixels.\n */\n offsetBottom: number;\n\n /**\n * The offset from the left of the viewport in pixels.\n */\n offsetLeft: number;\n\n /**\n * The offset from the right of the viewport in pixels.\n */\n offsetRight: number;\n\n /**\n * Whether a toast can be dismissed by swiping.\n */\n dismissible: boolean;\n\n /**\n * The amount a toast must be swiped before it is considered dismissed.\n */\n swipeThreshold: number;\n\n /**\n * The default swipe directions supported by the toast.\n */\n swipeDirections: NgpToastSwipeDirection[];\n\n /**\n * The maximum number of toasts that can be displayed at once.\n */\n maxToasts: number;\n\n /**\n * The aria live setting.\n */\n ariaLive: string;\n\n /**\n * The gap between each toast.\n */\n gap: number;\n\n /**\n * The z-index of the toast container.\n * This is used to ensure that the toast container is always on top of other elements.\n */\n zIndex: number;\n\n /**\n * When true, only the front toast's timer will run.\n * When a toast is dismissed, the timer will start on the next toast.\n */\n sequential: boolean;\n}\n\nexport const defaultToastConfig: NgpToastConfig = {\n gap: 14,\n duration: 3000,\n placement: 'top-end',\n offsetTop: 24,\n offsetBottom: 24,\n offsetLeft: 24,\n offsetRight: 24,\n swipeThreshold: 45,\n swipeDirections: ['left', 'right', 'top', 'bottom'],\n dismissible: true,\n maxToasts: 3,\n zIndex: 9999999,\n ariaLive: 'polite',\n sequential: false,\n};\n\nexport const NgpToastConfigToken = new InjectionToken<NgpToastConfig>('NgpToastConfigToken');\n\n/**\n * Provide the default Toast configuration\n * @param config The Toast configuration\n * @returns The provider\n */\nexport function provideToastConfig(config: Partial<NgpToastConfig>): Provider[] {\n return [\n {\n provide: NgpToastConfigToken,\n useValue: { ...defaultToastConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Toast configuration\n * @returns The global Toast configuration\n */\nexport function injectToastConfig(): NgpToastConfig {\n return inject(NgpToastConfigToken, { optional: true }) ?? defaultToastConfig;\n}\n","import { inject, InjectionToken, ValueProvider } from '@angular/core';\n\nconst NgpToastContext = new InjectionToken<unknown>('NgpToastContext');\n\nexport function provideToastContext<T>(context: T): ValueProvider {\n return { provide: NgpToastContext, useValue: context };\n}\n\nexport function injectToastContext<T>(): T {\n return inject(NgpToastContext) as T;\n}\n","import { inject, InjectionToken, Signal, ValueProvider } from '@angular/core';\nimport type { NgpToast, NgpToastSwipeDirection, NgpToastPlacement } from './toast';\n\nconst NgpToastOptions = new InjectionToken<NgpToastOptions>('NgpToastOptions');\n\nexport function provideToastOptions(context: NgpToastOptions): ValueProvider {\n return { provide: NgpToastOptions, useValue: context };\n}\n\nexport function injectToastOptions(): NgpToastOptions {\n return inject(NgpToastOptions);\n}\n\nexport interface NgpToastOptions {\n /**\n * The position of the toast.\n */\n placement: NgpToastPlacement;\n\n /**\n * The duration of the toast in milliseconds.\n */\n duration: number;\n\n /**\n * A function to register the toast instance with the manager.\n * @internal\n */\n register: (toast: NgpToast) => void;\n\n /**\n * Whether the toast region is expanded.\n * @internal\n */\n expanded: Signal<boolean>;\n\n /**\n * Whether the toast supports swipe dismiss.\n * @internal\n */\n dismissible: boolean;\n\n /**\n * The swipe directions supported by the toast.\n * @internal\n */\n swipeDirections: NgpToastSwipeDirection[];\n\n /**\n * When true, only the front toast's timer will run.\n * @internal\n */\n sequential: boolean;\n}\n","import {\n ApplicationRef,\n computed,\n inject,\n Injectable,\n Injector,\n RendererFactory2,\n signal,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport { createPortal, NgpPortal } from 'ng-primitives/portal';\nimport { injectToastConfig } from '../config/toast-config';\nimport { NgpToast, NgpToastPlacement, NgpToastSwipeDirection } from './toast';\nimport { provideToastContext } from './toast-context';\nimport { provideToastOptions } from './toast-options';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgpToastManager {\n private readonly config = injectToastConfig();\n private readonly applicationRef = inject(ApplicationRef);\n private readonly rendererFactory = inject(RendererFactory2);\n private readonly renderer = this.rendererFactory.createRenderer(null, null);\n private readonly injector = inject(Injector);\n // Map to store containers by placement\n private readonly containers = new Map<string, HTMLElement>();\n\n readonly toasts = signal<NgpToastRecord[]>([]);\n\n /** Signal that tracks which placements are expanded */\n private readonly expanded = signal<NgpToastPlacement[]>([]);\n\n /** Show a toast notification */\n show(toast: TemplateRef<void> | Type<unknown>, options: NgpToastOptions = {}): NgpToastRef {\n // services can't access the view container directly, so this is a workaround\n const viewContainerRef = this.applicationRef.components[0].injector.get(ViewContainerRef);\n\n let instance: NgpToast | null = null;\n const placement = options.placement ?? this.config.placement;\n const duration = options.duration ?? this.config.duration;\n const container = this.getOrCreateContainer(placement);\n\n const portal = createPortal(\n toast,\n viewContainerRef,\n Injector.create({\n parent: this.injector,\n providers: [\n provideToastContext(options.context),\n provideToastOptions({\n placement,\n duration,\n register: (toast: NgpToast) => (instance = toast),\n expanded: computed(() => this.expanded().includes(placement)),\n dismissible: options.dismissible ?? this.config.dismissible,\n swipeDirections: options.swipeDirections ?? this.config.swipeDirections,\n sequential: options.sequential ?? this.config.sequential,\n }),\n ],\n }),\n {\n // Hide the toast when the dismiss method is called\n dismiss: () => this.dismiss(instance!),\n context: options.context,\n },\n );\n\n portal.attach(container);\n\n // Add the toast to the list of toasts\n if (!instance) {\n throw new Error('A toast must have the NgpToast directive applied.');\n }\n\n this.toasts.update(toasts => [{ instance: instance!, portal }, ...toasts]);\n\n return {\n dismiss: () => this.dismiss(instance!),\n };\n }\n\n /** Hide a toast notification */\n async dismiss(toast: NgpToast): Promise<void> {\n const ref = this.toasts().find(t => t.instance === toast);\n\n if (ref) {\n // Detach the portal from the container\n await ref.portal.detach();\n\n // Remove the toast from the list of toasts\n this.toasts.update(toasts => toasts.filter(t => t !== ref));\n\n // if there are no more toasts, ensure the container is no longer considered expanded\n if (this.toasts().length === 0) {\n this.expanded.update(expanded => expanded.filter(p => p !== toast.options.placement));\n }\n }\n }\n\n /**\n * Lazily create or get a container for a given placement.\n */\n private getOrCreateContainer(placement: string): HTMLElement {\n if (this.containers.has(placement)) {\n return this.containers.get(placement)!;\n }\n const container = this.createContainer(placement);\n this.containers.set(placement, container);\n return container;\n }\n\n /**\n * Create a section in which toasts will be rendered for a specific placement.\n */\n private createContainer(placement: string): HTMLElement {\n const container = this.renderer.createElement('section') as HTMLElement;\n this.renderer.setAttribute(container, 'aria-live', this.config.ariaLive);\n this.renderer.setAttribute(container, 'aria-atomic', 'false');\n this.renderer.setAttribute(container, 'tabindex', '-1');\n this.renderer.setAttribute(container, 'data-ngp-toast-container', placement);\n container.style.setProperty('position', 'fixed');\n container.style.setProperty('z-index', `${this.config.zIndex}`);\n container.style.setProperty('--ngp-toast-offset-top', `${this.config.offsetTop}px`);\n container.style.setProperty('--ngp-toast-offset-bottom', `${this.config.offsetBottom}px`);\n container.style.setProperty('--ngp-toast-offset-left', `${this.config.offsetLeft}px`);\n container.style.setProperty('--ngp-toast-offset-right', `${this.config.offsetRight}px`);\n container.style.setProperty('--ngp-toast-gap', `${this.config.gap}px`);\n\n // mark the container as expanded\n this.renderer.listen(container, 'mouseenter', () =>\n this.expanded.update(expanded => [...expanded, placement as NgpToastPlacement]),\n );\n\n this.renderer.listen(container, 'mouseleave', () => {\n this.expanded.update(expanded =>\n expanded.filter(p => p !== (placement as NgpToastPlacement)),\n );\n });\n\n // Set placement styles\n switch (placement) {\n case 'top-start':\n container.style.setProperty('top', `${this.config.offsetTop}px`);\n container.style.setProperty('left', `${this.config.offsetLeft}px`);\n break;\n case 'top-center':\n container.style.setProperty('top', `${this.config.offsetTop}px`);\n container.style.setProperty('left', '50%');\n container.style.setProperty('transform', 'translateX(-50%)');\n break;\n case 'top-end':\n container.style.setProperty('top', `${this.config.offsetTop}px`);\n container.style.setProperty('right', `${this.config.offsetRight}px`);\n break;\n case 'bottom-start':\n container.style.setProperty('bottom', `${this.config.offsetBottom}px`);\n container.style.setProperty('left', `${this.config.offsetLeft}px`);\n break;\n case 'bottom-center':\n container.style.setProperty('bottom', `${this.config.offsetBottom}px`);\n container.style.setProperty('left', '50%');\n container.style.setProperty('transform', 'translateX(-50%)');\n break;\n case 'bottom-end':\n container.style.setProperty('bottom', `${this.config.offsetBottom}px`);\n container.style.setProperty('right', `${this.config.offsetRight}px`);\n break;\n default:\n throw new Error(`Unknown toast placement: ${placement}`);\n }\n\n this.renderer.appendChild(document.body, container);\n return container;\n }\n}\n\nexport interface NgpToastOptions<T = unknown> {\n /** The position of the toast */\n placement?: NgpToastPlacement;\n\n /** The duration of the toast in milliseconds */\n duration?: number;\n\n /** Whether the toast is dismissible */\n dismissible?: boolean;\n\n /** The swipe directions supported by the toast */\n swipeDirections?: NgpToastSwipeDirection[];\n\n /** The context to make available to the toast */\n context?: T;\n\n /** When enabled, only the front toast's timer will run */\n sequential?: boolean;\n}\n\ninterface NgpToastRecord {\n instance: NgpToast;\n portal: NgpPortal;\n}\n\nexport interface NgpToastRef {\n dismiss(): Promise<void>;\n}\n","class NgpToastTimer {\n private startTime: number | null = null;\n private remaining: number;\n private timeoutId: ReturnType<typeof setTimeout> | null = null;\n private isRunning = false;\n\n constructor(\n private duration: number,\n private callback: () => void,\n ) {\n this.remaining = duration;\n }\n\n start(): void {\n if (this.isRunning) return;\n\n this.isRunning = true;\n this.startTime = Date.now();\n\n this.timeoutId = setTimeout(() => {\n this.isRunning = false;\n this.callback();\n }, this.remaining);\n }\n\n pause(): void {\n if (!this.isRunning || this.startTime === null) return;\n\n this.isRunning = false;\n clearTimeout(this.timeoutId!);\n\n const elapsed = Date.now() - this.startTime;\n this.remaining -= elapsed;\n this.startTime = null;\n this.timeoutId = null;\n }\n\n stop(): void {\n this.isRunning = false;\n clearTimeout(this.timeoutId!);\n this.timeoutId = null;\n this.startTime = null;\n this.remaining = this.duration;\n }\n}\n\nexport function toastTimer(duration: number, callback: () => void): NgpToastTimer {\n return new NgpToastTimer(duration, callback);\n}\n","import { InteractivityChecker } from '@angular/cdk/a11y';\nimport {\n afterNextRender,\n computed,\n Directive,\n HostListener,\n inject,\n Injector,\n signal,\n} from '@angular/core';\nimport { explicitEffect, injectDimensions } from 'ng-primitives/internal';\nimport { injectToastConfig } from '../config/toast-config';\nimport { NgpToastManager } from './toast-manager';\nimport { injectToastOptions } from './toast-options';\nimport { toastTimer } from './toast-timer';\n\n@Directive({\n selector: '[ngpToast]',\n exportAs: 'ngpToast',\n host: {\n '[attr.data-position-x]': 'x',\n '[attr.data-position-y]': 'y',\n '[attr.data-visible]': 'visible()',\n '[attr.data-front]': 'index() === 0',\n '[attr.data-swiping]': 'swiping()',\n '[attr.data-swipe-direction]': 'swipeOutDirection()',\n '[attr.data-expanded]': 'options.expanded()',\n '[style.--ngp-toast-gap.px]': 'config.gap',\n '[style.--ngp-toast-z-index]': 'zIndex()',\n '[style.--ngp-toasts-before]': 'index()',\n '[style.--ngp-toast-index]': 'index() + 1',\n '[style.--ngp-toast-height.px]': 'dimensions().height',\n '[style.--ngp-toast-offset.px]': 'offset()',\n '[style.--ngp-toast-front-height.px]': 'frontToastHeight()',\n '[style.--ngp-toast-swipe-amount-x.px]': 'swipeAmount().x',\n '[style.--ngp-toast-swipe-amount-y.px]': 'swipeAmount().y',\n '[style.--ngp-toast-swipe-x]': 'swipeAmount().x',\n '[style.--ngp-toast-swipe-y]': 'swipeAmount().y',\n },\n})\nexport class NgpToast {\n private readonly manager = inject(NgpToastManager);\n private readonly injector = inject(Injector);\n protected readonly config = injectToastConfig();\n /** @internal */\n readonly options = injectToastOptions();\n private readonly interactivityChecker = inject(InteractivityChecker);\n private readonly isInteracting = signal(false);\n\n private pointerStartRef: { x: number; y: number } | null = null;\n private dragStartTime: Date | null = null;\n protected readonly swiping = signal(false);\n protected readonly swipeDirection = signal<'x' | 'y' | null>(null);\n protected readonly swipeAmount = signal({ x: 0, y: 0 });\n\n protected readonly swipeOutDirection = computed(() => {\n const direction = this.swipeDirection();\n if (direction === 'x') {\n return this.swipeAmount().x > 0 ? 'right' : 'left';\n } else if (direction === 'y') {\n return this.swipeAmount().y > 0 ? 'bottom' : 'top';\n }\n return null;\n });\n\n /**\n * Get all toasts that are currently being displayed in the same position.\n */\n private readonly toasts = computed(() =>\n this.manager\n .toasts()\n .filter(toast => toast.instance.options.placement === this.options.placement),\n );\n\n /**\n * The number of toasts that are currently being displayed before this toast.\n */\n protected readonly index = computed(() => {\n return this.toasts().findIndex(toast => toast.instance === this);\n });\n\n /**\n * Determine the position of the toast in the list of toasts.\n * This is the combination of the heights of all the toasts before this one, plus the gap between them.\n */\n protected readonly offset = computed(() => {\n const gap = this.config.gap;\n\n return this.toasts()\n .slice(0, this.index())\n .reduce((acc, toast) => acc + toast.instance.dimensions().height + gap, 0);\n });\n\n /**\n * Determine if this toast is visible.\n * Visible considers the maximum number of toasts that can be displayed at once, and the last x toasts that are currently being displayed.\n */\n protected readonly visible = computed(() => {\n const maxToasts = this.config.maxToasts;\n // determine if this toast is within the maximum number of toasts that can be displayed\n return this.index() < maxToasts || this.toasts().length <= maxToasts;\n });\n\n /**\n * Determine the height of the front toast.\n * This is used to determine the height of the toast when it is not expanded.\n */\n protected readonly frontToastHeight = computed(() => {\n // get the first toast in the list with height - as when a new toast is added, it may not initially have dimensions\n return (\n this.toasts()\n .find(toast => toast.instance.dimensions().height)\n ?.instance.dimensions().height || 0\n );\n });\n\n /**\n * Determine the z-index of the toast. This is the inverse of the index.\n * The first toast will have the highest z-index, and the last toast will have the lowest z-index.\n * This is used to ensure that the first toast is always on top of the others.\n */\n protected readonly zIndex = computed(() => this.toasts().length - this.index());\n\n /**\n * The height of the toast in pixels.\n */\n protected readonly dimensions = injectDimensions();\n\n /**\n * The x position of the toast.\n */\n readonly x = this.options.placement.split('-')[1] || 'end';\n\n /**\n * The y position of the toast.\n */\n readonly y = this.options.placement.split('-')[0] || 'top';\n\n /**\n * The toast timer instance.\n */\n private readonly timer = toastTimer(this.options.duration, () => this.manager.dismiss(this));\n\n constructor() {\n this.options.register(this);\n\n // Start the timer when the toast is created\n this.timer.start();\n\n // Pause the timer when the toast is expanded or when the user is interacting with it\n // Also pause when in sequential mode and this toast is not at the front\n explicitEffect(\n [this.options.expanded, this.isInteracting, this.index, () => this.options.sequential],\n ([expanded, interacting, index, sequential]) => {\n // If the toast is expanded, or if the user is interacting with it, pause the timer\n // In sequential mode, also pause if this toast is not at the front\n if (expanded || interacting || (sequential && index > 0)) {\n this.timer.pause();\n } else {\n this.timer.start();\n }\n },\n );\n }\n\n @HostListener('pointerdown', ['$event'])\n protected onPointerDown(event: PointerEvent): void {\n // right click should not trigger swipe and we check if the toast is dismissible\n if (event.button === 2 || !this.options.dismissible) {\n return;\n }\n\n this.isInteracting.set(true);\n\n // we need to check if the pointer is on an interactive element, if so, we should not start swiping\n if (this.interactivityChecker.isFocusable(event.target as HTMLElement)) {\n return;\n }\n\n this.dragStartTime = new Date();\n // Ensure we maintain correct pointer capture even when going outside of the toast (e.g. when swiping)\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n this.swiping.set(true);\n this.pointerStartRef = { x: event.clientX, y: event.clientY };\n }\n\n @HostListener('pointermove', ['$event'])\n protected onPointerMove(event: PointerEvent): void {\n if (!this.pointerStartRef || !this.options.dismissible) {\n return;\n }\n\n const isHighlighted = window.getSelection()?.toString().length ?? 0 > 0;\n\n if (isHighlighted) {\n return;\n }\n\n const yDelta = event.clientY - this.pointerStartRef.y;\n const xDelta = event.clientX - this.pointerStartRef.x;\n\n const swipeDirections = this.options.swipeDirections;\n\n // Determine swipe direction if not already locked\n if (!this.swipeDirection() && (Math.abs(xDelta) > 1 || Math.abs(yDelta) > 1)) {\n this.swipeDirection.set(Math.abs(xDelta) > Math.abs(yDelta) ? 'x' : 'y');\n }\n\n const swipeAmount = { x: 0, y: 0 };\n\n const getDampening = (delta: number) => {\n const factor = Math.abs(delta) / 20;\n\n return 1 / (1.5 + factor);\n };\n\n // Only apply swipe in the locked direction\n if (this.swipeDirection() === 'y') {\n // Handle vertical swipes\n if (swipeDirections.includes('top') || swipeDirections.includes('bottom')) {\n if (\n (swipeDirections.includes('top') && yDelta < 0) ||\n (swipeDirections.includes('bottom') && yDelta > 0)\n ) {\n swipeAmount.y = yDelta;\n } else {\n // Smoothly transition to dampened movement\n const dampenedDelta = yDelta * getDampening(yDelta);\n // Ensure we don't jump when transitioning to dampened movement\n swipeAmount.y = Math.abs(dampenedDelta) < Math.abs(yDelta) ? dampenedDelta : yDelta;\n }\n }\n } else if (this.swipeDirection() === 'x') {\n // Handle horizontal swipes\n if (swipeDirections.includes('left') || swipeDirections.includes('right')) {\n if (\n (swipeDirections.includes('left') && xDelta < 0) ||\n (swipeDirections.includes('right') && xDelta > 0)\n ) {\n swipeAmount.x = xDelta;\n } else {\n // Smoothly transition to dampened movement\n const dampenedDelta = xDelta * getDampening(xDelta);\n // Ensure we don't jump when transitioning to dampened movement\n swipeAmount.x = Math.abs(dampenedDelta) < Math.abs(xDelta) ? dampenedDelta : xDelta;\n }\n }\n }\n\n this.swipeAmount.set({ x: swipeAmount.x, y: swipeAmount.y });\n\n if (Math.abs(swipeAmount.x) > 0 || Math.abs(swipeAmount.y) > 0) {\n this.swiping.set(true);\n }\n }\n\n @HostListener('pointerup')\n protected onPointerUp(): void {\n this.isInteracting.set(false);\n\n if (\n !this.config.dismissible ||\n !this.pointerStartRef ||\n !this.swiping() ||\n !this.dragStartTime\n ) {\n return;\n }\n\n this.pointerStartRef = null;\n\n const swipeAmountX = this.swipeAmount().x;\n const swipeAmountY = this.swipeAmount().y;\n const timeTaken = new Date().getTime() - this.dragStartTime.getTime();\n\n const swipeAmount = this.swipeDirection() === 'x' ? swipeAmountX : swipeAmountY;\n const velocity = Math.abs(swipeAmount) / timeTaken;\n\n if (Math.abs(swipeAmount) >= this.config.swipeThreshold || velocity > 0.11) {\n afterNextRender({ write: () => this.manager.dismiss(this) }, { injector: this.injector });\n return;\n } else {\n this.swipeAmount.set({ x: 0, y: 0 });\n }\n\n // Reset swipe state\n this.swipeDirection.set(null);\n this.swiping.set(false);\n }\n}\n\nexport type NgpToastSwipeDirection = 'top' | 'right' | 'bottom' | 'left';\n\nexport type NgpToastPlacement =\n | 'top-start'\n | 'top-end'\n | 'top-center'\n | 'bottom-start'\n | 'bottom-end'\n | 'bottom-center';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA6EO,MAAM,kBAAkB,GAAmB;AAChD,IAAA,GAAG,EAAE,EAAE;AACP,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,SAAS,EAAE,EAAE;AACb,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,cAAc,EAAE,EAAE;IAClB,eAAe,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;AACnD,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,QAAQ,EAAE,QAAQ;AAClB,IAAA,UAAU,EAAE,KAAK;CAClB;AAEM,MAAM,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,CAAC;AAE5F;;;;AAIG;AACG,SAAU,kBAAkB,CAAC,MAA+B,EAAA;IAChE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,mBAAmB;AAC5B,YAAA,QAAQ,EAAE,EAAE,GAAG,kBAAkB,EAAE,GAAG,MAAM,EAAE;AAC/C,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,kBAAkB;AAC9E;;AClH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AACpC,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,6BAA6B,EAAE,qBAAqB;AACpD,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,4BAA4B,EAAE,YAAY;AAC1C,wBAAA,6BAA6B,EAAE,UAAU;AACzC,wBAAA,6BAA6B,EAAE,SAAS;AACxC,wBAAA,2BAA2B,EAAE,aAAa;AAC1C,wBAAA,+BAA+B,EAAE,qBAAqB;AACtD,wBAAA,+BAA+B,EAAE,UAAU;AAC3C,wBAAA,qCAAqC,EAAE,oBAAoB;AAC3D,wBAAA,uCAAuC,EAAE,iBAAiB;AAC1D,wBAAA,uCAAuC,EAAE,iBAAiB;AAC1D,wBAAA,6BAA6B,EAAE,iBAAiB;AAChD,wBAAA,6BAA6B,EAAE,iBAAiB;AACjD,qBAAA;AACF,iBAAA;;sBA8HE,YAAY;uBAAC,aAAa,EAAE,CAAC,QAAQ,CAAC;;sBAqBtC,YAAY;uBAAC,aAAa,EAAE,CAAC,QAAQ,CAAC;;sBAsEtC,YAAY;uBAAC,WAAW;;;AChQ3B;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ng-primitives",
|
|
3
3
|
"description": "Angular Primitives is a low-level headless UI component library with a focus on accessibility, customization, and developer experience. ",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.103.1",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"angular",
|
|
8
8
|
"primitives",
|
package/toast/index.d.ts
CHANGED
|
@@ -32,6 +32,11 @@ interface NgpToastOptions$1 {
|
|
|
32
32
|
* @internal
|
|
33
33
|
*/
|
|
34
34
|
swipeDirections: NgpToastSwipeDirection[];
|
|
35
|
+
/**
|
|
36
|
+
* When true, only the front toast's timer will run.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
sequential: boolean;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
declare class NgpToast {
|
|
@@ -160,6 +165,11 @@ interface NgpToastConfig {
|
|
|
160
165
|
* This is used to ensure that the toast container is always on top of other elements.
|
|
161
166
|
*/
|
|
162
167
|
zIndex: number;
|
|
168
|
+
/**
|
|
169
|
+
* When true, only the front toast's timer will run.
|
|
170
|
+
* When a toast is dismissed, the timer will start on the next toast.
|
|
171
|
+
*/
|
|
172
|
+
sequential: boolean;
|
|
163
173
|
}
|
|
164
174
|
/**
|
|
165
175
|
* Provide the default Toast configuration
|
|
@@ -206,6 +216,8 @@ interface NgpToastOptions<T = unknown> {
|
|
|
206
216
|
swipeDirections?: NgpToastSwipeDirection[];
|
|
207
217
|
/** The context to make available to the toast */
|
|
208
218
|
context?: T;
|
|
219
|
+
/** When enabled, only the front toast's timer will run */
|
|
220
|
+
sequential?: boolean;
|
|
209
221
|
}
|
|
210
222
|
interface NgpToastRecord {
|
|
211
223
|
instance: NgpToast;
|