@cdevhub/ngx-tw 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -15
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs +16 -5
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs +26 -15
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +17 -5
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +27 -6
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +23 -11
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +5 -5
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs +3 -3
- package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +427 -122
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-card.mjs +21 -11
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +215 -96
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +108 -64
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +18 -6
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +55 -30
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox-testing.mjs +218 -0
- package/fesm2022/cdevhub-ngx-tw-combobox-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +236 -211
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-command-palette-testing.mjs +200 -0
- package/fesm2022/cdevhub-ngx-tw-command-palette-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +34 -7
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-core.mjs +135 -15
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker-testing.mjs +203 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +160 -102
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-range-picker-testing.mjs +209 -0
- package/fesm2022/cdevhub-ngx-tw-date-range-picker-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +182 -107
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-dialog-testing.mjs +122 -0
- package/fesm2022/cdevhub-ngx-tw-dialog-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs +11 -2
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-file-upload-testing.mjs +149 -0
- package/fesm2022/cdevhub-ngx-tw-file-upload-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs +57 -67
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +42 -24
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +114 -21
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-icon.mjs +16 -6
- package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs +52 -61
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-item.mjs +28 -4
- package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-menu-testing.mjs +168 -0
- package/fesm2022/cdevhub-ngx-tw-menu-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-menu.mjs +58 -21
- package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs +34 -1
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +95 -45
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +81 -32
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +131 -98
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +207 -42
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select-testing.mjs +165 -0
- package/fesm2022/cdevhub-ngx-tw-select-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-select.mjs +386 -210
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/{cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs → cdevhub-ngx-tw-sheet-sheet-renderer-CqVJwgmp.mjs} +3 -3
- package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-CqVJwgmp.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sheet-testing.mjs +129 -0
- package/fesm2022/cdevhub-ngx-tw-sheet-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs +23 -7
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +89 -54
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +122 -17
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-split.mjs +72 -19
- package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stat.mjs +63 -25
- package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +35 -8
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +54 -48
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +12 -15
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-table.mjs +74 -13
- package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +84 -30
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tags-input-testing.mjs +172 -0
- package/fesm2022/cdevhub-ngx-tw-tags-input-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +107 -71
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +41 -9
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-theme.mjs +257 -45
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-time-picker-testing.mjs +201 -0
- package/fesm2022/cdevhub-ngx-tw-time-picker-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +184 -77
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs +110 -27
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -1
- package/fesm2022/{cdevhub-ngx-tw-toast-toast-renderer-DSu4YoTy.mjs → cdevhub-ngx-tw-toast-toast-renderer-BlDxemsU.mjs} +107 -19
- package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-BlDxemsU.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +21 -13
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +102 -15
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-transfer-testing.mjs +219 -0
- package/fesm2022/cdevhub-ngx-tw-transfer-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs +88 -69
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tree.mjs +68 -19
- package/fesm2022/cdevhub-ngx-tw-tree.mjs.map +1 -1
- package/index.json +1 -1
- package/package.json +63 -2
- package/theme/_base.css +13 -0
- package/theme/_dark.css +111 -36
- package/theme/_high-contrast-dark.css +367 -0
- package/theme/_high-contrast.css +13 -2
- package/theme/_light.css +332 -0
- package/theme/_semantic.css +60 -26
- package/theme/_typography.css +17 -0
- package/theme/index.css +86 -7
- package/types/cdevhub-ngx-tw-accordion.d.ts +12 -4
- package/types/cdevhub-ngx-tw-avatar.d.ts +10 -3
- package/types/cdevhub-ngx-tw-button.d.ts +1 -0
- package/types/cdevhub-ngx-tw-calendar-luxon.d.ts +2 -2
- package/types/cdevhub-ngx-tw-calendar-testing.d.ts +1 -1
- package/types/cdevhub-ngx-tw-calendar.d.ts +179 -73
- package/types/cdevhub-ngx-tw-card.d.ts +11 -3
- package/types/cdevhub-ngx-tw-carousel.d.ts +89 -20
- package/types/cdevhub-ngx-tw-checkbox.d.ts +40 -12
- package/types/cdevhub-ngx-tw-code-block.d.ts +11 -2
- package/types/cdevhub-ngx-tw-collapsible.d.ts +32 -5
- package/types/cdevhub-ngx-tw-combobox-testing.d.ts +157 -0
- package/types/cdevhub-ngx-tw-combobox.d.ts +94 -53
- package/types/cdevhub-ngx-tw-command-palette-testing.d.ts +136 -0
- package/types/cdevhub-ngx-tw-command-palette.d.ts +33 -5
- package/types/cdevhub-ngx-tw-core.d.ts +152 -21
- package/types/cdevhub-ngx-tw-date-picker-testing.d.ts +141 -0
- package/types/cdevhub-ngx-tw-date-picker.d.ts +37 -29
- package/types/cdevhub-ngx-tw-date-range-picker-testing.d.ts +148 -0
- package/types/cdevhub-ngx-tw-date-range-picker.d.ts +36 -29
- package/types/cdevhub-ngx-tw-dialog-testing.d.ts +98 -0
- package/types/cdevhub-ngx-tw-dialog.d.ts +12 -3
- package/types/cdevhub-ngx-tw-file-upload-testing.d.ts +120 -0
- package/types/cdevhub-ngx-tw-file-upload.d.ts +8 -10
- package/types/cdevhub-ngx-tw-flip-card.d.ts +18 -11
- package/types/cdevhub-ngx-tw-form-field.d.ts +19 -2
- package/types/cdevhub-ngx-tw-icon.d.ts +3 -3
- package/types/cdevhub-ngx-tw-input.d.ts +5 -8
- package/types/cdevhub-ngx-tw-item.d.ts +2 -0
- package/types/cdevhub-ngx-tw-menu-testing.d.ts +131 -0
- package/types/cdevhub-ngx-tw-menu.d.ts +2 -2
- package/types/cdevhub-ngx-tw-number-input.d.ts +20 -0
- package/types/cdevhub-ngx-tw-paginator.d.ts +58 -24
- package/types/cdevhub-ngx-tw-popover.d.ts +41 -10
- package/types/cdevhub-ngx-tw-progress-bar.d.ts +1 -1
- package/types/cdevhub-ngx-tw-radio.d.ts +68 -25
- package/types/cdevhub-ngx-tw-segmented-control.d.ts +79 -16
- package/types/cdevhub-ngx-tw-select-testing.d.ts +114 -0
- package/types/cdevhub-ngx-tw-select.d.ts +104 -33
- package/types/cdevhub-ngx-tw-sheet-testing.d.ts +104 -0
- package/types/cdevhub-ngx-tw-sheet.d.ts +19 -3
- package/types/cdevhub-ngx-tw-slider.d.ts +79 -25
- package/types/cdevhub-ngx-tw-sort.d.ts +45 -4
- package/types/cdevhub-ngx-tw-split.d.ts +32 -2
- package/types/cdevhub-ngx-tw-stat.d.ts +14 -4
- package/types/cdevhub-ngx-tw-stepper.d.ts +16 -2
- package/types/cdevhub-ngx-tw-switch.d.ts +35 -13
- package/types/cdevhub-ngx-tw-tab-nav.d.ts +7 -6
- package/types/cdevhub-ngx-tw-table.d.ts +53 -10
- package/types/cdevhub-ngx-tw-tabs.d.ts +41 -10
- package/types/cdevhub-ngx-tw-tags-input-testing.d.ts +135 -0
- package/types/cdevhub-ngx-tw-tags-input.d.ts +26 -11
- package/types/cdevhub-ngx-tw-textarea.d.ts +3 -2
- package/types/cdevhub-ngx-tw-theme.d.ts +245 -39
- package/types/cdevhub-ngx-tw-time-picker-testing.d.ts +129 -0
- package/types/cdevhub-ngx-tw-time-picker.d.ts +76 -19
- package/types/cdevhub-ngx-tw-timeline.d.ts +36 -12
- package/types/cdevhub-ngx-tw-toast.d.ts +20 -6
- package/types/cdevhub-ngx-tw-tooltip.d.ts +28 -6
- package/types/cdevhub-ngx-tw-transfer-testing.d.ts +152 -0
- package/types/cdevhub-ngx-tw-transfer.d.ts +21 -8
- package/types/cdevhub-ngx-tw-tree.d.ts +6 -1
- package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs.map +0 -1
- package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-DSu4YoTy.mjs.map +0 -1
|
@@ -57,6 +57,27 @@ class NumberInputDirective {
|
|
|
57
57
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
58
58
|
/** True when the host input carries the `readonly` attribute (static / declarative, seeded after render). A runtime toggle of the bare `readonly` attribute is not reactively tracked (v2). Read by the companion stepper so its buttons disable in lock-step. */
|
|
59
59
|
readonly = this.readonlySig.asReadonly();
|
|
60
|
+
/**
|
|
61
|
+
* @internal `aria-disabled` for the host `<input>`.
|
|
62
|
+
*
|
|
63
|
+
* Derived from the CVA disabled state ALONE, deliberately not from
|
|
64
|
+
* {@link disabled}. Three reasons, in order of weight:
|
|
65
|
+
*
|
|
66
|
+
* 1. It is the only case that needs the attribute. When the element is
|
|
67
|
+
* natively disabled (`el.disabled`, whether from a static attribute or
|
|
68
|
+
* from the sibling `InputDirective`'s `[disabled]` binding) assistive tech
|
|
69
|
+
* already has the state. The gap is `setDisabledState(true)` on a
|
|
70
|
+
* standalone `input[twNumberInput]` — no sibling directive, so nothing
|
|
71
|
+
* writes the native property and the spinbutton looked enabled.
|
|
72
|
+
* 2. `disabled` reads the non-reactive `el.disabled`. Read from a host
|
|
73
|
+
* binding it would memoize during the host-binding phase, so its value
|
|
74
|
+
* would depend on which of the two directives on the element runs first —
|
|
75
|
+
* and could latch a stale `true` across a `control.enable()`.
|
|
76
|
+
* 3. `[disabled]` itself is not an option: `InputDirective` already binds it,
|
|
77
|
+
* and this directive's `disabled` reads the very property it would write.
|
|
78
|
+
*/
|
|
79
|
+
ariaDisabled = computed(() => (this.cvaDisabled() ? 'true' : null), /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "ariaDisabled" }] : /* istanbul ignore next */ []));
|
|
60
81
|
/** @internal Mobile-keyboard hint: `'numeric'` for integer-only formats, else `'decimal'`. */
|
|
61
82
|
inputMode = computed(() => this.format()?.maximumFractionDigits === 0 ? 'numeric' : 'decimal', /* @ts-ignore */
|
|
62
83
|
...(ngDevMode ? [{ debugName: "inputMode" }] : /* istanbul ignore next */ []));
|
|
@@ -151,6 +172,12 @@ class NumberInputDirective {
|
|
|
151
172
|
// ── Host handlers ──
|
|
152
173
|
/** @internal */
|
|
153
174
|
onInput() {
|
|
175
|
+
// Same gate as `onKeydown` / `stepBy`. Without it a control disabled through
|
|
176
|
+
// `setDisabledState` — which does not set the native `disabled` property
|
|
177
|
+
// when `twNumberInput` is used without the sibling `twInput` — still wrote
|
|
178
|
+
// every keystroke into the form model and emitted `valueChange`.
|
|
179
|
+
if (this.disabled() || this.el.readOnly)
|
|
180
|
+
return;
|
|
154
181
|
const raw = this.el.value;
|
|
155
182
|
this.displayText.set(raw);
|
|
156
183
|
const parsed = this.parseValue(raw);
|
|
@@ -210,6 +237,11 @@ class NumberInputDirective {
|
|
|
210
237
|
this.commitNumber(current + direction * this.resolvedStep());
|
|
211
238
|
}
|
|
212
239
|
commitFromElement() {
|
|
240
|
+
// Blur and Enter both land here. A disabled control must not commit — the
|
|
241
|
+
// `readOnly` half is deliberately NOT gated: a readonly field still
|
|
242
|
+
// reformats its display on blur, which is existing behaviour.
|
|
243
|
+
if (this.disabled())
|
|
244
|
+
return;
|
|
213
245
|
const raw = this.el.value;
|
|
214
246
|
if (raw.trim() === '') {
|
|
215
247
|
this.commitEmpty();
|
|
@@ -335,7 +367,7 @@ class NumberInputDirective {
|
|
|
335
367
|
return Object.is(n, -0) ? 0 : n;
|
|
336
368
|
}
|
|
337
369
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: NumberInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
338
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: NumberInputDirective, isStandalone: true, selector: "input[twNumberInput]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { attributes: { "role": "spinbutton" }, listeners: { "input": "onInput()", "keydown": "onKeydown($event)", "focus": "onFocus()", "blur": "onBlur()" }, properties: { "attr.inputmode": "inputMode()", "attr.aria-valuemin": "min() ?? null", "attr.aria-valuemax": "max() ?? null", "attr.aria-valuenow": "value() ?? null", "attr.aria-valuetext": "displayText() || \"Empty\"" } }, providers: [
|
|
370
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: NumberInputDirective, isStandalone: true, selector: "input[twNumberInput]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { attributes: { "role": "spinbutton" }, listeners: { "input": "onInput()", "keydown": "onKeydown($event)", "focus": "onFocus()", "blur": "onBlur()" }, properties: { "attr.inputmode": "inputMode()", "attr.aria-valuemin": "min() ?? null", "attr.aria-valuemax": "max() ?? null", "attr.aria-valuenow": "value() ?? null", "attr.aria-valuetext": "displayText() || \"Empty\"", "attr.aria-disabled": "ariaDisabled()" } }, providers: [
|
|
339
371
|
// Custom CVA — transports a real `number | null`, not a string. Registered
|
|
340
372
|
// statically because this directive injects NO `NgControl` (matcher /
|
|
341
373
|
// error-state stay on the sibling InputDirective), so the circular-DI trap
|
|
@@ -396,6 +428,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
396
428
|
'[attr.aria-valuemax]': 'max() ?? null',
|
|
397
429
|
'[attr.aria-valuenow]': 'value() ?? null',
|
|
398
430
|
'[attr.aria-valuetext]': 'displayText() || "Empty"',
|
|
431
|
+
'[attr.aria-disabled]': 'ariaDisabled()',
|
|
399
432
|
'(input)': 'onInput()',
|
|
400
433
|
'(keydown)': 'onKeydown($event)',
|
|
401
434
|
'(focus)': 'onFocus()',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-number-input.mjs","sources":["../../../projects/ngx-tw/number-input/number-input.ts","../../../projects/ngx-tw/number-input/number-stepper.ts","../../../projects/ngx-tw/number-input/cdevhub-ngx-tw-number-input.ts"],"sourcesContent":["import {\n afterNextRender,\n computed,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n output,\n signal,\n} from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TW_INPUT_VALUE_ACCESSOR } from '@cdevhub/ngx-tw/input';\n\n/**\n * Turns a plain `<input twInput twNumberInput>` into a robust numeric field\n * without `type=\"number\"` — fixing the broken-on-mobile, browser-inconsistent\n * native control. It composes the sibling {@link InputDirective}: that directive\n * keeps owning the form-field chrome, error-state, and `aria-invalid` /\n * `aria-required`, while this directive owns the numeric value transport,\n * locale-aware parse/format, spinbutton ARIA, `inputmode`, and keyboard stepping.\n *\n * Pair it with the companion `<tw-number-stepper [for]=\"ref\">` for visible\n * up/down spinner buttons.\n *\n * Forms: implements `ControlValueAccessor`, so the value round-trips as a real\n * `number | null` (never a string) through template-driven, reactive, and\n * signal-based forms.\n */\n@Directive({\n selector: 'input[twNumberInput]',\n exportAs: 'twNumberInput',\n providers: [\n // Custom CVA — transports a real `number | null`, not a string. Registered\n // statically because this directive injects NO `NgControl` (matcher /\n // error-state stay on the sibling InputDirective), so the circular-DI trap\n // that forces runtime registration does not apply. Follows the\n // segmented-control / calendar precedent. A custom accessor takes precedence\n // over the built-in DefaultValueAccessor, so there is no \"more than one\n // value accessor\" error.\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberInputDirective),\n multi: true,\n },\n // Lets the sibling InputDirective read the formatted *display text* (not the\n // numeric model) for its empty / float-label state. The factory exposes the\n // `displayText` signal so InputDirective's `isSignal(value)` effect stays\n // self-healing. Must NOT be `useExisting` — that would expose the numeric\n // `value` signal and report the field empty during intermediate typing.\n {\n provide: TW_INPUT_VALUE_ACCESSOR,\n useFactory: (dir: NumberInputDirective) => ({ value: dir.displayText }),\n deps: [forwardRef(() => NumberInputDirective)],\n },\n ],\n host: {\n 'role': 'spinbutton',\n '[attr.inputmode]': 'inputMode()',\n '[attr.aria-valuemin]': 'min() ?? null',\n '[attr.aria-valuemax]': 'max() ?? null',\n '[attr.aria-valuenow]': 'value() ?? null',\n '[attr.aria-valuetext]': 'displayText() || \"Empty\"',\n '(input)': 'onInput()',\n '(keydown)': 'onKeydown($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n },\n})\nexport class NumberInputDirective implements ControlValueAccessor {\n private readonly el =\n inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n // ── Inputs ──\n\n /** Smallest accepted value. Clamps the committed value (on blur, Enter, and stepping) and sets `aria-valuemin`. Does not clamp per keystroke. Defaults to `undefined` (no lower bound). */\n readonly min = input<number | undefined>(undefined);\n\n /** Largest accepted value. Clamps the committed value (on blur, Enter, and stepping) and sets `aria-valuemax`. Does not clamp per keystroke. Defaults to `undefined` (no upper bound). */\n readonly max = input<number | undefined>(undefined);\n\n /** Amount added or subtracted by ArrowUp/ArrowDown and the stepper buttons. Defaults to `1`. Values `<= 0` or non-finite fall back to `1`. */\n readonly step = input<number>(1);\n\n /** `Intl.NumberFormat` options driving the blurred display (grouping, decimals, currency). The formatter's resolved `maximumFractionDigits` also sets commit-time rounding precision and switches `inputmode` to `'numeric'` when it is `0`. Percent style is not supported in v1. Defaults to `undefined` (locale default number formatting, grouping on). */\n readonly format = input<Intl.NumberFormatOptions | undefined>(undefined);\n\n /** BCP-47 locale for `Intl.NumberFormat` formatting and for locale-aware parsing (decimal and group separators). Defaults to `undefined` (the runtime default locale). */\n readonly locale = input<string | undefined>(undefined);\n\n // ── Output ──\n\n /** Fires when the committed numeric value changes through user interaction (typing, stepping, clamping on blur/Enter). Does not fire on `writeValue` (programmatic form writes). Useful for non-form / template-ref usage alongside the `value` signal. */\n readonly valueChange = output<number | null>();\n\n // ── State ──\n\n private readonly _value = signal<number | null>(null);\n private readonly cvaDisabled = signal(false);\n private readonly readonlySig = signal(false);\n\n /** The current committed numeric value, or `null` when empty / unparseable. Read this from a template ref (`#n=\"twNumberInput\"`) for non-form usage. */\n readonly value = this._value.asReadonly();\n\n /** @internal Formatted display text surfaced through `TW_INPUT_VALUE_ACCESSOR` so the sibling InputDirective's empty / float-label state tracks the text in the box (not the numeric model). Updated on every field mutation. */\n readonly displayText = signal<string>('');\n\n /** True when the control is disabled. Reactively tracks the reactive-forms path (`setDisabledState` via `control.disable()`) and a static `disabled` attribute read at mount. A runtime-toggled declarative `[disabled]` binding without reactive forms is NOT reactively tracked (v2 limitation — same class as `readonly`). Read by the companion stepper so its buttons disable in lock-step. */\n readonly disabled = computed(() => this.cvaDisabled() || this.el.disabled);\n\n /** True when the host input carries the `readonly` attribute (static / declarative, seeded after render). A runtime toggle of the bare `readonly` attribute is not reactively tracked (v2). Read by the companion stepper so its buttons disable in lock-step. */\n readonly readonly = this.readonlySig.asReadonly();\n\n /** @internal Mobile-keyboard hint: `'numeric'` for integer-only formats, else `'decimal'`. */\n readonly inputMode = computed(() =>\n this.format()?.maximumFractionDigits === 0 ? 'numeric' : 'decimal',\n );\n\n /** @internal Locale group / decimal separators, memoized per `locale()`. */\n private readonly separators = computed<{ group: string; decimal: string }>(\n () => {\n try {\n const parts = new Intl.NumberFormat(this.locale()).formatToParts(\n 11000.1,\n );\n return {\n group: parts.find((p) => p.type === 'group')?.value ?? '',\n decimal: parts.find((p) => p.type === 'decimal')?.value ?? '.',\n };\n } catch {\n return { group: '', decimal: '.' };\n }\n },\n );\n\n // ── Plain (non-signal) bookkeeping ──\n\n private _focused = false;\n private _lastValue: number | null = null;\n private _lastDisplay = '';\n private onChange: (value: number | null) => void = () => {};\n private onTouched: () => void = () => {};\n\n constructor() {\n // Seed `readonly` after render. InputDirective mirrors its `readonly` input\n // onto the native attribute via an effect that runs AFTER construction\n // (input.ts:330-337), so a synchronous read here would be stale.\n afterNextRender(() => this.readonlySig.set(this.el.readOnly));\n\n // Dev-mode: warn once on a bogus step (mirrors time-picker).\n afterNextRender(() => {\n if (!isDevMode()) return;\n const s = this.step();\n if (s <= 0 || !Number.isFinite(s)) {\n console.warn(`[twNumberInput] step=${s} is invalid. Using 1 instead.`);\n }\n });\n }\n\n // ── ControlValueAccessor ──\n\n /** @internal */\n writeValue(value: number | null | undefined): void {\n if (value == null || Number.isNaN(value)) {\n this._value.set(null);\n this.displayText.set('');\n this._lastValue = null;\n this._lastDisplay = '';\n if (!this._focused) this.el.value = '';\n return;\n }\n // Normalize -0 → 0 (never store a negative zero); otherwise keep the value\n // un-rounded — a programmatic write is authoritative and must not silently\n // diverge from the parent FormControl.\n const n = Object.is(value, -0) ? 0 : value;\n const display = this.formatValue(n);\n this._value.set(n);\n this.displayText.set(display);\n // Update the revert anchor even while focused, so an unparseable blur after\n // a programmatic write snaps back to the form's value (not to '').\n this._lastValue = n;\n this._lastDisplay = display;\n // Caret guard: never rewrite el.value while focused (clobbers the caret);\n // defer the visible reformat to the next blur.\n if (!this._focused) this.el.value = display;\n }\n\n /** @internal */\n registerOnChange(fn: (value: number | null) => void): void {\n this.onChange = fn;\n }\n\n /** @internal */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @internal */\n setDisabledState(isDisabled: boolean): void {\n this.cvaDisabled.set(isDisabled);\n }\n\n // ── Public methods ──\n\n /** Steps the value up: treats an empty field as `0`, adds `step`, clamps to `[min,max]`, rounds to the formatter's resolved precision, formats, and writes both the display and the model. Emits `valueChange`. No-op when the host input is disabled or readonly. Does not move focus. */\n increment(): void {\n this.stepBy(1);\n }\n\n /** Steps the value down: treats an empty field as `0`, subtracts `step`, clamps to `[min,max]`, rounds, formats, writes display and model. Emits `valueChange`. No-op when disabled or readonly. Does not move focus. */\n decrement(): void {\n this.stepBy(-1);\n }\n\n /** Moves focus to the underlying input element. */\n focus(options?: FocusOptions): void {\n this.el.focus(options);\n }\n\n // ── Host handlers ──\n\n /** @internal */\n onInput(): void {\n const raw = this.el.value;\n this.displayText.set(raw);\n const parsed = this.parseValue(raw);\n this._value.set(parsed);\n this.onChange(parsed);\n this.valueChange.emit(parsed);\n }\n\n /** @internal */\n onFocus(): void {\n this._focused = true;\n }\n\n /** @internal */\n onBlur(): void {\n this._focused = false;\n this.commitFromElement();\n this.onTouched();\n }\n\n /** @internal */\n onKeydown(event: KeyboardEvent): void {\n if (this.disabled() || this.el.readOnly) return;\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n this.increment();\n break;\n case 'ArrowDown':\n event.preventDefault();\n this.decrement();\n break;\n case 'Home':\n if (this.min() !== undefined) {\n event.preventDefault();\n this.commitNumber(this.min() as number);\n }\n break;\n case 'End':\n if (this.max() !== undefined) {\n event.preventDefault();\n this.commitNumber(this.max() as number);\n }\n break;\n case 'Enter':\n // Do NOT preventDefault — preserve native form submission. Commit in place.\n this.commitFromElement();\n break;\n // All other keys (PageUp/Down, text entry, caret nav, Backspace) → native.\n }\n }\n\n // ── Internal commit / step logic ──\n\n private stepBy(direction: 1 | -1): void {\n if (this.disabled() || this.el.readOnly) return;\n // Treat an empty field as 0, apply ±step, then clamp — matches native\n // <input type=\"number\">.\n const current = this.parseValue(this.el.value) ?? 0;\n this.commitNumber(current + direction * this.resolvedStep());\n }\n\n private commitFromElement(): void {\n const raw = this.el.value;\n if (raw.trim() === '') {\n this.commitEmpty();\n return;\n }\n const parsed = this.parseValue(raw);\n if (parsed === null) {\n // Non-empty unparseable → snap back to the last committed value.\n this.revertToLastCommitted();\n return;\n }\n this.commitNumber(parsed);\n }\n\n private commitNumber(n: number): void {\n const rounded = this.roundToPrecision(this.clamp(n));\n const normalized = Object.is(rounded, -0) ? 0 : rounded;\n const display = this.formatValue(normalized);\n const changed = !Object.is(this._value(), normalized);\n this._value.set(normalized);\n this.displayText.set(display);\n this._lastValue = normalized;\n this._lastDisplay = display;\n this.el.value = display;\n if (changed) {\n this.onChange(normalized);\n this.valueChange.emit(normalized);\n }\n }\n\n private commitEmpty(): void {\n const changed = this._value() !== null;\n this._value.set(null);\n this.displayText.set('');\n this._lastValue = null;\n this._lastDisplay = '';\n this.el.value = '';\n if (changed) {\n this.onChange(null);\n this.valueChange.emit(null);\n }\n }\n\n private revertToLastCommitted(): void {\n const changed = this._value() !== this._lastValue;\n this._value.set(this._lastValue);\n this.displayText.set(this._lastDisplay);\n this.el.value = this._lastDisplay;\n if (changed) {\n this.onChange(this._lastValue);\n this.valueChange.emit(this._lastValue);\n }\n }\n\n // ── Inline numeric helpers ──\n\n private resolvedStep(): number {\n const s = this.step();\n return s > 0 && Number.isFinite(s) ? s : 1;\n }\n\n private clamp(n: number): number {\n const min = this.min();\n const max = this.max();\n let r = n;\n if (min !== undefined && r < min) r = min;\n if (max !== undefined && r > max) r = max;\n return r;\n }\n\n private roundToPrecision(n: number): number {\n if (!Number.isFinite(n)) return n;\n const digits = this.resolvedMaxFractionDigits();\n if (digits === undefined) return n;\n const factor = 10 ** digits;\n return Math.round(n * factor) / factor;\n }\n\n private resolvedMaxFractionDigits(): number | undefined {\n try {\n return new Intl.NumberFormat(\n this.locale(),\n this.format(),\n ).resolvedOptions().maximumFractionDigits;\n } catch {\n return undefined;\n }\n }\n\n private formatValue(n: number): string {\n const normalized = Object.is(n, -0) ? 0 : n;\n try {\n return new Intl.NumberFormat(this.locale(), this.format()).format(\n normalized,\n );\n } catch {\n return String(normalized);\n }\n }\n\n /**\n * Parse a raw string to `number | null` in a load-bearing order: the `e`/`E`\n * rejection MUST precede stripping (otherwise `'1e3'` would survive as `'13'`).\n */\n private parseValue(raw: string): number | null {\n const trimmed = raw.trim();\n if (trimmed === '') return null;\n // 2. Reject exponent notation before any stripping.\n if (/[eE]/.test(trimmed)) return null;\n const { group, decimal } = this.separators();\n // 3. Strip all Unicode whitespace (covers NBSP / narrow-NBSP group separators\n // and a user-typed ASCII space alike).\n let s = trimmed.replace(/\\s/gu, '');\n // 4. Strip group separators (redundant-but-harmless for space-grouped locales).\n if (group) s = s.split(group).join('');\n // 5. Normalize the locale decimal separator to '.'.\n if (decimal && decimal !== '.') s = s.split(decimal).join('.');\n // 6. Strip remaining non-numeric chars (currency symbols, '%', leading '+', …)\n // and collapse to a single leading '-'.\n s = s.replace(/[^\\d.-]/g, '').replace(/(?!^)-/g, '');\n // 7. Digit-presence + finiteness guard (prevents Number('') === 0 committing 0).\n if (!/\\d/.test(s)) return null;\n const n = Number(s);\n if (!Number.isFinite(n)) return null;\n // Normalize -0 → 0 so it never enters the model from any path.\n return Object.is(n, -0) ? 0 : n;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport { tv } from 'tailwind-variants';\nimport type { TwSize } from '@cdevhub/ngx-tw/core';\nimport type { NumberInputDirective } from './number-input';\n\nconst numberStepper = tv(\n {\n slots: {\n // The column stretches to the field's height (host is `flex self-stretch`)\n // and the two buttons split it via `flex-1`.\n group: 'flex flex-col self-stretch',\n // `flex-1` gives each button HALF the field height. Codified departure\n // from CLAUDE.md \"Square interactive targets\" (size-6/7/8): stacking two\n // square buttons made the column 2× a button tall — far taller than the\n // text line — which is exactly what bloated the field's height. So the\n // buttons carry a fixed WIDTH only; the chevron glyph's min-content\n // (size-3 = 12px) is the natural floor that keeps the column compact.\n //\n // WCAG 2.5.8 (target-size, 24px — which slider.ts / badge.ts codify):\n // two stacked buttons cannot each be ≥24px tall inside a ~38–42px field\n // without re-bloating it, so each spinner ends up < 24px tall. The\n // equivalent-control exception covers most cases — the value is reachable\n // by typing into the ≥24px spinbutton input and, with a keyboard, via ↑/↓.\n // Known gap: a negative-allowed field on touch — iOS `inputmode`\n // numeric/decimal exposes no minus key and there are no hardware arrows,\n // so the sub-24px decrement button becomes the only path to a negative\n // value; a consumer needing negatives on touch must provide an alternative.\n // Matches the sub-24px stacked-spinner convention of native/Mantine/Chakra.\n button:\n 'flex-1 inline-flex items-center justify-center text-fg-muted hover:text-fg hover:bg-surface-muted rounded-md transition-colors duration-normal motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:opacity-40 disabled:pointer-events-none',\n icon: '',\n },\n variants: {\n // Button WIDTH (the height comes from `flex-1`); glyph sub-scale for the\n // chevrons (per CLAUDE.md \"Icon Sizing\").\n size: {\n xs: { button: 'w-6', icon: 'size-3' },\n sm: { button: 'w-7', icon: 'size-3' },\n md: { button: 'w-7', icon: 'size-3' },\n lg: { button: 'w-8', icon: 'size-4' },\n xl: { button: 'w-8', icon: 'size-4' },\n },\n },\n defaultVariants: { size: 'md' },\n },\n { twMerge: true },\n);\n\n/**\n * The visible up/down spinner column for a {@link NumberInputDirective}. A\n * directive cannot emit sibling DOM, so the spinner buttons live in this tiny\n * companion. Bind it to the directive via a template ref and drop it into a\n * `<tw-form-field>`'s `[twSuffix]` slot (or a standalone flex row):\n *\n * ```html\n * <input twInput twNumberInput #qty=\"twNumberInput\" [formControl]=\"ctrl\" />\n * <tw-number-stepper twSuffix [for]=\"qty\" />\n * ```\n *\n * The buttons are kept out of the tab order (`tabindex=\"-1\"`) — the spinbutton\n * input owns value + keyboard semantics — and refocus the input after stepping.\n */\n@Component({\n selector: 'tw-number-stepper',\n exportAs: 'twNumberStepper',\n changeDetection: ChangeDetectionStrategy.OnPush,\n // `flex` makes the inner group fill the host; `self-stretch` makes the host\n // fill the field height — overriding `items-center` in a `<tw-form-field>`\n // `[twSuffix]` slot, and matching `items-stretch` in a standalone flex row.\n host: {\n 'class': 'flex self-stretch',\n },\n template: `\n <div [class]=\"groupClasses()\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Increase\"\n [class]=\"buttonClasses()\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onStep(1)\"\n >\n <ng-content select=\"[slot=up]\">\n <svg\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n [class]=\"iconClasses()\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M14.77 12.79a.75.75 0 0 1-1.06-.02L10 8.94l-3.71 3.83a.75.75 0 1 1-1.08-1.04l4.25-4.39a.75.75 0 0 1 1.08 0l4.25 4.39a.75.75 0 0 1-.02 1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </ng-content>\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Decrease\"\n [class]=\"buttonClasses()\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onStep(-1)\"\n >\n <ng-content select=\"[slot=down]\">\n <svg\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n [class]=\"iconClasses()\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.06l3.71-3.83a.75.75 0 1 1 1.08 1.04l-4.25 4.39a.75.75 0 0 1-1.08 0L5.21 8.27a.75.75 0 0 1 .02-1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </ng-content>\n </button>\n </div>\n `,\n})\nexport class NumberStepperComponent {\n /** The number-input directive instance this stepper controls. Bind to a template ref, e.g. `[for]=\"qty\"` with `#qty=\"twNumberInput\"`. When omitted, the buttons render but do nothing (no-op) and disable. */\n readonly for = input<NumberInputDirective | undefined>(undefined);\n\n /** Button + glyph density. Match the field's `size` for visual alignment. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n private readonly variant = computed(() => numberStepper({ size: this.size() }));\n\n /** @internal */\n readonly groupClasses = computed(() => this.variant().group());\n\n /** @internal */\n readonly buttonClasses = computed(() => this.variant().button());\n\n /** @internal */\n readonly iconClasses = computed(() => this.variant().icon());\n\n /** @internal Disabled when there is no target, or the target input is disabled / readonly. */\n readonly isDisabled = computed(() => {\n const d = this.for();\n return !d || d.disabled() || d.readonly();\n });\n\n /** @internal Step the bound directive, then refocus the input (the refocus lives here, not in `increment`/`decrement`). */\n onStep(direction: 1 | -1): void {\n const dir = this.for();\n if (!dir) return;\n if (direction === 1) {\n dir.increment();\n } else {\n dir.decrement();\n }\n dir.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAeA;;;;;;;;;;;;;;AAcG;MAyCU,oBAAoB,CAAA;AACd,IAAA,EAAE,GACjB,MAAM,CAA+B,UAAU,CAAC,CAAC,aAAa;;;IAKvD,GAAG,GAAG,KAAK,CAAqB,SAAS;4EAAC;;IAG1C,GAAG,GAAG,KAAK,CAAqB,SAAS;4EAAC;;IAG1C,IAAI,GAAG,KAAK,CAAS,CAAC;6EAAC;;IAGvB,MAAM,GAAG,KAAK,CAAuC,SAAS;+EAAC;;IAG/D,MAAM,GAAG,KAAK,CAAqB,SAAS;+EAAC;;;IAK7C,WAAW,GAAG,MAAM,EAAiB;;IAI7B,MAAM,GAAG,MAAM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,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,mBAAA,EAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EArDvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBA/DlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,iBAAiB;oBAC3B,eAAe,EAAE,uBAAuB,CAAC,MAAM;;;;AAI/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,OAAO,EAAE,mBAAmB;AAC7B,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDT,EAAA,CAAA;AACF,iBAAA;;;ACjID;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-number-input.mjs","sources":["../../../projects/ngx-tw/number-input/number-input.ts","../../../projects/ngx-tw/number-input/number-stepper.ts","../../../projects/ngx-tw/number-input/cdevhub-ngx-tw-number-input.ts"],"sourcesContent":["import {\n afterNextRender,\n computed,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n output,\n signal,\n} from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TW_INPUT_VALUE_ACCESSOR } from '@cdevhub/ngx-tw/input';\n\n/**\n * Turns a plain `<input twInput twNumberInput>` into a robust numeric field\n * without `type=\"number\"` — fixing the broken-on-mobile, browser-inconsistent\n * native control. It composes the sibling {@link InputDirective}: that directive\n * keeps owning the form-field chrome, error-state, and `aria-invalid` /\n * `aria-required`, while this directive owns the numeric value transport,\n * locale-aware parse/format, spinbutton ARIA, `inputmode`, and keyboard stepping.\n *\n * Pair it with the companion `<tw-number-stepper [for]=\"ref\">` for visible\n * up/down spinner buttons.\n *\n * Forms: implements `ControlValueAccessor`, so the value round-trips as a real\n * `number | null` (never a string) through template-driven, reactive, and\n * signal-based forms.\n */\n@Directive({\n selector: 'input[twNumberInput]',\n exportAs: 'twNumberInput',\n providers: [\n // Custom CVA — transports a real `number | null`, not a string. Registered\n // statically because this directive injects NO `NgControl` (matcher /\n // error-state stay on the sibling InputDirective), so the circular-DI trap\n // that forces runtime registration does not apply. Follows the\n // segmented-control / calendar precedent. A custom accessor takes precedence\n // over the built-in DefaultValueAccessor, so there is no \"more than one\n // value accessor\" error.\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberInputDirective),\n multi: true,\n },\n // Lets the sibling InputDirective read the formatted *display text* (not the\n // numeric model) for its empty / float-label state. The factory exposes the\n // `displayText` signal so InputDirective's `isSignal(value)` effect stays\n // self-healing. Must NOT be `useExisting` — that would expose the numeric\n // `value` signal and report the field empty during intermediate typing.\n {\n provide: TW_INPUT_VALUE_ACCESSOR,\n useFactory: (dir: NumberInputDirective) => ({ value: dir.displayText }),\n deps: [forwardRef(() => NumberInputDirective)],\n },\n ],\n host: {\n 'role': 'spinbutton',\n '[attr.inputmode]': 'inputMode()',\n '[attr.aria-valuemin]': 'min() ?? null',\n '[attr.aria-valuemax]': 'max() ?? null',\n '[attr.aria-valuenow]': 'value() ?? null',\n '[attr.aria-valuetext]': 'displayText() || \"Empty\"',\n '[attr.aria-disabled]': 'ariaDisabled()',\n '(input)': 'onInput()',\n '(keydown)': 'onKeydown($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n },\n})\nexport class NumberInputDirective implements ControlValueAccessor {\n private readonly el =\n inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n // ── Inputs ──\n\n /** Smallest accepted value. Clamps the committed value (on blur, Enter, and stepping) and sets `aria-valuemin`. Does not clamp per keystroke. Defaults to `undefined` (no lower bound). */\n readonly min = input<number | undefined>(undefined);\n\n /** Largest accepted value. Clamps the committed value (on blur, Enter, and stepping) and sets `aria-valuemax`. Does not clamp per keystroke. Defaults to `undefined` (no upper bound). */\n readonly max = input<number | undefined>(undefined);\n\n /** Amount added or subtracted by ArrowUp/ArrowDown and the stepper buttons. Defaults to `1`. Values `<= 0` or non-finite fall back to `1`. */\n readonly step = input<number>(1);\n\n /** `Intl.NumberFormat` options driving the blurred display (grouping, decimals, currency). The formatter's resolved `maximumFractionDigits` also sets commit-time rounding precision and switches `inputmode` to `'numeric'` when it is `0`. Percent style is not supported in v1. Defaults to `undefined` (locale default number formatting, grouping on). */\n readonly format = input<Intl.NumberFormatOptions | undefined>(undefined);\n\n /** BCP-47 locale for `Intl.NumberFormat` formatting and for locale-aware parsing (decimal and group separators). Defaults to `undefined` (the runtime default locale). */\n readonly locale = input<string | undefined>(undefined);\n\n // ── Output ──\n\n /** Fires when the committed numeric value changes through user interaction (typing, stepping, clamping on blur/Enter). Does not fire on `writeValue` (programmatic form writes). Useful for non-form / template-ref usage alongside the `value` signal. */\n readonly valueChange = output<number | null>();\n\n // ── State ──\n\n private readonly _value = signal<number | null>(null);\n private readonly cvaDisabled = signal(false);\n private readonly readonlySig = signal(false);\n\n /** The current committed numeric value, or `null` when empty / unparseable. Read this from a template ref (`#n=\"twNumberInput\"`) for non-form usage. */\n readonly value = this._value.asReadonly();\n\n /** @internal Formatted display text surfaced through `TW_INPUT_VALUE_ACCESSOR` so the sibling InputDirective's empty / float-label state tracks the text in the box (not the numeric model). Updated on every field mutation. */\n readonly displayText = signal<string>('');\n\n /** True when the control is disabled. Reactively tracks the reactive-forms path (`setDisabledState` via `control.disable()`) and a static `disabled` attribute read at mount. A runtime-toggled declarative `[disabled]` binding without reactive forms is NOT reactively tracked (v2 limitation — same class as `readonly`). Read by the companion stepper so its buttons disable in lock-step. */\n readonly disabled = computed(() => this.cvaDisabled() || this.el.disabled);\n\n /** True when the host input carries the `readonly` attribute (static / declarative, seeded after render). A runtime toggle of the bare `readonly` attribute is not reactively tracked (v2). Read by the companion stepper so its buttons disable in lock-step. */\n readonly readonly = this.readonlySig.asReadonly();\n\n /**\n * @internal `aria-disabled` for the host `<input>`.\n *\n * Derived from the CVA disabled state ALONE, deliberately not from\n * {@link disabled}. Three reasons, in order of weight:\n *\n * 1. It is the only case that needs the attribute. When the element is\n * natively disabled (`el.disabled`, whether from a static attribute or\n * from the sibling `InputDirective`'s `[disabled]` binding) assistive tech\n * already has the state. The gap is `setDisabledState(true)` on a\n * standalone `input[twNumberInput]` — no sibling directive, so nothing\n * writes the native property and the spinbutton looked enabled.\n * 2. `disabled` reads the non-reactive `el.disabled`. Read from a host\n * binding it would memoize during the host-binding phase, so its value\n * would depend on which of the two directives on the element runs first —\n * and could latch a stale `true` across a `control.enable()`.\n * 3. `[disabled]` itself is not an option: `InputDirective` already binds it,\n * and this directive's `disabled` reads the very property it would write.\n */\n readonly ariaDisabled = computed(() => (this.cvaDisabled() ? 'true' : null));\n\n /** @internal Mobile-keyboard hint: `'numeric'` for integer-only formats, else `'decimal'`. */\n readonly inputMode = computed(() =>\n this.format()?.maximumFractionDigits === 0 ? 'numeric' : 'decimal',\n );\n\n /** @internal Locale group / decimal separators, memoized per `locale()`. */\n private readonly separators = computed<{ group: string; decimal: string }>(\n () => {\n try {\n const parts = new Intl.NumberFormat(this.locale()).formatToParts(\n 11000.1,\n );\n return {\n group: parts.find((p) => p.type === 'group')?.value ?? '',\n decimal: parts.find((p) => p.type === 'decimal')?.value ?? '.',\n };\n } catch {\n return { group: '', decimal: '.' };\n }\n },\n );\n\n // ── Plain (non-signal) bookkeeping ──\n\n private _focused = false;\n private _lastValue: number | null = null;\n private _lastDisplay = '';\n private onChange: (value: number | null) => void = () => {};\n private onTouched: () => void = () => {};\n\n constructor() {\n // Seed `readonly` after render. InputDirective mirrors its `readonly` input\n // onto the native attribute via an effect that runs AFTER construction\n // (input.ts:330-337), so a synchronous read here would be stale.\n afterNextRender(() => this.readonlySig.set(this.el.readOnly));\n\n // Dev-mode: warn once on a bogus step (mirrors time-picker).\n afterNextRender(() => {\n if (!isDevMode()) return;\n const s = this.step();\n if (s <= 0 || !Number.isFinite(s)) {\n console.warn(`[twNumberInput] step=${s} is invalid. Using 1 instead.`);\n }\n });\n }\n\n // ── ControlValueAccessor ──\n\n /** @internal */\n writeValue(value: number | null | undefined): void {\n if (value == null || Number.isNaN(value)) {\n this._value.set(null);\n this.displayText.set('');\n this._lastValue = null;\n this._lastDisplay = '';\n if (!this._focused) this.el.value = '';\n return;\n }\n // Normalize -0 → 0 (never store a negative zero); otherwise keep the value\n // un-rounded — a programmatic write is authoritative and must not silently\n // diverge from the parent FormControl.\n const n = Object.is(value, -0) ? 0 : value;\n const display = this.formatValue(n);\n this._value.set(n);\n this.displayText.set(display);\n // Update the revert anchor even while focused, so an unparseable blur after\n // a programmatic write snaps back to the form's value (not to '').\n this._lastValue = n;\n this._lastDisplay = display;\n // Caret guard: never rewrite el.value while focused (clobbers the caret);\n // defer the visible reformat to the next blur.\n if (!this._focused) this.el.value = display;\n }\n\n /** @internal */\n registerOnChange(fn: (value: number | null) => void): void {\n this.onChange = fn;\n }\n\n /** @internal */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @internal */\n setDisabledState(isDisabled: boolean): void {\n this.cvaDisabled.set(isDisabled);\n }\n\n // ── Public methods ──\n\n /** Steps the value up: treats an empty field as `0`, adds `step`, clamps to `[min,max]`, rounds to the formatter's resolved precision, formats, and writes both the display and the model. Emits `valueChange`. No-op when the host input is disabled or readonly. Does not move focus. */\n increment(): void {\n this.stepBy(1);\n }\n\n /** Steps the value down: treats an empty field as `0`, subtracts `step`, clamps to `[min,max]`, rounds, formats, writes display and model. Emits `valueChange`. No-op when disabled or readonly. Does not move focus. */\n decrement(): void {\n this.stepBy(-1);\n }\n\n /** Moves focus to the underlying input element. */\n focus(options?: FocusOptions): void {\n this.el.focus(options);\n }\n\n // ── Host handlers ──\n\n /** @internal */\n onInput(): void {\n // Same gate as `onKeydown` / `stepBy`. Without it a control disabled through\n // `setDisabledState` — which does not set the native `disabled` property\n // when `twNumberInput` is used without the sibling `twInput` — still wrote\n // every keystroke into the form model and emitted `valueChange`.\n if (this.disabled() || this.el.readOnly) return;\n const raw = this.el.value;\n this.displayText.set(raw);\n const parsed = this.parseValue(raw);\n this._value.set(parsed);\n this.onChange(parsed);\n this.valueChange.emit(parsed);\n }\n\n /** @internal */\n onFocus(): void {\n this._focused = true;\n }\n\n /** @internal */\n onBlur(): void {\n this._focused = false;\n this.commitFromElement();\n this.onTouched();\n }\n\n /** @internal */\n onKeydown(event: KeyboardEvent): void {\n if (this.disabled() || this.el.readOnly) return;\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n this.increment();\n break;\n case 'ArrowDown':\n event.preventDefault();\n this.decrement();\n break;\n case 'Home':\n if (this.min() !== undefined) {\n event.preventDefault();\n this.commitNumber(this.min() as number);\n }\n break;\n case 'End':\n if (this.max() !== undefined) {\n event.preventDefault();\n this.commitNumber(this.max() as number);\n }\n break;\n case 'Enter':\n // Do NOT preventDefault — preserve native form submission. Commit in place.\n this.commitFromElement();\n break;\n // All other keys (PageUp/Down, text entry, caret nav, Backspace) → native.\n }\n }\n\n // ── Internal commit / step logic ──\n\n private stepBy(direction: 1 | -1): void {\n if (this.disabled() || this.el.readOnly) return;\n // Treat an empty field as 0, apply ±step, then clamp — matches native\n // <input type=\"number\">.\n const current = this.parseValue(this.el.value) ?? 0;\n this.commitNumber(current + direction * this.resolvedStep());\n }\n\n private commitFromElement(): void {\n // Blur and Enter both land here. A disabled control must not commit — the\n // `readOnly` half is deliberately NOT gated: a readonly field still\n // reformats its display on blur, which is existing behaviour.\n if (this.disabled()) return;\n const raw = this.el.value;\n if (raw.trim() === '') {\n this.commitEmpty();\n return;\n }\n const parsed = this.parseValue(raw);\n if (parsed === null) {\n // Non-empty unparseable → snap back to the last committed value.\n this.revertToLastCommitted();\n return;\n }\n this.commitNumber(parsed);\n }\n\n private commitNumber(n: number): void {\n const rounded = this.roundToPrecision(this.clamp(n));\n const normalized = Object.is(rounded, -0) ? 0 : rounded;\n const display = this.formatValue(normalized);\n const changed = !Object.is(this._value(), normalized);\n this._value.set(normalized);\n this.displayText.set(display);\n this._lastValue = normalized;\n this._lastDisplay = display;\n this.el.value = display;\n if (changed) {\n this.onChange(normalized);\n this.valueChange.emit(normalized);\n }\n }\n\n private commitEmpty(): void {\n const changed = this._value() !== null;\n this._value.set(null);\n this.displayText.set('');\n this._lastValue = null;\n this._lastDisplay = '';\n this.el.value = '';\n if (changed) {\n this.onChange(null);\n this.valueChange.emit(null);\n }\n }\n\n private revertToLastCommitted(): void {\n const changed = this._value() !== this._lastValue;\n this._value.set(this._lastValue);\n this.displayText.set(this._lastDisplay);\n this.el.value = this._lastDisplay;\n if (changed) {\n this.onChange(this._lastValue);\n this.valueChange.emit(this._lastValue);\n }\n }\n\n // ── Inline numeric helpers ──\n\n private resolvedStep(): number {\n const s = this.step();\n return s > 0 && Number.isFinite(s) ? s : 1;\n }\n\n private clamp(n: number): number {\n const min = this.min();\n const max = this.max();\n let r = n;\n if (min !== undefined && r < min) r = min;\n if (max !== undefined && r > max) r = max;\n return r;\n }\n\n private roundToPrecision(n: number): number {\n if (!Number.isFinite(n)) return n;\n const digits = this.resolvedMaxFractionDigits();\n if (digits === undefined) return n;\n const factor = 10 ** digits;\n return Math.round(n * factor) / factor;\n }\n\n private resolvedMaxFractionDigits(): number | undefined {\n try {\n return new Intl.NumberFormat(\n this.locale(),\n this.format(),\n ).resolvedOptions().maximumFractionDigits;\n } catch {\n return undefined;\n }\n }\n\n private formatValue(n: number): string {\n const normalized = Object.is(n, -0) ? 0 : n;\n try {\n return new Intl.NumberFormat(this.locale(), this.format()).format(\n normalized,\n );\n } catch {\n return String(normalized);\n }\n }\n\n /**\n * Parse a raw string to `number | null` in a load-bearing order: the `e`/`E`\n * rejection MUST precede stripping (otherwise `'1e3'` would survive as `'13'`).\n */\n private parseValue(raw: string): number | null {\n const trimmed = raw.trim();\n if (trimmed === '') return null;\n // 2. Reject exponent notation before any stripping.\n if (/[eE]/.test(trimmed)) return null;\n const { group, decimal } = this.separators();\n // 3. Strip all Unicode whitespace (covers NBSP / narrow-NBSP group separators\n // and a user-typed ASCII space alike).\n let s = trimmed.replace(/\\s/gu, '');\n // 4. Strip group separators (redundant-but-harmless for space-grouped locales).\n if (group) s = s.split(group).join('');\n // 5. Normalize the locale decimal separator to '.'.\n if (decimal && decimal !== '.') s = s.split(decimal).join('.');\n // 6. Strip remaining non-numeric chars (currency symbols, '%', leading '+', …)\n // and collapse to a single leading '-'.\n s = s.replace(/[^\\d.-]/g, '').replace(/(?!^)-/g, '');\n // 7. Digit-presence + finiteness guard (prevents Number('') === 0 committing 0).\n if (!/\\d/.test(s)) return null;\n const n = Number(s);\n if (!Number.isFinite(n)) return null;\n // Normalize -0 → 0 so it never enters the model from any path.\n return Object.is(n, -0) ? 0 : n;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core';\nimport { tv } from 'tailwind-variants';\nimport type { TwSize } from '@cdevhub/ngx-tw/core';\nimport type { NumberInputDirective } from './number-input';\n\nconst numberStepper = tv(\n {\n slots: {\n // The column stretches to the field's height (host is `flex self-stretch`)\n // and the two buttons split it via `flex-1`.\n group: 'flex flex-col self-stretch',\n // `flex-1` gives each button HALF the field height. Codified departure\n // from CLAUDE.md \"Square interactive targets\" (size-6/7/8): stacking two\n // square buttons made the column 2× a button tall — far taller than the\n // text line — which is exactly what bloated the field's height. So the\n // buttons carry a fixed WIDTH only; the chevron glyph's min-content\n // (size-3 = 12px) is the natural floor that keeps the column compact.\n //\n // WCAG 2.5.8 (target-size, 24px — which slider.ts / badge.ts codify):\n // two stacked buttons cannot each be ≥24px tall inside a ~38–42px field\n // without re-bloating it, so each spinner ends up < 24px tall. The\n // equivalent-control exception covers most cases — the value is reachable\n // by typing into the ≥24px spinbutton input and, with a keyboard, via ↑/↓.\n // Known gap: a negative-allowed field on touch — iOS `inputmode`\n // numeric/decimal exposes no minus key and there are no hardware arrows,\n // so the sub-24px decrement button becomes the only path to a negative\n // value; a consumer needing negatives on touch must provide an alternative.\n // Matches the sub-24px stacked-spinner convention of native/Mantine/Chakra.\n button:\n 'flex-1 inline-flex items-center justify-center text-fg-muted hover:text-fg hover:bg-surface-muted rounded-md transition-colors duration-normal motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:opacity-40 disabled:pointer-events-none',\n icon: '',\n },\n variants: {\n // Button WIDTH (the height comes from `flex-1`); glyph sub-scale for the\n // chevrons (per CLAUDE.md \"Icon Sizing\").\n size: {\n xs: { button: 'w-6', icon: 'size-3' },\n sm: { button: 'w-7', icon: 'size-3' },\n md: { button: 'w-7', icon: 'size-3' },\n lg: { button: 'w-8', icon: 'size-4' },\n xl: { button: 'w-8', icon: 'size-4' },\n },\n },\n defaultVariants: { size: 'md' },\n },\n { twMerge: true },\n);\n\n/**\n * The visible up/down spinner column for a {@link NumberInputDirective}. A\n * directive cannot emit sibling DOM, so the spinner buttons live in this tiny\n * companion. Bind it to the directive via a template ref and drop it into a\n * `<tw-form-field>`'s `[twSuffix]` slot (or a standalone flex row):\n *\n * ```html\n * <input twInput twNumberInput #qty=\"twNumberInput\" [formControl]=\"ctrl\" />\n * <tw-number-stepper twSuffix [for]=\"qty\" />\n * ```\n *\n * The buttons are kept out of the tab order (`tabindex=\"-1\"`) — the spinbutton\n * input owns value + keyboard semantics — and refocus the input after stepping.\n */\n@Component({\n selector: 'tw-number-stepper',\n exportAs: 'twNumberStepper',\n changeDetection: ChangeDetectionStrategy.OnPush,\n // `flex` makes the inner group fill the host; `self-stretch` makes the host\n // fill the field height — overriding `items-center` in a `<tw-form-field>`\n // `[twSuffix]` slot, and matching `items-stretch` in a standalone flex row.\n host: {\n 'class': 'flex self-stretch',\n },\n template: `\n <div [class]=\"groupClasses()\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Increase\"\n [class]=\"buttonClasses()\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onStep(1)\"\n >\n <ng-content select=\"[slot=up]\">\n <svg\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n [class]=\"iconClasses()\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M14.77 12.79a.75.75 0 0 1-1.06-.02L10 8.94l-3.71 3.83a.75.75 0 1 1-1.08-1.04l4.25-4.39a.75.75 0 0 1 1.08 0l4.25 4.39a.75.75 0 0 1-.02 1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </ng-content>\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-label=\"Decrease\"\n [class]=\"buttonClasses()\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onStep(-1)\"\n >\n <ng-content select=\"[slot=down]\">\n <svg\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n [class]=\"iconClasses()\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.06l3.71-3.83a.75.75 0 1 1 1.08 1.04l-4.25 4.39a.75.75 0 0 1-1.08 0L5.21 8.27a.75.75 0 0 1 .02-1.06Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </ng-content>\n </button>\n </div>\n `,\n})\nexport class NumberStepperComponent {\n /** The number-input directive instance this stepper controls. Bind to a template ref, e.g. `[for]=\"qty\"` with `#qty=\"twNumberInput\"`. When omitted, the buttons render but do nothing (no-op) and disable. */\n readonly for = input<NumberInputDirective | undefined>(undefined);\n\n /** Button + glyph density. Match the field's `size` for visual alignment. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n private readonly variant = computed(() => numberStepper({ size: this.size() }));\n\n /** @internal */\n readonly groupClasses = computed(() => this.variant().group());\n\n /** @internal */\n readonly buttonClasses = computed(() => this.variant().button());\n\n /** @internal */\n readonly iconClasses = computed(() => this.variant().icon());\n\n /** @internal Disabled when there is no target, or the target input is disabled / readonly. */\n readonly isDisabled = computed(() => {\n const d = this.for();\n return !d || d.disabled() || d.readonly();\n });\n\n /** @internal Step the bound directive, then refocus the input (the refocus lives here, not in `increment`/`decrement`). */\n onStep(direction: 1 | -1): void {\n const dir = this.for();\n if (!dir) return;\n if (direction === 1) {\n dir.increment();\n } else {\n dir.decrement();\n }\n dir.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAeA;;;;;;;;;;;;;;AAcG;MA0CU,oBAAoB,CAAA;AACd,IAAA,EAAE,GACjB,MAAM,CAA+B,UAAU,CAAC,CAAC,aAAa;;;IAKvD,GAAG,GAAG,KAAK,CAAqB,SAAS;4EAAC;;IAG1C,GAAG,GAAG,KAAK,CAAqB,SAAS;4EAAC;;IAG1C,IAAI,GAAG,KAAK,CAAS,CAAC;6EAAC;;IAGvB,MAAM,GAAG,KAAK,CAAuC,SAAS;+EAAC;;IAG/D,MAAM,GAAG,KAAK,CAAqB,SAAS;+EAAC;;;IAK7C,WAAW,GAAG,MAAM,EAAiB;;IAI7B,MAAM,GAAG,MAAM,CAAgB,IAAI;+EAAC;IACpC,WAAW,GAAG,MAAM,CAAC,KAAK;oFAAC;IAC3B,WAAW,GAAG,MAAM,CAAC,KAAK;oFAAC;;AAGnC,IAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;;IAGhC,WAAW,GAAG,MAAM,CAAS,EAAE;oFAAC;;AAGhC,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC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