@haiilo/catalyst 10.25.2 → 10.26.1
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-f4873629.js → p-e5aee21d.js} +2 -2
- package/dist/catalyst/p-e5aee21d.js.map +1 -0
- package/dist/catalyst/{p-33cfd838.entry.js → p-eb4e484c.entry.js} +4 -4
- package/dist/catalyst/p-eb4e484c.entry.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +184 -78
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- 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-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 +8 -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 +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-date/cat-date.js +7 -4
- package/dist/collection/components/cat-date/cat-date.js.map +1 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.js +1 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-time/cat-time.js +4 -4
- package/dist/collection/components/cat-time/cat-time.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.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 +10 -125
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox2.js +1 -1
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-date-inline2.js +1 -1
- package/dist/components/cat-date-inline2.js.map +1 -1
- package/dist/components/cat-date.js +7 -4
- package/dist/components/cat-date.js.map +1 -1
- package/dist/components/cat-dropdown2.js +1 -1
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-time.js +4 -4
- package/dist/components/cat-time.js.map +1 -1
- package/dist/components/cat-toggle.js +1 -1
- package/dist/components/cat-toggle.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 +184 -78
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/esm/catalyst.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- 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-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-date/cat-date.d.ts +1 -0
- package/dist/types/components.d.ts +24 -0
- package/package.json +2 -2
- package/dist/catalyst/p-33cfd838.entry.js.map +0 -1
- package/dist/catalyst/p-f4873629.js.map +0 -1
- package/dist/cjs/of-5cd84f84.js.map +0 -1
- package/dist/esm/of-625babef.js.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a45dd7c9.js');
|
|
6
|
-
const of = require('./of-
|
|
6
|
+
const of = require('./of-aaee31a6.js');
|
|
7
7
|
|
|
8
8
|
const ObjectUnsubscribedError = of.createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
|
|
9
9
|
_super(this);
|
|
@@ -907,25 +907,6 @@ const CatAvatar = class {
|
|
|
907
907
|
};
|
|
908
908
|
CatAvatar.style = CatAvatarStyle0;
|
|
909
909
|
|
|
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
910
|
const _breakpoints = ['xs', 's', 'm', 'l', 'xl'];
|
|
930
911
|
const Breakpoints = {
|
|
931
912
|
xs: '(max-width: 539.98px)',
|
|
@@ -1041,6 +1022,74 @@ function createEmptyStyleRule(query) {
|
|
|
1041
1022
|
}
|
|
1042
1023
|
}
|
|
1043
1024
|
|
|
1025
|
+
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)}}";
|
|
1026
|
+
const CatBadgeStyle0 = catBadgeCss;
|
|
1027
|
+
|
|
1028
|
+
const CatBadge = class {
|
|
1029
|
+
constructor(hostRef) {
|
|
1030
|
+
index.registerInstance(this, hostRef);
|
|
1031
|
+
this._iconOnly = true;
|
|
1032
|
+
this.variant = 'filled';
|
|
1033
|
+
this.color = 'primary';
|
|
1034
|
+
this.size = 'm';
|
|
1035
|
+
this.round = false;
|
|
1036
|
+
this.pulse = false;
|
|
1037
|
+
this.icon = undefined;
|
|
1038
|
+
this.iconOnly = false;
|
|
1039
|
+
this.iconRight = false;
|
|
1040
|
+
}
|
|
1041
|
+
onIconOnlyChanged(value) {
|
|
1042
|
+
// teardown
|
|
1043
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1044
|
+
this.mediaQueryList?.removeEventListener('change', this.mediaQueryListener);
|
|
1045
|
+
this.mediaQueryList = undefined;
|
|
1046
|
+
this.mediaQueryListener = undefined;
|
|
1047
|
+
// setup
|
|
1048
|
+
if (isBreakpoint(value)) {
|
|
1049
|
+
this.mediaMatcher ?? (this.mediaMatcher = new MediaMatcher());
|
|
1050
|
+
this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);
|
|
1051
|
+
this.mediaQueryListener = (event) => (this._iconOnly = event.matches);
|
|
1052
|
+
this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
|
|
1053
|
+
this._iconOnly = this.mediaQueryList.matches;
|
|
1054
|
+
}
|
|
1055
|
+
else {
|
|
1056
|
+
this._iconOnly = value;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
componentWillLoad() {
|
|
1060
|
+
this.onIconOnlyChanged(this.iconOnly);
|
|
1061
|
+
}
|
|
1062
|
+
get isIconBadge() {
|
|
1063
|
+
return Boolean(this.icon) && this._iconOnly;
|
|
1064
|
+
}
|
|
1065
|
+
get hasPrefixIcon() {
|
|
1066
|
+
return Boolean(this.icon) && !this._iconOnly && !this.iconRight;
|
|
1067
|
+
}
|
|
1068
|
+
get hasSuffixIcon() {
|
|
1069
|
+
return Boolean(this.icon) && !this._iconOnly && this.iconRight;
|
|
1070
|
+
}
|
|
1071
|
+
get iconSize() {
|
|
1072
|
+
switch (this.size) {
|
|
1073
|
+
case 'xs':
|
|
1074
|
+
case 's':
|
|
1075
|
+
return 'xs';
|
|
1076
|
+
case 'l':
|
|
1077
|
+
case 'xl':
|
|
1078
|
+
return 'l';
|
|
1079
|
+
default:
|
|
1080
|
+
return 'm';
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
render() {
|
|
1084
|
+
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));
|
|
1085
|
+
}
|
|
1086
|
+
get hostElement() { return index.getElement(this); }
|
|
1087
|
+
static get watchers() { return {
|
|
1088
|
+
"iconOnly": ["onIconOnlyChanged"]
|
|
1089
|
+
}; }
|
|
1090
|
+
};
|
|
1091
|
+
CatBadge.style = CatBadgeStyle0;
|
|
1092
|
+
|
|
1044
1093
|
/**
|
|
1045
1094
|
* Find the closest parent element matching the given selector while traversing
|
|
1046
1095
|
* up the DOM tree (including Shadow DOM).
|
|
@@ -1054,7 +1103,7 @@ function findClosest(selector, element) {
|
|
|
1054
1103
|
return nextElement ? findClosest(selector, nextElement) : null;
|
|
1055
1104
|
}
|
|
1056
1105
|
|
|
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}";
|
|
1106
|
+
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
1107
|
const CatButtonStyle0 = catButtonCss;
|
|
1059
1108
|
|
|
1060
1109
|
const CatButton = class {
|
|
@@ -1150,7 +1199,7 @@ const CatButton = class {
|
|
|
1150
1199
|
}
|
|
1151
1200
|
render() {
|
|
1152
1201
|
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: {
|
|
1202
|
+
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
1203
|
'cat-button': true,
|
|
1155
1204
|
'cat-button-empty': !this.hasSlottedContent,
|
|
1156
1205
|
'cat-button-active': this.active,
|
|
@@ -1161,11 +1210,12 @@ const CatButton = class {
|
|
|
1161
1210
|
'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,
|
|
1162
1211
|
[`cat-button-${this.variant}`]: Boolean(this.variant),
|
|
1163
1212
|
[`cat-button-${this.color}`]: Boolean(this.color),
|
|
1164
|
-
[`cat-button-${this.size}`]: Boolean(this.size)
|
|
1165
|
-
|
|
1213
|
+
[`cat-button-${this.size}`]: Boolean(this.size),
|
|
1214
|
+
[`cat-button-group-${this.buttonGroupPosition}`]: Boolean(this.buttonGroupPosition)
|
|
1215
|
+
}, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content)));
|
|
1166
1216
|
}
|
|
1167
1217
|
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: {
|
|
1218
|
+
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
1219
|
'cat-button': true,
|
|
1170
1220
|
'cat-button-empty': !this.hasSlottedContent,
|
|
1171
1221
|
'cat-button-active': this.active,
|
|
@@ -1177,9 +1227,8 @@ const CatButton = class {
|
|
|
1177
1227
|
[`cat-button-${this.variant}`]: Boolean(this.variant),
|
|
1178
1228
|
[`cat-button-${this.color}`]: Boolean(this.color),
|
|
1179
1229
|
[`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));
|
|
1230
|
+
[`cat-button-group-${this.buttonGroupPosition}`]: Boolean(this.buttonGroupPosition)
|
|
1231
|
+
}, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content)));
|
|
1183
1232
|
}
|
|
1184
1233
|
}
|
|
1185
1234
|
get iconSize() {
|
|
@@ -1231,22 +1280,23 @@ const CatButton = class {
|
|
|
1231
1280
|
};
|
|
1232
1281
|
CatButton.style = CatButtonStyle0;
|
|
1233
1282
|
|
|
1234
|
-
const catButtonGroupCss = ":host{position:relative;display:inline-flex;vertical-align:middle}
|
|
1283
|
+
const catButtonGroupCss = ":host{position:relative;display:inline-flex;vertical-align:middle}";
|
|
1235
1284
|
const CatButtonGroupStyle0 = catButtonGroupCss;
|
|
1236
1285
|
|
|
1237
1286
|
const CatButtonGroup = class {
|
|
1238
1287
|
constructor(hostRef) {
|
|
1239
1288
|
index.registerInstance(this, hostRef);
|
|
1240
|
-
this.
|
|
1289
|
+
this.buttonElements = [];
|
|
1241
1290
|
this.a11yLabel = undefined;
|
|
1242
1291
|
}
|
|
1243
1292
|
render() {
|
|
1244
|
-
return (index.h(index.Host, { key: '
|
|
1293
|
+
return (index.h(index.Host, { key: '2b9aeb09c4290a27751f568e596a3de21f8deeb3', role: "group", "aria-label": this.a11yLabel }, index.h("slot", { key: '5a6afa70513843b8c201a649ed0edb30fea9b7fc', onSlotchange: this.onSlotChange.bind(this) })));
|
|
1245
1294
|
}
|
|
1246
1295
|
onSlotChange() {
|
|
1247
|
-
this.
|
|
1248
|
-
this.
|
|
1249
|
-
element.buttonGroupPosition =
|
|
1296
|
+
this.buttonElements = Array.from(this.hostElement.querySelectorAll(':scope > cat-button, :scope > cat-tooltip > cat-button, :scope > cat-dropdown cat-button[slot="trigger"]'));
|
|
1297
|
+
this.buttonElements.forEach((element, index) => {
|
|
1298
|
+
element.buttonGroupPosition =
|
|
1299
|
+
index === 0 ? 'first' : index === this.buttonElements.length - 1 ? 'last' : 'middle';
|
|
1250
1300
|
});
|
|
1251
1301
|
}
|
|
1252
1302
|
get hostElement() { return index.getElement(this); }
|
|
@@ -1370,7 +1420,7 @@ const CatCheckbox = class {
|
|
|
1370
1420
|
this.catBlur.emit(event);
|
|
1371
1421
|
}
|
|
1372
1422
|
updateResolved() {
|
|
1373
|
-
this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;
|
|
1423
|
+
this.resolvedValue = this.checked ? (this.value ?? true) : (this.noValue ?? false);
|
|
1374
1424
|
}
|
|
1375
1425
|
get hostElement() { return index.getElement(this); }
|
|
1376
1426
|
};
|
|
@@ -1489,6 +1539,7 @@ const CatDate = class {
|
|
|
1489
1539
|
this.catBlur = index.createEvent(this, "catBlur", 7);
|
|
1490
1540
|
this.language = of.catI18nRegistry.getLocale();
|
|
1491
1541
|
this.locale = getLocale$2(this.language);
|
|
1542
|
+
this.inputFocused = false;
|
|
1492
1543
|
this.requiredMarker = 'optional';
|
|
1493
1544
|
this.horizontal = false;
|
|
1494
1545
|
this.autoComplete = undefined;
|
|
@@ -1568,22 +1619,24 @@ const CatDate = class {
|
|
|
1568
1619
|
this.input?.clear();
|
|
1569
1620
|
}
|
|
1570
1621
|
render() {
|
|
1571
|
-
return (index.h(index.Host, { key: '
|
|
1622
|
+
return (index.h(index.Host, { key: '0dddaceee870f7e1d16131988a1c344b22656594' }, index.h("cat-input", { key: '969ebd4ca18452f0eb5550b440666886ddc664ec', 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 => {
|
|
1623
|
+
this.inputFocused = e.target === this.input;
|
|
1572
1624
|
e.stopPropagation();
|
|
1573
1625
|
this.catFocus.emit(e.detail);
|
|
1574
1626
|
}, onCatBlur: e => {
|
|
1575
1627
|
e.stopPropagation();
|
|
1576
1628
|
this.onInputBlur(e.detail);
|
|
1577
|
-
} }, index.h("span", { key: '
|
|
1629
|
+
} }, index.h("span", { key: '7bf41bdd4f7b8f0b69ef43f11fe075d05ac7e959', slot: "label" }, this.label, index.h("span", { key: '0c454cbb586b0e3e45af2a0601bb735836a17105', class: "label-aria" }, " (", this.locale.formatStr, ")")), index.h("cat-dropdown", { key: 'ce4169eb447fb61b1e98da380446aeb744b1e319', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, index.h("cat-button", { key: '2c9f064a88a711d38fe5f293764ab963cee71782', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), index.h("div", { key: 'fe782bbda78ff445f760f80547a0a57252d041ba', slot: "content" }, index.h("cat-date-inline", { key: '8ecfa83e38d2016148e1d970f0142ce62d5d58e4', 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) }))))));
|
|
1578
1630
|
}
|
|
1579
1631
|
getTriggerA11yLabel() {
|
|
1580
1632
|
const date = this.locale.fromLocalISO(this.value);
|
|
1581
1633
|
return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;
|
|
1582
1634
|
}
|
|
1583
1635
|
onInputBlur(e) {
|
|
1584
|
-
if (!this.input) {
|
|
1636
|
+
if (!this.input || !this.inputFocused) {
|
|
1585
1637
|
return;
|
|
1586
1638
|
}
|
|
1639
|
+
this.inputFocused = false;
|
|
1587
1640
|
const oldValue = this.value;
|
|
1588
1641
|
const dateParsed = this.parse(this.input.value ?? '');
|
|
1589
1642
|
const dateMin = this.locale.fromLocalISO(this.min);
|
|
@@ -1605,7 +1658,7 @@ const CatDate = class {
|
|
|
1605
1658
|
onDateChange(e) {
|
|
1606
1659
|
e.stopPropagation();
|
|
1607
1660
|
const oldValue = this.value;
|
|
1608
|
-
const date = e.detail ?
|
|
1661
|
+
const date = e.detail ? this.locale.fromLocalISO(e.detail) : null;
|
|
1609
1662
|
this.value = date ? this.locale.toLocalISO(date) : undefined;
|
|
1610
1663
|
if (oldValue !== this.value) {
|
|
1611
1664
|
this.catChange.emit(this.value);
|
|
@@ -2465,7 +2518,7 @@ const CatDateInline = class {
|
|
|
2465
2518
|
else if (isSameMonth(this.viewDate, now) && (!minDate || minDate <= now)) {
|
|
2466
2519
|
return isSameMonth(this.viewDate, date) && isSameDay(now, date);
|
|
2467
2520
|
}
|
|
2468
|
-
const minDay = isSameMonth(date, minDate) ? minDate?.getDate() ?? 1 : 1;
|
|
2521
|
+
const minDay = isSameMonth(date, minDate) ? (minDate?.getDate() ?? 1) : 1;
|
|
2469
2522
|
return isSameMonth(this.viewDate, date) && date.getDate() === minDay;
|
|
2470
2523
|
}
|
|
2471
2524
|
canClick(date) {
|
|
@@ -5412,12 +5465,21 @@ function getPaddingObject(padding) {
|
|
|
5412
5465
|
};
|
|
5413
5466
|
}
|
|
5414
5467
|
function rectToClientRect(rect) {
|
|
5468
|
+
const {
|
|
5469
|
+
x,
|
|
5470
|
+
y,
|
|
5471
|
+
width,
|
|
5472
|
+
height
|
|
5473
|
+
} = rect;
|
|
5415
5474
|
return {
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5475
|
+
width,
|
|
5476
|
+
height,
|
|
5477
|
+
top: y,
|
|
5478
|
+
left: x,
|
|
5479
|
+
right: x + width,
|
|
5480
|
+
bottom: y + height,
|
|
5481
|
+
x,
|
|
5482
|
+
y
|
|
5421
5483
|
};
|
|
5422
5484
|
}
|
|
5423
5485
|
|
|
@@ -5606,9 +5668,10 @@ async function detectOverflow(state, options) {
|
|
|
5606
5668
|
strategy
|
|
5607
5669
|
}));
|
|
5608
5670
|
const rect = elementContext === 'floating' ? {
|
|
5609
|
-
...rects.floating,
|
|
5610
5671
|
x,
|
|
5611
|
-
y
|
|
5672
|
+
y,
|
|
5673
|
+
width: rects.floating.width,
|
|
5674
|
+
height: rects.floating.height
|
|
5612
5675
|
} : rects.reference;
|
|
5613
5676
|
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
5614
5677
|
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
@@ -5858,10 +5921,12 @@ const flip$1 = function (options) {
|
|
|
5858
5921
|
return {};
|
|
5859
5922
|
}
|
|
5860
5923
|
const side = getSide(placement);
|
|
5924
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
5861
5925
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
5862
5926
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
5863
5927
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
5864
|
-
|
|
5928
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
5929
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
5865
5930
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
5866
5931
|
}
|
|
5867
5932
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
@@ -5907,8 +5972,17 @@ const flip$1 = function (options) {
|
|
|
5907
5972
|
switch (fallbackStrategy) {
|
|
5908
5973
|
case 'bestFit':
|
|
5909
5974
|
{
|
|
5910
|
-
var _overflowsData$
|
|
5911
|
-
const placement = (_overflowsData$
|
|
5975
|
+
var _overflowsData$filter2;
|
|
5976
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
5977
|
+
if (hasFallbackAxisSideDirection) {
|
|
5978
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
5979
|
+
return currentSideAxis === initialSideAxis ||
|
|
5980
|
+
// Create a bias to the `y` side axis due to horizontal
|
|
5981
|
+
// reading directions favoring greater width.
|
|
5982
|
+
currentSideAxis === 'y';
|
|
5983
|
+
}
|
|
5984
|
+
return true;
|
|
5985
|
+
}).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];
|
|
5912
5986
|
if (placement) {
|
|
5913
5987
|
resetPlacement = placement;
|
|
5914
5988
|
}
|
|
@@ -6148,6 +6222,8 @@ async function convertValueToCoords(state, options) {
|
|
|
6148
6222
|
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
6149
6223
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
6150
6224
|
const rawValue = evaluate(options, state);
|
|
6225
|
+
|
|
6226
|
+
// eslint-disable-next-line prefer-const
|
|
6151
6227
|
let {
|
|
6152
6228
|
mainAxis,
|
|
6153
6229
|
crossAxis,
|
|
@@ -6157,10 +6233,9 @@ async function convertValueToCoords(state, options) {
|
|
|
6157
6233
|
crossAxis: 0,
|
|
6158
6234
|
alignmentAxis: null
|
|
6159
6235
|
} : {
|
|
6160
|
-
mainAxis: 0,
|
|
6161
|
-
crossAxis: 0,
|
|
6162
|
-
alignmentAxis:
|
|
6163
|
-
...rawValue
|
|
6236
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
6237
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
6238
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
6164
6239
|
};
|
|
6165
6240
|
if (alignment && typeof alignmentAxis === 'number') {
|
|
6166
6241
|
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
@@ -6282,7 +6357,11 @@ const shift$1 = function (options) {
|
|
|
6282
6357
|
...limitedCoords,
|
|
6283
6358
|
data: {
|
|
6284
6359
|
x: limitedCoords.x - x,
|
|
6285
|
-
y: limitedCoords.y - y
|
|
6360
|
+
y: limitedCoords.y - y,
|
|
6361
|
+
enabled: {
|
|
6362
|
+
[mainAxis]: checkMainAxis,
|
|
6363
|
+
[crossAxis]: checkCrossAxis
|
|
6364
|
+
}
|
|
6286
6365
|
}
|
|
6287
6366
|
};
|
|
6288
6367
|
}
|
|
@@ -6371,6 +6450,7 @@ const size$1 = function (options) {
|
|
|
6371
6450
|
name: 'size',
|
|
6372
6451
|
options,
|
|
6373
6452
|
async fn(state) {
|
|
6453
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
6374
6454
|
const {
|
|
6375
6455
|
placement,
|
|
6376
6456
|
rects,
|
|
@@ -6398,17 +6478,18 @@ const size$1 = function (options) {
|
|
|
6398
6478
|
widthSide = side;
|
|
6399
6479
|
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
6400
6480
|
}
|
|
6401
|
-
const
|
|
6402
|
-
const
|
|
6481
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
6482
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
6483
|
+
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
6484
|
+
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
6403
6485
|
const noShift = !state.middlewareData.shift;
|
|
6404
6486
|
let availableHeight = overflowAvailableHeight;
|
|
6405
6487
|
let availableWidth = overflowAvailableWidth;
|
|
6406
|
-
if (
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
|
6488
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
6489
|
+
availableWidth = maximumClippingWidth;
|
|
6490
|
+
}
|
|
6491
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
6492
|
+
availableHeight = maximumClippingHeight;
|
|
6412
6493
|
}
|
|
6413
6494
|
if (noShift && !alignment) {
|
|
6414
6495
|
const xMin = max(overflow.left, 0);
|
|
@@ -6439,6 +6520,9 @@ const size$1 = function (options) {
|
|
|
6439
6520
|
};
|
|
6440
6521
|
};
|
|
6441
6522
|
|
|
6523
|
+
function hasWindow() {
|
|
6524
|
+
return typeof window !== 'undefined';
|
|
6525
|
+
}
|
|
6442
6526
|
function getNodeName(node) {
|
|
6443
6527
|
if (isNode(node)) {
|
|
6444
6528
|
return (node.nodeName || '').toLowerCase();
|
|
@@ -6457,17 +6541,25 @@ function getDocumentElement(node) {
|
|
|
6457
6541
|
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
6458
6542
|
}
|
|
6459
6543
|
function isNode(value) {
|
|
6544
|
+
if (!hasWindow()) {
|
|
6545
|
+
return false;
|
|
6546
|
+
}
|
|
6460
6547
|
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
6461
6548
|
}
|
|
6462
6549
|
function isElement(value) {
|
|
6550
|
+
if (!hasWindow()) {
|
|
6551
|
+
return false;
|
|
6552
|
+
}
|
|
6463
6553
|
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
6464
6554
|
}
|
|
6465
6555
|
function isHTMLElement(value) {
|
|
6556
|
+
if (!hasWindow()) {
|
|
6557
|
+
return false;
|
|
6558
|
+
}
|
|
6466
6559
|
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
6467
6560
|
}
|
|
6468
6561
|
function isShadowRoot(value) {
|
|
6469
|
-
|
|
6470
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
6562
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
6471
6563
|
return false;
|
|
6472
6564
|
}
|
|
6473
6565
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
@@ -6484,9 +6576,18 @@ function isOverflowElement(element) {
|
|
|
6484
6576
|
function isTableElement(element) {
|
|
6485
6577
|
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
6486
6578
|
}
|
|
6487
|
-
function
|
|
6579
|
+
function isTopLayer$1(element) {
|
|
6580
|
+
return [':popover-open', ':modal'].some(selector => {
|
|
6581
|
+
try {
|
|
6582
|
+
return element.matches(selector);
|
|
6583
|
+
} catch (e) {
|
|
6584
|
+
return false;
|
|
6585
|
+
}
|
|
6586
|
+
});
|
|
6587
|
+
}
|
|
6588
|
+
function isContainingBlock(elementOrCss) {
|
|
6488
6589
|
const webkit = isWebKit();
|
|
6489
|
-
const css = getComputedStyle$1(
|
|
6590
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
6490
6591
|
|
|
6491
6592
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
6492
6593
|
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));
|
|
@@ -6496,9 +6597,10 @@ function getContainingBlock(element) {
|
|
|
6496
6597
|
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
6497
6598
|
if (isContainingBlock(currentNode)) {
|
|
6498
6599
|
return currentNode;
|
|
6499
|
-
} else {
|
|
6500
|
-
|
|
6600
|
+
} else if (isTopLayer$1(currentNode)) {
|
|
6601
|
+
return null;
|
|
6501
6602
|
}
|
|
6603
|
+
currentNode = getParentNode(currentNode);
|
|
6502
6604
|
}
|
|
6503
6605
|
return null;
|
|
6504
6606
|
}
|
|
@@ -6520,8 +6622,8 @@ function getNodeScroll(element) {
|
|
|
6520
6622
|
};
|
|
6521
6623
|
}
|
|
6522
6624
|
return {
|
|
6523
|
-
scrollLeft: element.
|
|
6524
|
-
scrollTop: element.
|
|
6625
|
+
scrollLeft: element.scrollX,
|
|
6626
|
+
scrollTop: element.scrollY
|
|
6525
6627
|
};
|
|
6526
6628
|
}
|
|
6527
6629
|
function getParentNode(node) {
|
|
@@ -6561,10 +6663,14 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
6561
6663
|
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
6562
6664
|
const win = getWindow(scrollableAncestor);
|
|
6563
6665
|
if (isBody) {
|
|
6564
|
-
|
|
6666
|
+
const frameElement = getFrameElement(win);
|
|
6667
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
6565
6668
|
}
|
|
6566
6669
|
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
6567
6670
|
}
|
|
6671
|
+
function getFrameElement(win) {
|
|
6672
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
6673
|
+
}
|
|
6568
6674
|
|
|
6569
6675
|
function getCssDimensions(element) {
|
|
6570
6676
|
const css = getComputedStyle$1(element);
|
|
@@ -8605,7 +8711,7 @@ const CatDropdown = class {
|
|
|
8605
8711
|
const elem = elems.shift();
|
|
8606
8712
|
trigger = elem?.hasAttribute('data-trigger')
|
|
8607
8713
|
? elem
|
|
8608
|
-
: elem?.querySelector('[data-trigger]') ?? undefined;
|
|
8714
|
+
: (elem?.querySelector('[data-trigger]') ?? undefined);
|
|
8609
8715
|
}
|
|
8610
8716
|
if (!trigger) {
|
|
8611
8717
|
trigger = firstTabbable(this.triggerSlot);
|
|
@@ -13535,7 +13641,7 @@ const CatTime = class {
|
|
|
13535
13641
|
}
|
|
13536
13642
|
else if (value !== oldValue) {
|
|
13537
13643
|
this.set12hFormat();
|
|
13538
|
-
this.syncValue(value);
|
|
13644
|
+
this.syncValue(value ?? '');
|
|
13539
13645
|
}
|
|
13540
13646
|
}
|
|
13541
13647
|
componentWillLoad() {
|
|
@@ -13574,7 +13680,7 @@ const CatTime = class {
|
|
|
13574
13680
|
let newValue = this.value;
|
|
13575
13681
|
if (!date) {
|
|
13576
13682
|
this.selectionTime = null;
|
|
13577
|
-
|
|
13683
|
+
newValue = undefined;
|
|
13578
13684
|
}
|
|
13579
13685
|
else {
|
|
13580
13686
|
const time = clampTime(this.min ?? null, date, this.max ?? null);
|
|
@@ -13620,14 +13726,14 @@ const CatTime = class {
|
|
|
13620
13726
|
this.input?.clear();
|
|
13621
13727
|
}
|
|
13622
13728
|
render() {
|
|
13623
|
-
return (index.h(index.Host, { key: '
|
|
13729
|
+
return (index.h(index.Host, { key: 'b71fce8999b68ab9372e79cff859e00c3c3b5ae3' }, index.h("cat-input", { key: 'cb824f43ba631809d3229e57fe70ad3d89d25e25', 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: '245d373d89a8b03d3bbc772bd35e260c35cc3c26', slot: "label" }, this.hasSlottedLabel && index.h("slot", { key: 'b9717682f61035f64a7230fe775267f723f8ecb2', name: "label" }), !this.hasSlottedLabel && this.label, index.h("span", { key: '747a7a112450391f3ba970cb7faefd904877e1a5', class: "label-aria" }, " (HH:mm)")), index.h("div", { key: '15c380b767ef28aade17e1ac21a2134677060772', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (index.h("cat-button", { key: '63d2eef4a5e69c15e23233f57912b4a20e869470', class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), index.h("cat-dropdown", { key: '581392dc8dc6ce127fdafc75676f6c9ab46925fb', slot: "addon", placement: this.placement }, index.h("cat-button", { key: 'f563afde31e991f8f1533ad0d3a50ee34eee81b4', 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: 'baa0539c318511783cd5c4d85d39b310df7016d4', slot: "content", class: "cat-nav" }, index.h("ul", { key: '10af19bdc805117f96ab2d67ef76065c0cc02bff' }, this.timeArray().map(time => {
|
|
13624
13730
|
const isoTime = formatIso(time);
|
|
13625
13731
|
const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);
|
|
13626
13732
|
return (index.h("li", null, index.h("cat-button", { class: {
|
|
13627
13733
|
'cat-nav-item': true,
|
|
13628
13734
|
'time-disabled': disabled
|
|
13629
13735
|
}, 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))));
|
|
13630
|
-
}))))), this.hasSlottedHint && (index.h("span", { key: '
|
|
13736
|
+
}))))), this.hasSlottedHint && (index.h("span", { key: 'f66debdaced2d5c33af41d7c435f67c4831e98a4', slot: "hint" }, index.h("slot", { key: 'f66d541b07a9b822a414447ff7888f3d4df0e63c', name: "hint" }))))));
|
|
13631
13737
|
}
|
|
13632
13738
|
timeArray() {
|
|
13633
13739
|
const result = [];
|
|
@@ -13776,7 +13882,7 @@ const CatToggle = class {
|
|
|
13776
13882
|
this.catBlur.emit(event);
|
|
13777
13883
|
}
|
|
13778
13884
|
updateResolved() {
|
|
13779
|
-
this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;
|
|
13885
|
+
this.resolvedValue = this.checked ? (this.value ?? true) : (this.noValue ?? false);
|
|
13780
13886
|
}
|
|
13781
13887
|
get hostElement() { return index.getElement(this); }
|
|
13782
13888
|
};
|