@haiilo/catalyst 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.css +1 -1410
- package/dist/catalyst/catalyst.esm.js +1 -126
- package/dist/catalyst/index.esm.js +0 -1
- package/dist/catalyst/p-4c438c2d.entry.js +11 -0
- package/dist/catalyst/p-73ee291d.js +1 -0
- package/dist/catalyst/p-94273abf.js +1 -0
- package/dist/cjs/app-globals-a3b3cf88.js +135 -0
- package/dist/cjs/cat-alert_7.cjs.entry.js +3115 -0
- package/dist/cjs/cat-icon-registry-eeff9b7d.js +1359 -0
- package/dist/cjs/catalyst.cjs.js +21 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/cat-alert/cat-alert.css +57 -0
- package/dist/collection/components/cat-alert/cat-alert.js +49 -0
- package/dist/collection/components/cat-badge/cat-badge.css +154 -0
- package/dist/collection/components/cat-badge/cat-badge.js +141 -0
- package/dist/collection/components/cat-button/cat-button.css +319 -0
- package/dist/collection/components/cat-button/cat-button.js +590 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js +41 -0
- package/dist/collection/components/cat-icon/cat-icon.css +50 -0
- package/dist/collection/components/cat-icon/cat-icon.js +89 -0
- package/dist/collection/components/cat-menu/cat-menu.css +33 -0
- package/dist/collection/components/cat-menu/cat-menu.js +185 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.css +177 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +130 -0
- package/dist/collection/components/cat-spinner/cat-spinner.css +63 -0
- package/dist/collection/components/cat-spinner/cat-spinner.js +64 -0
- package/dist/collection/index.cdn.js +21 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/init.js +8 -0
- package/dist/collection/utils/breakpoints.js +11 -0
- package/dist/collection/utils/media-matcher.js +54 -0
- package/dist/collection/utils/platform.js +49 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/cat-alert.d.ts +11 -0
- package/dist/components/cat-alert.js +43 -0
- package/dist/components/cat-badge.d.ts +11 -0
- package/dist/components/cat-badge.js +67 -0
- package/dist/{catalyst/cat-button.entry.js → components/cat-button.js} +68 -44
- package/dist/{catalyst/cat-icon-registry-59da2e37.js → components/cat-icon-registry.js} +0 -0
- package/dist/components/cat-icon.js +6 -0
- package/dist/components/cat-icon2.js +47 -0
- package/dist/{catalyst/cat-menu.entry.js → components/cat-menu.js} +71 -650
- package/dist/components/cat-skeleton.d.ts +11 -0
- package/dist/components/cat-skeleton.js +77 -0
- package/dist/components/cat-spinner.js +6 -0
- package/dist/{catalyst/cat-spinner.entry.js → components/cat-spinner2.js} +25 -6
- package/dist/components/index.js +134 -0
- package/dist/esm/app-globals-fc0806a7.js +133 -0
- package/dist/esm/cat-alert_7.entry.js +3105 -0
- package/dist/esm/cat-icon-registry-d877de13.js +1331 -0
- package/dist/esm/catalyst.js +19 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/cat-alert/cat-alert.d.ts +12 -0
- package/dist/types/components/cat-badge/cat-badge.d.ts +28 -0
- package/dist/types/components/cat-button/cat-button.d.ts +5 -0
- package/dist/types/components/cat-menu/cat-menu.d.ts +13 -4
- package/dist/types/components/cat-skeleton/cat-skeleton.d.ts +28 -0
- package/dist/types/components.d.ts +129 -0
- package/package.json +1 -1
- package/dist/catalyst/app-globals-f83c9e4a.js +0 -722
- package/dist/catalyst/cat-icon.entry.js +0 -27
- package/dist/catalyst/css-shim-20dbffa5.js +0 -4
- package/dist/catalyst/dom-c5ed0ba5.js +0 -73
- package/dist/catalyst/index-45406d3b.js +0 -3031
- package/dist/catalyst/shadow-css-8c625855.js +0 -388
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const catIconRegistry = require('./cat-icon-registry-eeff9b7d.js');
|
|
4
|
+
const appGlobals = require('./app-globals-a3b3cf88.js');
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
Stencil Client Patch Browser v2.13.0 | MIT Licensed | https://stenciljs.com
|
|
8
|
+
*/
|
|
9
|
+
const patchBrowser = () => {
|
|
10
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('catalyst.cjs.js', document.baseURI).href));
|
|
11
|
+
const opts = {};
|
|
12
|
+
if (importMeta !== '') {
|
|
13
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
14
|
+
}
|
|
15
|
+
return catIconRegistry.promiseResolve(opts);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
patchBrowser().then(options => {
|
|
19
|
+
appGlobals.globalScripts();
|
|
20
|
+
return catIconRegistry.bootstrapLazy([["cat-alert_7.cjs",[[1,"cat-button",{"variant":[1],"color":[1],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"ellipsed":[4],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconSuffix":[4,"icon-suffix"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-alert",{"color":[1]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}]]]], options);
|
|
21
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const catIconRegistry = require('./cat-icon-registry-eeff9b7d.js');
|
|
6
|
+
const appGlobals = require('./app-globals-a3b3cf88.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
const patchEsm = () => {
|
|
12
|
+
return catIconRegistry.promiseResolve();
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const defineCustomElements = (win, options) => {
|
|
16
|
+
if (typeof window === 'undefined') return Promise.resolve();
|
|
17
|
+
return patchEsm().then(() => {
|
|
18
|
+
appGlobals.globalScripts();
|
|
19
|
+
return catIconRegistry.bootstrapLazy([["cat-alert_7.cjs",[[1,"cat-button",{"variant":[1],"color":[1],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"ellipsed":[4],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconSuffix":[4,"icon-suffix"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-alert",{"color":[1]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}]]]], options);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"./components/cat-alert/cat-alert.js",
|
|
4
|
+
"./components/cat-badge/cat-badge.js",
|
|
5
|
+
"./components/cat-button/cat-button.js",
|
|
6
|
+
"./components/cat-icon/cat-icon.js",
|
|
7
|
+
"./components/cat-menu/cat-menu.js",
|
|
8
|
+
"./components/cat-skeleton/cat-skeleton.js",
|
|
9
|
+
"./components/cat-spinner/cat-spinner.js"
|
|
10
|
+
],
|
|
11
|
+
"compiler": {
|
|
12
|
+
"name": "@stencil/core",
|
|
13
|
+
"version": "2.13.0",
|
|
14
|
+
"typescriptVersion": "4.3.5"
|
|
15
|
+
},
|
|
16
|
+
"collections": [],
|
|
17
|
+
"bundles": [],
|
|
18
|
+
"global": "init.js"
|
|
19
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated file. Do not edit directly.
|
|
3
|
+
*/
|
|
4
|
+
/* stylelint-disable value-keyword-case */
|
|
5
|
+
/* stylelint-enable value-keyword-case */
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
margin-bottom: 1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([hidden]) {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cat-alert {
|
|
16
|
+
font: inherit;
|
|
17
|
+
color: rgb(var(--text));
|
|
18
|
+
background-color: rgba(var(--bg), 0.1);
|
|
19
|
+
box-shadow: inset 0 0 0 1px rgba(var(--border), 0.2);
|
|
20
|
+
border-radius: 0.25rem;
|
|
21
|
+
padding: 0.75rem 1rem;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
::slotted(:last-child) {
|
|
26
|
+
margin-bottom: 0 !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cat-alert-primary {
|
|
30
|
+
--bg: var(--cat-primary-bg, 32, 127, 138);
|
|
31
|
+
--text: var(--cat-primary-text, 32, 127, 138);
|
|
32
|
+
--border: var(--cat-primary-text, 32, 127, 138);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cat-alert-secondary {
|
|
36
|
+
--bg: 105, 118, 135;
|
|
37
|
+
--text: 0, 0, 0;
|
|
38
|
+
--border: 105, 118, 135;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.cat-alert-success {
|
|
42
|
+
--bg: 0, 132, 88;
|
|
43
|
+
--text: 0, 132, 88;
|
|
44
|
+
--border: 0, 132, 88;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.cat-alert-warning {
|
|
48
|
+
--bg: 255, 206, 128;
|
|
49
|
+
--text: 159, 97, 0;
|
|
50
|
+
--border: 159, 97, 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.cat-alert-danger {
|
|
54
|
+
--bg: 217, 52, 13;
|
|
55
|
+
--text: 217, 52, 13;
|
|
56
|
+
--border: 217, 52, 13;
|
|
57
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Component, h, Prop } from '@stencil/core';
|
|
2
|
+
/**
|
|
3
|
+
* Alerts are used to display important messages inline.
|
|
4
|
+
*
|
|
5
|
+
* @part alert - The content of the alert.
|
|
6
|
+
*/
|
|
7
|
+
export class CatAlert {
|
|
8
|
+
constructor() {
|
|
9
|
+
/**
|
|
10
|
+
* The color palette of the alert.
|
|
11
|
+
*/
|
|
12
|
+
this.color = 'primary';
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h("div", { part: "alert", class: {
|
|
16
|
+
'cat-alert': true,
|
|
17
|
+
[`cat-alert-${this.color}`]: Boolean(this.color)
|
|
18
|
+
} },
|
|
19
|
+
h("slot", null)));
|
|
20
|
+
}
|
|
21
|
+
static get is() { return "cat-alert"; }
|
|
22
|
+
static get encapsulation() { return "shadow"; }
|
|
23
|
+
static get originalStyleUrls() { return {
|
|
24
|
+
"$": ["cat-alert.scss"]
|
|
25
|
+
}; }
|
|
26
|
+
static get styleUrls() { return {
|
|
27
|
+
"$": ["cat-alert.css"]
|
|
28
|
+
}; }
|
|
29
|
+
static get properties() { return {
|
|
30
|
+
"color": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"mutable": false,
|
|
33
|
+
"complexType": {
|
|
34
|
+
"original": "'primary' | 'secondary' | 'danger' | 'success' | 'warning'",
|
|
35
|
+
"resolved": "\"danger\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
|
|
36
|
+
"references": {}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": "The color palette of the alert."
|
|
43
|
+
},
|
|
44
|
+
"attribute": "color",
|
|
45
|
+
"reflect": false,
|
|
46
|
+
"defaultValue": "'primary'"
|
|
47
|
+
}
|
|
48
|
+
}; }
|
|
49
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated file. Do not edit directly.
|
|
3
|
+
*/
|
|
4
|
+
/* stylelint-disable value-keyword-case */
|
|
5
|
+
/* stylelint-enable value-keyword-case */
|
|
6
|
+
:host {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
vertical-align: baseline;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host([hidden]) {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.cat-badge {
|
|
17
|
+
font: inherit;
|
|
18
|
+
flex: 1 1 auto;
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
border-radius: 0.125rem;
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
width: 100%;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
line-height: 1;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
}
|
|
29
|
+
.cat-badge slot {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
/* stylelint-disable value-no-vendor-prefix, property-no-vendor-prefix */
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
/* stylelint-enable value-no-vendor-prefix, property-no-vendor-prefix */
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cat-badge-round {
|
|
39
|
+
border-radius: 10rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.cat-badge-filled {
|
|
43
|
+
background-color: rgb(var(--bg));
|
|
44
|
+
color: rgb(var(--fill));
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
-webkit-font-smoothing: antialiased;
|
|
47
|
+
-moz-osx-font-smoothing: greyscale;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cat-badge-outlined {
|
|
51
|
+
background-color: white;
|
|
52
|
+
box-shadow: inset 0 0 0 1px rgba(var(--border), 0.2);
|
|
53
|
+
color: rgb(var(--text));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.cat-badge-primary {
|
|
57
|
+
--bg: var(--cat-primary-bg, 32, 127, 138);
|
|
58
|
+
--fill: var(--cat-primary-fill, 255, 255, 255);
|
|
59
|
+
--text: var(--cat-primary-text, 32, 127, 138);
|
|
60
|
+
--border: var(--cat-primary-text, 32, 127, 138);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.cat-badge-secondary {
|
|
64
|
+
--bg: 105, 118, 135;
|
|
65
|
+
--fill: 255, 255, 255;
|
|
66
|
+
--text: 0, 0, 0;
|
|
67
|
+
--border: 105, 118, 135;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.cat-badge-success {
|
|
71
|
+
--bg: 0, 132, 88;
|
|
72
|
+
--fill: 255, 255, 255;
|
|
73
|
+
--text: 0, 132, 88;
|
|
74
|
+
--border: 0, 132, 88;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.cat-badge-warning {
|
|
78
|
+
--bg: 255, 206, 128;
|
|
79
|
+
--fill: 0, 0, 0;
|
|
80
|
+
--text: 159, 97, 0;
|
|
81
|
+
--border: 159, 97, 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.cat-badge-danger {
|
|
85
|
+
--bg: 217, 52, 13;
|
|
86
|
+
--fill: 255, 255, 255;
|
|
87
|
+
--text: 217, 52, 13;
|
|
88
|
+
--border: 217, 52, 13;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.cat-badge-xs {
|
|
92
|
+
height: 0.75rem;
|
|
93
|
+
min-width: 0.75rem;
|
|
94
|
+
font-size: 0.75rem;
|
|
95
|
+
padding: 0 0.1875rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.cat-badge-s {
|
|
99
|
+
height: 1rem;
|
|
100
|
+
min-width: 1rem;
|
|
101
|
+
font-size: 0.75rem;
|
|
102
|
+
padding: 0 0.25rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.cat-badge-m {
|
|
106
|
+
height: 1.25rem;
|
|
107
|
+
min-width: 1.25rem;
|
|
108
|
+
font-size: 0.75rem;
|
|
109
|
+
padding: 0 0.3125rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.cat-badge-l {
|
|
113
|
+
height: 1.5rem;
|
|
114
|
+
min-width: 1.5rem;
|
|
115
|
+
font-size: 0.875rem;
|
|
116
|
+
padding: 0 0.375rem;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.cat-badge-xl {
|
|
120
|
+
height: 1.75rem;
|
|
121
|
+
min-width: 1.75rem;
|
|
122
|
+
font-size: 0.9375rem;
|
|
123
|
+
padding: 0 0.4375rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.cat-badge-pulse.cat-badge-filled {
|
|
127
|
+
animation: 1.5s ease 0s infinite normal none running pulse;
|
|
128
|
+
}
|
|
129
|
+
.cat-badge-pulse.cat-badge-outlined {
|
|
130
|
+
animation: 1.5s ease 0s infinite normal none running pulse-outlined;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@keyframes pulse {
|
|
134
|
+
0% {
|
|
135
|
+
box-shadow: 0 0 0 0 rgb(var(--bg));
|
|
136
|
+
}
|
|
137
|
+
70% {
|
|
138
|
+
box-shadow: transparent 0px 0px 0px 0.5rem;
|
|
139
|
+
}
|
|
140
|
+
100% {
|
|
141
|
+
box-shadow: transparent 0px 0px 0px 0px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
@keyframes pulse-outlined {
|
|
145
|
+
0% {
|
|
146
|
+
box-shadow: 0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--border), 0.2);
|
|
147
|
+
}
|
|
148
|
+
70% {
|
|
149
|
+
box-shadow: transparent 0px 0px 0px 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2);
|
|
150
|
+
}
|
|
151
|
+
100% {
|
|
152
|
+
box-shadow: transparent 0px 0px 0px 0px, inset 0 0 0 1px rgba(var(--border), 0.2);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Component, h, Prop } from '@stencil/core';
|
|
2
|
+
/**
|
|
3
|
+
* Badges are used to draw attention and display statuses or counts.
|
|
4
|
+
*
|
|
5
|
+
* @part badge - The content of the badge.
|
|
6
|
+
*/
|
|
7
|
+
export class CatBadge {
|
|
8
|
+
constructor() {
|
|
9
|
+
/**
|
|
10
|
+
* The rendering style of the badge.
|
|
11
|
+
*/
|
|
12
|
+
this.variant = 'filled';
|
|
13
|
+
/**
|
|
14
|
+
* The color palette of the badge.
|
|
15
|
+
*/
|
|
16
|
+
this.color = 'primary';
|
|
17
|
+
/**
|
|
18
|
+
* The size of the badge.
|
|
19
|
+
*/
|
|
20
|
+
this.size = 'm';
|
|
21
|
+
/**
|
|
22
|
+
* Use round badge edges.
|
|
23
|
+
*/
|
|
24
|
+
this.round = false;
|
|
25
|
+
/**
|
|
26
|
+
* Draw attention to the badge with a subtle animation.
|
|
27
|
+
*/
|
|
28
|
+
this.pulse = false;
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (h("span", { part: "badge", class: {
|
|
32
|
+
'cat-badge': true,
|
|
33
|
+
'cat-badge-round': this.round,
|
|
34
|
+
'cat-badge-pulse': this.pulse,
|
|
35
|
+
[`cat-badge-${this.variant}`]: Boolean(this.variant),
|
|
36
|
+
[`cat-badge-${this.color}`]: Boolean(this.color),
|
|
37
|
+
[`cat-badge-${this.size}`]: Boolean(this.size)
|
|
38
|
+
} },
|
|
39
|
+
h("slot", null)));
|
|
40
|
+
}
|
|
41
|
+
static get is() { return "cat-badge"; }
|
|
42
|
+
static get encapsulation() { return "shadow"; }
|
|
43
|
+
static get originalStyleUrls() { return {
|
|
44
|
+
"$": ["cat-badge.scss"]
|
|
45
|
+
}; }
|
|
46
|
+
static get styleUrls() { return {
|
|
47
|
+
"$": ["cat-badge.css"]
|
|
48
|
+
}; }
|
|
49
|
+
static get properties() { return {
|
|
50
|
+
"variant": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"mutable": false,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "'filled' | 'outlined'",
|
|
55
|
+
"resolved": "\"filled\" | \"outlined\"",
|
|
56
|
+
"references": {}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": "The rendering style of the badge."
|
|
63
|
+
},
|
|
64
|
+
"attribute": "variant",
|
|
65
|
+
"reflect": false,
|
|
66
|
+
"defaultValue": "'filled'"
|
|
67
|
+
},
|
|
68
|
+
"color": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"mutable": false,
|
|
71
|
+
"complexType": {
|
|
72
|
+
"original": "'primary' | 'secondary' | 'danger' | 'success' | 'warning'",
|
|
73
|
+
"resolved": "\"danger\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
|
|
74
|
+
"references": {}
|
|
75
|
+
},
|
|
76
|
+
"required": false,
|
|
77
|
+
"optional": false,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [],
|
|
80
|
+
"text": "The color palette of the badge."
|
|
81
|
+
},
|
|
82
|
+
"attribute": "color",
|
|
83
|
+
"reflect": false,
|
|
84
|
+
"defaultValue": "'primary'"
|
|
85
|
+
},
|
|
86
|
+
"size": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "'xs' | 's' | 'm' | 'l' | 'xl'",
|
|
91
|
+
"resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": "The size of the badge."
|
|
99
|
+
},
|
|
100
|
+
"attribute": "size",
|
|
101
|
+
"reflect": false,
|
|
102
|
+
"defaultValue": "'m'"
|
|
103
|
+
},
|
|
104
|
+
"round": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "boolean",
|
|
109
|
+
"resolved": "boolean",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": false,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": "Use round badge edges."
|
|
117
|
+
},
|
|
118
|
+
"attribute": "round",
|
|
119
|
+
"reflect": false,
|
|
120
|
+
"defaultValue": "false"
|
|
121
|
+
},
|
|
122
|
+
"pulse": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "boolean",
|
|
127
|
+
"resolved": "boolean",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": "Draw attention to the badge with a subtle animation."
|
|
135
|
+
},
|
|
136
|
+
"attribute": "pulse",
|
|
137
|
+
"reflect": false,
|
|
138
|
+
"defaultValue": "false"
|
|
139
|
+
}
|
|
140
|
+
}; }
|
|
141
|
+
}
|