@radix-ng/primitives 1.0.0-beta.4 → 1.0.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.
Files changed (83) hide show
  1. package/composite/README.md +3 -0
  2. package/fesm2022/radix-ng-primitives-accordion.mjs +12 -36
  3. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  4. package/fesm2022/radix-ng-primitives-checkbox.mjs +33 -18
  5. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  6. package/fesm2022/radix-ng-primitives-composite.mjs +515 -0
  7. package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -0
  8. package/fesm2022/radix-ng-primitives-core.mjs +7 -0
  9. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-dialog.mjs +54 -12
  11. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  12. package/fesm2022/radix-ng-primitives-drawer.mjs +442 -2
  13. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-editable.mjs +12 -7
  15. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +294 -8
  17. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-focus-scope.mjs +9 -0
  19. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-menu.mjs +71 -20
  21. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-menubar.mjs +68 -36
  23. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  24. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +281 -88
  25. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-number-field.mjs +7 -2
  27. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-popover.mjs +117 -35
  29. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-popper.mjs +73 -65
  31. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-radio.mjs +77 -36
  33. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  34. package/fesm2022/radix-ng-primitives-roving-focus.mjs +40 -8
  35. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  36. package/fesm2022/radix-ng-primitives-scroll-area.mjs +56 -25
  37. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  38. package/fesm2022/radix-ng-primitives-select.mjs +62 -37
  39. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  40. package/fesm2022/radix-ng-primitives-slider.mjs +259 -28
  41. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  42. package/fesm2022/radix-ng-primitives-stepper.mjs +11 -7
  43. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  44. package/fesm2022/radix-ng-primitives-switch.mjs +10 -5
  45. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  46. package/fesm2022/radix-ng-primitives-tabs.mjs +64 -30
  47. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  48. package/fesm2022/radix-ng-primitives-toggle-group.mjs +69 -19
  49. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  50. package/fesm2022/radix-ng-primitives-toggle.mjs +37 -13
  51. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  52. package/fesm2022/radix-ng-primitives-toolbar.mjs +50 -24
  53. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  54. package/fesm2022/radix-ng-primitives-tooltip.mjs +180 -35
  55. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  56. package/navigation-menu/README.md +5 -2
  57. package/package.json +5 -1
  58. package/types/radix-ng-primitives-accordion.d.ts +9 -13
  59. package/types/radix-ng-primitives-checkbox.d.ts +27 -15
  60. package/types/radix-ng-primitives-composite.d.ts +152 -0
  61. package/types/radix-ng-primitives-core.d.ts +2 -0
  62. package/types/radix-ng-primitives-dialog.d.ts +13 -2
  63. package/types/radix-ng-primitives-drawer.d.ts +40 -2
  64. package/types/radix-ng-primitives-editable.d.ts +11 -5
  65. package/types/radix-ng-primitives-floating-focus-manager.d.ts +113 -16
  66. package/types/radix-ng-primitives-menu.d.ts +13 -5
  67. package/types/radix-ng-primitives-menubar.d.ts +10 -5
  68. package/types/radix-ng-primitives-navigation-menu.d.ts +65 -33
  69. package/types/radix-ng-primitives-number-field.d.ts +8 -3
  70. package/types/radix-ng-primitives-popover.d.ts +26 -10
  71. package/types/radix-ng-primitives-popper.d.ts +1 -0
  72. package/types/radix-ng-primitives-radio.d.ts +22 -13
  73. package/types/radix-ng-primitives-roving-focus.d.ts +15 -1
  74. package/types/radix-ng-primitives-scroll-area.d.ts +4 -1
  75. package/types/radix-ng-primitives-select.d.ts +16 -20
  76. package/types/radix-ng-primitives-slider.d.ts +60 -9
  77. package/types/radix-ng-primitives-stepper.d.ts +11 -4
  78. package/types/radix-ng-primitives-switch.d.ts +10 -4
  79. package/types/radix-ng-primitives-tabs.d.ts +20 -11
  80. package/types/radix-ng-primitives-toggle-group.d.ts +34 -17
  81. package/types/radix-ng-primitives-toggle.d.ts +14 -7
  82. package/types/radix-ng-primitives-toolbar.d.ts +22 -14
  83. package/types/radix-ng-primitives-tooltip.d.ts +38 -14
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-slider.mjs","sources":["../../../packages/primitives/slider/src/slider-context.ts","../../../packages/primitives/slider/src/slider.utils.ts","../../../packages/primitives/slider/src/slider-control.ts","../../../packages/primitives/slider/src/slider-indicator.ts","../../../packages/primitives/slider/src/slider-root.ts","../../../packages/primitives/slider/src/slider-thumb.ts","../../../packages/primitives/slider/src/slider-thumb-input.ts","../../../packages/primitives/slider/src/slider-track.ts","../../../packages/primitives/slider/src/slider-value.ts","../../../packages/primitives/slider/index.ts","../../../packages/primitives/slider/radix-ng-primitives-slider.ts"],"sourcesContent":["import { createContext } from '@radix-ng/primitives/core';\nimport type { RdxSliderRoot } from './slider-root';\n\n/**\n * The Slider context exposes the root directive instance to every child part.\n * The root owns all state, value-change logic and thumb registration; parts read\n * signals and call methods off it.\n *\n * @see https://base-ui.com/react/components/slider\n */\nexport const [injectSliderRootContext, provideSliderRootContext] = createContext<RdxSliderRoot>(\n 'RdxSliderRootContext',\n 'components/slider'\n);\n","import { clamp } from '@radix-ng/primitives/core';\n\nexport { clamp };\n\nexport type SliderOrientation = 'horizontal' | 'vertical';\nexport type ThumbCollisionBehavior = 'push' | 'swap' | 'none';\n\n/** Ascending comparator. */\nexport function asc(a: number, b: number): number {\n return a - b;\n}\n\n/** Maps a value within `[min, max]` to a 0–100 percentage. */\nexport function valueToPercent(value: number, min: number, max: number): number {\n return ((value - min) * 100) / (max - min);\n}\n\n/** Replaces the item at `index` then re-sorts the array ascending. */\nexport function replaceArrayItemAtIndex(array: readonly number[], index: number, newValue: number): number[] {\n const output = array.slice();\n output[index] = newValue;\n return output.sort(asc);\n}\n\n/** The center point of an element in client coordinates. */\nexport function getMidpoint(element: Element): { x: number; y: number } {\n const rect = element.getBoundingClientRect();\n return { x: (rect.left + rect.right) / 2, y: (rect.top + rect.bottom) / 2 };\n}\n\n/** Converts an array of values into clamped 0–100 percentages. */\nexport function valueArrayToPercentages(values: readonly number[], min: number, max: number): number[] {\n return values.map((value) => clamp(valueToPercent(value, min, max), 0, 100));\n}\n\n/** Number of decimal places in `num`, handling exponential notation for tiny values. */\nexport function getDecimalPrecision(num: number): number {\n if (num === 0) {\n return 0;\n }\n if (Math.abs(num) < 1) {\n const parts = num.toExponential().split('e-');\n const mantissaDecimalPart = parts[0].split('.')[1];\n return (mantissaDecimalPart ? mantissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n const decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\n/** Snaps `value` to the nearest step, using `min` as the origin of the step grid. */\nexport function roundValueToStep(value: number, step: number, min: number): number {\n const nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(Math.max(getDecimalPrecision(step), getDecimalPrecision(min))));\n}\n\n/**\n * Resolves the value(s) for the keyboard / hidden-input path: clamps to the\n * bounds, and for range sliders also clamps to neighbouring thumbs and re-sorts.\n * Returns a `number` for single sliders and a sorted `number[]` for range sliders.\n */\nexport function getSliderValue(\n valueInput: number,\n index: number,\n min: number,\n max: number,\n range: boolean,\n values: readonly number[]\n): number | number[] {\n let newValue = clamp(valueInput, min, max);\n if (range) {\n newValue = clamp(\n newValue,\n values[index - 1] ?? Number.NEGATIVE_INFINITY,\n values[index + 1] ?? Number.POSITIVE_INFINITY\n );\n return replaceArrayItemAtIndex(values, index, newValue);\n }\n return newValue;\n}\n\n/** Returns `false` if any adjacent pair of values is closer than the minimum distance. */\nexport function validateMinimumDistance(\n values: number | number[],\n step: number,\n minStepsBetweenValues: number\n): boolean {\n if (!Array.isArray(values)) {\n return true;\n }\n const distances = values.reduce<number[]>((acc, val, index, vals) => {\n if (index === vals.length - 1) {\n return acc;\n }\n acc.push(Math.abs(val - vals[index + 1]));\n return acc;\n }, []);\n return Math.min(...distances) >= step * minStepsBetweenValues;\n}\n\n/** Keyboard step helper: increments/decrements `thumbValue` and clamps to bounds. */\nexport function getNewValue(\n thumbValue: number,\n increment: number,\n direction: 1 | -1,\n min: number,\n max: number\n): number {\n const value = direction === 1 ? thumbValue + increment : thumbValue - increment;\n const roundedValue = Number(\n value.toFixed(\n Math.max(getDecimalPrecision(thumbValue), getDecimalPrecision(increment), getDecimalPrecision(min))\n )\n );\n return clamp(roundedValue, min, max);\n}\n\ninterface GetPushedThumbValuesParams {\n values: readonly number[];\n index: number;\n nextValue: number;\n min: number;\n max: number;\n step: number;\n minStepsBetweenValues: number;\n initialValues?: readonly number[];\n}\n\n/**\n * The \"push\" collision algorithm: moves the pressed thumb and pushes its\n * neighbours only as far as needed, letting them spring back toward their\n * initial positions as the pressed thumb retreats.\n */\nexport function getPushedThumbValues(params: GetPushedThumbValuesParams): number[] {\n const { values, index, nextValue, min, max, step, minStepsBetweenValues, initialValues } = params;\n if (values.length === 0) {\n return [];\n }\n const nextValues = values.slice();\n const minValueDifference = step * minStepsBetweenValues;\n const lastIndex = nextValues.length - 1;\n const baseInitialValues = initialValues ?? values;\n\n const indexMin = min + index * minValueDifference;\n const indexMax = max - (lastIndex - index) * minValueDifference;\n nextValues[index] = clamp(nextValue, indexMin, indexMax);\n\n // push thumbs to the right\n for (let i = index + 1; i <= lastIndex; i += 1) {\n const minAllowed = nextValues[i - 1] + minValueDifference;\n const maxAllowed = max - (lastIndex - i) * minValueDifference;\n const initialValue = baseInitialValues[i] ?? nextValues[i];\n let candidate = Math.max(nextValues[i], minAllowed);\n if (initialValue < candidate) {\n candidate = Math.max(initialValue, minAllowed);\n }\n nextValues[i] = clamp(candidate, minAllowed, maxAllowed);\n }\n\n // push thumbs to the left\n for (let i = index - 1; i >= 0; i -= 1) {\n const maxAllowed = nextValues[i + 1] - minValueDifference;\n const minAllowed = min + i * minValueDifference;\n const initialValue = baseInitialValues[i] ?? nextValues[i];\n let candidate = Math.min(nextValues[i], maxAllowed);\n if (initialValue > candidate) {\n candidate = Math.min(initialValue, maxAllowed);\n }\n nextValues[i] = clamp(candidate, minAllowed, maxAllowed);\n }\n\n for (let i = 0; i <= lastIndex; i += 1) {\n nextValues[i] = Number(nextValues[i].toFixed(12));\n }\n return nextValues;\n}\n\nexport interface ResolveThumbCollisionParams {\n behavior: ThumbCollisionBehavior;\n values: readonly number[];\n currentValues?: readonly number[];\n initialValues?: readonly number[] | null;\n pressedIndex: number;\n nextValue: number;\n min: number;\n max: number;\n step: number;\n minStepsBetweenValues: number;\n}\n\nexport interface ResolveThumbCollisionResult {\n value: number | number[];\n thumbIndex: number;\n didSwap: boolean;\n}\n\n/** Dispatches the pressed thumb's new value through the configured collision behavior. */\nexport function resolveThumbCollision(params: ResolveThumbCollisionParams): ResolveThumbCollisionResult {\n const {\n behavior,\n values,\n currentValues,\n initialValues,\n pressedIndex,\n nextValue,\n min,\n max,\n step,\n minStepsBetweenValues\n } = params;\n\n const activeValues = (currentValues ?? values).slice();\n const baselineValues = initialValues ?? values;\n const range = activeValues.length > 1;\n const minValueDifference = step * minStepsBetweenValues;\n\n if (!range) {\n return { value: nextValue, thumbIndex: 0, didSwap: false };\n }\n\n if (behavior === 'push') {\n const value = getPushedThumbValues({\n values: activeValues,\n index: pressedIndex,\n nextValue,\n min,\n max,\n step,\n minStepsBetweenValues\n });\n return { value, thumbIndex: pressedIndex, didSwap: false };\n }\n\n if (behavior === 'swap') {\n const pressedInitialValue = activeValues[pressedIndex];\n const epsilon = 1e-7;\n const candidateValues = activeValues.slice();\n const previousNeighbor = candidateValues[pressedIndex - 1];\n const nextNeighbor = candidateValues[pressedIndex + 1];\n\n const lowerBound = previousNeighbor != null ? previousNeighbor + minValueDifference : min;\n const upperBound = nextNeighbor != null ? nextNeighbor - minValueDifference : max;\n\n const constrainedValue = clamp(nextValue, lowerBound, upperBound);\n const pressedValueAfterClamp = Number(constrainedValue.toFixed(12));\n candidateValues[pressedIndex] = pressedValueAfterClamp;\n\n const movingForward = nextValue > pressedInitialValue;\n const movingBackward = nextValue < pressedInitialValue;\n const shouldSwapForward = movingForward && nextNeighbor != null && nextValue >= nextNeighbor - epsilon;\n const shouldSwapBackward =\n movingBackward && previousNeighbor != null && nextValue <= previousNeighbor + epsilon;\n\n if (!shouldSwapForward && !shouldSwapBackward) {\n return { value: candidateValues, thumbIndex: pressedIndex, didSwap: false };\n }\n\n const targetIndex = shouldSwapForward ? pressedIndex + 1 : pressedIndex - 1;\n\n const initialValuesForPush = candidateValues.map((_, idx) => {\n if (idx === pressedIndex) {\n return pressedValueAfterClamp;\n }\n const baseline = baselineValues[idx];\n return baseline != null ? baseline : activeValues[idx];\n });\n\n const nextValueForTarget = shouldSwapForward\n ? Math.max(nextValue, candidateValues[targetIndex])\n : Math.min(nextValue, candidateValues[targetIndex]);\n\n const adjustedValues = getPushedThumbValues({\n values: candidateValues,\n index: targetIndex,\n nextValue: nextValueForTarget,\n min,\n max,\n step,\n minStepsBetweenValues,\n initialValues: initialValuesForPush\n });\n\n const neighborIndex = shouldSwapForward ? targetIndex - 1 : targetIndex + 1;\n if (neighborIndex >= 0 && neighborIndex < adjustedValues.length) {\n const previousValue = adjustedValues[neighborIndex - 1];\n const nextValueAfter = adjustedValues[neighborIndex + 1];\n let neighborLowerBound = previousValue != null ? previousValue + minValueDifference : min;\n neighborLowerBound = Math.max(neighborLowerBound, min + neighborIndex * minValueDifference);\n let neighborUpperBound = nextValueAfter != null ? nextValueAfter - minValueDifference : max;\n neighborUpperBound = Math.min(\n neighborUpperBound,\n max - (adjustedValues.length - 1 - neighborIndex) * minValueDifference\n );\n const restoredValue = clamp(pressedValueAfterClamp, neighborLowerBound, neighborUpperBound);\n adjustedValues[neighborIndex] = Number(restoredValue.toFixed(12));\n }\n\n return { value: adjustedValues, thumbIndex: targetIndex, didSwap: true };\n }\n\n // behavior === 'none' — clamp the pressed thumb between its neighbours; thumbs never cross.\n const previousNeighbor = activeValues[pressedIndex - 1];\n const nextNeighbor = activeValues[pressedIndex + 1];\n const lowerBound = previousNeighbor != null ? previousNeighbor + minValueDifference : min;\n const upperBound = nextNeighbor != null ? nextNeighbor - minValueDifference : max;\n const constrained = Number(clamp(nextValue, lowerBound, upperBound).toFixed(12));\n const value = activeValues.slice();\n value[pressedIndex] = constrained;\n return { value, thumbIndex: pressedIndex, didSwap: false };\n}\n\n/**\n * Border + padding on the leading/trailing edge of the control along the active\n * axis. Uses physical longhands (`left`/`right`/`top`/`bottom`) rather than\n * logical ones (`inline-start`/…) because `getComputedStyle` resolves the\n * physical properties in every browser, whereas logical longhands return an\n * empty string in some engines.\n */\nexport function getControlOffset(\n styles: CSSStyleDeclaration | null,\n vertical: boolean,\n rtl: boolean\n): { start: number; end: number } {\n if (!styles) {\n return { start: 0, end: 0 };\n }\n const parseSize = (v: string): number => {\n const p = parseFloat(v);\n return Number.isNaN(p) ? 0 : p;\n };\n const sideOffset = (side: 'left' | 'right' | 'top' | 'bottom'): number =>\n parseSize(styles.getPropertyValue(`border-${side}-width`)) +\n parseSize(styles.getPropertyValue(`padding-${side}`));\n\n let startSide: 'left' | 'right' | 'top';\n let endSide: 'right' | 'left' | 'bottom';\n if (vertical) {\n startSide = 'top';\n endSide = 'bottom';\n } else if (rtl) {\n startSide = 'right';\n endSide = 'left';\n } else {\n startSide = 'left';\n endSide = 'right';\n }\n\n return { start: sideOffset(startSide), end: sideOffset(endSide) };\n}\n\nconst formatterCache = new Map<string, Intl.NumberFormat>();\n\nfunction getFormatter(locale: string | undefined, options: Intl.NumberFormatOptions | undefined): Intl.NumberFormat {\n const key = JSON.stringify({ locale: locale ?? null, options: options ?? null });\n let formatter = formatterCache.get(key);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale, options);\n formatterCache.set(key, formatter);\n }\n return formatter;\n}\n\n/** Formats a number with a cached `Intl.NumberFormat` instance. */\nexport function formatNumber(\n value: number | null | undefined,\n locale: string | undefined,\n options: Intl.NumberFormatOptions | undefined\n): string {\n if (value == null) {\n return '';\n }\n return getFormatter(locale, options).format(value);\n}\n\n/** Default `aria-valuetext` for a two-thumb range, or a formatted value when `format` is set. */\nexport function getDefaultAriaValueText(\n values: readonly number[],\n index: number,\n format: Intl.NumberFormatOptions | undefined,\n locale: string | undefined\n): string | undefined {\n if (index < 0) {\n return undefined;\n }\n if (values.length === 2) {\n return index === 0\n ? `${formatNumber(values[index], locale, format)} start range`\n : `${formatNumber(values[index], locale, format)} end range`;\n }\n return format ? formatNumber(values[index], locale, format) : undefined;\n}\n\nexport const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\nexport const COMPOSITE_KEYS = new Set([...ARROW_KEYS, 'Home', 'End']);\nexport const ALL_KEYS = new Set([...COMPOSITE_KEYS, 'PageUp', 'PageDown']);\n\nexport function areValuesEqual(a: number | number[], b: number | number[]): boolean {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((v, i) => v === b[i]);\n }\n return a === b;\n}\n","import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\nimport {\n clamp,\n getControlOffset,\n getMidpoint,\n resolveThumbCollision,\n ResolveThumbCollisionResult,\n roundValueToStep,\n validateMinimumDistance\n} from './slider.utils';\n\nconst INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;\n\n/**\n * The interactive area of the slider. Handles pointer presses and drags on the\n * track, mapping pointer position to a value and moving the closest thumb.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderControl]',\n exportAs: 'rdxSliderControl',\n host: {\n '[attr.data-orientation]': 'root.orientation()',\n '[attr.data-disabled]': 'root.isDisabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'root.dragging() ? \"\" : undefined',\n '(pointerdown)': 'onPointerDown($event)'\n }\n})\nexport class RdxSliderControl {\n protected readonly root = injectSliderRootContext();\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly document = inject(DOCUMENT);\n\n private styles: CSSStyleDeclaration | null = null;\n private moveCount = 0;\n private currentInteractionValue: number | number[] | null = null;\n\n private readonly onMove = (event: PointerEvent) => this.handleMove(event);\n private readonly onUp = (event: PointerEvent) => this.handleUp(event);\n private readonly onCancel = (event: PointerEvent) => this.handleUp(event);\n\n constructor() {\n this.root.controlRef.set(this.elementRef.nativeElement);\n inject(DestroyRef).onDestroy(() => this.stopListening());\n }\n\n protected onPointerDown(event: PointerEvent): void {\n const control = this.elementRef.nativeElement;\n if (this.root.isDisabled() || event.defaultPrevented || event.button !== 0) {\n return;\n }\n const target = event.target as HTMLElement | null;\n if (!target) {\n return;\n }\n\n // Suppress the nested range input's native click-to-set and drag so the\n // control fully owns pointer interaction (otherwise releasing on a thumb\n // fires a native change that snaps the value to the press point inside\n // the thumb-sized input). Focus is restored manually via focusThumb.\n event.preventDefault();\n\n this.styles = this.document.defaultView?.getComputedStyle(control) ?? null;\n this.startPressing({ x: event.clientX, y: event.clientY });\n const finger = this.getFingerState({ x: event.clientX, y: event.clientY });\n if (finger == null) {\n return;\n }\n\n this.root.setDragging(true);\n\n // Pressing directly on a thumb sets a center offset; only a rail press changes value on down.\n if (this.root.pressedThumbCenterOffset == null) {\n this.setValueFromPointer(finger, 'track-press');\n }\n\n this.root.focusThumb(finger.thumbIndex);\n\n control.setPointerCapture(event.pointerId);\n this.moveCount = 0;\n this.document.addEventListener('pointermove', this.onMove);\n this.document.addEventListener('pointerup', this.onUp, { once: true });\n this.document.addEventListener('pointercancel', this.onCancel, { once: true });\n }\n\n private handleMove(event: PointerEvent): void {\n this.moveCount += 1;\n if (event.buttons === 0) {\n this.handleUp(event);\n return;\n }\n const finger = this.getFingerState({ x: event.clientX, y: event.clientY });\n if (finger == null) {\n return;\n }\n if (validateMinimumDistance(finger.value, this.root.step(), this.root.minStepsBetweenValues())) {\n if (!this.root.dragging() && this.moveCount > INTENTIONAL_DRAG_COUNT_THRESHOLD) {\n this.root.setDragging(true);\n }\n const applied = this.setValueFromPointer(finger, 'drag');\n if (applied && finger.didSwap) {\n this.root.focusThumb(finger.thumbIndex);\n }\n }\n }\n\n private handleUp(event: PointerEvent): void {\n this.root.setActive(-1);\n this.root.setDragging(false);\n this.root.pressedThumbCenterOffset = null;\n this.root.pressedInput = null;\n\n if (this.currentInteractionValue != null) {\n this.root.commitValue();\n }\n\n const control = this.elementRef.nativeElement;\n if (control.hasPointerCapture?.(event.pointerId)) {\n control.releasePointerCapture(event.pointerId);\n }\n\n this.root.resetPressedThumb();\n this.root.pressedValues = null;\n this.currentInteractionValue = null;\n this.stopListening();\n }\n\n private stopListening(): void {\n this.document.removeEventListener('pointermove', this.onMove);\n this.document.removeEventListener('pointerup', this.onUp);\n this.document.removeEventListener('pointercancel', this.onCancel);\n }\n\n private startPressing(finger: { x: number; y: number }): void {\n const values = this.root.values();\n const range = this.root.range();\n this.root.pressedValues = range ? values.slice() : null;\n this.currentInteractionValue = null;\n\n const pressedThumbIndex = this.root.pressedThumbIndex;\n let closestThumbIndex = pressedThumbIndex;\n\n if (pressedThumbIndex > -1 && pressedThumbIndex < values.length) {\n // Pressed directly on a thumb sitting on max — walk left over stacked max thumbs.\n if (values[pressedThumbIndex] === this.root.max()) {\n let c = pressedThumbIndex;\n while (c > 0 && values[c - 1] === this.root.max()) {\n c -= 1;\n }\n closestThumbIndex = c;\n }\n } else {\n // Pressed on the rail — find the nearest enabled thumb by midpoint distance.\n const axis = this.root.orientation() === 'horizontal' ? 'x' : 'y';\n const thumbs = this.root.thumbList();\n let minDistance: number | undefined;\n closestThumbIndex = -1;\n for (let i = 0; i < thumbs.length; i += 1) {\n const thumb = thumbs[i];\n if (thumb.disabled()) {\n continue;\n }\n const midpoint = getMidpoint(thumb.element);\n const distance = Math.abs(finger[axis] - midpoint[axis]);\n if (minDistance === undefined || distance <= minDistance) {\n closestThumbIndex = i;\n minDistance = distance;\n }\n }\n }\n\n if (closestThumbIndex > -1 && closestThumbIndex !== pressedThumbIndex) {\n this.root.pressedThumbIndex = closestThumbIndex;\n this.root.pressedInput = this.root.thumbList()[closestThumbIndex]?.inputElement ?? null;\n }\n }\n\n private setValueFromPointer(finger: ResolveThumbCollisionResult, reason: string): boolean {\n const nextValues = Array.isArray(finger.value) ? finger.value : [finger.value];\n const applied = this.root.setValue(nextValues, reason);\n if (applied) {\n this.currentInteractionValue = finger.value;\n if (finger.didSwap) {\n this.root.pressedThumbIndex = finger.thumbIndex;\n this.root.pressedInput = this.root.thumbList()[finger.thumbIndex]?.inputElement ?? null;\n }\n }\n return applied;\n }\n\n /** Projects a pointer position onto the track and resolves it to a value (+ collision). */\n private getFingerState(finger: { x: number; y: number }): ResolveThumbCollisionResult | null {\n const control = this.root.controlRef();\n const values = this.root.values();\n const range = this.root.range();\n const thumbIndex = this.root.pressedThumbIndex;\n const vertical = this.root.orientation() === 'vertical';\n const rtl = this.root.dir() === 'rtl';\n const min = this.root.min();\n const max = this.root.max();\n const step = this.root.step();\n\n if (!control || (!range && (thumbIndex < 0 || thumbIndex >= values.length))) {\n return null;\n }\n\n const { width, height, bottom, left, right } = control.getBoundingClientRect();\n const controlOffset = getControlOffset(this.styles, vertical, rtl);\n const controlSize = (vertical ? height : width) - controlOffset.start - controlOffset.end;\n\n // A collapsed/unmeasurable track would divide by zero and yield NaN values.\n if (!(controlSize > 0)) {\n return null;\n }\n\n const thumbCenterOffset = this.root.pressedThumbCenterOffset ?? 0;\n const fingerX = finger.x - thumbCenterOffset;\n const fingerY = finger.y - thumbCenterOffset;\n\n const valueSize = vertical\n ? bottom - fingerY - controlOffset.end\n : (rtl ? right - fingerX : fingerX - left) - controlOffset.start;\n\n const valueRescaled = clamp(valueSize / controlSize, 0, 1);\n\n let newValue = (max - min) * valueRescaled + min;\n newValue = roundValueToStep(newValue, step, min);\n newValue = clamp(newValue, min, max);\n\n if (!range) {\n return { value: newValue, thumbIndex, didSwap: false };\n }\n if (thumbIndex < 0) {\n return null;\n }\n\n return resolveThumbCollision({\n behavior: this.root.thumbCollisionBehavior(),\n values,\n currentValues: values,\n initialValues: this.root.pressedValues,\n pressedIndex: thumbIndex,\n nextValue: newValue,\n min,\n max,\n step,\n minStepsBetweenValues: this.root.minStepsBetweenValues()\n });\n }\n}\n","import { computed, Directive } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\nimport { valueToPercent } from './slider.utils';\n\n/**\n * Visualises the portion of the track between the slider's minimum (or the first\n * thumb in a range) and the active value.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderIndicator]',\n exportAs: 'rdxSliderIndicator',\n host: {\n '[style]': 'indicatorStyle()',\n '[attr.data-orientation]': 'root.orientation()',\n '[attr.data-disabled]': 'root.isDisabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'root.dragging() ? \"\" : undefined'\n }\n})\nexport class RdxSliderIndicator {\n protected readonly root = injectSliderRootContext();\n\n protected readonly indicatorStyle = computed<Record<string, string | number>>(() => {\n const vertical = this.root.orientation() === 'vertical';\n const range = this.root.range();\n const values = this.root.values();\n const min = this.root.min();\n const max = this.root.max();\n\n const startEdge = vertical ? 'bottom' : 'inset-inline-start';\n const mainSide = vertical ? 'height' : 'width';\n const crossSide = vertical ? 'width' : 'height';\n\n const start = valueToPercent(values[0], min, max);\n const end = valueToPercent(values[values.length - 1], min, max);\n\n const styles: Record<string, string | number> = {\n position: vertical ? 'absolute' : 'relative',\n [crossSide]: 'inherit'\n };\n\n if (!range) {\n styles[startEdge] = 0;\n styles[mainSide] = `${start}%`;\n return styles;\n }\n\n styles[startEdge] = `${start}%`;\n styles[mainSide] = `${end - start}%`;\n return styles;\n });\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n Signal\n} from '@angular/core';\nimport {\n BooleanInput,\n injectControlValueAccessor,\n injectId,\n NumberInput,\n RdxControlValueAccessor\n} from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { provideSliderRootContext } from './slider-context';\nimport {\n areValuesEqual,\n asc,\n clamp,\n formatNumber,\n getSliderValue,\n SliderOrientation,\n ThumbCollisionBehavior,\n validateMinimumDistance\n} from './slider.utils';\n\nexport type SliderValue = number | number[];\n\n/** Minimal shape a thumb registers with the root, used for hit-testing and focus. */\nexport interface RdxSliderThumbRef {\n /** The thumb wrapper element. */\n readonly element: HTMLElement;\n /** The nested `input[type=range]`, registered once it is initialised. */\n inputElement: HTMLInputElement | null;\n /** Whether this thumb is disabled (own state OR root disabled). */\n readonly disabled: Signal<boolean>;\n}\n\nfunction sortByDomOrder(list: readonly RdxSliderThumbRef[]): RdxSliderThumbRef[] {\n return list.slice().sort((a, b) => {\n const position = a.element.compareDocumentPosition(b.element);\n\n if (position & Node.DOCUMENT_POSITION_FOLLOWING) {\n return -1;\n }\n\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n return 1;\n }\n return 0;\n });\n}\n\n/**\n * Groups all parts of the slider and owns its state, value-change logic and\n * thumb registration. A single directive drives both orientations — there are no\n * separate horizontal/vertical components.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderRoot]',\n exportAs: 'rdxSliderRoot',\n providers: [provideSliderRootContext(() => inject(RdxSliderRoot))],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: value', 'disabled']\n }\n ],\n host: {\n role: 'group',\n '[id]': 'id()',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.dir]': 'dir()',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'dragging() ? \"\" : undefined'\n }\n})\nexport class RdxSliderRoot {\n /** @ignore */\n protected readonly cva = injectControlValueAccessor<SliderValue>();\n\n readonly id = input<string>(injectId('rdx-slider-'));\n\n /**\n * The minimum value of the slider.\n * @default 0\n */\n readonly min = input<number, NumberInput>(0, { transform: numberAttribute });\n\n /**\n * The maximum value of the slider.\n * @default 100\n */\n readonly max = input<number, NumberInput>(100, { transform: numberAttribute });\n\n /**\n * The granularity with which the value can change through user interaction.\n * @default 1\n */\n readonly step = input<number, NumberInput>(1, { transform: numberAttribute });\n\n /**\n * The granularity with which the value changes on Page Up / Page Down keys and Shift + Arrow keys.\n * @default 10\n */\n readonly largeStep = input<number, NumberInput>(10, { transform: numberAttribute });\n\n /**\n * The minimum number of steps that must separate two thumbs in a range slider.\n * @default 0\n */\n readonly minStepsBetweenValues = input<number, NumberInput>(0, { transform: numberAttribute });\n\n /**\n * The orientation of the slider.\n * @default 'horizontal'\n */\n readonly orientation = input<SliderOrientation>('horizontal');\n\n /**\n * The reading direction. Mirrors the horizontal axis when set to `'rtl'`.\n * @default 'ltr'\n */\n readonly dirInput = input<'ltr' | 'rtl' | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n /**\n * How thumbs behave when they meet in a range slider.\n * @default 'push'\n */\n readonly thumbCollisionBehavior = input<ThumbCollisionBehavior>('push');\n\n /** Options forwarded to `Intl.NumberFormat` when displaying and announcing values. */\n readonly format = input<Intl.NumberFormatOptions>();\n\n /** Locale used for value formatting. */\n readonly locale = input<string>();\n\n /** Name of the hidden inputs rendered by each thumb, for form submission. */\n readonly name = input<string>();\n\n /** Id of the form the slider belongs to. */\n readonly form = input<string>();\n\n /**\n * When `true`, the user cannot interact with the slider.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** The uncontrolled value of the slider when it is initially rendered. */\n readonly defaultValue = input<SliderValue>();\n\n /** The controlled value of the slider. Use with `(onValueChange)` or two-way `[(value)]`. */\n readonly value = model<SliderValue>();\n\n readonly ariaLabelledBy = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** Emitted when the value changes (during interaction). */\n readonly onValueChange = output<SliderValue>();\n\n /** Emitted when interaction ends, with the final value — useful for committing to a backend. */\n readonly onValueCommitted = output<SliderValue>();\n\n /** @ignore */\n readonly controlRef = signal<HTMLElement | null>(null);\n\n /** @ignore Active thumb index (-1 when none). */\n readonly active = signal(-1);\n /** @ignore Last thumb index that was focused/used, drives z-index stacking. */\n readonly lastUsedThumbIndex = signal(-1);\n /** @ignore Whether a pointer drag is in progress. */\n readonly dragging = signal(false);\n\n /** @ignore Pointer-drag scratch state (not reactive). */\n pressedThumbIndex = -1;\n /** @ignore */\n pressedThumbCenterOffset: number | null = null;\n /** @ignore */\n pressedInput: HTMLInputElement | null = null;\n /** @ignore Snapshot of values at drag start, the baseline for push/swap. */\n pressedValues: number[] | null = null;\n /** @ignore */\n lastChangeReason = 'none';\n\n /** @ignore */\n readonly isDisabled = computed(() => !!this.cva.disabled());\n\n /** @ignore The current value source (controlled value, else default, else min). */\n private readonly currentRaw = computed<SliderValue>(() => this.cva.value() ?? this.defaultValue() ?? this.min());\n\n /** Whether the slider has multiple thumbs (the value is an array). */\n readonly range = computed(() => Array.isArray(this.cva.value() ?? this.defaultValue()));\n\n /** The clamped values rendered to the user, sorted ascending for range sliders. */\n readonly values = computed<number[]>(() => {\n const raw = this.currentRaw();\n const min = this.min();\n const max = this.max();\n const arr = (Array.isArray(raw) ? raw.slice() : [raw]).map((v) => clamp(v, min, max));\n return this.range() ? arr.sort(asc) : arr;\n });\n\n private readonly thumbs = signal<RdxSliderThumbRef[]>([]);\n /** Registered thumbs in DOM order. */\n readonly thumbList = this.thumbs.asReadonly();\n\n /** @ignore */\n registerThumb(thumb: RdxSliderThumbRef): void {\n this.thumbs.update((list) => sortByDomOrder([...list, thumb]));\n }\n\n /** @ignore */\n unregisterThumb(thumb: RdxSliderThumbRef): void {\n this.thumbs.update((list) => list.filter((t) => t !== thumb));\n }\n\n /** @ignore */\n thumbIndexOf(thumb: RdxSliderThumbRef): number {\n return this.thumbList().indexOf(thumb);\n }\n\n /** @ignore */\n setActive(index: number): void {\n this.active.set(index);\n if (index !== -1) {\n this.lastUsedThumbIndex.set(index);\n }\n }\n\n /** @ignore */\n focusThumb(index: number): void {\n this.thumbList()[index]?.inputElement?.focus({ preventScroll: true });\n }\n\n /** @ignore */\n formatValue(value: number): string {\n return formatNumber(value, this.locale(), this.format());\n }\n\n /** @ignore Output value matching the original value shape (number vs array). */\n private outputValue(): SliderValue {\n const raw = this.cva.value();\n if (raw !== undefined) {\n return raw;\n }\n return this.range() ? this.values() : this.values()[0];\n }\n\n /**\n * @ignore\n * Applies a new full set of values, preserving the single/range value shape.\n * Returns `false` when the value did not change.\n */\n setValue(nextValues: number[], reason: string): boolean {\n const next: SliderValue = this.range() ? nextValues : nextValues[0];\n const current = this.outputValue();\n const hasNaN = Array.isArray(next) ? next.some((v) => Number.isNaN(v)) : Number.isNaN(next);\n if (hasNaN || areValuesEqual(next, current)) {\n return false;\n }\n this.lastChangeReason = reason;\n this.value.set(next);\n this.cva.setValue(next);\n this.onValueChange.emit(next);\n return true;\n }\n\n /** @ignore Keyboard / native input path: clamps to neighbours, commits immediately. */\n handleInputChange(valueInput: number, index: number, reason = 'keyboard'): void {\n if (this.isDisabled()) {\n return;\n }\n const result = getSliderValue(valueInput, index, this.min(), this.max(), this.range(), this.values());\n if (!validateMinimumDistance(result, this.step(), this.minStepsBetweenValues())) {\n return;\n }\n const arr = Array.isArray(result) ? result : [result];\n const applied = this.setValue(arr, reason);\n this.cva.markAsTouched();\n if (applied) {\n this.onValueCommitted.emit(this.outputValue());\n }\n }\n\n /** @ignore Emits the committed value at the end of a pointer drag. */\n commitValue(): void {\n this.onValueCommitted.emit(this.outputValue());\n }\n\n /** @ignore */\n markAsTouched(): void {\n this.cva.markAsTouched();\n }\n\n /** @ignore */\n setDragging(dragging: boolean): void {\n this.dragging.set(dragging);\n }\n\n /** @ignore */\n resetPressedThumb(): void {\n this.pressedThumbIndex = -1;\n this.pressedThumbCenterOffset = null;\n this.pressedInput = null;\n }\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n numberAttribute\n} from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/core';\nimport { injectSliderRootContext } from './slider-context';\nimport { RdxSliderThumbRef } from './slider-root';\nimport { valueToPercent } from './slider.utils';\n\n/**\n * A draggable handle. Render one per value; place an `input[rdxSliderThumbInput]`\n * inside it for keyboard, accessibility and form submission.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderThumb]',\n exportAs: 'rdxSliderThumb',\n host: {\n '[style]': 'thumbStyle()',\n '[attr.data-index]': 'index()',\n '[attr.data-orientation]': 'root.orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'root.dragging() ? \"\" : undefined',\n '(pointerdown)': 'onPointerDown($event)'\n }\n})\nexport class RdxSliderThumb implements RdxSliderThumbRef {\n protected readonly root = injectSliderRootContext();\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** The nested range input, set by `[rdxSliderThumbInput]`. */\n inputElement: HTMLInputElement | null = null;\n\n /** Explicit index for this thumb (required for SSR range sliders). */\n readonly indexInput = input<number | undefined, NumberInput>(undefined, {\n alias: 'index',\n transform: (v) => (v == null ? undefined : numberAttribute(v))\n });\n\n /** Disables this individual thumb. */\n readonly thumbDisabled = input<boolean, BooleanInput>(false, { alias: 'disabled', transform: booleanAttribute });\n\n /** The position of this thumb among its siblings. */\n readonly index = computed(() => this.indexInput() ?? this.root.thumbIndexOf(this));\n\n /** Whether this thumb is disabled (own state OR root disabled). */\n readonly disabled = computed(() => this.thumbDisabled() || this.root.isDisabled());\n\n /** The value represented by this thumb. */\n readonly value = computed<number | undefined>(() => this.root.values()[this.index()]);\n\n private readonly percent = computed(() => {\n const value = this.value();\n return value === undefined ? NaN : valueToPercent(value, this.root.min(), this.root.max());\n });\n\n protected readonly thumbStyle = computed<Record<string, string | number>>(() => {\n const vertical = this.root.orientation() === 'vertical';\n const rtl = this.root.dir() === 'rtl';\n const startEdge = vertical ? 'bottom' : 'inset-inline-start';\n const crossOffset = vertical ? 'left' : 'top';\n const percent = this.percent();\n\n if (!Number.isFinite(percent)) {\n return { position: 'absolute', visibility: 'hidden' };\n }\n\n const index = this.index();\n let zIndex: number | undefined;\n if (this.root.range()) {\n if (this.root.active() === index) {\n zIndex = 2;\n } else if (this.root.lastUsedThumbIndex() === index) {\n zIndex = 1;\n }\n } else if (this.root.active() === index) {\n zIndex = 1;\n }\n\n const style: Record<string, string | number> = {\n position: 'absolute',\n [startEdge]: `${percent}%`,\n [crossOffset]: '50%',\n translate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`\n };\n if (zIndex !== undefined) {\n style['z-index'] = zIndex;\n }\n return style;\n });\n\n constructor() {\n // Registration is DOM-order sorted on the root and reads no inputs, so the constructor\n // (where the host element already exists) is the right place; cleanup goes via DestroyRef.\n this.root.registerThumb(this);\n inject(DestroyRef).onDestroy(() => this.root.unregisterThumb(this));\n }\n\n protected onPointerDown(event: PointerEvent): void {\n if (this.disabled()) {\n return;\n }\n const index = this.index();\n this.root.pressedThumbIndex = index;\n\n const axis = this.root.orientation() === 'horizontal' ? 'x' : 'y';\n const rect = this.element.getBoundingClientRect();\n const midpoint = axis === 'x' ? (rect.left + rect.right) / 2 : (rect.top + rect.bottom) / 2;\n const pointer = axis === 'x' ? event.clientX : event.clientY;\n this.root.pressedThumbCenterOffset = pointer - midpoint;\n\n if (this.inputElement) {\n this.root.pressedInput = this.inputElement;\n }\n }\n}\n","import { computed, DestroyRef, Directive, ElementRef, inject, input } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\nimport { RdxSliderThumb } from './slider-thumb';\nimport { ALL_KEYS, COMPOSITE_KEYS, getDefaultAriaValueText, getNewValue, roundValueToStep } from './slider.utils';\n\n/**\n * The native `input[type=range]` nested inside a thumb. It is visually hidden but\n * remains the focusable element that drives keyboard interaction, accessibility\n * and form submission.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'input[rdxSliderThumbInput]',\n exportAs: 'rdxSliderThumbInput',\n host: {\n type: 'range',\n style: 'position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: inherit;',\n '[style.writing-mode]': 'writingMode()',\n '[attr.min]': 'root.min()',\n '[attr.max]': 'root.max()',\n '[attr.step]': 'root.step()',\n '[value]': 'thumb.value() ?? \"\"',\n '[disabled]': 'thumb.disabled()',\n '[attr.name]': 'root.name()',\n '[attr.form]': 'root.form()',\n '[attr.aria-orientation]': 'root.orientation()',\n '[attr.aria-valuenow]': 'thumb.value()',\n '[attr.aria-valuetext]': 'valueText()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.data-index]': 'thumb.index()',\n '(keydown)': 'onKeyDown($event)',\n '(change)': 'onChange($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()'\n }\n})\nexport class RdxSliderThumbInput {\n protected readonly root = injectSliderRootContext();\n protected readonly thumb = inject(RdxSliderThumb);\n private readonly element = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n readonly ariaValueTextInput = input<string | undefined>(undefined, { alias: 'aria-valuetext' });\n\n protected readonly writingMode = computed(() =>\n this.root.orientation() === 'vertical' ? (this.root.dir() === 'rtl' ? 'vertical-rl' : 'vertical-lr') : undefined\n );\n\n protected readonly ariaLabelledBy = computed(() =>\n this.ariaLabel() == null ? this.root.ariaLabelledBy() : undefined\n );\n\n protected readonly valueText = computed(\n () =>\n this.ariaValueTextInput() ??\n getDefaultAriaValueText(this.root.values(), this.thumb.index(), this.root.format(), this.root.locale())\n );\n\n constructor() {\n // Host element exists in the constructor and the registration has no input dependency.\n this.thumb.inputElement = this.element;\n\n inject(DestroyRef).onDestroy(() => {\n if (this.thumb.inputElement === this.element) {\n this.thumb.inputElement = null;\n }\n });\n }\n\n protected onChange(event: Event): void {\n const value = (event.target as HTMLInputElement).valueAsNumber;\n if (!Number.isNaN(value)) {\n this.root.handleInputChange(value, this.thumb.index(), 'input');\n }\n }\n\n protected onFocus(): void {\n this.root.setActive(this.thumb.index());\n }\n\n protected onBlur(): void {\n this.root.setActive(-1);\n this.root.markAsTouched();\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (event.defaultPrevented || !ALL_KEYS.has(event.key)) {\n return;\n }\n if (COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n\n const min = this.root.min();\n const max = this.root.max();\n const step = this.root.step();\n const largeStep = this.root.largeStep();\n const rtl = this.root.dir() === 'rtl';\n const range = this.root.range();\n const values = this.root.values();\n const index = this.thumb.index();\n const thumbValue = values[index];\n const rounded = roundValueToStep(thumbValue, step, min);\n\n let newValue: number | null = null;\n switch (event.key) {\n case 'ArrowUp':\n newValue = getNewValue(rounded, event.shiftKey ? largeStep : step, 1, min, max);\n break;\n case 'ArrowRight':\n newValue = getNewValue(rounded, event.shiftKey ? largeStep : step, rtl ? -1 : 1, min, max);\n break;\n case 'ArrowDown':\n newValue = getNewValue(rounded, event.shiftKey ? largeStep : step, -1, min, max);\n break;\n case 'ArrowLeft':\n newValue = getNewValue(rounded, event.shiftKey ? largeStep : step, rtl ? 1 : -1, min, max);\n break;\n case 'PageUp':\n newValue = getNewValue(rounded, largeStep, 1, min, max);\n break;\n case 'PageDown':\n newValue = getNewValue(rounded, largeStep, -1, min, max);\n break;\n case 'End':\n newValue =\n range && Number.isFinite(values[index + 1])\n ? values[index + 1] - step * this.root.minStepsBetweenValues()\n : max;\n break;\n case 'Home':\n newValue =\n range && Number.isFinite(values[index - 1])\n ? values[index - 1] + step * this.root.minStepsBetweenValues()\n : min;\n break;\n default:\n break;\n }\n\n if (newValue !== null) {\n this.root.handleInputChange(newValue, index, 'keyboard');\n event.preventDefault();\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\n\n/**\n * The track of the slider — the positioning context for the indicator and thumbs.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderTrack]',\n exportAs: 'rdxSliderTrack',\n host: {\n style: 'position: relative;',\n '[attr.data-orientation]': 'root.orientation()',\n '[attr.data-disabled]': 'root.isDisabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'root.dragging() ? \"\" : undefined'\n }\n})\nexport class RdxSliderTrack {\n protected readonly root = injectSliderRootContext();\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\n\n/**\n * Displays the slider's current value(s) as formatted text. Renders into an\n * `output` element; the displayed value honours the root `format` and `locale`.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'output[rdxSliderValue]',\n exportAs: 'rdxSliderValue',\n host: {\n 'aria-live': 'off',\n '[textContent]': 'display()'\n }\n})\nexport class RdxSliderValue {\n protected readonly root = injectSliderRootContext();\n\n /** The separator placed between values of a range slider. */\n readonly separator = input<string>(' – ');\n\n protected readonly display = computed(() =>\n this.root\n .values()\n .map((value) => this.root.formatValue(value) || `${value}`)\n .join(this.separator())\n );\n}\n","import { NgModule } from '@angular/core';\nimport { RdxSliderControl } from './src/slider-control';\nimport { RdxSliderIndicator } from './src/slider-indicator';\nimport { RdxSliderRoot } from './src/slider-root';\nimport { RdxSliderThumb } from './src/slider-thumb';\nimport { RdxSliderThumbInput } from './src/slider-thumb-input';\nimport { RdxSliderTrack } from './src/slider-track';\nimport { RdxSliderValue } from './src/slider-value';\n\nexport * from './src/slider-context';\nexport * from './src/slider-control';\nexport * from './src/slider-indicator';\nexport * from './src/slider-root';\nexport * from './src/slider-thumb';\nexport * from './src/slider-thumb-input';\nexport * from './src/slider-track';\nexport * from './src/slider-value';\nexport * from './src/slider.utils';\n\nconst _imports = [\n RdxSliderRoot,\n RdxSliderControl,\n RdxSliderTrack,\n RdxSliderIndicator,\n RdxSliderThumb,\n RdxSliderThumbInput,\n RdxSliderValue\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGA;;;;;;AAMG;AACI,MAAM,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,GAAG,aAAa,CAC5E,sBAAsB,EACtB,mBAAmB;;ACLvB;AACM,SAAU,GAAG,CAAC,CAAS,EAAE,CAAS,EAAA;IACpC,OAAO,CAAC,GAAG,CAAC;AAChB;AAEA;SACgB,cAAc,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAA;AAClE,IAAA,OAAO,CAAC,CAAC,KAAK,GAAG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;;ACGD,MAAM,QAAQ,GAAG;IACb,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,mBAAmB;IACnB;CACH;MAMY,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAbxB,aAAa;YACb,gBAAgB;YAChB,cAAc;YACd,kBAAkB;YAClB,cAAc;YACd,mBAAmB;AACnB,YAAA,cAAc,aANd,aAAa;YACb,gBAAgB;YAChB,cAAc;YACd,kBAAkB;YAClB,cAAc;YACd,mBAAmB;YACnB,cAAc,CAAA,EAAA,CAAA,CAAA;+GAOL,eAAe,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;AChCD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-slider.mjs","sources":["../../../packages/primitives/slider/src/slider-context.ts","../../../packages/primitives/slider/src/slider.utils.ts","../../../packages/primitives/slider/src/slider-control.ts","../../../packages/primitives/slider/src/slider-indicator.ts","../../../packages/primitives/slider/src/slider-root.ts","../../../packages/primitives/slider/src/slider-thumb.ts","../../../packages/primitives/slider/src/slider-thumb-input.ts","../../../packages/primitives/slider/src/slider-track.ts","../../../packages/primitives/slider/src/slider-value.ts","../../../packages/primitives/slider/index.ts","../../../packages/primitives/slider/radix-ng-primitives-slider.ts"],"sourcesContent":["import { createContext } from '@radix-ng/primitives/core';\nimport type { RdxSliderRoot } from './slider-root';\n\n/**\n * The Slider context exposes the root directive instance to every child part.\n * The root owns all state, value-change logic and thumb registration; parts read\n * signals and call methods off it.\n *\n * @see https://base-ui.com/react/components/slider\n */\nexport const [injectSliderRootContext, provideSliderRootContext] = createContext<RdxSliderRoot>(\n 'RdxSliderRootContext',\n 'components/slider'\n);\n","import { clamp } from '@radix-ng/primitives/core';\n\nexport { clamp };\n\nexport type SliderOrientation = 'horizontal' | 'vertical';\nexport type ThumbCollisionBehavior = 'push' | 'swap' | 'none';\n\n/** Ascending comparator. */\nexport function asc(a: number, b: number): number {\n return a - b;\n}\n\n/** Maps a value within `[min, max]` to a 0–100 percentage. */\nexport function valueToPercent(value: number, min: number, max: number): number {\n return ((value - min) * 100) / (max - min);\n}\n\n/** Replaces the item at `index` then re-sorts the array ascending. */\nexport function replaceArrayItemAtIndex(array: readonly number[], index: number, newValue: number): number[] {\n const output = array.slice();\n output[index] = newValue;\n return output.sort(asc);\n}\n\n/** The center point of an element in client coordinates. */\nexport function getMidpoint(element: Element): { x: number; y: number } {\n const rect = element.getBoundingClientRect();\n return { x: (rect.left + rect.right) / 2, y: (rect.top + rect.bottom) / 2 };\n}\n\n/** Calculates the control-relative percent for an edge-aligned thumb. */\nexport function getInsetThumbPositionPercent(\n control: Element,\n thumb: Element,\n thumbValuePercent: number,\n vertical: boolean\n): number | undefined {\n const thumbRect = thumb.getBoundingClientRect();\n const controlRect = control.getBoundingClientRect();\n const side = vertical ? 'height' : 'width';\n const controlSide = controlRect[side];\n if (!(controlSide > 0)) {\n return undefined;\n }\n\n const controlSize = controlSide - thumbRect[side];\n const thumbOffsetFromControlEdge = thumbRect[side] / 2 + (controlSize * thumbValuePercent) / 100;\n const nextPosition = (thumbOffsetFromControlEdge / controlSide) * 100;\n return Number.isFinite(nextPosition) ? nextPosition : undefined;\n}\n\n/** Converts an array of values into clamped 0–100 percentages. */\nexport function valueArrayToPercentages(values: readonly number[], min: number, max: number): number[] {\n return values.map((value) => clamp(valueToPercent(value, min, max), 0, 100));\n}\n\n/** Number of decimal places in `num`, handling exponential notation for tiny values. */\nexport function getDecimalPrecision(num: number): number {\n if (num === 0) {\n return 0;\n }\n if (Math.abs(num) < 1) {\n const parts = num.toExponential().split('e-');\n const mantissaDecimalPart = parts[0].split('.')[1];\n return (mantissaDecimalPart ? mantissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n const decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\n/** Snaps `value` to the nearest step, using `min` as the origin of the step grid. */\nexport function roundValueToStep(value: number, step: number, min: number): number {\n const nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(Math.max(getDecimalPrecision(step), getDecimalPrecision(min))));\n}\n\n/**\n * Resolves the value(s) for the keyboard / hidden-input path: clamps to the\n * bounds, and for range sliders also clamps to neighbouring thumbs and re-sorts.\n * Returns a `number` for single sliders and a sorted `number[]` for range sliders.\n */\nexport function getSliderValue(\n valueInput: number,\n index: number,\n min: number,\n max: number,\n range: boolean,\n values: readonly number[]\n): number | number[] {\n let newValue = clamp(valueInput, min, max);\n if (range) {\n newValue = clamp(\n newValue,\n values[index - 1] ?? Number.NEGATIVE_INFINITY,\n values[index + 1] ?? Number.POSITIVE_INFINITY\n );\n return replaceArrayItemAtIndex(values, index, newValue);\n }\n return newValue;\n}\n\n/** Returns `false` if any adjacent pair of values is closer than the minimum distance. */\nexport function validateMinimumDistance(\n values: number | number[],\n step: number,\n minStepsBetweenValues: number\n): boolean {\n if (!Array.isArray(values)) {\n return true;\n }\n const distances = values.reduce<number[]>((acc, val, index, vals) => {\n if (index === vals.length - 1) {\n return acc;\n }\n acc.push(Math.abs(val - vals[index + 1]));\n return acc;\n }, []);\n return Math.min(...distances) >= step * minStepsBetweenValues;\n}\n\n/** Keyboard step helper: increments/decrements `thumbValue` and clamps to bounds. */\nexport function getNewValue(\n thumbValue: number,\n increment: number,\n direction: 1 | -1,\n min: number,\n max: number\n): number {\n const value = direction === 1 ? thumbValue + increment : thumbValue - increment;\n const roundedValue = Number(\n value.toFixed(\n Math.max(getDecimalPrecision(thumbValue), getDecimalPrecision(increment), getDecimalPrecision(min))\n )\n );\n return clamp(roundedValue, min, max);\n}\n\ninterface GetPushedThumbValuesParams {\n values: readonly number[];\n index: number;\n nextValue: number;\n min: number;\n max: number;\n step: number;\n minStepsBetweenValues: number;\n initialValues?: readonly number[];\n}\n\n/**\n * The \"push\" collision algorithm: moves the pressed thumb and pushes its\n * neighbours only as far as needed, letting them spring back toward their\n * initial positions as the pressed thumb retreats.\n */\nexport function getPushedThumbValues(params: GetPushedThumbValuesParams): number[] {\n const { values, index, nextValue, min, max, step, minStepsBetweenValues, initialValues } = params;\n if (values.length === 0) {\n return [];\n }\n const nextValues = values.slice();\n const minValueDifference = step * minStepsBetweenValues;\n const lastIndex = nextValues.length - 1;\n const baseInitialValues = initialValues ?? values;\n\n const indexMin = min + index * minValueDifference;\n const indexMax = max - (lastIndex - index) * minValueDifference;\n nextValues[index] = clamp(nextValue, indexMin, indexMax);\n\n // push thumbs to the right\n for (let i = index + 1; i <= lastIndex; i += 1) {\n const minAllowed = nextValues[i - 1] + minValueDifference;\n const maxAllowed = max - (lastIndex - i) * minValueDifference;\n const initialValue = baseInitialValues[i] ?? nextValues[i];\n let candidate = Math.max(nextValues[i], minAllowed);\n if (initialValue < candidate) {\n candidate = Math.max(initialValue, minAllowed);\n }\n nextValues[i] = clamp(candidate, minAllowed, maxAllowed);\n }\n\n // push thumbs to the left\n for (let i = index - 1; i >= 0; i -= 1) {\n const maxAllowed = nextValues[i + 1] - minValueDifference;\n const minAllowed = min + i * minValueDifference;\n const initialValue = baseInitialValues[i] ?? nextValues[i];\n let candidate = Math.min(nextValues[i], maxAllowed);\n if (initialValue > candidate) {\n candidate = Math.min(initialValue, maxAllowed);\n }\n nextValues[i] = clamp(candidate, minAllowed, maxAllowed);\n }\n\n for (let i = 0; i <= lastIndex; i += 1) {\n nextValues[i] = Number(nextValues[i].toFixed(12));\n }\n return nextValues;\n}\n\nexport interface ResolveThumbCollisionParams {\n behavior: ThumbCollisionBehavior;\n values: readonly number[];\n currentValues?: readonly number[];\n initialValues?: readonly number[] | null;\n pressedIndex: number;\n nextValue: number;\n min: number;\n max: number;\n step: number;\n minStepsBetweenValues: number;\n}\n\nexport interface ResolveThumbCollisionResult {\n value: number | number[];\n thumbIndex: number;\n didSwap: boolean;\n}\n\n/** Dispatches the pressed thumb's new value through the configured collision behavior. */\nexport function resolveThumbCollision(params: ResolveThumbCollisionParams): ResolveThumbCollisionResult {\n const {\n behavior,\n values,\n currentValues,\n initialValues,\n pressedIndex,\n nextValue,\n min,\n max,\n step,\n minStepsBetweenValues\n } = params;\n\n const activeValues = (currentValues ?? values).slice();\n const baselineValues = initialValues ?? values;\n const range = activeValues.length > 1;\n const minValueDifference = step * minStepsBetweenValues;\n\n if (!range) {\n return { value: nextValue, thumbIndex: 0, didSwap: false };\n }\n\n if (behavior === 'push') {\n const value = getPushedThumbValues({\n values: activeValues,\n index: pressedIndex,\n nextValue,\n min,\n max,\n step,\n minStepsBetweenValues\n });\n return { value, thumbIndex: pressedIndex, didSwap: false };\n }\n\n if (behavior === 'swap') {\n const pressedInitialValue = activeValues[pressedIndex];\n const epsilon = 1e-7;\n const candidateValues = activeValues.slice();\n const previousNeighbor = candidateValues[pressedIndex - 1];\n const nextNeighbor = candidateValues[pressedIndex + 1];\n\n const lowerBound = previousNeighbor != null ? previousNeighbor + minValueDifference : min;\n const upperBound = nextNeighbor != null ? nextNeighbor - minValueDifference : max;\n\n const constrainedValue = clamp(nextValue, lowerBound, upperBound);\n const pressedValueAfterClamp = Number(constrainedValue.toFixed(12));\n candidateValues[pressedIndex] = pressedValueAfterClamp;\n\n const movingForward = nextValue > pressedInitialValue;\n const movingBackward = nextValue < pressedInitialValue;\n const shouldSwapForward = movingForward && nextNeighbor != null && nextValue >= nextNeighbor - epsilon;\n const shouldSwapBackward =\n movingBackward && previousNeighbor != null && nextValue <= previousNeighbor + epsilon;\n\n if (!shouldSwapForward && !shouldSwapBackward) {\n return { value: candidateValues, thumbIndex: pressedIndex, didSwap: false };\n }\n\n const targetIndex = shouldSwapForward ? pressedIndex + 1 : pressedIndex - 1;\n\n const initialValuesForPush = candidateValues.map((_, idx) => {\n if (idx === pressedIndex) {\n return pressedValueAfterClamp;\n }\n const baseline = baselineValues[idx];\n return baseline != null ? baseline : activeValues[idx];\n });\n\n const nextValueForTarget = shouldSwapForward\n ? Math.max(nextValue, candidateValues[targetIndex])\n : Math.min(nextValue, candidateValues[targetIndex]);\n\n const adjustedValues = getPushedThumbValues({\n values: candidateValues,\n index: targetIndex,\n nextValue: nextValueForTarget,\n min,\n max,\n step,\n minStepsBetweenValues,\n initialValues: initialValuesForPush\n });\n\n const neighborIndex = shouldSwapForward ? targetIndex - 1 : targetIndex + 1;\n if (neighborIndex >= 0 && neighborIndex < adjustedValues.length) {\n const previousValue = adjustedValues[neighborIndex - 1];\n const nextValueAfter = adjustedValues[neighborIndex + 1];\n let neighborLowerBound = previousValue != null ? previousValue + minValueDifference : min;\n neighborLowerBound = Math.max(neighborLowerBound, min + neighborIndex * minValueDifference);\n let neighborUpperBound = nextValueAfter != null ? nextValueAfter - minValueDifference : max;\n neighborUpperBound = Math.min(\n neighborUpperBound,\n max - (adjustedValues.length - 1 - neighborIndex) * minValueDifference\n );\n const restoredValue = clamp(pressedValueAfterClamp, neighborLowerBound, neighborUpperBound);\n adjustedValues[neighborIndex] = Number(restoredValue.toFixed(12));\n }\n\n return { value: adjustedValues, thumbIndex: targetIndex, didSwap: true };\n }\n\n // behavior === 'none' — clamp the pressed thumb between its neighbours; thumbs never cross.\n const previousNeighbor = activeValues[pressedIndex - 1];\n const nextNeighbor = activeValues[pressedIndex + 1];\n const lowerBound = previousNeighbor != null ? previousNeighbor + minValueDifference : min;\n const upperBound = nextNeighbor != null ? nextNeighbor - minValueDifference : max;\n const constrained = Number(clamp(nextValue, lowerBound, upperBound).toFixed(12));\n const value = activeValues.slice();\n value[pressedIndex] = constrained;\n return { value, thumbIndex: pressedIndex, didSwap: false };\n}\n\n/**\n * Border + padding on the leading/trailing edge of the control along the active\n * axis. Uses physical longhands (`left`/`right`/`top`/`bottom`) rather than\n * logical ones (`inline-start`/…) because `getComputedStyle` resolves the\n * physical properties in every browser, whereas logical longhands return an\n * empty string in some engines.\n */\nexport function getControlOffset(\n styles: CSSStyleDeclaration | null,\n vertical: boolean,\n rtl: boolean\n): { start: number; end: number } {\n if (!styles) {\n return { start: 0, end: 0 };\n }\n const parseSize = (v: string): number => {\n const p = parseFloat(v);\n return Number.isNaN(p) ? 0 : p;\n };\n const sideOffset = (side: 'left' | 'right' | 'top' | 'bottom'): number =>\n parseSize(styles.getPropertyValue(`border-${side}-width`)) +\n parseSize(styles.getPropertyValue(`padding-${side}`));\n\n let startSide: 'left' | 'right' | 'top';\n let endSide: 'right' | 'left' | 'bottom';\n if (vertical) {\n startSide = 'top';\n endSide = 'bottom';\n } else if (rtl) {\n startSide = 'right';\n endSide = 'left';\n } else {\n startSide = 'left';\n endSide = 'right';\n }\n\n return { start: sideOffset(startSide), end: sideOffset(endSide) };\n}\n\nconst formatterCache = new Map<string, Intl.NumberFormat>();\n\nfunction getFormatter(locale: string | undefined, options: Intl.NumberFormatOptions | undefined): Intl.NumberFormat {\n const key = JSON.stringify({ locale: locale ?? null, options: options ?? null });\n let formatter = formatterCache.get(key);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale, options);\n formatterCache.set(key, formatter);\n }\n return formatter;\n}\n\n/** Formats a number with a cached `Intl.NumberFormat` instance. */\nexport function formatNumber(\n value: number | null | undefined,\n locale: string | undefined,\n options: Intl.NumberFormatOptions | undefined\n): string {\n if (value == null) {\n return '';\n }\n return getFormatter(locale, options).format(value);\n}\n\n/** Default `aria-valuetext` for a two-thumb range, or a formatted value when `format` is set. */\nexport function getDefaultAriaValueText(\n values: readonly number[],\n index: number,\n format: Intl.NumberFormatOptions | undefined,\n locale: string | undefined\n): string | undefined {\n if (index < 0) {\n return undefined;\n }\n if (values.length === 2) {\n return index === 0\n ? `${formatNumber(values[index], locale, format)} start range`\n : `${formatNumber(values[index], locale, format)} end range`;\n }\n return format ? formatNumber(values[index], locale, format) : undefined;\n}\n\nexport const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\nexport const COMPOSITE_KEYS = new Set([...ARROW_KEYS, 'Home', 'End']);\nexport const ALL_KEYS = new Set([...COMPOSITE_KEYS, 'PageUp', 'PageDown']);\n\nexport function areValuesEqual(a: number | number[], b: number | number[]): boolean {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((v, i) => v === b[i]);\n }\n return a === b;\n}\n","import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\nimport {\n clamp,\n getControlOffset,\n getMidpoint,\n resolveThumbCollision,\n ResolveThumbCollisionResult,\n roundValueToStep,\n validateMinimumDistance\n} from './slider.utils';\n\nconst INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;\n\ntype PointerCoords = { x: number; y: number };\n\n/**\n * The interactive area of the slider. Handles pointer presses and drags on the\n * track, mapping pointer position to a value and moving the closest thumb.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderControl]',\n exportAs: 'rdxSliderControl',\n host: {\n '[attr.data-orientation]': 'root.orientation()',\n '[attr.data-disabled]': 'root.isDisabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'root.dragging() ? \"\" : undefined',\n '(pointerdown)': 'onPointerDown($event)'\n }\n})\nexport class RdxSliderControl {\n protected readonly root = injectSliderRootContext();\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly document = inject(DOCUMENT);\n\n private styles: CSSStyleDeclaration | null = null;\n private moveCount = 0;\n private currentInteractionValue: number | number[] | null = null;\n private touchId: number | null = null;\n private insetThumbOffset = 0;\n\n private readonly onTouchStart = (event: TouchEvent) => this.handleTouchStart(event);\n private readonly onMove = (event: PointerEvent) => this.handleMove(event);\n private readonly onUp = (event: PointerEvent) => this.handleUp(event);\n private readonly onCancel = (event: PointerEvent) => this.handleUp(event);\n private readonly onTouchMove = (event: TouchEvent) => this.handleMove(event);\n private readonly onTouchEnd = (event: TouchEvent) => this.handleUp(event);\n\n constructor() {\n const control = this.elementRef.nativeElement;\n this.root.controlRef.set(control);\n control.style.setProperty('touch-action', 'none');\n control.addEventListener('touchstart', this.onTouchStart, { passive: true });\n inject(DestroyRef).onDestroy(() => {\n control.removeEventListener('touchstart', this.onTouchStart);\n this.stopListening();\n });\n }\n\n protected onPointerDown(event: PointerEvent): void {\n const control = this.elementRef.nativeElement;\n if (this.root.isDisabled() || event.defaultPrevented || event.button !== 0) {\n return;\n }\n const target = event.target as HTMLElement | null;\n if (!target) {\n return;\n }\n if (this.isTargetDisabledThumb(target)) {\n this.root.resetPressedThumb();\n return;\n }\n\n // Suppress the nested range input's native click-to-set and drag so the\n // control fully owns pointer interaction (otherwise releasing on a thumb\n // fires a native change that snaps the value to the press point inside\n // the thumb-sized input). Focus is restored manually via focusThumb.\n event.preventDefault();\n\n this.touchId = null;\n this.styles = this.document.defaultView?.getComputedStyle(control) ?? null;\n this.startPressing({ x: event.clientX, y: event.clientY });\n const finger = this.getFingerState({ x: event.clientX, y: event.clientY });\n if (finger == null) {\n return;\n }\n\n this.root.setDragging(true);\n\n // Pressing directly on a thumb sets a center offset; only a rail press changes value on down.\n if (this.root.pressedThumbCenterOffset == null) {\n this.setValueFromPointer(finger, 'track-press', event);\n }\n\n this.root.focusThumb(finger.thumbIndex);\n\n control.setPointerCapture(event.pointerId);\n this.moveCount = 0;\n this.document.addEventListener('pointermove', this.onMove);\n this.document.addEventListener('pointerup', this.onUp, { once: true });\n this.document.addEventListener('pointercancel', this.onCancel, { once: true });\n }\n\n private handleTouchStart(event: TouchEvent): void {\n if (this.root.isDisabled()) {\n return;\n }\n\n const touch = event.changedTouches[0];\n if (!touch) {\n return;\n }\n if (this.isTargetDisabledThumb(event.target)) {\n this.root.resetPressedThumb();\n return;\n }\n\n this.touchId = touch.identifier;\n this.styles = this.document.defaultView?.getComputedStyle(this.elementRef.nativeElement) ?? null;\n\n const fingerCoords = this.getFingerCoords(event);\n if (fingerCoords == null) {\n return;\n }\n\n this.startPressing(fingerCoords);\n const finger = this.getFingerState(fingerCoords);\n if (finger == null) {\n return;\n }\n\n this.root.focusThumb(finger.thumbIndex);\n const applied = this.setValueFromPointer(finger, 'track-press', event);\n if (applied && finger.didSwap) {\n this.root.focusThumb(finger.thumbIndex);\n }\n\n this.moveCount = 0;\n this.document.addEventListener('touchmove', this.onTouchMove, { passive: true });\n this.document.addEventListener('touchend', this.onTouchEnd, { passive: true, once: true });\n this.document.addEventListener('touchcancel', this.onTouchEnd, { passive: true, once: true });\n }\n\n private handleMove(event: PointerEvent | TouchEvent): void {\n const fingerCoords = this.getFingerCoords(event);\n if (fingerCoords == null) {\n return;\n }\n\n this.moveCount += 1;\n if ('buttons' in event && event.buttons === 0) {\n this.handleUp(event);\n return;\n }\n\n const finger = this.getFingerState(fingerCoords);\n if (finger == null) {\n return;\n }\n if (validateMinimumDistance(finger.value, this.root.step(), this.root.minStepsBetweenValues())) {\n if (!this.root.dragging() && this.moveCount > INTENTIONAL_DRAG_COUNT_THRESHOLD) {\n this.root.setDragging(true);\n }\n const applied = this.setValueFromPointer(finger, 'drag', event);\n if (applied && finger.didSwap) {\n this.root.focusThumb(finger.thumbIndex);\n }\n }\n }\n\n private handleUp(event: PointerEvent | TouchEvent): void {\n this.root.setActive(-1);\n this.root.setDragging(false);\n this.root.pressedThumbCenterOffset = null;\n this.root.pressedInput = null;\n\n if (this.currentInteractionValue != null) {\n this.root.commitValue(event);\n }\n\n const control = this.elementRef.nativeElement;\n if ('pointerId' in event && control.hasPointerCapture?.(event.pointerId)) {\n control.releasePointerCapture(event.pointerId);\n }\n\n this.root.resetPressedThumb();\n this.touchId = null;\n this.root.pressedValues = null;\n this.currentInteractionValue = null;\n this.stopListening();\n }\n\n private stopListening(): void {\n this.document.removeEventListener('pointermove', this.onMove);\n this.document.removeEventListener('pointerup', this.onUp);\n this.document.removeEventListener('pointercancel', this.onCancel);\n this.document.removeEventListener('touchmove', this.onTouchMove);\n this.document.removeEventListener('touchend', this.onTouchEnd);\n this.document.removeEventListener('touchcancel', this.onTouchEnd);\n }\n\n private getFingerCoords(event: PointerEvent | TouchEvent): PointerCoords | null {\n if ('changedTouches' in event) {\n if (this.touchId == null) {\n return null;\n }\n\n for (let i = 0; i < event.changedTouches.length; i += 1) {\n const touch = event.changedTouches[i];\n if (touch.identifier === this.touchId) {\n return { x: touch.clientX, y: touch.clientY };\n }\n }\n\n return null;\n }\n\n return { x: event.clientX, y: event.clientY };\n }\n\n private isTargetDisabledThumb(target: EventTarget | null): boolean {\n const NodeCtor = this.elementRef.nativeElement.ownerDocument.defaultView?.Node;\n if (!NodeCtor || !(target instanceof NodeCtor)) {\n return false;\n }\n\n return this.root.thumbList().some((thumb) => thumb.disabled() && thumb.element.contains(target));\n }\n\n private startPressing(finger: { x: number; y: number }): void {\n const values = this.root.values();\n const range = this.root.range();\n this.root.pressedValues = range ? values.slice() : null;\n this.currentInteractionValue = null;\n\n const pressedThumbIndex = this.root.pressedThumbIndex;\n let closestThumbIndex = pressedThumbIndex;\n\n if (pressedThumbIndex > -1 && pressedThumbIndex < values.length) {\n // Pressed directly on a thumb sitting on max — walk left over stacked max thumbs.\n if (values[pressedThumbIndex] === this.root.max()) {\n let c = pressedThumbIndex;\n while (c > 0 && values[c - 1] === this.root.max()) {\n c -= 1;\n }\n closestThumbIndex = c;\n }\n } else {\n // Pressed on the rail — find the nearest enabled thumb by midpoint distance.\n const axis = this.root.orientation() === 'horizontal' ? 'x' : 'y';\n const thumbs = this.root.thumbList();\n let minDistance: number | undefined;\n closestThumbIndex = -1;\n for (let i = 0; i < thumbs.length; i += 1) {\n const thumb = thumbs[i];\n if (thumb.disabled()) {\n continue;\n }\n const midpoint = getMidpoint(thumb.element);\n const distance = Math.abs(finger[axis] - midpoint[axis]);\n if (minDistance === undefined || distance <= minDistance) {\n closestThumbIndex = i;\n minDistance = distance;\n }\n }\n }\n\n if (closestThumbIndex > -1 && closestThumbIndex !== pressedThumbIndex) {\n this.root.pressedThumbIndex = closestThumbIndex;\n this.root.pressedInput = this.root.thumbList()[closestThumbIndex]?.inputElement ?? null;\n }\n\n this.insetThumbOffset = 0;\n if (this.root.inset()) {\n const thumb = this.root.thumbList()[closestThumbIndex]?.element;\n if (thumb) {\n const rect = thumb.getBoundingClientRect();\n this.insetThumbOffset = (this.root.orientation() === 'vertical' ? rect.height : rect.width) / 2;\n }\n }\n }\n\n private setValueFromPointer(finger: ResolveThumbCollisionResult, reason: string, event?: Event): boolean {\n const nextValues = Array.isArray(finger.value) ? finger.value : [finger.value];\n const applied = this.root.setValue(nextValues, reason as 'track-press' | 'drag', event, finger.thumbIndex);\n if (applied) {\n this.currentInteractionValue = finger.value;\n if (finger.didSwap) {\n this.root.pressedThumbIndex = finger.thumbIndex;\n this.root.pressedInput = this.root.thumbList()[finger.thumbIndex]?.inputElement ?? null;\n }\n }\n return applied;\n }\n\n /** Projects a pointer position onto the track and resolves it to a value (+ collision). */\n private getFingerState(finger: { x: number; y: number }): ResolveThumbCollisionResult | null {\n const control = this.root.controlRef();\n const values = this.root.values();\n const range = this.root.range();\n const thumbIndex = this.root.pressedThumbIndex;\n const vertical = this.root.orientation() === 'vertical';\n const rtl = this.root.dir() === 'rtl';\n const min = this.root.min();\n const max = this.root.max();\n const step = this.root.step();\n\n if (!control || (!range && (thumbIndex < 0 || thumbIndex >= values.length))) {\n return null;\n }\n\n const { width, height, bottom, left, right } = control.getBoundingClientRect();\n const controlOffset = getControlOffset(this.styles, vertical, rtl);\n const controlSize =\n (vertical ? height : width) - controlOffset.start - controlOffset.end - this.insetThumbOffset * 2;\n\n // A collapsed/unmeasurable track would divide by zero and yield NaN values.\n if (!(controlSize > 0)) {\n return null;\n }\n\n const thumbCenterOffset = this.root.pressedThumbCenterOffset ?? 0;\n const fingerX = finger.x - thumbCenterOffset;\n const fingerY = finger.y - thumbCenterOffset;\n\n const valueSize = vertical\n ? bottom - fingerY - controlOffset.end\n : (rtl ? right - fingerX : fingerX - left) - controlOffset.start;\n\n const valueRescaled = clamp((valueSize - this.insetThumbOffset) / controlSize, 0, 1);\n\n let newValue = (max - min) * valueRescaled + min;\n newValue = roundValueToStep(newValue, step, min);\n newValue = clamp(newValue, min, max);\n\n if (!range) {\n return { value: newValue, thumbIndex, didSwap: false };\n }\n if (thumbIndex < 0) {\n return null;\n }\n\n return resolveThumbCollision({\n behavior: this.root.thumbCollisionBehavior(),\n values,\n currentValues: values,\n initialValues: this.root.pressedValues,\n pressedIndex: thumbIndex,\n nextValue: newValue,\n min,\n max,\n step,\n minStepsBetweenValues: this.root.minStepsBetweenValues()\n });\n }\n}\n","import { computed, Directive } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\nimport { valueToPercent } from './slider.utils';\n\nfunction getInsetStyles(\n vertical: boolean,\n range: boolean,\n start: number | undefined,\n end: number | undefined\n): Record<string, string | number> {\n const startEdge = vertical ? 'bottom' : 'inset-inline-start';\n const mainSide = vertical ? 'height' : 'width';\n const crossSide = vertical ? 'width' : 'height';\n\n const styles: Record<string, string | number> = {\n position: vertical ? 'absolute' : 'relative',\n [crossSide]: 'inherit'\n };\n\n if (start === undefined || (range && end === undefined)) {\n styles['visibility'] = 'hidden';\n }\n\n if (!range) {\n styles[startEdge] = 0;\n styles[mainSide] = `${start ?? 0}%`;\n return styles;\n }\n\n styles[startEdge] = `${start ?? 0}%`;\n styles[mainSide] = `${(end ?? 0) - (start ?? 0)}%`;\n return styles;\n}\n\n/**\n * Visualises the portion of the track between the slider's minimum (or the first\n * thumb in a range) and the active value.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderIndicator]',\n exportAs: 'rdxSliderIndicator',\n host: {\n '[style]': 'indicatorStyle()',\n '[attr.data-orientation]': 'root.orientation()',\n '[attr.data-disabled]': 'root.isDisabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'root.dragging() ? \"\" : undefined'\n }\n})\nexport class RdxSliderIndicator {\n protected readonly root = injectSliderRootContext();\n\n protected readonly indicatorStyle = computed<Record<string, string | number>>(() => {\n const vertical = this.root.orientation() === 'vertical';\n const range = this.root.range();\n const values = this.root.values();\n const min = this.root.min();\n const max = this.root.max();\n const inset = this.root.inset();\n\n const startEdge = vertical ? 'bottom' : 'inset-inline-start';\n const mainSide = vertical ? 'height' : 'width';\n const crossSide = vertical ? 'width' : 'height';\n\n const start = valueToPercent(values[0], min, max);\n const end = valueToPercent(values[values.length - 1], min, max);\n\n if (inset) {\n const [startPosition, endPosition] = this.root.indicatorPosition();\n return getInsetStyles(vertical, range, startPosition, endPosition);\n }\n\n const styles: Record<string, string | number> = {\n position: vertical ? 'absolute' : 'relative',\n [crossSide]: 'inherit'\n };\n\n if (!range) {\n styles[startEdge] = 0;\n styles[mainSide] = `${start}%`;\n return styles;\n }\n\n styles[startEdge] = `${start}%`;\n styles[mainSide] = `${end - start}%`;\n return styles;\n });\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n Signal\n} from '@angular/core';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n injectControlValueAccessor,\n injectDocument,\n injectId,\n NumberInput,\n RdxCancelableChangeEventDetails,\n RdxControlValueAccessor\n} from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { provideSliderRootContext } from './slider-context';\nimport {\n areValuesEqual,\n asc,\n clamp,\n formatNumber,\n getSliderValue,\n SliderOrientation,\n ThumbCollisionBehavior,\n validateMinimumDistance\n} from './slider.utils';\n\nexport type SliderValue = number | number[];\nexport type RdxSliderThumbAlignment = 'center' | 'edge' | 'edge-client-only';\nexport type RdxSliderValueChangeReason = 'input-change' | 'track-press' | 'drag' | 'keyboard' | 'none';\nexport type RdxSliderValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxSliderValueChangeReason> & {\n activeThumbIndex: number;\n};\nexport type RdxSliderValueCommitReason = RdxSliderValueChangeReason;\n\nexport interface RdxSliderValueCommitEventDetails {\n reason: RdxSliderValueCommitReason;\n event: Event;\n trigger: HTMLElement | undefined;\n}\n\nexport interface RdxSliderValueChangeEvent {\n value: SliderValue;\n eventDetails: RdxSliderValueChangeEventDetails;\n}\n\nexport interface RdxSliderValueCommitEvent {\n value: SliderValue;\n eventDetails: RdxSliderValueCommitEventDetails;\n}\n\n/** Minimal shape a thumb registers with the root, used for hit-testing and focus. */\nexport interface RdxSliderThumbRef {\n /** The thumb wrapper element. */\n readonly element: HTMLElement;\n /** The nested `input[type=range]`, registered once it is initialised. */\n inputElement: HTMLInputElement | null;\n /** Whether this thumb is disabled (own state OR root disabled). */\n readonly disabled: Signal<boolean>;\n}\n\nfunction sortByDomOrder(list: readonly RdxSliderThumbRef[]): RdxSliderThumbRef[] {\n return list.slice().sort((a, b) => {\n const position = a.element.compareDocumentPosition(b.element);\n\n if (position & Node.DOCUMENT_POSITION_FOLLOWING) {\n return -1;\n }\n\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n return 1;\n }\n return 0;\n });\n}\n\nfunction cloneChangeEventWithTarget(event: Event, value: SliderValue, name: string | undefined): Event {\n const EventCtor = event.constructor as typeof Event;\n let clonedEvent: Event;\n try {\n clonedEvent = new EventCtor(event.type, event);\n } catch {\n clonedEvent = new Event(event.type, event);\n }\n\n Object.defineProperty(clonedEvent, 'target', {\n writable: true,\n value: { value, name }\n });\n\n return clonedEvent;\n}\n\n/**\n * Groups all parts of the slider and owns its state, value-change logic and\n * thumb registration. A single directive drives both orientations — there are no\n * separate horizontal/vertical components.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderRoot]',\n exportAs: 'rdxSliderRoot',\n providers: [provideSliderRootContext(() => inject(RdxSliderRoot))],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: value', 'disabled']\n }\n ],\n host: {\n role: 'group',\n '[id]': 'id()',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.dir]': 'dir()',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'dragging() ? \"\" : undefined'\n }\n})\nexport class RdxSliderRoot {\n /** @ignore */\n protected readonly cva = injectControlValueAccessor<SliderValue>();\n private readonly document = injectDocument();\n\n readonly id = input<string>(injectId('rdx-slider-'));\n\n /**\n * The minimum value of the slider.\n * @default 0\n */\n readonly min = input<number, NumberInput>(0, { transform: numberAttribute });\n\n /**\n * The maximum value of the slider.\n * @default 100\n */\n readonly max = input<number, NumberInput>(100, { transform: numberAttribute });\n\n /**\n * The granularity with which the value can change through user interaction.\n * @default 1\n */\n readonly step = input<number, NumberInput>(1, { transform: numberAttribute });\n\n /**\n * The granularity with which the value changes on Page Up / Page Down keys and Shift + Arrow keys.\n * @default 10\n */\n readonly largeStep = input<number, NumberInput>(10, { transform: numberAttribute });\n\n /**\n * The minimum number of steps that must separate two thumbs in a range slider.\n * @default 0\n */\n readonly minStepsBetweenValues = input<number, NumberInput>(0, { transform: numberAttribute });\n\n /**\n * The orientation of the slider.\n * @default 'horizontal'\n */\n readonly orientation = input<SliderOrientation>('horizontal');\n\n /**\n * The reading direction. Mirrors the horizontal axis when set to `'rtl'`.\n * @default 'ltr'\n */\n readonly dirInput = input<'ltr' | 'rtl' | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n /**\n * How thumbs behave when they meet in a range slider.\n * @default 'push'\n */\n readonly thumbCollisionBehavior = input<ThumbCollisionBehavior>('push');\n\n /**\n * How the thumbs align with the control when the value is at min/max.\n * `center` aligns the thumb center to the control edge; `edge`/`edge-client-only`\n * inset thumbs so their outer edge aligns to the control edge.\n * @default 'center'\n */\n readonly thumbAlignment = input<RdxSliderThumbAlignment>('center');\n\n /** Options forwarded to `Intl.NumberFormat` when displaying and announcing values. */\n readonly format = input<Intl.NumberFormatOptions>();\n\n /** Locale used for value formatting. */\n readonly locale = input<string>();\n\n /** Name of the hidden inputs rendered by each thumb, for form submission. */\n readonly name = input<string>();\n\n /** Id of the form the slider belongs to. */\n readonly form = input<string>();\n\n /**\n * When `true`, the user cannot interact with the slider.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** The uncontrolled value of the slider when it is initially rendered. */\n readonly defaultValue = input<SliderValue>();\n\n /** The controlled value of the slider. Use with `(onValueChange)` or two-way `[(value)]`. */\n readonly value = model<SliderValue>();\n\n readonly ariaLabelledBy = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** Emitted when the value changes (during interaction). */\n readonly onValueChange = output<RdxSliderValueChangeEvent>();\n\n /** Emitted when interaction ends, with the final value — useful for committing to a backend. */\n readonly onValueCommitted = output<RdxSliderValueCommitEvent>();\n\n /** @ignore */\n readonly controlRef = signal<HTMLElement | null>(null);\n\n /** @ignore Active thumb index (-1 when none). */\n readonly active = signal(-1);\n /** @ignore Last thumb index that was focused/used, drives z-index stacking. */\n readonly lastUsedThumbIndex = signal(-1);\n /** @ignore Whether a pointer drag is in progress. */\n readonly dragging = signal(false);\n /** @ignore Edge-aligned thumb/indicator positions, in control-relative percentages. */\n readonly indicatorPosition = signal<[number | undefined, number | undefined]>([undefined, undefined]);\n\n /** @ignore Pointer-drag scratch state (not reactive). */\n pressedThumbIndex = -1;\n /** @ignore */\n pressedThumbCenterOffset: number | null = null;\n /** @ignore */\n pressedInput: HTMLInputElement | null = null;\n /** @ignore Snapshot of values at drag start, the baseline for push/swap. */\n pressedValues: number[] | null = null;\n /** @ignore */\n lastChangeReason = 'none';\n /** @ignore */\n lastChangeEvent: Event | undefined;\n\n /** @ignore */\n readonly isDisabled = computed(() => !!this.cva.disabled());\n /** @ignore */\n readonly inset = computed(() => this.thumbAlignment() !== 'center');\n /** @ignore */\n readonly renderBeforeHydration = computed(() => this.thumbAlignment() === 'edge');\n\n /** @ignore The current value source (controlled value, else default, else min). */\n private readonly currentRaw = computed<SliderValue>(() => this.cva.value() ?? this.defaultValue() ?? this.min());\n\n /** Whether the slider has multiple thumbs (the value is an array). */\n readonly range = computed(() => Array.isArray(this.cva.value() ?? this.defaultValue()));\n\n /** The clamped values rendered to the user, sorted ascending for range sliders. */\n readonly values = computed<number[]>(() => {\n const raw = this.currentRaw();\n const min = this.min();\n const max = this.max();\n const arr = (Array.isArray(raw) ? raw.slice() : [raw]).map((v) => clamp(v, min, max));\n return this.range() ? arr.sort(asc) : arr;\n });\n\n private readonly thumbs = signal<RdxSliderThumbRef[]>([]);\n /** Registered thumbs in DOM order. */\n readonly thumbList = this.thumbs.asReadonly();\n\n /** @ignore */\n registerThumb(thumb: RdxSliderThumbRef): void {\n this.thumbs.update((list) => sortByDomOrder([...list, thumb]));\n }\n\n /** @ignore */\n unregisterThumb(thumb: RdxSliderThumbRef): void {\n this.thumbs.update((list) => list.filter((t) => t !== thumb));\n }\n\n /** @ignore */\n thumbIndexOf(thumb: RdxSliderThumbRef): number {\n return this.thumbList().indexOf(thumb);\n }\n\n /** @ignore */\n setActive(index: number): void {\n this.active.set(index);\n if (index !== -1) {\n this.lastUsedThumbIndex.set(index);\n }\n }\n\n /** @ignore */\n focusThumb(index: number): void {\n this.thumbList()[index]?.inputElement?.focus({ preventScroll: true });\n }\n\n /** @ignore */\n setIndicatorPosition(index: number, position: number | undefined): void {\n this.indicatorPosition.update(([start, end]) => {\n if (index === 0) {\n return [position, end];\n }\n if (index === this.values().length - 1) {\n return [start, position];\n }\n return [start, end];\n });\n }\n\n /** @ignore */\n formatValue(value: number): string {\n return formatNumber(value, this.locale(), this.format());\n }\n\n /** @ignore Output value matching the original value shape (number vs array). */\n private outputValue(): SliderValue {\n const raw = this.cva.value();\n if (raw !== undefined) {\n return raw;\n }\n return this.range() ? this.values() : this.values()[0];\n }\n\n /**\n * @ignore\n * Applies a new full set of values, preserving the single/range value shape.\n * Returns `false` when the value did not change.\n */\n setValue(nextValues: number[], reason: RdxSliderValueChangeReason, event?: Event, activeThumbIndex = -1): boolean {\n const next: SliderValue = this.range() ? nextValues : nextValues[0];\n const current = this.outputValue();\n const hasNaN = Array.isArray(next) ? next.some((v) => Number.isNaN(v)) : Number.isNaN(next);\n if (hasNaN || areValuesEqual(next, current)) {\n return false;\n }\n\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const changeEvent = cloneChangeEventWithTarget(event ?? new Event('slider.value-change'), next, this.name());\n const { eventDetails: baseEventDetails } = createCancelableChangeEventDetails(reason, changeEvent, trigger);\n const eventDetails = Object.assign(baseEventDetails, { activeThumbIndex }) as RdxSliderValueChangeEventDetails;\n this.onValueChange.emit({ value: next, eventDetails });\n if (eventDetails.isCanceled()) {\n return false;\n }\n\n this.lastChangeReason = reason;\n this.lastChangeEvent = eventDetails.event;\n this.value.set(next);\n this.cva.setValue(next);\n return true;\n }\n\n /** @ignore Keyboard / native input path: clamps to neighbours, commits immediately. */\n handleInputChange(\n valueInput: number,\n index: number,\n reason: RdxSliderValueChangeReason = 'keyboard',\n event?: Event\n ): void {\n if (this.isDisabled()) {\n return;\n }\n const result = getSliderValue(valueInput, index, this.min(), this.max(), this.range(), this.values());\n if (!validateMinimumDistance(result, this.step(), this.minStepsBetweenValues())) {\n return;\n }\n const arr = Array.isArray(result) ? result : [result];\n const applied = this.setValue(arr, reason, event, index);\n this.cva.markAsTouched();\n if (applied) {\n this.commitValue(event, reason);\n }\n }\n\n /** @ignore Emits the committed value at the end of a pointer drag. */\n commitValue(\n event?: Event,\n reason: RdxSliderValueCommitReason = this.lastChangeReason as RdxSliderValueCommitReason\n ): void {\n const commitEvent = event ?? this.lastChangeEvent ?? new Event('slider.value-commit');\n const trigger = commitEvent.currentTarget instanceof HTMLElement ? commitEvent.currentTarget : undefined;\n this.onValueCommitted.emit({\n value: this.outputValue(),\n eventDetails: {\n reason,\n event: commitEvent,\n trigger\n }\n });\n }\n\n /** @ignore */\n markAsTouched(): void {\n this.cva.markAsTouched();\n }\n\n /** @ignore */\n setDragging(dragging: boolean): void {\n this.dragging.set(dragging);\n }\n\n /** @ignore */\n resetPressedThumb(): void {\n this.pressedThumbIndex = -1;\n this.pressedThumbCenterOffset = null;\n this.pressedInput = null;\n }\n\n /** @ignore */\n getOwnerWindow(): Window | undefined {\n return this.document.defaultView ?? undefined;\n }\n}\n","import {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n numberAttribute,\n signal,\n untracked\n} from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/core';\nimport { injectSliderRootContext } from './slider-context';\nimport { RdxSliderThumbRef } from './slider-root';\nimport { getInsetThumbPositionPercent, valueToPercent } from './slider.utils';\n\n/**\n * A draggable handle. Render one per value; place an `input[rdxSliderThumbInput]`\n * inside it for keyboard, accessibility and form submission.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderThumb]',\n exportAs: 'rdxSliderThumb',\n host: {\n '[style]': 'thumbStyle()',\n '[attr.data-index]': 'index()',\n '[attr.data-orientation]': 'root.orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'root.dragging() ? \"\" : undefined',\n '(pointerdown)': 'onPointerDown($event)'\n }\n})\nexport class RdxSliderThumb implements RdxSliderThumbRef {\n protected readonly root = injectSliderRootContext();\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /** The nested range input, set by `[rdxSliderThumbInput]`. */\n inputElement: HTMLInputElement | null = null;\n\n /** Explicit index for this thumb (required for SSR range sliders). */\n readonly indexInput = input<number | undefined, NumberInput>(undefined, {\n alias: 'index',\n transform: (v) => (v == null ? undefined : numberAttribute(v))\n });\n\n /** Disables this individual thumb. */\n readonly thumbDisabled = input<boolean, BooleanInput>(false, { alias: 'disabled', transform: booleanAttribute });\n\n /** The position of this thumb among its siblings. */\n readonly index = computed(() => this.indexInput() ?? this.root.thumbIndexOf(this));\n\n /** Whether this thumb is disabled (own state OR root disabled). */\n readonly disabled = computed(() => this.thumbDisabled() || this.root.isDisabled());\n\n /** The value represented by this thumb. */\n readonly value = computed<number | undefined>(() => this.root.values()[this.index()]);\n\n private readonly percent = computed(() => {\n const value = this.value();\n return value === undefined ? NaN : valueToPercent(value, this.root.min(), this.root.max());\n });\n private readonly insetPosition = signal<number | undefined>(undefined);\n\n protected readonly thumbStyle = computed<Record<string, string | number>>(() => {\n const vertical = this.root.orientation() === 'vertical';\n const rtl = this.root.dir() === 'rtl';\n const startEdge = vertical ? 'bottom' : 'inset-inline-start';\n const crossOffset = vertical ? 'left' : 'top';\n const percent = this.percent();\n const inset = this.root.inset();\n const position = this.insetPosition();\n\n if (!Number.isFinite(percent)) {\n return { position: 'absolute', visibility: 'hidden' };\n }\n\n const index = this.index();\n let zIndex: number | undefined;\n if (this.root.range()) {\n if (this.root.active() === index) {\n zIndex = 2;\n } else if (this.root.lastUsedThumbIndex() === index) {\n zIndex = 1;\n }\n } else if (this.root.active() === index) {\n zIndex = 1;\n }\n\n const style: Record<string, string | number> = {\n position: 'absolute',\n [startEdge]: inset ? `${position ?? 0}%` : `${percent}%`,\n [crossOffset]: '50%',\n translate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`\n };\n if (inset && position === undefined) {\n style['visibility'] = 'hidden';\n }\n if (zIndex !== undefined) {\n style['z-index'] = zIndex;\n }\n return style;\n });\n\n constructor() {\n // Registration is DOM-order sorted on the root and reads no inputs, so the constructor\n // (where the host element already exists) is the right place; cleanup goes via DestroyRef.\n this.root.registerThumb(this);\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => this.root.unregisterThumb(this));\n\n afterNextRender(() => {\n const win = this.root.getOwnerWindow();\n const ResizeObserverCtor = (win as (Window & { ResizeObserver?: typeof ResizeObserver }) | undefined)\n ?.ResizeObserver;\n if (!ResizeObserverCtor) {\n this.updateInsetPosition();\n return;\n }\n\n const observer = new ResizeObserverCtor(() => this.updateInsetPosition());\n const control = this.root.controlRef();\n if (control) {\n observer.observe(control);\n }\n observer.observe(this.element);\n destroyRef.onDestroy(() => observer.disconnect());\n });\n\n afterRenderEffect(() => {\n this.root.inset();\n this.percent();\n this.index();\n this.root.values();\n untracked(() => queueMicrotask(() => this.updateInsetPosition()));\n });\n }\n\n private updateInsetPosition(): void {\n if (!this.root.inset()) {\n this.insetPosition.set(undefined);\n return;\n }\n\n const control = this.root.controlRef();\n if (!control) {\n return;\n }\n\n const position = getInsetThumbPositionPercent(\n control,\n this.element,\n this.percent(),\n this.root.orientation() === 'vertical'\n );\n this.insetPosition.set(position);\n this.root.setIndicatorPosition(this.index(), position);\n }\n\n protected onPointerDown(event: PointerEvent): void {\n if (this.disabled()) {\n return;\n }\n const index = this.index();\n this.root.pressedThumbIndex = index;\n\n const axis = this.root.orientation() === 'horizontal' ? 'x' : 'y';\n const rect = this.element.getBoundingClientRect();\n const midpoint = axis === 'x' ? (rect.left + rect.right) / 2 : (rect.top + rect.bottom) / 2;\n const pointer = axis === 'x' ? event.clientX : event.clientY;\n this.root.pressedThumbCenterOffset = pointer - midpoint;\n\n if (this.inputElement) {\n this.root.pressedInput = this.inputElement;\n }\n }\n}\n","import { computed, DestroyRef, Directive, ElementRef, inject, input } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\nimport { RdxSliderThumb } from './slider-thumb';\nimport { ALL_KEYS, COMPOSITE_KEYS, getDefaultAriaValueText, getNewValue, roundValueToStep } from './slider.utils';\n\n/**\n * The native `input[type=range]` nested inside a thumb. It is visually hidden but\n * remains the focusable element that drives keyboard interaction, accessibility\n * and form submission.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'input[rdxSliderThumbInput]',\n exportAs: 'rdxSliderThumbInput',\n host: {\n type: 'range',\n style: 'position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: inherit;',\n '[style.writing-mode]': 'writingMode()',\n '[attr.min]': 'root.min()',\n '[attr.max]': 'root.max()',\n '[attr.step]': 'root.step()',\n '[value]': 'thumb.value() ?? \"\"',\n '[disabled]': 'thumb.disabled()',\n '[attr.name]': 'root.name()',\n '[attr.form]': 'root.form()',\n '[attr.aria-orientation]': 'root.orientation()',\n '[attr.aria-valuenow]': 'thumb.value()',\n '[attr.aria-valuetext]': 'valueText()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.data-index]': 'thumb.index()',\n '(keydown)': 'onKeyDown($event)',\n '(change)': 'onChange($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()'\n }\n})\nexport class RdxSliderThumbInput {\n protected readonly root = injectSliderRootContext();\n protected readonly thumb = inject(RdxSliderThumb);\n private readonly element = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n readonly ariaValueTextInput = input<string | undefined>(undefined, { alias: 'aria-valuetext' });\n\n protected readonly writingMode = computed(() =>\n this.root.orientation() === 'vertical' ? (this.root.dir() === 'rtl' ? 'vertical-rl' : 'vertical-lr') : undefined\n );\n\n protected readonly ariaLabelledBy = computed(() =>\n this.ariaLabel() == null ? this.root.ariaLabelledBy() : undefined\n );\n\n protected readonly valueText = computed(\n () =>\n this.ariaValueTextInput() ??\n getDefaultAriaValueText(this.root.values(), this.thumb.index(), this.root.format(), this.root.locale())\n );\n\n constructor() {\n // Host element exists in the constructor and the registration has no input dependency.\n this.thumb.inputElement = this.element;\n\n inject(DestroyRef).onDestroy(() => {\n if (this.thumb.inputElement === this.element) {\n this.thumb.inputElement = null;\n }\n });\n }\n\n protected onChange(event: Event): void {\n const value = (event.target as HTMLInputElement).valueAsNumber;\n if (!Number.isNaN(value)) {\n this.root.handleInputChange(value, this.thumb.index(), 'input-change', event);\n }\n }\n\n protected onFocus(): void {\n this.root.setActive(this.thumb.index());\n }\n\n protected onBlur(): void {\n this.root.setActive(-1);\n this.root.markAsTouched();\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (event.defaultPrevented || !ALL_KEYS.has(event.key)) {\n return;\n }\n if (COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n\n const min = this.root.min();\n const max = this.root.max();\n const step = this.root.step();\n const largeStep = this.root.largeStep();\n const rtl = this.root.dir() === 'rtl';\n const range = this.root.range();\n const values = this.root.values();\n const index = this.thumb.index();\n const thumbValue = values[index];\n const rounded = roundValueToStep(thumbValue, step, min);\n\n let newValue: number | null = null;\n switch (event.key) {\n case 'ArrowUp':\n newValue = getNewValue(rounded, event.shiftKey ? largeStep : step, 1, min, max);\n break;\n case 'ArrowRight':\n newValue = getNewValue(rounded, event.shiftKey ? largeStep : step, rtl ? -1 : 1, min, max);\n break;\n case 'ArrowDown':\n newValue = getNewValue(rounded, event.shiftKey ? largeStep : step, -1, min, max);\n break;\n case 'ArrowLeft':\n newValue = getNewValue(rounded, event.shiftKey ? largeStep : step, rtl ? 1 : -1, min, max);\n break;\n case 'PageUp':\n newValue = getNewValue(rounded, largeStep, 1, min, max);\n break;\n case 'PageDown':\n newValue = getNewValue(rounded, largeStep, -1, min, max);\n break;\n case 'End':\n newValue =\n range && Number.isFinite(values[index + 1])\n ? values[index + 1] - step * this.root.minStepsBetweenValues()\n : max;\n break;\n case 'Home':\n newValue =\n range && Number.isFinite(values[index - 1])\n ? values[index - 1] + step * this.root.minStepsBetweenValues()\n : min;\n break;\n default:\n break;\n }\n\n if (newValue !== null) {\n this.root.handleInputChange(newValue, index, 'keyboard', event);\n event.preventDefault();\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\n\n/**\n * The track of the slider — the positioning context for the indicator and thumbs.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'div[rdxSliderTrack]',\n exportAs: 'rdxSliderTrack',\n host: {\n style: 'position: relative;',\n '[attr.data-orientation]': 'root.orientation()',\n '[attr.data-disabled]': 'root.isDisabled() ? \"\" : undefined',\n '[attr.data-dragging]': 'root.dragging() ? \"\" : undefined'\n }\n})\nexport class RdxSliderTrack {\n protected readonly root = injectSliderRootContext();\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { injectSliderRootContext } from './slider-context';\n\n/**\n * Displays the slider's current value(s) as formatted text. Renders into an\n * `output` element; the displayed value honours the root `format` and `locale`.\n *\n * @see https://base-ui.com/react/components/slider\n */\n@Directive({\n selector: 'output[rdxSliderValue]',\n exportAs: 'rdxSliderValue',\n host: {\n 'aria-live': 'off',\n '[textContent]': 'display()'\n }\n})\nexport class RdxSliderValue {\n protected readonly root = injectSliderRootContext();\n\n /** The separator placed between values of a range slider. */\n readonly separator = input<string>(' – ');\n\n protected readonly display = computed(() =>\n this.root\n .values()\n .map((value) => this.root.formatValue(value) || `${value}`)\n .join(this.separator())\n );\n}\n","import { NgModule } from '@angular/core';\nimport { RdxSliderControl } from './src/slider-control';\nimport { RdxSliderIndicator } from './src/slider-indicator';\nimport { RdxSliderRoot } from './src/slider-root';\nimport { RdxSliderThumb } from './src/slider-thumb';\nimport { RdxSliderThumbInput } from './src/slider-thumb-input';\nimport { RdxSliderTrack } from './src/slider-track';\nimport { RdxSliderValue } from './src/slider-value';\n\nexport * from './src/slider-context';\nexport * from './src/slider-control';\nexport * from './src/slider-indicator';\nexport * from './src/slider-root';\nexport * from './src/slider-thumb';\nexport * from './src/slider-thumb-input';\nexport * from './src/slider-track';\nexport * from './src/slider-value';\nexport * from './src/slider.utils';\n\nconst _imports = [\n RdxSliderRoot,\n RdxSliderControl,\n RdxSliderTrack,\n RdxSliderIndicator,\n RdxSliderThumb,\n RdxSliderThumbInput,\n RdxSliderValue\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGA;;;;;;AAMG;AACI,MAAM,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,GAAG,aAAa,CAC5E,sBAAsB,EACtB,mBAAmB;;ACLvB;AACM,SAAU,GAAG,CAAC,CAAS,EAAE,CAAS,EAAA;IACpC,OAAO,CAAC,GAAG,CAAC;AAChB;AAEA;SACgB,cAAc,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAA;AAClE,IAAA,OAAO,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,CAAC;AAC9C;AAEA;SACgB,uBAAuB,CAAC,KAAwB,EAAE,KAAa,EAAE,QAAgB,EAAA;AAC7F,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE;AAC5B,IAAA,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ;AACxB,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AAC3B;AAEA;AACM,SAAU,WAAW,CAAC,OAAgB,EAAA;AACxC,IAAA,MAAM,IAAI,GAAG,OAAO,CAAC,qBAAqB,EAAE;AAC5C,IAAA,OAAO,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;AAC/E;AAEA;AACM,SAAU,4BAA4B,CACxC,OAAgB,EAChB,KAAc,EACd,iBAAyB,EACzB,QAAiB,EAAA;AAEjB,IAAA,MAAM,SAAS,GAAG,KAAK,CAAC,qBAAqB,EAAE;AAC/C,IAAA,MAAM,WAAW,GAAG,OAAO,CAAC,qBAAqB,EAAE;IACnD,MAAM,IAAI,GAAG,QAAQ,GAAG,Q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ive, input, numberAttribute, booleanAttribute, computed, forwardRef, model, output, signal, effect, ElementRef, DestroyRef, NgModule } from '@angular/core';
3
3
  import * as kbd from '@radix-ng/primitives/core';
4
- import { injectId, RdxLiveAnnouncer, useArrowNavigation, getActiveElement } from '@radix-ng/primitives/core';
4
+ import { injectId, RdxLiveAnnouncer, createCancelableChangeEventDetails, useArrowNavigation, getActiveElement } from '@radix-ng/primitives/core';
5
5
  import { injectDirection } from '@radix-ng/primitives/direction-provider';
6
6
  import * as i1 from '@radix-ng/primitives/separator';
7
7
  import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
@@ -158,12 +158,11 @@ class RdxStepperRootDirective {
158
158
  else {
159
159
  this.prevStepperItem.set(null);
160
160
  }
161
- this.onValueChange.emit(currentValue);
162
161
  this.liveAnnouncer.announce(`Step ${currentValue} of ${items.length}`);
163
162
  }
164
163
  });
165
164
  }
166
- goToStep(step) {
165
+ goToStep(step, event, reason = event ? 'trigger-press' : 'none') {
167
166
  if (step > this.totalSteps()) {
168
167
  return;
169
168
  }
@@ -181,8 +180,13 @@ class RdxStepperRootDirective {
181
180
  return;
182
181
  }
183
182
  }
183
+ const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;
184
+ const { eventDetails } = createCancelableChangeEventDetails(reason, event ?? new Event('stepper.value-change'), trigger);
185
+ this.onValueChange.emit({ value: step, eventDetails });
186
+ if (eventDetails.isCanceled()) {
187
+ return;
188
+ }
184
189
  this.value.set(step);
185
- this.onValueChange.emit(step);
186
190
  }
187
191
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
188
192
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxStepperRootDirective, isStandalone: true, selector: "[rdxStepperRoot]", inputs: { defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "\"progress\"", "attr.data-linear": "linear() ? \"\" : undefined", "attr.data-orientation": "orientation()" } }, providers: [
@@ -280,14 +284,14 @@ class RdxStepperTriggerDirective {
280
284
  if (this.itemContext.step() <= this.rootContext.value() ||
281
285
  this.itemContext.step() === this.rootContext.value() + 1) {
282
286
  if (!mouseEvent.ctrlKey) {
283
- this.rootContext.value.set(this.itemContext.step());
287
+ this.rootContext.goToStep(this.itemContext.step(), event, 'trigger-press');
284
288
  return;
285
289
  }
286
290
  }
287
291
  }
288
292
  else {
289
293
  if (!mouseEvent.ctrlKey) {
290
- this.rootContext.value.set(this.itemContext.step());
294
+ this.rootContext.goToStep(this.itemContext.step(), event, 'trigger-press');
291
295
  return;
292
296
  }
293
297
  }
@@ -301,7 +305,7 @@ class RdxStepperTriggerDirective {
301
305
  return;
302
306
  }
303
307
  if ((keyEvent.key === kbd.ENTER || keyEvent.key === kbd.SPACE) && !keyEvent.ctrlKey && !keyEvent.shiftKey)
304
- this.rootContext.value.set(this.itemContext.step());
308
+ this.rootContext.goToStep(this.itemContext.step(), event, 'keyboard');
305
309
  if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(keyEvent.key)) {
306
310
  useArrowNavigation(keyEvent, getActiveElement(), undefined, {
307
311
  itemsArray: this.stepperItems(),