{"version":3,"file":"forty-cdk-number-input.mjs","sources":["../../../projects/forty-cdk/number-input/src/locale-number.ts","../../../projects/forty-cdk/number-input/src/number-input-context.ts","../../../projects/forty-cdk/number-input/src/number-input-defaults.ts","../../../projects/forty-cdk/number-input/src/number-input.ts","../../../projects/forty-cdk/number-input/src/number-input-group.ts","../../../projects/forty-cdk/number-input/src/number-input-increment.ts","../../../projects/forty-cdk/number-input/src/number-input-decrement.ts","../../../projects/forty-cdk/number-input/src/number-input-host-directive.ts","../../../projects/forty-cdk/number-input/src/forty-cdk-number-input.ts"],"sourcesContent":["/** Group / decimal separators for a locale, as derived from `Intl`. */\nexport interface LocaleSeparators {\n  /** The locale grouping (thousands) separator. */\n  readonly group: string;\n  /** The locale decimal separator. */\n  readonly decimal: string;\n  /**\n   * The integer grouping sizes for this locale, primary (rightmost) group\n   * first. Most locales are uniform `[3]` (`1,234,567`); Indic locales use lakh\n   * / crore grouping `[3, 2]` (`12,34,567`). Used to validate group-separator\n   * placement against the locale's real grouping instead of assuming 3.\n   */\n  readonly groupSizes: readonly number[];\n}\n\n/** Escapes a string for safe interpolation into a `RegExp` source. */\nfunction escapeRegExp(value: string): string {\n  return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/**\n * The space variants a locale may emit as a group separator, or that a user\n * may type in their place: ASCII space (U+0020), no-break space (U+00A0),\n * narrow no-break space (U+202F, fr-FR), and thin space (U+2009). Normalized to\n * the locale's canonical group separator before grouping validation so a\n * user-typed ASCII space still parses against an NBSP-emitting locale.\n */\nconst SPACE_GROUP_VARIANTS = /[    ]/g;\n\n/**\n * Matches a group-separator space variant only when it sits between two digits.\n * `Intl` emits a space variant both between digit groups (a real group\n * separator) and between the number and a trailing literal (the `%` / unit /\n * currency symbol in fr-style locales); normalizing only the digit-flanked\n * spaces leaves that literal-separating space for the noise strip instead of\n * promoting it to a group separator that fails grouping validation.\n */\nconst DIGIT_GROUPED_SPACE = new RegExp(`(?<=\\\\d)${SPACE_GROUP_VARIANTS.source}(?=\\\\d)`, 'g');\n\n/** Whether `separator` is one of the whitespace group-separator variants. */\nfunction isSpaceSeparator(separator: string): boolean {\n  return /^[    ]$/.test(separator);\n}\n\n/**\n * In the lenient (live-typing) path, promote a lone digit-flanked `'.'` to the\n * locale's decimal separator in a non-dot-decimal locale. The numpad decimal\n * key emits `'.'` regardless of keyboard layout or locale, so a user typing\n * `1.5` on the numpad in `de-DE` / `fr-FR` means a decimal, not a group\n * separator or noise; without this the `'.'` is stripped and `1.5` commits as\n * `15`. The one interpretation preserved is a genuine group separator in a\n * locale that groups with `'.'` (`de-DE`): a trailing run of exactly the\n * primary group size keeps its group meaning (`1.234` → `1234`), while any\n * other run length (`1.5`, `12.34`) is treated as the user's decimal. Runs only\n * for a single `'.'`; multiple dots are left to grouping / the strict gate.\n */\nfunction promoteLenientDecimalDot(input: string, separators: LocaleSeparators): string {\n  const { group, decimal, groupSizes } = separators;\n  if (decimal === '.') {\n    return input;\n  }\n  const dots = input.match(/\\./g);\n  if ((dots?.length ?? 0) !== 1 || !/(?<=\\d)\\.(?=\\d)/.test(input)) {\n    return input;\n  }\n  if (group === '.') {\n    const trailing = input.slice(input.indexOf('.') + 1).match(/^\\d+/)?.[0] ?? '';\n    if (trailing.length === (groupSizes[0] ?? 3)) {\n      return input;\n    }\n  }\n  return input.replace('.', decimal);\n}\n\n/**\n * Minus-sign variants a locale may emit for a negative, or that a user may type\n * in their place, normalized to ASCII `-` before the numeric gates: U+2212 MINUS\n * SIGN (`Intl` formats negatives with it in sv / fi / nb / lt and others) and\n * U+FF0D FULLWIDTH HYPHEN-MINUS. Without this normalization the sign would be\n * stripped as noise and a library-formatted negative would silently flip\n * positive.\n */\nconst MINUS_VARIANTS = /[−－]/g;\n\n/**\n * Group / decimal separators (and integer grouping sizes) for a given locale,\n * derived once via `Intl`. Falls back to `,` group / `.` decimal / `[3]` sizes\n * for an unknown or undefined locale.\n */\nexport function localeSeparators(locale: string | undefined): LocaleSeparators {\n  let group = ',';\n  let decimal = '.';\n  const integerLengths: number[] = [];\n  for (const part of new Intl.NumberFormat(locale).formatToParts(1234567.1)) {\n    if (part.type === 'group') {\n      group = part.value;\n    } else if (part.type === 'decimal') {\n      decimal = part.value;\n    } else if (part.type === 'integer') {\n      integerLengths.push(part.value.length);\n    }\n  }\n  return { group, decimal, groupSizes: deriveGroupSizes(integerLengths) };\n}\n\n/**\n * Reduce the integer-part widths of a grouped reference number (left-to-right)\n * to the locale's grouping template, primary (rightmost) group first. The\n * most-significant group is dropped — it is a partial that carries no size\n * rule. Returns `[3]` when the reference exposes no grouping.\n */\nfunction deriveGroupSizes(integerLengths: readonly number[]): readonly number[] {\n  const rightToLeft = integerLengths.slice(1).reverse();\n  const primary = rightToLeft[0] ?? 3;\n  const secondary = rightToLeft[1] ?? primary;\n  return primary === secondary ? [primary] : [primary, secondary];\n}\n\n/**\n * Parse locale-formatted numeric `text` into a number, or `null` when it is not\n * a valid plain decimal for the given `separators`. The locale minus-sign\n * variants (U+2212 / U+FF0D) are normalized to ASCII `-`, the locale decimal\n * separator is normalized to `.`, group separators are validated for placement\n * then stripped, and the canonical form is validated against a strict numeric\n * regex (optional sign + digits + a single optional decimal) before `Number()`.\n *\n * Grouping placement is validated against the locale's real grouping sizes\n * (`separators.groupSizes`): a group separator may appear only in the integer\n * part and only at legal boundaries, so a correctly grouped `\"1,234,567\"` (or\n * the Indic `\"12,34,567\"`) parses while a misgrouped `\"1,2,3\"` is rejected\n * (`null`) rather than silently collapsing to `123`.\n *\n * Pass `{ lenientGrouping: true }` to skip that placement check — the group\n * separators are stripped and any cleanly-parsing digit sequence is accepted.\n * This is the mid-edit mode: while the user types inside a formatted value the\n * intermediate grouping is almost never well-formed (`\"1,234\"` → `\"1,2345\"`),\n * and the display is reformatted from the committed value on blur anyway, so\n * enforcing grouping during typing would silently discard valid edits. In this\n * mode a lone digit-flanked `'.'` in a non-dot-decimal locale (`de-DE`,\n * `fr-FR`, …) is also promoted to the locale decimal separator — the numpad\n * decimal key emits `'.'` regardless of layout, so `\"1.5\"` parses as `1.5`\n * instead of the `15` it would collapse to once the `'.'` is stripped. A `'.'`\n * whose trailing digit run is exactly the locale's primary group size keeps its\n * group meaning (`\"1.234\"` → `1234` in `de-DE`); the strict path is untouched.\n *\n * For locales that group with a space (the NBSP / NNBSP fr-style locales), a\n * whitespace-space variant — including the plain ASCII space a user is most\n * likely to type — is normalized to the locale's canonical separator only when\n * it sits between two digits, so a correctly-spaced number parses regardless of\n * which space was typed while the space `Intl` places before a trailing literal\n * (`%` / unit / currency) is left for the noise strip rather than promoted to a\n * group separator that would fail grouping validation.\n *\n * Exponent notation is intentionally rejected — `2e3` is not valid spinbutton\n * input and silently parsing it to `2000` is surprising. So are malformed forms\n * such as multiple signs (`+-5`) or multiple decimals (`1.2.3`); all map to\n * `null`, the same outcome callers already treat as \"keep the last valid value\".\n */\nexport function parseLocaleNumber(\n  text: string,\n  separators: LocaleSeparators,\n  options?: { readonly lenientGrouping?: boolean },\n): number | null {\n  const { group, decimal, groupSizes } = separators;\n  // When the locale groups with a space (NBSP / NNBSP in fr-style locales),\n  // normalize a whitespace-space variant to the canonical separator only when it\n  // sits between two digits, so a group-separator space still parses regardless\n  // of which variant was typed while a space before a trailing literal is left\n  // for the noise strip instead of being promoted to a group separator.\n  const spaceNormalized = isSpaceSeparator(group) ? text.replace(DIGIT_GROUPED_SPACE, group) : text;\n  const minusNormalized = spaceNormalized.replace(MINUS_VARIANTS, '-');\n  const input = options?.lenientGrouping\n    ? promoteLenientDecimalDot(minusNormalized, separators)\n    : minusNormalized;\n  // Strip currency symbols, percent signs, and any other non-numeric noise\n  // the locale may include, leaving digits, sign, the locale group/decimal\n  // separators, and the exponent letters — the strict gates below reject\n  // exponent notation, so stripping `eE` here would let `2e3` slip through\n  // as `23` instead of being seen (and refused) as malformed.\n  const noise = new RegExp(`[^\\\\d${escapeRegExp(group)}${escapeRegExp(decimal)}eE+-]`, 'g');\n  const cleaned = input.trim().replace(noise, '');\n  if (\n    !options?.lenientGrouping &&\n    cleaned.includes(group) &&\n    !groupingIsValid(cleaned, group, decimal, groupSizes)\n  ) {\n    return null;\n  }\n  let normalized = cleaned.split(group).join('');\n  if (decimal !== '.') {\n    normalized = normalized.split(decimal).join('.');\n  }\n  if (!/^[+-]?\\d+(?:\\.\\d+)?$/.test(normalized)) {\n    return null;\n  }\n  const parsed = Number(normalized);\n  return Number.isFinite(parsed) ? parsed : null;\n}\n\n/**\n * Validates that every group separator in `cleaned` sits at a legal boundary\n * within the integer part (none in the fractional part), against the locale's\n * grouping template `groupSizes` (primary group first). The rightmost group\n * must be exactly the primary size, interior groups exactly the secondary size,\n * and the leading group between 1 and the secondary size — so uniform `[3]`\n * accepts `1,234,567` and Indic `[3, 2]` accepts `12,34,567`, while `1,2,3` or\n * a separator stranded in the fractional part is rejected. Permits a leading\n * sign.\n */\nfunction groupingIsValid(\n  cleaned: string,\n  group: string,\n  decimal: string,\n  groupSizes: readonly number[],\n): boolean {\n  const integerPart = cleaned.split(decimal)[0] ?? '';\n  const digitsWithGroups = /^[+-]/.test(integerPart) ? integerPart.slice(1) : integerPart;\n  const groups = digitsWithGroups.split(group);\n  if (groups.length < 2 || groups.some((part) => !/^\\d+$/.test(part))) {\n    return false;\n  }\n  const primary = groupSizes[0] ?? 3;\n  const secondary = groupSizes[1] ?? primary;\n  const last = groups.length - 1;\n  return groups.every((part, index) => {\n    if (index === last) {\n      return part.length === primary;\n    }\n    if (index === 0) {\n      return part.length <= secondary;\n    }\n    return part.length === secondary;\n  });\n}\n","import { inject, InjectionToken, type Signal } from '@angular/core';\n\nimport { orphanContextError } from 'forty-cdk/core';\n\n/**\n * The coordination surface a `[forNumberInput]` exposes to its siblings. The\n * auxiliary `[forNumberInputIncrement]` / `[forNumberInputDecrement]` buttons\n * read it (through the group) to step the value, to mark the control touched,\n * and to reflect their disabled state at the min / max bound.\n */\nexport interface ForNumberInputContext {\n  /** Current numeric value, or `null` while the field is empty. */\n  readonly value: Signal<number | null>;\n  /**\n   * The spinbutton's effective disabled — its own `disabled` input OR'd with a\n   * surrounding disabled `[forFieldset]`. The increment / decrement buttons read\n   * this so a disabled fieldset also disables stepping.\n   */\n  readonly effectiveDisabled: Signal<boolean>;\n  /** Whether the spinbutton is read-only. */\n  readonly readonly: Signal<boolean>;\n  /** `true` when the value sits at (or below) `min`. */\n  readonly atMin: Signal<boolean>;\n  /** `true` when the value sits at (or above) `max`. */\n  readonly atMax: Signal<boolean>;\n  /**\n   * Increase the value by `by` (defaults to `step`), snapping to the\n   * `min ?? 0` ± k·`step` grid and clamping to `[min, max]`. No-op while\n   * disabled or read-only.\n   */\n  increment(by?: number): void;\n  /**\n   * Decrease the value by `by` (defaults to `step`), snapping to the\n   * `min ?? 0` ± k·`step` grid and clamping to `[min, max]`. No-op while\n   * disabled or read-only.\n   */\n  decrement(by?: number): void;\n  /**\n   * Flip the `touched` model and emit the `touch` output. Called by the\n   * increment / decrement buttons on click: they are `tabindex=\"-1\"`, so a\n   * pointer-only user never focuses the spinbutton and its `(blur)` handler\n   * never runs. Fires on every touch-producing interaction, so a gesture that\n   * blurs the spinbutton and then clicks a button emits `touch` twice; it is\n   * never once-guarded.\n   */\n  markTouched(): void;\n}\n\n/**\n * The single coordination surface `[forNumberInputGroup]` exposes. A\n * `[forNumberInput]` nested under the group registers itself, and the\n * auxiliary `[forNumberInputIncrement]` / `[forNumberInputDecrement]` buttons\n * read the registered spinbutton through `field()` to step the value and\n * reflect their min / max disabled state. Coordination flows through this\n * registry — not the DOM — because the focusable spinbutton lives on a void\n * `<input>` that can't contain the sibling buttons as descendants.\n */\nexport interface ForNumberInputGroupContext {\n  /** The registered spinbutton, or `null` while none is mounted. */\n  readonly field: Signal<ForNumberInputContext | null>;\n  /** Register the spinbutton the group coordinates. */\n  register(field: ForNumberInputContext): void;\n  /** Remove a previously registered spinbutton. */\n  unregister(field: ForNumberInputContext): void;\n}\n\n/**\n * Injection token for the `[forNumberInputGroup]` coordination surface. The\n * spinbutton joins it via `register`; the buttons read the registered field\n * through `field()`.\n */\nexport const FOR_NUMBER_INPUT_GROUP = new InjectionToken<ForNumberInputGroupContext>(\n  'FOR_NUMBER_INPUT_GROUP',\n);\n\n/**\n * Resolve the surrounding `[forNumberInputGroup]`, or throw a descriptive\n * error. The increment / decrement buttons are only meaningful inside a\n * `[forNumberInputGroup]` that wraps a `[forNumberInput]`.\n */\nexport function injectNumberInputGroup(piece: string): ForNumberInputGroupContext {\n  const group = inject(FOR_NUMBER_INPUT_GROUP, { optional: true });\n  if (!group) {\n    throw orphanContextError({\n      code: 'FORCDK-NUMBER-INPUT-001',\n      piece,\n      root: '[forNumberInputGroup] that wraps a [forNumberInput]',\n      token: 'FOR_NUMBER_INPUT_GROUP',\n    });\n  }\n  return group;\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\n\n/**\n * Defaults inherited by descendant `[forNumberInput]` controls in the\n * surrounding injector scope. Configure with `provideForNumberInputDefaults`\n * either at the application root or in any component's `providers` array;\n * partial overrides merge with the parent scope.\n */\nexport interface ForNumberInputDefaults {\n  /**\n   * Multiplier applied to `step` for `PageUp` / `PageDown`. Defaults to `10`,\n   * so a step of `1` pages by `10`.\n   */\n  stepMultiplier: number;\n}\n\n/**\n * Library fallback for number-input defaults, read at the root injector when no\n * consumer has called `provideForNumberInputDefaults`. Exported for the shared\n * defaults contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_NUMBER_INPUT_FALLBACK_DEFAULTS: ForNumberInputDefaults = {\n  stepMultiplier: 10,\n};\n\nconst { token, provideDefaults } = createDefaults<ForNumberInputDefaults>(\n  'FOR_NUMBER_INPUT_DEFAULTS',\n  FOR_NUMBER_INPUT_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved number-input defaults for the current scope. */\nexport const FOR_NUMBER_INPUT_DEFAULTS = token;\n\n/**\n * Configures forty-cdk number-input defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForNumberInputDefaults(\n  defaults: Partial<ForNumberInputDefaults> = {},\n): Provider[] {\n  return provideDefaults(defaults);\n}\n","import { computed, DestroyRef, Directive, ElementRef, inject, input, model } from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport {\n  reflectDisabled,\n  FormUiControlBase,\n  mirrorUnfocusedValue,\n  injectHiddenInput,\n  clamp,\n  decimalPlaces,\n  roundToDecimals,\n  stepOnGrid,\n} from 'forty-cdk/core';\nimport { localeSeparators, parseLocaleNumber } from './locale-number';\nimport { FOR_NUMBER_INPUT_GROUP, type ForNumberInputContext } from './number-input-context';\nimport { FOR_NUMBER_INPUT_DEFAULTS } from './number-input-defaults';\n\n/**\n * Headless implementation of the\n * [WAI-ARIA Spinbutton pattern](https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/)\n * and Angular's `FormValueControl<number | null>` from `@angular/forms/signals`,\n * so it auto-wires with `[formField]` and auto-associates inside a `[forField]`\n * (label / description / error) with no extra markup.\n *\n * Apply on a `<input type=\"text\" inputmode=\"numeric\">` — not `type=\"number\"`,\n * whose native UI is unstylable and locale-quirky. The directive owns parsing,\n * clamping to `[min, max]`, the full Spinbutton keyboard map, and optional\n * `Intl.NumberFormat`-based display formatting. The focusable spinbutton input\n * itself is the `FormValueControl`; the `[forNumberInputIncrement]` /\n * `[forNumberInputDecrement]` buttons are auxiliary pointer affordances.\n *\n * Because the displayed (formatted) text can differ from the submitted value,\n * the directive mounts a hidden `<input>` carrying the raw number for native\n * form submission when `name` is set — unlike `ForInput`, whose\n * visible element is itself the submittable field. The visible spinbutton's own\n * `name` attribute is suppressed (`[attr.name]=\"null\"`), so a consumer-set\n * static `name` feeds only the hidden input and never double-submits its\n * formatted display text alongside the raw value.\n *\n * The host gets `data-empty` (while the value is `null`), `data-disabled`, and\n * `data-readonly` for CSS hooks, plus `data-touched` / `data-dirty` /\n * `data-pending` / `data-invalid` from the shared form-control reflection.\n *\n * @example\n * ```html\n * <button forNumberInputDecrement aria-label=\"Decrease\">−</button>\n * <input forNumberInput [(value)]=\"qty\" [min]=\"0\" [max]=\"10\" [step]=\"1\" />\n * <button forNumberInputIncrement aria-label=\"Increase\">+</button>\n *\n * <!-- With Signal Forms + Field (auto-wired): -->\n * <div forField>\n *   <label forLabel>Quantity</label>\n *   <input forNumberInput [formField]=\"order.qty\" [min]=\"1\" />\n * </div>\n * ```\n */\n@Directive({\n  selector: '[forNumberInput]',\n  exportAs: 'forNumberInput',\n  host: {\n    role: 'spinbutton',\n    '[attr.name]': 'null',\n    '[attr.inputmode]': 'inputmode()',\n    '[attr.aria-valuenow]': 'value() ?? null',\n    '[attr.aria-valuemin]': 'min() ?? null',\n    '[attr.aria-valuemax]': 'max() ?? null',\n    '[attr.aria-valuetext]': 'valueText()',\n    '[attr.aria-readonly]': 'readonly() ? \"true\" : null',\n    '[attr.aria-required]': 'required() ? \"true\" : null',\n    '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n    '[attr.aria-busy]': 'pending() ? \"true\" : null',\n    '[attr.readonly]': 'readonly() ? \"\" : null',\n    '[attr.data-empty]': 'value() === null ? \"\" : null',\n    '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n    '[attr.data-readonly]': 'readonly() ? \"\" : null',\n    '(input)': 'onInput($event)',\n    '(keydown)': 'onKeyDown($event)',\n    '(blur)': 'commit(); markTouched()',\n  },\n})\nexport class ForNumberInput\n  extends FormUiControlBase\n  implements FormValueControl<number | null>, ForNumberInputContext\n{\n  readonly #host = inject<ElementRef<HTMLInputElement>>(ElementRef);\n  readonly #defaults = inject(FOR_NUMBER_INPUT_DEFAULTS);\n\n  /**\n   * Two-way bindable numeric value. Required by `FormValueControl<number | null>`.\n   * `null` represents the empty input (reflected as `data-empty`); a parsed\n   * number otherwise.\n   */\n  readonly value = model<number | null>(null);\n\n  /**\n   * Minimum value. Typed `number | undefined` to satisfy `FormUiControl.min`\n   * (Signal Forms passes `undefined` when no `min` validator is bound). When\n   * unset there is no lower bound.\n   */\n  readonly min = input<number | undefined>(undefined);\n\n  /**\n   * Maximum value. Typed `number | undefined` to satisfy `FormUiControl.max`.\n   * When unset there is no upper bound.\n   */\n  readonly max = input<number | undefined>(undefined);\n\n  /**\n   * Increment applied by ArrowUp / ArrowDown and the inc/dec buttons. Values\n   * snap to the `min ?? 0` ± k·`step` grid: a value already on the grid moves a\n   * full step, an off-grid value lands on the adjacent grid point.\n   */\n  readonly step = input(1);\n\n  /**\n   * Multiplier applied to `step` for `PageUp` / `PageDown`. Defaults to the\n   * value from `provideForNumberInputDefaults` for the surrounding scope (10).\n   * It applies only from a value already on the `min ?? 0` ± k·`step` grid —\n   * from an off-grid value the key lands on the adjacent grid point instead,\n   * matching the platform `stepUp()` / `stepDown()` rule.\n   */\n  readonly stepMultiplier = input(this.#defaults.stepMultiplier);\n\n  /**\n   * `Intl.NumberFormat` options for the displayed text and `aria-valuetext`.\n   * When `null` (default) the raw number is shown and no `aria-valuetext` is\n   * emitted (the numeric `aria-valuenow` already conveys the value).\n   *\n   * With `style: 'percent'` the model value stays the fraction Intl formats\n   * from (`0.5` displays as `\"50%\"`); parsing divides typed input back by 100 so\n   * the round-trip is loss-free (editing `\"50%\"` to `\"51%\"` yields `0.51`, not\n   * `51`). `min` / `max` are therefore also expressed in that fractional scale.\n   */\n  readonly formatOptions = input<Intl.NumberFormatOptions | null>(null);\n\n  /** BCP 47 locale for parsing and formatting. Defaults to the runtime locale. */\n  readonly locale = input<string | null>(null);\n\n  readonly #formatter = computed(() => {\n    const options = this.formatOptions();\n    return options ? new Intl.NumberFormat(this.locale() ?? undefined, options) : null;\n  });\n\n  readonly #separators = computed(() => localeSeparators(this.locale() ?? undefined));\n\n  readonly #displayText = computed(() => {\n    const current = this.value();\n    if (current === null) {\n      return '';\n    }\n    const formatter = this.#formatter();\n    return formatter ? formatter.format(current) : String(current);\n  });\n\n  /**\n   * Human-readable value for `aria-valuetext`. Only emitted when\n   * `formatOptions` is set (the formatted text differs from `aria-valuenow`);\n   * `null` otherwise so screen readers fall back to the numeric value.\n   */\n  readonly valueText = computed(() => {\n    const current = this.value();\n    if (current === null) {\n      return null;\n    }\n    const formatter = this.#formatter();\n    return formatter ? formatter.format(current) : null;\n  });\n\n  /**\n   * Derived keyboard mode: `decimal` when fractional values are possible, else\n   * `numeric`. Reads the formatter's *resolved* options so currency / percent\n   * styles (which imply fraction digits the consumer never spelled out, e.g. 2\n   * for most currencies) report their effective `maximumFractionDigits` rather\n   * than the raw, un-resolved options object where those keys are absent.\n   */\n  readonly inputmode = computed<'numeric' | 'decimal'>(() => {\n    const resolved = this.#formatter()?.resolvedOptions();\n    const fractional =\n      !Number.isInteger(this.step()) ||\n      !this.#isWholeBound(this.min()) ||\n      !this.#isWholeBound(this.max()) ||\n      (resolved?.maximumFractionDigits ?? 0) > 0 ||\n      (resolved?.minimumFractionDigits ?? 0) > 0;\n    return fractional ? 'decimal' : 'numeric';\n  });\n\n  /** `true` when the value sits at (or below) `min`. */\n  readonly atMin = computed(() => {\n    const min = this.min();\n    const current = this.value();\n    return min !== undefined && current !== null && current <= min;\n  });\n\n  /** `true` when the value sits at (or above) `max`. */\n  readonly atMax = computed(() => {\n    const max = this.max();\n    const current = this.value();\n    return max !== undefined && current !== null && current >= max;\n  });\n\n  constructor() {\n    super();\n    reflectDisabled(this.effectiveDisabled);\n    injectHiddenInput({\n      name: this.name,\n      values: computed(() => {\n        const current = this.value();\n        return current === null ? [] : [String(current)];\n      }),\n      disabled: this.effectiveDisabled,\n    });\n\n    // Register with an optional surrounding [forNumberInputGroup] so its\n    // stepper buttons can drive this spinbutton. A standalone input (no\n    // buttons) has no group and skips this entirely.\n    const group = inject(FOR_NUMBER_INPUT_GROUP, { optional: true });\n    if (group) {\n      group.register(this);\n      inject(DestroyRef).onDestroy(() => group.unregister(this));\n    }\n\n    // Mirror external writes (consumer `[(value)]` / `[formField]`, or the\n    // post-commit reformat) into the native element while it isn't focused. Live\n    // typing flows in through the `(input)` listener, and step / commit write the\n    // display imperatively (the element is focused then, so this guard skips it).\n    mirrorUnfocusedValue(() => this.#host.nativeElement, this.#displayText);\n  }\n\n  /**\n   * Increase the value by `by` (defaults to `step`). From empty, lands on the\n   * clamped baseline (`min ?? 0`). Stepping follows the shared grid-snap rule:\n   * a value already on the `min ?? 0` ± k·`step` grid advances a full `by` (so a\n   * caller-supplied `by` finer than `step` — `increment(0.25)` with `step=0.1` —\n   * keeps its own precision), while an off-grid value lands on the next grid\n   * point above it (ArrowUp from `0.55` with `step=1` gives `1`, not `1.55`).\n   * Clamps to `[min, max]`.\n   */\n  increment(by: number = this.step()): void {\n    if (this.effectiveDisabled() || this.readonly()) {\n      return;\n    }\n    this.#step(1, by);\n  }\n\n  /**\n   * Decrease the value by `by` (defaults to `step`). From empty, lands on the\n   * clamped baseline (`min ?? 0`). Follows the same grid-snap rule as\n   * {@link increment}, travelling downward. Clamps to `[min, max]`.\n   */\n  decrement(by: number = this.step()): void {\n    if (this.effectiveDisabled() || this.readonly()) {\n      return;\n    }\n    this.#step(-1, by);\n  }\n\n  /**\n   * Widened to `public` so `ForNumberInputContext` consumers — the\n   * `[forNumberInputIncrement]` / `[forNumberInputDecrement]` buttons — can mark\n   * the control touched on a pointer commit; the behaviour is the base's. Fires\n   * on every touch-producing interaction (a stepper click, and focus leaving the\n   * spinbutton), so a gesture that does both emits `touch` twice. `touched` /\n   * `data-touched` / `(touchedChange)` only change on the first, and Signal\n   * Forms' `markAsTouched()` is idempotent.\n   */\n  override markTouched(): void {\n    super.markTouched();\n  }\n\n  /** Live-parse the typed text into the value (unclamped — clamping waits for commit). */\n  protected onInput(event: Event): void {\n    if (this.effectiveDisabled() || this.readonly()) {\n      return;\n    }\n    const raw = (event.target as HTMLInputElement).value;\n    if (raw.trim() === '') {\n      this.value.set(null);\n      return;\n    }\n    const parsed = parseLocaleNumber(raw, this.#separators(), { lenientGrouping: true });\n    // Ignore unparseable input: keep the last valid value, leave the user's\n    // in-progress text untouched; commit() reformats from the value on blur.\n    if (parsed !== null) {\n      this.value.set(this.#toModelValue(parsed));\n    }\n  }\n\n  protected onKeyDown(event: KeyboardEvent): void {\n    if (this.effectiveDisabled() || this.readonly()) {\n      return;\n    }\n    switch (event.key) {\n      case 'ArrowUp':\n        event.preventDefault();\n        this.increment();\n        return;\n      case 'ArrowDown':\n        event.preventDefault();\n        this.decrement();\n        return;\n      case 'PageUp':\n        event.preventDefault();\n        this.increment(this.#pageStep());\n        return;\n      case 'PageDown':\n        event.preventDefault();\n        this.decrement(this.#pageStep());\n        return;\n      case 'Home': {\n        const min = this.min();\n        if (min !== undefined) {\n          event.preventDefault();\n          this.#applyValue(min);\n        }\n        return;\n      }\n      case 'End': {\n        const max = this.max();\n        if (max !== undefined) {\n          event.preventDefault();\n          this.#applyValue(max);\n        }\n        return;\n      }\n      case 'Enter':\n        this.commit();\n        return;\n      default:\n        return;\n    }\n  }\n\n  /** Clamp the live value to `[min, max]` and reformat the displayed text. */\n  protected commit(): void {\n    const current = this.value();\n    if (current !== null) {\n      const clamped = this.#clamp(current);\n      if (clamped !== current) {\n        this.value.set(clamped);\n      }\n    }\n    this.#writeDisplay();\n  }\n\n  #step(direction: 1 | -1, by: number): void {\n    const current = this.value();\n    this.#applyValue(\n      current === null\n        ? this.#baseline()\n        : stepOnGrid(current, { step: this.step(), direction, origin: this.min() ?? 0, by }),\n    );\n  }\n\n  #pageStep(): number {\n    return roundToDecimals(this.step() * this.stepMultiplier(), decimalPlaces(this.step()));\n  }\n\n  #applyValue(raw: number): void {\n    this.value.set(this.#clamp(raw));\n    this.#writeDisplay();\n  }\n\n  #writeDisplay(): void {\n    const el = this.#host.nativeElement;\n    const text = this.#displayText();\n    if (el.value !== text) {\n      el.value = text;\n    }\n  }\n\n  #toModelValue(parsed: number): number {\n    return this.#formatter()?.resolvedOptions().style === 'percent' ? parsed / 100 : parsed;\n  }\n\n  #baseline(): number {\n    return this.#clamp(this.min() ?? 0);\n  }\n\n  #clamp(n: number): number {\n    return clamp(n, this.min() ?? -Infinity, this.max() ?? Infinity);\n  }\n\n  #isWholeBound(bound: number | undefined): boolean {\n    return bound === undefined || Number.isInteger(bound);\n  }\n}\n","import { Directive, type Signal } from '@angular/core';\nimport { createSingleSlot } from 'forty-cdk/core';\n\nimport {\n  FOR_NUMBER_INPUT_GROUP,\n  type ForNumberInputContext,\n  type ForNumberInputGroupContext,\n} from './number-input-context';\n\n/**\n * Optional coordination wrapper for a `[forNumberInput]` and its\n * `[forNumberInputIncrement]` / `[forNumberInputDecrement]` buttons. It renders\n * nothing and imposes no role or layout — its only job is to bridge the buttons\n * to the spinbutton.\n *\n * It is required _only_ when you use the stepper buttons: a `<input>` is a void\n * element and can't contain the buttons as DOM descendants, so the buttons\n * can't inject the spinbutton's context directly. The group registers the\n * `[forNumberInput]` beneath it and exposes it via `field()`, which the buttons\n * read. A standalone `[forNumberInput]` (keyboard / `[(value)]` only) needs no\n * group.\n *\n * @example\n * ```html\n * <div forNumberInputGroup>\n *   <button forNumberInputDecrement aria-label=\"Decrease\">−</button>\n *   <input forNumberInput [(value)]=\"qty\" [min]=\"0\" [max]=\"10\" />\n *   <button forNumberInputIncrement aria-label=\"Increase\">+</button>\n * </div>\n * ```\n */\n@Directive({\n  selector: '[forNumberInputGroup]',\n  exportAs: 'forNumberInputGroup',\n  providers: [{ provide: FOR_NUMBER_INPUT_GROUP, useExisting: ForNumberInputGroup }],\n})\nexport class ForNumberInputGroup implements ForNumberInputGroupContext {\n  readonly #slot = createSingleSlot<ForNumberInputContext>({\n    primitive: 'number-input',\n    owner: '[forNumberInputGroup]',\n    claimant: '[forNumberInput]',\n  });\n\n  /** The registered spinbutton field, or `null` while none is mounted. */\n  readonly field: Signal<ForNumberInputContext | null> = this.#slot.value;\n\n  /** Register the spinbutton field the group coordinates. */\n  register(field: ForNumberInputContext): void {\n    this.#slot.register(field);\n  }\n\n  /** Remove a previously registered spinbutton field. */\n  unregister(field: ForNumberInputContext): void {\n    this.#slot.unregister(field);\n  }\n}\n","import { computed, Directive, input } from '@angular/core';\n\nimport { hostButtonType, reflectDisabled, hostAriaLabel } from 'forty-cdk/core';\nimport { injectNumberInputGroup } from './number-input-context';\n\n/**\n * Auxiliary \"step up\" button for a `[forNumberInput]`. Apply on a `<button>`\n * (the directive forces `type=\"button\"` to prevent form submission). It stays\n * `tabindex=\"-1\"` — focus belongs on the spinbutton input, which carries the\n * full keyboard map — and reflects `[disabled]` + `data-disabled` when the\n * value is at `max` (or the control is disabled / read-only). A click also marks\n * the spinbutton touched, so a pointer-only user still engages touched-gated\n * error display.\n *\n * Takes the uniform `ariaLabel` input so consumers can name it (e.g.\n * \"Increase quantity\").\n *\n * @example\n * ```html\n * <input forNumberInput [(value)]=\"qty\" [max]=\"10\" />\n * <button forNumberInputIncrement aria-label=\"Increase\">+</button>\n * ```\n */\n@Directive({\n  selector: '[forNumberInputIncrement]',\n  exportAs: 'forNumberInputIncrement',\n  host: {\n    '[attr.type]': 'buttonType()',\n    tabindex: '-1',\n    '[attr.aria-label]': 'resolvedAriaLabel()',\n    '[attr.data-disabled]': 'isDisabled() ? \"\" : null',\n    '(click)': 'step()',\n  },\n})\nexport class ForNumberInputIncrement {\n  protected readonly buttonType = hostButtonType();\n\n  protected readonly group = injectNumberInputGroup('ForNumberInputIncrement');\n\n  /** Accessible name for the button. Emits `aria-label` only when truthy. */\n  readonly ariaLabel = input<string | null>(null);\n\n  protected readonly resolvedAriaLabel = hostAriaLabel(() => this.ariaLabel() || null);\n\n  protected readonly isDisabled = computed(() => {\n    const field = this.group.field();\n    return !field || field.effectiveDisabled() || field.readonly() || field.atMax();\n  });\n\n  constructor() {\n    reflectDisabled(this.isDisabled);\n  }\n\n  protected step(): void {\n    const field = this.group.field();\n    if (!field) {\n      return;\n    }\n    field.increment();\n    field.markTouched();\n  }\n}\n","import { computed, Directive, input } from '@angular/core';\n\nimport { hostButtonType, reflectDisabled, hostAriaLabel } from 'forty-cdk/core';\nimport { injectNumberInputGroup } from './number-input-context';\n\n/**\n * Auxiliary \"step down\" button for a `[forNumberInput]`. Apply on a `<button>`\n * (the directive forces `type=\"button\"` to prevent form submission). It stays\n * `tabindex=\"-1\"` — focus belongs on the spinbutton input, which carries the\n * full keyboard map — and reflects `[disabled]` + `data-disabled` when the\n * value is at `min` (or the control is disabled / read-only). A click also marks\n * the spinbutton touched, so a pointer-only user still engages touched-gated\n * error display.\n *\n * Takes the uniform `ariaLabel` input so consumers can name it (e.g.\n * \"Decrease quantity\").\n *\n * @example\n * ```html\n * <button forNumberInputDecrement aria-label=\"Decrease\">−</button>\n * <input forNumberInput [(value)]=\"qty\" [min]=\"0\" />\n * ```\n */\n@Directive({\n  selector: '[forNumberInputDecrement]',\n  exportAs: 'forNumberInputDecrement',\n  host: {\n    '[attr.type]': 'buttonType()',\n    tabindex: '-1',\n    '[attr.aria-label]': 'resolvedAriaLabel()',\n    '[attr.data-disabled]': 'isDisabled() ? \"\" : null',\n    '(click)': 'step()',\n  },\n})\nexport class ForNumberInputDecrement {\n  protected readonly buttonType = hostButtonType();\n\n  protected readonly group = injectNumberInputGroup('ForNumberInputDecrement');\n\n  /** Accessible name for the button. Emits `aria-label` only when truthy. */\n  readonly ariaLabel = input<string | null>(null);\n\n  protected readonly resolvedAriaLabel = hostAriaLabel(() => this.ariaLabel() || null);\n\n  protected readonly isDisabled = computed(() => {\n    const field = this.group.field();\n    return !field || field.effectiveDisabled() || field.readonly() || field.atMin();\n  });\n\n  constructor() {\n    reflectDisabled(this.isDisabled);\n  }\n\n  protected step(): void {\n    const field = this.group.field();\n    if (!field) {\n      return;\n    }\n    field.decrement();\n    field.markTouched();\n  }\n}\n","/**\n * Exact public names of every `ForNumberInput` input, its models included. Spread it into the\n * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the\n * primitive's full surface — the Signal Forms members `[formField]` binds among them —\n * without hand-maintaining the list. Always spread into an inline object literal as shown\n * below: the literal is what keeps the entry statically analyzable for consumers compiling\n * against the published package. An anti-drift spec fails when this list no longer matches\n * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported\n * wrapping patterns.\n *\n * @example\n * ```ts\n * @Component({\n *   selector: 'input[myNumberInput]',\n *   template: '',\n *   hostDirectives: [\n *     {\n *       directive: ForNumberInput,\n *       inputs: [...FOR_NUMBER_INPUT_HOST_DIRECTIVE_INPUTS],\n *       outputs: [...FOR_NUMBER_INPUT_HOST_DIRECTIVE_OUTPUTS],\n *     },\n *   ],\n * })\n * export class MyNumberInput {}\n * ```\n */\nexport const FOR_NUMBER_INPUT_HOST_DIRECTIVE_INPUTS = [\n  'value',\n  'dirty',\n  'disabled',\n  'errors',\n  'formatOptions',\n  'invalid',\n  'locale',\n  'max',\n  'min',\n  'name',\n  'pending',\n  'readonly',\n  'required',\n  'step',\n  'stepMultiplier',\n  'touched',\n] as const;\n\n/**\n * Exact public names of every `ForNumberInput` output, the Signal Forms `touch` output\n * included. Spread it into the `outputs` array of the same `hostDirectives` entry as\n * {@link FOR_NUMBER_INPUT_HOST_DIRECTIVE_INPUTS}.\n */\nexport const FOR_NUMBER_INPUT_HOST_DIRECTIVE_OUTPUTS = [\n  'valueChange',\n  'touchedChange',\n  'touch',\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAeA;AACA,SAAS,YAAY,CAAC,KAAa,EAAA;IACjC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC;AACrD;AAEA;;;;;;AAMG;AACH,MAAM,oBAAoB,GAAG,SAAS;AAEtC;;;;;;;AAOG;AACH,MAAM,mBAAmB,GAAG,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,oBAAoB,CAAC,MAAM,CAAA,OAAA,CAAS,EAAE,GAAG,CAAC;AAE5F;AACA,SAAS,gBAAgB,CAAC,SAAiB,EAAA;AACzC,IAAA,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;AACnC;AAEA;;;;;;;;;;;AAWG;AACH,SAAS,wBAAwB,CAAC,KAAa,EA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