@haiilo/catalyst 0.2.0 → 0.2.3
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/app-globals-54573336.js +718 -0
- package/dist/catalyst/app-globals-54573336.js.map +1 -0
- package/dist/{components/cat-alert.js → catalyst/cat-alert.entry.js} +7 -26
- package/dist/catalyst/cat-alert.entry.js.map +1 -0
- package/dist/{components/cat-badge.js → catalyst/cat-badge.entry.js} +8 -31
- package/dist/catalyst/cat-badge.entry.js.map +1 -0
- package/dist/{components/cat-button.js → catalyst/cat-button.entry.js} +41 -59
- package/dist/catalyst/cat-button.entry.js.map +1 -0
- package/dist/{components/cat-icon-registry.js → catalyst/cat-icon-registry-59da2e37.js} +2 -0
- package/dist/catalyst/cat-icon-registry-59da2e37.js.map +1 -0
- package/dist/{components/cat-icon2.js → catalyst/cat-icon.entry.js} +9 -27
- package/dist/catalyst/cat-icon.entry.js.map +1 -0
- package/dist/catalyst/cat-input.entry.js +55 -0
- package/dist/catalyst/cat-input.entry.js.map +1 -0
- package/dist/{components/cat-menu.js → catalyst/cat-menu.entry.js} +636 -28
- package/dist/catalyst/cat-menu.entry.js.map +1 -0
- package/dist/catalyst/cat-scrollable.entry.js +4523 -0
- package/dist/catalyst/cat-scrollable.entry.js.map +1 -0
- package/dist/{components/cat-skeleton.js → catalyst/cat-skeleton.entry.js} +7 -29
- package/dist/catalyst/cat-skeleton.entry.js.map +1 -0
- package/dist/{components/cat-spinner2.js → catalyst/cat-spinner.entry.js} +8 -25
- package/dist/catalyst/cat-spinner.entry.js.map +1 -0
- package/dist/catalyst/catalyst.css +1959 -1
- package/dist/catalyst/catalyst.esm.js +132 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -0
- package/dist/catalyst/css-shim-e6dd2538.js +6 -0
- package/dist/catalyst/css-shim-e6dd2538.js.map +1 -0
- package/dist/catalyst/dom-7fc649b0.js +75 -0
- package/dist/catalyst/dom-7fc649b0.js.map +1 -0
- package/dist/catalyst/index-2df805aa.js +3059 -0
- package/dist/catalyst/index-2df805aa.js.map +1 -0
- package/dist/catalyst/index.esm.js +3 -0
- package/dist/catalyst/index.esm.js.map +1 -0
- package/dist/catalyst/shadow-css-4d56fa31.js +390 -0
- package/dist/catalyst/shadow-css-4d56fa31.js.map +1 -0
- package/dist/components/cat-input.d.ts +11 -0
- package/dist/components/cat-scrollable.d.ts +11 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/types/components/cat-input/cat-input.d.ts +70 -0
- package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +50 -0
- package/dist/types/components.d.ts +85 -0
- package/package.json +15 -12
- package/dist/catalyst/p-4c438c2d.entry.js +0 -11
- package/dist/catalyst/p-73ee291d.js +0 -1
- package/dist/catalyst/p-94273abf.js +0 -1
- package/dist/cjs/app-globals-a3b3cf88.js +0 -135
- package/dist/cjs/cat-alert_7.cjs.entry.js +0 -3115
- package/dist/cjs/cat-icon-registry-eeff9b7d.js +0 -1359
- package/dist/cjs/catalyst.cjs.js +0 -21
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -23
- package/dist/collection/collection-manifest.json +0 -19
- package/dist/collection/components/cat-alert/cat-alert.css +0 -57
- package/dist/collection/components/cat-alert/cat-alert.js +0 -49
- package/dist/collection/components/cat-badge/cat-badge.css +0 -154
- package/dist/collection/components/cat-badge/cat-badge.js +0 -141
- package/dist/collection/components/cat-button/cat-button.css +0 -319
- package/dist/collection/components/cat-button/cat-button.js +0 -590
- package/dist/collection/components/cat-icon/cat-icon-registry.js +0 -41
- package/dist/collection/components/cat-icon/cat-icon.css +0 -50
- package/dist/collection/components/cat-icon/cat-icon.js +0 -89
- package/dist/collection/components/cat-menu/cat-menu.css +0 -33
- package/dist/collection/components/cat-menu/cat-menu.js +0 -185
- package/dist/collection/components/cat-skeleton/cat-skeleton.css +0 -177
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +0 -130
- package/dist/collection/components/cat-spinner/cat-spinner.css +0 -63
- package/dist/collection/components/cat-spinner/cat-spinner.js +0 -64
- package/dist/collection/index.cdn.js +0 -21
- package/dist/collection/index.js +0 -1
- package/dist/collection/init.js +0 -8
- package/dist/collection/utils/breakpoints.js +0 -11
- package/dist/collection/utils/media-matcher.js +0 -54
- package/dist/collection/utils/platform.js +0 -49
- package/dist/collection/utils/utils.js +0 -3
- package/dist/components/cat-icon.js +0 -6
- package/dist/components/cat-spinner.js +0 -6
- package/dist/components/index.js +0 -134
- package/dist/esm/app-globals-fc0806a7.js +0 -133
- package/dist/esm/cat-alert_7.entry.js +0 -3105
- package/dist/esm/cat-icon-registry-d877de13.js +0 -1331
- package/dist/esm/catalyst.js +0 -19
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -19
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as registerInstance, h } from './index-2df805aa.js';
|
|
2
2
|
|
|
3
3
|
const catAlertCss = ":host{display:block;margin-bottom:1rem}:host([hidden]){display:none}.cat-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}.cat-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)}.cat-alert-secondary{--bg:105, 118, 135;--text:0, 0, 0;--border:105, 118, 135}.cat-alert-success{--bg:0, 132, 88;--text:0, 132, 88;--border:0, 132, 88}.cat-alert-warning{--bg:255, 206, 128;--text:159, 97, 0;--border:159, 97, 0}.cat-alert-danger{--bg:217, 52, 13;--text:217, 52, 13;--border:217, 52, 13}";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
constructor() {
|
|
7
|
-
|
|
8
|
-
this.__registerHost();
|
|
9
|
-
this.__attachShadow();
|
|
5
|
+
const CatAlert = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
10
8
|
/**
|
|
11
9
|
* The color palette of the alert.
|
|
12
10
|
*/
|
|
@@ -18,26 +16,9 @@ let CatAlert$1 = class extends HTMLElement {
|
|
|
18
16
|
[`cat-alert-${this.color}`]: Boolean(this.color)
|
|
19
17
|
} }, h("slot", null)));
|
|
20
18
|
}
|
|
21
|
-
static get style() { return catAlertCss; }
|
|
22
19
|
};
|
|
23
|
-
CatAlert
|
|
24
|
-
"color": [1]
|
|
25
|
-
}]);
|
|
26
|
-
function defineCustomElement$1() {
|
|
27
|
-
if (typeof customElements === "undefined") {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const components = ["cat-alert"];
|
|
31
|
-
components.forEach(tagName => { switch (tagName) {
|
|
32
|
-
case "cat-alert":
|
|
33
|
-
if (!customElements.get(tagName)) {
|
|
34
|
-
customElements.define(tagName, CatAlert$1);
|
|
35
|
-
}
|
|
36
|
-
break;
|
|
37
|
-
} });
|
|
38
|
-
}
|
|
20
|
+
CatAlert.style = catAlertCss;
|
|
39
21
|
|
|
40
|
-
|
|
41
|
-
const defineCustomElement = defineCustomElement$1;
|
|
22
|
+
export { CatAlert as cat_alert };
|
|
42
23
|
|
|
43
|
-
|
|
24
|
+
//# sourceMappingURL=cat-alert.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-alert.entry.esm.js","mappings":";;AAAA,MAAM,WAAW,GAAG,6vBAA6vB;;MCYpwB,QAAQ;EALrB;;;;;IASU,UAAK,GAA+D,SAAS,CAAC;GAevF;EAbC,MAAM;IACJ,QACE,WACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,WAAW,EAAE,IAAI;QACjB,CAAC,aAAa,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;OACjD,IAED,eAAa,CACT,EACN;GACH;;;;;;","names":[],"sources":["./src/components/cat-alert/cat-alert.scss?tag=cat-alert&encapsulation=shadow","./src/components/cat-alert/cat-alert.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n margin-bottom: $cat-body-margin-bottom;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.cat-alert {\n font: inherit;\n color: cat-token-wrap(var(--text));\n background-color: cat-token-wrap(var(--bg), $alpha: 0.1);\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--border), $alpha: 0.2);\n border-radius: cat-border-radius('m');\n padding: cat-size('xs') * 0.5 cat-size('s') * 0.5;\n width: 100%;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n// ----- theme\n\n@mixin theme($theme) {\n .cat-alert-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --border: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --border: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Alerts are used to display important messages inline.\n *\n * @part alert - The content of the alert.\n */\n@Component({\n tag: 'cat-alert',\n styleUrl: 'cat-alert.scss',\n shadow: true\n})\nexport class CatAlert {\n /**\n * The color palette of the alert.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n render() {\n return (\n <div\n part=\"alert\"\n class={{\n 'cat-alert': true,\n [`cat-alert-${this.color}`]: Boolean(this.color)\n }}\n >\n <slot></slot>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as registerInstance, h } from './index-2df805aa.js';
|
|
2
2
|
|
|
3
|
-
const catBadgeCss = ":host{display:inline-flex;max-width:100%;vertical-align:baseline}:host([hidden]){display:none}.cat-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}.cat-badge slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-badge-round{border-radius:10rem}.cat-badge-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-badge-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}.cat-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)}.cat-badge-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--border:105, 118, 135}.cat-badge-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--border:0, 132, 88}.cat-badge-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--border:159, 97, 0}.cat-badge-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--border:217, 52, 13}.cat-badge-xs{height:0.75rem;min-width:0.75rem;font-size:0.75rem;padding:0 0.1875rem}.cat-badge-s{height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}.cat-badge-m{height:1.25rem;min-width:1.25rem;font-size:0.75rem;padding:0 0.3125rem}.cat-badge-l{height:1.5rem;min-width:1.5rem;font-size:0.875rem;padding:0 0.375rem}.cat-badge-xl{height:1.75rem;min-width:1.75rem;font-size:0.9375rem;padding:0 0.4375rem}.cat-badge-pulse.cat-badge-filled{animation:1.5s ease 0s infinite normal none running pulse}.cat-badge-pulse.cat-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
|
|
3
|
+
const catBadgeCss = ":host{display:inline-flex;max-width:100%;vertical-align:baseline}:host([hidden]){display:none}.cat-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}.cat-badge slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-badge-round{border-radius:10rem}.cat-badge-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-badge-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}.cat-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)}.cat-badge-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--border:105, 118, 135}.cat-badge-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--border:0, 132, 88}.cat-badge-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--border:159, 97, 0}.cat-badge-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--border:217, 52, 13}.cat-badge-xs{height:0.75rem;min-width:0.75rem;font-size:0.75rem;padding:0 0.1875rem}.cat-badge-s{height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}.cat-badge-m{height:1.25rem;min-width:1.25rem;font-size:0.75rem;padding:0 0.3125rem}.cat-badge-l{height:1.5rem;min-width:1.5rem;font-size:0.875rem;padding:0 0.375rem}.cat-badge-xl{height:1.75rem;min-width:1.75rem;font-size:0.9375rem;padding:0 0.4375rem}.cat-badge-pulse.cat-badge-filled{animation:1.5s ease 0s infinite normal none running pulse}.cat-badge-pulse.cat-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)}}";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
constructor() {
|
|
7
|
-
|
|
8
|
-
this.__registerHost();
|
|
9
|
-
this.__attachShadow();
|
|
5
|
+
const CatBadge = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
10
8
|
/**
|
|
11
9
|
* The rendering style of the badge.
|
|
12
10
|
*/
|
|
@@ -38,30 +36,9 @@ let CatBadge$1 = class extends HTMLElement {
|
|
|
38
36
|
[`cat-badge-${this.size}`]: Boolean(this.size)
|
|
39
37
|
} }, h("slot", null)));
|
|
40
38
|
}
|
|
41
|
-
static get style() { return catBadgeCss; }
|
|
42
39
|
};
|
|
43
|
-
CatBadge
|
|
44
|
-
"variant": [1],
|
|
45
|
-
"color": [1],
|
|
46
|
-
"size": [1],
|
|
47
|
-
"round": [4],
|
|
48
|
-
"pulse": [4]
|
|
49
|
-
}]);
|
|
50
|
-
function defineCustomElement$1() {
|
|
51
|
-
if (typeof customElements === "undefined") {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
const components = ["cat-badge"];
|
|
55
|
-
components.forEach(tagName => { switch (tagName) {
|
|
56
|
-
case "cat-badge":
|
|
57
|
-
if (!customElements.get(tagName)) {
|
|
58
|
-
customElements.define(tagName, CatBadge$1);
|
|
59
|
-
}
|
|
60
|
-
break;
|
|
61
|
-
} });
|
|
62
|
-
}
|
|
40
|
+
CatBadge.style = catBadgeCss;
|
|
63
41
|
|
|
64
|
-
|
|
65
|
-
const defineCustomElement = defineCustomElement$1;
|
|
42
|
+
export { CatBadge as cat_badge };
|
|
66
43
|
|
|
67
|
-
|
|
44
|
+
//# sourceMappingURL=cat-badge.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-badge.entry.esm.js","mappings":";;AAAA,MAAM,WAAW,GAAG,2vEAA2vE;;MCYlwE,QAAQ;EALrB;;;;;IASU,YAAO,GAA0B,QAAQ,CAAC;;;;IAK1C,UAAK,GAA+D,SAAS,CAAC;;;;IAK9E,SAAI,GAAkC,GAAG,CAAC;;;;IAK1C,UAAK,GAAG,KAAK,CAAC;;;;IAKd,UAAK,GAAG,KAAK,CAAC;GAmBvB;EAjBC,MAAM;IACJ,QACE,YACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,WAAW,EAAE,IAAI;QACjB,iBAAiB,EAAE,IAAI,CAAC,KAAK;QAC7B,iBAAiB,EAAE,IAAI,CAAC,KAAK;QAC7B,CAAC,aAAa,IAAI,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QACpD,CAAC,aAAa,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAChD,CAAC,aAAa,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;OAC/C,IAED,eAAa,CACR,EACP;GACH;;;;;;","names":[],"sources":["./src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","./src/components/cat-badge/cat-badge.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.cat-badge {\n font: inherit;\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('s');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n line-height: 1;\n white-space: nowrap;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n.cat-badge-round {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n.cat-badge-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--border), $alpha: 0.2);\n\n.cat-badge-outlined {\n background-color: cat-token('color.ui.background.body');\n box-shadow: $-outline;\n color: cat-token-wrap(var(--text));\n}\n\n@mixin theme($theme) {\n .cat-badge-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --border: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --border: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .cat-badge-#{$size} {\n height: cat-size($size) * 0.5;\n min-width: cat-size($size) * 0.5;\n font-size: cat-body-font-size($fontSize);\n padding: 0 cat-size($size) * 0.125;\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 'xs');\n@include size('m', 'xs');\n@include size('l', 's');\n@include size('xl', 'm');\n\n// ----- pulse\n\n$-pulse-0: 0 0 0 0 cat-token-wrap(var(--bg));\n$-pulse-70: transparent 0 0 0 0.5rem;\n$-pulse-100: transparent 0 0 0 0;\n\n.cat-badge-pulse {\n &.cat-badge-filled {\n animation: 1.5s ease 0s infinite normal none running pulse;\n }\n\n &.cat-badge-outlined {\n animation: 1.5s ease 0s infinite normal none running pulse-outlined;\n }\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: $-pulse-0;\n }\n\n 70% {\n box-shadow: $-pulse-70;\n }\n\n 100% {\n box-shadow: $-pulse-100;\n }\n}\n\n@keyframes pulse-outlined {\n 0% {\n box-shadow: $-pulse-0, $-outline;\n }\n\n 70% {\n box-shadow: $-pulse-70, $-outline;\n }\n\n 100% {\n box-shadow: $-pulse-100, $-outline;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to draw attention and display statuses or counts.\n *\n * @part badge - The content of the badge.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n /**\n * The rendering style of the badge.\n */\n @Prop() variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop() round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop() pulse = false;\n\n render() {\n return (\n <span\n part=\"badge\"\n class={{\n 'cat-badge': true,\n 'cat-badge-round': this.round,\n 'cat-badge-pulse': this.pulse,\n [`cat-badge-${this.variant}`]: Boolean(this.variant),\n [`cat-badge-${this.color}`]: Boolean(this.color),\n [`cat-badge-${this.size}`]: Boolean(this.size)\n }}\n >\n <slot></slot>\n </span>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,19 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as defineCustomElement$3 } from './cat-icon2.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './cat-spinner2.js';
|
|
1
|
+
import { r as registerInstance, e as createEvent, h } from './index-2df805aa.js';
|
|
4
2
|
|
|
5
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
4
|
|
|
5
|
+
function getDefaultExportFromCjs (x) {
|
|
6
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
7
|
+
}
|
|
8
|
+
|
|
7
9
|
function createCommonjsModule(fn, basedir, module) {
|
|
8
10
|
return module = {
|
|
9
11
|
path: basedir,
|
|
10
12
|
exports: {},
|
|
11
13
|
require: function (path, base) {
|
|
12
|
-
return commonjsRequire();
|
|
14
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
13
15
|
}
|
|
14
16
|
}, fn(module, module.exports), module.exports;
|
|
15
17
|
}
|
|
16
18
|
|
|
19
|
+
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
20
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
24
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function getAugmentedNamespace(n) {
|
|
28
|
+
if (n.__esModule) return n;
|
|
29
|
+
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
30
|
+
Object.keys(n).forEach(function (k) {
|
|
31
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
32
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return n[k];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
return a;
|
|
40
|
+
}
|
|
41
|
+
|
|
17
42
|
function commonjsRequire () {
|
|
18
43
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
19
44
|
}
|
|
@@ -26,12 +51,16 @@ var loglevel = createCommonjsModule(function (module) {
|
|
|
26
51
|
* Licensed under the MIT license.
|
|
27
52
|
*/
|
|
28
53
|
(function (root, definition) {
|
|
29
|
-
|
|
54
|
+
"use strict";
|
|
55
|
+
if (typeof undefined === 'function' && undefined.amd) {
|
|
56
|
+
undefined(definition);
|
|
57
|
+
} else if ('object' === 'object' && module.exports) {
|
|
30
58
|
module.exports = definition();
|
|
31
59
|
} else {
|
|
32
60
|
root.log = definition();
|
|
33
61
|
}
|
|
34
62
|
}(commonjsGlobal, function () {
|
|
63
|
+
"use strict";
|
|
35
64
|
|
|
36
65
|
// Slightly dubious tricks to cut down minimized file size
|
|
37
66
|
var noop = function() {};
|
|
@@ -429,13 +458,11 @@ function createEmptyStyleRule(query) {
|
|
|
429
458
|
}
|
|
430
459
|
}
|
|
431
460
|
|
|
432
|
-
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}
|
|
461
|
+
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 #0071ff;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}:host-context(nav){width:100%}:host-context(nav) .cat-button{box-shadow:none;border-radius:0}:host-context(nav) .cat-button:focus-visible{outline-offset:-2px}:host-context(nav) .cat-button-content{text-align:left}:host([hidden]){display:none}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}";
|
|
433
462
|
|
|
434
|
-
|
|
435
|
-
constructor() {
|
|
436
|
-
|
|
437
|
-
this.__registerHost();
|
|
438
|
-
this.__attachShadow();
|
|
463
|
+
const CatButton = class {
|
|
464
|
+
constructor(hostRef) {
|
|
465
|
+
registerInstance(this, hostRef);
|
|
439
466
|
this.catClick = createEvent(this, "catClick", 7);
|
|
440
467
|
this.catFocus = createEvent(this, "catFocus", 7);
|
|
441
468
|
this.catBlur = createEvent(this, "catBlur", 7);
|
|
@@ -600,54 +627,9 @@ let CatButton$1 = class extends HTMLElement {
|
|
|
600
627
|
static get watchers() { return {
|
|
601
628
|
"iconOnly": ["onIconOnlyChanged"]
|
|
602
629
|
}; }
|
|
603
|
-
static get style() { return catButtonCss; }
|
|
604
630
|
};
|
|
605
|
-
CatButton
|
|
606
|
-
"variant": [1],
|
|
607
|
-
"color": [1],
|
|
608
|
-
"size": [1],
|
|
609
|
-
"name": [1],
|
|
610
|
-
"value": [1],
|
|
611
|
-
"disabled": [4],
|
|
612
|
-
"loading": [4],
|
|
613
|
-
"submit": [4],
|
|
614
|
-
"ellipsed": [4],
|
|
615
|
-
"round": [4],
|
|
616
|
-
"url": [1],
|
|
617
|
-
"urlTarget": [1, "url-target"],
|
|
618
|
-
"icon": [1],
|
|
619
|
-
"iconOnly": [8, "icon-only"],
|
|
620
|
-
"iconSuffix": [4, "icon-suffix"],
|
|
621
|
-
"buttonId": [1, "button-id"],
|
|
622
|
-
"a11yLabel": [1, "a11y-label"],
|
|
623
|
-
"_iconOnly": [32],
|
|
624
|
-
"setFocus": [64]
|
|
625
|
-
}, [[0, "click", "haltDisabledEvents"]]]);
|
|
626
|
-
function defineCustomElement$1() {
|
|
627
|
-
if (typeof customElements === "undefined") {
|
|
628
|
-
return;
|
|
629
|
-
}
|
|
630
|
-
const components = ["cat-button", "cat-icon", "cat-spinner"];
|
|
631
|
-
components.forEach(tagName => { switch (tagName) {
|
|
632
|
-
case "cat-button":
|
|
633
|
-
if (!customElements.get(tagName)) {
|
|
634
|
-
customElements.define(tagName, CatButton$1);
|
|
635
|
-
}
|
|
636
|
-
break;
|
|
637
|
-
case "cat-icon":
|
|
638
|
-
if (!customElements.get(tagName)) {
|
|
639
|
-
defineCustomElement$3();
|
|
640
|
-
}
|
|
641
|
-
break;
|
|
642
|
-
case "cat-spinner":
|
|
643
|
-
if (!customElements.get(tagName)) {
|
|
644
|
-
defineCustomElement$2();
|
|
645
|
-
}
|
|
646
|
-
break;
|
|
647
|
-
} });
|
|
648
|
-
}
|
|
631
|
+
CatButton.style = catButtonCss;
|
|
649
632
|
|
|
650
|
-
|
|
651
|
-
const defineCustomElement = defineCustomElement$1;
|
|
633
|
+
export { CatButton as cat_button };
|
|
652
634
|
|
|
653
|
-
|
|
635
|
+
//# sourceMappingURL=cat-button.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-button.entry.esm.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;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,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,QAAQ,GAAY,IACjG,IAAI;MACR,IAAI,CAAC,YAAY,IACf,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAa,KAE3D,YAAM,KAAK,EAAC,oBAAoB,EAAC,IAAI,EAAC,SAAS,IAC7C,eAAa,CACR,CACR;MACD,IAAI,CAAC,aAAa,IAChB,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,QAAQ,GAAY,IACjG,IAAI;MACR,IAAI,CAAC,OAAO,GAAG,mBAAa,IAAI,EAAE,IAAI,CAAC,WAAW,GAAgB,GAAG,IAAI;KAC1E,CAAC;GACH;EAEO,OAAO,CAAC,KAAiB;IAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC3B;EAEO,OAAO,CAAC,KAAiB;IAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC3B;EAEO,MAAM,CAAC,KAAiB;IAC9B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAC1B;;;;;;;;;","names":["define","this","log"],"sources":["./node_modules/loglevel/lib/loglevel.js","./src/utils/breakpoints.ts","./src/utils/platform.ts","./src/utils/media-matcher.ts","./src/components/cat-button/cat-button.scss?tag=cat-button&encapsulation=shadow","./src/components/cat-button/cat-button.tsx"],"sourcesContent":["/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","const _breakpoints = ['xs', 's', 'm', 'l', 'xl'] as const;\n\nexport type Breakpoint = typeof _breakpoints[number];\n\nexport const Breakpoints: { [breakpoint in Breakpoint]: string } = {\n xs: '(max-width: 539.98px)',\n s: '(max-width: 767.98px)',\n m: '(max-width: 991.98px)',\n l: '(max-width: 1199.98px)',\n xl: '(max-width: 1399.98px)'\n};\n\nexport function isBreakpoint(value: unknown): value is Breakpoint {\n return typeof value === 'string' && _breakpoints.includes(value as Breakpoint);\n}\n","// https://github.com/angular/components/blob/master/src/cdk/platform/platform.ts\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\nexport class Platform {\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !!((window as any).chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n","import log from 'loglevel';\nimport { Platform } from './platform';\n\n// https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set<string> = new Set<string>();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\nexport class MediaMatcher {\n private _platform;\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor() {\n this._platform = new Platform();\n this._matchMedia = window.matchMedia.bind(window);\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n log.error(e);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n.cat-button {\n font: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n cursor: pointer;\n transition: color cat-token('time.transition.s') linear, border-color cat-token('time.transition.s') linear,\n background-color cat-token('time.transition.s') linear, box-shadow cat-token('time.transition.s') linear;\n\n &:focus-visible {\n outline: $cat-focus-outline;\n outline-offset: 1px;\n }\n}\n\n// ----- content\n\n.cat-button-content {\n // flex: 1 1 auto;\n // text-align: center;\n\n .cat-button-ellipsed & {\n @include cat-ellipsis;\n }\n}\n\n// ----- disabled\n\n.cat-button-disabled {\n @include cat-disabled;\n}\n\n// ----- round\n\n.cat-button-round {\n border-radius: 10rem;\n}\n\n// ----- loading\n\n.cat-button-loading {\n cursor: default;\n\n cat-spinner {\n position: absolute;\n }\n\n > *:not(cat-spinner) {\n visibility: hidden;\n }\n}\n\n// ----- theme\n\n.cat-button-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n.cat-button-outlined {\n background-color: cat-token('color.ui.background.body');\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--base), $alpha: 0.2);\n color: cat-token-wrap(var(--text));\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.05);\n }\n\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n}\n\n.cat-button-text {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n text-decoration: $cat-link-text-decoration;\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: $cat-link-text-decoration-hover;\n }\n}\n\n@mixin theme($theme) {\n .cat-button-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --base: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --base: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgHover', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textHover', $wrap: false)};\n }\n\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgActive', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textActive', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize, $padding) {\n $-line-height: cat-body-line-height($fontSize);\n $-total-height: cat-size($size);\n\n .cat-button-#{$size} {\n min-width: cat-size($size);\n padding: ($-total-height - $-line-height) * 0.5 $padding;\n @include cat-body($fontSize);\n\n .cat-button-prefix {\n margin-right: 0.25rem;\n }\n\n .cat-button-suffix {\n margin-left: 0.25rem;\n }\n\n // normalize icon size for line height\n @if $fontSize == 'm' {\n cat-icon {\n margin-top: -0.125rem;\n margin-bottom: -0.125rem;\n }\n }\n\n &.cat-button-icon {\n width: $-total-height;\n padding-left: 0;\n padding-right: 0;\n }\n\n :host-context(nav) & {\n padding-left: $cat-nav-padding-horizontal;\n padding-right: $cat-nav-padding-horizontal;\n }\n }\n}\n\n@include size('xs', 's', 0.25rem);\n@include size('s', 'm', 0.5rem);\n@include size('m', 'm', 0.75rem);\n@include size('l', 'm', 1rem);\n@include size('xl', 'l', 1.25rem);\n\n// ----- context\n\n:host-context(nav) {\n width: 100%;\n\n .cat-button {\n box-shadow: none;\n border-radius: 0;\n\n &:focus-visible {\n outline-offset: -2px;\n }\n }\n\n .cat-button-content {\n text-align: left;\n }\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host(.cat-text-left) .cat-button {\n justify-content: left;\n}\n\n:host(.cat-text-right) .cat-button {\n justify-content: right;\n}\n","import { Component, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport { Breakpoint, Breakpoints, isBreakpoint } from '../../utils/breakpoints';\nimport { MediaMatcher } from '../../utils/media-matcher';\n\n/**\n * Buttons are used for interface actions.\n *\n * @part button - The native anchor or button element.\n * @part content - The textual content of the button.\n * @part prefix - The prefix icon.\n * @part suffix - The suffix icon.\n */\n@Component({\n tag: 'cat-button',\n styleUrl: 'cat-button.scss',\n shadow: true\n})\nexport class CatButton {\n private button!: HTMLButtonElement | HTMLAnchorElement;\n private mediaMatcher?: MediaMatcher;\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n @State() _iconOnly = true;\n\n /**\n * The rendering style of the button.\n */\n @Prop() variant: 'filled' | 'outlined' | 'text' = 'outlined';\n\n /**\n * The color palette of the button.\n */\n @Prop() color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'secondary';\n\n /**\n * The size of the button.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The name of the button, which gets paired with the button's value when\n * submitted as part of a form. Corresponds with the native HTML name\n * attribute.\n */\n @Prop() name?: string;\n\n /**\n * The value of the button, which gets paired with the button's name when\n * submitted as part of a form. Corresponds with the native HTML value\n * attribute.\n */\n @Prop() value?: string;\n\n /**\n * Specifies that the button should be disabled. A disabled button is unusable\n * and un-clickable. Corresponds with the native HTML disabled attribute.\n */\n @Prop() disabled = false;\n\n /**\n * Displays the button in a loading state with a spinner. Just like a disabled\n * button, an inactive button is unusable and un-clickable. However, it\n * retains the current focus state.\n */\n @Prop() loading = false;\n\n /**\n * Allows the button to submit a form.\n */\n @Prop() submit = false;\n\n /**\n * Ellipse overflowing button content.\n */\n @Prop() ellipsed = true;\n\n /**\n * Use round button edges.\n */\n @Prop() round = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n /**\n * The name of an icon to be displayed in the button.\n */\n @Prop() icon?: string;\n\n /**\n * Hide the actual button content and only display the icon.\n */\n @Prop() iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon as a suffix.\n */\n @Prop() iconSuffix = false;\n\n /**\n * Adds a unique identifier for the button. Please note that with this\n * particular component this ID is added inside the web component. If you need\n * an ID on the HTML element, use the regular `id` attribute instead.\n */\n @Prop() buttonId?: string;\n\n /**\n * Adds accessible label for the button that is only shown for screen\n * readers. Typically, this label text replaces the visible text on the\n * button for users who use assistive technology.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n @Watch('iconOnly')\n onIconOnlyChanged(value: boolean | Breakpoint): void {\n // teardown\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.mediaQueryList?.removeEventListener('change', this.mediaQueryListener!);\n this.mediaQueryList = undefined;\n this.mediaQueryListener = undefined;\n // setup\n if (isBreakpoint(value)) {\n this.mediaMatcher ??= new MediaMatcher();\n this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);\n this.mediaQueryListener = (event: MediaQueryListEvent) => (this._iconOnly = event.matches);\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n this._iconOnly = this.mediaQueryList.matches;\n } else {\n this._iconOnly = value;\n }\n }\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() catClick!: EventEmitter<MouseEvent>;\n\n /**\n * Emitted when the button received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the button loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentWillLoad(): void {\n this.onIconOnlyChanged(this.iconOnly);\n }\n\n componentWillRender(): void {\n if (this.isIconButton && !this.a11yLabel) {\n log.warn('[A11y] Missing ARIA label on icon button', this);\n }\n }\n\n @Listen('click')\n haltDisabledEvents(event: Event): void {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Sets focus on the button. Use this method instead of `button.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async setFocus(options?: FocusOptions): Promise<void> {\n this.button.focus(options);\n }\n\n render() {\n if (this.url) {\n return (\n <a\n ref={el => (this.button = el as HTMLAnchorElement)}\n href={this.disabled ? undefined : this.url}\n target={this.urlTarget}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': this.ellipsed && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n </a>\n );\n } else {\n return (\n <button\n ref={el => (this.button = el as HTMLButtonElement)}\n type={this.submit ? 'submit' : 'button'}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round ?? this.isIconButton,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': this.ellipsed && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n </button>\n );\n }\n }\n\n private get iconSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 's';\n default:\n return 'l';\n }\n }\n\n private get spinnerSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 'xs';\n default:\n return 'm';\n }\n }\n\n private get isIconButton() {\n return Boolean(this.icon) && this._iconOnly;\n }\n\n private get hasPrefixIcon() {\n return Boolean(this.icon) && !this._iconOnly && !this.iconSuffix;\n }\n\n private get hasSuffixIcon() {\n return Boolean(this.icon) && !this._iconOnly && this.iconSuffix;\n }\n\n private get content() {\n return [\n this.hasPrefixIcon ? (\n <cat-icon icon={this.icon} size={this.iconSize} class=\"cat-button-prefix\" part=\"prefix\"></cat-icon>\n ) : null,\n this.isIconButton ? (\n <cat-icon icon={this.icon} size={this.iconSize}></cat-icon>\n ) : (\n <span class=\"cat-button-content\" part=\"content\">\n <slot></slot>\n </span>\n ),\n this.hasSuffixIcon ? (\n <cat-icon icon={this.icon} size={this.iconSize} class=\"cat-button-suffix\" part=\"suffix\"></cat-icon>\n ) : null,\n this.loading ? <cat-spinner size={this.spinnerSize}></cat-spinner> : null\n ];\n }\n\n private onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-icon-registry-59da2e37.js","mappings":"MAAa,eAAe;EAK1B;IAFiB,UAAK,GAAwB,IAAI,GAAG,EAAE,CAAC;;GAIvD;EAED,OAAO,WAAW;IAChB,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE;MAC7B,eAAe,CAAC,QAAQ,GAAG,IAAI,eAAe,EAAE,CAAC;KAClD;IACD,OAAO,eAAe,CAAC,QAAQ,CAAC;GACjC;EAED,OAAO,CAAC,IAAY,EAAE,OAAgB;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;GACtD;EAED,OAAO,CAAC,IAAY,EAAE,IAAY,EAAE,OAAgB;IAClD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;IACpD,MAAM,CAAC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AAU;IAC5C,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE;MAC3B,OAAO,EAAE,IAAI;MACb,QAAQ,EAAE,IAAI;MACd,MAAM;KACP,CAAC,CAAC;GACJ;;;;;","names":[],"sources":["./src/components/cat-icon/cat-icon-registry.ts"],"sourcesContent":["export class CatIconRegistry {\n private static instance: CatIconRegistry;\n\n private readonly icons: Map<string, string> = new Map();\n\n private constructor() {\n // hide constructor\n }\n\n static getInstance(): CatIconRegistry {\n if (!CatIconRegistry.instance) {\n CatIconRegistry.instance = new CatIconRegistry();\n }\n return CatIconRegistry.instance;\n }\n\n getIcon(name: string, setName?: string): string | undefined {\n return this.icons.get(this.buildName(name, setName));\n }\n\n addIcon(name: string, data: string, setName?: string): void {\n this.icons.set(this.buildName(name, setName), data);\n window.dispatchEvent(this.buildEvent('cat-icon-added', { name, setName }));\n }\n\n addIcons(icons: { [name: string]: string }, setName?: string): void {\n Object.entries(icons).forEach(([name, data]) => this.icons.set(this.buildName(name, setName), data));\n window.dispatchEvent(this.buildEvent('cat-icons-added', { names: Object.keys(icons), setName }));\n }\n\n removeIcon(name: string, setName?: string): void {\n this.icons.delete(this.buildName(name, setName));\n window.dispatchEvent(this.buildEvent('cat-icon-removed', { name, setName }));\n }\n\n removeIcons(names: string[], setName?: string): void {\n names.forEach(name => this.icons.delete(this.buildName(name, setName)));\n window.dispatchEvent(this.buildEvent('cat-icons-removed', { names, setName }));\n }\n\n private buildName(name: string, setName?: string) {\n return setName ? `${setName}:name` : name;\n }\n\n private buildEvent<T>(name: string, detail?: T) {\n return new CustomEvent(name, {\n bubbles: true,\n composed: true,\n detail\n });\n }\n}\n"],"version":3}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as CatIconRegistry } from './cat-icon-registry.js';
|
|
1
|
+
import { r as registerInstance, h } from './index-2df805aa.js';
|
|
2
|
+
import { C as CatIconRegistry } from './cat-icon-registry-59da2e37.js';
|
|
3
3
|
|
|
4
4
|
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}.cat-icon-xs svg{font-size:0.75rem}.cat-icon-s svg{font-size:1rem}.cat-icon-m svg{font-size:1.25rem}.cat-icon-l svg{font-size:1.5rem}.cat-icon-xl svg{font-size:1.75rem}";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
constructor() {
|
|
8
|
-
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
6
|
+
const CatIcon = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
11
9
|
this.iconRegistry = CatIconRegistry.getInstance();
|
|
12
10
|
/**
|
|
13
11
|
* The name of the icon.
|
|
@@ -23,25 +21,9 @@ let CatIcon = class extends HTMLElement {
|
|
|
23
21
|
[`cat-icon-${this.size}`]: this.size !== 'inline'
|
|
24
22
|
} }));
|
|
25
23
|
}
|
|
26
|
-
static get style() { return catIconCss; }
|
|
27
24
|
};
|
|
28
|
-
CatIcon =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"a11yLabel": [1, "a11y-label"]
|
|
32
|
-
}]);
|
|
33
|
-
function defineCustomElement() {
|
|
34
|
-
if (typeof customElements === "undefined") {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const components = ["cat-icon"];
|
|
38
|
-
components.forEach(tagName => { switch (tagName) {
|
|
39
|
-
case "cat-icon":
|
|
40
|
-
if (!customElements.get(tagName)) {
|
|
41
|
-
customElements.define(tagName, CatIcon);
|
|
42
|
-
}
|
|
43
|
-
break;
|
|
44
|
-
} });
|
|
45
|
-
}
|
|
25
|
+
CatIcon.style = catIconCss;
|
|
26
|
+
|
|
27
|
+
export { CatIcon as cat_icon };
|
|
46
28
|
|
|
47
|
-
|
|
29
|
+
//# sourceMappingURL=cat-icon.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-icon.entry.esm.js","mappings":";;;AAAA,MAAM,UAAU,GAAG,saAAsa;;MCc5a,OAAO;EALpB;;IAMmB,iBAAY,GAAG,eAAe,CAAC,WAAW,EAAE,CAAC;;;;IAKtD,SAAI,GAAG,EAAE,CAAC;;;;IAKV,SAAI,GAA6C,GAAG,CAAC;GAqB9D;EAbC,MAAM;IACJ,QACE,YACE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gBACnC,IAAI,CAAC,SAAS,iBACb,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,MAAM,EAC3C,IAAI,EAAC,MAAM,EACX,KAAK,EAAE;QACL,CAAC,YAAY,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,KAAK,QAAQ;OAClD,GACK,EACR;GACH;;;;;;","names":[],"sources":["./src/components/cat-icon/cat-icon.scss?tag=cat-icon&encapsulation=shadow","./src/components/cat-icon/cat-icon.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-flex;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\nspan {\n display: inline-flex;\n}\n\nsvg {\n fill: currentColor;\n stroke: none;\n transform-origin: center center;\n width: 1em;\n height: 1em;\n}\n\n// ----- size\n\n@mixin size($size) {\n .cat-icon-#{$size} svg {\n font-size: cat-size($size) * 0.5;\n }\n}\n\n@include size('xs');\n@include size('s');\n@include size('m');\n@include size('l');\n@include size('xl');\n","import { Component, h, Prop } from '@stencil/core';\nimport { CatIconRegistry } from './cat-icon-registry';\n\n/**\n * Icons are used to provide additional meaning or in places where text label\n * doesn't fit.\n *\n * @part icon - The native span element wrapping the SVG icon.\n */\n@Component({\n tag: 'cat-icon',\n styleUrl: 'cat-icon.scss',\n shadow: true\n})\nexport class CatIcon {\n private readonly iconRegistry = CatIconRegistry.getInstance();\n\n /**\n * The name of the icon.\n */\n @Prop() icon = '';\n\n /**\n * The size of the icon.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline' = 'm';\n\n /**\n * Adds accessible label for the icon that is only shown for screen\n * readers. The `aria-hidden` attribute will be set if no label is present.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n <span\n innerHTML={this.iconRegistry.getIcon(this.icon)}\n aria-label={this.a11yLabel}\n aria-hidden={this.a11yLabel ? null : 'true'}\n part=\"icon\"\n class={{\n [`cat-icon-${this.size}`]: this.size !== 'inline'\n }}\n ></span>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { r as registerInstance, h, f as Host, g as getElement } from './index-2df805aa.js';
|
|
2
|
+
|
|
3
|
+
const catInputCss = ":host{display:inline-flex;flex-direction:column;font-size:0.9375rem;line-height:1.25rem}.cat-input-wrapper{display:flex;align-items:center;border:1px solid red;border-radius:0.25rem;background:white;overflow:hidden}label{display:block;margin:0 0 0.25rem}.cat-input-optional{font-size:0.875rem;line-height:1rem;color:rgb(var(--cat-font-color-muted, 105, 118, 135));margin-left:0.25rem}.cat-text-prefix,.cat-text-suffix{background:#ebecf0;color:rgb(var(--cat-font-color-muted, 105, 118, 135));padding:0.5rem;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.cat-icon-prefix,.cat-icon-suffix{margin:0.5rem}input{font:inherit;border:none;outline:none;background:none;margin:0;padding:0;flex:1 1 auto}.cat-input-hint{color:rgb(var(--cat-font-color-muted, 105, 118, 135));font-size:0.875rem;line-height:1rem;padding:0;margin:0.25rem 0 0}";
|
|
4
|
+
|
|
5
|
+
let nextUniqueId = 0;
|
|
6
|
+
const CatInput = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.id = `cat-input-${nextUniqueId++}`;
|
|
10
|
+
/**
|
|
11
|
+
* Hint for form autofill feature.
|
|
12
|
+
*/
|
|
13
|
+
this.autoComplete = 'on';
|
|
14
|
+
this.clearable = false;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the form control is disabled.
|
|
17
|
+
*/
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
/**
|
|
20
|
+
* Display the icon on the right.
|
|
21
|
+
*/
|
|
22
|
+
this.iconRight = false;
|
|
23
|
+
/**
|
|
24
|
+
* Name of the form control. Submitted with the form as part of a name/value pair.
|
|
25
|
+
*/
|
|
26
|
+
this.name = '';
|
|
27
|
+
/**
|
|
28
|
+
* The value is not editable.
|
|
29
|
+
*/
|
|
30
|
+
this.readonly = false;
|
|
31
|
+
/**
|
|
32
|
+
* A value is required or must be check for the form to be submittable.
|
|
33
|
+
*/
|
|
34
|
+
this.required = false;
|
|
35
|
+
/**
|
|
36
|
+
* Use round input edges.
|
|
37
|
+
*/
|
|
38
|
+
this.round = false;
|
|
39
|
+
/**
|
|
40
|
+
* Type of form control.
|
|
41
|
+
*/
|
|
42
|
+
this.type = 'text';
|
|
43
|
+
}
|
|
44
|
+
render() {
|
|
45
|
+
return (h(Host, null, h("div", null, h("label", { htmlFor: this.id }, "Do you like peas?Do you like peas?Do you like peas?", h("span", { class: "cat-input-optional" }, "Optional")), h("div", { class: "cat-input-wrapper", onClick: () => this.input.focus() }, this.textPrefix && h("span", { class: "cat-text-prefix" }, this.textPrefix), this.icon && !this.iconRight && h("cat-icon", { icon: this.icon, class: "cat-icon-prefix" }), h("input", { ref: el => (this.input = el), id: this.id, class: {
|
|
46
|
+
'cat-input-round': this.round
|
|
47
|
+
}, 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.value }), this.icon && this.iconRight && h("cat-icon", { icon: this.icon, class: "cat-icon-suffix" }), this.textSuffix && h("span", { class: "cat-text-suffix" }, this.textSuffix)), this.hint && h("p", { class: "cat-input-hint" }, this.hint))));
|
|
48
|
+
}
|
|
49
|
+
get host() { return getElement(this); }
|
|
50
|
+
};
|
|
51
|
+
CatInput.style = catInputCss;
|
|
52
|
+
|
|
53
|
+
export { CatInput as cat_input };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=cat-input.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cat-input.entry.esm.js","mappings":";;AAAA,MAAM,WAAW,GAAG,g1BAAg1B;;ACEp2B,IAAI,YAAY,GAAG,CAAC,CAAC;MAOR,QAAQ;EALrB;;IAMmB,OAAE,GAAG,aAAa,YAAY,EAAE,EAAE,CAAC;;;;IAQ5C,iBAAY,GAAG,IAAI,CAAC;IAEpB,cAAS,GAAG,KAAK,CAAC;;;;IAKlB,aAAQ,GAAG,KAAK,CAAC;;;;IAYhB,cAAS,GAAG,KAAK,CAAC;;;;IAyBjB,SAAI,GAAG,EAAE,CAAC;;;;IAaZ,aAAQ,GAAG,KAAK,CAAC;;;;IAKjB,aAAQ,GAAG,KAAK,CAAC;;;;IAKjB,UAAK,GAAG,KAAK,CAAC;;;;IAKd,SAAI,GAAwE,MAAM,CAAC;GA8C5F;EAvCC,MAAM;IACJ,QACE,EAAC,IAAI,QACH,eACA,aAAO,OAAO,EAAE,IAAI,CAAC,EAAE,2DAAqD,YAAM,KAAK,EAAC,oBAAoB,eAAgB,CAAQ,EACpI,WAAK,KAAK,EAAC,mBAAmB,EAC5B,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAElC,IAAI,CAAC,UAAU,IAAI,YAAM,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,UAAU,CAAQ,EACzE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,iBAAiB,GAAY,EAE/F,aACA,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,KAAK,GAAG,EAAsB,CAAC,EAC9C,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,KAAK,EAAE;QACL,iBAAiB,EAAE,IAAI,CAAC,KAAK;OAC9B,EACD,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,GACV,EAEhB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAC,iBAAiB,GAAY,EAC7F,IAAI,CAAC,UAAU,IAAI,YAAM,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,UAAU,CAAQ,CACpE,EACL,IAAI,CAAC,IAAI,IAAI,SAAG,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,IAAI,CAAK,CACzC,CACD,EACP;GACH;;;;;;;","names":[],"sources":["./src/components/cat-input/cat-input.scss?tag=cat-input&encapsulation=shadow","./src/components/cat-input/cat-input.tsx"],"sourcesContent":["@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: inline-flex;\n flex-direction: column;\n @include cat-body('m');\n}\n\n.cat-input-wrapper {\n display: flex;\n align-items: center;\n border: 1px solid red;\n border-radius: cat-border-radius('m');\n background: cat-token('color.ui.background.input');\n overflow: hidden;\n //padding: cat-size('s') * 0.25 cat-size('l') * 0.25;\n //column-gap: cat-size('s') * 0.25;\n}\n\n\nlabel {\n display: block;\n // color: cat-token('color.ui.font.muted');\n // @include cat-body('s');\n // padding: 0;\n margin: 0 0 0.25rem;\n}\n\n.cat-input-optional {\n @include cat-body('s');\n color: cat-token('color.ui.font.muted');\n margin-left: .25rem;\n}\n\n.cat-text-prefix,\n.cat-text-suffix {\n background: cat-token('color.ui.background.inputPrefix');\n color: cat-token('color.ui.font.muted');\n padding: cat-size('s') * 0.25;\n @include cat-select(none);\n}\n\n.cat-icon-prefix,\n.cat-icon-suffix {\n margin: .5rem;\n}\n\ninput {\n font: inherit;\n border: none;\n outline: none;\n background: none;\n margin: 0;\n padding: 0;\n flex: 1 1 auto;\n //padding: cat-size('s') * 0.25 cat-size('l') * 0.25;\n\n}\n\n.cat-input-hint {\n color: cat-token('color.ui.font.muted');\n @include cat-body('s');\n padding: 0;\n margin: 0.25rem 0 0;\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\n\nlet nextUniqueId = 0;\n\n@Component({\n tag: 'cat-input',\n styleUrl: 'cat-input.scss',\n shadow: true\n})\nexport class CatInput {\n private readonly id = `cat-input-${nextUniqueId++}`;\n private input!: HTMLInputElement;\n\n @Element() host!: HTMLElement;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete = 'on';\n\n @Prop() clearable = false;\n\n /**\n * Whether the form control is disabled.\n */\n @Prop() disabled = false;\n\n @Prop() hint?: string;\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * Maximum value for numeric values.\n */\n @Prop() max?: number;\n\n /**\n * Maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * Minimum value for numeric values.\n */\n @Prop() min?: number;\n\n /**\n * Minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * Name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name = '';\n\n /**\n * Text that appears in the form control when it has no value set\n */\n @Prop() placeholder?: string;\n\n @Prop() textPrefix?: string;\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Use round input edges.\n */\n @Prop() round = false;\n\n /**\n * Type of form control.\n */\n @Prop() type: \"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" = 'text';\n\n /**\n * The initial value of the control.\n */\n @Prop() value?: string | number;\n\n render() {\n return (\n <Host>\n <div>\n <label htmlFor={this.id}>Do you like peas?Do you like peas?Do you like peas?<span class=\"cat-input-optional\">Optional</span></label>\n <div class=\"cat-input-wrapper\"\n onClick={() => this.input.focus()}\n >\n {this.textPrefix && <span class=\"cat-text-prefix\">{this.textPrefix}</span>}\n {this.icon && !this.iconRight && <cat-icon icon={this.icon} class=\"cat-icon-prefix\"></cat-icon>}\n\n <input\n ref={el => (this.input = el as HTMLInputElement)}\n id={this.id}\n class={{\n 'cat-input-round': this.round\n }}\n autocomplete={this.autoComplete}\n disabled={this.disabled}\n max={this.max}\n maxlength={this.maxLength}\n min={this.max}\n minlength={this.minLength}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n type={this.type}\n value={this.value}\n ></input>\n\n{this.icon && this.iconRight && <cat-icon icon={this.icon} class=\"cat-icon-suffix\"></cat-icon>}\n{this.textSuffix && <span class=\"cat-text-suffix\">{this.textSuffix}</span>}\n</div>\n{this.hint && <p class=\"cat-input-hint\">{this.hint}</p>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|