@haiilo/catalyst 0.3.1 → 0.5.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/assets/fonts/AzeretMono-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Bold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Italic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Medium.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Black.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Black.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Hairline.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Hairline.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Heavy.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Heavy.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Light.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Light.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-LightItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-LightItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Medium.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Medium.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Semibold.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Semibold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Thin.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Thin.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff2 +0 -0
- package/dist/catalyst/catalyst.css +1 -1
- 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-23d54bc6.js +2 -0
- package/dist/catalyst/p-23d54bc6.js.map +1 -0
- package/dist/catalyst/p-84693f87.entry.js +24 -0
- package/dist/catalyst/p-84693f87.entry.js.map +1 -0
- package/dist/catalyst/p-8f5cfa78.js +2 -0
- package/dist/catalyst/p-8f5cfa78.js.map +1 -0
- package/dist/catalyst/{p-ed826597.js → p-fa7da4c6.js} +2 -2
- package/dist/catalyst/p-fa7da4c6.js.map +1 -0
- package/dist/cjs/{app-globals-7f2b1f8e.js → app-globals-50e7504d.js} +9 -2
- package/dist/cjs/app-globals-50e7504d.js.map +1 -0
- package/dist/cjs/{cat-alert_8.cjs.entry.js → cat-alert_15.cjs.entry.js} +602 -400
- package/dist/cjs/cat-alert_15.cjs.entry.js.map +1 -0
- package/dist/cjs/cat-icon-registry-6895750f.js +441 -0
- package/dist/cjs/cat-icon-registry-6895750f.js.map +1 -0
- package/dist/cjs/catalyst.cjs.js +4 -4
- package/dist/cjs/{index-c0881ae0.js → index-2db8e23d.js} +1 -2
- package/dist/cjs/index-2db8e23d.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/collection/assets/fonts/AzeretMono-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Bold.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Italic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Medium.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Black.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Black.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-BlackItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-BlackItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Hairline.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Hairline.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-HairlineItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Heavy.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Heavy.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-HeavyItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Light.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Light.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-LightItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-LightItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Medium.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Medium.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-MediumItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-MediumItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Semibold.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Semibold.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Thin.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Thin.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-ThinItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-ThinItalic.woff2 +0 -0
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/cat-alert/cat-alert.css +11 -6
- package/dist/collection/components/cat-alert/cat-alert.js +19 -8
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.css +17 -17
- package/dist/collection/components/cat-badge/cat-badge.js +9 -8
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.css +18 -8
- package/dist/collection/components/cat-button/cat-button.js +32 -8
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.css +25 -0
- package/dist/collection/components/cat-card/cat-card.js +20 -0
- package/dist/collection/components/cat-card/cat-card.js.map +1 -0
- package/dist/collection/components/cat-checkbox/cat-checkbox.css +105 -0
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +314 -0
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -0
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js +69 -0
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js +14 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.css +5 -5
- package/dist/collection/components/cat-icon/cat-icon.js +3 -2
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.css +131 -0
- package/dist/collection/components/cat-input/cat-input.js +606 -0
- package/dist/collection/components/cat-input/cat-input.js.map +1 -0
- package/dist/collection/components/cat-menu/cat-menu.css +2 -1
- package/dist/collection/components/cat-menu/cat-menu.js +3 -5
- package/dist/collection/components/cat-menu/cat-menu.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.css +84 -0
- package/dist/collection/components/cat-radio/cat-radio.js +283 -0
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +4 -2
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.css +30 -30
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +4 -4
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.css +7 -7
- package/dist/collection/components/cat-spinner/cat-spinner.js +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.css +74 -0
- package/dist/collection/components/cat-textarea/cat-textarea.js +393 -0
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -0
- package/dist/collection/components/cat-toggle/cat-toggle.css +93 -0
- package/dist/collection/components/cat-toggle/cat-toggle.js +283 -0
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.css +41 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +254 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/init.js +9 -1
- package/dist/collection/init.js.map +1 -1
- package/dist/collection/utils/first-tabbable.js +6 -0
- package/dist/collection/utils/first-tabbable.js.map +1 -0
- package/dist/collection/utils/is-touch-screen.js +3 -0
- package/dist/collection/utils/is-touch-screen.js.map +1 -0
- package/dist/components/cat-alert.js +15 -6
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-badge.js +7 -7
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button.js +1 -647
- package/dist/components/cat-button.js.map +1 -1
- package/dist/components/cat-button2.js +346 -0
- package/dist/components/cat-button2.js.map +1 -0
- package/dist/components/cat-card.d.ts +11 -0
- package/dist/components/cat-card.js +35 -0
- package/dist/components/cat-card.js.map +1 -0
- package/dist/components/cat-checkbox.d.ts +11 -0
- package/dist/components/cat-checkbox.js +103 -0
- package/dist/components/cat-checkbox.js.map +1 -0
- package/dist/components/cat-i18n-registry.js +73 -0
- package/dist/components/cat-i18n-registry.js.map +1 -0
- package/dist/components/cat-icon-registry.js +15 -1
- package/dist/components/cat-icon-registry.js.map +1 -1
- package/dist/components/cat-icon2.js +3 -2
- package/dist/components/cat-icon2.js.map +1 -1
- package/dist/components/cat-input.d.ts +11 -0
- package/dist/components/cat-input.js +172 -0
- package/dist/components/cat-input.js.map +1 -0
- package/dist/components/cat-menu.js +12 -1520
- package/dist/components/cat-menu.js.map +1 -1
- package/dist/components/cat-radio.d.ts +11 -0
- package/dist/components/cat-radio.js +93 -0
- package/dist/components/cat-radio.js.map +1 -0
- package/dist/components/cat-scrollable.js +1 -2
- package/dist/components/cat-scrollable.js.map +1 -1
- package/dist/components/cat-skeleton.js +5 -5
- package/dist/components/cat-skeleton.js.map +1 -1
- package/dist/components/cat-spinner2.js +2 -2
- package/dist/components/cat-spinner2.js.map +1 -1
- package/dist/components/cat-textarea.d.ts +11 -0
- package/dist/components/cat-textarea.js +119 -0
- package/dist/components/cat-textarea.js.map +1 -0
- package/dist/components/cat-toggle.d.ts +11 -0
- package/dist/components/cat-toggle.js +93 -0
- package/dist/components/cat-toggle.js.map +1 -0
- package/dist/components/cat-tooltip.d.ts +11 -0
- package/dist/components/cat-tooltip.js +154 -0
- package/dist/components/cat-tooltip.js.map +1 -0
- package/dist/components/first-tabbable.js +1496 -0
- package/dist/components/first-tabbable.js.map +1 -0
- package/dist/components/index.js +9 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/loglevel.js +315 -0
- package/dist/components/loglevel.js.map +1 -0
- package/dist/esm/{app-globals-8af9b2cf.js → app-globals-6906ac5c.js} +9 -2
- package/dist/esm/app-globals-6906ac5c.js.map +1 -0
- package/dist/esm/{cat-alert_8.entry.js → cat-alert_15.entry.js} +594 -399
- package/dist/esm/cat-alert_15.entry.js.map +1 -0
- package/dist/esm/cat-icon-registry-77963c26.js +437 -0
- package/dist/esm/cat-icon-registry-77963c26.js.map +1 -0
- package/dist/esm/catalyst.js +4 -4
- package/dist/esm/{index-0ff35bca.js → index-1f3ca03b.js} +2 -2
- package/dist/esm/index-1f3ca03b.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/types/components/cat-alert/cat-alert.d.ts +4 -2
- package/dist/types/components/cat-badge/cat-badge.d.ts +3 -2
- package/dist/types/components/cat-button/cat-button.d.ts +8 -3
- package/dist/types/components/cat-card/cat-card.d.ts +7 -0
- package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +69 -0
- package/dist/types/components/cat-i18n/cat-i18n-registry.d.ts +18 -0
- package/dist/types/components/cat-icon/cat-icon-registry.d.ts +4 -4
- package/dist/types/components/cat-icon/cat-icon.d.ts +1 -1
- package/dist/types/components/cat-input/cat-input.d.ts +130 -0
- package/dist/types/components/cat-menu/cat-menu.d.ts +0 -1
- package/dist/types/components/cat-radio/cat-radio.d.ts +63 -0
- package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +3 -1
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +85 -0
- package/dist/types/components/cat-toggle/cat-toggle.d.ts +64 -0
- package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +46 -0
- package/dist/types/components.d.ts +680 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/first-tabbable.d.ts +4 -0
- package/dist/types/utils/is-touch-screen.d.ts +2 -0
- package/package.json +9 -7
- package/dist/catalyst/p-31b500c7.entry.js +0 -10
- package/dist/catalyst/p-31b500c7.entry.js.map +0 -1
- package/dist/catalyst/p-ed826597.js.map +0 -1
- package/dist/catalyst/p-ef0a8ae9.js +0 -2
- package/dist/catalyst/p-ef0a8ae9.js.map +0 -1
- package/dist/catalyst/p-f151cb13.js +0 -2
- package/dist/catalyst/p-f151cb13.js.map +0 -1
- package/dist/cjs/app-globals-7f2b1f8e.js.map +0 -1
- package/dist/cjs/cat-alert_8.cjs.entry.js.map +0 -1
- package/dist/cjs/cat-icon-registry-850c538c.js +0 -47
- package/dist/cjs/cat-icon-registry-850c538c.js.map +0 -1
- package/dist/cjs/index-c0881ae0.js.map +0 -1
- package/dist/collection/utils/utils.js +0 -4
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/esm/app-globals-8af9b2cf.js.map +0 -1
- package/dist/esm/cat-alert_8.entry.js.map +0 -1
- package/dist/esm/cat-icon-registry-59da2e37.js +0 -45
- package/dist/esm/cat-icon-registry-59da2e37.js.map +0 -1
- package/dist/esm/index-0ff35bca.js.map +0 -1
- package/dist/types/utils/utils.d.ts +0 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const catIconRegistry = require('./cat-icon-registry-
|
|
5
|
+
const index = require('./index-2db8e23d.js');
|
|
6
|
+
const catIconRegistry = require('./cat-icon-registry-6895750f.js');
|
|
7
7
|
|
|
8
|
-
const catAlertCss = ":host{display:block;margin-bottom:1rem}:host([hidden]){display:none}.
|
|
8
|
+
const catAlertCss = ":host{display:block;margin-bottom:1rem}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host([hidden]){display:none}.alert{font:inherit;color:rgb(var(--text));background-color:rgba(var(--bg), 0.1);box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);border-radius:0.25rem;padding:0.75rem 1rem;width:100%}::slotted(:last-child){margin-bottom:0 !important}.alert-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.alert-secondary{--bg:105, 118, 135;--text:0, 0, 0;--border:105, 118, 135}.alert-success{--bg:0, 132, 88;--text:0, 132, 88;--border:0, 132, 88}.alert-warning{--bg:255, 206, 128;--text:159, 97, 0;--border:159, 97, 0}.alert-danger{--bg:217, 52, 13;--text:217, 52, 13;--border:217, 52, 13}";
|
|
9
9
|
|
|
10
10
|
const CatAlert = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -16,15 +16,24 @@ const CatAlert = class {
|
|
|
16
16
|
this.color = 'primary';
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (index.h("div", { part: "alert", class: {
|
|
20
|
-
|
|
21
|
-
[`
|
|
22
|
-
} }, index.h("slot", null)));
|
|
19
|
+
return (index.h(index.Host, { tabindex: "0", role: this.role }, index.h("div", { part: "alert", class: {
|
|
20
|
+
alert: true,
|
|
21
|
+
[`alert-${this.color}`]: Boolean(this.color)
|
|
22
|
+
} }, index.h("slot", null))));
|
|
23
|
+
}
|
|
24
|
+
get role() {
|
|
25
|
+
switch (this.color) {
|
|
26
|
+
case 'danger':
|
|
27
|
+
case 'warning':
|
|
28
|
+
return 'alert';
|
|
29
|
+
default:
|
|
30
|
+
return 'status';
|
|
31
|
+
}
|
|
23
32
|
}
|
|
24
33
|
};
|
|
25
34
|
CatAlert.style = catAlertCss;
|
|
26
35
|
|
|
27
|
-
const catBadgeCss = ":host{display:inline-flex;max-width:100%;vertical-align:baseline}:host([hidden]){display:none}.
|
|
36
|
+
const catBadgeCss = ":host{display:inline-flex;max-width:100%;vertical-align:baseline}:host([hidden]){display:none}.badge{font:inherit;flex:1 1 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:0.125rem;text-decoration:none;width:100%;box-sizing:border-box;line-height:1;white-space:nowrap}.badge slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.badge-round{border-radius:10rem}.badge-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.badge-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}.badge-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.badge-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--border:105, 118, 135}.badge-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--border:0, 132, 88}.badge-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--border:159, 97, 0}.badge-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--border:217, 52, 13}.badge-xs{height:0.75rem;min-width:0.75rem;font-size:0.75rem;padding:0 0.1875rem}.badge-s{height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}.badge-m{height:1.25rem;min-width:1.25rem;font-size:0.75rem;padding:0 0.3125rem}.badge-l{height:1.5rem;min-width:1.5rem;font-size:0.875rem;padding:0 0.375rem}.badge-xl{height:1.75rem;min-width:1.75rem;font-size:0.9375rem;padding:0 0.4375rem}.badge-pulse.badge-filled{animation:1.5s ease 0s infinite normal none running pulse}.badge-pulse.badge-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(--border), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--border), 0.2)}}";
|
|
28
37
|
|
|
29
38
|
const CatBadge = class {
|
|
30
39
|
constructor(hostRef) {
|
|
@@ -52,329 +61,17 @@ const CatBadge = class {
|
|
|
52
61
|
}
|
|
53
62
|
render() {
|
|
54
63
|
return (index.h("span", { part: "badge", class: {
|
|
55
|
-
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
[`
|
|
59
|
-
[`
|
|
60
|
-
[`
|
|
64
|
+
badge: true,
|
|
65
|
+
'badge-round': this.round,
|
|
66
|
+
'badge-pulse': this.pulse,
|
|
67
|
+
[`badge-${this.variant}`]: Boolean(this.variant),
|
|
68
|
+
[`badge-${this.color}`]: Boolean(this.color),
|
|
69
|
+
[`badge-${this.size}`]: Boolean(this.size)
|
|
61
70
|
} }, index.h("slot", null)));
|
|
62
71
|
}
|
|
63
72
|
};
|
|
64
73
|
CatBadge.style = catBadgeCss;
|
|
65
74
|
|
|
66
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
67
|
-
|
|
68
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
69
|
-
return module = {
|
|
70
|
-
path: basedir,
|
|
71
|
-
exports: {},
|
|
72
|
-
require: function (path, base) {
|
|
73
|
-
return commonjsRequire();
|
|
74
|
-
}
|
|
75
|
-
}, fn(module, module.exports), module.exports;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function commonjsRequire () {
|
|
79
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
var loglevel = createCommonjsModule(function (module) {
|
|
83
|
-
/*
|
|
84
|
-
* loglevel - https://github.com/pimterry/loglevel
|
|
85
|
-
*
|
|
86
|
-
* Copyright (c) 2013 Tim Perry
|
|
87
|
-
* Licensed under the MIT license.
|
|
88
|
-
*/
|
|
89
|
-
(function (root, definition) {
|
|
90
|
-
if (module.exports) {
|
|
91
|
-
module.exports = definition();
|
|
92
|
-
} else {
|
|
93
|
-
root.log = definition();
|
|
94
|
-
}
|
|
95
|
-
}(commonjsGlobal, function () {
|
|
96
|
-
|
|
97
|
-
// Slightly dubious tricks to cut down minimized file size
|
|
98
|
-
var noop = function() {};
|
|
99
|
-
var undefinedType = "undefined";
|
|
100
|
-
var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
|
|
101
|
-
/Trident\/|MSIE /.test(window.navigator.userAgent)
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
var logMethods = [
|
|
105
|
-
"trace",
|
|
106
|
-
"debug",
|
|
107
|
-
"info",
|
|
108
|
-
"warn",
|
|
109
|
-
"error"
|
|
110
|
-
];
|
|
111
|
-
|
|
112
|
-
// Cross-browser bind equivalent that works at least back to IE6
|
|
113
|
-
function bindMethod(obj, methodName) {
|
|
114
|
-
var method = obj[methodName];
|
|
115
|
-
if (typeof method.bind === 'function') {
|
|
116
|
-
return method.bind(obj);
|
|
117
|
-
} else {
|
|
118
|
-
try {
|
|
119
|
-
return Function.prototype.bind.call(method, obj);
|
|
120
|
-
} catch (e) {
|
|
121
|
-
// Missing bind shim or IE8 + Modernizr, fallback to wrapping
|
|
122
|
-
return function() {
|
|
123
|
-
return Function.prototype.apply.apply(method, [obj, arguments]);
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Trace() doesn't print the message in IE, so for that case we need to wrap it
|
|
130
|
-
function traceForIE() {
|
|
131
|
-
if (console.log) {
|
|
132
|
-
if (console.log.apply) {
|
|
133
|
-
console.log.apply(console, arguments);
|
|
134
|
-
} else {
|
|
135
|
-
// In old IE, native console methods themselves don't have apply().
|
|
136
|
-
Function.prototype.apply.apply(console.log, [console, arguments]);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (console.trace) console.trace();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// Build the best logging method possible for this env
|
|
143
|
-
// Wherever possible we want to bind, not wrap, to preserve stack traces
|
|
144
|
-
function realMethod(methodName) {
|
|
145
|
-
if (methodName === 'debug') {
|
|
146
|
-
methodName = 'log';
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (typeof console === undefinedType) {
|
|
150
|
-
return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
|
|
151
|
-
} else if (methodName === 'trace' && isIE) {
|
|
152
|
-
return traceForIE;
|
|
153
|
-
} else if (console[methodName] !== undefined) {
|
|
154
|
-
return bindMethod(console, methodName);
|
|
155
|
-
} else if (console.log !== undefined) {
|
|
156
|
-
return bindMethod(console, 'log');
|
|
157
|
-
} else {
|
|
158
|
-
return noop;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// These private functions always need `this` to be set properly
|
|
163
|
-
|
|
164
|
-
function replaceLoggingMethods(level, loggerName) {
|
|
165
|
-
/*jshint validthis:true */
|
|
166
|
-
for (var i = 0; i < logMethods.length; i++) {
|
|
167
|
-
var methodName = logMethods[i];
|
|
168
|
-
this[methodName] = (i < level) ?
|
|
169
|
-
noop :
|
|
170
|
-
this.methodFactory(methodName, level, loggerName);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// Define log.log as an alias for log.debug
|
|
174
|
-
this.log = this.debug;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// In old IE versions, the console isn't present until you first open it.
|
|
178
|
-
// We build realMethod() replacements here that regenerate logging methods
|
|
179
|
-
function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {
|
|
180
|
-
return function () {
|
|
181
|
-
if (typeof console !== undefinedType) {
|
|
182
|
-
replaceLoggingMethods.call(this, level, loggerName);
|
|
183
|
-
this[methodName].apply(this, arguments);
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// By default, we use closely bound real methods wherever possible, and
|
|
189
|
-
// otherwise we wait for a console to appear, and then try again.
|
|
190
|
-
function defaultMethodFactory(methodName, level, loggerName) {
|
|
191
|
-
/*jshint validthis:true */
|
|
192
|
-
return realMethod(methodName) ||
|
|
193
|
-
enableLoggingWhenConsoleArrives.apply(this, arguments);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function Logger(name, defaultLevel, factory) {
|
|
197
|
-
var self = this;
|
|
198
|
-
var currentLevel;
|
|
199
|
-
defaultLevel = defaultLevel == null ? "WARN" : defaultLevel;
|
|
200
|
-
|
|
201
|
-
var storageKey = "loglevel";
|
|
202
|
-
if (typeof name === "string") {
|
|
203
|
-
storageKey += ":" + name;
|
|
204
|
-
} else if (typeof name === "symbol") {
|
|
205
|
-
storageKey = undefined;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
function persistLevelIfPossible(levelNum) {
|
|
209
|
-
var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
|
|
210
|
-
|
|
211
|
-
if (typeof window === undefinedType || !storageKey) return;
|
|
212
|
-
|
|
213
|
-
// Use localStorage if available
|
|
214
|
-
try {
|
|
215
|
-
window.localStorage[storageKey] = levelName;
|
|
216
|
-
return;
|
|
217
|
-
} catch (ignore) {}
|
|
218
|
-
|
|
219
|
-
// Use session cookie as fallback
|
|
220
|
-
try {
|
|
221
|
-
window.document.cookie =
|
|
222
|
-
encodeURIComponent(storageKey) + "=" + levelName + ";";
|
|
223
|
-
} catch (ignore) {}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function getPersistedLevel() {
|
|
227
|
-
var storedLevel;
|
|
228
|
-
|
|
229
|
-
if (typeof window === undefinedType || !storageKey) return;
|
|
230
|
-
|
|
231
|
-
try {
|
|
232
|
-
storedLevel = window.localStorage[storageKey];
|
|
233
|
-
} catch (ignore) {}
|
|
234
|
-
|
|
235
|
-
// Fallback to cookies if local storage gives us nothing
|
|
236
|
-
if (typeof storedLevel === undefinedType) {
|
|
237
|
-
try {
|
|
238
|
-
var cookie = window.document.cookie;
|
|
239
|
-
var location = cookie.indexOf(
|
|
240
|
-
encodeURIComponent(storageKey) + "=");
|
|
241
|
-
if (location !== -1) {
|
|
242
|
-
storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
|
|
243
|
-
}
|
|
244
|
-
} catch (ignore) {}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
// If the stored level is not valid, treat it as if nothing was stored.
|
|
248
|
-
if (self.levels[storedLevel] === undefined) {
|
|
249
|
-
storedLevel = undefined;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return storedLevel;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function clearPersistedLevel() {
|
|
256
|
-
if (typeof window === undefinedType || !storageKey) return;
|
|
257
|
-
|
|
258
|
-
// Use localStorage if available
|
|
259
|
-
try {
|
|
260
|
-
window.localStorage.removeItem(storageKey);
|
|
261
|
-
return;
|
|
262
|
-
} catch (ignore) {}
|
|
263
|
-
|
|
264
|
-
// Use session cookie as fallback
|
|
265
|
-
try {
|
|
266
|
-
window.document.cookie =
|
|
267
|
-
encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
268
|
-
} catch (ignore) {}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/*
|
|
272
|
-
*
|
|
273
|
-
* Public logger API - see https://github.com/pimterry/loglevel for details
|
|
274
|
-
*
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
self.name = name;
|
|
278
|
-
|
|
279
|
-
self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
|
|
280
|
-
"ERROR": 4, "SILENT": 5};
|
|
281
|
-
|
|
282
|
-
self.methodFactory = factory || defaultMethodFactory;
|
|
283
|
-
|
|
284
|
-
self.getLevel = function () {
|
|
285
|
-
return currentLevel;
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
self.setLevel = function (level, persist) {
|
|
289
|
-
if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
|
|
290
|
-
level = self.levels[level.toUpperCase()];
|
|
291
|
-
}
|
|
292
|
-
if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
|
|
293
|
-
currentLevel = level;
|
|
294
|
-
if (persist !== false) { // defaults to true
|
|
295
|
-
persistLevelIfPossible(level);
|
|
296
|
-
}
|
|
297
|
-
replaceLoggingMethods.call(self, level, name);
|
|
298
|
-
if (typeof console === undefinedType && level < self.levels.SILENT) {
|
|
299
|
-
return "No console available for logging";
|
|
300
|
-
}
|
|
301
|
-
} else {
|
|
302
|
-
throw "log.setLevel() called with invalid level: " + level;
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
self.setDefaultLevel = function (level) {
|
|
307
|
-
defaultLevel = level;
|
|
308
|
-
if (!getPersistedLevel()) {
|
|
309
|
-
self.setLevel(level, false);
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
self.resetLevel = function () {
|
|
314
|
-
self.setLevel(defaultLevel, false);
|
|
315
|
-
clearPersistedLevel();
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
self.enableAll = function(persist) {
|
|
319
|
-
self.setLevel(self.levels.TRACE, persist);
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
self.disableAll = function(persist) {
|
|
323
|
-
self.setLevel(self.levels.SILENT, persist);
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
// Initialize with the right level
|
|
327
|
-
var initialLevel = getPersistedLevel();
|
|
328
|
-
if (initialLevel == null) {
|
|
329
|
-
initialLevel = defaultLevel;
|
|
330
|
-
}
|
|
331
|
-
self.setLevel(initialLevel, false);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/*
|
|
335
|
-
*
|
|
336
|
-
* Top-level API
|
|
337
|
-
*
|
|
338
|
-
*/
|
|
339
|
-
|
|
340
|
-
var defaultLogger = new Logger();
|
|
341
|
-
|
|
342
|
-
var _loggersByName = {};
|
|
343
|
-
defaultLogger.getLogger = function getLogger(name) {
|
|
344
|
-
if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
|
|
345
|
-
throw new TypeError("You must supply a name when creating a logger.");
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
var logger = _loggersByName[name];
|
|
349
|
-
if (!logger) {
|
|
350
|
-
logger = _loggersByName[name] = new Logger(
|
|
351
|
-
name, defaultLogger.getLevel(), defaultLogger.methodFactory);
|
|
352
|
-
}
|
|
353
|
-
return logger;
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
// Grab the current global log variable in case of overwrite
|
|
357
|
-
var _log = (typeof window !== undefinedType) ? window.log : undefined;
|
|
358
|
-
defaultLogger.noConflict = function() {
|
|
359
|
-
if (typeof window !== undefinedType &&
|
|
360
|
-
window.log === defaultLogger) {
|
|
361
|
-
window.log = _log;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
return defaultLogger;
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
defaultLogger.getLoggers = function getLoggers() {
|
|
368
|
-
return _loggersByName;
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
// ES6 default export, for compatibility
|
|
372
|
-
defaultLogger['default'] = defaultLogger;
|
|
373
|
-
|
|
374
|
-
return defaultLogger;
|
|
375
|
-
}));
|
|
376
|
-
});
|
|
377
|
-
|
|
378
75
|
const _breakpoints = ['xs', 's', 'm', 'l', 'xl'];
|
|
379
76
|
const Breakpoints = {
|
|
380
77
|
xs: '(max-width: 539.98px)',
|
|
@@ -486,11 +183,11 @@ function createEmptyStyleRule(query) {
|
|
|
486
183
|
}
|
|
487
184
|
}
|
|
488
185
|
catch (e) {
|
|
489
|
-
loglevel.error(e);
|
|
186
|
+
catIconRegistry.loglevel.error(e);
|
|
490
187
|
}
|
|
491
188
|
}
|
|
492
189
|
|
|
493
|
-
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.cat-button{font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.25rem;text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid
|
|
190
|
+
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:0.25rem;text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-ellipsed .cat-button-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed;opacity:0.65;filter:grayscale(100%)}.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-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.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:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.05)}.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:none}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:underline}.cat-button-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--base:var(--cat-primary-text, 32, 127, 138)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 28, 112, 122);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 28, 112, 122)}.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 25, 101, 110);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 25, 101, 110)}.cat-button-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--base:105, 118, 135}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--base:0, 132, 88}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 117, 78;--fill:255, 255, 255;--text:0, 117, 78}.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 105, 70;--fill:255, 255, 255;--text:0, 105, 70}.cat-button-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--base:159, 97, 0}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 214, 148;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 222, 168;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--base:217, 52, 13}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:194, 46, 11;--fill:255, 255, 255;--text:194, 46, 11}.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:174, 42, 10;--fill:255, 255, 255;--text:174, 42, 10}.cat-button-xs{min-width:1.5rem;padding:0.25rem 0.25rem;font-size:0.875rem;line-height:1rem}.cat-button-xs .cat-button-prefix{margin-right:0.25rem}.cat-button-xs .cat-button-suffix{margin-left:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xs{padding-left:1rem;padding-right:1rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-s .cat-button-prefix{margin-right:0.25rem}.cat-button-s .cat-button-suffix{margin-left:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-s{padding-left:1rem;padding-right:1rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-m .cat-button-prefix{margin-right:0.25rem}.cat-button-m .cat-button-suffix{margin-left:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-m{padding-left:1rem;padding-right:1rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-l .cat-button-prefix{margin-right:0.25rem}.cat-button-l .cat-button-suffix{margin-left:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-l{padding-left:1rem;padding-right:1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem}.cat-button-xl .cat-button-prefix{margin-right:0.25rem}.cat-button-xl .cat-button-suffix{margin-left:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xl{padding-left:1rem;padding-right:1rem}.cat-button-active::before{content:\"\";display:block;position:absolute;top:0;left:0;width:0.25rem;height:100%;background:rgb(var(--base))}:host-context(nav){width:100%}:host-context(nav) .cat-button{box-shadow:none;border-radius:0;justify-content:left}:host-context(nav) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}";
|
|
494
191
|
|
|
495
192
|
const CatButton = class {
|
|
496
193
|
constructor(hostRef) {
|
|
@@ -507,6 +204,10 @@ const CatButton = class {
|
|
|
507
204
|
* The color palette of the button.
|
|
508
205
|
*/
|
|
509
206
|
this.color = 'secondary';
|
|
207
|
+
/**
|
|
208
|
+
* Show an active status indicator on the left side of the button.
|
|
209
|
+
*/
|
|
210
|
+
this.active = false;
|
|
510
211
|
/**
|
|
511
212
|
* The size of the button.
|
|
512
213
|
*/
|
|
@@ -539,9 +240,9 @@ const CatButton = class {
|
|
|
539
240
|
*/
|
|
540
241
|
this.iconOnly = false;
|
|
541
242
|
/**
|
|
542
|
-
* Display the icon
|
|
243
|
+
* Display the icon on the right.
|
|
543
244
|
*/
|
|
544
|
-
this.
|
|
245
|
+
this.iconRight = false;
|
|
545
246
|
}
|
|
546
247
|
onIconOnlyChanged(value) {
|
|
547
248
|
var _a, _b;
|
|
@@ -567,7 +268,7 @@ const CatButton = class {
|
|
|
567
268
|
}
|
|
568
269
|
componentWillRender() {
|
|
569
270
|
if (this.isIconButton && !this.a11yLabel) {
|
|
570
|
-
loglevel.warn('[A11y] Missing ARIA label on icon button', this);
|
|
271
|
+
catIconRegistry.loglevel.warn('[A11y] Missing ARIA label on icon button', this);
|
|
571
272
|
}
|
|
572
273
|
}
|
|
573
274
|
haltDisabledEvents(event) {
|
|
@@ -603,6 +304,7 @@ const CatButton = class {
|
|
|
603
304
|
else {
|
|
604
305
|
return (index.h("button", { 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, id: this.buttonId, part: "button", class: {
|
|
605
306
|
'cat-button': true,
|
|
307
|
+
'cat-button-active': this.active,
|
|
606
308
|
'cat-button-icon': this.isIconButton,
|
|
607
309
|
'cat-button-round': (_a = this.round) !== null && _a !== void 0 ? _a : this.isIconButton,
|
|
608
310
|
'cat-button-loading': this.loading,
|
|
@@ -634,10 +336,10 @@ const CatButton = class {
|
|
|
634
336
|
return Boolean(this.icon) && this._iconOnly;
|
|
635
337
|
}
|
|
636
338
|
get hasPrefixIcon() {
|
|
637
|
-
return Boolean(this.icon) && !this._iconOnly && !this.
|
|
339
|
+
return Boolean(this.icon) && !this._iconOnly && !this.iconRight;
|
|
638
340
|
}
|
|
639
341
|
get hasSuffixIcon() {
|
|
640
|
-
return Boolean(this.icon) && !this._iconOnly && this.
|
|
342
|
+
return Boolean(this.icon) && !this._iconOnly && this.iconRight;
|
|
641
343
|
}
|
|
642
344
|
get content() {
|
|
643
345
|
return [
|
|
@@ -662,7 +364,88 @@ const CatButton = class {
|
|
|
662
364
|
};
|
|
663
365
|
CatButton.style = catButtonCss;
|
|
664
366
|
|
|
665
|
-
const
|
|
367
|
+
const catCardCss = ":host{display:block;margin-bottom:1rem;border-radius:0.5rem;background-color:white;box-shadow:inset 0 0 0 1px #ebecf0;padding:1.5rem}:host([hidden]){display:none}::slotted(nav){margin:-1rem -1.5rem !important}::slotted(:last-child){margin-bottom:0}";
|
|
368
|
+
|
|
369
|
+
const CatCard = class {
|
|
370
|
+
constructor(hostRef) {
|
|
371
|
+
index.registerInstance(this, hostRef);
|
|
372
|
+
}
|
|
373
|
+
render() {
|
|
374
|
+
return (index.h(index.Host, null, index.h("slot", null)));
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
CatCard.style = catCardCss;
|
|
378
|
+
|
|
379
|
+
const catCheckboxCss = ":host{display:flex;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}input{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}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid #d7dbe0;border-radius:0.125rem;transition:background-color 0.13s ease, border-color 0.13s ease}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 0.13s ease;width:70%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-color:rgb(var(--cat-primary-bg, 32, 127, 138));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-color:rgb(var(--cat-primary-bg, 32, 127, 138));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
|
|
380
|
+
|
|
381
|
+
let nextUniqueId$6 = 0;
|
|
382
|
+
const CatCheckbox = class {
|
|
383
|
+
constructor(hostRef) {
|
|
384
|
+
index.registerInstance(this, hostRef);
|
|
385
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
386
|
+
this.catFocus = index.createEvent(this, "catFocus", 7);
|
|
387
|
+
this.catBlur = index.createEvent(this, "catBlur", 7);
|
|
388
|
+
this.id = `cat-checkbox-${nextUniqueId$6++}`;
|
|
389
|
+
/**
|
|
390
|
+
* Checked state of the checkbox
|
|
391
|
+
*/
|
|
392
|
+
this.checked = false;
|
|
393
|
+
/**
|
|
394
|
+
* Disabled state of the checkbox
|
|
395
|
+
*/
|
|
396
|
+
this.disabled = false;
|
|
397
|
+
/**
|
|
398
|
+
* Indeterminate state of the checkbox
|
|
399
|
+
*/
|
|
400
|
+
this.indeterminate = false;
|
|
401
|
+
/**
|
|
402
|
+
* Label of the checkbox which is presented in the UI
|
|
403
|
+
*/
|
|
404
|
+
this.label = '';
|
|
405
|
+
/**
|
|
406
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
407
|
+
*/
|
|
408
|
+
this.labelHidden = false;
|
|
409
|
+
/**
|
|
410
|
+
* Required state of the checkbox
|
|
411
|
+
*/
|
|
412
|
+
this.required = false;
|
|
413
|
+
}
|
|
414
|
+
componentDidLoad() {
|
|
415
|
+
if (this.input && this.indeterminate) {
|
|
416
|
+
this.input.indeterminate = true;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
componentWillRender() {
|
|
420
|
+
if (!this.label) {
|
|
421
|
+
catIconRegistry.loglevel.error('[A11y] Missing ARIA label on checkbox', this);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Sets focus on the checkbox. Use this method instead of `checkbox.focus()`.
|
|
426
|
+
*
|
|
427
|
+
* @param options An optional object providing options to control aspects of
|
|
428
|
+
* the focusing process.
|
|
429
|
+
*/
|
|
430
|
+
async setFocus(options) {
|
|
431
|
+
this.input.focus(options);
|
|
432
|
+
}
|
|
433
|
+
render() {
|
|
434
|
+
return (index.h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, index.h("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, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), index.h("span", { class: "box", "aria-hidden": "true", part: "checkbox" }, index.h("svg", { class: "check", viewBox: "0 0 12 10" }, index.h("polyline", { points: "1.5 6 4.5 9 10.5 1" })), index.h("svg", { class: "dash", viewBox: "0 0 12 10" }, index.h("polyline", { points: "1.5 5 10.5 5" }))), index.h("span", { class: "label", part: "label" }, this.label)));
|
|
435
|
+
}
|
|
436
|
+
onInput(event) {
|
|
437
|
+
this.catChange.emit(event);
|
|
438
|
+
}
|
|
439
|
+
onFocus(event) {
|
|
440
|
+
this.catFocus.emit(event);
|
|
441
|
+
}
|
|
442
|
+
onBlur(event) {
|
|
443
|
+
this.catBlur.emit(event);
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
CatCheckbox.style = catCheckboxCss;
|
|
447
|
+
|
|
448
|
+
const catIconCss = ":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}span{display:inline-flex}svg{fill:currentColor;stroke:none;transform-origin:center center;width:1em;height:1em}.icon-xs svg{font-size:0.75rem}.icon-s svg{font-size:1rem}.icon-m svg{font-size:1.25rem}.icon-l svg{font-size:1.5rem}.icon-xl svg{font-size:1.75rem}";
|
|
666
449
|
|
|
667
450
|
const CatIcon = class {
|
|
668
451
|
constructor(hostRef) {
|
|
@@ -679,12 +462,117 @@ const CatIcon = class {
|
|
|
679
462
|
}
|
|
680
463
|
render() {
|
|
681
464
|
return (index.h("span", { innerHTML: this.iconRegistry.getIcon(this.icon), "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', part: "icon", class: {
|
|
682
|
-
|
|
465
|
+
icon: true,
|
|
466
|
+
[`icon-${this.size}`]: this.size !== 'inline'
|
|
683
467
|
} }));
|
|
684
468
|
}
|
|
685
469
|
};
|
|
686
470
|
CatIcon.style = catIconCss;
|
|
687
471
|
|
|
472
|
+
const catInputCss = ":host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;margin-bottom:1rem}:host([hidden]){display:none}.input-wrapper{display:flex;align-items:stretch;gap:0.5rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:0.25rem;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.input-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px #d7dbe0}.input-wrapper:not(.input-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}label{display:block;align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.text-prefix{border-right:1px solid #d7dbe0;padding-right:0.5rem}.text-suffix{border-left:1px solid #d7dbe0;padding-left:0.5rem}.icon-prefix,.icon-suffix{align-self:center}.input-inner-wrapper{display:flex;position:relative}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}input.has-clearable{padding-right:2rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.25rem}.input-hint{font-size:0.875rem;line-height:1rem;margin:0}";
|
|
473
|
+
|
|
474
|
+
let nextUniqueId$5 = 0;
|
|
475
|
+
const CatInput = class {
|
|
476
|
+
constructor(hostRef) {
|
|
477
|
+
index.registerInstance(this, hostRef);
|
|
478
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
479
|
+
this.catFocus = index.createEvent(this, "catFocus", 7);
|
|
480
|
+
this.catBlur = index.createEvent(this, "catBlur", 7);
|
|
481
|
+
this.i18n = catIconRegistry.CatI18nRegistry.getInstance();
|
|
482
|
+
this.id = `cat-input-${nextUniqueId$5++}`;
|
|
483
|
+
this.inputValue = '';
|
|
484
|
+
/**
|
|
485
|
+
* Whether the input should show a clear button.
|
|
486
|
+
*/
|
|
487
|
+
this.clearable = false;
|
|
488
|
+
/**
|
|
489
|
+
* Whether the input is disabled.
|
|
490
|
+
*/
|
|
491
|
+
this.disabled = false;
|
|
492
|
+
/**
|
|
493
|
+
* Display the icon on the right.
|
|
494
|
+
*/
|
|
495
|
+
this.iconRight = false;
|
|
496
|
+
/**
|
|
497
|
+
* The label for the input.
|
|
498
|
+
*/
|
|
499
|
+
this.label = '';
|
|
500
|
+
/**
|
|
501
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
502
|
+
*/
|
|
503
|
+
this.labelHidden = false;
|
|
504
|
+
/**
|
|
505
|
+
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
506
|
+
*/
|
|
507
|
+
this.name = '';
|
|
508
|
+
/**
|
|
509
|
+
* The value is not editable.
|
|
510
|
+
*/
|
|
511
|
+
this.readonly = false;
|
|
512
|
+
/**
|
|
513
|
+
* A value is required or must be check for the form to be submittable.
|
|
514
|
+
*/
|
|
515
|
+
this.required = false;
|
|
516
|
+
/**
|
|
517
|
+
* Use round input edges.
|
|
518
|
+
*/
|
|
519
|
+
this.round = false;
|
|
520
|
+
/**
|
|
521
|
+
* Type of form control.
|
|
522
|
+
*/
|
|
523
|
+
this.type = 'text';
|
|
524
|
+
}
|
|
525
|
+
onValueChange(value) {
|
|
526
|
+
this.inputValue = '' + (value !== null && value !== void 0 ? value : '');
|
|
527
|
+
}
|
|
528
|
+
componentWillLoad() {
|
|
529
|
+
this.onValueChange(this.value);
|
|
530
|
+
}
|
|
531
|
+
componentWillRender() {
|
|
532
|
+
if (!this.label) {
|
|
533
|
+
catIconRegistry.loglevel.error('[A11y] Missing ARIA label on input', this);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Sets focus on the input. Use this method instead of `input.focus()`.
|
|
538
|
+
*
|
|
539
|
+
* @param options An optional object providing options to control aspects of
|
|
540
|
+
* the focusing process.
|
|
541
|
+
*/
|
|
542
|
+
async setFocus(options) {
|
|
543
|
+
this.input.focus(options);
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Clear the input.
|
|
547
|
+
*/
|
|
548
|
+
async clear() {
|
|
549
|
+
this.inputValue = '';
|
|
550
|
+
}
|
|
551
|
+
render() {
|
|
552
|
+
return (index.h(index.Host, null, this.label && (index.h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, index.h("span", { part: "label" }, this.label, !this.required && (index.h("span", { class: "input-optional", "aria-hidden": "true" }, "(", this.i18n.getMessage('input.optional'), ")"))))), index.h("div", { class: {
|
|
553
|
+
'input-wrapper': true,
|
|
554
|
+
'input-round': this.round,
|
|
555
|
+
'input-disabled': this.disabled
|
|
556
|
+
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && index.h("cat-icon", { icon: this.icon, class: "icon-prefix" }), index.h("div", { class: "input-inner-wrapper" }, index.h("input", { ref: el => (this.input = el), id: this.id, class: {
|
|
557
|
+
'has-clearable': this.clearable && !this.disabled
|
|
558
|
+
}, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.max, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.type, value: this.inputValue, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), this.clearable && !this.disabled && this.inputValue && (index.h("cat-button", { class: "clearable", icon: "cross-circle-outlined", "icon-only": "true", size: "s", variant: "text", round: true, "a11y-label": "sdf", onClick: this.clear.bind(this) }, this.i18n.getMessage('input.clear')))), this.icon && this.iconRight && index.h("cat-icon", { icon: this.icon, class: "icon-suffix" }), this.textSuffix && (index.h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), this.hint && index.h("p", { class: "input-hint" }, this.hint)));
|
|
559
|
+
}
|
|
560
|
+
onInput(event) {
|
|
561
|
+
this.inputValue = this.input.value;
|
|
562
|
+
this.catChange.emit(event);
|
|
563
|
+
}
|
|
564
|
+
onFocus(event) {
|
|
565
|
+
this.catFocus.emit(event);
|
|
566
|
+
}
|
|
567
|
+
onBlur(event) {
|
|
568
|
+
this.catBlur.emit(event);
|
|
569
|
+
}
|
|
570
|
+
static get watchers() { return {
|
|
571
|
+
"value": ["onValueChange"]
|
|
572
|
+
}; }
|
|
573
|
+
};
|
|
574
|
+
CatInput.style = catInputCss;
|
|
575
|
+
|
|
688
576
|
function getSide(placement) {
|
|
689
577
|
return placement.split('-')[0];
|
|
690
578
|
}
|
|
@@ -1070,9 +958,9 @@ const flip = function (options) {
|
|
|
1070
958
|
switch (fallbackStrategy) {
|
|
1071
959
|
case 'bestFit':
|
|
1072
960
|
{
|
|
1073
|
-
var _overflowsData$
|
|
961
|
+
var _overflowsData$slice$;
|
|
1074
962
|
|
|
1075
|
-
const placement = (_overflowsData$
|
|
963
|
+
const placement = (_overflowsData$slice$ = overflowsData.slice().sort((a, b) => a.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0) - b.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0))[0]) == null ? void 0 : _overflowsData$slice$.placement;
|
|
1076
964
|
|
|
1077
965
|
if (placement) {
|
|
1078
966
|
resetPlacement = placement;
|
|
@@ -1113,13 +1001,14 @@ function convertValueToCoords(placement, rects, value, rtl) {
|
|
|
1113
1001
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
1114
1002
|
const rawValue = typeof value === 'function' ? value({ ...rects,
|
|
1115
1003
|
placement
|
|
1116
|
-
}) : value;
|
|
1004
|
+
}) : value;
|
|
1005
|
+
const isNumber = typeof rawValue === 'number'; // eslint-disable-next-line prefer-const
|
|
1117
1006
|
|
|
1118
1007
|
let {
|
|
1119
1008
|
mainAxis,
|
|
1120
1009
|
crossAxis,
|
|
1121
1010
|
alignmentAxis
|
|
1122
|
-
} =
|
|
1011
|
+
} = isNumber ? {
|
|
1123
1012
|
mainAxis: rawValue,
|
|
1124
1013
|
crossAxis: 0,
|
|
1125
1014
|
alignmentAxis: null
|
|
@@ -1753,7 +1642,7 @@ const computePosition = (reference, floating, options) => computePosition$1(refe
|
|
|
1753
1642
|
});
|
|
1754
1643
|
|
|
1755
1644
|
/*!
|
|
1756
|
-
* tabbable 5.3.
|
|
1645
|
+
* tabbable 5.3.1
|
|
1757
1646
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
1758
1647
|
*/
|
|
1759
1648
|
var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
|
|
@@ -1872,34 +1761,22 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
|
|
|
1872
1761
|
return candidates;
|
|
1873
1762
|
};
|
|
1874
1763
|
|
|
1875
|
-
var isContentEditable = function isContentEditable(node) {
|
|
1876
|
-
return node.contentEditable === 'true';
|
|
1877
|
-
};
|
|
1878
|
-
|
|
1879
1764
|
var getTabindex = function getTabindex(node, isScope) {
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
//
|
|
1896
|
-
// isScope is positive for custom element with shadow root or slot that by default
|
|
1897
|
-
// have tabIndex -1, but need to be sorted by document order in order for their
|
|
1898
|
-
// content to be inserted in the correct position
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
if ((isScope || node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {
|
|
1902
|
-
return 0;
|
|
1765
|
+
if (node.tabIndex < 0) {
|
|
1766
|
+
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
1767
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
1768
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
1769
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
1770
|
+
// order, consider their tab index to be 0.
|
|
1771
|
+
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
1772
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
1773
|
+
//
|
|
1774
|
+
// isScope is positive for custom element with shadow root or slot that by default
|
|
1775
|
+
// have tabIndex -1, but need to be sorted by document order in order for their
|
|
1776
|
+
// content to be inserted in the correct position
|
|
1777
|
+
if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
|
|
1778
|
+
return 0;
|
|
1779
|
+
}
|
|
1903
1780
|
}
|
|
1904
1781
|
|
|
1905
1782
|
return node.tabIndex;
|
|
@@ -2082,7 +1959,7 @@ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(o
|
|
|
2082
1959
|
};
|
|
2083
1960
|
|
|
2084
1961
|
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
2085
|
-
if (
|
|
1962
|
+
if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
2086
1963
|
return false;
|
|
2087
1964
|
}
|
|
2088
1965
|
|
|
@@ -2186,7 +2063,7 @@ var isFocusable = function isFocusable(node, options) {
|
|
|
2186
2063
|
};
|
|
2187
2064
|
|
|
2188
2065
|
/*!
|
|
2189
|
-
* focus-trap 6.8.
|
|
2066
|
+
* focus-trap 6.8.1
|
|
2190
2067
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2191
2068
|
*/
|
|
2192
2069
|
|
|
@@ -2483,16 +2360,10 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
2483
2360
|
|
|
2484
2361
|
var updateTabbableNodes = function updateTabbableNodes() {
|
|
2485
2362
|
state.containerGroups = state.containers.map(function (container) {
|
|
2486
|
-
var
|
|
2487
|
-
|
|
2488
|
-
var tabbableNodes = tabbable(container, {
|
|
2489
|
-
getShadowRoot: (_config$tabbableOptio = config.tabbableOptions) === null || _config$tabbableOptio === void 0 ? void 0 : _config$tabbableOptio.getShadowRoot
|
|
2490
|
-
}); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
|
|
2363
|
+
var tabbableNodes = tabbable(container, config.tabbableOptions); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
|
|
2491
2364
|
// are a superset of tabbable nodes
|
|
2492
2365
|
|
|
2493
|
-
var focusableNodes = focusable(container,
|
|
2494
|
-
getShadowRoot: (_config$tabbableOptio2 = config.tabbableOptions) === null || _config$tabbableOptio2 === void 0 ? void 0 : _config$tabbableOptio2.getShadowRoot
|
|
2495
|
-
});
|
|
2366
|
+
var focusableNodes = focusable(container, config.tabbableOptions);
|
|
2496
2367
|
return {
|
|
2497
2368
|
container: container,
|
|
2498
2369
|
tabbableNodes: tabbableNodes,
|
|
@@ -2530,12 +2401,12 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
2530
2401
|
|
|
2531
2402
|
if (forward) {
|
|
2532
2403
|
return focusableNodes.slice(nodeIdx + 1).find(function (n) {
|
|
2533
|
-
return isTabbable(n);
|
|
2404
|
+
return isTabbable(n, config.tabbableOptions);
|
|
2534
2405
|
});
|
|
2535
2406
|
}
|
|
2536
2407
|
|
|
2537
2408
|
return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
|
|
2538
|
-
return isTabbable(n);
|
|
2409
|
+
return isTabbable(n, config.tabbableOptions);
|
|
2539
2410
|
});
|
|
2540
2411
|
}
|
|
2541
2412
|
};
|
|
@@ -2603,7 +2474,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
2603
2474
|
// that was clicked, whether it's focusable or not; by setting
|
|
2604
2475
|
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
2605
2476
|
// on activation (or the configured `setReturnFocus` node)
|
|
2606
|
-
returnFocus: config.returnFocusOnDeactivate && !isFocusable(target)
|
|
2477
|
+
returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)
|
|
2607
2478
|
});
|
|
2608
2479
|
return;
|
|
2609
2480
|
} // This is needed for mobile devices.
|
|
@@ -2670,7 +2541,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
2670
2541
|
return target === firstTabbableNode;
|
|
2671
2542
|
});
|
|
2672
2543
|
|
|
2673
|
-
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target) && !isTabbable(target) && !containerGroup.nextTabbableNode(target, false))) {
|
|
2544
|
+
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
|
|
2674
2545
|
// an exception case where the target is either the container itself, or
|
|
2675
2546
|
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
2676
2547
|
// and user clicked on it or node was programmatically given focus)
|
|
@@ -2696,7 +2567,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
2696
2567
|
return target === lastTabbableNode;
|
|
2697
2568
|
});
|
|
2698
2569
|
|
|
2699
|
-
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target) && !isTabbable(target) && !containerGroup.nextTabbableNode(target))) {
|
|
2570
|
+
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
|
|
2700
2571
|
// an exception case where the target is the container itself, or
|
|
2701
2572
|
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
2702
2573
|
// and user clicked on it or node was programmatically given focus)
|
|
@@ -2932,15 +2803,19 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
2932
2803
|
return trap;
|
|
2933
2804
|
};
|
|
2934
2805
|
|
|
2935
|
-
const
|
|
2806
|
+
const firstTabbable = (container) => {
|
|
2807
|
+
return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();
|
|
2808
|
+
};
|
|
2936
2809
|
|
|
2937
|
-
|
|
2810
|
+
const catMenuCss = ":host{display:contents}:host([hidden]){display:none}.content{padding-top:0.5rem;padding-bottom:0.5rem;position:absolute;background:white;display:none;overflow:auto;-webkit-overflow-scrolling:touch;min-width:8rem;max-width:16rem;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2);border-radius:0.25rem;z-index:100}";
|
|
2811
|
+
|
|
2812
|
+
let nextUniqueId$4 = 0;
|
|
2938
2813
|
const CatMenu = class {
|
|
2939
2814
|
constructor(hostRef) {
|
|
2940
2815
|
index.registerInstance(this, hostRef);
|
|
2941
2816
|
this.catOpen = index.createEvent(this, "catOpen", 7);
|
|
2942
2817
|
this.catClose = index.createEvent(this, "catClose", 7);
|
|
2943
|
-
this.id = nextUniqueId++;
|
|
2818
|
+
this.id = nextUniqueId$4++;
|
|
2944
2819
|
/**
|
|
2945
2820
|
* The placement of the menu.
|
|
2946
2821
|
*/
|
|
@@ -2956,7 +2831,7 @@ const CatMenu = class {
|
|
|
2956
2831
|
}
|
|
2957
2832
|
componentDidLoad() {
|
|
2958
2833
|
var _a, _b, _c, _d, _e;
|
|
2959
|
-
this.trigger =
|
|
2834
|
+
this.trigger = firstTabbable(this.triggerSlot);
|
|
2960
2835
|
(_a = this.trigger) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-haspopup', 'true');
|
|
2961
2836
|
(_b = this.trigger) === null || _b === void 0 ? void 0 : _b.setAttribute('aria-expanded', 'false');
|
|
2962
2837
|
(_c = this.trigger) === null || _c === void 0 ? void 0 : _c.setAttribute('aria-controls', this.contentId);
|
|
@@ -2968,7 +2843,7 @@ const CatMenu = class {
|
|
|
2968
2843
|
this.keyListener = event => {
|
|
2969
2844
|
if (this.content && ['ArrowDown', 'ArrowUp'].includes(event.key)) {
|
|
2970
2845
|
const targetElements = tabbable(this.content, { includeContainer: false, getShadowRoot: true });
|
|
2971
|
-
const activeElement =
|
|
2846
|
+
const activeElement = firstTabbable(document.activeElement);
|
|
2972
2847
|
const activeIdx = activeElement ? targetElements.indexOf(activeElement) : -1;
|
|
2973
2848
|
const activeOff = event.key === 'ArrowDown' ? 1 : -1;
|
|
2974
2849
|
const targetIdx = activeIdx < 0 ? 0 : (activeIdx + activeOff + targetElements.length) % targetElements.length;
|
|
@@ -3031,13 +2906,70 @@ const CatMenu = class {
|
|
|
3031
2906
|
});
|
|
3032
2907
|
}
|
|
3033
2908
|
}
|
|
3034
|
-
firstTabbable(container) {
|
|
3035
|
-
return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();
|
|
3036
|
-
}
|
|
3037
2909
|
};
|
|
3038
2910
|
CatMenu.OFFSET = 4;
|
|
3039
2911
|
CatMenu.style = catMenuCss;
|
|
3040
2912
|
|
|
2913
|
+
const catRadioCss = ":host{display:flex;margin-bottom:1rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;cursor:pointer}.radio{display:flex;position:relative}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 32, 127, 138));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid #d7dbe0;border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 32, 127, 138))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.is-disabled input{background-color:#f8f8fb}.is-disabled input:checked{border-color:#d7dbe0}.is-disabled .circle{background-color:#d7dbe0}";
|
|
2914
|
+
|
|
2915
|
+
let nextUniqueId$3 = 0;
|
|
2916
|
+
const CatRadio = class {
|
|
2917
|
+
constructor(hostRef) {
|
|
2918
|
+
index.registerInstance(this, hostRef);
|
|
2919
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
2920
|
+
this.catFocus = index.createEvent(this, "catFocus", 7);
|
|
2921
|
+
this.catBlur = index.createEvent(this, "catBlur", 7);
|
|
2922
|
+
this.id = `cat-radio-${++nextUniqueId$3}`;
|
|
2923
|
+
/**
|
|
2924
|
+
* Whether this radio is checked.
|
|
2925
|
+
*/
|
|
2926
|
+
this.checked = false;
|
|
2927
|
+
/**
|
|
2928
|
+
* Whether this radio is disabled.
|
|
2929
|
+
*/
|
|
2930
|
+
this.disabled = false;
|
|
2931
|
+
/**
|
|
2932
|
+
* The label of the radio that is visible.
|
|
2933
|
+
*/
|
|
2934
|
+
this.label = '';
|
|
2935
|
+
/**
|
|
2936
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
2937
|
+
*/
|
|
2938
|
+
this.labelHidden = false;
|
|
2939
|
+
/**
|
|
2940
|
+
* Whether the radio is required.
|
|
2941
|
+
*/
|
|
2942
|
+
this.required = false;
|
|
2943
|
+
}
|
|
2944
|
+
componentWillRender() {
|
|
2945
|
+
if (!this.label) {
|
|
2946
|
+
catIconRegistry.loglevel.error('[A11y] Missing ARIA label on radio', this);
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
/**
|
|
2950
|
+
* Sets focus on the radio. Use this method instead of `radio.focus()`.
|
|
2951
|
+
*
|
|
2952
|
+
* @param options An optional object providing options to control aspects of
|
|
2953
|
+
* the focusing process.
|
|
2954
|
+
*/
|
|
2955
|
+
async setFocus(options) {
|
|
2956
|
+
this.input.focus(options);
|
|
2957
|
+
}
|
|
2958
|
+
render() {
|
|
2959
|
+
return (index.h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, index.h("span", { class: "radio" }, index.h("input", { ref: el => (this.input = el), id: this.id, type: "radio", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onChange.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }), index.h("span", { class: "circle" })), index.h("span", { class: "label", part: "label" }, this.label)));
|
|
2960
|
+
}
|
|
2961
|
+
onChange(event) {
|
|
2962
|
+
this.catChange.emit(event);
|
|
2963
|
+
}
|
|
2964
|
+
onFocus(event) {
|
|
2965
|
+
this.catFocus.emit(event);
|
|
2966
|
+
}
|
|
2967
|
+
onBlur(event) {
|
|
2968
|
+
this.catBlur.emit(event);
|
|
2969
|
+
}
|
|
2970
|
+
};
|
|
2971
|
+
CatRadio.style = catRadioCss;
|
|
2972
|
+
|
|
3041
2973
|
function isFunction(value) {
|
|
3042
2974
|
return typeof value === 'function';
|
|
3043
2975
|
}
|
|
@@ -3736,7 +3668,7 @@ function popNumber(args, defaultValue) {
|
|
|
3736
3668
|
return typeof last(args) === 'number' ? args.pop() : defaultValue;
|
|
3737
3669
|
}
|
|
3738
3670
|
|
|
3739
|
-
|
|
3671
|
+
/*! *****************************************************************************
|
|
3740
3672
|
Copyright (c) Microsoft Corporation.
|
|
3741
3673
|
|
|
3742
3674
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -4366,11 +4298,10 @@ const CatScrollable = class {
|
|
|
4366
4298
|
(_b = this.scrollWrapperElement) === null || _b === void 0 ? void 0 : _b.classList.remove(name);
|
|
4367
4299
|
}
|
|
4368
4300
|
}
|
|
4369
|
-
get el() { return index.getElement(this); }
|
|
4370
4301
|
};
|
|
4371
4302
|
CatScrollable.style = catScrollableCss;
|
|
4372
4303
|
|
|
4373
|
-
const catSkeletonCss = ":host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]){margin-bottom:0.5rem}:host([variant=body]){margin-bottom:1rem}.
|
|
4304
|
+
const catSkeletonCss = ":host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]){margin-bottom:0.5rem}:host([variant=body]){margin-bottom:1rem}.skeleton{display:block;border-radius:0.25rem;background:var(--background)}.skeleton-circle{border-radius:10rem}.skeleton-xs.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-square,.skeleton-xs.skeleton-circle{width:var(--width, 1.5rem);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-head,.skeleton-xs.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xs.skeleton-head{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-xs.skeleton-body{height:calc(0.75rem - 4px);margin:calc((1rem - 0.75rem + 4px) * 0.5) 0}.skeleton-s.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2rem)}.skeleton-s.skeleton-square,.skeleton-s.skeleton-circle{width:var(--width, 2rem);height:var(--height, 2rem)}.skeleton-s.skeleton-head,.skeleton-s.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-s.skeleton-head{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-s.skeleton-body{height:calc(0.875rem - 4px);margin:calc((1rem - 0.875rem + 4px) * 0.5) 0}.skeleton-m.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2.5rem)}.skeleton-m.skeleton-square,.skeleton-m.skeleton-circle{width:var(--width, 2.5rem);height:var(--height, 2.5rem)}.skeleton-m.skeleton-head,.skeleton-m.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-m.skeleton-head{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-m.skeleton-body{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-l.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3rem)}.skeleton-l.skeleton-square,.skeleton-l.skeleton-circle{width:var(--width, 3rem);height:var(--height, 3rem)}.skeleton-l.skeleton-head,.skeleton-l.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-l.skeleton-head{height:calc(1.5rem - 4px);margin:calc((1.75rem - 1.5rem + 4px) * 0.5) 0}.skeleton-l.skeleton-body{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-square,.skeleton-xl.skeleton-circle{width:var(--width, 3.5rem);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-head,.skeleton-xl.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xl.skeleton-head{height:calc(1.75rem - 4px);margin:calc((2rem - 1.75rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-body{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-sheen{background:linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);background-size:300% 100%;animation:sheen var(--speed) ease-in-out infinite}.skeleton-pulse{position:relative;overflow:hidden}.skeleton-pulse::before{content:\"\";display:block;position:absolute;width:100%;height:100%;background-color:var(--highlight);animation:var(--speed) ease-in-out 0.5s infinite normal none running pulse;opacity:0}@keyframes sheen{0%{background-position:right}}@keyframes pulse{50%{opacity:1}}";
|
|
4374
4305
|
|
|
4375
4306
|
const CatSkeleton = class {
|
|
4376
4307
|
constructor(hostRef) {
|
|
@@ -4391,10 +4322,10 @@ const CatSkeleton = class {
|
|
|
4391
4322
|
}
|
|
4392
4323
|
render() {
|
|
4393
4324
|
return (index.h(index.Host, null, Array.from(Array(this.count)).map(() => (index.h("div", { style: this.style, class: {
|
|
4394
|
-
|
|
4395
|
-
[`
|
|
4396
|
-
[`
|
|
4397
|
-
[`
|
|
4325
|
+
skeleton: true,
|
|
4326
|
+
[`skeleton-${this.effect}`]: Boolean(this.effect),
|
|
4327
|
+
[`skeleton-${this.variant}`]: Boolean(this.variant),
|
|
4328
|
+
[`skeleton-${this.size}`]: Boolean(this.size)
|
|
4398
4329
|
} })))));
|
|
4399
4330
|
}
|
|
4400
4331
|
get count() {
|
|
@@ -4420,7 +4351,7 @@ const CatSkeleton = class {
|
|
|
4420
4351
|
};
|
|
4421
4352
|
CatSkeleton.style = catSkeletonCss;
|
|
4422
4353
|
|
|
4423
|
-
const catSpinnerCss = ":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:
|
|
4354
|
+
const catSpinnerCss = ":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;width:1em;height:1em}.spinner-xs svg{font-size:0.75rem}.spinner-s svg{font-size:1rem}.spinner-m svg{font-size:1.25rem}.spinner-l svg{font-size:1.5rem}.spinner-xl svg{font-size:1.75rem}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";
|
|
4424
4355
|
|
|
4425
4356
|
const CatSpinner = class {
|
|
4426
4357
|
constructor(hostRef) {
|
|
@@ -4432,19 +4363,290 @@ const CatSpinner = class {
|
|
|
4432
4363
|
}
|
|
4433
4364
|
render() {
|
|
4434
4365
|
return (index.h("span", { "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', class: {
|
|
4435
|
-
[`
|
|
4366
|
+
[`spinner-${this.size}`]: this.size !== 'inline'
|
|
4436
4367
|
} }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, index.h("circle", { cx: "24", cy: "24", r: "21.5" }))));
|
|
4437
4368
|
}
|
|
4438
4369
|
};
|
|
4439
4370
|
CatSpinner.style = catSpinnerCss;
|
|
4440
4371
|
|
|
4372
|
+
var e,t,n="function"==typeof Map?new Map:(e=[],t=[],{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,o){-1===e.indexOf(n)&&(e.push(n),t.push(o));},delete:function(n){var o=e.indexOf(n);o>-1&&(e.splice(o,1),t.splice(o,1));}}),o=function(e){return new Event(e,{bubbles:!0})};try{new Event("test");}catch(e){o=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t};}function r(e){var t=n.get(e);t&&t.destroy();}function i(e){var t=n.get(e);t&&t.update();}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var t,r=null,i=null,l=null,d=function(){e.clientWidth!==i&&c();},a=function(t){window.removeEventListener("resize",d,!1),e.removeEventListener("input",c,!1),e.removeEventListener("keyup",c,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",c,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n];}),n.delete(e);}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",c,!1),window.addEventListener("resize",d,!1),e.addEventListener("input",c,!1),e.addEventListener("autosize:update",c,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:a,update:c}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),r="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(r)&&(r=0),c();}function u(t){var n=e.style.width;e.style.width="0px",e.style.width=n,e.style.overflowY=t;}function s(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+r+"px",i=e.clientWidth,t.forEach(function(e){e.node.scrollTop=e.scrollTop;}),n&&(document.documentElement.scrollTop=n);}}function c(){s();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(u("scroll"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==r){l=r;var i=o("autosize:resized");try{e.dispatchEvent(i);}catch(e){}}}}(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e});var d=l;
|
|
4373
|
+
|
|
4374
|
+
const catTextareaCss = ":host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;margin-bottom:1rem}:host([hidden]){display:none}label{display:block;align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}textarea{margin:0;padding:0.625rem 0.75rem;width:100%;min-height:2.5rem;font:inherit;background:white;border-radius:0.25rem;border:none;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear}textarea:disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));resize:none}textarea:hover:not(:disabled){box-shadow:0 0 0 2px #d7dbe0}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.input-hint{font-size:0.875rem;line-height:1rem;margin:0}";
|
|
4375
|
+
|
|
4376
|
+
let nextUniqueId$2 = 0;
|
|
4377
|
+
const CatTextarea = class {
|
|
4378
|
+
constructor(hostRef) {
|
|
4379
|
+
index.registerInstance(this, hostRef);
|
|
4380
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
4381
|
+
this.catFocus = index.createEvent(this, "catFocus", 7);
|
|
4382
|
+
this.catBlur = index.createEvent(this, "catBlur", 7);
|
|
4383
|
+
this.id = `cat-textarea-${nextUniqueId$2++}`;
|
|
4384
|
+
/**
|
|
4385
|
+
* Whether the textarea is disabled.
|
|
4386
|
+
*/
|
|
4387
|
+
this.disabled = false;
|
|
4388
|
+
/**
|
|
4389
|
+
* The label for the textarea.
|
|
4390
|
+
*/
|
|
4391
|
+
this.label = '';
|
|
4392
|
+
/**
|
|
4393
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
4394
|
+
*/
|
|
4395
|
+
this.labelHidden = false;
|
|
4396
|
+
/**
|
|
4397
|
+
* The name of the form control. Submitted with the form as part of a name/value pair.
|
|
4398
|
+
*/
|
|
4399
|
+
this.name = '';
|
|
4400
|
+
/**
|
|
4401
|
+
* The value is not editable.
|
|
4402
|
+
*/
|
|
4403
|
+
this.readonly = false;
|
|
4404
|
+
/**
|
|
4405
|
+
* A value is required or must be check for the form to be submittable.
|
|
4406
|
+
*/
|
|
4407
|
+
this.required = false;
|
|
4408
|
+
/**
|
|
4409
|
+
* Specifies the initial number of lines in the textarea.
|
|
4410
|
+
*/
|
|
4411
|
+
this.rows = 3;
|
|
4412
|
+
}
|
|
4413
|
+
componentWillRender() {
|
|
4414
|
+
if (!this.label) {
|
|
4415
|
+
catIconRegistry.loglevel.error('[A11y] Missing ARIA label on textarea', this);
|
|
4416
|
+
}
|
|
4417
|
+
}
|
|
4418
|
+
componentDidLoad() {
|
|
4419
|
+
d(this.textarea);
|
|
4420
|
+
}
|
|
4421
|
+
/**
|
|
4422
|
+
* Sets focus on the textarea. Use this method instead of `textarea.focus()`.
|
|
4423
|
+
*
|
|
4424
|
+
* @param options An optional object providing options to control aspects of
|
|
4425
|
+
* the focusing process.
|
|
4426
|
+
*/
|
|
4427
|
+
async setFocus(options) {
|
|
4428
|
+
this.textarea.focus(options);
|
|
4429
|
+
}
|
|
4430
|
+
// /**
|
|
4431
|
+
// * Clear the input.
|
|
4432
|
+
// */
|
|
4433
|
+
// @Method()
|
|
4434
|
+
// async clear(): Promise<void> {
|
|
4435
|
+
// this.inputValue = '';
|
|
4436
|
+
// }
|
|
4437
|
+
render() {
|
|
4438
|
+
return (index.h(index.Host, null, this.label && (index.h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, index.h("span", { part: "label" }, this.label, !this.required && (index.h("span", { class: "input-optional", "aria-hidden": "true" }, "(Optional)"))))), index.h("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) }), this.hint && index.h("p", { class: "input-hint" }, this.hint)));
|
|
4439
|
+
}
|
|
4440
|
+
onInput(event) {
|
|
4441
|
+
// this.inputValue = πthis.input.value;
|
|
4442
|
+
this.catChange.emit(event);
|
|
4443
|
+
}
|
|
4444
|
+
onFocus(event) {
|
|
4445
|
+
this.catFocus.emit(event);
|
|
4446
|
+
}
|
|
4447
|
+
onBlur(event) {
|
|
4448
|
+
this.catBlur.emit(event);
|
|
4449
|
+
}
|
|
4450
|
+
};
|
|
4451
|
+
CatTextarea.style = catTextareaCss;
|
|
4452
|
+
|
|
4453
|
+
const catToggleCss = ":host{display:flex;margin-bottom:1rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}input{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}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:#d7dbe0;transition:background-color 0.13s ease}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 32, 127, 138))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:\"\";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 0.13s linear;box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
|
|
4454
|
+
|
|
4455
|
+
let nextUniqueId$1 = 0;
|
|
4456
|
+
const CatToggle = class {
|
|
4457
|
+
constructor(hostRef) {
|
|
4458
|
+
index.registerInstance(this, hostRef);
|
|
4459
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
4460
|
+
this.catFocus = index.createEvent(this, "catFocus", 7);
|
|
4461
|
+
this.catBlur = index.createEvent(this, "catBlur", 7);
|
|
4462
|
+
this.id = `cat-toggle-${nextUniqueId$1++}`;
|
|
4463
|
+
/**
|
|
4464
|
+
* Checked state of the toggle.
|
|
4465
|
+
*/
|
|
4466
|
+
this.checked = false;
|
|
4467
|
+
/**
|
|
4468
|
+
* Disabled state of the toggle.
|
|
4469
|
+
*/
|
|
4470
|
+
this.disabled = false;
|
|
4471
|
+
/**
|
|
4472
|
+
* The label of the toggle that is visible.
|
|
4473
|
+
*/
|
|
4474
|
+
this.label = '';
|
|
4475
|
+
/**
|
|
4476
|
+
* Visually hide the label, but still show it to assistive technologies like screen readers.
|
|
4477
|
+
*/
|
|
4478
|
+
this.labelHidden = false;
|
|
4479
|
+
/**
|
|
4480
|
+
* Required state of the toggle
|
|
4481
|
+
*/
|
|
4482
|
+
this.required = false;
|
|
4483
|
+
}
|
|
4484
|
+
componentWillRender() {
|
|
4485
|
+
if (!this.label) {
|
|
4486
|
+
catIconRegistry.loglevel.error('[A11y] Missing ARIA label on toggle', this);
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
/**
|
|
4490
|
+
* Sets focus on the toggle. Use this method instead of `toggle.focus()`.
|
|
4491
|
+
*
|
|
4492
|
+
* @param options An optional object providing options to control aspects of
|
|
4493
|
+
* the focusing process.
|
|
4494
|
+
*/
|
|
4495
|
+
async setFocus(options) {
|
|
4496
|
+
this.input.focus(options);
|
|
4497
|
+
}
|
|
4498
|
+
render() {
|
|
4499
|
+
return (index.h("label", { htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled } }, index.h("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) }), index.h("span", { class: "toggle", part: "toggle" }), index.h("span", { class: "label", part: "label" }, this.label)));
|
|
4500
|
+
}
|
|
4501
|
+
onInput(event) {
|
|
4502
|
+
this.catChange.emit(event);
|
|
4503
|
+
}
|
|
4504
|
+
onFocus(event) {
|
|
4505
|
+
this.catFocus.emit(event);
|
|
4506
|
+
}
|
|
4507
|
+
onBlur(event) {
|
|
4508
|
+
this.catBlur.emit(event);
|
|
4509
|
+
}
|
|
4510
|
+
};
|
|
4511
|
+
CatToggle.style = catToggleCss;
|
|
4512
|
+
|
|
4513
|
+
const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
4514
|
+
|
|
4515
|
+
const catTooltipCss = ":host{display:contents}:host([hidden]){display:none}.tooltip{position:absolute;font-size:0.875rem;line-height:1rem;font-weight:500;padding:0.5rem 0.75rem;background-color:white;border-radius:0.25rem;color:black;white-space:nowrap;transition:all 0.25s linear 0s;visibility:hidden;opacity:0;box-shadow:rgba(0, 0, 0, 0.08) 0 1px 8px 0;border:1px solid #ebecf0;z-index:200}.tooltip-show{opacity:1;visibility:visible}.tooltip-trigger{display:inline-block}.tooltip-trigger:focus{outline:none}";
|
|
4516
|
+
|
|
4517
|
+
let nextUniqueId = 0;
|
|
4518
|
+
const CatTooltip = class {
|
|
4519
|
+
constructor(hostRef) {
|
|
4520
|
+
index.registerInstance(this, hostRef);
|
|
4521
|
+
this.id = `cat-tooltip-${nextUniqueId++}`;
|
|
4522
|
+
/**
|
|
4523
|
+
* The content of the tooltip.
|
|
4524
|
+
*/
|
|
4525
|
+
this.content = '';
|
|
4526
|
+
/**
|
|
4527
|
+
* Specifies that the tooltip should be disabled. A disabled tooltip is unusable,
|
|
4528
|
+
* and invisible. Corresponds with the native HTML disabled attribute.
|
|
4529
|
+
*/
|
|
4530
|
+
this.disabled = false;
|
|
4531
|
+
/**
|
|
4532
|
+
* The placement of the tooltip.
|
|
4533
|
+
*/
|
|
4534
|
+
this.placement = 'top';
|
|
4535
|
+
/**
|
|
4536
|
+
* The delay time for showing tooltip in ms.
|
|
4537
|
+
*/
|
|
4538
|
+
this.showDelay = 500;
|
|
4539
|
+
/**
|
|
4540
|
+
* The delay time for hiding tooltip in ms.
|
|
4541
|
+
*/
|
|
4542
|
+
this.hideDelay = 0;
|
|
4543
|
+
/**
|
|
4544
|
+
* The duration of tap to show the tooltip.
|
|
4545
|
+
*/
|
|
4546
|
+
this.longTouchDuration = 1000;
|
|
4547
|
+
}
|
|
4548
|
+
handleKeyDown({ key }) {
|
|
4549
|
+
key === 'Escape' && this.hideListener();
|
|
4550
|
+
}
|
|
4551
|
+
componentDidLoad() {
|
|
4552
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4553
|
+
this.trigger = firstTabbable(this.triggerElement) || this.triggerElement;
|
|
4554
|
+
if (!this.isTabbable) {
|
|
4555
|
+
(_a = this.trigger) === null || _a === void 0 ? void 0 : _a.setAttribute('tabindex', '0');
|
|
4556
|
+
}
|
|
4557
|
+
if (this.trigger && this.tooltip) {
|
|
4558
|
+
autoUpdate(this.trigger, this.tooltip, () => this.update());
|
|
4559
|
+
}
|
|
4560
|
+
if (isTouchDevice) {
|
|
4561
|
+
(_b = this.trigger) === null || _b === void 0 ? void 0 : _b.addEventListener('touchstart', this.touchStartListener.bind(this));
|
|
4562
|
+
(_c = this.trigger) === null || _c === void 0 ? void 0 : _c.addEventListener('touchend', this.touchEndListener.bind(this));
|
|
4563
|
+
}
|
|
4564
|
+
else {
|
|
4565
|
+
(_d = this.trigger) === null || _d === void 0 ? void 0 : _d.addEventListener('focusin', this.showListener.bind(this));
|
|
4566
|
+
(_e = this.trigger) === null || _e === void 0 ? void 0 : _e.addEventListener('focusout', this.hideListener.bind(this));
|
|
4567
|
+
(_f = this.trigger) === null || _f === void 0 ? void 0 : _f.addEventListener('mouseenter', this.showListener.bind(this));
|
|
4568
|
+
(_g = this.trigger) === null || _g === void 0 ? void 0 : _g.addEventListener('mouseleave', this.hideListener.bind(this));
|
|
4569
|
+
}
|
|
4570
|
+
}
|
|
4571
|
+
disconnectedCallback() {
|
|
4572
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4573
|
+
if (isTouchDevice) {
|
|
4574
|
+
(_a = this.trigger) === null || _a === void 0 ? void 0 : _a.removeEventListener('touchstart', this.touchStartListener.bind(this));
|
|
4575
|
+
(_b = this.trigger) === null || _b === void 0 ? void 0 : _b.removeEventListener('touchend', this.touchEndListener.bind(this));
|
|
4576
|
+
}
|
|
4577
|
+
else {
|
|
4578
|
+
(_c = this.trigger) === null || _c === void 0 ? void 0 : _c.removeEventListener('mouseenter', this.showListener.bind(this));
|
|
4579
|
+
(_d = this.trigger) === null || _d === void 0 ? void 0 : _d.removeEventListener('mouseleave', this.hideListener.bind(this));
|
|
4580
|
+
(_e = this.trigger) === null || _e === void 0 ? void 0 : _e.removeEventListener('focusin', this.showListener.bind(this));
|
|
4581
|
+
(_f = this.trigger) === null || _f === void 0 ? void 0 : _f.removeEventListener('focusout', this.hideListener.bind(this));
|
|
4582
|
+
}
|
|
4583
|
+
}
|
|
4584
|
+
render() {
|
|
4585
|
+
return (index.h(index.Host, null, index.h("div", { ref: el => (this.triggerElement = el), "aria-describedby": this.id, class: "tooltip-trigger" }, index.h("slot", null)), this.content && !this.disabled && (index.h("div", { ref: el => (this.tooltip = el), id: this.id, class: "tooltip" }, this.content))));
|
|
4586
|
+
}
|
|
4587
|
+
get isTabbable() {
|
|
4588
|
+
return firstTabbable(this.trigger);
|
|
4589
|
+
}
|
|
4590
|
+
update() {
|
|
4591
|
+
if (this.trigger && this.tooltip) {
|
|
4592
|
+
computePosition(this.trigger, this.tooltip, {
|
|
4593
|
+
placement: this.placement,
|
|
4594
|
+
middleware: [offset(CatTooltip.OFFSET), flip()]
|
|
4595
|
+
}).then(({ x, y }) => {
|
|
4596
|
+
if (this.tooltip) {
|
|
4597
|
+
Object.assign(this.tooltip.style, {
|
|
4598
|
+
left: `${Math.max(0, x)}px`,
|
|
4599
|
+
top: `${y}px`
|
|
4600
|
+
});
|
|
4601
|
+
}
|
|
4602
|
+
});
|
|
4603
|
+
}
|
|
4604
|
+
}
|
|
4605
|
+
showListener() {
|
|
4606
|
+
window.clearTimeout(this.hideTimeout);
|
|
4607
|
+
this.showTimeout = window.setTimeout(() => {
|
|
4608
|
+
var _a, _b;
|
|
4609
|
+
(_a = this.trigger) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4610
|
+
(_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.classList.add('tooltip-show');
|
|
4611
|
+
}, this.showDelay);
|
|
4612
|
+
}
|
|
4613
|
+
hideListener() {
|
|
4614
|
+
window.clearTimeout(this.showTimeout);
|
|
4615
|
+
this.hideTimeout = window.setTimeout(() => {
|
|
4616
|
+
var _a, _b;
|
|
4617
|
+
(_a = this.trigger) === null || _a === void 0 ? void 0 : _a.blur();
|
|
4618
|
+
(_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.classList.remove('tooltip-show');
|
|
4619
|
+
}, this.hideDelay);
|
|
4620
|
+
}
|
|
4621
|
+
touchStartListener() {
|
|
4622
|
+
this.touchTimeout = window.setTimeout(() => {
|
|
4623
|
+
var _a;
|
|
4624
|
+
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.classList.add('tooltip-show');
|
|
4625
|
+
}, this.longTouchDuration);
|
|
4626
|
+
}
|
|
4627
|
+
touchEndListener() {
|
|
4628
|
+
var _a;
|
|
4629
|
+
window.clearTimeout(this.touchTimeout);
|
|
4630
|
+
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.classList.remove('tooltip-show');
|
|
4631
|
+
}
|
|
4632
|
+
};
|
|
4633
|
+
CatTooltip.OFFSET = 4;
|
|
4634
|
+
CatTooltip.style = catTooltipCss;
|
|
4635
|
+
|
|
4441
4636
|
exports.cat_alert = CatAlert;
|
|
4442
4637
|
exports.cat_badge = CatBadge;
|
|
4443
4638
|
exports.cat_button = CatButton;
|
|
4639
|
+
exports.cat_card = CatCard;
|
|
4640
|
+
exports.cat_checkbox = CatCheckbox;
|
|
4444
4641
|
exports.cat_icon = CatIcon;
|
|
4642
|
+
exports.cat_input = CatInput;
|
|
4445
4643
|
exports.cat_menu = CatMenu;
|
|
4644
|
+
exports.cat_radio = CatRadio;
|
|
4446
4645
|
exports.cat_scrollable = CatScrollable;
|
|
4447
4646
|
exports.cat_skeleton = CatSkeleton;
|
|
4448
4647
|
exports.cat_spinner = CatSpinner;
|
|
4648
|
+
exports.cat_textarea = CatTextarea;
|
|
4649
|
+
exports.cat_toggle = CatToggle;
|
|
4650
|
+
exports.cat_tooltip = CatTooltip;
|
|
4449
4651
|
|
|
4450
|
-
//# sourceMappingURL=cat-
|
|
4652
|
+
//# sourceMappingURL=cat-alert_15.cjs.entry.js.map
|