@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.
- package/dist/alert/alert.d.ts +0 -2
- package/dist/alert/alert.js +12 -2
- package/dist/code-input/index.js +4 -11
- package/dist/index.js.map +1 -1
- package/dist/meta/index.js.map +1 -1
- package/dist/number-input/index.js +3 -7
- package/dist/quantic-components.js +34539 -34533
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +18232 -18232
- package/dist/quantic-components.min.js.map +1 -1
- package/dist/select/index.js +4 -8
- package/dist/shared/shared.utils.d.ts +22 -0
- package/dist/shared/shared.utils.js +27 -0
- package/dist/shared/shared.utils.test.js +39 -2
- package/dist/text-input/index.js +4 -11
- package/dist/textarea/index.js +4 -10
- package/dist/toast/toast.d.ts +0 -2
- package/dist/toast/toast.js +12 -2
- package/dist/types/alert/alert.d.ts +0 -2
- package/dist/types/shared/shared.utils.d.ts +22 -0
- package/dist/types/toast/toast.d.ts +0 -2
- package/package.json +1 -1
|
@@ -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:
|
|
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 }),
|