@haiilo/catalyst 10.30.2 → 10.31.0
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/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/{p-486166cb.entry.js → p-8b90ffbd.entry.js} +3 -3
- package/dist/catalyst/p-8b90ffbd.entry.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +28 -20
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/cat-button/cat-button.js +20 -2
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +20 -2
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.js +22 -4
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.js +20 -2
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.js +22 -4
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-tag/cat-tag.js +19 -1
- package/dist/collection/components/cat-tag/cat-tag.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +21 -3
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +20 -2
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
- package/dist/components/cat-button2.js +4 -2
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox2.js +4 -2
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-input2.js +6 -4
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-radio.js +4 -2
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-select2.js +6 -4
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-tag.js +3 -1
- package/dist/components/cat-tag.js.map +1 -1
- package/dist/components/cat-textarea.js +5 -3
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-toggle.js +4 -2
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/esm/cat-alert_30.entry.js +28 -20
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/esm/catalyst.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cat-button/cat-button.d.ts +6 -0
- package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +6 -0
- package/dist/types/components/cat-input/cat-input.d.ts +6 -0
- package/dist/types/components/cat-radio/cat-radio.d.ts +6 -0
- package/dist/types/components/cat-select/cat-select.d.ts +6 -0
- package/dist/types/components/cat-tag/cat-tag.d.ts +6 -0
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +6 -0
- package/dist/types/components/cat-toggle/cat-toggle.d.ts +6 -0
- package/dist/types/components.d.ts +64 -0
- package/package.json +2 -2
- package/dist/catalyst/p-486166cb.entry.js.map +0 -1
|
@@ -1134,6 +1134,7 @@ const CatButton = class {
|
|
|
1134
1134
|
this.a11yCurrent = undefined;
|
|
1135
1135
|
this.nativeAttributes = undefined;
|
|
1136
1136
|
this.nativeContentAttributes = undefined;
|
|
1137
|
+
this.testId = undefined;
|
|
1137
1138
|
this.buttonGroupPosition = undefined;
|
|
1138
1139
|
}
|
|
1139
1140
|
onIconOnlyChanged(value) {
|
|
@@ -1199,7 +1200,7 @@ const CatButton = class {
|
|
|
1199
1200
|
render() {
|
|
1200
1201
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
1201
1202
|
if (this.url) {
|
|
1202
|
-
return (h(Host, { "data-button-group": this.buttonGroupPosition }, h("a", { ...this.nativeAttributes, ref: el => (this.button = el), href: this.disabled ? undefined : this.url, target: this.urlTarget, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, "aria-current": this.a11yCurrent, id: this.buttonId, part: "button", class: {
|
|
1203
|
+
return (h(Host, { "data-button-group": this.buttonGroupPosition }, h("a", { "data-test": this.testId, ...this.nativeAttributes, ref: el => (this.button = el), href: this.disabled ? undefined : this.url, target: this.urlTarget, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, "aria-current": this.a11yCurrent, id: this.buttonId, part: "button", class: {
|
|
1203
1204
|
'cat-button': true,
|
|
1204
1205
|
'cat-button-empty': !this.hasSlottedContent,
|
|
1205
1206
|
'cat-button-active': this.active,
|
|
@@ -1215,7 +1216,7 @@ const CatButton = class {
|
|
|
1215
1216
|
}, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content)));
|
|
1216
1217
|
}
|
|
1217
1218
|
else {
|
|
1218
|
-
return (h(Host, { "data-button-group": this.buttonGroupPosition }, h("button", { ...this.nativeAttributes, ref: el => (this.button = el), type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, "aria-current": this.a11yCurrent, id: this.buttonId, part: "button", class: {
|
|
1219
|
+
return (h(Host, { "data-button-group": this.buttonGroupPosition }, h("button", { "data-test": this.testId, ...this.nativeAttributes, ref: el => (this.button = el), type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, "aria-current": this.a11yCurrent, id: this.buttonId, part: "button", class: {
|
|
1219
1220
|
'cat-button': true,
|
|
1220
1221
|
'cat-button-empty': !this.hasSlottedContent,
|
|
1221
1222
|
'cat-button-active': this.active,
|
|
@@ -1367,6 +1368,7 @@ const CatCheckbox = class {
|
|
|
1367
1368
|
this.labelLeft = false;
|
|
1368
1369
|
this.alignment = 'top';
|
|
1369
1370
|
this.nativeAttributes = undefined;
|
|
1371
|
+
this.testId = undefined;
|
|
1370
1372
|
this.requiredMarker = 'none';
|
|
1371
1373
|
}
|
|
1372
1374
|
get id() {
|
|
@@ -1397,13 +1399,13 @@ const CatCheckbox = class {
|
|
|
1397
1399
|
this.input.blur();
|
|
1398
1400
|
}
|
|
1399
1401
|
render() {
|
|
1400
|
-
return (h(Host, { key: '
|
|
1402
|
+
return (h(Host, { key: 'c6446d420b369604f4dd80549c1b14ec8a5534bf' }, h("label", { key: 'd56e412e5e1b13c88a6c38ae203b572139f363bd', htmlFor: this.id, class: {
|
|
1401
1403
|
'is-hidden': this.labelHidden,
|
|
1402
1404
|
'is-disabled': this.disabled,
|
|
1403
1405
|
'label-left': this.labelLeft,
|
|
1404
1406
|
'align-center': this.alignment === 'center',
|
|
1405
1407
|
'align-end': this.alignment === 'bottom'
|
|
1406
|
-
} }, h("input", { key: '
|
|
1408
|
+
} }, h("input", { key: '0b6a5475785d4dc765cd55b5718bdd234d62a6c9', "data-test": this.testId, ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, indeterminate: this.indeterminate, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), h("span", { key: '1102aa4097d1fe8d6c301b134227a5a307a33242', class: "box", "aria-hidden": "true" }, h("svg", { key: '0a77cfbfd0a67e48d4f5cedbaca3bd449fe75219', class: "check", viewBox: "0 0 12 10" }, h("polyline", { key: '75ef61d7183e175b4de406ed3ac13664c4e51885', points: "1.5 6 4.5 9 10.5 1" })), h("svg", { key: '25bd595e54be48df3d5420fe38a3f80e00784550', class: "dash", viewBox: "0 0 12 10" }, h("polyline", { key: '8afc51523d4e39255c6c2434994311d31c48e4eb', points: "1.5 5 10.5 5" }))), h("span", { key: '3ce6b8c09b706068720084c85ad6cf5ed38761a2', class: { label: true, 'label-wrapper': !this.hasSlottedLabel }, part: "label" }, (this.hasSlottedLabel && h("slot", { key: '27b7301494cfafaed271b75732950441c0c34ce7', name: "label" })) || this.label, h("span", { key: 'dac83db2245ad29bd20b3904051d56cfd169aa5e', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: 'fc144468a305d1982362232021f9222a0c41ad37', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: 'a08ed77111677146007d6c24571a8311aed72d10', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")"))))), this.hasHint && (h("div", { key: '9976b27a7d673daeb05dd45154c2ad341b7a521b', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, h("div", { key: '8751a6a323b05995825a563b973cc76b5ca100f8', class: "box-placeholder" }), h(CatFormHint, { key: '2d057ca07be5f2b316fb5d83ed97f560d30b1af6', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }) })))));
|
|
1407
1409
|
}
|
|
1408
1410
|
get hasHint() {
|
|
1409
1411
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -10526,6 +10528,7 @@ const CatInput = class {
|
|
|
10526
10528
|
this.errors = undefined;
|
|
10527
10529
|
this.errorUpdate = 0;
|
|
10528
10530
|
this.nativeAttributes = undefined;
|
|
10531
|
+
this.testId = undefined;
|
|
10529
10532
|
}
|
|
10530
10533
|
get id() {
|
|
10531
10534
|
return this.identifier || this._id;
|
|
@@ -10589,19 +10592,19 @@ const CatInput = class {
|
|
|
10589
10592
|
}
|
|
10590
10593
|
render() {
|
|
10591
10594
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10592
|
-
return (h("div", { key: '
|
|
10595
|
+
return (h("div", { key: '65536a5d26ff0ebe45920b352cdfa4e28719efeb', class: {
|
|
10593
10596
|
'input-field': true,
|
|
10594
10597
|
'input-horizontal': this.horizontal
|
|
10595
|
-
} }, h("div", { key: '
|
|
10598
|
+
} }, h("div", { key: '1492e4f53056086c1b01d9314b368a301d36667b', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '6ced806dcfcbe1eb0f2a6ebcd31f4ff4a3280e58', htmlFor: this.id, part: "label" }, h("span", { key: '23bbe79e6af8b0869510bc43533e02b60fd345ac', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: 'd1ccafcf2d7f49eedf400d78b678fbafabb2c158', name: "label" })) || this.label, h("div", { key: '7ee3879f60ec33a414406e040da4f93c24ccd5ea', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '58f31ad7dc3a108f6dde1ec88c482a5a3c74fcbd', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '63d78c225748e457899f55d964bcb1d2a0da851c', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")")), (this.maxLength || this.hasSlottedCounter) && (h("div", { key: 'b36623a31118624beca4d4005dbf0480e476cb53', class: "label-character-count", "aria-hidden": "true" }, this.hasSlottedCounter ? (h("slot", { name: "counter" })) : (`${this.value?.length ?? 0}/${this.maxLength}`)))))))), h("div", { key: '75d9b67e7cf19f2526e1e036de0efce6b02d2fa5', class: "input-container" }, h("div", { key: '33b2d24c18c7e4b78bcaf569787f4153237f0686', class: "input-outer-wrapper" }, h("div", { key: '50f66d6a718bc66162ce93d3f3ce75b53afd193a', class: {
|
|
10596
10599
|
'input-wrapper': true,
|
|
10597
10600
|
'input-round': this.round,
|
|
10598
10601
|
'input-readonly': this.readonly,
|
|
10599
10602
|
'input-disabled': this.disabled,
|
|
10600
10603
|
'input-invalid': this.invalid
|
|
10601
|
-
}, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { key: '
|
|
10604
|
+
}, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { key: '9549568c8b7d088babf19125a063270863d545a3', class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (h("cat-icon", { key: 'fbd58b96277fc28e9de49ffd355471811fb16257', icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), h("div", { key: '9ea5b2502d1364de65b656c064124329ace8a074', class: "input-inner-wrapper" }, h("input", { key: '80f00d9abc53fbc3cd6fa261663f6c9e940ec213', "data-test": this.testId, ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
|
|
10602
10605
|
'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
|
|
10603
10606
|
'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value
|
|
10604
|
-
}, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.isPasswordShown ? 'text' : this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: '
|
|
10607
|
+
}, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.isPasswordShown ? 'text' : this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: 'f301a2b57d36d2005e8705e07ea59dd32e54691a', class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.togglePassword && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: '8a9e442e985f5654ae1a2dc4ad7e24939e2275c4', class: "toggle-password", icon: this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show', "icon-only": "true", size: "s", variant: "text", "a11y-label": catI18nRegistry.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword'), onClick: this.doTogglePassword.bind(this) }))), this.loading && h("cat-spinner", { key: '50ef079a4d7a193d367817a0afa3db8be839b4a6', size: "m", class: "icon-loading" }), !this.invalid && this.icon && this.iconRight && (h("cat-icon", { key: '8ceedd341d85faebb2ebbb1d60b137f9e866aa05', icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && (h("cat-icon", { key: '3be8071c0d5d25d6607fd40547d2405c4cd1b7bb', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), this.textSuffix && (h("span", { key: '7019774d260c7c59c33a2dc1d82c6f4fa1f45b45', class: "text-suffix", part: "suffix" }, this.textSuffix))), h("slot", { key: 'd3882acee81f3456c1d7ab86469b12deed42debe', name: "addon" })), this.hasHint && (h(CatFormHint, { key: '3dce699be6ee391d0aee55735959ed69501e52ff', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))));
|
|
10605
10608
|
}
|
|
10606
10609
|
get hasHint() {
|
|
10607
10610
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -10762,6 +10765,7 @@ const CatRadio = class {
|
|
|
10762
10765
|
this.labelLeft = false;
|
|
10763
10766
|
this.alignment = 'top';
|
|
10764
10767
|
this.nativeAttributes = undefined;
|
|
10768
|
+
this.testId = undefined;
|
|
10765
10769
|
}
|
|
10766
10770
|
get id() {
|
|
10767
10771
|
return this.identifier || this._id;
|
|
@@ -10789,13 +10793,13 @@ const CatRadio = class {
|
|
|
10789
10793
|
}
|
|
10790
10794
|
render() {
|
|
10791
10795
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10792
|
-
return (h(Host, { key: '
|
|
10796
|
+
return (h(Host, { key: 'ca329dab3b08cf59911216e6d1d89e931d4c6836' }, h("label", { key: '0fae08dcf9b6017f1052342f22989a9218437a82', htmlFor: this.id, class: {
|
|
10793
10797
|
'is-hidden': this.labelHidden,
|
|
10794
10798
|
'is-disabled': this.disabled,
|
|
10795
10799
|
'label-left': this.labelLeft,
|
|
10796
10800
|
'align-center': this.alignment === 'center',
|
|
10797
10801
|
'align-end': this.alignment === 'bottom'
|
|
10798
|
-
}, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, h("span", { key: '
|
|
10802
|
+
}, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, h("span", { key: 'eed2cf5a6e64d64770466bbfcd5fd0f6e7e329d9', class: "radio" }, h("input", { key: '02a288466717c319419f94e2f9607ab63575e9d5', "data-test": this.testId, ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.identifier || this.id, type: "radio", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), h("span", { key: 'f75aa8f50e723b8aa90b60001190638d3d56234a', class: "circle" })), h("span", { key: '52de52cc932bb531440862a04ede38cdf2b29a3a', class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { key: '3c66d88d6517721590a342001258b5375f274714', name: "label" })) || this.label)), this.hasHint && (h("div", { key: 'b86904829302d22f22ce51f42bd147504b6e387f', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, h("div", { key: 'dcca2f05ea10d9cbf731c7b59f82e33916014327', class: "circle-placeholder" }), h(CatFormHint, { key: 'e7b29ec3c4675b1e077fc783fe90780b5794f78a', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }) })))));
|
|
10799
10803
|
}
|
|
10800
10804
|
get hasHint() {
|
|
10801
10805
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -11158,6 +11162,7 @@ const CatSelect = class {
|
|
|
11158
11162
|
this.errors = undefined;
|
|
11159
11163
|
this.errorUpdate = 0;
|
|
11160
11164
|
this.nativeAttributes = undefined;
|
|
11165
|
+
this.testId = undefined;
|
|
11161
11166
|
}
|
|
11162
11167
|
get id() {
|
|
11163
11168
|
return this.identifier || this._id;
|
|
@@ -11423,18 +11428,18 @@ const CatSelect = class {
|
|
|
11423
11428
|
}
|
|
11424
11429
|
render() {
|
|
11425
11430
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
11426
|
-
return (h(Host, { key: '
|
|
11431
|
+
return (h(Host, { key: '4ffaec1ec7c59635d3e923912e5bb5b554661973' }, h("div", { key: 'ad9ad59ff47ab4fe9c9485da344b0be8f030f824', class: {
|
|
11427
11432
|
'select-field': true,
|
|
11428
11433
|
'select-horizontal': this.horizontal,
|
|
11429
11434
|
'select-multiple': this.multiple
|
|
11430
|
-
} }, h("div", { key: '
|
|
11435
|
+
} }, h("div", { key: 'd87e3451ded9630ef471c6a0d0230f73bf2001f0', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '0eb6bd92232da327fd11a5b8fa5108064216b98d', htmlFor: `select-${this.id}-input`, part: "label" }, h("span", { key: '29b3bc2a6300cf116e85b598c43bc3d590bfca40', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: '105d69c1c4ebce966d207248d0919713402775fc', name: "label" })) || this.label, h("div", { key: '60d737d4bc621e64c4d60a4454c81d5cd2f14036', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '3ff4fc174c6769300fecde9b4f3785e7f510b3c5', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '44beff5fb235a6ecfe4d3bde6173309ab9374b7d', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")"))))))), h("div", { key: 'ca853307f93adc14b4ebe5de1f0b5cd255d438d7', class: "select-container" }, h("div", { key: 'fc56c44f4d6b27ca4d7d1c3f344bef6c5495ae84', class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, h("div", { key: '77d3a48ea7ad111136fb1513aaeb6c3b15533436', class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (h("span", { class: {
|
|
11431
11436
|
pill: true,
|
|
11432
11437
|
'select-no-open': true,
|
|
11433
11438
|
'select-option-active': this.state.activeSelectionIndex === i
|
|
11434
|
-
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", null, item.render.label), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, h("input", { key: '
|
|
11439
|
+
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", null, item.render.label), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, h("input", { key: 'a4e438192ecee41d5acf77de45a1526876409a0f', "data-test": this.testId, ...this.nativeAttributes, part: "input", id: `select-${this.id}-input`, class: "select-input", role: "combobox", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, "aria-autocomplete": "list", onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && h("cat-spinner", { key: '04d53d0d39bc429a6ac9a479c46f42c6b03a9283' }), this.invalid && (h("cat-icon", { key: 'd21136d141632914fc176ea1939164a4d40dc446', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
|
|
11435
11440
|
!this.disabled &&
|
|
11436
11441
|
!this.state.isResolving &&
|
|
11437
|
-
this.clearable ? (h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (h("cat-button", { key: '
|
|
11442
|
+
this.clearable ? (h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (h("cat-button", { key: 'cd5c84bbc7b04b28acda86d656b2ea9835cbb439', iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? catI18nRegistry.t('select.close') : catI18nRegistry.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), this.hasHint && (h(CatFormHint, { key: 'd0f3f4f080abf2136e681161802f0b332591a30a', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))), h("div", { key: '1fb0555801f6793b6351dbc19f2eba12c7292593', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (h("cat-scrollable", { key: '8eea85eea2b000f29d690aafc7fbae106bf275e5', class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, h("ul", { key: 'fa0415a3459967bc8a8591c94e3227c8fb99443d', class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isFirstLoading
|
|
11438
11443
|
? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (h("li", { class: "select-option-loading" }, h("cat-skeleton", { variant: "body", lines: 1 }), h("cat-skeleton", { variant: "body", lines: 1 }))))
|
|
11439
11444
|
: !this.state.options.length &&
|
|
11440
11445
|
!this.tags && (h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : catI18nRegistry.t('select.empty')))))))));
|
|
@@ -13388,6 +13393,7 @@ const CatTag = class {
|
|
|
13388
13393
|
this.labelHidden = false;
|
|
13389
13394
|
this.required = false;
|
|
13390
13395
|
this.nativeAttributes = undefined;
|
|
13396
|
+
this.testId = undefined;
|
|
13391
13397
|
this.value = undefined;
|
|
13392
13398
|
this.clearable = false;
|
|
13393
13399
|
this.errors = undefined;
|
|
@@ -13434,7 +13440,7 @@ const CatTag = class {
|
|
|
13434
13440
|
}
|
|
13435
13441
|
render() {
|
|
13436
13442
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13437
|
-
return (h(Host, { key: '
|
|
13443
|
+
return (h(Host, { key: 'ea219f15738c0e0b11d7b4134e970141c337a991' }, h("div", { key: '54cbafd14a0a243b459b8cce5f5b9199cdef7f59', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '4a916c1ec4f99f3db7e2a31008d0277b1a93690e', htmlFor: `tags-${this.id}-input`, part: "label" }, h("span", { key: '999ad493f6ab3b97e9dbf4c62033ad358a77ab57', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: 'ff636ee0ccd174878eafe0ab709e9c66d3ba4d3e', name: "label" })) || this.label, h("div", { key: 'b983335cc6f08005495c3784fb9c0de6a39f039f', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '91fd49cfdf2e2a7af3d7d87b91c4f6bc6ed88f3f', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: 'd59686d3ac8c02b2198fc8013ad34463d8e2afba', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")"))))))), h("div", { key: '37cc1963186b77dae6e853042db75919316f5a10', class: { 'input-wrapper': true, 'input-disabled': this.disabled, 'input-invalid': this.invalid } }, this.value?.map(value => (h("div", { class: "tag-pill" }, h("span", null, value), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(value), tabIndex: -1 }))))), h("div", { key: '37902cc20fcf55f9f8848daa167a765dc7f48ac2', class: "input-inner-wrapper" }, h("input", { key: '316e34e90944d96b1e829a49e5041ad865336d63', "data-test": this.testId, ...this.nativeAttributes, part: "input", id: `tags-${this.id}-input`, class: "tags-input", role: "combobox", ref: el => (this.input = el), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, onInput: this.onInput.bind(this), onBlur: this.onBlur.bind(this), placeholder: this.placeholder, disabled: this.disabled }), this.clearable && !this.disabled && (this.value?.length ?? 0) > 0 && (h("cat-button", { key: '17a6710dbf2aa77eefa25ad97252f78101e1dcee', class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.invalid && h("cat-icon", { key: 'c439cfc9bf8e2579d053cb7efe827665456167ed', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }))), this.hasHint && (h(CatFormHint, { key: '577f9da90fb534b99d43b7d35643237d46c6f6da', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))));
|
|
13438
13444
|
}
|
|
13439
13445
|
get hasHint() {
|
|
13440
13446
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -13551,6 +13557,7 @@ const CatTextarea = class {
|
|
|
13551
13557
|
this.errors = undefined;
|
|
13552
13558
|
this.errorUpdate = 0;
|
|
13553
13559
|
this.nativeAttributes = undefined;
|
|
13560
|
+
this.testId = undefined;
|
|
13554
13561
|
}
|
|
13555
13562
|
get id() {
|
|
13556
13563
|
return this.identifier || this._id;
|
|
@@ -13605,15 +13612,15 @@ const CatTextarea = class {
|
|
|
13605
13612
|
}
|
|
13606
13613
|
render() {
|
|
13607
13614
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13608
|
-
return (h(Host, { key: '
|
|
13615
|
+
return (h(Host, { key: '776354bbb03c8cb024d707f005cc53b11a61bc08' }, h("div", { key: '8ba766cb2681246058e7bd1082bb8b06d09c3edf', class: {
|
|
13609
13616
|
'textarea-field': true,
|
|
13610
13617
|
'textarea-horizontal': this.horizontal
|
|
13611
|
-
} }, h("div", { key: '
|
|
13618
|
+
} }, h("div", { key: '75345030c6d4c269f60da416c43ddaf0979f93fc', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: 'b0332bc73a58d3559e31620687802cf5abf5d92f', htmlFor: this.id, part: "label" }, h("span", { key: '177f5cccd3b74c85fa86acc1a9f2b4a0bc05809e', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: '775fd2269ed0d8333d1a1630cc6fd4928fe851a0', name: "label" })) || this.label, h("div", { key: 'a3db8aaaae6a72789e7b1039c5ce685335f081da', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '7b80ecce688910d85b63b230085489bfdde5d833', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '0d047c9fc850c795df761d4b9d7a414861eb38be', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")")), (this.maxLength || this.hasSlottedCounter) && (h("div", { key: 'd1339f4e4df011c65c57f701d5fc861966ff918d', class: "label-character-count", "aria-hidden": "true" }, this.hasSlottedCounter ? (h("slot", { name: "counter" })) : (`${this.value?.length ?? 0}/${this.maxLength}`)))))))), h("div", { key: '31af38f5bd63cbf2b315b072421dbbded35ee5ae', class: "textarea-container" }, h("div", { key: '5da2c1a1cbcd790a931a1444097919648f73761e', class: {
|
|
13612
13619
|
'textarea-wrapper': true,
|
|
13613
13620
|
'textarea-readonly': this.readonly,
|
|
13614
13621
|
'textarea-disabled': this.disabled,
|
|
13615
13622
|
'textarea-invalid': this.invalid
|
|
13616
|
-
} }, h("textarea", { key: '
|
|
13623
|
+
} }, h("textarea", { key: 'bc3f1210a9ed12884e916e050e4f0c93823d0600', "data-test": this.testId, ...this.nativeAttributes, part: "textarea", ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, autocomplete: this.autoComplete, maxlength: this.maxLength, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.invalid && (h("cat-icon", { key: '342839d1ebb8fd3fab02d6692ec26b680fb187c6', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (h(CatFormHint, { key: '132bfe8caf387912b7d1156e2b066aecec99ed54', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
|
|
13617
13624
|
}
|
|
13618
13625
|
get hasHint() {
|
|
13619
13626
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -13955,6 +13962,7 @@ const CatToggle = class {
|
|
|
13955
13962
|
this.labelLeft = false;
|
|
13956
13963
|
this.alignment = 'top';
|
|
13957
13964
|
this.nativeAttributes = undefined;
|
|
13965
|
+
this.testId = undefined;
|
|
13958
13966
|
}
|
|
13959
13967
|
get id() {
|
|
13960
13968
|
return this.identifier || this._id;
|
|
@@ -13985,13 +13993,13 @@ const CatToggle = class {
|
|
|
13985
13993
|
}
|
|
13986
13994
|
render() {
|
|
13987
13995
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13988
|
-
return (h(Host, { key: '
|
|
13996
|
+
return (h(Host, { key: '18e3e673ff5447b34457de423f601cc1af767c00' }, h("label", { key: '22df334a9f372ee040c3deb3165f82f8fdcef0b0', htmlFor: this.id, class: {
|
|
13989
13997
|
'is-hidden': this.labelHidden,
|
|
13990
13998
|
'is-disabled': this.disabled,
|
|
13991
13999
|
'label-left': this.labelLeft,
|
|
13992
14000
|
'align-center': this.alignment === 'center',
|
|
13993
14001
|
'align-end': this.alignment === 'bottom'
|
|
13994
|
-
} }, h("input", { key: '
|
|
14002
|
+
} }, h("input", { key: '4472899b180f286d43c5d34aa7821a29db3ffb18', "data-test": this.testId, ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, class: "form-check-input", role: "switch", onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), h("span", { key: '90e342a85fd5e80ccde346aa65aaccacaf2cb919', class: "toggle" }), h("span", { key: '138b08fbf20d83cd74d18b3a7c76ecb87d4b9eb2', class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { key: '6753f56609e0447ec0eb5b040c74bd511f6dd4de', name: "label" })) || this.label)), this.hasHint && (h("div", { key: '4d5bda25b5e53b0ba8725b41539d08fd9c3bf5f6', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, h("div", { key: '9006cf3a82f66cf15c255bba4e2720f86b63e8c8', class: "toggle-placeholder" }), h(CatFormHint, { key: '17eebfed86f71a33629ee9ed943bcd9e0fe276c5', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }) })))));
|
|
13995
14003
|
}
|
|
13996
14004
|
get hasHint() {
|
|
13997
14005
|
return !!this.hint || !!this.hasSlottedHint;
|