@haiilo/catalyst 0.2.3 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.css +1 -1959
- package/dist/catalyst/catalyst.esm.js +1 -131
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js +1 -2
- package/dist/catalyst/index.esm.js.map +1 -1
- package/dist/catalyst/p-31b500c7.entry.js +10 -0
- package/dist/catalyst/p-31b500c7.entry.js.map +1 -0
- package/dist/catalyst/p-ed826597.js +2 -0
- package/dist/catalyst/p-ed826597.js.map +1 -0
- package/dist/catalyst/p-ef0a8ae9.js +2 -0
- package/dist/catalyst/p-ef0a8ae9.js.map +1 -0
- package/dist/catalyst/p-f151cb13.js +2 -0
- package/dist/catalyst/p-f151cb13.js.map +1 -0
- package/dist/cjs/app-globals-7f2b1f8e.js +173 -0
- package/dist/cjs/app-globals-7f2b1f8e.js.map +1 -0
- package/dist/cjs/cat-alert_8.cjs.entry.js +4450 -0
- package/dist/cjs/cat-alert_8.cjs.entry.js.map +1 -0
- package/dist/cjs/cat-icon-registry-850c538c.js +47 -0
- package/dist/cjs/cat-icon-registry-850c538c.js.map +1 -0
- package/dist/cjs/catalyst.cjs.js +24 -0
- package/dist/cjs/catalyst.cjs.js.map +1 -0
- package/dist/cjs/index-c0881ae0.js +1348 -0
- package/dist/cjs/index-c0881ae0.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +26 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +20 -0
- package/dist/collection/components/cat-alert/cat-alert.css +57 -0
- package/dist/collection/components/cat-alert/cat-alert.js +50 -0
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -0
- package/dist/collection/components/cat-badge/cat-badge.css +154 -0
- package/dist/collection/components/cat-badge/cat-badge.js +142 -0
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -0
- package/dist/collection/components/cat-button/cat-button.css +323 -0
- package/dist/collection/components/cat-button/cat-button.js +591 -0
- package/dist/collection/components/cat-button/cat-button.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js +42 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon.css +50 -0
- package/dist/collection/components/cat-icon/cat-icon.js +90 -0
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -0
- package/dist/collection/components/cat-menu/cat-menu.css +33 -0
- package/dist/collection/components/cat-menu/cat-menu.js +186 -0
- package/dist/collection/components/cat-menu/cat-menu.js.map +1 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.css +69 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +309 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.css +177 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +131 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -0
- package/dist/collection/components/cat-spinner/cat-spinner.css +63 -0
- package/dist/collection/components/cat-spinner/cat-spinner.js +65 -0
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -0
- package/dist/collection/index.cdn.js +21 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/init.js +9 -0
- package/dist/collection/init.js.map +1 -0
- package/dist/collection/utils/breakpoints.js +12 -0
- package/dist/collection/utils/breakpoints.js.map +1 -0
- package/dist/collection/utils/media-matcher.js +55 -0
- package/dist/collection/utils/media-matcher.js.map +1 -0
- package/dist/collection/utils/platform.js +50 -0
- package/dist/collection/utils/platform.js.map +1 -0
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/{catalyst/cat-alert.entry.js → components/cat-alert.js} +28 -8
- package/dist/components/cat-alert.js.map +1 -0
- package/dist/{catalyst/cat-badge.entry.js → components/cat-badge.js} +32 -8
- package/dist/components/cat-badge.js.map +1 -0
- package/dist/{catalyst/cat-button.entry.js → components/cat-button.js} +60 -41
- package/dist/components/cat-button.js.map +1 -0
- package/dist/components/cat-icon-registry.js +45 -0
- package/dist/components/cat-icon-registry.js.map +1 -0
- package/dist/components/cat-icon.js +8 -0
- package/dist/components/cat-icon.js.map +1 -0
- package/dist/{catalyst/cat-icon.entry.js → components/cat-icon2.js} +28 -9
- package/dist/components/cat-icon2.js.map +1 -0
- package/dist/{catalyst/cat-menu.entry.js → components/cat-menu.js} +34 -642
- package/dist/components/cat-menu.js.map +1 -0
- package/dist/components/cat-scrollable.js +1363 -0
- package/dist/components/cat-scrollable.js.map +1 -0
- package/dist/{catalyst/cat-skeleton.entry.js → components/cat-skeleton.js} +31 -8
- package/dist/components/cat-skeleton.js.map +1 -0
- package/dist/components/cat-spinner.js +8 -0
- package/dist/components/cat-spinner.js.map +1 -0
- package/dist/{catalyst/cat-spinner.entry.js → components/cat-spinner2.js} +26 -8
- package/dist/components/cat-spinner2.js.map +1 -0
- package/dist/components/index.js +173 -0
- package/dist/components/index.js.map +1 -0
- package/dist/esm/app-globals-8af9b2cf.js +171 -0
- package/dist/esm/app-globals-8af9b2cf.js.map +1 -0
- package/dist/esm/cat-alert_8.entry.js +4439 -0
- package/dist/esm/cat-alert_8.entry.js.map +1 -0
- package/dist/{catalyst → esm}/cat-icon-registry-59da2e37.js +0 -0
- package/dist/{catalyst → esm}/cat-icon-registry-59da2e37.js.map +0 -0
- package/dist/esm/catalyst.js +22 -0
- package/dist/esm/catalyst.js.map +1 -0
- package/dist/esm/index-0ff35bca.js +1320 -0
- package/dist/esm/index-0ff35bca.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +22 -0
- package/dist/esm/loader.js.map +1 -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/index.d.ts +1 -0
- package/package.json +10 -17
- package/dist/catalyst/app-globals-54573336.js +0 -718
- package/dist/catalyst/app-globals-54573336.js.map +0 -1
- package/dist/catalyst/cat-alert.entry.js.map +0 -1
- package/dist/catalyst/cat-badge.entry.js.map +0 -1
- package/dist/catalyst/cat-button.entry.js.map +0 -1
- package/dist/catalyst/cat-icon.entry.js.map +0 -1
- package/dist/catalyst/cat-input.entry.js +0 -55
- package/dist/catalyst/cat-input.entry.js.map +0 -1
- package/dist/catalyst/cat-menu.entry.js.map +0 -1
- package/dist/catalyst/cat-scrollable.entry.js +0 -4523
- package/dist/catalyst/cat-scrollable.entry.js.map +0 -1
- package/dist/catalyst/cat-skeleton.entry.js.map +0 -1
- package/dist/catalyst/cat-spinner.entry.js.map +0 -1
- package/dist/catalyst/css-shim-e6dd2538.js +0 -6
- package/dist/catalyst/css-shim-e6dd2538.js.map +0 -1
- package/dist/catalyst/dom-7fc649b0.js +0 -75
- package/dist/catalyst/dom-7fc649b0.js.map +0 -1
- package/dist/catalyst/index-2df805aa.js +0 -3059
- package/dist/catalyst/index-2df805aa.js.map +0 -1
- package/dist/catalyst/shadow-css-4d56fa31.js +0 -390
- package/dist/catalyst/shadow-css-4d56fa31.js.map +0 -1
- package/dist/components/cat-input.d.ts +0 -11
- package/dist/types/components/cat-input/cat-input.d.ts +0 -70
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
}
|
|
50
|
+
//# sourceMappingURL=cat-alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cat-alert.js","sourceRoot":"","sources":["../../../src/components/cat-alert/cat-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;GAIG;AAMH,MAAM,OAAO,QAAQ;EALrB;IAME;;OAEG;IACK,UAAK,GAA+D,SAAS,CAAC;GAevF;EAbC,MAAM;IACJ,OAAO,CACL,WACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;QACL,WAAW,EAAE,IAAI;QACjB,CAAC,aAAa,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;OACjD;MAED,eAAa,CACT,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -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 0 0 0 0.5rem;
|
|
139
|
+
}
|
|
140
|
+
100% {
|
|
141
|
+
box-shadow: transparent 0 0 0 0;
|
|
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 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2);
|
|
150
|
+
}
|
|
151
|
+
100% {
|
|
152
|
+
box-shadow: transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--border), 0.2);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
}
|
|
142
|
+
//# sourceMappingURL=cat-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cat-badge.js","sourceRoot":"","sources":["../../../src/components/cat-badge/cat-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;GAIG;AAMH,MAAM,OAAO,QAAQ;EALrB;IAME;;OAEG;IACK,YAAO,GAA0B,QAAQ,CAAC;IAElD;;OAEG;IACK,UAAK,GAA+D,SAAS,CAAC;IAEtF;;OAEG;IACK,SAAI,GAAkC,GAAG,CAAC;IAElD;;OAEG;IACK,UAAK,GAAG,KAAK,CAAC;IAEtB;;OAEG;IACK,UAAK,GAAG,KAAK,CAAC;GAmBvB;EAjBC,MAAM;IACJ,OAAO,CACL,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,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QACpD,CAAC,aAAa,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAChD,CAAC,aAAa,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;OAC/C;MAED,eAAa,CACR,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -0,0 +1,323 @@
|
|
|
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-block;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
vertical-align: middle;
|
|
10
|
+
/* stylelint-disable property-no-vendor-prefix */
|
|
11
|
+
-webkit-user-select: none;
|
|
12
|
+
-ms-user-select: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
/* stylelint-enable property-no-vendor-prefix */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cat-button {
|
|
18
|
+
font: inherit;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
border: none;
|
|
23
|
+
border-radius: 0.25rem;
|
|
24
|
+
text-decoration: none;
|
|
25
|
+
width: 100%;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
transition: color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear;
|
|
29
|
+
}
|
|
30
|
+
.cat-button:focus-visible {
|
|
31
|
+
outline: 2px solid #0071ff;
|
|
32
|
+
outline-offset: 1px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cat-button-ellipsed .cat-button-content {
|
|
36
|
+
/* stylelint-disable value-no-vendor-prefix, property-no-vendor-prefix */
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
/* stylelint-enable value-no-vendor-prefix, property-no-vendor-prefix */
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cat-button-disabled {
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
opacity: 0.65;
|
|
46
|
+
filter: grayscale(100%);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.cat-button-round {
|
|
50
|
+
border-radius: 10rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.cat-button-loading {
|
|
54
|
+
cursor: default;
|
|
55
|
+
}
|
|
56
|
+
.cat-button-loading cat-spinner {
|
|
57
|
+
position: absolute;
|
|
58
|
+
}
|
|
59
|
+
.cat-button-loading > *:not(cat-spinner) {
|
|
60
|
+
visibility: hidden;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.cat-button-filled {
|
|
64
|
+
background-color: rgb(var(--bg));
|
|
65
|
+
color: rgb(var(--fill));
|
|
66
|
+
font-weight: 600;
|
|
67
|
+
-webkit-font-smoothing: antialiased;
|
|
68
|
+
-moz-osx-font-smoothing: greyscale;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.cat-button-outlined {
|
|
72
|
+
background-color: white;
|
|
73
|
+
box-shadow: inset 0 0 0 1px rgba(var(--base), 0.2);
|
|
74
|
+
color: rgb(var(--text));
|
|
75
|
+
}
|
|
76
|
+
.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
77
|
+
background-color: rgba(var(--base), 0.05);
|
|
78
|
+
}
|
|
79
|
+
.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
80
|
+
background-color: rgba(var(--base), 0.1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.cat-button-text {
|
|
84
|
+
background-color: transparent;
|
|
85
|
+
color: rgb(var(--text));
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
}
|
|
88
|
+
.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
89
|
+
text-decoration: underline;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cat-button-primary {
|
|
93
|
+
--bg: var(--cat-primary-bg, 32, 127, 138);
|
|
94
|
+
--fill: var(--cat-primary-fill, 255, 255, 255);
|
|
95
|
+
--text: var(--cat-primary-text, 32, 127, 138);
|
|
96
|
+
--base: var(--cat-primary-text, 32, 127, 138);
|
|
97
|
+
}
|
|
98
|
+
.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
99
|
+
--bg: var(--cat-primary-bg-hover, 28, 112, 122);
|
|
100
|
+
--fill: var(--cat-primary-fill-hover, 255, 255, 255);
|
|
101
|
+
--text: var(--cat-primary-text-hover, 28, 112, 122);
|
|
102
|
+
}
|
|
103
|
+
.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
104
|
+
--bg: var(--cat-primary-bg-active, 25, 101, 110);
|
|
105
|
+
--fill: var(--cat-primary-fill-active, 255, 255, 255);
|
|
106
|
+
--text: var(--cat-primary-text-active, 25, 101, 110);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.cat-button-secondary {
|
|
110
|
+
--bg: 105, 118, 135;
|
|
111
|
+
--fill: 255, 255, 255;
|
|
112
|
+
--text: 0, 0, 0;
|
|
113
|
+
--base: 105, 118, 135;
|
|
114
|
+
}
|
|
115
|
+
.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
116
|
+
--bg: 105, 118, 135;
|
|
117
|
+
--fill: 255, 255, 255;
|
|
118
|
+
--text: 0, 0, 0;
|
|
119
|
+
}
|
|
120
|
+
.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
121
|
+
--bg: 105, 118, 135;
|
|
122
|
+
--fill: 255, 255, 255;
|
|
123
|
+
--text: 0, 0, 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.cat-button-success {
|
|
127
|
+
--bg: 0, 132, 88;
|
|
128
|
+
--fill: 255, 255, 255;
|
|
129
|
+
--text: 0, 132, 88;
|
|
130
|
+
--base: 0, 132, 88;
|
|
131
|
+
}
|
|
132
|
+
.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
133
|
+
--bg: 0, 117, 78;
|
|
134
|
+
--fill: 255, 255, 255;
|
|
135
|
+
--text: 0, 117, 78;
|
|
136
|
+
}
|
|
137
|
+
.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
138
|
+
--bg: 0, 105, 70;
|
|
139
|
+
--fill: 255, 255, 255;
|
|
140
|
+
--text: 0, 105, 70;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.cat-button-warning {
|
|
144
|
+
--bg: 255, 206, 128;
|
|
145
|
+
--fill: 0, 0, 0;
|
|
146
|
+
--text: 159, 97, 0;
|
|
147
|
+
--base: 159, 97, 0;
|
|
148
|
+
}
|
|
149
|
+
.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
150
|
+
--bg: 255, 214, 148;
|
|
151
|
+
--fill: 0, 0, 0;
|
|
152
|
+
--text: 159, 97, 0;
|
|
153
|
+
}
|
|
154
|
+
.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
155
|
+
--bg: 255, 222, 168;
|
|
156
|
+
--fill: 0, 0, 0;
|
|
157
|
+
--text: 159, 97, 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.cat-button-danger {
|
|
161
|
+
--bg: 217, 52, 13;
|
|
162
|
+
--fill: 255, 255, 255;
|
|
163
|
+
--text: 217, 52, 13;
|
|
164
|
+
--base: 217, 52, 13;
|
|
165
|
+
}
|
|
166
|
+
.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
167
|
+
--bg: 194, 46, 11;
|
|
168
|
+
--fill: 255, 255, 255;
|
|
169
|
+
--text: 194, 46, 11;
|
|
170
|
+
}
|
|
171
|
+
.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading) {
|
|
172
|
+
--bg: 174, 42, 10;
|
|
173
|
+
--fill: 255, 255, 255;
|
|
174
|
+
--text: 174, 42, 10;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.cat-button-xs {
|
|
178
|
+
min-width: 1.5rem;
|
|
179
|
+
padding: 0.25rem 0.25rem;
|
|
180
|
+
font-size: 0.875rem;
|
|
181
|
+
line-height: 1rem;
|
|
182
|
+
}
|
|
183
|
+
.cat-button-xs .cat-button-prefix {
|
|
184
|
+
margin-right: 0.25rem;
|
|
185
|
+
}
|
|
186
|
+
.cat-button-xs .cat-button-suffix {
|
|
187
|
+
margin-left: 0.25rem;
|
|
188
|
+
}
|
|
189
|
+
.cat-button-xs.cat-button-icon {
|
|
190
|
+
width: 1.5rem;
|
|
191
|
+
padding-left: 0;
|
|
192
|
+
padding-right: 0;
|
|
193
|
+
}
|
|
194
|
+
:host-context(nav) .cat-button-xs {
|
|
195
|
+
padding-left: 1rem;
|
|
196
|
+
padding-right: 1rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.cat-button-s {
|
|
200
|
+
min-width: 2rem;
|
|
201
|
+
padding: 0.375rem 0.5rem;
|
|
202
|
+
font-size: 0.9375rem;
|
|
203
|
+
line-height: 1.25rem;
|
|
204
|
+
}
|
|
205
|
+
.cat-button-s .cat-button-prefix {
|
|
206
|
+
margin-right: 0.25rem;
|
|
207
|
+
}
|
|
208
|
+
.cat-button-s .cat-button-suffix {
|
|
209
|
+
margin-left: 0.25rem;
|
|
210
|
+
}
|
|
211
|
+
.cat-button-s cat-icon {
|
|
212
|
+
margin-top: -0.125rem;
|
|
213
|
+
margin-bottom: -0.125rem;
|
|
214
|
+
}
|
|
215
|
+
.cat-button-s.cat-button-icon {
|
|
216
|
+
width: 2rem;
|
|
217
|
+
padding-left: 0;
|
|
218
|
+
padding-right: 0;
|
|
219
|
+
}
|
|
220
|
+
:host-context(nav) .cat-button-s {
|
|
221
|
+
padding-left: 1rem;
|
|
222
|
+
padding-right: 1rem;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.cat-button-m {
|
|
226
|
+
min-width: 2.5rem;
|
|
227
|
+
padding: 0.625rem 0.75rem;
|
|
228
|
+
font-size: 0.9375rem;
|
|
229
|
+
line-height: 1.25rem;
|
|
230
|
+
}
|
|
231
|
+
.cat-button-m .cat-button-prefix {
|
|
232
|
+
margin-right: 0.25rem;
|
|
233
|
+
}
|
|
234
|
+
.cat-button-m .cat-button-suffix {
|
|
235
|
+
margin-left: 0.25rem;
|
|
236
|
+
}
|
|
237
|
+
.cat-button-m cat-icon {
|
|
238
|
+
margin-top: -0.125rem;
|
|
239
|
+
margin-bottom: -0.125rem;
|
|
240
|
+
}
|
|
241
|
+
.cat-button-m.cat-button-icon {
|
|
242
|
+
width: 2.5rem;
|
|
243
|
+
padding-left: 0;
|
|
244
|
+
padding-right: 0;
|
|
245
|
+
}
|
|
246
|
+
:host-context(nav) .cat-button-m {
|
|
247
|
+
padding-left: 1rem;
|
|
248
|
+
padding-right: 1rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.cat-button-l {
|
|
252
|
+
min-width: 3rem;
|
|
253
|
+
padding: 0.875rem 1rem;
|
|
254
|
+
font-size: 0.9375rem;
|
|
255
|
+
line-height: 1.25rem;
|
|
256
|
+
}
|
|
257
|
+
.cat-button-l .cat-button-prefix {
|
|
258
|
+
margin-right: 0.25rem;
|
|
259
|
+
}
|
|
260
|
+
.cat-button-l .cat-button-suffix {
|
|
261
|
+
margin-left: 0.25rem;
|
|
262
|
+
}
|
|
263
|
+
.cat-button-l cat-icon {
|
|
264
|
+
margin-top: -0.125rem;
|
|
265
|
+
margin-bottom: -0.125rem;
|
|
266
|
+
}
|
|
267
|
+
.cat-button-l.cat-button-icon {
|
|
268
|
+
width: 3rem;
|
|
269
|
+
padding-left: 0;
|
|
270
|
+
padding-right: 0;
|
|
271
|
+
}
|
|
272
|
+
:host-context(nav) .cat-button-l {
|
|
273
|
+
padding-left: 1rem;
|
|
274
|
+
padding-right: 1rem;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.cat-button-xl {
|
|
278
|
+
min-width: 3.5rem;
|
|
279
|
+
padding: 1rem 1.25rem;
|
|
280
|
+
font-size: 1.125rem;
|
|
281
|
+
line-height: 1.5rem;
|
|
282
|
+
}
|
|
283
|
+
.cat-button-xl .cat-button-prefix {
|
|
284
|
+
margin-right: 0.25rem;
|
|
285
|
+
}
|
|
286
|
+
.cat-button-xl .cat-button-suffix {
|
|
287
|
+
margin-left: 0.25rem;
|
|
288
|
+
}
|
|
289
|
+
.cat-button-xl.cat-button-icon {
|
|
290
|
+
width: 3.5rem;
|
|
291
|
+
padding-left: 0;
|
|
292
|
+
padding-right: 0;
|
|
293
|
+
}
|
|
294
|
+
:host-context(nav) .cat-button-xl {
|
|
295
|
+
padding-left: 1rem;
|
|
296
|
+
padding-right: 1rem;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
:host-context(nav) {
|
|
300
|
+
width: 100%;
|
|
301
|
+
}
|
|
302
|
+
:host-context(nav) .cat-button {
|
|
303
|
+
box-shadow: none;
|
|
304
|
+
border-radius: 0;
|
|
305
|
+
}
|
|
306
|
+
:host-context(nav) .cat-button:focus-visible {
|
|
307
|
+
outline-offset: -2px;
|
|
308
|
+
}
|
|
309
|
+
:host-context(nav) .cat-button-content {
|
|
310
|
+
text-align: left;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
:host([hidden]) {
|
|
314
|
+
display: none;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
:host(.cat-text-left) .cat-button {
|
|
318
|
+
justify-content: left;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
:host(.cat-text-right) .cat-button {
|
|
322
|
+
justify-content: right;
|
|
323
|
+
}
|