@haiilo/catalyst 10.28.2 → 10.29.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-ee89e395.entry.js → p-bb8516c7.entry.js} +2 -2
- package/dist/catalyst/p-bb8516c7.entry.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +11 -7
- 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-input/cat-input.js +8 -4
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +7 -3
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/components/cat-input2.js +7 -4
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-textarea.js +6 -3
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/esm/cat-alert_30.entry.js +11 -7
- 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-input/cat-input.d.ts +2 -0
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +2 -0
- package/package.json +2 -2
- package/dist/catalyst/p-ee89e395.entry.js.map +0 -1
|
@@ -10411,6 +10411,7 @@ const CatInput = class {
|
|
|
10411
10411
|
this._id = `cat-input-${nextUniqueId$7++}`;
|
|
10412
10412
|
this.hasSlottedLabel = false;
|
|
10413
10413
|
this.hasSlottedHint = false;
|
|
10414
|
+
this.hasSlottedCounter = false;
|
|
10414
10415
|
this.isPasswordShown = false;
|
|
10415
10416
|
this.errorMap = undefined;
|
|
10416
10417
|
this.requiredMarker = 'optional';
|
|
@@ -10452,6 +10453,7 @@ const CatInput = class {
|
|
|
10452
10453
|
componentWillRender() {
|
|
10453
10454
|
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
10454
10455
|
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
10456
|
+
this.hasSlottedCounter = !!this.hostElement.querySelector('[slot="counter"]');
|
|
10455
10457
|
}
|
|
10456
10458
|
/**
|
|
10457
10459
|
* Programmatically move focus to the input. Use this method instead of
|
|
@@ -10504,19 +10506,19 @@ const CatInput = class {
|
|
|
10504
10506
|
}
|
|
10505
10507
|
render() {
|
|
10506
10508
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10507
|
-
return (index.h("div", { key: '
|
|
10509
|
+
return (index.h("div", { key: '3d28dff29d5ced59f609ce9fcf6c2b2a14cfdda7', class: {
|
|
10508
10510
|
'input-field': true,
|
|
10509
10511
|
'input-horizontal': this.horizontal
|
|
10510
|
-
} }, index.h("div", { key: '
|
|
10512
|
+
} }, index.h("div", { key: '41399390b76c6a2e96dc3df48eede8ea2bcc4698', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: '68bb767790072eb2728d680d448e1ee80e641013', htmlFor: this.id, part: "label" }, index.h("span", { key: '04c217ff1f227a1fb82b9a52b284bbd67f8d89dd', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: '0c462827456af3b83935e569fac4fb45459c2edc', name: "label" })) || this.label, index.h("div", { key: '9415db27af950dc50efac0c60bdc47aa5efc8c97', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: 'fc45ea569ef7c9eec048bae75a8b5127beafcc09', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '20f36a7a3e2c042fa4f802ea3f71cb20f60188b3', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), (this.maxLength || this.hasSlottedCounter) && (index.h("div", { key: '58338cb0be0db04c6030e9f295428079ba2c7316', class: "label-character-count", "aria-hidden": "true" }, this.hasSlottedCounter ? (index.h("slot", { name: "counter" })) : (`${this.value?.length ?? 0}/${this.maxLength}`)))))))), index.h("div", { key: '5ed2b9c0c812c65d2e7d77d02f61cb88f33567e1', class: "input-container" }, index.h("div", { key: '9b73f259436d1f7d75f2efcaec3959759631f579', class: "input-outer-wrapper" }, index.h("div", { key: '04ba158193111283c31ea6e8d3d4e34e0dafe995', class: {
|
|
10511
10513
|
'input-wrapper': true,
|
|
10512
10514
|
'input-round': this.round,
|
|
10513
10515
|
'input-readonly': this.readonly,
|
|
10514
10516
|
'input-disabled': this.disabled,
|
|
10515
10517
|
'input-invalid': this.invalid
|
|
10516
|
-
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { key: '
|
|
10518
|
+
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { key: '6e834d91bca7660e24f7f917034db92a530d3901', class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (index.h("cat-icon", { key: '606625d78126b10f1efbdeec78d2339d9a66cf04', icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), index.h("div", { key: '28776786dd55f04d60c985ed7891d85c0e4c1f7b', class: "input-inner-wrapper" }, index.h("input", { key: '7ee17b1603ed56cd4b98561c9a7f5426edfcb9e8', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
|
|
10517
10519
|
'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
|
|
10518
10520
|
'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value
|
|
10519
|
-
}, 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 && (index.h("cat-button", { key: '
|
|
10521
|
+
}, 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 && (index.h("cat-button", { key: '5195866111feaf77f8ae6b9272443c7f2e6f6c9b', class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.togglePassword && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { key: 'ffbd5c49957d02e672d1da2710fb5a2698fe34a5', class: "toggle-password", icon: this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show', "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword'), onClick: this.doTogglePassword.bind(this) }))), this.loading && index.h("cat-spinner", { key: '19e83c45128e1110c4404fb266b97d9a0b23ea75', size: "m", class: "icon-loading" }), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { key: '2363be86adba00d3748a2b4e72d968027e3cbc03', icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && (index.h("cat-icon", { key: '158ae6c58f520b87023e534239550cd963c6c3f2', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), this.textSuffix && (index.h("span", { key: '8d0148452fe5b0184ed04fbaa7e84d805ef8648f', class: "text-suffix", part: "suffix" }, this.textSuffix))), index.h("slot", { key: 'cc46bb14d556c4144c28b8901e0aac7ff2c6908e', name: "addon" })), this.hasHint && (index.h(CatFormHint, { key: '0de0feb24f62246485c054bb83237d5610c89a21', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))));
|
|
10520
10522
|
}
|
|
10521
10523
|
get hasHint() {
|
|
10522
10524
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -13445,6 +13447,7 @@ const CatTextarea = class {
|
|
|
13445
13447
|
this._id = `cat-textarea-${nextUniqueId$2++}`;
|
|
13446
13448
|
this.hasSlottedLabel = false;
|
|
13447
13449
|
this.hasSlottedHint = false;
|
|
13450
|
+
this.hasSlottedCounter = false;
|
|
13448
13451
|
this.errorMap = undefined;
|
|
13449
13452
|
this.requiredMarker = 'optional';
|
|
13450
13453
|
this.horizontal = false;
|
|
@@ -13474,6 +13477,7 @@ const CatTextarea = class {
|
|
|
13474
13477
|
componentWillRender() {
|
|
13475
13478
|
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
13476
13479
|
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
13480
|
+
this.hasSlottedCounter = !!this.hostElement.querySelector('[slot="counter"]');
|
|
13477
13481
|
}
|
|
13478
13482
|
componentDidLoad() {
|
|
13479
13483
|
n(this.textarea);
|
|
@@ -13517,15 +13521,15 @@ const CatTextarea = class {
|
|
|
13517
13521
|
}
|
|
13518
13522
|
render() {
|
|
13519
13523
|
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13520
|
-
return (index.h(index.Host, { key: '
|
|
13524
|
+
return (index.h(index.Host, { key: 'e0e8b3fabdf014e3abb845abd4c3b028b4043c26' }, index.h("div", { key: 'c5eefbac266c1803b855f4d3f351d5d254a843e0', class: {
|
|
13521
13525
|
'textarea-field': true,
|
|
13522
13526
|
'textarea-horizontal': this.horizontal
|
|
13523
|
-
} }, index.h("div", { key: '
|
|
13527
|
+
} }, index.h("div", { key: '5a08a002182c85f7f6190f46837d6c2b493a0526', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: 'd913acdda8ecfd3c2e94b13baa68b9f1f74a71b7', htmlFor: this.id, part: "label" }, index.h("span", { key: 'a8e12d729ce8ab5188443aa389fc4236c98b845e', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: '7384887d64025e761e6d20361776cc1e8dc15d59', name: "label" })) || this.label, index.h("div", { key: 'ccc4600fbf6e1582c7861c9766b1adbaefa0020a', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '03a5c508b2efe5c7199d90eaa95b234db88afa03', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '6ac979c9e774195fcc84e13841d681719ac0a1ed', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), (this.maxLength || this.hasSlottedCounter) && (index.h("div", { key: '8ba288043e196c0d10390aa596d8c76f8c774af5', class: "label-character-count", "aria-hidden": "true" }, this.hasSlottedCounter ? (index.h("slot", { name: "counter" })) : (`${this.value?.length ?? 0}/${this.maxLength}`)))))))), index.h("div", { key: 'aced365e81997561263a13c93f732e9dd6dd83d0', class: "textarea-container" }, index.h("div", { key: '0b3aba012006a6197a8d8a0cd9fb4590ec3a2dfe', class: {
|
|
13524
13528
|
'textarea-wrapper': true,
|
|
13525
13529
|
'textarea-readonly': this.readonly,
|
|
13526
13530
|
'textarea-disabled': this.disabled,
|
|
13527
13531
|
'textarea-invalid': this.invalid
|
|
13528
|
-
} }, index.h("textarea", { key: '
|
|
13532
|
+
} }, index.h("textarea", { key: '8992ee5dcb6b7e099e11aee5184fdbf0209948f2', ...this.nativeAttributes, part: "textarea", ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, 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 && (index.h("cat-icon", { key: '8ddbd6e3fbf7ab23328b7bdb826b7f1dbf041562', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (index.h(CatFormHint, { key: 'd5d4bbe3c53d2f624c6e2fe93b1e7297551c1adc', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
|
|
13529
13533
|
}
|
|
13530
13534
|
get hasHint() {
|
|
13531
13535
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|