@haiilo/catalyst 10.23.0 → 10.24.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.css +5 -0
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js +1 -1
- package/dist/catalyst/index.esm.js.map +1 -1
- package/dist/catalyst/{p-594e46b4.entry.js → p-33a30da2.entry.js} +4 -4
- package/dist/catalyst/p-33a30da2.entry.js.map +1 -0
- package/dist/catalyst/scss/core/_notification.scss +5 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +97 -88
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +1 -1
- package/dist/cjs/index.cjs.js +17 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/cat-date/cat-date.js +3 -3
- package/dist/collection/components/cat-date/cat-date.js.map +1 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.js +6 -4
- package/dist/collection/components/cat-date-inline/cat-date-inline.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.js +4 -4
- package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +2 -2
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.js +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.js +1 -1
- package/dist/collection/components/cat-input/cat-input.css +1 -0
- package/dist/collection/components/cat-input/cat-input.js +35 -14
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-notification/cat-notification.js +17 -4
- package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.js +2 -2
- package/dist/collection/components/cat-radio/cat-radio.js +2 -2
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +3 -3
- package/dist/collection/components/cat-select/cat-select.js +16 -14
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js +2 -2
- package/dist/collection/components/cat-tab/cat-tab.js +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
- package/dist/collection/components/cat-tag/cat-tag.js +26 -18
- package/dist/collection/components/cat-tag/cat-tag.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +15 -13
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-time/cat-time.js +3 -3
- package/dist/collection/components/cat-time/cat-time.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +2 -2
- package/dist/collection/scss/core/_notification.scss +5 -0
- package/dist/components/cat-date-inline2.js +4 -4
- package/dist/components/cat-date-inline2.js.map +1 -1
- package/dist/components/cat-date.js +2 -2
- package/dist/components/cat-date.js.map +1 -1
- package/dist/components/cat-datepicker-inline.js +2 -2
- package/dist/components/cat-datepicker.js +3 -3
- package/dist/components/cat-datepicker.js.map +1 -1
- package/dist/components/cat-dropdown2.js +1 -1
- package/dist/components/cat-form-group.js +1 -1
- package/dist/components/cat-form-hint.js.map +1 -1
- package/dist/components/cat-icon2.js +1 -1
- package/dist/components/cat-input2.js +18 -14
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-pagination.js +2 -2
- package/dist/components/cat-radio-group.js +1 -1
- package/dist/components/cat-radio.js +2 -2
- package/dist/components/cat-scrollable2.js +3 -3
- package/dist/components/cat-select-demo.js +1 -1
- package/dist/components/cat-select2.js +15 -13
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-skeleton2.js +1 -1
- package/dist/components/cat-spinner2.js +2 -2
- package/dist/components/cat-tab.js +1 -1
- package/dist/components/cat-tabs.js +1 -1
- package/dist/components/cat-tag.js +19 -17
- package/dist/components/cat-tag.js.map +1 -1
- package/dist/components/cat-textarea.js +14 -12
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-time.js +2 -2
- package/dist/components/cat-time.js.map +1 -1
- package/dist/components/cat-toggle.js +2 -2
- package/dist/components/index.js +17 -4
- package/dist/components/index.js.map +1 -1
- package/dist/esm/cat-alert_30.entry.js +97 -88
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/esm/catalyst.js +1 -1
- package/dist/esm/index.js +17 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cat-date/cat-date.d.ts +1 -1
- package/dist/types/components/cat-date-inline/cat-date-inline.d.ts +2 -0
- package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +1 -1
- package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +1 -1
- package/dist/types/components/cat-input/cat-input.d.ts +8 -3
- package/dist/types/components/cat-notification/cat-notification.d.ts +4 -4
- package/dist/types/components/cat-select/cat-select.d.ts +4 -3
- package/dist/types/components/cat-tag/cat-tag.d.ts +15 -8
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +4 -3
- package/dist/types/components/cat-time/cat-time.d.ts +1 -1
- package/dist/types/components.d.ts +34 -14
- package/package.json +2 -2
- package/dist/catalyst/p-594e46b4.entry.js.map +0 -1
|
@@ -1565,13 +1565,13 @@ const CatDate = class {
|
|
|
1565
1565
|
this.input?.clear();
|
|
1566
1566
|
}
|
|
1567
1567
|
render() {
|
|
1568
|
-
return (index.h(index.Host, { key: '
|
|
1568
|
+
return (index.h(index.Host, { key: '8e98fa37e7c7a5a5b06e78d4db55a0221ab3c9aa' }, index.h("cat-input", { key: '3bc212816beb5dc6dc077c16aeba37494e726710', class: "cat-date-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, value: this.inputValue, onCatFocus: e => {
|
|
1569
1569
|
e.stopPropagation();
|
|
1570
1570
|
this.catFocus.emit(e.detail);
|
|
1571
1571
|
}, onCatBlur: e => {
|
|
1572
1572
|
e.stopPropagation();
|
|
1573
1573
|
this.onInputBlur(e.detail);
|
|
1574
|
-
} }, index.h("span", { key: '
|
|
1574
|
+
} }, index.h("span", { key: '1108b31cf626f5e1879b5d06e15539a60c103925', slot: "label" }, this.label, index.h("span", { key: '253ac251c4313b1b61381c6b7063ed9c6d87f892', class: "label-aria" }, " (", this.locale.formatStr, ")")), index.h("cat-dropdown", { key: 'a251ebdee91aa19060e03fd22a0b02c3c8af59df', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, index.h("cat-button", { key: '5fbcfe990cae800326e686b798b63be2d1783248', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), index.h("div", { key: '3dd9bc1b62c30e8d8ff63c878e1a141e5eac71e5', slot: "content" }, index.h("cat-date-inline", { key: '871799fce9dda73e5242d3d1ef94c03b8144dcf2', ref: el => (this.dateInline = el), min: this.min, max: this.max, value: this.value, hint: true, weeks: true, noClear: true, onCatChange: this.onDateChange.bind(this) }))))));
|
|
1575
1575
|
}
|
|
1576
1576
|
getTriggerA11yLabel() {
|
|
1577
1577
|
const date = this.locale.fromLocalISO(this.value);
|
|
@@ -2369,12 +2369,12 @@ const CatDateInline = class {
|
|
|
2369
2369
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
2370
2370
|
const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());
|
|
2371
2371
|
const [dateStart, dateEnd] = this.getValue();
|
|
2372
|
-
return (index.h(index.Host, { key: '
|
|
2372
|
+
return (index.h(index.Host, { key: 'f0b5554bff498048c6b2ed378fbf341ee2d0a70b', "aria-label": this.label || undefined }, index.h("div", { key: '5185d42c4ec5ac93ddebd0140db6caf12ce5240d', class: { 'label-container': true, 'label-hidden': this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: '2fdc6cbbcf687981348b1fb5f21f2d5782f8ce88', id: `${this.id}-label`, htmlFor: this.id, part: "label", onClick: () => this.doFocus() }, index.h("span", { key: '1f7ee36794e2bd9081cc10cb5942dde193f241ca', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: '3080e11319a36ea14c4ca06714cd9518037f4390', name: "label" })) || this.label, index.h("div", { key: '5d8d98b7e522bb23285e331ace4f45a6a42ab9dd', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '1acfd32324889f2c3a9ee4806f283e52a4bd3060', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '97134f7607c47820e904591e6d4909371c295eb7', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: '7f8fe8f60217ddca39f2bd18fb75aae36f58924d', class: { picker: true, 'picker-weeks': this.weeks }, id: this.id, "aria-describedby": `${this.id}-label` }, index.h("div", { key: '482f557eddae1bdc7b2c9fb795ff07c130107eba', class: "picker-head" }, index.h("cat-button", { key: '2e53d21a7de00ca6a90c0d8d75f232d4ca534714', icon: "$cat:datepicker-year-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevYear, disabled: isSameYear(this.viewDate, minDate), onClick: () => this.navigate('prev', 'year'), "data-dropdown-no-close": true }), index.h("cat-button", { key: 'd7e4b92028c01c1b817fc4652b395bc31386cc1a', icon: "$cat:datepicker-month-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevMonth, disabled: isSameMonth(this.viewDate, minDate), onClick: () => this.navigate('prev', 'month'), "data-dropdown-no-close": true }), index.h("h3", { key: 'ea5eb0015f4d87ffa17030569fb04fa15f6e60e9' }, this.getHeadline()), index.h("cat-button", { key: '7bb753ec04b8d8f60a804e27a30acd976233d7df', icon: "$cat:datepicker-month-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextMonth, disabled: isSameMonth(this.viewDate, maxDate), onClick: () => this.navigate('next', 'month'), "data-dropdown-no-close": true }), index.h("cat-button", { key: 'b3d6a79b108fb6e5594a6c1228137e51354620c9', icon: "$cat:datepicker-year-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextYear, disabled: isSameYear(this.viewDate, maxDate), onClick: () => this.navigate('next', 'year'), "data-dropdown-no-close": true })), index.h("div", { key: '7d76513d167808df5c6f1aeaa78085bbf96b0fa3', class: "picker-grid", onFocusin: () => this.setAriaLive(this.locale.arrowKeys) }, index.h("div", { key: '3f2fcd711bbd849340b91032d88ba5abab3d1b77', class: "picker-grid-head" }, Array.from(Array(7), (_, i) => {
|
|
2373
2373
|
const day = (i + this.locale.weekInfo.firstDay) % 7;
|
|
2374
2374
|
return index.h("abbr", { title: this.locale.days.long[day] }, this.locale.days.short[day]);
|
|
2375
|
-
})), this.weeks && (index.h("div", { key: '
|
|
2375
|
+
})), this.weeks && (index.h("div", { key: '5f1e57853dbdbc17562f6b98d0124a9a99cc5a66', class: "picker-grid-weeks" }, dateGrid
|
|
2376
2376
|
.filter((_, i) => i % 7 === 0)
|
|
2377
|
-
.map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: '
|
|
2377
|
+
.map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: '0551334303e8212f276de5ea1f2642446c0f6485', class: "picker-grid-days" }, dateGrid.map(day => {
|
|
2378
2378
|
const isStartDate = isSameDay(dateStart, day);
|
|
2379
2379
|
const isEndDate = isSameDay(dateEnd, day);
|
|
2380
2380
|
const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;
|
|
@@ -2391,7 +2391,7 @@ const CatDateInline = class {
|
|
|
2391
2391
|
'date-focusable': this.canFocus(day),
|
|
2392
2392
|
'date-disabled': !this.canClick(day)
|
|
2393
2393
|
}, nativeAttributes: !this.canFocus(day) ? { tabindex: '-1' } : {}, variant: isStartDate || isEndDate ? 'filled' : isToday ? 'outlined' : 'text', a11yLabel: this.locale.toLocalStr(day), active: isStartDate || isEndDate || isRange, color: isStartDate || isEndDate || isToday ? 'primary' : 'secondary', disabled: !this.canClick(day), onClick: () => this.select(day), "data-date": this.locale.toLocalISO(day) }, day.getDate()));
|
|
2394
|
-
}))), index.h("div", { key: '
|
|
2394
|
+
}))), index.h("div", { key: '6fbabecc4714a6a27bff80b8bdfab2217e69d844', class: "picker-foot" }, !this.noToday && this.canClick(this.locale.now()) && (index.h("cat-button", { key: 'd12318e71cd05fd506c2017922faf527ab92f755', size: "s", "data-dropdown-no-close": true, onClick: () => this.select(this.locale.now()) }, this.locale.today)), this.hint && index.h("p", { key: '33d82b959cc2f8a1333b2c7181a79311af84a88d', class: "cursor-help" }, this.locale.arrowKeys), !this.noClear && (index.h("cat-button", { key: '4b83fb3e173be9d0e96cace310ee9517938fe631', size: "s", disabled: !this.value, "data-dropdown-no-close": true, onClick: () => this.clear() }, this.locale.clear)))), index.h("p", { key: '702ca224198fbe0f6014cc3ec5338fdff437ff5c', class: "cursor-aria", "aria-live": "polite" })));
|
|
2395
2395
|
}
|
|
2396
2396
|
focus(date, focus = true) {
|
|
2397
2397
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
@@ -7363,7 +7363,7 @@ const CatDatepickerFlat = class {
|
|
|
7363
7363
|
}
|
|
7364
7364
|
render() {
|
|
7365
7365
|
return [
|
|
7366
|
-
index.h("cat-input", { key: '
|
|
7366
|
+
index.h("cat-input", { key: 'c59dfb87d3f67f8850473274bab82063c3ea4d17', ref: el => (this._input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: e => {
|
|
7367
7367
|
e.stopPropagation();
|
|
7368
7368
|
this.value = e.detail || undefined;
|
|
7369
7369
|
}, onCatFocus: e => {
|
|
@@ -7372,8 +7372,8 @@ const CatDatepickerFlat = class {
|
|
|
7372
7372
|
}, onCatBlur: e => {
|
|
7373
7373
|
e.stopPropagation();
|
|
7374
7374
|
this.catBlur.emit(e.detail);
|
|
7375
|
-
} }, this.hasSlottedLabel && (index.h("span", { key: '
|
|
7376
|
-
index.h("div", { key: '
|
|
7375
|
+
} }, this.hasSlottedLabel && (index.h("span", { key: '67cf2c46b67fcd119c01c3d313ac547b54c343ec', slot: "label" }, index.h("slot", { key: '7a2c43caf422ef58381b5b78bd0a1e83efe2ba6c', name: "label" }))), this.hasSlottedHint && (index.h("span", { key: '3135c3f956f714b1f57aa97aab905bbe6735f677', slot: "hint" }, index.h("slot", { key: '7a423675a763a2a139dc3f05cd7141731c825d8d', name: "hint" })))),
|
|
7376
|
+
index.h("div", { key: '635b797993490f712b1f8ee28d086524b5a0bc4f', ref: el => (this._calendarWrapper = el), class: "datepicker-wrapper" })
|
|
7377
7377
|
];
|
|
7378
7378
|
}
|
|
7379
7379
|
initDatepicker(input) {
|
|
@@ -7476,11 +7476,11 @@ const CatDatepickerInline = class {
|
|
|
7476
7476
|
this.pickr = this.initDatepicker(this.input);
|
|
7477
7477
|
}
|
|
7478
7478
|
render() {
|
|
7479
|
-
return (index.h(index.Host, { key: '
|
|
7479
|
+
return (index.h(index.Host, { key: '6d9ecbd5cc1099ce3a8fb0c5a9cca226a62525f7' }, index.h("div", { key: '405b15dfbde6cf538022ed06fbca72eb4a290dc7', tabIndex: this.disabled || this.readonly ? -1 : undefined, class: {
|
|
7480
7480
|
'datepicker-wrapper': true,
|
|
7481
7481
|
'datepicker-disabled': this.disabled,
|
|
7482
7482
|
'datepicker-readonly': this.readonly
|
|
7483
|
-
} }, index.h("input", { key: '
|
|
7483
|
+
} }, index.h("input", { key: '4373cedb5e6c0d08631cec9c16b8c859f5f2daea', ref: el => (this.input = el), value: this.value, disabled: this.disabled, readonly: this.readonly }))));
|
|
7484
7484
|
}
|
|
7485
7485
|
initDatepicker(input) {
|
|
7486
7486
|
if (!input) {
|
|
@@ -8571,7 +8571,7 @@ const CatDropdown = class {
|
|
|
8571
8571
|
}, timeTransitionS);
|
|
8572
8572
|
}
|
|
8573
8573
|
render() {
|
|
8574
|
-
return (index.h(index.Host, { key: '
|
|
8574
|
+
return (index.h(index.Host, { key: 'c0ec9a85a4b9ea6a739507480d630c8fc8dd15f5' }, index.h("slot", { key: 'd696c663aeaf62869077994227b12c033c3eaa01', name: "anchor", ref: el => (this.anchorSlot = el) }), index.h("slot", { key: 'b8bb9467fda8b26fdb3d6e88aa2c6ff5c091787f', name: "trigger", ref: el => (this.triggerSlot = el) }), index.h("div", { key: '0a65794088d27a74621ce390f7ad21d798b6a0e5', id: this.contentId, class: { content: true, 'overflow-auto': !this.overflow }, ref: el => (this.content = el) }, index.h("slot", { key: '41dff5ac88c5175a856f6aca5d0696899d20f848', name: "content" }))));
|
|
8575
8575
|
}
|
|
8576
8576
|
componentDidLoad() {
|
|
8577
8577
|
this.initAnchor();
|
|
@@ -8668,7 +8668,7 @@ const CatFormGroup = class {
|
|
|
8668
8668
|
});
|
|
8669
8669
|
}
|
|
8670
8670
|
render() {
|
|
8671
|
-
return (index.h(index.Host, { key: '
|
|
8671
|
+
return (index.h(index.Host, { key: 'c9fe233663c9967b3e78334e6994ceb62653c19c', style: { '--label-size': this.labelSize } }, index.h("slot", { key: '49274e5e31644d6f7d042033e975d8b91d6aaea6', onSlotchange: this.onSlotChange.bind(this) })));
|
|
8672
8672
|
}
|
|
8673
8673
|
onSlotChange() {
|
|
8674
8674
|
this.formElements = Array.from(this.hostElement.querySelectorAll('cat-input, cat-textarea, cat-select, cat-datepicker'));
|
|
@@ -8700,7 +8700,7 @@ const CatIcon = class {
|
|
|
8700
8700
|
this.a11yLabel = undefined;
|
|
8701
8701
|
}
|
|
8702
8702
|
render() {
|
|
8703
|
-
return (index.h("span", { key: '
|
|
8703
|
+
return (index.h("span", { key: '1e1698413feaee8ca810b50370fc44a5a9f229dc', innerHTML: this.iconSrc || (this.icon ? of.catIconRegistry.getIcon(this.icon) : ''), "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', part: "icon", class: {
|
|
8704
8704
|
icon: true,
|
|
8705
8705
|
[`icon-${this.size}`]: this.size !== 'inline'
|
|
8706
8706
|
} }));
|
|
@@ -10276,7 +10276,7 @@ function isNumberValue(value) {
|
|
|
10276
10276
|
return !isNaN(parseFloat(value)) && !isNaN(Number(value));
|
|
10277
10277
|
}
|
|
10278
10278
|
|
|
10279
|
-
const catInputCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";
|
|
10279
|
+
const catInputCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-loading,.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";
|
|
10280
10280
|
const CatInputStyle0 = catInputCss;
|
|
10281
10281
|
|
|
10282
10282
|
let nextUniqueId$7 = 0;
|
|
@@ -10297,6 +10297,7 @@ const CatInput = class {
|
|
|
10297
10297
|
this.clearable = false;
|
|
10298
10298
|
this.togglePassword = false;
|
|
10299
10299
|
this.disabled = false;
|
|
10300
|
+
this.loading = false;
|
|
10300
10301
|
this.hint = undefined;
|
|
10301
10302
|
this.icon = undefined;
|
|
10302
10303
|
this.iconRight = false;
|
|
@@ -10323,8 +10324,10 @@ const CatInput = class {
|
|
|
10323
10324
|
get id() {
|
|
10324
10325
|
return this.identifier || this._id;
|
|
10325
10326
|
}
|
|
10327
|
+
componentWillLoad() {
|
|
10328
|
+
this.onErrorsChanged(this.errors, undefined, false);
|
|
10329
|
+
}
|
|
10326
10330
|
componentWillRender() {
|
|
10327
|
-
this.onErrorsChanged(this.errors);
|
|
10328
10331
|
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
10329
10332
|
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
10330
10333
|
}
|
|
@@ -10364,39 +10367,39 @@ const CatInput = class {
|
|
|
10364
10367
|
async mask(options) {
|
|
10365
10368
|
new Cleave_1(this.input, options);
|
|
10366
10369
|
}
|
|
10367
|
-
onErrorsChanged(
|
|
10370
|
+
onErrorsChanged(newValue, _oldValue, update = true) {
|
|
10368
10371
|
if (!coerceBoolean(this.errorUpdate)) {
|
|
10369
10372
|
this.errorMap = undefined;
|
|
10370
10373
|
}
|
|
10371
10374
|
else {
|
|
10372
|
-
this.errorMapSrc = Array.isArray(
|
|
10373
|
-
?
|
|
10374
|
-
:
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10375
|
+
this.errorMapSrc = Array.isArray(newValue)
|
|
10376
|
+
? newValue.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
|
|
10377
|
+
: newValue || undefined;
|
|
10378
|
+
if (update) {
|
|
10379
|
+
this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
|
|
10380
|
+
}
|
|
10378
10381
|
}
|
|
10379
10382
|
}
|
|
10380
10383
|
render() {
|
|
10381
|
-
return (index.h("div", { key: '
|
|
10384
|
+
return (index.h("div", { key: 'c35a9fef53abc8f90318e04f37a15e281007ce91', class: {
|
|
10382
10385
|
'input-field': true,
|
|
10383
10386
|
'input-horizontal': this.horizontal
|
|
10384
|
-
} }, index.h("div", { key: '
|
|
10387
|
+
} }, index.h("div", { key: 'ee09123d5c98cdeb2c691e55b751908d0d770111', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: 'af7b1e38868f2deb4ad625bdf2e22f163c4a87b3', htmlFor: this.id, part: "label" }, index.h("span", { key: 'aca425f9976509f18190e93c69d5274376dff02b', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: '6d3b4503cc122a777dfafec12df63e3b891be047', name: "label" })) || this.label, index.h("div", { key: 'd5e896348ce01ae0b14e551b12a5e1bbba17af79', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '6f324f7a3acf2d24de0402975bbe20c1e14885ee', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '301c4bcde93261c6c3fa9488a36aaa57f4297421', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { key: '65d74e1addc8090889167ee0ca391c7d72bc0719', class: "label-character-count", "aria-hidden": "true" }, this.value?.toString().length ?? 0, "/", this.maxLength))))))), index.h("div", { key: 'a46c6b8644fb6effe070018e64772394ba1e49b9', class: "input-container" }, index.h("div", { key: 'bbdb55e7a339c95172281b0b145a41ca80774d64', class: "input-outer-wrapper" }, index.h("div", { key: 'bcc3207d825560d63ee77cf3bbf3996fe853c6f6', class: {
|
|
10385
10388
|
'input-wrapper': true,
|
|
10386
10389
|
'input-round': this.round,
|
|
10387
10390
|
'input-readonly': this.readonly,
|
|
10388
10391
|
'input-disabled': this.disabled,
|
|
10389
10392
|
'input-invalid': this.invalid
|
|
10390
|
-
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { key: '
|
|
10393
|
+
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { key: 'ce871809b18c5d8d0185f423a536c187f07044ac', class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (index.h("cat-icon", { key: '9b9f24c7558feac1bd2f16479a530ecf9b48053a', icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), index.h("div", { key: 'e1bdaa8e2a6354f87e3a76c7883e140323997b49', class: "input-inner-wrapper" }, index.h("input", { key: '5aed7be866964981b3d4b68d07e30cb4ac4c62c0', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
|
|
10391
10394
|
'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
|
|
10392
10395
|
'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value
|
|
10393
|
-
}, 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: '
|
|
10396
|
+
}, 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: 'b52955e6def27de98007311735ff7af7b03103bf', 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: '5ba3de99ed1e9bbcf1ce845fc6bcc045d0524a14', 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: '6b71c73cda4ba80fcdaa53e521b648245277e76c', size: "m", class: "icon-loading" }), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { key: '174802a1493b21dbed3f92553e9315a9af04b25c', icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && (index.h("cat-icon", { key: '450043a9b160386d3a04fca9ff42595a80eec135', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), this.textSuffix && (index.h("span", { key: '4c76e1d0ed2be65d144a1b17941acd1f40524002', class: "text-suffix", part: "suffix" }, this.textSuffix))), index.h("slot", { key: '6a33d7769b02c71a754e994195a91f90abce2220', name: "addon" })), this.hasHint && (index.h(CatFormHint, { key: '54c7b48879d859ccf8f0e7d44a8fa132b6d1055b', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))));
|
|
10394
10397
|
}
|
|
10395
10398
|
get hasHint() {
|
|
10396
10399
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
10397
10400
|
}
|
|
10398
10401
|
get invalid() {
|
|
10399
|
-
return !!Object.keys(this.errorMap || {}).length;
|
|
10402
|
+
return this.errorMap === true || !!Object.keys(this.errorMap || {}).length;
|
|
10400
10403
|
}
|
|
10401
10404
|
onInput() {
|
|
10402
10405
|
this.value = this.input.value;
|
|
@@ -10468,9 +10471,9 @@ const CatPagination = class {
|
|
|
10468
10471
|
this.iconNext = '$cat:pagination-right';
|
|
10469
10472
|
}
|
|
10470
10473
|
render() {
|
|
10471
|
-
return (index.h("nav", { key: '
|
|
10474
|
+
return (index.h("nav", { key: 'aea4a39cc798431911b8775600dd734595d51185', role: "navigation" }, index.h("ol", { key: 'bbcb43fa61bcd379ad84eb28ca6bcf995bf85159', class: {
|
|
10472
10475
|
[`cat-pagination-${this.size}`]: Boolean(this.size)
|
|
10473
|
-
} }, index.h("li", { key: '
|
|
10476
|
+
} }, index.h("li", { key: '984f120135399170d9374881a8562fa12b7c0a75' }, index.h("cat-button", { key: '8f173139e15c77227fc1044196887b489835a4c5', variant: this.variant, size: this.size, round: this.round, disabled: this.isFirst, a11yLabel: of.catI18nRegistry.t('pagination.prev'), icon: this.iconPrev, iconOnly: true, onClick: () => this.setPage(this.page - 1) })), this.content, index.h("li", { key: '165a68e0fd8f78f4fc6a505ec4c0715a21607d00' }, index.h("cat-button", { key: '74864af9ce7f4f38b3d1e47209d8c47faf559b96', variant: this.variant, size: this.size, round: this.round, disabled: this.isLast, a11yLabel: of.catI18nRegistry.t('pagination.next'), icon: this.iconNext, iconOnly: true, onClick: () => this.setPage(this.page + 1) })))));
|
|
10474
10477
|
}
|
|
10475
10478
|
get isFirst() {
|
|
10476
10479
|
return this.page === 0;
|
|
@@ -10573,13 +10576,13 @@ const CatRadio = class {
|
|
|
10573
10576
|
this.input.blur();
|
|
10574
10577
|
}
|
|
10575
10578
|
render() {
|
|
10576
|
-
return (index.h(index.Host, { key: '
|
|
10579
|
+
return (index.h(index.Host, { key: '7fb3add02c4e5ad69577dd753a3a0353153fa304' }, index.h("label", { key: '3b1a872da255a8dd5c396ba55e06073146cfd758', htmlFor: this.id, class: {
|
|
10577
10580
|
'is-hidden': this.labelHidden,
|
|
10578
10581
|
'is-disabled': this.disabled,
|
|
10579
10582
|
'label-left': this.labelLeft,
|
|
10580
10583
|
'align-center': this.alignment === 'center',
|
|
10581
10584
|
'align-end': this.alignment === 'bottom'
|
|
10582
|
-
}, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, index.h("span", { key: '
|
|
10585
|
+
}, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, index.h("span", { key: 'baea250060694d0f239b222efafd469c3fd51d6e', class: "radio" }, index.h("input", { key: '8d3ab427ade40822fe3fb4eab8c8b4f9be8104ae', ...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 }), index.h("span", { key: 'a0e30eb3a071d8981dc2cf6e12d42bbcf5ff8bec', class: "circle" })), index.h("span", { key: '518d21be81587a6bd6fd571b4921a9c7464f65ae', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { key: 'f9f92eb46213178a4be84210f3a7d4b758bb043c', name: "label" })) || this.label)), this.hasHint && (index.h("div", { key: '9af9f7e6331131847217ad74b2c4c7bd3ca51212', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { key: '6064b9990cbbb0f49a305acc15f0ea7bed627da7', class: "circle-placeholder" }), index.h(CatFormHint, { key: '4cb103c3f9b83555b222da19bf480af83201465e', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
|
|
10583
10586
|
}
|
|
10584
10587
|
get hasHint() {
|
|
10585
10588
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -10670,7 +10673,7 @@ const CatRadioGroup = class {
|
|
|
10670
10673
|
}
|
|
10671
10674
|
}
|
|
10672
10675
|
render() {
|
|
10673
|
-
return (index.h("div", { key: '
|
|
10676
|
+
return (index.h("div", { key: 'af9aff52c285bb32986d27c4f062f7ca8dbe394e', role: "radiogroup", "aria-label": this.a11yLabel }, index.h("slot", { key: 'e4542e17427cdd2d31e38276afe5d240f5b9e6cf' })));
|
|
10674
10677
|
}
|
|
10675
10678
|
init() {
|
|
10676
10679
|
this.catRadioGroup = Array.from(this.hostElement.querySelectorAll(`cat-radio`));
|
|
@@ -10759,13 +10762,13 @@ const CatScrollable = class {
|
|
|
10759
10762
|
}
|
|
10760
10763
|
render() {
|
|
10761
10764
|
return [
|
|
10762
|
-
index.h("div", { key: '
|
|
10763
|
-
index.h("div", { key: '
|
|
10765
|
+
index.h("div", { key: 'd2c0966e736fe4da66b4ff4c17ce51b914bc4b8d', class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, !this.noShadowY && index.h("div", { key: 'a0b25b995b5f75d1c09d4dc982ceebe9a8c904b8', class: "shadow-top" }), !this.noShadowX && index.h("div", { key: '02e550e37511bff64e9c8c2bd09c41858fdd3930', class: "shadow-left" }), !this.noShadowX && index.h("div", { key: 'debb835bfcf815837e14b1378190e90a243a1af5', class: "shadow-right" }), !this.noShadowY && index.h("div", { key: 'd646f92372ab80246f0164c672812854d6c1c946', class: "shadow-bottom" })),
|
|
10766
|
+
index.h("div", { key: 'e24d26d9c11070b8b0d5a66da3bcaeb12bf3532c', ref: el => (this.scrollElement = el), class: {
|
|
10764
10767
|
'scrollable-content': true,
|
|
10765
10768
|
'scroll-x': !this.noOverflowX,
|
|
10766
10769
|
'scroll-y': !this.noOverflowY,
|
|
10767
10770
|
'no-overscroll': this.noOverscroll
|
|
10768
|
-
} }, index.h("slot", { key: '
|
|
10771
|
+
} }, index.h("slot", { key: '6923a1a06201e1997c80af316d57d0654312dca4' }))
|
|
10769
10772
|
];
|
|
10770
10773
|
}
|
|
10771
10774
|
attachEmitter(from, emitter) {
|
|
@@ -10952,17 +10955,17 @@ const CatSelect = class {
|
|
|
10952
10955
|
onValueChanged() {
|
|
10953
10956
|
!this.valueChangedBySelection ? this.resolve() : (this.valueChangedBySelection = false);
|
|
10954
10957
|
}
|
|
10955
|
-
onErrorsChanged(
|
|
10958
|
+
onErrorsChanged(newValue, _oldValue, update = true) {
|
|
10956
10959
|
if (!coerceBoolean(this.errorUpdate)) {
|
|
10957
10960
|
this.errorMap = undefined;
|
|
10958
10961
|
}
|
|
10959
10962
|
else {
|
|
10960
|
-
this.errorMapSrc = Array.isArray(
|
|
10961
|
-
?
|
|
10962
|
-
:
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10963
|
+
this.errorMapSrc = Array.isArray(newValue)
|
|
10964
|
+
? newValue.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
|
|
10965
|
+
: newValue || undefined;
|
|
10966
|
+
if (update) {
|
|
10967
|
+
this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
|
|
10968
|
+
}
|
|
10966
10969
|
}
|
|
10967
10970
|
}
|
|
10968
10971
|
onStateChanged(newState, oldState) {
|
|
@@ -11017,8 +11020,10 @@ const CatSelect = class {
|
|
|
11017
11020
|
autoUpdate(this.trigger, this.dropdown, () => this.update());
|
|
11018
11021
|
}
|
|
11019
11022
|
}
|
|
11023
|
+
componentWillLoad() {
|
|
11024
|
+
this.onErrorsChanged(this.errors, undefined, false);
|
|
11025
|
+
}
|
|
11020
11026
|
componentWillRender() {
|
|
11021
|
-
this.onErrorsChanged(this.errors);
|
|
11022
11027
|
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
11023
11028
|
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
11024
11029
|
}
|
|
@@ -11203,18 +11208,18 @@ const CatSelect = class {
|
|
|
11203
11208
|
});
|
|
11204
11209
|
}
|
|
11205
11210
|
render() {
|
|
11206
|
-
return (index.h(index.Host, { key: '
|
|
11211
|
+
return (index.h(index.Host, { key: 'f8f27eef2e7fff527c9a3c4e7c4fde643d80b606' }, index.h("div", { key: '1d28d1629ab6407eb8af786b7878309885ea8e99', class: {
|
|
11207
11212
|
'select-field': true,
|
|
11208
11213
|
'select-horizontal': this.horizontal,
|
|
11209
11214
|
'select-multiple': this.multiple
|
|
11210
|
-
} }, index.h("div", { key: '
|
|
11215
|
+
} }, index.h("div", { key: 'dc241514b1e697c2a42c230c9f04cd07f1a3a735', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: 'd5f0179474aeca24a0773e81e9b08873e847facd', htmlFor: `select-${this.id}-input`, part: "label" }, index.h("span", { key: '3cf13b24b0537d2a70e6a0918d1ba6c9b2b84731', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: 'f0ad0d85b986a657456c8cd37b2f5cf286d1bf44', name: "label" })) || this.label, index.h("div", { key: '0ec56a4f09ee480300e5ea8c2c656f90e5fef2de', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '08c2e70f25ccf68bbc73d2366e39f4bde5d1c675', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '7e7fe7b9e28e4833bb413c60af3459a1d998189b', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: 'bf37c5423d2e33d98bd62007a74a45f2362c4575', class: "select-container" }, index.h("div", { key: 'f09d751cfd05f43942ad5ad77706f8ae39050de9', 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) }, index.h("div", { key: '5378a3d5f444e6346c53ffb7023cce68cf1c3ffb', class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (index.h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (index.h("span", { class: {
|
|
11211
11216
|
pill: true,
|
|
11212
11217
|
'select-no-open': true,
|
|
11213
11218
|
'select-option-active': this.state.activeSelectionIndex === i
|
|
11214
|
-
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (index.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, index.h("span", null, item.render.label), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: of.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 ? (index.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, index.h("input", { key: '
|
|
11219
|
+
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (index.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, index.h("span", null, item.render.label), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: of.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 ? (index.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, index.h("input", { key: '27755954d228e33d0ba6adf5736defcd1d56b32b', ...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 && index.h("cat-spinner", { key: '4621c8c3b7e430e5841471757da5a51df5ca86ad' }), this.invalid && (index.h("cat-icon", { key: 'b4d31caef78d62769c3dc84fc6d4415f8c5ee849', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
|
|
11215
11220
|
!this.disabled &&
|
|
11216
11221
|
!this.state.isResolving &&
|
|
11217
|
-
this.clearable ? (index.h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: of.catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (index.h("cat-button", { key: '
|
|
11222
|
+
this.clearable ? (index.h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: of.catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (index.h("cat-button", { key: '54a2c42cda8750dce73c4730a3a8f4cdc3c959f2', iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? of.catI18nRegistry.t('select.close') : of.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 && (index.h(CatFormHint, { key: 'de8b11dcd1e97476a811f9811026eae619c42ac8', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))), index.h("div", { key: '558cf4e93022770cf7841eab7d2f8b116cb221be', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (index.h("cat-scrollable", { key: 'cdc203f6738614839f1a18c2bce9353f0df8e47c', class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, index.h("ul", { key: '63316734b1e845d727ef4628b1d324a3757f7989', class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isFirstLoading
|
|
11218
11223
|
? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (index.h("li", { class: "select-option-loading" }, index.h("cat-skeleton", { variant: "body", lines: 1 }), index.h("cat-skeleton", { variant: "body", lines: 1 }))))
|
|
11219
11224
|
: !this.state.options.length &&
|
|
11220
11225
|
!this.tags && (index.h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : of.catI18nRegistry.t('select.empty')))))))));
|
|
@@ -11223,7 +11228,7 @@ const CatSelect = class {
|
|
|
11223
11228
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
11224
11229
|
}
|
|
11225
11230
|
get invalid() {
|
|
11226
|
-
return !!Object.keys(this.errorMap || {}).length;
|
|
11231
|
+
return this.errorMap === true || !!Object.keys(this.errorMap || {}).length;
|
|
11227
11232
|
}
|
|
11228
11233
|
get optionsList() {
|
|
11229
11234
|
return this.state.options.map((item, i) => {
|
|
@@ -11706,7 +11711,7 @@ const CatSelectTest = class {
|
|
|
11706
11711
|
setTimeout(() => this.multipleSelect && (this.multipleSelect.value = []), 5000);
|
|
11707
11712
|
}
|
|
11708
11713
|
render() {
|
|
11709
|
-
return (index.h(index.Host, { key: '
|
|
11714
|
+
return (index.h(index.Host, { key: '0427cd222f128124aa5b7304ecc56f98f82ad601', style: { display: 'flex', flexDirection: 'column' }, class: "cat-form" }, index.h("cat-select", { key: '20731907f24cecd4f79bc2b8fb55bf4ca2a8781d', label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => console.log('Multiple change', this.multipleSelect?.value), onCatBlur: e => console.log('Multiple blur', e), multiple: true, noItems: "No results", clearable: true, errorUpdate: false }, index.h("span", { key: 'b4284b5fa7bd3c80c49900cc901a67ce87b02fba', slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), index.h("cat-select", { key: '1ae920c166bcffb8c417887ab01830bc9704d82b', label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: '6928bbfea0b54d3a2d82bdc16de71208934cd4ab', label: "Multiple with initials", ref: el => (this.multipleSelectAvatarInitials = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: 'ffa816a1e6f4e5e170aeed4c64f75aefb928e800', label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania', 'Algeria'] }, placeholder: "Select country", onCatChange: () => console.log('Multiple tagging change', this.multipleSelectTagging?.value), multiple: true, tags: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: 'a392acd00395251efe86deb5f95de439cb2e2947', label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true, errorUpdate: false }), index.h("cat-select", { key: 'abe4098459cb27c12ecccd500080ed4b183d4221', label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', placeholder: "Search for a country or capital", clearable: true, errorUpdate: false }), index.h("cat-select", { key: '59e0e9df2329e1ee7f96a071462a58e7aac8c057', label: "Single with initials", ref: el => (this.singleSelectAvatarInitials = el), placeholder: "Hello World", clearable: true, errorUpdate: false }), index.h("cat-dropdown", { key: 'bfed29db8e502f705877dd79ad9f584569639a22', overflow: true }, index.h("cat-button", { key: 'fda80f359585e24f3fa9cff4567b4c6d0681cc9d', slot: "trigger", style: { width: '50%' } }, "Open select"), index.h("div", { key: '180ed85afb561a07ff346bd481503d57c336fbe6', slot: "content", style: { width: '400px' } }, index.h("cat-select", { key: '12efa7508dfcb72cb897a160353958ef2c66a7a0', label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '', tag: 'Albania' }, placeholder: "Search for a country or capital", onCatChange: () => console.log('Single change', this.singleSelectTagging?.value), tagHint: "new country", tags: true, clearable: true, errorUpdate: false, style: { width: '90%' } })))));
|
|
11710
11715
|
}
|
|
11711
11716
|
get countryConnector() {
|
|
11712
11717
|
return {
|
|
@@ -12962,7 +12967,7 @@ const CatSkeleton = class {
|
|
|
12962
12967
|
this.lines = undefined;
|
|
12963
12968
|
}
|
|
12964
12969
|
render() {
|
|
12965
|
-
return (index.h(index.Host, { key: '
|
|
12970
|
+
return (index.h(index.Host, { key: '95992890ce7b8c90068af979179fe6e512cd599c' }, Array.from(Array(this.count)).map(() => (index.h("div", { style: this.style, class: {
|
|
12966
12971
|
skeleton: true,
|
|
12967
12972
|
[`skeleton-${this.effect}`]: Boolean(this.effect),
|
|
12968
12973
|
[`skeleton-${this.variant}`]: Boolean(this.variant),
|
|
@@ -13002,9 +13007,9 @@ const CatSpinner = class {
|
|
|
13002
13007
|
this.a11yLabel = undefined;
|
|
13003
13008
|
}
|
|
13004
13009
|
render() {
|
|
13005
|
-
return (index.h("span", { key: '
|
|
13010
|
+
return (index.h("span", { key: '89faeed63cfd08de386255baa799e7d830721d79', "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', class: {
|
|
13006
13011
|
[`spinner-${this.size}`]: this.size !== 'inline'
|
|
13007
|
-
} }, index.h("svg", { key: '
|
|
13012
|
+
} }, index.h("svg", { key: 'afaf3eca2151ca1a55a7b5154b35e5f182f20c98', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, index.h("circle", { key: 'd23f0e2af84424c2a14c6746f96e9f5c3eff4f43', cx: "24", cy: "24", r: "21.5" }))));
|
|
13008
13013
|
}
|
|
13009
13014
|
};
|
|
13010
13015
|
CatSpinner.style = CatSpinnerStyle0;
|
|
@@ -13036,7 +13041,7 @@ const CatTab = class {
|
|
|
13036
13041
|
this.catClick.emit(event);
|
|
13037
13042
|
}
|
|
13038
13043
|
render() {
|
|
13039
|
-
return index.h(index.Host, { key: '
|
|
13044
|
+
return index.h(index.Host, { key: '7a34fd50ed725aac1cd6a36125aad1fb044203e9' });
|
|
13040
13045
|
}
|
|
13041
13046
|
get hostElement() { return index.getElement(this); }
|
|
13042
13047
|
};
|
|
@@ -13100,7 +13105,7 @@ const CatTabs = class {
|
|
|
13100
13105
|
this.activate(this.tabs[index]);
|
|
13101
13106
|
}
|
|
13102
13107
|
render() {
|
|
13103
|
-
return (index.h(index.Host, { key: '
|
|
13108
|
+
return (index.h(index.Host, { key: 'ffcba33b7d479bd2a282a21a51d82664e79f0743' }, this.tabs.map((tab) => {
|
|
13104
13109
|
return (index.h("cat-button", { buttonId: tab.id, role: "tab", part: "tab", class: {
|
|
13105
13110
|
'cat-tab': true,
|
|
13106
13111
|
'cat-tab-active': tab.id === this.activeTab,
|
|
@@ -13167,11 +13172,12 @@ const CatTag = class {
|
|
|
13167
13172
|
get id() {
|
|
13168
13173
|
return this.identifier || this._id;
|
|
13169
13174
|
}
|
|
13170
|
-
|
|
13171
|
-
|
|
13175
|
+
componentWillLoad() {
|
|
13176
|
+
this.onErrorsChanged(this.errors, undefined, false);
|
|
13172
13177
|
}
|
|
13173
|
-
|
|
13174
|
-
|
|
13178
|
+
componentWillRender() {
|
|
13179
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
13180
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
13175
13181
|
}
|
|
13176
13182
|
onKeyDown(event) {
|
|
13177
13183
|
const isInputFocused = this.hostElement.shadowRoot?.activeElement === this.input;
|
|
@@ -13193,26 +13199,27 @@ const CatTag = class {
|
|
|
13193
13199
|
this.catChange.emit(this.value);
|
|
13194
13200
|
}
|
|
13195
13201
|
}
|
|
13196
|
-
onErrorsChanged(
|
|
13202
|
+
onErrorsChanged(newValue, _oldValue, update = true) {
|
|
13197
13203
|
if (!coerceBoolean(this.errorUpdate)) {
|
|
13198
13204
|
this.errorMap = undefined;
|
|
13199
13205
|
}
|
|
13200
13206
|
else {
|
|
13201
|
-
this.errorMapSrc = Array.isArray(
|
|
13202
|
-
?
|
|
13203
|
-
:
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
+
this.errorMapSrc = Array.isArray(newValue)
|
|
13208
|
+
? newValue.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
|
|
13209
|
+
: newValue || undefined;
|
|
13210
|
+
if (update) {
|
|
13211
|
+
this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
|
|
13212
|
+
}
|
|
13207
13213
|
}
|
|
13208
13214
|
}
|
|
13209
|
-
componentWillRender() {
|
|
13210
|
-
this.onErrorsChanged(this.errors);
|
|
13211
|
-
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
13212
|
-
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
13213
|
-
}
|
|
13214
13215
|
render() {
|
|
13215
|
-
return (index.h(index.Host, { key: '
|
|
13216
|
+
return (index.h(index.Host, { key: '135364ebcdc0a62c65bac513a6b1064471dde605' }, index.h("div", { key: '4817ca9e3cd93efdc06e22e0b415db48b00185f7', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: 'b95bcba6027f2fa40b7923366ceb2a1c26129a3e', htmlFor: `tags-${this.id}-input`, part: "label" }, index.h("span", { key: '9c704843a3c064509204833a3ba6e5eac2d21231', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: 'e2ab5fe74ed24208728a982af1159dcc72a09c41', name: "label" })) || this.label, index.h("div", { key: '7469074d3cfc1bf339946d5a442af837dadf0084', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '0d2aef89e70dbaa69158fe258696603e0d677c80', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '7a4aea95cd7d800a08f18f4328480d6f85a0496d', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: '1720e39c3bf5ba7985293e61d1dc418e73244811', class: { 'input-wrapper': true, 'input-disabled': this.disabled, 'input-invalid': this.invalid } }, this.value?.map(value => (index.h("div", { class: "tag-pill" }, index.h("span", null, value), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: of.catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(value), tabIndex: -1 }))))), index.h("div", { key: '44dda72d8199e6734bccd7cc04d1b351fadd5aee', class: "input-inner-wrapper" }, index.h("input", { key: 'c0cf4621bb64972abc2de682ee6fd5c25fcbb204', ...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), placeholder: this.placeholder, disabled: this.disabled }), this.clearable && !this.disabled && (this.value?.length ?? 0) > 0 && (index.h("cat-button", { key: '3352788f1b1efcd077561c4f2a32ab08a1970447', 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.invalid && index.h("cat-icon", { key: 'd699cf0b9b44899618e01d2fec55f020bd45c2b4', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }))), this.hasHint && (index.h(CatFormHint, { key: '2b9e63f062e99069dc43946c236ddb7805b86f41', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap }))));
|
|
13217
|
+
}
|
|
13218
|
+
get hasHint() {
|
|
13219
|
+
return !!this.hint || this.invalid;
|
|
13220
|
+
}
|
|
13221
|
+
get invalid() {
|
|
13222
|
+
return this.errorMap === true || !!Object.keys(this.errorMap || {}).length;
|
|
13216
13223
|
}
|
|
13217
13224
|
onInput() {
|
|
13218
13225
|
const currentValue = [
|
|
@@ -13308,8 +13315,10 @@ const CatTextarea = class {
|
|
|
13308
13315
|
get id() {
|
|
13309
13316
|
return this.identifier || this._id;
|
|
13310
13317
|
}
|
|
13318
|
+
componentWillLoad() {
|
|
13319
|
+
this.onErrorsChanged(this.errors, undefined, false);
|
|
13320
|
+
}
|
|
13311
13321
|
componentWillRender() {
|
|
13312
|
-
this.onErrorsChanged(this.errors);
|
|
13313
13322
|
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
13314
13323
|
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
13315
13324
|
}
|
|
@@ -13340,35 +13349,35 @@ const CatTextarea = class {
|
|
|
13340
13349
|
this.value = '';
|
|
13341
13350
|
this.catChange.emit(this.value);
|
|
13342
13351
|
}
|
|
13343
|
-
onErrorsChanged(
|
|
13352
|
+
onErrorsChanged(newValue, _oldValue, update = true) {
|
|
13344
13353
|
if (!coerceBoolean(this.errorUpdate)) {
|
|
13345
13354
|
this.errorMap = undefined;
|
|
13346
13355
|
}
|
|
13347
13356
|
else {
|
|
13348
|
-
this.errorMapSrc = Array.isArray(
|
|
13349
|
-
?
|
|
13350
|
-
:
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13357
|
+
this.errorMapSrc = Array.isArray(newValue)
|
|
13358
|
+
? newValue.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
|
|
13359
|
+
: newValue || undefined;
|
|
13360
|
+
if (update) {
|
|
13361
|
+
this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
|
|
13362
|
+
}
|
|
13354
13363
|
}
|
|
13355
13364
|
}
|
|
13356
13365
|
render() {
|
|
13357
|
-
return (index.h(index.Host, { key: '
|
|
13366
|
+
return (index.h(index.Host, { key: '5e2569d36f6faec841701fd9acb640737f5be4bd' }, index.h("div", { key: '8bfd630114a41d5128f546c4596a2fc0de7b0f46', class: {
|
|
13358
13367
|
'textarea-field': true,
|
|
13359
13368
|
'textarea-horizontal': this.horizontal
|
|
13360
|
-
} }, index.h("div", { key: '
|
|
13369
|
+
} }, index.h("div", { key: '5d61d594bf5dd54a61d67e567d7f75d10e81fc16', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: 'ce7a20106b85c6ac1993154bcac3b045ac9db4b7', htmlFor: this.id, part: "label" }, index.h("span", { key: 'b6a5faa611b0b5fc1d2e4b34cb0b87ef48b76510', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: 'd6ac0138ad90af2d80933237f1244560b4678c10', name: "label" })) || this.label, index.h("div", { key: 'a3034e991a35206aaad04a068056a7b25a3ef0d0', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '8231926224217c999493c56656ee360453865ee5', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '666ea1ef5ac684c1ddfa854605afb3f15d1bb31a', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { key: '09b4afa39cb26371d179095c3e703ab5437309d2', class: "label-character-count", "aria-hidden": "true" }, this.value?.length ?? 0, "/", this.maxLength))))))), index.h("div", { key: 'f4640f6761d044ea29810b89604d5d40101427e1', class: "textarea-container" }, index.h("div", { key: '51bac1b86b0aaa37e2bc80fade34478e0da9f04b', class: {
|
|
13361
13370
|
'textarea-wrapper': true,
|
|
13362
13371
|
'textarea-readonly': this.readonly,
|
|
13363
13372
|
'textarea-disabled': this.disabled,
|
|
13364
13373
|
'textarea-invalid': this.invalid
|
|
13365
|
-
} }, index.h("textarea", { key: '
|
|
13374
|
+
} }, index.h("textarea", { key: '5248d353acf90ea7efbbe99bf4faf7d411373189', ...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: '8b3cf0397ff8813be35c6344e079057fd5d1b032', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (index.h(CatFormHint, { key: '9cd285c4aac61a812e8308f3d005d3f95c8c6d97', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
|
|
13366
13375
|
}
|
|
13367
13376
|
get hasHint() {
|
|
13368
13377
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
13369
13378
|
}
|
|
13370
13379
|
get invalid() {
|
|
13371
|
-
return !!Object.keys(this.errorMap || {}).length;
|
|
13380
|
+
return this.errorMap === true || !!Object.keys(this.errorMap || {}).length;
|
|
13372
13381
|
}
|
|
13373
13382
|
onInput() {
|
|
13374
13383
|
this.value = this.textarea.value;
|
|
@@ -13597,14 +13606,14 @@ const CatTime = class {
|
|
|
13597
13606
|
this.input?.clear();
|
|
13598
13607
|
}
|
|
13599
13608
|
render() {
|
|
13600
|
-
return (index.h(index.Host, { key: '
|
|
13609
|
+
return (index.h(index.Host, { key: 'e7f3fec7aac9269904c5b85554e1c066b1ca630e' }, index.h("cat-input", { key: 'e7e3ecb30bdbe05e07bb749edbddca5f23312985', class: "cat-time-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.format(this.selectionTime, false), errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, index.h("span", { key: 'fb1227046b0e70ca3b3e7fdd817693415f3c95cd', slot: "label" }, this.hasSlottedLabel && index.h("slot", { key: '80986dbd022a16c7346fce67aa9142c77b7f878f', name: "label" }), !this.hasSlottedLabel && this.label, index.h("span", { key: 'a0122503c91023c09cfaf02a528a2af9a8fae457', class: "label-aria" }, " (HH:mm)")), index.h("div", { key: '3f8179a371368b89267571e66827b7f79f1b0cda', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (index.h("cat-button", { key: '62cd7e32d099d45142a5241a7485275e675d498d', class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), index.h("cat-dropdown", { key: '8a7926b666c69528396a683048efaf9d8ad54df1', slot: "addon", placement: this.placement }, index.h("cat-button", { key: '47b6dffa1c65644bc36706d0187c1681fbd3327e', slot: "trigger", class: "cat-time-toggle", disabled: this.disabled || this.readonly, icon: "$cat:timepicker-clock", iconOnly: true, a11yLabel: this.selectionTime ? `${this.locale.change}, ${this.format(this.selectionTime)}` : this.locale.choose }), index.h("nav", { key: '6afd81a1b00e31723efcb3b49c3df97c52ea21b0', slot: "content", class: "cat-nav" }, index.h("ul", { key: 'd1176db0809d98ad0dd4919dd28aed480b668cbc' }, this.timeArray().map(time => {
|
|
13601
13610
|
const isoTime = formatIso(time);
|
|
13602
13611
|
const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);
|
|
13603
13612
|
return (index.h("li", null, index.h("cat-button", { class: {
|
|
13604
13613
|
'cat-nav-item': true,
|
|
13605
13614
|
'time-disabled': disabled
|
|
13606
13615
|
}, disabled: disabled, active: isoTime === this.value, color: isoTime === this.value ? 'primary' : 'secondary', variant: isoTime === this.value ? 'filled' : 'outlined', onCatClick: () => this.select(time), "data-time": isoTime }, this.format(time))));
|
|
13607
|
-
}))))), this.hasSlottedHint && (index.h("span", { key: '
|
|
13616
|
+
}))))), this.hasSlottedHint && (index.h("span", { key: '9c46d6be446c162b785d2d03a856b63417f1a38e', slot: "hint" }, index.h("slot", { key: '1e581c2ee687c125552ad560da773da4dfdd4691', name: "hint" }))))));
|
|
13608
13617
|
}
|
|
13609
13618
|
timeArray() {
|
|
13610
13619
|
const result = [];
|
|
@@ -13730,13 +13739,13 @@ const CatToggle = class {
|
|
|
13730
13739
|
this.input.blur();
|
|
13731
13740
|
}
|
|
13732
13741
|
render() {
|
|
13733
|
-
return (index.h(index.Host, { key: '
|
|
13742
|
+
return (index.h(index.Host, { key: '219420443e79499c24a6c10335cedb7ddb1cc2ab' }, index.h("label", { key: '8ffc784cf23916ec23ab7c23a2c97e41cb4cfc15', htmlFor: this.id, class: {
|
|
13734
13743
|
'is-hidden': this.labelHidden,
|
|
13735
13744
|
'is-disabled': this.disabled,
|
|
13736
13745
|
'label-left': this.labelLeft,
|
|
13737
13746
|
'align-center': this.alignment === 'center',
|
|
13738
13747
|
'align-end': this.alignment === 'bottom'
|
|
13739
|
-
} }, index.h("input", { key: '
|
|
13748
|
+
} }, index.h("input", { key: '56e7c4442215c8dd227b5d5c45b023836801d471', ...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 }), index.h("span", { key: '83fefa9d2480f8447762371da322114bc5a84a90', class: "toggle" }), index.h("span", { key: '86c800327c80c12d5bd7ab6fad43d414bf3316f5', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { key: '990568b1744ca7fc7084fbb796bf5829254c4ba3', name: "label" })) || this.label)), this.hasHint && (index.h("div", { key: '72cad47ea14041c3f51da3e95264cbf5c6a78c1a', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { key: 'ef4cceeda35a41bbb8907113aff690e92925c7c1', class: "toggle-placeholder" }), index.h(CatFormHint, { key: 'bbcea6bd0bfe51d8d070d8ab2568212d4ea20ea3', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
|
|
13740
13749
|
}
|
|
13741
13750
|
get hasHint() {
|
|
13742
13751
|
return !!this.hint || !!this.hasSlottedHint;
|