@xui/numeric-input 2.0.0-alpha.17 → 2.0.0-alpha.19

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.
@@ -110,7 +110,12 @@ class XuiNumericInput {
110
110
  */
111
111
  stepperIconSize = computed(() => (this.size() === 'sm' ? '10px' : '12px'), /* @ts-ignore */
112
112
  ...(ngDevMode ? [{ debugName: "stepperIconSize" }] : /* istanbul ignore next */ []));
113
- stepperClass = computed(() => 'text-foreground-muted hover:bg-hover-overlay hover:text-foreground flex flex-1 items-center justify-center px-1.5 disabled:pointer-events-none disabled:opacity-40', /* @ts-ignore */
113
+ /**
114
+ * A disabled stepper keeps its pointer events so the cursor can say it is unavailable — an
115
+ * element that receives none contributes no cursor either. The native `disabled` swallows the
116
+ * click, and `enabled:` keeps the hover lift off a stepper that cannot be pressed.
117
+ */
118
+ stepperClass = computed(() => 'text-foreground-muted enabled:hover:bg-hover-overlay enabled:hover:text-foreground flex flex-1 items-center justify-center px-1.5 disabled:cursor-not-allowed disabled:opacity-40', /* @ts-ignore */
114
119
  ...(ngDevMode ? [{ debugName: "stepperClass" }] : /* istanbul ignore next */ []));
115
120
  onInput(raw) {
116
121
  this.text.set(raw);
@@ -1 +1 @@
1
- {"version":3,"file":"xui-numeric-input.mjs","sources":["../../../../../../libs/ui/numeric-input/xui/src/lib/numeric-input.token.ts","../../../../../../libs/ui/numeric-input/xui/src/lib/numeric-input.ts","../../../../../../libs/ui/numeric-input/xui/src/index.ts","../../../../../../libs/ui/numeric-input/xui/src/xui-numeric-input.ts"],"sourcesContent":["import { createXConfigToken } from '@xui/core';\n\nexport type XuiNumericInputSize = 'md' | 'sm';\n/** Where the stepper buttons sit. */\nexport type XuiNumericButtonPosition = 'right' | 'left' | 'none';\n\nexport interface XuiNumericInputConfig {\n size: XuiNumericInputSize;\n buttonPosition: XuiNumericButtonPosition;\n /** Step applied by a click or ArrowUp/Down. */\n stepSize: number;\n /** Step when Shift is held — the coarse jump. */\n majorStepSize: number;\n /** Step when Alt is held — the fine nudge. */\n minorStepSize: number;\n /** Snap an out-of-range value back into [min, max] when focus leaves. */\n clampValueOnBlur: boolean;\n}\n\n/** Application-wide defaults for XuiNumericInput. */\nexport const [injectXuiNumericInputConfig, provideXuiNumericInputConfig] = createXConfigToken<XuiNumericInputConfig>(\n 'XuiNumericInputConfig',\n {\n size: 'md',\n buttonPosition: 'right',\n stepSize: 1,\n majorStepSize: 10,\n minorStepSize: 0.1,\n clampValueOnBlur: true\n }\n);\n","import type { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n linkedSignal,\n numberAttribute,\n signal,\n type Signal\n} from '@angular/core';\nimport { ControlValueAccessor, type NgControl } from '@angular/forms';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { matKeyboardArrowDownRound, matKeyboardArrowUpRound } from '@ng-icons/material-icons/round';\nimport { xui } from '@xui/core';\nimport { uniqueId } from '@xui/core/a11y';\nimport { XFormFieldControl } from '@xui/core/form-field';\nimport { createXErrorState, createXValueAccessor, provideXValueAccessor } from '@xui/core/forms';\nimport { XuiIcon, type XuiIconSize } from '@xui/icon';\nimport type { ClassValue } from 'clsx';\nimport {\n injectXuiNumericInputConfig,\n type XuiNumericButtonPosition,\n type XuiNumericInputSize\n} from './numeric-input.token';\n\n/**\n * A number field with stepper buttons and keyboard increment.\n *\n * ```html\n * <xui-numeric-input [(ngModel)]=\"quantity\" [min]=\"0\" [max]=\"99\" />\n * ```\n *\n * The value is a `number | null` (empty is `null`, not `0`, so \"no answer\" is\n * distinct from zero). ArrowUp/Down step by `stepSize`; Shift steps by\n * `majorStepSize`, Alt by `minorStepSize`. It is a `ControlValueAccessor`, so\n * forms bind to it directly, and it clamps into `[min, max]` on blur.\n */\n@Component({\n selector: 'xui-numeric-input',\n imports: [NgTemplateOutlet, NgIcon, XuiIcon],\n viewProviders: [provideIcons({ matKeyboardArrowUpRound, matKeyboardArrowDownRound })],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n provideXValueAccessor(() => XuiNumericInput),\n {\n provide: XFormFieldControl,\n useExisting: forwardRef(() => XuiNumericInput)\n }\n ],\n template: `\n @if (buttonPosition() === 'left') {\n <ng-container [ngTemplateOutlet]=\"steppers\" />\n }\n\n <input\n #field\n [id]=\"fieldId\"\n type=\"text\"\n inputmode=\"decimal\"\n [class]=\"fieldClass()\"\n [value]=\"display()\"\n [disabled]=\"isDisabled()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel()\"\n role=\"spinbutton\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"min() ?? null\"\n [attr.aria-valuemax]=\"max() ?? null\"\n (input)=\"onInput(field.value)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n />\n\n @if (buttonPosition() === 'right') {\n <ng-container [ngTemplateOutlet]=\"steppers\" />\n }\n\n <ng-template #steppers>\n <div [class]=\"stepperColumnClass()\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Increment\"\n [class]=\"stepperClass()\"\n [disabled]=\"!canIncrement()\"\n (click)=\"step(stepSize())\"\n >\n <ng-icon xui [size]=\"stepperIconSize()\" name=\"matKeyboardArrowUpRound\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Decrement\"\n [class]=\"stepperClass()\"\n [disabled]=\"!canDecrement()\"\n (click)=\"step(-stepSize())\"\n >\n <ng-icon xui [size]=\"stepperIconSize()\" name=\"matKeyboardArrowDownRound\" />\n </button>\n </div>\n </ng-template>\n `,\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiNumericInput implements ControlValueAccessor, XFormFieldControl {\n private readonly config = injectXuiNumericInputConfig();\n private readonly formState = createXErrorState();\n protected readonly fieldId = uniqueId('xui-numeric-input');\n\n /** Error state for `xui-form-field`, derived from the optional bound form control. */\n readonly errorState = this.formState.errorState;\n\n /** Points the form field's `<label for>` at the inner text field, not the host. */\n readonly controlId: Signal<string | null> = signal(this.fieldId).asReadonly();\n\n get ngControl(): NgControl | null {\n return this.formState.ngControl();\n }\n\n /** The user-defined classes on the wrapper. Merged last so they win. */\n readonly class = input<ClassValue>('');\n readonly size = input<XuiNumericInputSize>(this.config.size);\n readonly buttonPosition = input<XuiNumericButtonPosition>(this.config.buttonPosition);\n\n readonly placeholder = input<string | null>(null);\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n readonly min = input<number | undefined, NumberInput>(undefined, { transform: numberAttribute });\n readonly max = input<number | undefined, NumberInput>(undefined, { transform: numberAttribute });\n readonly stepSize = input<number, NumberInput>(this.config.stepSize, { transform: numberAttribute });\n readonly majorStepSize = input<number, NumberInput>(this.config.majorStepSize, { transform: numberAttribute });\n readonly minorStepSize = input<number, NumberInput>(this.config.minorStepSize, { transform: numberAttribute });\n readonly clampValueOnBlur = input<boolean, BooleanInput>(this.config.clampValueOnBlur, {\n transform: booleanAttribute\n });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly cva = createXValueAccessor<number | null>({\n onWrite: value => {\n this.value.set(value ?? null);\n this.text.set(value == null ? '' : String(value));\n },\n disabled: this.disabled\n });\n protected readonly isDisabled = this.cva.disabled;\n\n // Aliased so the writable `value` linkedSignal below can own the public name.\n // Coerce so `value=\"5\"` (a string attribute) becomes the number 5, not the\n // string \"5\" that would then concatenate under `+ stepSize`.\n readonly valueInput = input<number | null, number | string | null | undefined>(null, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'value',\n transform: raw => (raw == null || raw === '' ? null : Number(raw))\n });\n /** The current numeric value, or `null` when empty. Two-way via `value`. */\n readonly value = linkedSignal(this.valueInput);\n\n // The text the field shows. Kept separate from `value` so a half-typed entry\n // (\"-\", \"1.\") is preserved while the parsed value stays null/last-valid.\n private readonly text = signal<string>('');\n protected readonly display = computed(() => {\n const value = this.value();\n\n // Do not overwrite what the user is mid-typing with a formatted number.\n return this.text() !== '' || value == null ? this.text() : String(value);\n });\n\n protected readonly canIncrement = computed(() => !this.isDisabled() && !this.atMax(this.value()));\n protected readonly canDecrement = computed(() => !this.isDisabled() && !this.atMin(this.value()));\n\n protected readonly computedClass = computed(() =>\n xui(\n 'border-border bg-surface-inset focus-within:border-focus inline-flex items-stretch overflow-hidden rounded-lg border transition-colors',\n // The wrapper carries the control height so the stepper column cannot stretch the field\n // past the shared scale.\n this.size() === 'sm' ? 'h-(--control-height-sm)' : 'h-(--control-height-md)',\n this.isDisabled() && 'cursor-not-allowed opacity-50',\n this.class()\n )\n );\n protected readonly fieldClass = computed(() =>\n xui(\n 'text-foreground placeholder:text-foreground-subtle w-full min-w-0 bg-transparent tabular-nums outline-none',\n this.size() === 'sm' ? 'px-(--control-padding-sm) text-xs' : 'px-(--control-padding-md) text-sm'\n )\n );\n protected readonly stepperColumnClass = computed(() =>\n xui(\n 'border-border flex shrink-0 flex-col',\n // The rule divides the steppers from the field, so it belongs on whichever edge faces it —\n // on the outer edge it would just double up on the wrapper's own border.\n this.buttonPosition() === 'left' ? 'border-e' : 'border-s'\n )\n );\n\n /**\n * The two steppers split the control height between them, so a glyph sized off the icon scale\n * (`sm` is 16px) makes the column taller than the field — and the wrapper clips the overflow,\n * taking the bottom arrow with it. Size to the row instead: half of 24px or 30px, less a hair.\n */\n protected readonly stepperIconSize = computed<XuiIconSize>(() => (this.size() === 'sm' ? '10px' : '12px'));\n protected readonly stepperClass = computed(\n () =>\n 'text-foreground-muted hover:bg-hover-overlay hover:text-foreground flex flex-1 items-center justify-center px-1.5 disabled:pointer-events-none disabled:opacity-40'\n );\n\n protected onInput(raw: string): void {\n this.text.set(raw);\n\n const parsed = this.parse(raw);\n this.value.set(parsed);\n this.cva.notifyChange(parsed);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') {\n return;\n }\n\n event.preventDefault();\n const magnitude = event.shiftKey ? this.majorStepSize() : event.altKey ? this.minorStepSize() : this.stepSize();\n this.step(event.key === 'ArrowUp' ? magnitude : -magnitude);\n }\n\n protected onBlur(): void {\n if (this.clampValueOnBlur()) {\n this.commit(this.clamp(this.value()));\n }\n\n // Re-sync the text with the committed value, dropping a half-typed entry.\n this.text.set(this.value() == null ? '' : String(this.value()));\n this.cva.markTouched();\n }\n\n step(delta: number): void {\n if (this.isDisabled()) {\n return;\n }\n\n const base = this.value() ?? 0;\n // Round to the step grid so 0.1 + 0.2 does not drift to 0.30000000000000004.\n const next = this.clamp(this.round(base + delta));\n this.commit(next);\n this.text.set(next == null ? '' : String(next));\n }\n\n private commit(value: number | null): void {\n this.value.set(value);\n this.cva.notifyChange(value);\n }\n\n private parse(raw: string): number | null {\n const trimmed = raw.trim();\n\n if (trimmed === '' || trimmed === '-' || trimmed === '.' || trimmed === '-.') {\n return null;\n }\n\n const parsed = Number(trimmed);\n\n return Number.isFinite(parsed) ? parsed : this.value();\n }\n\n private clamp(value: number | null): number | null {\n if (value == null) {\n return null;\n }\n\n const min = this.min();\n const max = this.max();\n\n return Math.min(max ?? Infinity, Math.max(min ?? -Infinity, value));\n }\n\n private round(value: number): number {\n // Keep a sane number of decimals so step math stays exact.\n return Math.round(value * 1e10) / 1e10;\n }\n\n private atMax(value: number | null): boolean {\n return value != null && this.max() != null && value >= this.max()!;\n }\n\n private atMin(value: number | null): boolean {\n return value != null && this.min() != null && value <= this.min()!;\n }\n\n readonly writeValue = this.cva.writeValue;\n readonly registerOnChange = this.cva.registerOnChange;\n readonly registerOnTouched = this.cva.registerOnTouched;\n readonly setDisabledState = this.cva.setDisabledState;\n}\n","import { XuiNumericInput } from './lib/numeric-input';\n\nexport * from './lib/numeric-input';\nexport * from './lib/numeric-input.token';\n\nexport const XuiNumericInputImports = [XuiNumericInput] as const;\n","/**\n * Gener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AAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE;AACZ;AACF,iBAAA;;;AC1GM,MAAM,sBAAsB,GAAG,CAAC,eAAe;;ACLtD;;AAEG;;;;"}
1
+ {"version":3,"file":"xui-numeric-input.mjs","sources":["../../../../../../libs/ui/numeric-input/xui/src/lib/numeric-input.token.ts","../../../../../../libs/ui/numeric-input/xui/src/lib/numeric-input.ts","../../../../../../libs/ui/numeric-input/xui/src/index.ts","../../../../../../libs/ui/numeric-input/xui/src/xui-numeric-input.ts"],"sourcesContent":["import { createXConfigToken } from '@xui/core';\n\nexport type XuiNumericInputSize = 'md' | 'sm';\n/** Where the stepper buttons sit. */\nexport type XuiNumericButtonPosition = 'right' | 'left' | 'none';\n\nexport interface XuiNumericInputConfig {\n size: XuiNumericInputSize;\n buttonPosition: XuiNumericButtonPosition;\n /** Step applied by a click or ArrowUp/Down. */\n stepSize: number;\n /** Step when Shift is held — the coarse jump. */\n majorStepSize: number;\n /** Step when Alt is held — the fine nudge. */\n minorStepSize: number;\n /** Snap an out-of-range value back into [min, max] when focus leaves. */\n clampValueOnBlur: boolean;\n}\n\n/** Application-wide defaults for XuiNumericInput. */\nexport const [injectXuiNumericInputConfig, provideXuiNumericInputConfig] = createXConfigToken<XuiNumericInputConfig>(\n 'XuiNumericInputConfig',\n {\n size: 'md',\n buttonPosition: 'right',\n stepSize: 1,\n majorStepSize: 10,\n minorStepSize: 0.1,\n clampValueOnBlur: true\n }\n);\n","import type { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n linkedSignal,\n numberAttribute,\n signal,\n type Signal\n} from '@angular/core';\nimport { ControlValueAccessor, type NgControl } from '@angular/forms';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { matKeyboardArrowDownRound, matKeyboardArrowUpRound } from '@ng-icons/material-icons/round';\nimport { xui } from '@xui/core';\nimport { uniqueId } from '@xui/core/a11y';\nimport { XFormFieldControl } from '@xui/core/form-field';\nimport { createXErrorState, createXValueAccessor, provideXValueAccessor } from '@xui/core/forms';\nimport { XuiIcon, type XuiIconSize } from '@xui/icon';\nimport type { ClassValue } from 'clsx';\nimport {\n injectXuiNumericInputConfig,\n type XuiNumericButtonPosition,\n type XuiNumericInputSize\n} from './numeric-input.token';\n\n/**\n * A number field with stepper buttons and keyboard increment.\n *\n * ```html\n * <xui-numeric-input [(ngModel)]=\"quantity\" [min]=\"0\" [max]=\"99\" />\n * ```\n *\n * The value is a `number | null` (empty is `null`, not `0`, so \"no answer\" is\n * distinct from zero). ArrowUp/Down step by `stepSize`; Shift steps by\n * `majorStepSize`, Alt by `minorStepSize`. It is a `ControlValueAccessor`, so\n * forms bind to it directly, and it clamps into `[min, max]` on blur.\n */\n@Component({\n selector: 'xui-numeric-input',\n imports: [NgTemplateOutlet, NgIcon, XuiIcon],\n viewProviders: [provideIcons({ matKeyboardArrowUpRound, matKeyboardArrowDownRound })],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n provideXValueAccessor(() => XuiNumericInput),\n {\n provide: XFormFieldControl,\n useExisting: forwardRef(() => XuiNumericInput)\n }\n ],\n template: `\n @if (buttonPosition() === 'left') {\n <ng-container [ngTemplateOutlet]=\"steppers\" />\n }\n\n <input\n #field\n [id]=\"fieldId\"\n type=\"text\"\n inputmode=\"decimal\"\n [class]=\"fieldClass()\"\n [value]=\"display()\"\n [disabled]=\"isDisabled()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.aria-label]=\"ariaLabel()\"\n role=\"spinbutton\"\n [attr.aria-valuenow]=\"value()\"\n [attr.aria-valuemin]=\"min() ?? null\"\n [attr.aria-valuemax]=\"max() ?? null\"\n (input)=\"onInput(field.value)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n />\n\n @if (buttonPosition() === 'right') {\n <ng-container [ngTemplateOutlet]=\"steppers\" />\n }\n\n <ng-template #steppers>\n <div [class]=\"stepperColumnClass()\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Increment\"\n [class]=\"stepperClass()\"\n [disabled]=\"!canIncrement()\"\n (click)=\"step(stepSize())\"\n >\n <ng-icon xui [size]=\"stepperIconSize()\" name=\"matKeyboardArrowUpRound\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Decrement\"\n [class]=\"stepperClass()\"\n [disabled]=\"!canDecrement()\"\n (click)=\"step(-stepSize())\"\n >\n <ng-icon xui [size]=\"stepperIconSize()\" name=\"matKeyboardArrowDownRound\" />\n </button>\n </div>\n </ng-template>\n `,\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiNumericInput implements ControlValueAccessor, XFormFieldControl {\n private readonly config = injectXuiNumericInputConfig();\n private readonly formState = createXErrorState();\n protected readonly fieldId = uniqueId('xui-numeric-input');\n\n /** Error state for `xui-form-field`, derived from the optional bound form control. */\n readonly errorState = this.formState.errorState;\n\n /** Points the form field's `<label for>` at the inner text field, not the host. */\n readonly controlId: Signal<string | null> = signal(this.fieldId).asReadonly();\n\n get ngControl(): NgControl | null {\n return this.formState.ngControl();\n }\n\n /** The user-defined classes on the wrapper. Merged last so they win. */\n readonly class = input<ClassValue>('');\n readonly size = input<XuiNumericInputSize>(this.config.size);\n readonly buttonPosition = input<XuiNumericButtonPosition>(this.config.buttonPosition);\n\n readonly placeholder = input<string | null>(null);\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n readonly min = input<number | undefined, NumberInput>(undefined, { transform: numberAttribute });\n readonly max = input<number | undefined, NumberInput>(undefined, { transform: numberAttribute });\n readonly stepSize = input<number, NumberInput>(this.config.stepSize, { transform: numberAttribute });\n readonly majorStepSize = input<number, NumberInput>(this.config.majorStepSize, { transform: numberAttribute });\n readonly minorStepSize = input<number, NumberInput>(this.config.minorStepSize, { transform: numberAttribute });\n readonly clampValueOnBlur = input<boolean, BooleanInput>(this.config.clampValueOnBlur, {\n transform: booleanAttribute\n });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly cva = createXValueAccessor<number | null>({\n onWrite: value => {\n this.value.set(value ?? null);\n this.text.set(value == null ? '' : String(value));\n },\n disabled: this.disabled\n });\n protected readonly isDisabled = this.cva.disabled;\n\n // Aliased so the writable `value` linkedSignal below can own the public name.\n // Coerce so `value=\"5\"` (a string attribute) becomes the number 5, not the\n // string \"5\" that would then concatenate under `+ stepSize`.\n readonly valueInput = input<number | null, number | string | null | undefined>(null, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'value',\n transform: raw => (raw == null || raw === '' ? null : Number(raw))\n });\n /** The current numeric value, or `null` when empty. Two-way via `value`. */\n readonly value = linkedSignal(this.valueInput);\n\n // The text the field shows. Kept separate from `value` so a half-typed entry\n // (\"-\", \"1.\") is preserved while the parsed value stays null/last-valid.\n private readonly text = signal<string>('');\n protected readonly display = computed(() => {\n const value = this.value();\n\n // Do not overwrite what the user is mid-typing with a formatted number.\n return this.text() !== '' || value == null ? this.text() : String(value);\n });\n\n protected readonly canIncrement = computed(() => !this.isDisabled() && !this.atMax(this.value()));\n protected readonly canDecrement = computed(() => !this.isDisabled() && !this.atMin(this.value()));\n\n protected readonly computedClass = computed(() =>\n xui(\n 'border-border bg-surface-inset focus-within:border-focus inline-flex items-stretch overflow-hidden rounded-lg border transition-colors',\n // The wrapper carries the control height so the stepper column cannot stretch the field\n // past the shared scale.\n this.size() === 'sm' ? 'h-(--control-height-sm)' : 'h-(--control-height-md)',\n this.isDisabled() && 'cursor-not-allowed opacity-50',\n this.class()\n )\n );\n protected readonly fieldClass = computed(() =>\n xui(\n 'text-foreground placeholder:text-foreground-subtle w-full min-w-0 bg-transparent tabular-nums outline-none',\n this.size() === 'sm' ? 'px-(--control-padding-sm) text-xs' : 'px-(--control-padding-md) text-sm'\n )\n );\n protected readonly stepperColumnClass = computed(() =>\n xui(\n 'border-border flex shrink-0 flex-col',\n // The rule divides the steppers from the field, so it belongs on whichever edge faces it —\n // on the outer edge it would just double up on the wrapper's own border.\n this.buttonPosition() === 'left' ? 'border-e' : 'border-s'\n )\n );\n\n /**\n * The two steppers split the control height between them, so a glyph sized off the icon scale\n * (`sm` is 16px) makes the column taller than the field — and the wrapper clips the overflow,\n * taking the bottom arrow with it. Size to the row instead: half of 24px or 30px, less a hair.\n */\n protected readonly stepperIconSize = computed<XuiIconSize>(() => (this.size() === 'sm' ? '10px' : '12px'));\n /**\n * A disabled stepper keeps its pointer events so the cursor can say it is unavailable — an\n * element that receives none contributes no cursor either. The native `disabled` swallows the\n * click, and `enabled:` keeps the hover lift off a stepper that cannot be pressed.\n */\n protected readonly stepperClass = computed(\n () =>\n 'text-foreground-muted enabled:hover:bg-hover-overlay enabled:hover:text-foreground flex flex-1 items-center justify-center px-1.5 disabled:cursor-not-allowed disabled:opacity-40'\n );\n\n protected onInput(raw: string): void {\n this.text.set(raw);\n\n const parsed = this.parse(raw);\n this.value.set(parsed);\n this.cva.notifyChange(parsed);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') {\n return;\n }\n\n event.preventDefault();\n const magnitude = event.shiftKey ? this.majorStepSize() : event.altKey ? this.minorStepSize() : this.stepSize();\n this.step(event.key === 'ArrowUp' ? magnitude : -magnitude);\n }\n\n protected onBlur(): void {\n if (this.clampValueOnBlur()) {\n this.commit(this.clamp(this.value()));\n }\n\n // Re-sync the text with the committed value, dropping a half-typed entry.\n this.text.set(this.value() == null ? '' : String(this.value()));\n this.cva.markTouched();\n }\n\n step(delta: number): void {\n if (this.isDisabled()) {\n return;\n }\n\n const base = this.value() ?? 0;\n // Round to the step grid so 0.1 + 0.2 does not drift to 0.30000000000000004.\n const next = this.clamp(this.round(base + delta));\n this.commit(next);\n this.text.set(next == null ? '' : String(next));\n }\n\n private commit(value: number | null): void {\n this.value.set(value);\n this.cva.notifyChange(value);\n }\n\n private parse(raw: string): number | null {\n const trimmed = raw.trim();\n\n if (trimmed === '' || trimmed === '-' || trimmed === '.' || trimmed === '-.') {\n return null;\n }\n\n const parsed = Number(trimmed);\n\n return Number.isFinite(parsed) ? parsed : this.value();\n }\n\n private clamp(value: number | null): number | null {\n if (value == null) {\n return null;\n }\n\n const min = this.min();\n const max = this.max();\n\n return Math.min(max ?? Infinity, Math.max(min ?? -Infinity, value));\n }\n\n private round(value: number): number {\n // Keep a sane number of decimals so step math stays exact.\n return Math.round(value * 1e10) / 1e10;\n }\n\n private atMax(value: number | null): boolean {\n return value != null && this.max() != null && value >= this.max()!;\n }\n\n private atMin(value: number | null): boolean {\n return value != null && this.min() != null && value <= this.min()!;\n }\n\n readonly writeValue = this.cva.writeValue;\n readonly registerOnChange = this.cva.registerOnChange;\n readonly registerOnTouched = this.cva.registerOnTouched;\n readonly setDisabledState = this.cva.setDisabledState;\n}\n","import { XuiNumericInput } from './lib/numeric-input';\n\nexport * from './lib/numeric-input';\nexport * from './lib/numeric-input.token';\n\nexport const XuiNumericInputImports = [XuiNumericInput] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAmBA;AACO,MAAM,CAAC,2BAA2B,EAAE,4BAA4B,CAAC,GAAG,kBAAkB,CAC3F,uBAAuB,EACvB;AACE,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,cAAc,EAAE,OAAO;AACvB,IAAA,QAAQ,EAAE,CAAC;AACX,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,aAAa,EAAE,GAAG;AAClB,IAAA,gBAAgB,EAAE;AACnB,CAAA;;ACCH;;;;;;;;;;;AAWG;MAuEU,eAAe,CAAA;IACT,MAAM,GAAG,2BAA2B,EAAE;IACtC,SAAS,GAAG,iBAAiB,EAAE;AAC7B,IAAA,OAAO,GAAG,QAAQ,CAAC,mBAAmB,CAAC;;AAGjD,IAAA,UAAU,GA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CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAmE1E,eAAe,EAAA,UAAA,EAAA,CAAA;kBAtE3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;oBAC5C,aAAa,EAAE,CAAC,YAAY,CAAC,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,CAAC,CAAC;oBACrF,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,SAAS,EAAE;AACT,wBAAA,qBAAqB,EAAC,MAAK,eAAgB,EAAC;AAC5C,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,EAAC,qBAAqB;AAC9C;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE;AACZ;AACF,iBAAA;;;AC1GM,MAAM,sBAAsB,GAAG,CAAC,eAAe;;ACLtD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xui/numeric-input",
3
- "version": "2.0.0-alpha.17",
3
+ "version": "2.0.0-alpha.19",
4
4
  "description": "Modern Angular 22 UI Library based on TailwindCSS",
5
5
  "keywords": [
6
6
  "angular",
@@ -42,8 +42,8 @@
42
42
  "@angular/forms": "22",
43
43
  "@ng-icons/core": "34",
44
44
  "@ng-icons/material-icons": "34",
45
- "@xui/core": "2.0.0-alpha.17",
46
- "@xui/icon": "2.0.0-alpha.17",
45
+ "@xui/core": "2.0.0-alpha.19",
46
+ "@xui/icon": "2.0.0-alpha.19",
47
47
  "clsx": "^2.1.1"
48
48
  },
49
49
  "publishConfig": {
@@ -78,6 +78,11 @@ declare class XuiNumericInput implements ControlValueAccessor, XFormFieldControl
78
78
  * taking the bottom arrow with it. Size to the row instead: half of 24px or 30px, less a hair.
79
79
  */
80
80
  protected readonly stepperIconSize: Signal<XuiIconSize>;
81
+ /**
82
+ * A disabled stepper keeps its pointer events so the cursor can say it is unavailable — an
83
+ * element that receives none contributes no cursor either. The native `disabled` swallows the
84
+ * click, and `enabled:` keeps the hover lift off a stepper that cannot be pressed.
85
+ */
81
86
  protected readonly stepperClass: Signal<string>;
82
87
  protected onInput(raw: string): void;
83
88
  protected onKeydown(event: KeyboardEvent): void;