@haiilo/catalyst 10.26.1 → 10.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/p-a0e69279.entry.js +10 -0
- package/dist/catalyst/p-a0e69279.entry.js.map +1 -0
- package/dist/catalyst/p-c3a9aef7.js +3 -0
- package/dist/catalyst/p-c3a9aef7.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +75 -38
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +2 -2
- package/dist/cjs/{index-a45dd7c9.js → index-0c9af7fb.js} +6 -3
- package/dist/cjs/index-0c9af7fb.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/cat-avatar/cat-avatar.js +3 -0
- package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.js +2 -0
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +4 -2
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js.map +1 -1
- package/dist/collection/components/cat-date/cat-date.js +4 -2
- package/dist/collection/components/cat-date/cat-date.js.map +1 -1
- package/dist/collection/components/cat-date/cat-date.spec.js +1 -1
- package/dist/collection/components/cat-date/cat-date.spec.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-date-inline/cat-date-inline.spec.js +1 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +2 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.js +6 -4
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.spec.js +1 -1
- package/dist/collection/components/cat-input/cat-input.spec.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.js +5 -2
- package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.spec.js +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.spec.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.js +4 -2
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.spec.js +1 -1
- package/dist/collection/components/cat-radio/cat-radio.spec.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.js +6 -4
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.spec.js +1 -1
- package/dist/collection/components/cat-select/cat-select.spec.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js +21 -2
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.spec.js +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.spec.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.js +20 -1
- package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +7 -3
- package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.spec.js +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.spec.js.map +1 -1
- package/dist/collection/components/cat-tag/cat-tag.js +3 -1
- package/dist/collection/components/cat-tag/cat-tag.js.map +1 -1
- package/dist/collection/components/cat-tag/cat-tag.spec.js +1 -1
- package/dist/collection/components/cat-tag/cat-tag.spec.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +5 -3
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.spec.js +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.spec.js.map +1 -1
- package/dist/collection/components/cat-time/cat-time.css +1 -0
- package/dist/collection/components/cat-time/cat-time.js +4 -2
- package/dist/collection/components/cat-time/cat-time.js.map +1 -1
- package/dist/collection/components/cat-time/cat-time.spec.js +1 -1
- package/dist/collection/components/cat-time/cat-time.spec.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +4 -2
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.spec.js +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.spec.js.map +1 -1
- package/dist/collection/utils/first-tabbable.js +3 -1
- package/dist/collection/utils/first-tabbable.js.map +1 -1
- package/dist/components/cat-avatar2.js +4 -1
- package/dist/components/cat-avatar2.js.map +1 -1
- package/dist/components/cat-button2.js +3 -1
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox2.js +5 -3
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-date-inline2.js +7 -5
- package/dist/components/cat-date-inline2.js.map +1 -1
- package/dist/components/cat-date.js +5 -3
- package/dist/components/cat-date.js.map +1 -1
- package/dist/components/cat-dropdown2.js +2 -1
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-input2.js +7 -5
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-pagination.js +6 -3
- package/dist/components/cat-pagination.js.map +1 -1
- package/dist/components/cat-radio.js +5 -3
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-select2.js +7 -5
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-spinner2.js +5 -3
- package/dist/components/cat-spinner2.js.map +1 -1
- package/dist/components/cat-tab.js +3 -1
- package/dist/components/cat-tab.js.map +1 -1
- package/dist/components/cat-tabs.js +8 -4
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-tag.js +4 -2
- package/dist/components/cat-tag.js.map +1 -1
- package/dist/components/cat-textarea.js +6 -4
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-time.js +6 -4
- package/dist/components/cat-time.js.map +1 -1
- package/dist/components/cat-toggle.js +5 -3
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/first-tabbable.js +3 -1
- package/dist/components/first-tabbable.js.map +1 -1
- package/dist/esm/cat-alert_30.entry.js +75 -38
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/esm/catalyst.js +3 -3
- package/dist/esm/{index-3059296e.js → index-30afba72.js} +6 -3
- package/dist/esm/index-30afba72.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/cat-avatar/cat-avatar.d.ts +1 -0
- package/dist/types/components/cat-pagination/cat-pagination.d.ts +1 -0
- package/dist/types/components/cat-spinner/cat-spinner.d.ts +4 -0
- package/dist/types/components/cat-tab/cat-tab.d.ts +7 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +2 -2
- package/dist/catalyst/p-751d92ed.js +0 -3
- package/dist/catalyst/p-751d92ed.js.map +0 -1
- package/dist/catalyst/p-eb4e484c.entry.js +0 -10
- package/dist/catalyst/p-eb4e484c.entry.js.map +0 -1
- package/dist/cjs/index-a45dd7c9.js.map +0 -1
- package/dist/esm/index-3059296e.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-30afba72.js';
|
|
2
2
|
import { e as createErrorClass, O as Observable, f as errorContext, E as EMPTY_SUBSCRIPTION, S as Subscription, g as arrRemove, h as operate, i as createOperatorSubscriber, j as innerFrom, k as executeSchedule, l as isFunction, m as identity, n as from, p as popScheduler, q as isArrayLike, r as isScheduler, s as popNumber, t as noop, u as log, a as catI18nRegistry, c as commonjsGlobal$1, d as catIconRegistry, o as of } from './of-acb1f3a9.js';
|
|
3
3
|
|
|
4
4
|
const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
|
|
@@ -869,6 +869,7 @@ const CatAvatar = class {
|
|
|
869
869
|
}
|
|
870
870
|
render() {
|
|
871
871
|
if (this.url) {
|
|
872
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
872
873
|
return (h("a", { href: this.url, target: this.urlTarget, style: this.cssStyle, class: this.cssClass, "aria-label": this.label }, this.content));
|
|
873
874
|
}
|
|
874
875
|
else {
|
|
@@ -897,6 +898,8 @@ const CatAvatar = class {
|
|
|
897
898
|
.map(n => n[0])
|
|
898
899
|
.join(''));
|
|
899
900
|
}
|
|
901
|
+
static get delegatesFocus() { return true; }
|
|
902
|
+
get hostElement() { return getElement(this); }
|
|
900
903
|
static get watchers() { return {
|
|
901
904
|
"src": ["onSrcChanged"]
|
|
902
905
|
}; }
|
|
@@ -1194,6 +1197,7 @@ const CatButton = class {
|
|
|
1194
1197
|
this.button.click();
|
|
1195
1198
|
}
|
|
1196
1199
|
render() {
|
|
1200
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
1197
1201
|
if (this.url) {
|
|
1198
1202
|
return (h(Host, { "data-button-group": this.buttonGroupPosition }, h("a", { ...this.nativeAttributes, ref: el => (this.button = el), href: this.disabled ? undefined : this.url, target: this.urlTarget, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, "aria-current": this.a11yCurrent, id: this.buttonId, part: "button", class: {
|
|
1199
1203
|
'cat-button': true,
|
|
@@ -1269,6 +1273,7 @@ const CatButton = class {
|
|
|
1269
1273
|
onBlur(event) {
|
|
1270
1274
|
this.catBlur.emit(event);
|
|
1271
1275
|
}
|
|
1276
|
+
static get delegatesFocus() { return true; }
|
|
1272
1277
|
get hostElement() { return getElement(this); }
|
|
1273
1278
|
static get watchers() { return {
|
|
1274
1279
|
"iconOnly": ["onIconOnlyChanged"]
|
|
@@ -1392,13 +1397,14 @@ const CatCheckbox = class {
|
|
|
1392
1397
|
this.input.blur();
|
|
1393
1398
|
}
|
|
1394
1399
|
render() {
|
|
1395
|
-
|
|
1400
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
1401
|
+
return (h(Host, { key: 'ab6bd1bb1b74998b5202e57ba6b32da9dd0135c8' }, h("label", { key: '5554806b29bbdea219869d043f9c41469390720d', htmlFor: this.id, class: {
|
|
1396
1402
|
'is-hidden': this.labelHidden,
|
|
1397
1403
|
'is-disabled': this.disabled,
|
|
1398
1404
|
'label-left': this.labelLeft,
|
|
1399
1405
|
'align-center': this.alignment === 'center',
|
|
1400
1406
|
'align-end': this.alignment === 'bottom'
|
|
1401
|
-
} }, h("input", { key: '
|
|
1407
|
+
} }, h("input", { key: 'cccc0ef488d141b6eb4859fcc58433174f7ce21b', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, indeterminate: this.indeterminate, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), h("span", { key: 'c6c568ebc80618b4acc3e28793c1844284d4a831', class: "box", "aria-hidden": "true" }, h("svg", { key: '5c8c2ae933fecab8b9c826ef2493b2dec129f49c', class: "check", viewBox: "0 0 12 10" }, h("polyline", { key: '4ed298a1e0377c4ca771940b7da867c5e72017af', points: "1.5 6 4.5 9 10.5 1" })), h("svg", { key: '4ca83993e600c99f4651333ce9f86c0f2b85754a', class: "dash", viewBox: "0 0 12 10" }, h("polyline", { key: '32d6a98f6247ce1605baa1c0fcb66325300d0118', points: "1.5 5 10.5 5" }))), h("span", { key: 'cdf8717a98a756e4ae204d08fd186cf49ea7d101', class: { label: true, 'label-wrapper': !this.hasSlottedLabel }, part: "label" }, (this.hasSlottedLabel && h("slot", { key: '967c87e44e4bb119b46ae70edf2eb47d63177a90', name: "label" })) || this.label, h("span", { key: '04a85b99e78e8db04e4080d54ff1690051ce2a50', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: 'caf9a8682262079edf06957ca2a2c9d14abc9130', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: 'd073fb49348c5561984c73bafbf7fd7e17f01ba5', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")"))))), this.hasHint && (h("div", { key: '9fb0531829e03683accb07fdc675975feb709577', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, h("div", { key: 'e72ad8ae3b9048ef6a58d74eb9593d511fad03c6', class: "box-placeholder" }), h(CatFormHint, { key: 'b10a09f94fe13f1cc7602191c0e7b3d2066a8364', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }) })))));
|
|
1402
1408
|
}
|
|
1403
1409
|
get hasHint() {
|
|
1404
1410
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -1418,6 +1424,7 @@ const CatCheckbox = class {
|
|
|
1418
1424
|
updateResolved() {
|
|
1419
1425
|
this.resolvedValue = this.checked ? (this.value ?? true) : (this.noValue ?? false);
|
|
1420
1426
|
}
|
|
1427
|
+
static get delegatesFocus() { return true; }
|
|
1421
1428
|
get hostElement() { return getElement(this); }
|
|
1422
1429
|
};
|
|
1423
1430
|
CatCheckbox.style = CatCheckboxStyle0;
|
|
@@ -1615,14 +1622,15 @@ const CatDate = class {
|
|
|
1615
1622
|
this.input?.clear();
|
|
1616
1623
|
}
|
|
1617
1624
|
render() {
|
|
1618
|
-
|
|
1625
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
1626
|
+
return (h(Host, { key: '6cb5833dd0f95cf170ad74d3841eee067e315df1' }, h("cat-input", { key: 'a97d7b5f9ee3a6f63a648e491182b2ab9287bedf', 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 => {
|
|
1619
1627
|
this.inputFocused = e.target === this.input;
|
|
1620
1628
|
e.stopPropagation();
|
|
1621
1629
|
this.catFocus.emit(e.detail);
|
|
1622
1630
|
}, onCatBlur: e => {
|
|
1623
1631
|
e.stopPropagation();
|
|
1624
1632
|
this.onInputBlur(e.detail);
|
|
1625
|
-
} }, h("span", { key: '
|
|
1633
|
+
} }, h("span", { key: 'c7d342b0fa3b522af5d0368e590345a2524c40ee', slot: "label" }, this.label, h("span", { key: '44d02ddce886497f9f93dc8bb73b943ae7317d07', class: "label-aria" }, " (", this.locale.formatStr, ")")), h("cat-dropdown", { key: 'a4b84508af92334d93b406f767f8080ab28a831b', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, h("cat-button", { key: '0e48c43b6bb3b34bb70c97e7ed2bae01664c3d4e', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), h("div", { key: '976f8aa393d60c1425a63198baeabf7522bc38c4', slot: "content" }, h("cat-date-inline", { key: '08d8833fef723d80000c330fa58a3eb30d57d211', 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) }))))));
|
|
1626
1634
|
}
|
|
1627
1635
|
getTriggerA11yLabel() {
|
|
1628
1636
|
const date = this.locale.fromLocalISO(this.value);
|
|
@@ -1689,6 +1697,7 @@ const CatDate = class {
|
|
|
1689
1697
|
this.catChange.emit(newValue);
|
|
1690
1698
|
}
|
|
1691
1699
|
}
|
|
1700
|
+
static get delegatesFocus() { return true; }
|
|
1692
1701
|
get hostElement() { return getElement(this); }
|
|
1693
1702
|
static get watchers() { return {
|
|
1694
1703
|
"min": ["onMinChanged"],
|
|
@@ -2267,7 +2276,9 @@ var isFocusable = function isFocusable(node, options) {
|
|
|
2267
2276
|
};
|
|
2268
2277
|
|
|
2269
2278
|
const firstTabbable = (container) => {
|
|
2270
|
-
return (container
|
|
2279
|
+
return (container
|
|
2280
|
+
? tabbable(container, { includeContainer: true, getShadowRoot: true }).filter(element => !element.shadowRoot?.delegatesFocus)
|
|
2281
|
+
: []).shift();
|
|
2271
2282
|
};
|
|
2272
2283
|
|
|
2273
2284
|
const catDateInlineCss = "/**\n * Auto-generated file. Do not edit directly.\n */\n/* stylelint-disable value-keyword-case */\n/* stylelint-enable value-keyword-case */\n.label {\n overflow: hidden;\n word-wrap: break-word;\n word-break: break-word;\n}\n\n.input-field:not(.input-horizontal) .label-container.hidden,\n.textarea-field:not(.textarea-horizontal) .label-container.hidden,\n.select-field:not(.select-horizontal) .label-container.hidden {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.label-container {\n flex-basis: var(--label-size, 33.33%);\n}\n\n.label-wrapper {\n display: flex;\n gap: 0.25rem;\n}\n\n.label-metadata {\n display: flex;\n flex-shrink: 0;\n flex-grow: 1;\n justify-content: space-between;\n gap: 0.25rem;\n color: rgb(var(--cat-font-color-muted, 81, 92, 108));\n}\n\n.label-optional,\n.label-character-count {\n display: inline-flex;\n align-items: center;\n max-height: 1.25rem;\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.label-character-count {\n margin-left: auto;\n}\n\n.input-horizontal .label-container.hidden label,\n.textarea-horizontal .label-container.hidden label,\n.select-horizontal .label-container.hidden label {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n.input-horizontal .label-wrapper,\n.textarea-horizontal .label-wrapper,\n.select-horizontal .label-wrapper {\n flex-direction: column;\n}\n.input-horizontal label,\n.textarea-horizontal label,\n.select-horizontal label {\n min-height: 2.5rem;\n display: inline-flex;\n align-items: center;\n}\n.input-horizontal .label-metadata,\n.textarea-horizontal .label-metadata,\n.select-horizontal .label-metadata {\n justify-content: flex-start;\n}\n.input-horizontal .label-metadata .label-character-count,\n.textarea-horizontal .label-metadata .label-character-count,\n.select-horizontal .label-metadata .label-character-count {\n margin-left: 0;\n}\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.label-hidden,\n.label-container:empty {\n display: none;\n}\n\n.picker {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.picker-head {\n display: flex;\n align-items: center;\n container-type: inline-size;\n}\n.picker-head > :not(:last-child) {\n margin-right: 0.25rem;\n}\n.picker-head h3 {\n font-size: 0.9375rem;\n line-height: 1.25rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: \"pnum\";\n flex: 1;\n text-align: center;\n margin-block: 0;\n}\n@container (min-width: 20rem) {\n .picker-head h3 {\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: \"pnum\";\n }\n .picker-head > :not(:last-child) {\n margin-right: 0.5rem;\n }\n}\n\n.picker-grid {\n display: grid;\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-rows: 2rem repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n grid-template-areas: \"h h h h h h h\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n.picker-weeks .picker-grid {\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-columns: 2rem repeat(7, 1fr);\n grid-template-areas: \". h h h h h h h\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n\n.picker-grid-head {\n grid-area: h;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n place-items: end center;\n padding-bottom: 0.5rem;\n}\n\n.picker-grid-weeks {\n grid-area: w;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n place-items: center right;\n padding-right: 0.5rem;\n}\n\n.picker-grid-days {\n grid-area: d;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n}\n\n.picker-grid-head > *,\n.picker-grid-weeks > * {\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 600;\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-decoration: none;\n}\n\n.date-other {\n opacity: 0.5;\n}\n\n.date-disabled {\n opacity: 0.25;\n}\n\n.picker-foot {\n display: flex;\n align-items: center;\n width: min-content;\n min-width: 100%;\n justify-content: space-between;\n container-type: inline-size;\n}\n.picker-foot > :not(:last-child) {\n margin-right: 0.25rem;\n}\n@container (min-width: 20rem) {\n .picker-foot > :not(:last-child) {\n margin-right: 0.5rem;\n }\n .picker-foot .cursor-help {\n font-size: 0.875rem;\n line-height: 1.125rem;\n font-weight: var(--cat-font-weight-body, 400);\n }\n}\n\n.cursor-help {\n margin-block: 0;\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: var(--cat-font-weight-body, 400);\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-align: center;\n flex: 1;\n}\n.cursor-help:first-child {\n text-align: left;\n}\n.cursor-help:last-child {\n text-align: right;\n}\n.cursor-help:only-child {\n text-align: center;\n}\n\n.cursor-aria {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.date-range {\n --cat-border-radius-m: 0;\n}";
|
|
@@ -2418,15 +2429,16 @@ const CatDateInline = class {
|
|
|
2418
2429
|
firstTabbable(this.hostElement.shadowRoot?.querySelector('.picker-grid-days'))?.focus(options);
|
|
2419
2430
|
}
|
|
2420
2431
|
render() {
|
|
2432
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
2421
2433
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
2422
2434
|
const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());
|
|
2423
2435
|
const [dateStart, dateEnd] = this.getValue();
|
|
2424
|
-
return (h(Host, { key: '
|
|
2436
|
+
return (h(Host, { key: '8b11e245fdd1d392e545692b68ea449dd19f13c8', "aria-label": this.label || undefined }, h("div", { key: 'bf1bd1923e220e9f209ae115eb8e6fb23b3c4b46', class: { 'label-container': true, 'label-hidden': this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: 'e3bfbf624e94f894c38fa97a35a0d5ad7c01915c', id: `${this.id}-label`, htmlFor: this.id, part: "label", onClick: () => this.doFocus() }, h("span", { key: 'd946093505f4a9092632b17bc035390a663d4e7f', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: 'aa9da48764a90c7d5db185e0472700465627d7c1', name: "label" })) || this.label, h("div", { key: 'd5d8c5c50de0578f96ffb3c80853a06e9bab9821', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '30b1b1149e7e07798e9786e2de260e07d2dad19a', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '6d02133a159884bc9951894390f7d7d98a5bc1c9', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")"))))))), h("div", { key: 'd114855977b1fcdaf0baa77e9cbef1250bfa03be', class: { picker: true, 'picker-weeks': this.weeks }, id: this.id, "aria-describedby": `${this.id}-label` }, h("div", { key: '49ec46a464d223340dc74d4152c0048db1087ac6', class: "picker-head" }, h("cat-button", { key: '270b297b4a0f577f1ce3c1b8444781f77b089cab', 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 }), h("cat-button", { key: 'b07427c2c6609b88f4cbbfc6ce14fdf029e22681', 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 }), h("h3", { key: '72c71e36794070a1e2916b6296e453b4314ddf45' }, this.getHeadline()), h("cat-button", { key: '764278977f0b7c5a8e06ac03d395d7f4fcf0cd88', 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 }), h("cat-button", { key: 'd19e69146ba96cece2a8e14d6463e2974840d905', 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 })), h("div", { key: '68f854f2e92f054517091e5667204bdf79b0f57c', class: "picker-grid", onFocusin: () => this.setAriaLive(this.locale.arrowKeys) }, h("div", { key: '238564020faf306eadbe5e0178d1e4b1d4590f5c', class: "picker-grid-head" }, Array.from(Array(7), (_, i) => {
|
|
2425
2437
|
const day = (i + this.locale.weekInfo.firstDay) % 7;
|
|
2426
2438
|
return h("abbr", { title: this.locale.days.long[day] }, this.locale.days.short[day]);
|
|
2427
|
-
})), this.weeks && (h("div", { key: '
|
|
2439
|
+
})), this.weeks && (h("div", { key: 'c59e9879cd8eacb4197a327a1f3c5e6d109c21b3', class: "picker-grid-weeks" }, dateGrid
|
|
2428
2440
|
.filter((_, i) => i % 7 === 0)
|
|
2429
|
-
.map(day => (h("div", null, this.getWeekNumber(day)))))), h("div", { key: '
|
|
2441
|
+
.map(day => (h("div", null, this.getWeekNumber(day)))))), h("div", { key: '3751aa8b4744cb6686a5badf2f76bb5a27460dd7', class: "picker-grid-days" }, dateGrid.map(day => {
|
|
2430
2442
|
const isStartDate = isSameDay(dateStart, day);
|
|
2431
2443
|
const isEndDate = isSameDay(dateEnd, day);
|
|
2432
2444
|
const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;
|
|
@@ -2443,7 +2455,7 @@ const CatDateInline = class {
|
|
|
2443
2455
|
'date-focusable': this.canFocus(day),
|
|
2444
2456
|
'date-disabled': !this.canClick(day)
|
|
2445
2457
|
}, 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()));
|
|
2446
|
-
}))), h("div", { key: '
|
|
2458
|
+
}))), h("div", { key: '7dabe502931e5a831423e368500a04577241253f', class: "picker-foot" }, !this.noToday && this.canClick(this.locale.now()) && (h("cat-button", { key: '6da0e2075e109a248a2bb2b6ab67d9ddf96206f1', size: "s", "data-dropdown-no-close": true, onClick: () => this.select(this.locale.now()) }, this.locale.today)), this.hint && h("p", { key: '8b3599454323e064ba22ebd3c16168f99600a64b', class: "cursor-help" }, this.locale.arrowKeys), !this.noClear && (h("cat-button", { key: '596d9b14c74f482098d5d5c3684fea633b43baa2', size: "s", disabled: !this.value, "data-dropdown-no-close": true, onClick: () => this.clear() }, this.locale.clear)))), h("p", { key: 'dd14d9dbec2061f1d55bf628fafadd3a4aa73460', class: "cursor-aria", "aria-live": "polite" })));
|
|
2447
2459
|
}
|
|
2448
2460
|
focus(date, focus = true) {
|
|
2449
2461
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
@@ -2538,6 +2550,7 @@ const CatDateInline = class {
|
|
|
2538
2550
|
toRangeValue(startDate, endDate) {
|
|
2539
2551
|
return JSON.stringify([startDate, endDate].map(date => (date ? this.locale.toLocalISO(date) : null)));
|
|
2540
2552
|
}
|
|
2553
|
+
static get delegatesFocus() { return true; }
|
|
2541
2554
|
get hostElement() { return getElement(this); }
|
|
2542
2555
|
};
|
|
2543
2556
|
CatDateInline.style = CatDateInlineStyle0;
|
|
@@ -8686,7 +8699,8 @@ const CatDropdown = class {
|
|
|
8686
8699
|
}
|
|
8687
8700
|
initTrigger() {
|
|
8688
8701
|
this.trigger = this.findTrigger();
|
|
8689
|
-
this.trigger.
|
|
8702
|
+
const ariaHaspopup = this.trigger.getAttribute('aria-haspopup');
|
|
8703
|
+
this.trigger.setAttribute('aria-haspopup', ariaHaspopup ?? 'true');
|
|
8690
8704
|
this.trigger.setAttribute('aria-expanded', 'false');
|
|
8691
8705
|
this.trigger.setAttribute('aria-controls', this.contentId);
|
|
8692
8706
|
this.trigger.addEventListener('click', () => this.toggle());
|
|
@@ -10486,19 +10500,20 @@ const CatInput = class {
|
|
|
10486
10500
|
}
|
|
10487
10501
|
}
|
|
10488
10502
|
render() {
|
|
10489
|
-
|
|
10503
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10504
|
+
return (h("div", { key: 'ffbaf104a60dbf73cb59e07e3164fe0c421540a5', class: {
|
|
10490
10505
|
'input-field': true,
|
|
10491
10506
|
'input-horizontal': this.horizontal
|
|
10492
|
-
} }, h("div", { key: '
|
|
10507
|
+
} }, h("div", { key: 'e6139d1d950c2d8c2674bb90f0acbe9333ace2eb', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: 'fce898969b37f4579f780c1a62354ccb0da5a73e', htmlFor: this.id, part: "label" }, h("span", { key: '8a4d0f653bae9a75db600080ad7d0b9199c14db5', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: '6073eadb00b587d1f3ba22d212e5235d21826b08', name: "label" })) || this.label, h("div", { key: 'fc4be508caec71287f275873d49adb5c16931289', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: 'c1010a473d4bfadb8ada56825db91f0c4d2b7871', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '8b2184a224afa6857f207aeaf71d83e12c92ef9a', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")")), this.maxLength && (h("div", { key: '6aee4428a06faba6ecf6a82963f0ecf3ca0d5d7b', class: "label-character-count", "aria-hidden": "true" }, this.value?.toString().length ?? 0, "/", this.maxLength))))))), h("div", { key: '9c88a62af0c4083162bea13dc1fd5ead5708efbb', class: "input-container" }, h("div", { key: '556a7b1bc45da66739d8a7afec3d4e1b64f12e77', class: "input-outer-wrapper" }, h("div", { key: '16d000652a934588fa87c71929565aa5cc15069b', class: {
|
|
10493
10508
|
'input-wrapper': true,
|
|
10494
10509
|
'input-round': this.round,
|
|
10495
10510
|
'input-readonly': this.readonly,
|
|
10496
10511
|
'input-disabled': this.disabled,
|
|
10497
10512
|
'input-invalid': this.invalid
|
|
10498
|
-
}, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { key: '
|
|
10513
|
+
}, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { key: 'de3b5da6a0a09c1f66caeb2fb3c9772a2426778a', class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (h("cat-icon", { key: 'f950a57fa6060b9f82629d26b91dcb449b86cd2a', icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), h("div", { key: 'b98cd1a805712c454262bfa8fae92f1e92b33f09', class: "input-inner-wrapper" }, h("input", { key: '9bd8bc8f345c80ced98a06728d9d09bc462e0823', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
|
|
10499
10514
|
'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
|
|
10500
10515
|
'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value
|
|
10501
|
-
}, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.isPasswordShown ? 'text' : this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: '
|
|
10516
|
+
}, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.isPasswordShown ? 'text' : this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: '255d4760d151bfb36f0217295ee378b5cec26647', class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.togglePassword && !this.disabled && !this.readonly && this.value && (h("cat-button", { key: 'd5e62dccaaa64370723d4721d567789b06c94b11', class: "toggle-password", icon: this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show', "icon-only": "true", size: "s", variant: "text", "a11y-label": catI18nRegistry.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword'), onClick: this.doTogglePassword.bind(this) }))), this.loading && h("cat-spinner", { key: '22218dd7cd48b2599d2125ec080467c925b04a4d', size: "m", class: "icon-loading" }), !this.invalid && this.icon && this.iconRight && (h("cat-icon", { key: 'c9e5f18bfc54321ad9b18df56a199d0096739621', icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && (h("cat-icon", { key: '307c0d5f2a1dff6efb7d6bf05a035c487f947994', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), this.textSuffix && (h("span", { key: '3216d4e278951898d9a96ad48b2df7c17d54c6a3', class: "text-suffix", part: "suffix" }, this.textSuffix))), h("slot", { key: 'd996aab9325a2eb77401490c3fa2a9e8eaf0ffc6', name: "addon" })), this.hasHint && (h(CatFormHint, { key: '84980cbf543e9405c70d481bce339cd9c743da43', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))));
|
|
10502
10517
|
}
|
|
10503
10518
|
get hasHint() {
|
|
10504
10519
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -10550,6 +10565,7 @@ const CatInput = class {
|
|
|
10550
10565
|
}
|
|
10551
10566
|
return undefined;
|
|
10552
10567
|
}
|
|
10568
|
+
static get delegatesFocus() { return true; }
|
|
10553
10569
|
get hostElement() { return getElement(this); }
|
|
10554
10570
|
static get watchers() { return {
|
|
10555
10571
|
"errors": ["onErrorsChanged"]
|
|
@@ -10576,9 +10592,10 @@ const CatPagination = class {
|
|
|
10576
10592
|
this.iconNext = '$cat:pagination-right';
|
|
10577
10593
|
}
|
|
10578
10594
|
render() {
|
|
10579
|
-
|
|
10595
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10596
|
+
return (h("nav", { key: 'ed5098e1578e2157e0f5b8c539f313e2892c5f05', role: "navigation" }, h("ol", { key: '6f63a5c0a79722913dafbf1b6391ab586a20695a', class: {
|
|
10580
10597
|
[`cat-pagination-${this.size}`]: Boolean(this.size)
|
|
10581
|
-
} }, h("li", { key: '
|
|
10598
|
+
} }, h("li", { key: '0dd989fa017490749141ab2029546b115a34ce27' }, h("cat-button", { key: '8614e9e1ebfc2ff3aeda2cec8be07aeff6e592eb', variant: this.variant, size: this.size, round: this.round, disabled: this.isFirst, a11yLabel: catI18nRegistry.t('pagination.prev'), icon: this.iconPrev, iconOnly: true, onClick: () => this.setPage(this.page - 1) })), this.content, h("li", { key: 'b864788a70e125ae93a34e705522e537b359a12a' }, h("cat-button", { key: '93f6d89967b6f6b93b733fbcb628cf4a3663dbf0', variant: this.variant, size: this.size, round: this.round, disabled: this.isLast, a11yLabel: catI18nRegistry.t('pagination.next'), icon: this.iconNext, iconOnly: true, onClick: () => this.setPage(this.page + 1) })))));
|
|
10582
10599
|
}
|
|
10583
10600
|
get isFirst() {
|
|
10584
10601
|
return this.page === 0;
|
|
@@ -10627,6 +10644,8 @@ const CatPagination = class {
|
|
|
10627
10644
|
h("li", null, h("cat-button", { variant: this.variant, size: this.size, round: this.round, color: this.page === page ? 'primary' : undefined, active: this.page === page, a11yLabel: catI18nRegistry.t('pagination.page', { page: page + 1 }), a11yCurrent: this.page === page ? 'step' : undefined, onClick: () => this.setPage(page) }, page + 1))
|
|
10628
10645
|
]);
|
|
10629
10646
|
}
|
|
10647
|
+
static get delegatesFocus() { return true; }
|
|
10648
|
+
get hostElement() { return getElement(this); }
|
|
10630
10649
|
};
|
|
10631
10650
|
CatPagination.style = CatPaginationStyle0;
|
|
10632
10651
|
|
|
@@ -10681,13 +10700,14 @@ const CatRadio = class {
|
|
|
10681
10700
|
this.input.blur();
|
|
10682
10701
|
}
|
|
10683
10702
|
render() {
|
|
10684
|
-
|
|
10703
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10704
|
+
return (h(Host, { key: '875be66c1a340d478bb55b15822415df919591ad' }, h("label", { key: 'dc4577b45f79f373d621b83a83c09d214cd01251', htmlFor: this.id, class: {
|
|
10685
10705
|
'is-hidden': this.labelHidden,
|
|
10686
10706
|
'is-disabled': this.disabled,
|
|
10687
10707
|
'label-left': this.labelLeft,
|
|
10688
10708
|
'align-center': this.alignment === 'center',
|
|
10689
10709
|
'align-end': this.alignment === 'bottom'
|
|
10690
|
-
}, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, h("span", { key: '
|
|
10710
|
+
}, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, h("span", { key: '5c9bc1aa0f3746f29a4dbf219e241b6c1779a5c7', class: "radio" }, h("input", { key: 'bb633c685be46657acae7a7376069b7a95de7401', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.identifier || this.id, type: "radio", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), h("span", { key: 'd6863f415ce0999c31276e8dc6e05b3ed7298193', class: "circle" })), h("span", { key: 'c82183168cd245b781f2a4273c38ef20247d10c1', class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { key: 'd5a556eff95f4471371c6162a0b101c1fb82e0cc', name: "label" })) || this.label)), this.hasHint && (h("div", { key: 'a236fefd50ea65e63643e5747a72a1f0b0dfbbb2', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, h("div", { key: '77ae0d9af2ff86becdb0b3a487c37689fe63af66', class: "circle-placeholder" }), h(CatFormHint, { key: '5e90f290fe70136ee19fe287db749abc8e7ec024', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }) })))));
|
|
10691
10711
|
}
|
|
10692
10712
|
get hasHint() {
|
|
10693
10713
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -10702,6 +10722,7 @@ const CatRadio = class {
|
|
|
10702
10722
|
onBlur(event) {
|
|
10703
10723
|
this.catBlur.emit(event);
|
|
10704
10724
|
}
|
|
10725
|
+
static get delegatesFocus() { return true; }
|
|
10705
10726
|
get hostElement() { return getElement(this); }
|
|
10706
10727
|
};
|
|
10707
10728
|
CatRadio.style = CatRadioStyle0;
|
|
@@ -11313,18 +11334,19 @@ const CatSelect = class {
|
|
|
11313
11334
|
});
|
|
11314
11335
|
}
|
|
11315
11336
|
render() {
|
|
11316
|
-
|
|
11337
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
11338
|
+
return (h(Host, { key: '1ecf402adc273d133bfe829aea9fc28c6f63bc79' }, h("div", { key: '5c209d893e31472fabda8dc0aab1294693ba4b0b', class: {
|
|
11317
11339
|
'select-field': true,
|
|
11318
11340
|
'select-horizontal': this.horizontal,
|
|
11319
11341
|
'select-multiple': this.multiple
|
|
11320
|
-
} }, h("div", { key: '
|
|
11342
|
+
} }, h("div", { key: '51755c54effe1bd8216e656bc95f6bf57814219a', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: 'e4835aa21b0bde58f40e9130122826e6ade1e739', htmlFor: `select-${this.id}-input`, part: "label" }, h("span", { key: '8bdbd5c021b0c4fd864cc7b8d84e0230707cd016', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: '6e7ad3025b1cee315cf10c85e907cca128ec3922', name: "label" })) || this.label, h("div", { key: '1536c12184aec8b8825d24a0635bb08baa976b6d', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: 'f90e3b62becfab3e586718ef201f9596e78c820b', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: 'db0bfd7582529e57fb18266f5014a73c92584c84', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")"))))))), h("div", { key: 'ce84b362fe92abcd2e65388b457a5ed25def1e3e', class: "select-container" }, h("div", { key: '1a0d2031a1f71d77b371e96d27ad608da1f3d1a4', class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, h("div", { key: '5b92f786919140fe0f4329a3b846e24007b980e7', class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (h("span", { class: {
|
|
11321
11343
|
pill: true,
|
|
11322
11344
|
'select-no-open': true,
|
|
11323
11345
|
'select-option-active': this.state.activeSelectionIndex === i
|
|
11324
|
-
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", null, item.render.label), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, h("input", { key: '
|
|
11346
|
+
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", null, item.render.label), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, h("input", { key: '61d9e8ae5063a517ca57dc796273284ae15cad31', ...this.nativeAttributes, part: "input", id: `select-${this.id}-input`, class: "select-input", role: "combobox", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, "aria-autocomplete": "list", onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && h("cat-spinner", { key: 'e4d0a6073a1af4480c116bd1525c56716976da24' }), this.invalid && (h("cat-icon", { key: 'bb894fea7607b7b6b3dc950dde171faac3627a07', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
|
|
11325
11347
|
!this.disabled &&
|
|
11326
11348
|
!this.state.isResolving &&
|
|
11327
|
-
this.clearable ? (h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (h("cat-button", { key: '
|
|
11349
|
+
this.clearable ? (h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (h("cat-button", { key: '6179bb7c28759db151265a35be142e1e89749d61', iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? catI18nRegistry.t('select.close') : catI18nRegistry.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), this.hasHint && (h(CatFormHint, { key: '5d449c11b58c01c1f6760448bc46474d8bb889cb', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))), h("div", { key: 'e50a9fa50cc46fc444fd3ec1b52c409fcfb0278f', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (h("cat-scrollable", { key: 'dd07d6ef4fbd6352b88cb2d15802a4b382c3409f', class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, h("ul", { key: 'bac0e34fa3603ed07a3f9cc2d9346349c2b31201', class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isFirstLoading
|
|
11328
11350
|
? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (h("li", { class: "select-option-loading" }, h("cat-skeleton", { variant: "body", lines: 1 }), h("cat-skeleton", { variant: "body", lines: 1 }))))
|
|
11329
11351
|
: !this.state.options.length &&
|
|
11330
11352
|
!this.tags && (h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : catI18nRegistry.t('select.empty')))))))));
|
|
@@ -11662,6 +11684,7 @@ const CatSelect = class {
|
|
|
11662
11684
|
this.showErrors();
|
|
11663
11685
|
}
|
|
11664
11686
|
}
|
|
11687
|
+
static get delegatesFocus() { return true; }
|
|
11665
11688
|
get hostElement() { return getElement(this); }
|
|
11666
11689
|
static get watchers() { return {
|
|
11667
11690
|
"connector": ["onConnectorChanged"],
|
|
@@ -13110,11 +13133,12 @@ const CatSpinner = class {
|
|
|
13110
13133
|
registerInstance(this, hostRef);
|
|
13111
13134
|
this.size = 'm';
|
|
13112
13135
|
this.a11yLabel = undefined;
|
|
13136
|
+
this.value = 0;
|
|
13113
13137
|
}
|
|
13114
13138
|
render() {
|
|
13115
|
-
return (h("span", { key: '
|
|
13139
|
+
return (h("span", { key: '8922d0ec7f5474084a39a8b3a4620bee426cea78', role: "progressbar", tabindex: "-1", "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', "aria-valuenow": this.value, "aria-valuemin": "0", "aria-valuemax": "100", class: {
|
|
13116
13140
|
[`spinner-${this.size}`]: this.size !== 'inline'
|
|
13117
|
-
} }, h("svg", { key: '
|
|
13141
|
+
} }, h("svg", { key: '6a649c21b27b3dbad3c73a71936566e7e9648254', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, h("circle", { key: '3fb75a339ec6e18d0209e9da2cbf650f2dae4420', cx: "24", cy: "24", r: "21.5" }))));
|
|
13118
13142
|
}
|
|
13119
13143
|
};
|
|
13120
13144
|
CatSpinner.style = CatSpinnerStyle0;
|
|
@@ -13134,6 +13158,7 @@ const CatTab = class {
|
|
|
13134
13158
|
this.url = undefined;
|
|
13135
13159
|
this.urlTarget = undefined;
|
|
13136
13160
|
this.deactivated = false;
|
|
13161
|
+
this.noActive = false;
|
|
13137
13162
|
this.error = false;
|
|
13138
13163
|
this.nativeAttributes = undefined;
|
|
13139
13164
|
}
|
|
@@ -13146,7 +13171,7 @@ const CatTab = class {
|
|
|
13146
13171
|
this.catClick.emit(event);
|
|
13147
13172
|
}
|
|
13148
13173
|
render() {
|
|
13149
|
-
return h(Host, { key: '
|
|
13174
|
+
return h(Host, { key: '0db9a9f8449cb69691552450d653d86251a17954' });
|
|
13150
13175
|
}
|
|
13151
13176
|
get hostElement() { return getElement(this); }
|
|
13152
13177
|
};
|
|
@@ -13210,7 +13235,8 @@ const CatTabs = class {
|
|
|
13210
13235
|
this.activate(this.tabs[index]);
|
|
13211
13236
|
}
|
|
13212
13237
|
render() {
|
|
13213
|
-
|
|
13238
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13239
|
+
return (h(Host, { key: '057726c753ef2e4d5557736488fbffb92774f26f' }, this.tabs.map((tab) => {
|
|
13214
13240
|
return (h("cat-button", { buttonId: tab.id, role: "tab", part: "tab", class: {
|
|
13215
13241
|
'cat-tab': true,
|
|
13216
13242
|
'cat-tab-active': tab.id === this.activeTab,
|
|
@@ -13220,7 +13246,7 @@ const CatTabs = class {
|
|
|
13220
13246
|
}
|
|
13221
13247
|
syncTabs() {
|
|
13222
13248
|
this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));
|
|
13223
|
-
this.activeTab = this.activeTab || this.tabs.filter(tab => this.canActivate(tab))[0]?.id;
|
|
13249
|
+
this.activeTab = this.activeTab || this.tabs.filter(tab => this.canActivate(tab) && !tab.noActive)[0]?.id;
|
|
13224
13250
|
}
|
|
13225
13251
|
canActivate(tab) {
|
|
13226
13252
|
return !!tab && !tab.deactivated && !tab.url && tab.id !== this.activeTab;
|
|
@@ -13228,7 +13254,9 @@ const CatTabs = class {
|
|
|
13228
13254
|
click(tab) {
|
|
13229
13255
|
if (this.canActivate(tab)) {
|
|
13230
13256
|
tab.click();
|
|
13231
|
-
|
|
13257
|
+
if (!tab.noActive) {
|
|
13258
|
+
this.activate(tab);
|
|
13259
|
+
}
|
|
13232
13260
|
}
|
|
13233
13261
|
}
|
|
13234
13262
|
activate(tab) {
|
|
@@ -13236,6 +13264,7 @@ const CatTabs = class {
|
|
|
13236
13264
|
this.activeTab = tab.id;
|
|
13237
13265
|
}
|
|
13238
13266
|
}
|
|
13267
|
+
static get delegatesFocus() { return true; }
|
|
13239
13268
|
get hostElement() { return getElement(this); }
|
|
13240
13269
|
static get watchers() { return {
|
|
13241
13270
|
"activeTab": ["onActiveTabChange"]
|
|
@@ -13313,7 +13342,8 @@ const CatTag = class {
|
|
|
13313
13342
|
}
|
|
13314
13343
|
}
|
|
13315
13344
|
render() {
|
|
13316
|
-
|
|
13345
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13346
|
+
return (h(Host, { key: 'c30f59f0da021ea37a9b94904da318ff28d9d699' }, h("div", { key: '6f837dcf33c6b726d4d9755b384815552f4b597f', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '78f5ce85bda81da097187483121d23f9779f96c9', htmlFor: `tags-${this.id}-input`, part: "label" }, h("span", { key: 'dae093aaa4cc7bb26ff015bf389361fda1fd6d5c', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: '9eef396375eaff2e21613a79640bd1692a0a7fe8', name: "label" })) || this.label, h("div", { key: '6045ab7f98162d8d32fb5ef72c515661750aa844', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '1fb2271ffe1ddeb4acac516a2dfde5bf96265e5b', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '2ae27a41f03a9bcf5899064fe482a127221e3c10', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")"))))))), h("div", { key: '5b0dacaa15194f59ad7ac76b5435debf7b8bc3fa', class: { 'input-wrapper': true, 'input-disabled': this.disabled, 'input-invalid': this.invalid } }, this.value?.map(value => (h("div", { class: "tag-pill" }, h("span", null, value), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(value), tabIndex: -1 }))))), h("div", { key: '9869bd7ec1de2d7ef45cfd747fbccc7b9e1a0558', class: "input-inner-wrapper" }, h("input", { key: '1c61ce7e90f374e7442c888bab489c956d02d774', ...this.nativeAttributes, part: "input", id: `tags-${this.id}-input`, class: "tags-input", role: "combobox", ref: el => (this.input = el), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, onInput: this.onInput.bind(this), onBlur: this.onBlur.bind(this), placeholder: this.placeholder, disabled: this.disabled }), this.clearable && !this.disabled && (this.value?.length ?? 0) > 0 && (h("cat-button", { key: '8c61da4726d290f06cb1452ab9f34a2ee291ceac', class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.invalid && h("cat-icon", { key: 'ef3ba1cc1c2eaec1562fcff5f64d15ae9b8290e1', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }))), this.hasHint && (h(CatFormHint, { key: '2f92bb6d804a45328af1efb97750b5ae79b0c0b1', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))));
|
|
13317
13347
|
}
|
|
13318
13348
|
get hasHint() {
|
|
13319
13349
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -13386,6 +13416,7 @@ const CatTag = class {
|
|
|
13386
13416
|
const regexPattern = `[${escapedDelimiters.join('')}]`;
|
|
13387
13417
|
return new RegExp(regexPattern, 'g');
|
|
13388
13418
|
}
|
|
13419
|
+
static get delegatesFocus() { return true; }
|
|
13389
13420
|
get hostElement() { return getElement(this); }
|
|
13390
13421
|
static get watchers() { return {
|
|
13391
13422
|
"errors": ["onErrorsChanged"]
|
|
@@ -13479,15 +13510,16 @@ const CatTextarea = class {
|
|
|
13479
13510
|
}
|
|
13480
13511
|
}
|
|
13481
13512
|
render() {
|
|
13482
|
-
|
|
13513
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13514
|
+
return (h(Host, { key: '7baa83d9d2722e629503623daa7d64f669d9d14b' }, h("div", { key: '7e23d71bea6eb4b3c1f512ce6e6052c4d0c93675', class: {
|
|
13483
13515
|
'textarea-field': true,
|
|
13484
13516
|
'textarea-horizontal': this.horizontal
|
|
13485
|
-
} }, h("div", { key: '
|
|
13517
|
+
} }, h("div", { key: '51da73044afe3fb0100c921556f4bc60f4823597', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { key: '21efe02e678b15577efbd4e6889ed278e519f6e1', htmlFor: this.id, part: "label" }, h("span", { key: '35e58dc082d073296563ec6473734ec7bb995b5e', class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { key: 'f32da2b24d1d50b06a7d55d4d15185441feb285a', name: "label" })) || this.label, h("div", { key: 'ed4abb4e4b492130a990fca89699fea9838c758c', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { key: '97dfc883e7a8af4d2090bb4b40208e0886585da6', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { key: '9c74951359ccab83ec46bbd868bccefaf1356f6f', class: "label-optional", "aria-hidden": "true" }, "(", catI18nRegistry.t('input.required'), ")")), this.maxLength && (h("div", { key: '702c2c4a8238430927882a11490cd5be399bd3f5', class: "label-character-count", "aria-hidden": "true" }, this.value?.length ?? 0, "/", this.maxLength))))))), h("div", { key: '3f2aa62a32dd8b775b9826fe8c92129219135dcb', class: "textarea-container" }, h("div", { key: '270d8f0b27b99f7388e17edc88affe7daab15438', class: {
|
|
13486
13518
|
'textarea-wrapper': true,
|
|
13487
13519
|
'textarea-readonly': this.readonly,
|
|
13488
13520
|
'textarea-disabled': this.disabled,
|
|
13489
13521
|
'textarea-invalid': this.invalid
|
|
13490
|
-
} }, h("textarea", { key: '
|
|
13522
|
+
} }, h("textarea", { key: 'a0091c3f756c983d416ee12bf777cf7101c07b48', ...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 && (h("cat-icon", { key: '9ff1a0a8b7bf6ae5deb8b489f4426053d5ff54b9', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (h(CatFormHint, { key: 'badc9780d07df9f6645c7f4bbdcfe97610db6741', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
|
|
13491
13523
|
}
|
|
13492
13524
|
get hasHint() {
|
|
13493
13525
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -13527,6 +13559,7 @@ const CatTextarea = class {
|
|
|
13527
13559
|
this.showErrors();
|
|
13528
13560
|
}
|
|
13529
13561
|
}
|
|
13562
|
+
static get delegatesFocus() { return true; }
|
|
13530
13563
|
get hostElement() { return getElement(this); }
|
|
13531
13564
|
static get watchers() { return {
|
|
13532
13565
|
"errors": ["onErrorsChanged"]
|
|
@@ -13579,7 +13612,7 @@ function isAfter(date, time) {
|
|
|
13579
13612
|
return date.getHours() > hh || (date.getHours() === hh && date.getMinutes() > mm);
|
|
13580
13613
|
}
|
|
13581
13614
|
|
|
13582
|
-
const catTimeCss = ":host{display:block}:host([hidden]){display:none}.label-aria{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}.cat-time-addon{margin-left:-1px}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";
|
|
13615
|
+
const catTimeCss = ":host{display:block}:host([hidden]){display:none}.label-aria{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}.cat-time-addon{margin-left:-1px;display:flex}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";
|
|
13583
13616
|
const CatTimeStyle0 = catTimeCss;
|
|
13584
13617
|
|
|
13585
13618
|
const CatTime = class {
|
|
@@ -13722,14 +13755,15 @@ const CatTime = class {
|
|
|
13722
13755
|
this.input?.clear();
|
|
13723
13756
|
}
|
|
13724
13757
|
render() {
|
|
13725
|
-
|
|
13758
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13759
|
+
return (h(Host, { key: '9f7564ec41354b98ec0779dde23198a18689f1a3' }, h("cat-input", { key: '776a76b393d92278a5afd389602c767c319c9238', 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) }, h("span", { key: '016bab3b23282fa4a5aeb764e4b80b337d2f9cca', slot: "label" }, this.hasSlottedLabel && h("slot", { key: '233b40757fe0c822716b87c23538b5b02371d9d2', name: "label" }), !this.hasSlottedLabel && this.label, h("span", { key: '6ae7d40f0fbf4cf729e29ad124df6f3cdd8b22f8', class: "label-aria" }, " (HH:mm)")), h("div", { key: '7aaab9d8ee9e06a8a68a9f94e664ba12422a18c5', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (h("cat-button", { key: '9130d436847a0fb250b28d5630e7c3a403ec494a', class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), h("cat-dropdown", { key: '10948ba2be73ffcde722fb22c5a4b9f3891b329d', slot: "addon", placement: this.placement }, h("cat-button", { key: '3e4d74066110ca2b7141d809a1a276f78d0382a1', 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 }), h("nav", { key: '27a2a17080a09e8148b5cae0af36d03735b8afcf', slot: "content", class: "cat-nav" }, h("ul", { key: '8181974cae0ed2c3cc99c43d51f3ccbc5e188592' }, this.timeArray().map(time => {
|
|
13726
13760
|
const isoTime = formatIso(time);
|
|
13727
13761
|
const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);
|
|
13728
13762
|
return (h("li", null, h("cat-button", { class: {
|
|
13729
13763
|
'cat-nav-item': true,
|
|
13730
13764
|
'time-disabled': disabled
|
|
13731
13765
|
}, 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))));
|
|
13732
|
-
}))))), this.hasSlottedHint && (h("span", { key: '
|
|
13766
|
+
}))))), this.hasSlottedHint && (h("span", { key: 'cd316e5045ad3298aac0e4056c865f7bd6b1dcf3', slot: "hint" }, h("slot", { key: '7fa90c7b83032013bfc9d1626bc8b53072e9aa85', name: "hint" }))))));
|
|
13733
13767
|
}
|
|
13734
13768
|
timeArray() {
|
|
13735
13769
|
const result = [];
|
|
@@ -13790,6 +13824,7 @@ const CatTime = class {
|
|
|
13790
13824
|
this.catChange.emit(newValue);
|
|
13791
13825
|
}
|
|
13792
13826
|
}
|
|
13827
|
+
static get delegatesFocus() { return true; }
|
|
13793
13828
|
get hostElement() { return getElement(this); }
|
|
13794
13829
|
static get watchers() { return {
|
|
13795
13830
|
"min": ["onMinChanged"],
|
|
@@ -13855,13 +13890,14 @@ const CatToggle = class {
|
|
|
13855
13890
|
this.input.blur();
|
|
13856
13891
|
}
|
|
13857
13892
|
render() {
|
|
13858
|
-
|
|
13893
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13894
|
+
return (h(Host, { key: 'fd406b8ecbbbfd82d9872a01893129e570d3b9a1' }, h("label", { key: '7159c14116061024c7388909f2dff6bb07e6ba74', htmlFor: this.id, class: {
|
|
13859
13895
|
'is-hidden': this.labelHidden,
|
|
13860
13896
|
'is-disabled': this.disabled,
|
|
13861
13897
|
'label-left': this.labelLeft,
|
|
13862
13898
|
'align-center': this.alignment === 'center',
|
|
13863
13899
|
'align-end': this.alignment === 'bottom'
|
|
13864
|
-
} }, h("input", { key: '
|
|
13900
|
+
} }, h("input", { key: '89cbd5d08dba8b652243d6bc2ff2877421536b3c', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, class: "form-check-input", role: "switch", onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), h("span", { key: '405bfdd36ec78874840cd3e8d03838b20115aa00', class: "toggle" }), h("span", { key: 'd9bd13f8b2281d1b1be44c552262f69282f89bab', class: "label", part: "label" }, (this.hasSlottedLabel && h("slot", { key: 'be3dc6b41973cfd3c372757632768a8f73668c50', name: "label" })) || this.label)), this.hasHint && (h("div", { key: '090ad02728fa1ace69abfcfdc0b2d31f7b00150d', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, h("div", { key: '4ade49db31fd0bae7d0efb4c5169aacd9e30b94c', class: "toggle-placeholder" }), h(CatFormHint, { key: '3859a49004b782b069673289fc5e8548eded00d5', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }) })))));
|
|
13865
13901
|
}
|
|
13866
13902
|
get hasHint() {
|
|
13867
13903
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -13880,6 +13916,7 @@ const CatToggle = class {
|
|
|
13880
13916
|
updateResolved() {
|
|
13881
13917
|
this.resolvedValue = this.checked ? (this.value ?? true) : (this.noValue ?? false);
|
|
13882
13918
|
}
|
|
13919
|
+
static get delegatesFocus() { return true; }
|
|
13883
13920
|
get hostElement() { return getElement(this); }
|
|
13884
13921
|
};
|
|
13885
13922
|
CatToggle.style = CatToggleStyle0;
|