@ckui/core 0.1.0-next.0 → 0.1.0-next.2

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 (36) hide show
  1. package/README.md +239 -0
  2. package/fesm2022/ckui-core-badge.mjs +169 -0
  3. package/fesm2022/ckui-core-badge.mjs.map +1 -0
  4. package/fesm2022/ckui-core-button.mjs +5 -13
  5. package/fesm2022/ckui-core-button.mjs.map +1 -1
  6. package/fesm2022/ckui-core-dialog.mjs +908 -0
  7. package/fesm2022/ckui-core-dialog.mjs.map +1 -0
  8. package/fesm2022/ckui-core-field.mjs +6 -10
  9. package/fesm2022/ckui-core-field.mjs.map +1 -1
  10. package/fesm2022/ckui-core-internal-overlay.mjs +468 -0
  11. package/fesm2022/ckui-core-internal-overlay.mjs.map +1 -0
  12. package/fesm2022/ckui-core-internal.mjs +271 -8
  13. package/fesm2022/ckui-core-internal.mjs.map +1 -1
  14. package/fesm2022/ckui-core-progress.mjs +165 -0
  15. package/fesm2022/ckui-core-progress.mjs.map +1 -0
  16. package/fesm2022/ckui-core-segmented.mjs +528 -0
  17. package/fesm2022/ckui-core-segmented.mjs.map +1 -0
  18. package/fesm2022/ckui-core-stepper.mjs +842 -0
  19. package/fesm2022/ckui-core-stepper.mjs.map +1 -0
  20. package/fesm2022/ckui-core-toast.mjs +883 -0
  21. package/fesm2022/ckui-core-toast.mjs.map +1 -0
  22. package/fesm2022/ckui-core.mjs +5 -1
  23. package/fesm2022/ckui-core.mjs.map +1 -1
  24. package/package.json +29 -1
  25. package/styles/tokens.css +3 -0
  26. package/types/ckui-core-badge.d.ts +44 -0
  27. package/types/ckui-core-button.d.ts +0 -1
  28. package/types/ckui-core-dialog.d.ts +219 -0
  29. package/types/ckui-core-field.d.ts +0 -1
  30. package/types/ckui-core-internal-overlay.d.ts +76 -0
  31. package/types/ckui-core-internal.d.ts +115 -8
  32. package/types/ckui-core-progress.d.ts +43 -0
  33. package/types/ckui-core-segmented.d.ts +124 -0
  34. package/types/ckui-core-stepper.d.ts +186 -0
  35. package/types/ckui-core-toast.d.ts +97 -0
  36. package/types/ckui-core.d.ts +4 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ckui-core-stepper.mjs","names":[],"sources":["../../../../projects/core/stepper/stepper-math.ts","../../../../projects/core/stepper/stepper.ts"],"sourcesContent":["/** What the stepper needs to snap, clamp and format: all numbers already validated. */\nexport interface StepperGrid {\n readonly step: number;\n readonly min: number | null;\n readonly max: number | null;\n readonly digits: number;\n}\n\nexport interface StepperSeparators {\n readonly decimal: string;\n readonly group: string;\n}\n\nconst MAX_DIGITS = 10;\nconst EPSILON = 1e-9;\n/** Larger typed values are treated as a typo and reverted. */\nconst LIMIT = 1e15;\n\n/** Fraction digits of a number as written, `0.25` → 2, `1e-7` → 7. */\nexport function decimalsOf(value: number): number {\n if (!Number.isFinite(value)) {\n return 0;\n }\n const [mantissa, exponent] = String(Math.abs(value)).split('e');\n const fraction = mantissa.split('.')[1]?.length ?? 0;\n const shift = exponent === undefined ? 0 : -Number(exponent);\n return Math.min(Math.max(fraction + shift, 0), MAX_DIGITS);\n}\n\n/** Rounds to `digits` fraction digits, so 0.1 + 0.2 becomes 0.3, and never returns -0. */\nexport function roundTo(value: number, digits: number): number {\n const rounded = Number(value.toFixed(Math.min(digits, MAX_DIGITS)));\n return rounded === 0 ? 0 : rounded;\n}\n\n/** The nearest grid point inside the bounds. When `min` is above `max`, `min` wins. */\nexport function snap(value: number, grid: StepperGrid): number {\n const { step, min, max, digits } = grid;\n const base = min ?? 0;\n if (min !== null && max !== null && min > max) {\n return roundTo(min, digits);\n }\n let count = Math.round((value - base) / step);\n if (max !== null && base + count * step > max + EPSILON) {\n count = Math.floor((max - base) / step + EPSILON);\n }\n let snapped = base + count * step;\n if (min !== null && snapped < min) {\n snapped = min;\n }\n return roundTo(snapped, digits);\n}\n\n/** The first grid point beyond `value` in the direction; a value on the grid moves by one step. */\nexport function adjacent(value: number, direction: 1 | -1, grid: StepperGrid): number {\n const base = grid.min ?? 0;\n const position = (value - base) / grid.step;\n const nearest = Math.round(position);\n const onGrid = Math.abs(position - nearest) < EPSILON;\n let count: number;\n if (direction > 0) {\n count = onGrid ? nearest + 1 : Math.ceil(position);\n } else {\n count = onGrid ? nearest - 1 : Math.floor(position);\n }\n return snap(base + count * grid.step, grid);\n}\n\n/** `count` steps from the value; an off-grid value first moves to the adjacent grid point. */\nexport function moveBy(value: number, direction: 1 | -1, count: number, grid: StepperGrid): number {\n const first = adjacent(value, direction, grid);\n return count <= 1 ? first : snap(first + direction * (count - 1) * grid.step, grid);\n}\n\n/** Arabic-Indic and Persian digits and marks to ASCII, as `Intl` writes numbers in ar and fa. */\nfunction toAscii(text: string): string {\n return text\n .replace(/[\\u0660-\\u0669]/g, (digit) => String(digit.charCodeAt(0) - 0x0660))\n .replace(/[\\u06f0-\\u06f9]/g, (digit) => String(digit.charCodeAt(0) - 0x06f0))\n .replace(/\\u066b/g, '.')\n .replace(/\\u066c/g, ',')\n .replace(/[\\u061c\\u200e\\u200f]/g, '');\n}\n\nexport function separatorsOf(locale: string): StepperSeparators {\n try {\n const parts = new Intl.NumberFormat(locale).formatToParts(1000000.5);\n return {\n decimal: parts.find((part) => part.type === 'decimal')?.value ?? '.',\n group: parts.find((part) => part.type === 'group')?.value ?? ',',\n };\n } catch {\n return { decimal: '.', group: ',' };\n }\n}\n\nexport function createFormatter(\n locale: string,\n minDigits: number,\n maxDigits: number,\n): Intl.NumberFormat {\n const options = {\n useGrouping: false,\n minimumFractionDigits: minDigits,\n maximumFractionDigits: Math.max(minDigits, maxDigits),\n };\n try {\n return new Intl.NumberFormat(locale, options);\n } catch {\n return new Intl.NumberFormat('en', options);\n }\n}\n\n/**\n * Reads what a person typed. `null` is an empty field, `undefined` something that is no number.\n * Both `.` and `,` count as a decimal mark; a mark that is the locale's group separator and sits\n * in groups of three (`1.250` in German) is a group separator.\n */\nexport function parseNumber(\n text: string,\n separators: StepperSeparators,\n): number | null | undefined {\n const groupMark = toAscii(separators.group);\n let cleaned = toAscii(text)\n .replace(/[\\s'’]/g, '')\n .replace(/[−‒–]/g, '-');\n if (cleaned === '') {\n return null;\n }\n const dots = cleaned.split('.').length - 1;\n const commas = cleaned.split(',').length - 1;\n if (dots > 0 && commas > 0) {\n const decimalMark = cleaned.lastIndexOf('.') > cleaned.lastIndexOf(',') ? '.' : ',';\n const groupMark = decimalMark === '.' ? ',' : '.';\n cleaned = cleaned.split(groupMark).join('').replace(decimalMark, '.');\n } else if (dots + commas > 0) {\n const mark = dots > 0 ? '.' : ',';\n const count = Math.max(dots, commas);\n const grouped = /^[+-]?[1-9]\\d{0,2}([.,]\\d{3})+$/.test(cleaned);\n if (count > 1 || (grouped && groupMark === mark)) {\n if (!grouped) {\n return undefined;\n }\n cleaned = cleaned.split(mark).join('');\n } else {\n cleaned = cleaned.replace(mark, '.');\n }\n }\n if (!/^[+-]?(\\d+\\.?\\d*|\\.\\d+)$/.test(cleaned)) {\n return undefined;\n }\n const parsed = Number(cleaned);\n return Number.isFinite(parsed) && Math.abs(parsed) <= LIMIT ? parsed : undefined;\n}\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n LOCALE_ID,\n PLATFORM_ID,\n Renderer2,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n viewChild,\n} from '@angular/core';\nimport { CK_CONFIG, CK_LABELS, CkSize } from '@ckui/core';\nimport {\n CkIcon,\n CkMedia,\n CkValueControl,\n hasAccessibleName,\n provideCkValueAccessor,\n} from '@ckui/core/internal';\nimport {\n StepperGrid,\n createFormatter,\n decimalsOf,\n moveBy,\n parseNumber,\n separatorsOf,\n snap,\n} from './stepper-math';\n\ndeclare const ngDevMode: unknown;\n\n/** A held button repeats after this delay, then at the interval, and speeds up after the ramp. */\nconst REPEAT_DELAY = 400;\nconst REPEAT_INTERVAL = 80;\nconst REPEAT_RAMP = 2000;\nconst REPEAT_RAMP_FACTOR = 5;\nconst DEFAULT_LARGE_FACTOR = 10;\nconst SHOWN_DIGITS = 6;\n\ntype Direction = 1 | -1;\n\n/** Accepts `50`, `'50'`, `null`, `undefined` and `''`; anything else that is no number is `NaN`. */\nfunction toNumber(value: unknown): number | null {\n if (value === null || value === undefined || value === '') {\n return null;\n }\n return typeof value === 'number' || typeof value === 'string' ? Number(value) : NaN;\n}\n\nconst finiteOrNull = (value: number | null): number | null =>\n value !== null && Number.isFinite(value) ? value : null;\n\n/**\n * A number field with a minus and a plus button. The value is a real text input with the\n * `spinbutton` role: type a number (committed on Enter or blur, snapped to `step` and clamped to\n * `min` / `max`), use the arrow keys, or press the buttons, which repeat while held. An empty\n * field is `null`. The buttons are outside the tab order; the input is the one tab stop.\n *\n * Name it with `aria-label` or `aria-labelledby` on `ck-stepper`, or wrap it in a `<label>`. The\n * attributes are inputs here and move to the input element.\n *\n * The input comes first in the DOM, so a wrapping `<label>` names it rather than a button; the\n * minus button is moved in front of it with CSS `order`.\n */\n@Component({\n selector: 'ck-stepper',\n imports: [CkIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [provideCkValueAccessor(CkStepper)],\n host: {\n class: 'ck-stepper',\n '[class]': 'modifierClasses()',\n '[class.ck-stepper--disabled]': 'isDisabled()',\n '[class.ck-stepper--readonly]': 'readonly()',\n '[style.--_ck-stepper-chars]': 'chars()',\n '(focusout)': 'onFocusOut($event)',\n '(click)': 'focusInput($event)',\n },\n template: `\n <span class=\"ck-stepper__field\">\n <input\n #input\n class=\"ck-stepper__input\"\n type=\"text\"\n role=\"spinbutton\"\n [attr.inputmode]=\"inputMode()\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n enterkeyhint=\"done\"\n [attr.value]=\"displayValue()\"\n [readOnly]=\"readonly()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-valuenow]=\"current()\"\n [attr.aria-valuemin]=\"bounds().min\"\n [attr.aria-valuemax]=\"bounds().max\"\n [attr.aria-valuetext]=\"valueText()\"\n (input)=\"editing = true\"\n (keydown)=\"onKeydown($event)\"\n />\n @if (unit()) {\n <span class=\"ck-stepper__unit\" aria-hidden=\"true\">{{ unit() }}</span>\n }\n </span>\n <button\n type=\"button\"\n class=\"ck-stepper__button ck-stepper__button--decrement\"\n tabindex=\"-1\"\n [attr.aria-label]=\"decrementText()\"\n [disabled]=\"decrementBlocked()\"\n (pointerdown)=\"onPress($event, -1)\"\n (pointermove)=\"onPressMove($event)\"\n (pointerup)=\"endPress()\"\n (pointercancel)=\"onPressCancel()\"\n (lostpointercapture)=\"endPress()\"\n (pointerleave)=\"endPress()\"\n (click)=\"onButtonClick(-1)\"\n (auxclick)=\"$event.preventDefault()\"\n (contextmenu)=\"$event.preventDefault()\"\n >\n <ck-icon name=\"minus\" />\n </button>\n <button\n type=\"button\"\n class=\"ck-stepper__button ck-stepper__button--increment\"\n tabindex=\"-1\"\n [attr.aria-label]=\"incrementText()\"\n [disabled]=\"incrementBlocked()\"\n (pointerdown)=\"onPress($event, 1)\"\n (pointermove)=\"onPressMove($event)\"\n (pointerup)=\"endPress()\"\n (pointercancel)=\"onPressCancel()\"\n (lostpointercapture)=\"endPress()\"\n (pointerleave)=\"endPress()\"\n (click)=\"onButtonClick(1)\"\n (auxclick)=\"$event.preventDefault()\"\n (contextmenu)=\"$event.preventDefault()\"\n >\n <ck-icon name=\"plus\" />\n </button>\n `,\n styleUrl: './stepper.css',\n})\nexport class CkStepper extends CkValueControl<number | null> {\n /** Smallest value. Without it the value has no lower limit. When above `max`, `min` wins. */\n readonly min = input<number | null, unknown>(null, { transform: toNumber });\n /** Largest value. Without it the value has no upper limit. */\n readonly max = input<number | null, unknown>(null, { transform: toNumber });\n /** Distance between values, counted from `min` (else 0). Not a number above 0 counts as 1. */\n readonly step = input<number | null, unknown>(null, { transform: toNumber });\n /** What Page Up and Page Down move by. Default: 10 steps. */\n readonly largeStep = input<number | null, unknown>(null, { transform: toNumber });\n /** Text after the value, part of the value text for assistive technology: `W` reads \"250 W\". */\n readonly unit = input('');\n /** `undefined` uses the size from `provideCkui`. */\n readonly size = input<CkSize | undefined>(undefined);\n /** The value can be read and focused, but not typed or stepped. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Replaces the label of the minus button (\"FTP minus 5\"). */\n readonly decrementLabel = input('');\n /** Replaces the label of the plus button (\"FTP plus 5\"). */\n readonly incrementLabel = input('');\n /** The accessible name of the input. Moves from the host to the input element. */\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n /** The ids of the elements that name the input. Moves from the host to the input element. */\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n /** The ids of a hint or error for the input. Moves from the host to the input element. */\n readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n private readonly config = inject(CK_CONFIG);\n private readonly labels = inject(CK_LABELS);\n private readonly locale = inject(LOCALE_ID);\n private readonly media = inject(CkMedia);\n private readonly document = inject(DOCUMENT);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n /** Typed text that is not committed yet. */\n protected editing = false;\n /** The text last written into the input, so the render after a commit does not redo it. */\n private shown: string | null = null;\n private holding = false;\n /** Set by an accepted pointerdown on a button; the click that follows it must not step again. */\n private pressed = false;\n private stopWatchingRelease: (() => void) | null = null;\n private repeatTimer: ReturnType<typeof setTimeout> | null = null;\n private repeatElapsed = 0;\n private repeatDirection: Direction = 1;\n\n protected readonly modifierClasses = computed(\n () => `ck-stepper ck-stepper--${this.size() ?? this.config.size}`,\n );\n\n /** The decimal keypad has no minus sign, so a range that allows negatives gets the text one. */\n protected readonly inputMode = computed(() => {\n const { min } = this.bounds();\n return min !== null && min < 0 ? 'text' : 'decimal';\n });\n\n protected readonly stepSize = computed(() => {\n const step = this.step();\n return step !== null && Number.isFinite(step) && step > 0 ? step : 1;\n });\n\n /** The limits, with `max` raised to `min` when they cross. */\n protected readonly bounds = computed(() => {\n const min = finiteOrNull(this.min());\n const max = finiteOrNull(this.max());\n return { min, max: min !== null && max !== null && max < min ? min : max };\n });\n\n private readonly digits = computed(() =>\n Math.max(decimalsOf(this.stepSize()), decimalsOf(this.bounds().min ?? 0)),\n );\n\n private readonly grid = computed<StepperGrid>(() => ({\n step: this.stepSize(),\n ...this.bounds(),\n digits: this.digits(),\n }));\n\n private readonly largeDelta = computed(() => {\n const large = this.largeStep();\n return large !== null && Number.isFinite(large) && large > 0\n ? large\n : this.stepSize() * DEFAULT_LARGE_FACTOR;\n });\n\n private readonly separators = computed(() => separatorsOf(this.locale));\n\n /** The committed value, `null` for none (or anything that is not a finite number). */\n protected readonly current = computed<number | null>(() => {\n const value = this.value();\n return typeof value === 'number' && Number.isFinite(value) ? value : null;\n });\n\n private format(value: number | null): string {\n if (value === null) {\n return '';\n }\n const shown = Math.min(decimalsOf(value), SHOWN_DIGITS);\n return createFormatter(this.locale, this.digits(), shown).format(value);\n }\n\n protected readonly displayValue = computed(() => this.format(this.current()));\n\n protected readonly valueText = computed(() => {\n const value = this.displayValue();\n return value === '' ? null : this.unit() ? `${value} ${this.unit()}` : value;\n });\n\n /** Width of the value in characters, from the formatted limits (else the value), at least 3. */\n protected readonly chars = computed(() => {\n const { min, max } = this.bounds();\n const sources = min !== null || max !== null ? [min, max] : [this.current()];\n const lengths = sources\n .filter((value): value is number => value !== null)\n .map((value) => this.format(value).length);\n return Math.max(3, ...lengths);\n });\n\n protected readonly decrementText = computed(\n () => this.decrementLabel() || this.labels().decrement,\n );\n protected readonly incrementText = computed(\n () => this.incrementLabel() || this.labels().increment,\n );\n\n private readonly locked = computed(() => this.isDisabled() || this.readonly());\n\n protected readonly decrementBlocked = computed(() => {\n const { min } = this.bounds();\n const value = this.current();\n return this.locked() || (value !== null && min !== null && value <= min);\n });\n\n protected readonly incrementBlocked = computed(() => {\n const { max } = this.bounds();\n const value = this.current();\n return this.locked() || (value !== null && max !== null && value >= max);\n });\n\n constructor() {\n super();\n // The names are inputs here, so the host must not also keep them as a (role-less) attribute.\n const renderer = inject(Renderer2);\n renderer.removeAttribute(this.element, 'aria-label');\n renderer.removeAttribute(this.element, 'aria-labelledby');\n renderer.removeAttribute(this.element, 'aria-describedby');\n\n inject(DestroyRef).onDestroy(() => {\n this.holding = false;\n this.clearRepeat();\n this.unwatchRelease();\n });\n\n effect(() => {\n if (this.locked()) {\n this.endPress();\n }\n });\n\n let firstRender = true;\n afterRenderEffect(() => {\n const text = this.displayValue();\n if (!this.browser) {\n return;\n }\n const wasFirst = firstRender;\n firstRender = false;\n // Server markup keeps what a visitor typed before the page took over, as a draft.\n if (wasFirst && this.inputRef().nativeElement.value !== text) {\n this.editing = true;\n this.shown = text;\n return;\n }\n // A commit already showed this text; typing since then is a new draft the render must keep.\n if (text !== this.shown) {\n this.show(text);\n }\n });\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode && this.browser) {\n this.watchConfiguration();\n }\n }\n\n private watchConfiguration(): void {\n let destroyed = false;\n inject(DestroyRef).onDestroy(() => (destroyed = true));\n afterNextRender(() => {\n if (\n !destroyed &&\n !hasAccessibleName(this.inputRef().nativeElement, {\n title: false,\n text: false,\n labels: true,\n })\n ) {\n console.warn(\n '[ckui] ck-stepper has no accessible name. Add an aria-label or aria-labelledby, or wrap it in a <label>.',\n this.element,\n );\n }\n });\n let warnedStep = false;\n let warnedBounds = false;\n effect(() => {\n const step = this.step();\n if (!warnedStep && step !== null && !(Number.isFinite(step) && step > 0)) {\n warnedStep = true;\n console.warn(\n `[ckui] ck-stepper step must be a number above 0, got ${step}. Using 1.`,\n this.element,\n );\n }\n const min = finiteOrNull(this.min());\n const max = finiteOrNull(this.max());\n if (!warnedBounds && min !== null && max !== null && min > max) {\n warnedBounds = true;\n console.warn(\n `[ckui] ck-stepper min (${min}) is above max (${max}). The value is pinned to min.`,\n this.element,\n );\n }\n });\n }\n\n /** Writes text into the input and drops any uncommitted typing. */\n private show(text: string): void {\n const input = this.inputRef().nativeElement;\n this.editing = false;\n this.shown = text;\n if (input.value !== text) {\n input.value = text;\n }\n }\n\n /** The value arrows and buttons start from: the typed text when valid, else the value. */\n private base(): number | null {\n if (!this.editing) {\n return this.current();\n }\n const parsed = parseNumber(this.inputRef().nativeElement.value, this.separators());\n if (parsed === undefined) {\n return this.current();\n }\n return parsed === null ? null : snap(parsed, this.grid());\n }\n\n /** Moves by `count` steps from the base. Returns whether the committed value changed. */\n private stepBy(direction: Direction, count: number): boolean {\n const grid = this.grid();\n const base = this.base();\n const next =\n base === null\n ? snap(Math.min(grid.min ?? 0, grid.max ?? Infinity), grid)\n : moveBy(base, direction, count, grid);\n return this.settle(next);\n }\n\n /** Commits a value from the user and shows what the control then holds. */\n private settle(next: number | null): boolean {\n const before = this.current();\n if (next === before) {\n // Also an emptied field whose value was never set: `undefined` to `null` is no change.\n this.show(this.displayValue());\n return false;\n }\n this.commit(next);\n this.show(this.displayValue());\n return !Object.is(before, this.current());\n }\n\n private commitText(): void {\n if (!this.editing) {\n return;\n }\n const parsed = parseNumber(this.inputRef().nativeElement.value, this.separators());\n if (parsed === undefined) {\n this.show(this.displayValue());\n return;\n }\n this.settle(parsed === null ? null : snap(parsed, this.grid()));\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.isDisabled() || event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (event.key === 'Enter') {\n this.commitText();\n return;\n }\n if (this.readonly()) {\n return;\n }\n const { min, max } = this.bounds();\n switch (event.key) {\n case 'ArrowUp':\n this.stepBy(1, 1);\n break;\n case 'ArrowDown':\n this.stepBy(-1, 1);\n break;\n case 'PageUp':\n this.stepBy(1, this.largeDelta() / this.stepSize());\n break;\n case 'PageDown':\n this.stepBy(-1, this.largeDelta() / this.stepSize());\n break;\n case 'Home':\n if (min === null) {\n return;\n }\n this.settle(snap(min, this.grid()));\n break;\n case 'End':\n if (max === null) {\n return;\n }\n this.settle(snap(max, this.grid()));\n break;\n default:\n return;\n }\n event.preventDefault();\n }\n\n protected onFocusOut(event: FocusEvent): void {\n if (this.isDisabled()) {\n return;\n }\n // Ending a hold counts as touched already, so a blur during one reports once.\n const onInput = event.target === this.inputRef().nativeElement;\n const endsHold = onInput && this.holding;\n if (onInput) {\n this.commitText();\n this.endPress();\n }\n const entering = event.relatedTarget;\n if (!endsHold && (!(entering instanceof Node) || !this.element.contains(entering))) {\n this.markTouched();\n }\n }\n\n /** A click on the field around the value (the unit, the padding) focuses the input. */\n protected focusInput(event: Event): void {\n const input = this.inputRef().nativeElement;\n const target = event.target;\n if (\n target instanceof Element &&\n target !== input &&\n target.closest('.ck-stepper__field') !== null &&\n !input.disabled\n ) {\n input.focus({ preventScroll: true });\n }\n }\n\n /** The press starts on pointerdown, so the first step happens at once and a hold can repeat. */\n protected onPress(event: PointerEvent, direction: Direction): void {\n const blocked = direction > 0 ? this.incrementBlocked() : this.decrementBlocked();\n // A button inside `<fieldset disabled>` is :disabled but still gets pointer events.\n const disabledByAncestor = (event.currentTarget as HTMLElement).matches(':disabled');\n if (event.button !== 0 || !event.isPrimary || blocked || disabledByAncestor) {\n return;\n }\n this.pressed = true;\n // Keeps focus where it is (the input, so arrows still work); the click still happens.\n event.preventDefault();\n if (!this.media.coarsePointer()) {\n this.inputRef().nativeElement.focus({ preventScroll: true });\n }\n this.endPress();\n this.holding = true;\n this.watchRelease();\n this.repeatDirection = direction;\n this.repeatElapsed = 0;\n if (this.stepBy(direction, 1)) {\n this.scheduleRepeat(REPEAT_DELAY);\n } else {\n this.endPress();\n }\n }\n\n /** A pointer that has moved off the button no longer holds it. */\n protected onPressMove(event: PointerEvent): void {\n if (!this.holding) {\n return;\n }\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect();\n const inside =\n event.clientX >= rect.left &&\n event.clientX <= rect.right &&\n event.clientY >= rect.top &&\n event.clientY <= rect.bottom;\n if (!inside) {\n // Released elsewhere, so no click follows on this button.\n this.pressed = false;\n this.endPress();\n }\n }\n\n /** The browser took the pointer away: no click follows. */\n protected onPressCancel(): void {\n this.pressed = false;\n this.endPress();\n }\n\n /**\n * The click after a pointer press was handled on pointerdown and is skipped. A click without a\n * pointerdown (keyboard, a screen reader's activation, `button.click()`) steps once here.\n */\n protected onButtonClick(direction: Direction): void {\n if (this.pressed) {\n this.pressed = false;\n return;\n }\n if (this.locked()) {\n return;\n }\n this.stepBy(direction, 1);\n this.markTouched();\n }\n\n private scheduleRepeat(delay: number): void {\n this.repeatTimer = setTimeout(() => {\n this.repeatTimer = null;\n this.repeatElapsed += delay;\n if (!this.holding || this.locked() || this.inputRef().nativeElement.matches(':disabled')) {\n this.endPress();\n return;\n }\n const count = this.repeatElapsed >= REPEAT_RAMP ? REPEAT_RAMP_FACTOR : 1;\n if (this.stepBy(this.repeatDirection, count)) {\n this.scheduleRepeat(REPEAT_INTERVAL);\n } else {\n this.endPress();\n }\n }, delay);\n }\n\n /**\n * On a coarse pointer the input is not focused during a press, so the window losing focus and\n * the document turning hidden are the only signals that the finger will not be released here.\n */\n private watchRelease(): void {\n this.unwatchRelease();\n const view = this.document.defaultView;\n const onVisibility = (): void => {\n if (this.document.visibilityState === 'hidden') {\n this.endPress();\n }\n };\n const onBlur = (): void => this.endPress();\n this.document.addEventListener('visibilitychange', onVisibility);\n view?.addEventListener('blur', onBlur);\n this.stopWatchingRelease = () => {\n this.document.removeEventListener('visibilitychange', onVisibility);\n view?.removeEventListener('blur', onBlur);\n };\n }\n\n private unwatchRelease(): void {\n this.stopWatchingRelease?.();\n this.stopWatchingRelease = null;\n }\n\n private clearRepeat(): void {\n if (this.repeatTimer !== null) {\n clearTimeout(this.repeatTimer);\n this.repeatTimer = null;\n }\n }\n\n /** Release, cancel, lost capture, leave, blur, hidden, a bound or a lock: stops, counts as touched. */\n protected endPress(): void {\n this.clearRepeat();\n this.unwatchRelease();\n if (this.holding) {\n this.holding = false;\n this.markTouched();\n }\n }\n}\n"],"mappings":";;;;;AAaA,MAAM,aAAa;AACnB,MAAM,UAAU;AAEhB,MAAM,QAAQ;AAGd,SAAgB,WAAW,OAAa;CACtC,IAAI,CAAC,OAAO,SAAS,KAAK,GACxB,OAAO;CAET,MAAM,CAAC,UAAU,YAAY,OAAO,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG;CAC9D,MAAM,WAAW,SAAS,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,UAAU;CACnD,MAAM,QAAQ,aAAa,SAAY,IAAI,CAAC,OAAO,QAAQ;CAC3D,OAAO,KAAK,IAAI,KAAK,IAAI,WAAW,OAAO,CAAC,GAAG,UAAU;AAC3D;AAGA,SAAgB,QAAQ,OAAe,QAAc;CACnD,MAAM,UAAU,OAAO,MAAM,QAAQ,KAAK,IAAI,QAAQ,UAAU,CAAC,CAAC;CAClE,OAAO,YAAY,IAAI,IAAI;AAC7B;AAGA,SAAgB,KAAK,OAAe,MAAiB;CACnD,MAAM,EAAE,MAAM,KAAK,KAAK,WAAW;CACnC,MAAM,OAAO,OAAO;CACpB,IAAI,QAAQ,QAAQ,QAAQ,QAAQ,MAAM,KACxC,OAAO,QAAQ,KAAK,MAAM;CAE5B,IAAI,QAAQ,KAAK,OAAO,QAAQ,QAAQ,IAAI;CAC5C,IAAI,QAAQ,QAAQ,OAAO,QAAQ,OAAO,MAAM,SAC9C,QAAQ,KAAK,OAAO,MAAM,QAAQ,OAAO,OAAO;CAElD,IAAI,UAAU,OAAO,QAAQ;CAC7B,IAAI,QAAQ,QAAQ,UAAU,KAC5B,UAAU;CAEZ,OAAO,QAAQ,SAAS,MAAM;AAChC;AAGA,SAAgB,SAAS,OAAe,WAAmB,MAAiB;CAC1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