@ctrliq/quantic-components 1.63.1 → 1.63.3

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.
@@ -15,6 +15,7 @@ import { LucideIconCircleAlert } from '../icon/__generated__/lucide/circle-alert
15
15
  import { NumberInputSize } from './index.constants';
16
16
  import { A11yAttributesMixin } from '../shared/a11y-attributes.mixin';
17
17
  import { event, prop } from '../shared/component-meta.decorators';
18
+ import { emitValueChanged } from '../shared/shared.utils';
18
19
  export { NumberInputSize } from './index.constants';
19
20
  LucideIconChevronUp.ensureDefined();
20
21
  LucideIconChevronDown.ensureDefined();
@@ -48,6 +49,7 @@ let NumberInput = class NumberInput extends A11yAttributesMixin(QuanticElement)
48
49
  if (changedProperties.has('value')) {
49
50
  this.updateValidity();
50
51
  }
52
+ emitValueChanged(this, changedProperties, this.value);
51
53
  }
52
54
  stepUp() {
53
55
  this.inputRef.value?.stepUp();
@@ -60,12 +62,6 @@ let NumberInput = class NumberInput extends A11yAttributesMixin(QuanticElement)
60
62
  syncValue() {
61
63
  const raw = this.inputRef.value?.valueAsNumber;
62
64
  this.value = raw !== undefined && !isNaN(raw) ? raw : null;
63
- this.updateValidity();
64
- this.dispatchEvent(new CustomEvent('value-changed', {
65
- detail: { value: this.value },
66
- bubbles: true,
67
- composed: true,
68
- }));
69
65
  }
70
66
  updateValidity() {
71
67
  const inputEl = this.inputRef.value;
@@ -417,7 +413,7 @@ __decorate([
417
413
  ], NumberInput.prototype, "invalid", void 0);
418
414
  NumberInput = __decorate([
419
415
  event('value-changed', {
420
- description: "Fired whenever the input's value is updated (on input, change, or stepper click).",
416
+ description: 'Fired whenever the value changes, from user input, stepper click, or a programmatic update. Not fired on initial render.',
421
417
  detail: '{ value: number | null }',
422
418
  }),
423
419
  event('input', { forwarded: true }),