@haiilo/catalyst 10.25.3 → 10.27.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/index.esm.js +1 -1
- package/dist/catalyst/p-1616736b.entry.js +10 -0
- package/dist/catalyst/p-1616736b.entry.js.map +1 -0
- package/dist/catalyst/p-c3a9aef7.js +3 -0
- package/dist/catalyst/p-c3a9aef7.js.map +1 -0
- package/dist/catalyst/{p-f4873629.js → p-e5aee21d.js} +2 -2
- package/dist/catalyst/p-e5aee21d.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +244 -107
- 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/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{of-5cd84f84.js → of-aaee31a6.js} +4 -3
- package/dist/cjs/of-aaee31a6.js.map +1 -0
- 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-badge/cat-badge.css +35 -0
- package/dist/collection/components/cat-badge/cat-badge.js +120 -2
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.css +14 -9
- package/dist/collection/components/cat-button/cat-button.js +10 -8
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-button-group/cat-button-group.css +0 -10
- package/dist/collection/components/cat-button-group/cat-button-group.js +6 -5
- package/dist/collection/components/cat-button-group/cat-button-group.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +5 -3
- 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 +7 -5
- 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 +3 -2
- 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-tabs/cat-tabs.js +3 -1
- 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 +6 -4
- 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 +5 -3
- 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-badge.js +67 -5
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button-group.js +7 -6
- package/dist/components/cat-button-group.js.map +1 -1
- package/dist/components/cat-button2.js +13 -126
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox2.js +6 -4
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-date-inline2.js +8 -6
- 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 +3 -2
- 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-tabs.js +4 -2
- 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 +8 -6
- package/dist/components/cat-time.js.map +1 -1
- package/dist/components/cat-toggle.js +6 -4
- 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/components/floating-ui.dom.esm.js +85 -32
- package/dist/components/floating-ui.dom.esm.js.map +1 -1
- package/dist/components/from.js +3 -2
- package/dist/components/from.js.map +1 -1
- package/dist/components/media-matcher.js +120 -0
- package/dist/components/media-matcher.js.map +1 -0
- package/dist/esm/cat-alert_30.entry.js +244 -107
- 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/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{of-625babef.js → of-acb1f3a9.js} +4 -3
- package/dist/esm/of-acb1f3a9.js.map +1 -0
- package/dist/types/components/cat-avatar/cat-avatar.d.ts +1 -0
- package/dist/types/components/cat-badge/cat-badge.d.ts +23 -0
- package/dist/types/components/cat-button-group/cat-button-group.d.ts +1 -1
- 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.d.ts +32 -0
- package/package.json +2 -2
- package/dist/catalyst/p-57a035f5.entry.js +0 -10
- package/dist/catalyst/p-57a035f5.entry.js.map +0 -1
- package/dist/catalyst/p-751d92ed.js +0 -3
- package/dist/catalyst/p-751d92ed.js.map +0 -1
- package/dist/catalyst/p-f4873629.js.map +0 -1
- package/dist/cjs/index-a45dd7c9.js.map +0 -1
- package/dist/cjs/of-5cd84f84.js.map +0 -1
- package/dist/esm/index-3059296e.js.map +0 -1
- package/dist/esm/of-625babef.js.map +0 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const of = require('./of-
|
|
5
|
+
const index = require('./index-0c9af7fb.js');
|
|
6
|
+
const of = require('./of-aaee31a6.js');
|
|
7
7
|
|
|
8
8
|
const ObjectUnsubscribedError = of.createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
|
|
9
9
|
_super(this);
|
|
@@ -873,6 +873,7 @@ const CatAvatar = class {
|
|
|
873
873
|
}
|
|
874
874
|
render() {
|
|
875
875
|
if (this.url) {
|
|
876
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
876
877
|
return (index.h("a", { href: this.url, target: this.urlTarget, style: this.cssStyle, class: this.cssClass, "aria-label": this.label }, this.content));
|
|
877
878
|
}
|
|
878
879
|
else {
|
|
@@ -901,31 +902,14 @@ const CatAvatar = class {
|
|
|
901
902
|
.map(n => n[0])
|
|
902
903
|
.join(''));
|
|
903
904
|
}
|
|
905
|
+
static get delegatesFocus() { return true; }
|
|
906
|
+
get hostElement() { return index.getElement(this); }
|
|
904
907
|
static get watchers() { return {
|
|
905
908
|
"src": ["onSrcChanged"]
|
|
906
909
|
}; }
|
|
907
910
|
};
|
|
908
911
|
CatAvatar.style = CatAvatarStyle0;
|
|
909
912
|
|
|
910
|
-
const catBadgeCss = ":host([hidden]){display:none}:host{display:inline-flex;max-width:100%;vertical-align:baseline;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;line-height:1.5;flex-shrink:0}:host slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host([round]){border-radius:10rem}:host([variant=filled]){background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}:host([variant=outlined]){background-color:white;color:rgb(var(--text));box-shadow:inset 0 0 0 1px rgba(var(--text), 0.2)}:host([color=primary]){--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148)}:host([color=secondary]){--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0)}:host([color=info]){--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230)}:host([color=success]){--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88)}:host([color=warning]){--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0)}:host([color=danger]){--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13)}:host([size=xs]){height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem}:host([pulse][variant=filled]){animation:1.5s ease 0s infinite normal none running pulse}:host([pulse][variant=outlined]){animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--text), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--text), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--text), 0.2)}}";
|
|
911
|
-
const CatBadgeStyle0 = catBadgeCss;
|
|
912
|
-
|
|
913
|
-
const CatBadge = class {
|
|
914
|
-
constructor(hostRef) {
|
|
915
|
-
index.registerInstance(this, hostRef);
|
|
916
|
-
this.variant = 'filled';
|
|
917
|
-
this.color = 'primary';
|
|
918
|
-
this.size = 'm';
|
|
919
|
-
this.round = false;
|
|
920
|
-
this.pulse = false;
|
|
921
|
-
}
|
|
922
|
-
render() {
|
|
923
|
-
return index.h("slot", { key: '23ddf7fc9b33cb4410ba74dbafda8d084cdc3606' });
|
|
924
|
-
}
|
|
925
|
-
get hostElement() { return index.getElement(this); }
|
|
926
|
-
};
|
|
927
|
-
CatBadge.style = CatBadgeStyle0;
|
|
928
|
-
|
|
929
913
|
const _breakpoints = ['xs', 's', 'm', 'l', 'xl'];
|
|
930
914
|
const Breakpoints = {
|
|
931
915
|
xs: '(max-width: 539.98px)',
|
|
@@ -1041,6 +1025,74 @@ function createEmptyStyleRule(query) {
|
|
|
1041
1025
|
}
|
|
1042
1026
|
}
|
|
1043
1027
|
|
|
1028
|
+
const catBadgeCss = ":host([hidden]){display:none}:host{display:inline-flex;max-width:100%;vertical-align:baseline;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;line-height:1.5;flex-shrink:0}:host slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host([round]){border-radius:10rem}:host([variant=filled]){background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}:host([variant=outlined]){background-color:white;color:rgb(var(--text));box-shadow:inset 0 0 0 1px rgba(var(--text), 0.2)}:host([color=primary]){--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148)}:host([color=secondary]){--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0)}:host([color=info]){--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230)}:host([color=success]){--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88)}:host([color=warning]){--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0)}:host([color=danger]){--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13)}:host([size=xs]){height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem;gap:0.25rem}:host([data-icon-badge=xs]){width:1rem;height:1rem;padding:0}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem;gap:0.25rem}:host([data-icon-badge=s]){width:1.5rem;height:1.5rem;padding:0}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem;gap:0.25rem}:host([data-icon-badge=m]){width:2rem;height:2rem;padding:0}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem;gap:0.25rem}:host([data-icon-badge=l]){width:2.5rem;height:2.5rem;padding:0}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem;gap:0.25rem}:host([data-icon-badge=xl]){width:3rem;height:3rem;padding:0}:host([pulse][variant=filled]){animation:1.5s ease 0s infinite normal none running pulse}:host([pulse][variant=outlined]){animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--text), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--text), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--text), 0.2)}}";
|
|
1029
|
+
const CatBadgeStyle0 = catBadgeCss;
|
|
1030
|
+
|
|
1031
|
+
const CatBadge = class {
|
|
1032
|
+
constructor(hostRef) {
|
|
1033
|
+
index.registerInstance(this, hostRef);
|
|
1034
|
+
this._iconOnly = true;
|
|
1035
|
+
this.variant = 'filled';
|
|
1036
|
+
this.color = 'primary';
|
|
1037
|
+
this.size = 'm';
|
|
1038
|
+
this.round = false;
|
|
1039
|
+
this.pulse = false;
|
|
1040
|
+
this.icon = undefined;
|
|
1041
|
+
this.iconOnly = false;
|
|
1042
|
+
this.iconRight = false;
|
|
1043
|
+
}
|
|
1044
|
+
onIconOnlyChanged(value) {
|
|
1045
|
+
// teardown
|
|
1046
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1047
|
+
this.mediaQueryList?.removeEventListener('change', this.mediaQueryListener);
|
|
1048
|
+
this.mediaQueryList = undefined;
|
|
1049
|
+
this.mediaQueryListener = undefined;
|
|
1050
|
+
// setup
|
|
1051
|
+
if (isBreakpoint(value)) {
|
|
1052
|
+
this.mediaMatcher ?? (this.mediaMatcher = new MediaMatcher());
|
|
1053
|
+
this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);
|
|
1054
|
+
this.mediaQueryListener = (event) => (this._iconOnly = event.matches);
|
|
1055
|
+
this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
|
|
1056
|
+
this._iconOnly = this.mediaQueryList.matches;
|
|
1057
|
+
}
|
|
1058
|
+
else {
|
|
1059
|
+
this._iconOnly = value;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
componentWillLoad() {
|
|
1063
|
+
this.onIconOnlyChanged(this.iconOnly);
|
|
1064
|
+
}
|
|
1065
|
+
get isIconBadge() {
|
|
1066
|
+
return Boolean(this.icon) && this._iconOnly;
|
|
1067
|
+
}
|
|
1068
|
+
get hasPrefixIcon() {
|
|
1069
|
+
return Boolean(this.icon) && !this._iconOnly && !this.iconRight;
|
|
1070
|
+
}
|
|
1071
|
+
get hasSuffixIcon() {
|
|
1072
|
+
return Boolean(this.icon) && !this._iconOnly && this.iconRight;
|
|
1073
|
+
}
|
|
1074
|
+
get iconSize() {
|
|
1075
|
+
switch (this.size) {
|
|
1076
|
+
case 'xs':
|
|
1077
|
+
case 's':
|
|
1078
|
+
return 'xs';
|
|
1079
|
+
case 'l':
|
|
1080
|
+
case 'xl':
|
|
1081
|
+
return 'l';
|
|
1082
|
+
default:
|
|
1083
|
+
return 'm';
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
render() {
|
|
1087
|
+
return (index.h(index.Host, { key: '2c10a8da896b2fe6b7637ec871386da6ee9dc132', "data-icon-badge": this.isIconBadge ? this.size : null }, this.hasPrefixIcon ? index.h("cat-icon", { icon: this.icon, size: this.iconSize, part: "prefix" }) : null, this.isIconBadge ? (index.h("cat-icon", { icon: this.icon, size: this.iconSize, class: "icon-only" })) : (index.h("slot", null)), this.hasSuffixIcon ? index.h("cat-icon", { icon: this.icon, size: this.iconSize, part: "prefix" }) : null));
|
|
1088
|
+
}
|
|
1089
|
+
get hostElement() { return index.getElement(this); }
|
|
1090
|
+
static get watchers() { return {
|
|
1091
|
+
"iconOnly": ["onIconOnlyChanged"]
|
|
1092
|
+
}; }
|
|
1093
|
+
};
|
|
1094
|
+
CatBadge.style = CatBadgeStyle0;
|
|
1095
|
+
|
|
1044
1096
|
/**
|
|
1045
1097
|
* Find the closest parent element matching the given selector while traversing
|
|
1046
1098
|
* up the DOM tree (including Shadow DOM).
|
|
@@ -1054,7 +1106,7 @@ function findClosest(selector, element) {
|
|
|
1054
1106
|
return nextElement ? findClosest(selector, nextElement) : null;
|
|
1055
1107
|
}
|
|
1056
1108
|
|
|
1057
|
-
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-empty .cat-button-content{display:none}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:var(--cat-font-weight-button, 600);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-info{--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230);--base:var(--cat-info-text, 0, 115, 230)}.cat-button-info:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-hover, 0, 107, 227);--fill:var(--cat-info-fill-hover, 255, 255, 255);--text:var(--cat-info-text-hover, 0, 107, 227)}.cat-button-info.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-info:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-active, 0, 96, 223);--fill:var(--cat-info-fill-active, 255, 255, 255);--text:var(--cat-info-text-active, 0, 96, 223)}.cat-button-success{--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;height:1.5rem;padding:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;height:2rem;padding:0}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;height:2.5rem;padding:0}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;height:3rem;padding:0}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;height:3.5rem;padding:0}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-secondary-bg:transparent;--cat-primary-text:transparent;--cat-danger-text:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/\"\";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left;text-align:left}:host(.cat-text-right) .cat-button{justify-content:right;text-align:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-time-format) .cat-button{border-radius:0}:host(.cat-date-toggle) .cat-button,:host(.cat-time-toggle) .cat-button{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host(.cat-date-item) .cat-button:hover,:host(.cat-date-toggle) .cat-button:hover,:host(.cat-time-format) .cat-button:hover,:host(.cat-time-toggle) .cat-button:hover{z-index:1}:host(.cat-date-item) .cat-button:focus-visible,:host(.cat-date-toggle) .cat-button:focus-visible,:host(.cat-time-format) .cat-button:focus-visible,:host(.cat-time-toggle) .cat-button:focus-visible{z-index:2}:host(.cat-date-item) .cat-button{padding:0;min-width:2rem;max-height:3rem;aspect-ratio:1}:host(.date-start:not(.date-end)) .cat-button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.date-end:not(.date-start)) .cat-button{border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
1109
|
+
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}:host([data-button-group=middle]),:host([data-button-group=last]){margin-left:-1px}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-empty .cat-button-content{display:none}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-button-group-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-button-group-middle{border-radius:0}.cat-button-group-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-button-group:hover{z-index:1}.cat-button-group:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:var(--cat-font-weight-button, 600);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px color-mix(in srgb, rgb(var(--base)) 20%, #fff);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-info{--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230);--base:var(--cat-info-text, 0, 115, 230)}.cat-button-info:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-hover, 0, 107, 227);--fill:var(--cat-info-fill-hover, 255, 255, 255);--text:var(--cat-info-text-hover, 0, 107, 227)}.cat-button-info.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-info:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-active, 0, 96, 223);--fill:var(--cat-info-fill-active, 255, 255, 255);--text:var(--cat-info-text-active, 0, 96, 223)}.cat-button-success{--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;height:1.5rem;padding:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;height:2rem;padding:0}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;height:2.5rem;padding:0}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;height:3rem;padding:0}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;height:3.5rem;padding:0}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-secondary-bg:transparent;--cat-primary-text:transparent;--cat-danger-text:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/\"\";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left;text-align:left}:host(.cat-text-right) .cat-button{justify-content:right;text-align:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-time-format) .cat-button{border-radius:0}:host(.cat-date-toggle) .cat-button,:host(.cat-time-toggle) .cat-button{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host(.cat-date-item) .cat-button:hover,:host(.cat-date-toggle) .cat-button:hover,:host(.cat-time-format) .cat-button:hover,:host(.cat-time-toggle) .cat-button:hover{z-index:1}:host(.cat-date-item) .cat-button:focus-visible,:host(.cat-date-toggle) .cat-button:focus-visible,:host(.cat-time-format) .cat-button:focus-visible,:host(.cat-time-toggle) .cat-button:focus-visible{z-index:2}:host(.cat-date-item) .cat-button{padding:0;min-width:2rem;max-height:3rem;aspect-ratio:1}:host(.date-start:not(.date-end)) .cat-button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.date-end:not(.date-start)) .cat-button{border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
1058
1110
|
const CatButtonStyle0 = catButtonCss;
|
|
1059
1111
|
|
|
1060
1112
|
const CatButton = class {
|
|
@@ -1149,8 +1201,9 @@ const CatButton = class {
|
|
|
1149
1201
|
this.button.click();
|
|
1150
1202
|
}
|
|
1151
1203
|
render() {
|
|
1204
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
1152
1205
|
if (this.url) {
|
|
1153
|
-
return (index.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: {
|
|
1206
|
+
return (index.h(index.Host, { "data-button-group": this.buttonGroupPosition }, index.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: {
|
|
1154
1207
|
'cat-button': true,
|
|
1155
1208
|
'cat-button-empty': !this.hasSlottedContent,
|
|
1156
1209
|
'cat-button-active': this.active,
|
|
@@ -1161,11 +1214,12 @@ const CatButton = class {
|
|
|
1161
1214
|
'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,
|
|
1162
1215
|
[`cat-button-${this.variant}`]: Boolean(this.variant),
|
|
1163
1216
|
[`cat-button-${this.color}`]: Boolean(this.color),
|
|
1164
|
-
[`cat-button-${this.size}`]: Boolean(this.size)
|
|
1165
|
-
|
|
1217
|
+
[`cat-button-${this.size}`]: Boolean(this.size),
|
|
1218
|
+
[`cat-button-group-${this.buttonGroupPosition}`]: Boolean(this.buttonGroupPosition)
|
|
1219
|
+
}, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content)));
|
|
1166
1220
|
}
|
|
1167
1221
|
else {
|
|
1168
|
-
return (index.h("button", { ...this.nativeAttributes, ref: el => (this.button = el), type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, "aria-current": this.a11yCurrent, id: this.buttonId, part: "button", class: {
|
|
1222
|
+
return (index.h(index.Host, { "data-button-group": this.buttonGroupPosition }, index.h("button", { ...this.nativeAttributes, ref: el => (this.button = el), type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, "aria-current": this.a11yCurrent, id: this.buttonId, part: "button", class: {
|
|
1169
1223
|
'cat-button': true,
|
|
1170
1224
|
'cat-button-empty': !this.hasSlottedContent,
|
|
1171
1225
|
'cat-button-active': this.active,
|
|
@@ -1177,9 +1231,8 @@ const CatButton = class {
|
|
|
1177
1231
|
[`cat-button-${this.variant}`]: Boolean(this.variant),
|
|
1178
1232
|
[`cat-button-${this.color}`]: Boolean(this.color),
|
|
1179
1233
|
[`cat-button-${this.size}`]: Boolean(this.size),
|
|
1180
|
-
[`cat-group
|
|
1181
|
-
|
|
1182
|
-
}, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
|
|
1234
|
+
[`cat-button-group-${this.buttonGroupPosition}`]: Boolean(this.buttonGroupPosition)
|
|
1235
|
+
}, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content)));
|
|
1183
1236
|
}
|
|
1184
1237
|
}
|
|
1185
1238
|
get iconSize() {
|
|
@@ -1224,6 +1277,7 @@ const CatButton = class {
|
|
|
1224
1277
|
onBlur(event) {
|
|
1225
1278
|
this.catBlur.emit(event);
|
|
1226
1279
|
}
|
|
1280
|
+
static get delegatesFocus() { return true; }
|
|
1227
1281
|
get hostElement() { return index.getElement(this); }
|
|
1228
1282
|
static get watchers() { return {
|
|
1229
1283
|
"iconOnly": ["onIconOnlyChanged"]
|
|
@@ -1231,22 +1285,23 @@ const CatButton = class {
|
|
|
1231
1285
|
};
|
|
1232
1286
|
CatButton.style = CatButtonStyle0;
|
|
1233
1287
|
|
|
1234
|
-
const catButtonGroupCss = ":host{position:relative;display:inline-flex;vertical-align:middle}
|
|
1288
|
+
const catButtonGroupCss = ":host{position:relative;display:inline-flex;vertical-align:middle}";
|
|
1235
1289
|
const CatButtonGroupStyle0 = catButtonGroupCss;
|
|
1236
1290
|
|
|
1237
1291
|
const CatButtonGroup = class {
|
|
1238
1292
|
constructor(hostRef) {
|
|
1239
1293
|
index.registerInstance(this, hostRef);
|
|
1240
|
-
this.
|
|
1294
|
+
this.buttonElements = [];
|
|
1241
1295
|
this.a11yLabel = undefined;
|
|
1242
1296
|
}
|
|
1243
1297
|
render() {
|
|
1244
|
-
return (index.h(index.Host, { key: '
|
|
1298
|
+
return (index.h(index.Host, { key: '2b9aeb09c4290a27751f568e596a3de21f8deeb3', role: "group", "aria-label": this.a11yLabel }, index.h("slot", { key: '5a6afa70513843b8c201a649ed0edb30fea9b7fc', onSlotchange: this.onSlotChange.bind(this) })));
|
|
1245
1299
|
}
|
|
1246
1300
|
onSlotChange() {
|
|
1247
|
-
this.
|
|
1248
|
-
this.
|
|
1249
|
-
element.buttonGroupPosition =
|
|
1301
|
+
this.buttonElements = Array.from(this.hostElement.querySelectorAll(':scope > cat-button, :scope > cat-tooltip > cat-button, :scope > cat-dropdown cat-button[slot="trigger"]'));
|
|
1302
|
+
this.buttonElements.forEach((element, index) => {
|
|
1303
|
+
element.buttonGroupPosition =
|
|
1304
|
+
index === 0 ? 'first' : index === this.buttonElements.length - 1 ? 'last' : 'middle';
|
|
1250
1305
|
});
|
|
1251
1306
|
}
|
|
1252
1307
|
get hostElement() { return index.getElement(this); }
|
|
@@ -1346,13 +1401,14 @@ const CatCheckbox = class {
|
|
|
1346
1401
|
this.input.blur();
|
|
1347
1402
|
}
|
|
1348
1403
|
render() {
|
|
1349
|
-
|
|
1404
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
1405
|
+
return (index.h(index.Host, { key: 'ab6bd1bb1b74998b5202e57ba6b32da9dd0135c8' }, index.h("label", { key: '5554806b29bbdea219869d043f9c41469390720d', htmlFor: this.id, class: {
|
|
1350
1406
|
'is-hidden': this.labelHidden,
|
|
1351
1407
|
'is-disabled': this.disabled,
|
|
1352
1408
|
'label-left': this.labelLeft,
|
|
1353
1409
|
'align-center': this.alignment === 'center',
|
|
1354
1410
|
'align-end': this.alignment === 'bottom'
|
|
1355
|
-
} }, index.h("input", { key: '
|
|
1411
|
+
} }, index.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 }), index.h("span", { key: 'c6c568ebc80618b4acc3e28793c1844284d4a831', class: "box", "aria-hidden": "true" }, index.h("svg", { key: '5c8c2ae933fecab8b9c826ef2493b2dec129f49c', class: "check", viewBox: "0 0 12 10" }, index.h("polyline", { key: '4ed298a1e0377c4ca771940b7da867c5e72017af', points: "1.5 6 4.5 9 10.5 1" })), index.h("svg", { key: '4ca83993e600c99f4651333ce9f86c0f2b85754a', class: "dash", viewBox: "0 0 12 10" }, index.h("polyline", { key: '32d6a98f6247ce1605baa1c0fcb66325300d0118', points: "1.5 5 10.5 5" }))), index.h("span", { key: 'cdf8717a98a756e4ae204d08fd186cf49ea7d101', class: { label: true, 'label-wrapper': !this.hasSlottedLabel }, part: "label" }, (this.hasSlottedLabel && index.h("slot", { key: '967c87e44e4bb119b46ae70edf2eb47d63177a90', name: "label" })) || this.label, index.h("span", { key: '04a85b99e78e8db04e4080d54ff1690051ce2a50', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: 'caf9a8682262079edf06957ca2a2c9d14abc9130', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: 'd073fb49348c5561984c73bafbf7fd7e17f01ba5', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))), this.hasHint && (index.h("div", { key: '9fb0531829e03683accb07fdc675975feb709577', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { key: 'e72ad8ae3b9048ef6a58d74eb9593d511fad03c6', class: "box-placeholder" }), index.h(CatFormHint, { key: 'b10a09f94fe13f1cc7602191c0e7b3d2066a8364', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
|
|
1356
1412
|
}
|
|
1357
1413
|
get hasHint() {
|
|
1358
1414
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -1370,8 +1426,9 @@ const CatCheckbox = class {
|
|
|
1370
1426
|
this.catBlur.emit(event);
|
|
1371
1427
|
}
|
|
1372
1428
|
updateResolved() {
|
|
1373
|
-
this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;
|
|
1429
|
+
this.resolvedValue = this.checked ? (this.value ?? true) : (this.noValue ?? false);
|
|
1374
1430
|
}
|
|
1431
|
+
static get delegatesFocus() { return true; }
|
|
1375
1432
|
get hostElement() { return index.getElement(this); }
|
|
1376
1433
|
};
|
|
1377
1434
|
CatCheckbox.style = CatCheckboxStyle0;
|
|
@@ -1569,14 +1626,15 @@ const CatDate = class {
|
|
|
1569
1626
|
this.input?.clear();
|
|
1570
1627
|
}
|
|
1571
1628
|
render() {
|
|
1572
|
-
|
|
1629
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
1630
|
+
return (index.h(index.Host, { key: '6cb5833dd0f95cf170ad74d3841eee067e315df1' }, index.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 => {
|
|
1573
1631
|
this.inputFocused = e.target === this.input;
|
|
1574
1632
|
e.stopPropagation();
|
|
1575
1633
|
this.catFocus.emit(e.detail);
|
|
1576
1634
|
}, onCatBlur: e => {
|
|
1577
1635
|
e.stopPropagation();
|
|
1578
1636
|
this.onInputBlur(e.detail);
|
|
1579
|
-
} }, index.h("span", { key: '
|
|
1637
|
+
} }, index.h("span", { key: 'c7d342b0fa3b522af5d0368e590345a2524c40ee', slot: "label" }, this.label, index.h("span", { key: '44d02ddce886497f9f93dc8bb73b943ae7317d07', class: "label-aria" }, " (", this.locale.formatStr, ")")), index.h("cat-dropdown", { key: 'a4b84508af92334d93b406f767f8080ab28a831b', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, index.h("cat-button", { key: '0e48c43b6bb3b34bb70c97e7ed2bae01664c3d4e', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), index.h("div", { key: '976f8aa393d60c1425a63198baeabf7522bc38c4', slot: "content" }, index.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) }))))));
|
|
1580
1638
|
}
|
|
1581
1639
|
getTriggerA11yLabel() {
|
|
1582
1640
|
const date = this.locale.fromLocalISO(this.value);
|
|
@@ -1643,6 +1701,7 @@ const CatDate = class {
|
|
|
1643
1701
|
this.catChange.emit(newValue);
|
|
1644
1702
|
}
|
|
1645
1703
|
}
|
|
1704
|
+
static get delegatesFocus() { return true; }
|
|
1646
1705
|
get hostElement() { return index.getElement(this); }
|
|
1647
1706
|
static get watchers() { return {
|
|
1648
1707
|
"min": ["onMinChanged"],
|
|
@@ -2221,7 +2280,9 @@ var isFocusable = function isFocusable(node, options) {
|
|
|
2221
2280
|
};
|
|
2222
2281
|
|
|
2223
2282
|
const firstTabbable = (container) => {
|
|
2224
|
-
return (container
|
|
2283
|
+
return (container
|
|
2284
|
+
? tabbable(container, { includeContainer: true, getShadowRoot: true }).filter(element => !element.shadowRoot?.delegatesFocus)
|
|
2285
|
+
: []).shift();
|
|
2225
2286
|
};
|
|
2226
2287
|
|
|
2227
2288
|
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}";
|
|
@@ -2372,15 +2433,16 @@ const CatDateInline = class {
|
|
|
2372
2433
|
firstTabbable(this.hostElement.shadowRoot?.querySelector('.picker-grid-days'))?.focus(options);
|
|
2373
2434
|
}
|
|
2374
2435
|
render() {
|
|
2436
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
2375
2437
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
2376
2438
|
const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());
|
|
2377
2439
|
const [dateStart, dateEnd] = this.getValue();
|
|
2378
|
-
return (index.h(index.Host, { key: '
|
|
2440
|
+
return (index.h(index.Host, { key: '8b11e245fdd1d392e545692b68ea449dd19f13c8', "aria-label": this.label || undefined }, index.h("div", { key: 'bf1bd1923e220e9f209ae115eb8e6fb23b3c4b46', class: { 'label-container': true, 'label-hidden': this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: 'e3bfbf624e94f894c38fa97a35a0d5ad7c01915c', id: `${this.id}-label`, htmlFor: this.id, part: "label", onClick: () => this.doFocus() }, index.h("span", { key: 'd946093505f4a9092632b17bc035390a663d4e7f', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: 'aa9da48764a90c7d5db185e0472700465627d7c1', name: "label" })) || this.label, index.h("div", { key: 'd5d8c5c50de0578f96ffb3c80853a06e9bab9821', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '30b1b1149e7e07798e9786e2de260e07d2dad19a', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '6d02133a159884bc9951894390f7d7d98a5bc1c9', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: 'd114855977b1fcdaf0baa77e9cbef1250bfa03be', class: { picker: true, 'picker-weeks': this.weeks }, id: this.id, "aria-describedby": `${this.id}-label` }, index.h("div", { key: '49ec46a464d223340dc74d4152c0048db1087ac6', class: "picker-head" }, index.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 }), index.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 }), index.h("h3", { key: '72c71e36794070a1e2916b6296e453b4314ddf45' }, this.getHeadline()), index.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 }), index.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 })), index.h("div", { key: '68f854f2e92f054517091e5667204bdf79b0f57c', class: "picker-grid", onFocusin: () => this.setAriaLive(this.locale.arrowKeys) }, index.h("div", { key: '238564020faf306eadbe5e0178d1e4b1d4590f5c', class: "picker-grid-head" }, Array.from(Array(7), (_, i) => {
|
|
2379
2441
|
const day = (i + this.locale.weekInfo.firstDay) % 7;
|
|
2380
2442
|
return index.h("abbr", { title: this.locale.days.long[day] }, this.locale.days.short[day]);
|
|
2381
|
-
})), this.weeks && (index.h("div", { key: '
|
|
2443
|
+
})), this.weeks && (index.h("div", { key: 'c59e9879cd8eacb4197a327a1f3c5e6d109c21b3', class: "picker-grid-weeks" }, dateGrid
|
|
2382
2444
|
.filter((_, i) => i % 7 === 0)
|
|
2383
|
-
.map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: '
|
|
2445
|
+
.map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: '3751aa8b4744cb6686a5badf2f76bb5a27460dd7', class: "picker-grid-days" }, dateGrid.map(day => {
|
|
2384
2446
|
const isStartDate = isSameDay(dateStart, day);
|
|
2385
2447
|
const isEndDate = isSameDay(dateEnd, day);
|
|
2386
2448
|
const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;
|
|
@@ -2397,7 +2459,7 @@ const CatDateInline = class {
|
|
|
2397
2459
|
'date-focusable': this.canFocus(day),
|
|
2398
2460
|
'date-disabled': !this.canClick(day)
|
|
2399
2461
|
}, 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()));
|
|
2400
|
-
}))), index.h("div", { key: '
|
|
2462
|
+
}))), index.h("div", { key: '7dabe502931e5a831423e368500a04577241253f', class: "picker-foot" }, !this.noToday && this.canClick(this.locale.now()) && (index.h("cat-button", { key: '6da0e2075e109a248a2bb2b6ab67d9ddf96206f1', size: "s", "data-dropdown-no-close": true, onClick: () => this.select(this.locale.now()) }, this.locale.today)), this.hint && index.h("p", { key: '8b3599454323e064ba22ebd3c16168f99600a64b', class: "cursor-help" }, this.locale.arrowKeys), !this.noClear && (index.h("cat-button", { key: '596d9b14c74f482098d5d5c3684fea633b43baa2', size: "s", disabled: !this.value, "data-dropdown-no-close": true, onClick: () => this.clear() }, this.locale.clear)))), index.h("p", { key: 'dd14d9dbec2061f1d55bf628fafadd3a4aa73460', class: "cursor-aria", "aria-live": "polite" })));
|
|
2401
2463
|
}
|
|
2402
2464
|
focus(date, focus = true) {
|
|
2403
2465
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
@@ -2468,7 +2530,7 @@ const CatDateInline = class {
|
|
|
2468
2530
|
else if (isSameMonth(this.viewDate, now) && (!minDate || minDate <= now)) {
|
|
2469
2531
|
return isSameMonth(this.viewDate, date) && isSameDay(now, date);
|
|
2470
2532
|
}
|
|
2471
|
-
const minDay = isSameMonth(date, minDate) ? minDate?.getDate() ?? 1 : 1;
|
|
2533
|
+
const minDay = isSameMonth(date, minDate) ? (minDate?.getDate() ?? 1) : 1;
|
|
2472
2534
|
return isSameMonth(this.viewDate, date) && date.getDate() === minDay;
|
|
2473
2535
|
}
|
|
2474
2536
|
canClick(date) {
|
|
@@ -2492,6 +2554,7 @@ const CatDateInline = class {
|
|
|
2492
2554
|
toRangeValue(startDate, endDate) {
|
|
2493
2555
|
return JSON.stringify([startDate, endDate].map(date => (date ? this.locale.toLocalISO(date) : null)));
|
|
2494
2556
|
}
|
|
2557
|
+
static get delegatesFocus() { return true; }
|
|
2495
2558
|
get hostElement() { return index.getElement(this); }
|
|
2496
2559
|
};
|
|
2497
2560
|
CatDateInline.style = CatDateInlineStyle0;
|
|
@@ -5415,12 +5478,21 @@ function getPaddingObject(padding) {
|
|
|
5415
5478
|
};
|
|
5416
5479
|
}
|
|
5417
5480
|
function rectToClientRect(rect) {
|
|
5481
|
+
const {
|
|
5482
|
+
x,
|
|
5483
|
+
y,
|
|
5484
|
+
width,
|
|
5485
|
+
height
|
|
5486
|
+
} = rect;
|
|
5418
5487
|
return {
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5488
|
+
width,
|
|
5489
|
+
height,
|
|
5490
|
+
top: y,
|
|
5491
|
+
left: x,
|
|
5492
|
+
right: x + width,
|
|
5493
|
+
bottom: y + height,
|
|
5494
|
+
x,
|
|
5495
|
+
y
|
|
5424
5496
|
};
|
|
5425
5497
|
}
|
|
5426
5498
|
|
|
@@ -5609,9 +5681,10 @@ async function detectOverflow(state, options) {
|
|
|
5609
5681
|
strategy
|
|
5610
5682
|
}));
|
|
5611
5683
|
const rect = elementContext === 'floating' ? {
|
|
5612
|
-
...rects.floating,
|
|
5613
5684
|
x,
|
|
5614
|
-
y
|
|
5685
|
+
y,
|
|
5686
|
+
width: rects.floating.width,
|
|
5687
|
+
height: rects.floating.height
|
|
5615
5688
|
} : rects.reference;
|
|
5616
5689
|
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
5617
5690
|
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
@@ -5861,10 +5934,12 @@ const flip$1 = function (options) {
|
|
|
5861
5934
|
return {};
|
|
5862
5935
|
}
|
|
5863
5936
|
const side = getSide(placement);
|
|
5937
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
5864
5938
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
5865
5939
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
5866
5940
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
5867
|
-
|
|
5941
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
5942
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
5868
5943
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
5869
5944
|
}
|
|
5870
5945
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
@@ -5910,8 +5985,17 @@ const flip$1 = function (options) {
|
|
|
5910
5985
|
switch (fallbackStrategy) {
|
|
5911
5986
|
case 'bestFit':
|
|
5912
5987
|
{
|
|
5913
|
-
var _overflowsData$
|
|
5914
|
-
const placement = (_overflowsData$
|
|
5988
|
+
var _overflowsData$filter2;
|
|
5989
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
5990
|
+
if (hasFallbackAxisSideDirection) {
|
|
5991
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
5992
|
+
return currentSideAxis === initialSideAxis ||
|
|
5993
|
+
// Create a bias to the `y` side axis due to horizontal
|
|
5994
|
+
// reading directions favoring greater width.
|
|
5995
|
+
currentSideAxis === 'y';
|
|
5996
|
+
}
|
|
5997
|
+
return true;
|
|
5998
|
+
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
5915
5999
|
if (placement) {
|
|
5916
6000
|
resetPlacement = placement;
|
|
5917
6001
|
}
|
|
@@ -6151,6 +6235,8 @@ async function convertValueToCoords(state, options) {
|
|
|
6151
6235
|
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
6152
6236
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
6153
6237
|
const rawValue = evaluate(options, state);
|
|
6238
|
+
|
|
6239
|
+
// eslint-disable-next-line prefer-const
|
|
6154
6240
|
let {
|
|
6155
6241
|
mainAxis,
|
|
6156
6242
|
crossAxis,
|
|
@@ -6160,10 +6246,9 @@ async function convertValueToCoords(state, options) {
|
|
|
6160
6246
|
crossAxis: 0,
|
|
6161
6247
|
alignmentAxis: null
|
|
6162
6248
|
} : {
|
|
6163
|
-
mainAxis: 0,
|
|
6164
|
-
crossAxis: 0,
|
|
6165
|
-
alignmentAxis:
|
|
6166
|
-
...rawValue
|
|
6249
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
6250
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
6251
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
6167
6252
|
};
|
|
6168
6253
|
if (alignment && typeof alignmentAxis === 'number') {
|
|
6169
6254
|
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
@@ -6285,7 +6370,11 @@ const shift$1 = function (options) {
|
|
|
6285
6370
|
...limitedCoords,
|
|
6286
6371
|
data: {
|
|
6287
6372
|
x: limitedCoords.x - x,
|
|
6288
|
-
y: limitedCoords.y - y
|
|
6373
|
+
y: limitedCoords.y - y,
|
|
6374
|
+
enabled: {
|
|
6375
|
+
[mainAxis]: checkMainAxis,
|
|
6376
|
+
[crossAxis]: checkCrossAxis
|
|
6377
|
+
}
|
|
6289
6378
|
}
|
|
6290
6379
|
};
|
|
6291
6380
|
}
|
|
@@ -6374,6 +6463,7 @@ const size$1 = function (options) {
|
|
|
6374
6463
|
name: 'size',
|
|
6375
6464
|
options,
|
|
6376
6465
|
async fn(state) {
|
|
6466
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
6377
6467
|
const {
|
|
6378
6468
|
placement,
|
|
6379
6469
|
rects,
|
|
@@ -6401,17 +6491,18 @@ const size$1 = function (options) {
|
|
|
6401
6491
|
widthSide = side;
|
|
6402
6492
|
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
6403
6493
|
}
|
|
6404
|
-
const
|
|
6405
|
-
const
|
|
6494
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
6495
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
6496
|
+
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
6497
|
+
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
6406
6498
|
const noShift = !state.middlewareData.shift;
|
|
6407
6499
|
let availableHeight = overflowAvailableHeight;
|
|
6408
6500
|
let availableWidth = overflowAvailableWidth;
|
|
6409
|
-
if (
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
|
6501
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
6502
|
+
availableWidth = maximumClippingWidth;
|
|
6503
|
+
}
|
|
6504
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
6505
|
+
availableHeight = maximumClippingHeight;
|
|
6415
6506
|
}
|
|
6416
6507
|
if (noShift && !alignment) {
|
|
6417
6508
|
const xMin = max(overflow.left, 0);
|
|
@@ -6442,6 +6533,9 @@ const size$1 = function (options) {
|
|
|
6442
6533
|
};
|
|
6443
6534
|
};
|
|
6444
6535
|
|
|
6536
|
+
function hasWindow() {
|
|
6537
|
+
return typeof window !== 'undefined';
|
|
6538
|
+
}
|
|
6445
6539
|
function getNodeName(node) {
|
|
6446
6540
|
if (isNode(node)) {
|
|
6447
6541
|
return (node.nodeName || '').toLowerCase();
|
|
@@ -6460,17 +6554,25 @@ function getDocumentElement(node) {
|
|
|
6460
6554
|
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
6461
6555
|
}
|
|
6462
6556
|
function isNode(value) {
|
|
6557
|
+
if (!hasWindow()) {
|
|
6558
|
+
return false;
|
|
6559
|
+
}
|
|
6463
6560
|
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
6464
6561
|
}
|
|
6465
6562
|
function isElement(value) {
|
|
6563
|
+
if (!hasWindow()) {
|
|
6564
|
+
return false;
|
|
6565
|
+
}
|
|
6466
6566
|
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
6467
6567
|
}
|
|
6468
6568
|
function isHTMLElement(value) {
|
|
6569
|
+
if (!hasWindow()) {
|
|
6570
|
+
return false;
|
|
6571
|
+
}
|
|
6469
6572
|
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
6470
6573
|
}
|
|
6471
6574
|
function isShadowRoot(value) {
|
|
6472
|
-
|
|
6473
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
6575
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
6474
6576
|
return false;
|
|
6475
6577
|
}
|
|
6476
6578
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
@@ -6487,9 +6589,18 @@ function isOverflowElement(element) {
|
|
|
6487
6589
|
function isTableElement(element) {
|
|
6488
6590
|
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
6489
6591
|
}
|
|
6490
|
-
function
|
|
6592
|
+
function isTopLayer$1(element) {
|
|
6593
|
+
return [':popover-open', ':modal'].some(selector => {
|
|
6594
|
+
try {
|
|
6595
|
+
return element.matches(selector);
|
|
6596
|
+
} catch (e) {
|
|
6597
|
+
return false;
|
|
6598
|
+
}
|
|
6599
|
+
});
|
|
6600
|
+
}
|
|
6601
|
+
function isContainingBlock(elementOrCss) {
|
|
6491
6602
|
const webkit = isWebKit();
|
|
6492
|
-
const css = getComputedStyle$1(
|
|
6603
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
6493
6604
|
|
|
6494
6605
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
6495
6606
|
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
@@ -6499,9 +6610,10 @@ function getContainingBlock(element) {
|
|
|
6499
6610
|
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
6500
6611
|
if (isContainingBlock(currentNode)) {
|
|
6501
6612
|
return currentNode;
|
|
6502
|
-
} else {
|
|
6503
|
-
|
|
6613
|
+
} else if (isTopLayer$1(currentNode)) {
|
|
6614
|
+
return null;
|
|
6504
6615
|
}
|
|
6616
|
+
currentNode = getParentNode(currentNode);
|
|
6505
6617
|
}
|
|
6506
6618
|
return null;
|
|
6507
6619
|
}
|
|
@@ -6523,8 +6635,8 @@ function getNodeScroll(element) {
|
|
|
6523
6635
|
};
|
|
6524
6636
|
}
|
|
6525
6637
|
return {
|
|
6526
|
-
scrollLeft: element.
|
|
6527
|
-
scrollTop: element.
|
|
6638
|
+
scrollLeft: element.scrollX,
|
|
6639
|
+
scrollTop: element.scrollY
|
|
6528
6640
|
};
|
|
6529
6641
|
}
|
|
6530
6642
|
function getParentNode(node) {
|
|
@@ -6564,10 +6676,14 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
6564
6676
|
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
6565
6677
|
const win = getWindow(scrollableAncestor);
|
|
6566
6678
|
if (isBody) {
|
|
6567
|
-
|
|
6679
|
+
const frameElement = getFrameElement(win);
|
|
6680
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
6568
6681
|
}
|
|
6569
6682
|
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
6570
6683
|
}
|
|
6684
|
+
function getFrameElement(win) {
|
|
6685
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
6686
|
+
}
|
|
6571
6687
|
|
|
6572
6688
|
function getCssDimensions(element) {
|
|
6573
6689
|
const css = getComputedStyle$1(element);
|
|
@@ -8587,7 +8703,8 @@ const CatDropdown = class {
|
|
|
8587
8703
|
}
|
|
8588
8704
|
initTrigger() {
|
|
8589
8705
|
this.trigger = this.findTrigger();
|
|
8590
|
-
this.trigger.
|
|
8706
|
+
const ariaHaspopup = this.trigger.getAttribute('aria-haspopup');
|
|
8707
|
+
this.trigger.setAttribute('aria-haspopup', ariaHaspopup ?? 'true');
|
|
8591
8708
|
this.trigger.setAttribute('aria-expanded', 'false');
|
|
8592
8709
|
this.trigger.setAttribute('aria-controls', this.contentId);
|
|
8593
8710
|
this.trigger.addEventListener('click', () => this.toggle());
|
|
@@ -8608,7 +8725,7 @@ const CatDropdown = class {
|
|
|
8608
8725
|
const elem = elems.shift();
|
|
8609
8726
|
trigger = elem?.hasAttribute('data-trigger')
|
|
8610
8727
|
? elem
|
|
8611
|
-
: elem?.querySelector('[data-trigger]') ?? undefined;
|
|
8728
|
+
: (elem?.querySelector('[data-trigger]') ?? undefined);
|
|
8612
8729
|
}
|
|
8613
8730
|
if (!trigger) {
|
|
8614
8731
|
trigger = firstTabbable(this.triggerSlot);
|
|
@@ -10387,19 +10504,20 @@ const CatInput = class {
|
|
|
10387
10504
|
}
|
|
10388
10505
|
}
|
|
10389
10506
|
render() {
|
|
10390
|
-
|
|
10507
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10508
|
+
return (index.h("div", { key: 'ffbaf104a60dbf73cb59e07e3164fe0c421540a5', class: {
|
|
10391
10509
|
'input-field': true,
|
|
10392
10510
|
'input-horizontal': this.horizontal
|
|
10393
|
-
} }, index.h("div", { key: '
|
|
10511
|
+
} }, index.h("div", { key: 'e6139d1d950c2d8c2674bb90f0acbe9333ace2eb', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: 'fce898969b37f4579f780c1a62354ccb0da5a73e', htmlFor: this.id, part: "label" }, index.h("span", { key: '8a4d0f653bae9a75db600080ad7d0b9199c14db5', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: '6073eadb00b587d1f3ba22d212e5235d21826b08', name: "label" })) || this.label, index.h("div", { key: 'fc4be508caec71287f275873d49adb5c16931289', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: 'c1010a473d4bfadb8ada56825db91f0c4d2b7871', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '8b2184a224afa6857f207aeaf71d83e12c92ef9a', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { key: '6aee4428a06faba6ecf6a82963f0ecf3ca0d5d7b', class: "label-character-count", "aria-hidden": "true" }, this.value?.toString().length ?? 0, "/", this.maxLength))))))), index.h("div", { key: '9c88a62af0c4083162bea13dc1fd5ead5708efbb', class: "input-container" }, index.h("div", { key: '556a7b1bc45da66739d8a7afec3d4e1b64f12e77', class: "input-outer-wrapper" }, index.h("div", { key: '16d000652a934588fa87c71929565aa5cc15069b', class: {
|
|
10394
10512
|
'input-wrapper': true,
|
|
10395
10513
|
'input-round': this.round,
|
|
10396
10514
|
'input-readonly': this.readonly,
|
|
10397
10515
|
'input-disabled': this.disabled,
|
|
10398
10516
|
'input-invalid': this.invalid
|
|
10399
|
-
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { key: '
|
|
10517
|
+
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { key: 'de3b5da6a0a09c1f66caeb2fb3c9772a2426778a', class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (index.h("cat-icon", { key: 'f950a57fa6060b9f82629d26b91dcb449b86cd2a', icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), index.h("div", { key: 'b98cd1a805712c454262bfa8fae92f1e92b33f09', class: "input-inner-wrapper" }, index.h("input", { key: '9bd8bc8f345c80ced98a06728d9d09bc462e0823', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
|
|
10400
10518
|
'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
|
|
10401
10519
|
'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value
|
|
10402
|
-
}, 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: '
|
|
10520
|
+
}, 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: '255d4760d151bfb36f0217295ee378b5cec26647', 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: 'd5e62dccaaa64370723d4721d567789b06c94b11', 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: '22218dd7cd48b2599d2125ec080467c925b04a4d', size: "m", class: "icon-loading" }), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { key: 'c9e5f18bfc54321ad9b18df56a199d0096739621', icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && (index.h("cat-icon", { key: '307c0d5f2a1dff6efb7d6bf05a035c487f947994', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), this.textSuffix && (index.h("span", { key: '3216d4e278951898d9a96ad48b2df7c17d54c6a3', class: "text-suffix", part: "suffix" }, this.textSuffix))), index.h("slot", { key: 'd996aab9325a2eb77401490c3fa2a9e8eaf0ffc6', name: "addon" })), this.hasHint && (index.h(CatFormHint, { key: '84980cbf543e9405c70d481bce339cd9c743da43', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))));
|
|
10403
10521
|
}
|
|
10404
10522
|
get hasHint() {
|
|
10405
10523
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -10451,6 +10569,7 @@ const CatInput = class {
|
|
|
10451
10569
|
}
|
|
10452
10570
|
return undefined;
|
|
10453
10571
|
}
|
|
10572
|
+
static get delegatesFocus() { return true; }
|
|
10454
10573
|
get hostElement() { return index.getElement(this); }
|
|
10455
10574
|
static get watchers() { return {
|
|
10456
10575
|
"errors": ["onErrorsChanged"]
|
|
@@ -10477,9 +10596,10 @@ const CatPagination = class {
|
|
|
10477
10596
|
this.iconNext = '$cat:pagination-right';
|
|
10478
10597
|
}
|
|
10479
10598
|
render() {
|
|
10480
|
-
|
|
10599
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10600
|
+
return (index.h("nav", { key: 'ed5098e1578e2157e0f5b8c539f313e2892c5f05', role: "navigation" }, index.h("ol", { key: '6f63a5c0a79722913dafbf1b6391ab586a20695a', class: {
|
|
10481
10601
|
[`cat-pagination-${this.size}`]: Boolean(this.size)
|
|
10482
|
-
} }, index.h("li", { key: '
|
|
10602
|
+
} }, index.h("li", { key: '0dd989fa017490749141ab2029546b115a34ce27' }, index.h("cat-button", { key: '8614e9e1ebfc2ff3aeda2cec8be07aeff6e592eb', 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: 'b864788a70e125ae93a34e705522e537b359a12a' }, index.h("cat-button", { key: '93f6d89967b6f6b93b733fbcb628cf4a3663dbf0', 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) })))));
|
|
10483
10603
|
}
|
|
10484
10604
|
get isFirst() {
|
|
10485
10605
|
return this.page === 0;
|
|
@@ -10528,6 +10648,8 @@ const CatPagination = class {
|
|
|
10528
10648
|
index.h("li", null, index.h("cat-button", { variant: this.variant, size: this.size, round: this.round, color: this.page === page ? 'primary' : undefined, active: this.page === page, a11yLabel: of.catI18nRegistry.t('pagination.page', { page: page + 1 }), a11yCurrent: this.page === page ? 'step' : undefined, onClick: () => this.setPage(page) }, page + 1))
|
|
10529
10649
|
]);
|
|
10530
10650
|
}
|
|
10651
|
+
static get delegatesFocus() { return true; }
|
|
10652
|
+
get hostElement() { return index.getElement(this); }
|
|
10531
10653
|
};
|
|
10532
10654
|
CatPagination.style = CatPaginationStyle0;
|
|
10533
10655
|
|
|
@@ -10582,13 +10704,14 @@ const CatRadio = class {
|
|
|
10582
10704
|
this.input.blur();
|
|
10583
10705
|
}
|
|
10584
10706
|
render() {
|
|
10585
|
-
|
|
10707
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
10708
|
+
return (index.h(index.Host, { key: '875be66c1a340d478bb55b15822415df919591ad' }, index.h("label", { key: 'dc4577b45f79f373d621b83a83c09d214cd01251', htmlFor: this.id, class: {
|
|
10586
10709
|
'is-hidden': this.labelHidden,
|
|
10587
10710
|
'is-disabled': this.disabled,
|
|
10588
10711
|
'label-left': this.labelLeft,
|
|
10589
10712
|
'align-center': this.alignment === 'center',
|
|
10590
10713
|
'align-end': this.alignment === 'bottom'
|
|
10591
|
-
}, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, index.h("span", { key: '
|
|
10714
|
+
}, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, index.h("span", { key: '5c9bc1aa0f3746f29a4dbf219e241b6c1779a5c7', class: "radio" }, index.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 }), index.h("span", { key: 'd6863f415ce0999c31276e8dc6e05b3ed7298193', class: "circle" })), index.h("span", { key: 'c82183168cd245b781f2a4273c38ef20247d10c1', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { key: 'd5a556eff95f4471371c6162a0b101c1fb82e0cc', name: "label" })) || this.label)), this.hasHint && (index.h("div", { key: 'a236fefd50ea65e63643e5747a72a1f0b0dfbbb2', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { key: '77ae0d9af2ff86becdb0b3a487c37689fe63af66', class: "circle-placeholder" }), index.h(CatFormHint, { key: '5e90f290fe70136ee19fe287db749abc8e7ec024', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
|
|
10592
10715
|
}
|
|
10593
10716
|
get hasHint() {
|
|
10594
10717
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -10603,6 +10726,7 @@ const CatRadio = class {
|
|
|
10603
10726
|
onBlur(event) {
|
|
10604
10727
|
this.catBlur.emit(event);
|
|
10605
10728
|
}
|
|
10729
|
+
static get delegatesFocus() { return true; }
|
|
10606
10730
|
get hostElement() { return index.getElement(this); }
|
|
10607
10731
|
};
|
|
10608
10732
|
CatRadio.style = CatRadioStyle0;
|
|
@@ -11214,18 +11338,19 @@ const CatSelect = class {
|
|
|
11214
11338
|
});
|
|
11215
11339
|
}
|
|
11216
11340
|
render() {
|
|
11217
|
-
|
|
11341
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
11342
|
+
return (index.h(index.Host, { key: '1ecf402adc273d133bfe829aea9fc28c6f63bc79' }, index.h("div", { key: '5c209d893e31472fabda8dc0aab1294693ba4b0b', class: {
|
|
11218
11343
|
'select-field': true,
|
|
11219
11344
|
'select-horizontal': this.horizontal,
|
|
11220
11345
|
'select-multiple': this.multiple
|
|
11221
|
-
} }, index.h("div", { key: '
|
|
11346
|
+
} }, index.h("div", { key: '51755c54effe1bd8216e656bc95f6bf57814219a', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: 'e4835aa21b0bde58f40e9130122826e6ade1e739', htmlFor: `select-${this.id}-input`, part: "label" }, index.h("span", { key: '8bdbd5c021b0c4fd864cc7b8d84e0230707cd016', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: '6e7ad3025b1cee315cf10c85e907cca128ec3922', name: "label" })) || this.label, index.h("div", { key: '1536c12184aec8b8825d24a0635bb08baa976b6d', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: 'f90e3b62becfab3e586718ef201f9596e78c820b', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: 'db0bfd7582529e57fb18266f5014a73c92584c84', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: 'ce84b362fe92abcd2e65388b457a5ed25def1e3e', class: "select-container" }, index.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) }, index.h("div", { key: '5b92f786919140fe0f4329a3b846e24007b980e7', 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: {
|
|
11222
11347
|
pill: true,
|
|
11223
11348
|
'select-no-open': true,
|
|
11224
11349
|
'select-option-active': this.state.activeSelectionIndex === i
|
|
11225
|
-
}, 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: '
|
|
11350
|
+
}, 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: '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 && index.h("cat-spinner", { key: 'e4d0a6073a1af4480c116bd1525c56716976da24' }), this.invalid && (index.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) &&
|
|
11226
11351
|
!this.disabled &&
|
|
11227
11352
|
!this.state.isResolving &&
|
|
11228
|
-
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: '
|
|
11353
|
+
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: '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 ? 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: '5d449c11b58c01c1f6760448bc46474d8bb889cb', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))), index.h("div", { key: 'e50a9fa50cc46fc444fd3ec1b52c409fcfb0278f', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (index.h("cat-scrollable", { key: 'dd07d6ef4fbd6352b88cb2d15802a4b382c3409f', class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, index.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
|
|
11229
11354
|
? 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 }))))
|
|
11230
11355
|
: !this.state.options.length &&
|
|
11231
11356
|
!this.tags && (index.h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : of.catI18nRegistry.t('select.empty')))))))));
|
|
@@ -11563,6 +11688,7 @@ const CatSelect = class {
|
|
|
11563
11688
|
this.showErrors();
|
|
11564
11689
|
}
|
|
11565
11690
|
}
|
|
11691
|
+
static get delegatesFocus() { return true; }
|
|
11566
11692
|
get hostElement() { return index.getElement(this); }
|
|
11567
11693
|
static get watchers() { return {
|
|
11568
11694
|
"connector": ["onConnectorChanged"],
|
|
@@ -13011,11 +13137,12 @@ const CatSpinner = class {
|
|
|
13011
13137
|
index.registerInstance(this, hostRef);
|
|
13012
13138
|
this.size = 'm';
|
|
13013
13139
|
this.a11yLabel = undefined;
|
|
13140
|
+
this.value = 0;
|
|
13014
13141
|
}
|
|
13015
13142
|
render() {
|
|
13016
|
-
return (index.h("span", { key: '
|
|
13143
|
+
return (index.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: {
|
|
13017
13144
|
[`spinner-${this.size}`]: this.size !== 'inline'
|
|
13018
|
-
} }, index.h("svg", { key: '
|
|
13145
|
+
} }, index.h("svg", { key: '6a649c21b27b3dbad3c73a71936566e7e9648254', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, index.h("circle", { key: '3fb75a339ec6e18d0209e9da2cbf650f2dae4420', cx: "24", cy: "24", r: "21.5" }))));
|
|
13019
13146
|
}
|
|
13020
13147
|
};
|
|
13021
13148
|
CatSpinner.style = CatSpinnerStyle0;
|
|
@@ -13111,7 +13238,8 @@ const CatTabs = class {
|
|
|
13111
13238
|
this.activate(this.tabs[index]);
|
|
13112
13239
|
}
|
|
13113
13240
|
render() {
|
|
13114
|
-
|
|
13241
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13242
|
+
return (index.h(index.Host, { key: '057726c753ef2e4d5557736488fbffb92774f26f' }, this.tabs.map((tab) => {
|
|
13115
13243
|
return (index.h("cat-button", { buttonId: tab.id, role: "tab", part: "tab", class: {
|
|
13116
13244
|
'cat-tab': true,
|
|
13117
13245
|
'cat-tab-active': tab.id === this.activeTab,
|
|
@@ -13137,6 +13265,7 @@ const CatTabs = class {
|
|
|
13137
13265
|
this.activeTab = tab.id;
|
|
13138
13266
|
}
|
|
13139
13267
|
}
|
|
13268
|
+
static get delegatesFocus() { return true; }
|
|
13140
13269
|
get hostElement() { return index.getElement(this); }
|
|
13141
13270
|
static get watchers() { return {
|
|
13142
13271
|
"activeTab": ["onActiveTabChange"]
|
|
@@ -13214,7 +13343,8 @@ const CatTag = class {
|
|
|
13214
13343
|
}
|
|
13215
13344
|
}
|
|
13216
13345
|
render() {
|
|
13217
|
-
|
|
13346
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13347
|
+
return (index.h(index.Host, { key: 'c30f59f0da021ea37a9b94904da318ff28d9d699' }, index.h("div", { key: '6f837dcf33c6b726d4d9755b384815552f4b597f', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: '78f5ce85bda81da097187483121d23f9779f96c9', htmlFor: `tags-${this.id}-input`, part: "label" }, index.h("span", { key: 'dae093aaa4cc7bb26ff015bf389361fda1fd6d5c', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: '9eef396375eaff2e21613a79640bd1692a0a7fe8', name: "label" })) || this.label, index.h("div", { key: '6045ab7f98162d8d32fb5ef72c515661750aa844', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '1fb2271ffe1ddeb4acac516a2dfde5bf96265e5b', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '2ae27a41f03a9bcf5899064fe482a127221e3c10', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: '5b0dacaa15194f59ad7ac76b5435debf7b8bc3fa', 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: '9869bd7ec1de2d7ef45cfd747fbccc7b9e1a0558', class: "input-inner-wrapper" }, index.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 && (index.h("cat-button", { key: '8c61da4726d290f06cb1452ab9f34a2ee291ceac', 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: 'ef3ba1cc1c2eaec1562fcff5f64d15ae9b8290e1', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }))), this.hasHint && (index.h(CatFormHint, { key: '2f92bb6d804a45328af1efb97750b5ae79b0c0b1', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap }))));
|
|
13218
13348
|
}
|
|
13219
13349
|
get hasHint() {
|
|
13220
13350
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -13287,6 +13417,7 @@ const CatTag = class {
|
|
|
13287
13417
|
const regexPattern = `[${escapedDelimiters.join('')}]`;
|
|
13288
13418
|
return new RegExp(regexPattern, 'g');
|
|
13289
13419
|
}
|
|
13420
|
+
static get delegatesFocus() { return true; }
|
|
13290
13421
|
get hostElement() { return index.getElement(this); }
|
|
13291
13422
|
static get watchers() { return {
|
|
13292
13423
|
"errors": ["onErrorsChanged"]
|
|
@@ -13380,15 +13511,16 @@ const CatTextarea = class {
|
|
|
13380
13511
|
}
|
|
13381
13512
|
}
|
|
13382
13513
|
render() {
|
|
13383
|
-
|
|
13514
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13515
|
+
return (index.h(index.Host, { key: '7baa83d9d2722e629503623daa7d64f669d9d14b' }, index.h("div", { key: '7e23d71bea6eb4b3c1f512ce6e6052c4d0c93675', class: {
|
|
13384
13516
|
'textarea-field': true,
|
|
13385
13517
|
'textarea-horizontal': this.horizontal
|
|
13386
|
-
} }, index.h("div", { key: '
|
|
13518
|
+
} }, index.h("div", { key: '51da73044afe3fb0100c921556f4bc60f4823597', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { key: '21efe02e678b15577efbd4e6889ed278e519f6e1', htmlFor: this.id, part: "label" }, index.h("span", { key: '35e58dc082d073296563ec6473734ec7bb995b5e', class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { key: 'f32da2b24d1d50b06a7d55d4d15185441feb285a', name: "label" })) || this.label, index.h("div", { key: 'ed4abb4e4b492130a990fca89699fea9838c758c', class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { key: '97dfc883e7a8af4d2090bb4b40208e0886585da6', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { key: '9c74951359ccab83ec46bbd868bccefaf1356f6f', class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { key: '702c2c4a8238430927882a11490cd5be399bd3f5', class: "label-character-count", "aria-hidden": "true" }, this.value?.length ?? 0, "/", this.maxLength))))))), index.h("div", { key: '3f2aa62a32dd8b775b9826fe8c92129219135dcb', class: "textarea-container" }, index.h("div", { key: '270d8f0b27b99f7388e17edc88affe7daab15438', class: {
|
|
13387
13519
|
'textarea-wrapper': true,
|
|
13388
13520
|
'textarea-readonly': this.readonly,
|
|
13389
13521
|
'textarea-disabled': this.disabled,
|
|
13390
13522
|
'textarea-invalid': this.invalid
|
|
13391
|
-
} }, index.h("textarea", { key: '
|
|
13523
|
+
} }, index.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 && (index.h("cat-icon", { key: '9ff1a0a8b7bf6ae5deb8b489f4426053d5ff54b9', icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (index.h(CatFormHint, { key: 'badc9780d07df9f6645c7f4bbdcfe97610db6741', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
|
|
13392
13524
|
}
|
|
13393
13525
|
get hasHint() {
|
|
13394
13526
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -13428,6 +13560,7 @@ const CatTextarea = class {
|
|
|
13428
13560
|
this.showErrors();
|
|
13429
13561
|
}
|
|
13430
13562
|
}
|
|
13563
|
+
static get delegatesFocus() { return true; }
|
|
13431
13564
|
get hostElement() { return index.getElement(this); }
|
|
13432
13565
|
static get watchers() { return {
|
|
13433
13566
|
"errors": ["onErrorsChanged"]
|
|
@@ -13480,7 +13613,7 @@ function isAfter(date, time) {
|
|
|
13480
13613
|
return date.getHours() > hh || (date.getHours() === hh && date.getMinutes() > mm);
|
|
13481
13614
|
}
|
|
13482
13615
|
|
|
13483
|
-
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}";
|
|
13616
|
+
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}";
|
|
13484
13617
|
const CatTimeStyle0 = catTimeCss;
|
|
13485
13618
|
|
|
13486
13619
|
const CatTime = class {
|
|
@@ -13538,7 +13671,7 @@ const CatTime = class {
|
|
|
13538
13671
|
}
|
|
13539
13672
|
else if (value !== oldValue) {
|
|
13540
13673
|
this.set12hFormat();
|
|
13541
|
-
this.syncValue(value);
|
|
13674
|
+
this.syncValue(value ?? '');
|
|
13542
13675
|
}
|
|
13543
13676
|
}
|
|
13544
13677
|
componentWillLoad() {
|
|
@@ -13577,7 +13710,7 @@ const CatTime = class {
|
|
|
13577
13710
|
let newValue = this.value;
|
|
13578
13711
|
if (!date) {
|
|
13579
13712
|
this.selectionTime = null;
|
|
13580
|
-
|
|
13713
|
+
newValue = undefined;
|
|
13581
13714
|
}
|
|
13582
13715
|
else {
|
|
13583
13716
|
const time = clampTime(this.min ?? null, date, this.max ?? null);
|
|
@@ -13623,14 +13756,15 @@ const CatTime = class {
|
|
|
13623
13756
|
this.input?.clear();
|
|
13624
13757
|
}
|
|
13625
13758
|
render() {
|
|
13626
|
-
|
|
13759
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13760
|
+
return (index.h(index.Host, { key: '9f7564ec41354b98ec0779dde23198a18689f1a3' }, index.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) }, index.h("span", { key: '016bab3b23282fa4a5aeb764e4b80b337d2f9cca', slot: "label" }, this.hasSlottedLabel && index.h("slot", { key: '233b40757fe0c822716b87c23538b5b02371d9d2', name: "label" }), !this.hasSlottedLabel && this.label, index.h("span", { key: '6ae7d40f0fbf4cf729e29ad124df6f3cdd8b22f8', class: "label-aria" }, " (HH:mm)")), index.h("div", { key: '7aaab9d8ee9e06a8a68a9f94e664ba12422a18c5', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (index.h("cat-button", { key: '9130d436847a0fb250b28d5630e7c3a403ec494a', class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), index.h("cat-dropdown", { key: '10948ba2be73ffcde722fb22c5a4b9f3891b329d', slot: "addon", placement: this.placement }, index.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 }), index.h("nav", { key: '27a2a17080a09e8148b5cae0af36d03735b8afcf', slot: "content", class: "cat-nav" }, index.h("ul", { key: '8181974cae0ed2c3cc99c43d51f3ccbc5e188592' }, this.timeArray().map(time => {
|
|
13627
13761
|
const isoTime = formatIso(time);
|
|
13628
13762
|
const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);
|
|
13629
13763
|
return (index.h("li", null, index.h("cat-button", { class: {
|
|
13630
13764
|
'cat-nav-item': true,
|
|
13631
13765
|
'time-disabled': disabled
|
|
13632
13766
|
}, 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))));
|
|
13633
|
-
}))))), this.hasSlottedHint && (index.h("span", { key: '
|
|
13767
|
+
}))))), this.hasSlottedHint && (index.h("span", { key: 'cd316e5045ad3298aac0e4056c865f7bd6b1dcf3', slot: "hint" }, index.h("slot", { key: '7fa90c7b83032013bfc9d1626bc8b53072e9aa85', name: "hint" }))))));
|
|
13634
13768
|
}
|
|
13635
13769
|
timeArray() {
|
|
13636
13770
|
const result = [];
|
|
@@ -13691,6 +13825,7 @@ const CatTime = class {
|
|
|
13691
13825
|
this.catChange.emit(newValue);
|
|
13692
13826
|
}
|
|
13693
13827
|
}
|
|
13828
|
+
static get delegatesFocus() { return true; }
|
|
13694
13829
|
get hostElement() { return index.getElement(this); }
|
|
13695
13830
|
static get watchers() { return {
|
|
13696
13831
|
"min": ["onMinChanged"],
|
|
@@ -13756,13 +13891,14 @@ const CatToggle = class {
|
|
|
13756
13891
|
this.input.blur();
|
|
13757
13892
|
}
|
|
13758
13893
|
render() {
|
|
13759
|
-
|
|
13894
|
+
this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;
|
|
13895
|
+
return (index.h(index.Host, { key: 'fd406b8ecbbbfd82d9872a01893129e570d3b9a1' }, index.h("label", { key: '7159c14116061024c7388909f2dff6bb07e6ba74', htmlFor: this.id, class: {
|
|
13760
13896
|
'is-hidden': this.labelHidden,
|
|
13761
13897
|
'is-disabled': this.disabled,
|
|
13762
13898
|
'label-left': this.labelLeft,
|
|
13763
13899
|
'align-center': this.alignment === 'center',
|
|
13764
13900
|
'align-end': this.alignment === 'bottom'
|
|
13765
|
-
} }, index.h("input", { key: '
|
|
13901
|
+
} }, index.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 }), index.h("span", { key: '405bfdd36ec78874840cd3e8d03838b20115aa00', class: "toggle" }), index.h("span", { key: 'd9bd13f8b2281d1b1be44c552262f69282f89bab', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { key: 'be3dc6b41973cfd3c372757632768a8f73668c50', name: "label" })) || this.label)), this.hasHint && (index.h("div", { key: '090ad02728fa1ace69abfcfdc0b2d31f7b00150d', class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { key: '4ade49db31fd0bae7d0efb4c5169aacd9e30b94c', class: "toggle-placeholder" }), index.h(CatFormHint, { key: '3859a49004b782b069673289fc5e8548eded00d5', id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
|
|
13766
13902
|
}
|
|
13767
13903
|
get hasHint() {
|
|
13768
13904
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -13779,8 +13915,9 @@ const CatToggle = class {
|
|
|
13779
13915
|
this.catBlur.emit(event);
|
|
13780
13916
|
}
|
|
13781
13917
|
updateResolved() {
|
|
13782
|
-
this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;
|
|
13918
|
+
this.resolvedValue = this.checked ? (this.value ?? true) : (this.noValue ?? false);
|
|
13783
13919
|
}
|
|
13920
|
+
static get delegatesFocus() { return true; }
|
|
13784
13921
|
get hostElement() { return index.getElement(this); }
|
|
13785
13922
|
};
|
|
13786
13923
|
CatToggle.style = CatToggleStyle0;
|