@haiilo/catalyst 0.1.0 → 0.2.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 -1403
- package/dist/catalyst/catalyst.esm.js +1 -126
- package/dist/catalyst/index.esm.js +0 -1
- package/dist/catalyst/p-22fac0fb.js +1 -0
- package/dist/catalyst/p-2dc28db3.entry.js +11 -0
- package/dist/catalyst/{p-f3fad7a0.js → p-e08f13c7.js} +1 -1
- package/dist/cjs/{app-globals-8908fe44.js → app-globals-814f34aa.js} +5 -2
- package/dist/cjs/cat-alert_7.cjs.entry.js +3115 -0
- package/dist/cjs/{cat-icon-registry-da00f7d6.js → cat-icon-registry-909e38e7.js} +65 -1
- package/dist/cjs/catalyst.cjs.js +7 -114
- package/dist/cjs/loader.cjs.js +5 -20
- package/dist/collection/collection-manifest.json +6 -2
- 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 +43 -8
- package/dist/collection/components/cat-button/cat-button.js +28 -6
- package/dist/collection/components/cat-icon/cat-icon.css +2 -1
- 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/components/cat-alert.d.ts +11 -0
- package/dist/components/cat-alert.js +42 -0
- package/dist/components/cat-badge.d.ts +11 -0
- package/dist/components/cat-badge.js +66 -0
- package/dist/components/cat-button.js +14 -42
- package/dist/components/cat-icon2.js +4 -5
- package/dist/components/cat-menu.d.ts +11 -0
- package/dist/components/cat-menu.js +2377 -0
- package/dist/components/cat-skeleton.d.ts +11 -0
- package/dist/components/cat-skeleton.js +76 -0
- package/dist/components/cat-spinner2.js +3 -4
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +4 -575
- package/dist/esm/{app-globals-000601ea.js → app-globals-e1679c2d.js} +5 -2
- package/dist/esm/cat-alert_7.entry.js +3105 -0
- package/dist/esm/{cat-icon-registry-b66e3f57.js → cat-icon-registry-4d02ee6c.js} +65 -2
- package/dist/esm/catalyst.js +6 -113
- package/dist/esm/loader.js +4 -19
- package/dist/esm/polyfills/css-shim.js +1 -1
- 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 +32 -0
- package/dist/types/components/cat-skeleton/cat-skeleton.d.ts +28 -0
- package/dist/types/components.d.ts +153 -0
- package/package.json +12 -9
- package/dist/catalyst/app-globals-622e4f87.js +0 -704
- package/dist/catalyst/cat-button.entry.js +0 -629
- package/dist/catalyst/cat-icon-registry-59da2e37.js +0 -43
- package/dist/catalyst/cat-icon.entry.js +0 -27
- package/dist/catalyst/cat-spinner.entry.js +0 -21
- package/dist/catalyst/css-shim-20dbffa5.js +0 -4
- package/dist/catalyst/dom-c5ed0ba5.js +0 -73
- package/dist/catalyst/index-72a1bbba.js +0 -3031
- package/dist/catalyst/p-17a20657.js +0 -1
- package/dist/catalyst/p-582935bb.entry.js +0 -1
- package/dist/catalyst/shadow-css-8c625855.js +0 -388
- package/dist/cjs/app-globals-fe9ff8ba.js +0 -706
- package/dist/cjs/cat-button.cjs.entry.js +0 -633
- package/dist/cjs/cat-button_3.cjs.entry.js +0 -645
- package/dist/cjs/cat-icon-registry-850c538c.js +0 -45
- package/dist/cjs/cat-icon.cjs.entry.js +0 -31
- package/dist/cjs/cat-spinner.cjs.entry.js +0 -25
- package/dist/cjs/css-shim-3bfdba4f.js +0 -6
- package/dist/cjs/dom-8ac1ad03.js +0 -75
- package/dist/cjs/index-083488c8.js +0 -3065
- package/dist/cjs/shadow-css-41d9783d.js +0 -390
- package/dist/esm/app-globals-622e4f87.js +0 -704
- package/dist/esm/cat-button.entry.js +0 -629
- package/dist/esm/cat-button_3.entry.js +0 -639
- package/dist/esm/cat-icon-registry-59da2e37.js +0 -43
- package/dist/esm/cat-icon.entry.js +0 -27
- package/dist/esm/cat-spinner.entry.js +0 -21
- package/dist/esm/css-shim-20dbffa5.js +0 -4
- package/dist/esm/dom-c5ed0ba5.js +0 -73
- package/dist/esm/index-72a1bbba.js +0 -3031
- package/dist/esm/shadow-css-8c625855.js +0 -388
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* @prop --background: The background color of the skeleton.
|
|
9
|
+
* @prop --highlight: The highlight color of the skeleton.
|
|
10
|
+
* @prop --speed: The animation speed.
|
|
11
|
+
*/
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
position: relative;
|
|
15
|
+
--background: #ebecf0;
|
|
16
|
+
--highlight: #d7dbe0;
|
|
17
|
+
--speed: 2s;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([variant=square]),
|
|
21
|
+
:host([variant=circle]) {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host([hidden]) {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([variant=head]) {
|
|
30
|
+
margin-bottom: 0.5rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([variant=body]) {
|
|
34
|
+
margin-bottom: 1rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.cat-skeleton {
|
|
38
|
+
display: block;
|
|
39
|
+
border-radius: 0.25rem;
|
|
40
|
+
background: var(--background);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cat-skeleton-circle {
|
|
44
|
+
border-radius: 10rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.cat-skeleton-xs.cat-skeleton-rectangle {
|
|
48
|
+
width: var(--width, 100%);
|
|
49
|
+
height: var(--height, 1.5rem);
|
|
50
|
+
}
|
|
51
|
+
.cat-skeleton-xs.cat-skeleton-square, .cat-skeleton-xs.cat-skeleton-circle {
|
|
52
|
+
width: var(--width, 1.5rem);
|
|
53
|
+
height: var(--height, 1.5rem);
|
|
54
|
+
}
|
|
55
|
+
.cat-skeleton-xs.cat-skeleton-head, .cat-skeleton-xs.cat-skeleton-body {
|
|
56
|
+
width: var(--width, var(--line-width, 100%));
|
|
57
|
+
}
|
|
58
|
+
.cat-skeleton-xs.cat-skeleton-head {
|
|
59
|
+
height: calc(0.9375rem - 4px);
|
|
60
|
+
margin: calc((1.25rem - 0.9375rem + 4px) * 0.5) 0;
|
|
61
|
+
}
|
|
62
|
+
.cat-skeleton-xs.cat-skeleton-body {
|
|
63
|
+
height: calc(0.75rem - 4px);
|
|
64
|
+
margin: calc((1rem - 0.75rem + 4px) * 0.5) 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.cat-skeleton-s.cat-skeleton-rectangle {
|
|
68
|
+
width: var(--width, 100%);
|
|
69
|
+
height: var(--height, 2rem);
|
|
70
|
+
}
|
|
71
|
+
.cat-skeleton-s.cat-skeleton-square, .cat-skeleton-s.cat-skeleton-circle {
|
|
72
|
+
width: var(--width, 2rem);
|
|
73
|
+
height: var(--height, 2rem);
|
|
74
|
+
}
|
|
75
|
+
.cat-skeleton-s.cat-skeleton-head, .cat-skeleton-s.cat-skeleton-body {
|
|
76
|
+
width: var(--width, var(--line-width, 100%));
|
|
77
|
+
}
|
|
78
|
+
.cat-skeleton-s.cat-skeleton-head {
|
|
79
|
+
height: calc(1.125rem - 4px);
|
|
80
|
+
margin: calc((1.5rem - 1.125rem + 4px) * 0.5) 0;
|
|
81
|
+
}
|
|
82
|
+
.cat-skeleton-s.cat-skeleton-body {
|
|
83
|
+
height: calc(0.875rem - 4px);
|
|
84
|
+
margin: calc((1rem - 0.875rem + 4px) * 0.5) 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.cat-skeleton-m.cat-skeleton-rectangle {
|
|
88
|
+
width: var(--width, 100%);
|
|
89
|
+
height: var(--height, 2.5rem);
|
|
90
|
+
}
|
|
91
|
+
.cat-skeleton-m.cat-skeleton-square, .cat-skeleton-m.cat-skeleton-circle {
|
|
92
|
+
width: var(--width, 2.5rem);
|
|
93
|
+
height: var(--height, 2.5rem);
|
|
94
|
+
}
|
|
95
|
+
.cat-skeleton-m.cat-skeleton-head, .cat-skeleton-m.cat-skeleton-body {
|
|
96
|
+
width: var(--width, var(--line-width, 100%));
|
|
97
|
+
}
|
|
98
|
+
.cat-skeleton-m.cat-skeleton-head {
|
|
99
|
+
height: calc(1.25rem - 4px);
|
|
100
|
+
margin: calc((1.5rem - 1.25rem + 4px) * 0.5) 0;
|
|
101
|
+
}
|
|
102
|
+
.cat-skeleton-m.cat-skeleton-body {
|
|
103
|
+
height: calc(0.9375rem - 4px);
|
|
104
|
+
margin: calc((1.25rem - 0.9375rem + 4px) * 0.5) 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cat-skeleton-l.cat-skeleton-rectangle {
|
|
108
|
+
width: var(--width, 100%);
|
|
109
|
+
height: var(--height, 3rem);
|
|
110
|
+
}
|
|
111
|
+
.cat-skeleton-l.cat-skeleton-square, .cat-skeleton-l.cat-skeleton-circle {
|
|
112
|
+
width: var(--width, 3rem);
|
|
113
|
+
height: var(--height, 3rem);
|
|
114
|
+
}
|
|
115
|
+
.cat-skeleton-l.cat-skeleton-head, .cat-skeleton-l.cat-skeleton-body {
|
|
116
|
+
width: var(--width, var(--line-width, 100%));
|
|
117
|
+
}
|
|
118
|
+
.cat-skeleton-l.cat-skeleton-head {
|
|
119
|
+
height: calc(1.5rem - 4px);
|
|
120
|
+
margin: calc((1.75rem - 1.5rem + 4px) * 0.5) 0;
|
|
121
|
+
}
|
|
122
|
+
.cat-skeleton-l.cat-skeleton-body {
|
|
123
|
+
height: calc(1.125rem - 4px);
|
|
124
|
+
margin: calc((1.5rem - 1.125rem + 4px) * 0.5) 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.cat-skeleton-xl.cat-skeleton-rectangle {
|
|
128
|
+
width: var(--width, 100%);
|
|
129
|
+
height: var(--height, 3.5rem);
|
|
130
|
+
}
|
|
131
|
+
.cat-skeleton-xl.cat-skeleton-square, .cat-skeleton-xl.cat-skeleton-circle {
|
|
132
|
+
width: var(--width, 3.5rem);
|
|
133
|
+
height: var(--height, 3.5rem);
|
|
134
|
+
}
|
|
135
|
+
.cat-skeleton-xl.cat-skeleton-head, .cat-skeleton-xl.cat-skeleton-body {
|
|
136
|
+
width: var(--width, var(--line-width, 100%));
|
|
137
|
+
}
|
|
138
|
+
.cat-skeleton-xl.cat-skeleton-head {
|
|
139
|
+
height: calc(1.75rem - 4px);
|
|
140
|
+
margin: calc((2rem - 1.75rem + 4px) * 0.5) 0;
|
|
141
|
+
}
|
|
142
|
+
.cat-skeleton-xl.cat-skeleton-body {
|
|
143
|
+
height: calc(1.25rem - 4px);
|
|
144
|
+
margin: calc((1.5rem - 1.25rem + 4px) * 0.5) 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.cat-skeleton-sheen {
|
|
148
|
+
background: linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);
|
|
149
|
+
background-size: 300% 100%;
|
|
150
|
+
animation: sheen var(--speed) ease-in-out infinite;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.cat-skeleton-pulse {
|
|
154
|
+
position: relative;
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
}
|
|
157
|
+
.cat-skeleton-pulse::before {
|
|
158
|
+
content: "";
|
|
159
|
+
display: block;
|
|
160
|
+
position: absolute;
|
|
161
|
+
width: 100%;
|
|
162
|
+
height: 100%;
|
|
163
|
+
background-color: var(--highlight);
|
|
164
|
+
animation: var(--speed) ease-in-out 0.5s infinite normal none running pulse;
|
|
165
|
+
opacity: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@keyframes sheen {
|
|
169
|
+
0% {
|
|
170
|
+
background-position: right;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
@keyframes pulse {
|
|
174
|
+
50% {
|
|
175
|
+
opacity: 1;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Component, Host, h, Prop } from '@stencil/core';
|
|
2
|
+
/**
|
|
3
|
+
* Skeletons are used to show where content will eventually be drawn.
|
|
4
|
+
*/
|
|
5
|
+
export class CatSkeleton {
|
|
6
|
+
constructor() {
|
|
7
|
+
/**
|
|
8
|
+
* The animation style of the skeleton.
|
|
9
|
+
*/
|
|
10
|
+
this.effect = 'sheen';
|
|
11
|
+
/**
|
|
12
|
+
* The rendering style of the skeleton.
|
|
13
|
+
*/
|
|
14
|
+
this.variant = 'rectangle';
|
|
15
|
+
/**
|
|
16
|
+
* The size of the skeleton. If the variant is set to "head", the size values
|
|
17
|
+
* "xs" to "xl" translate to the head levels `h1` to `h5`.
|
|
18
|
+
*/
|
|
19
|
+
this.size = 'm';
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Host, null, Array.from(Array(this.count)).map(() => (h("div", { style: this.style, class: {
|
|
23
|
+
'cat-skeleton': true,
|
|
24
|
+
[`cat-skeleton-${this.effect}`]: Boolean(this.effect),
|
|
25
|
+
[`cat-skeleton-${this.variant}`]: Boolean(this.variant),
|
|
26
|
+
[`cat-skeleton-${this.size}`]: Boolean(this.size)
|
|
27
|
+
} })))));
|
|
28
|
+
}
|
|
29
|
+
get count() {
|
|
30
|
+
switch (this.variant) {
|
|
31
|
+
case 'head':
|
|
32
|
+
return Math.max(1, this.lines || 1);
|
|
33
|
+
case 'body':
|
|
34
|
+
return Math.max(1, this.lines || 3);
|
|
35
|
+
default:
|
|
36
|
+
return 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
get style() {
|
|
40
|
+
return this.variant === 'head' || this.variant === 'body'
|
|
41
|
+
? {
|
|
42
|
+
'--line-width': `${this.random(50, 100)}%`
|
|
43
|
+
}
|
|
44
|
+
: undefined;
|
|
45
|
+
}
|
|
46
|
+
random(min, max) {
|
|
47
|
+
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
48
|
+
}
|
|
49
|
+
static get is() { return "cat-skeleton"; }
|
|
50
|
+
static get encapsulation() { return "shadow"; }
|
|
51
|
+
static get originalStyleUrls() { return {
|
|
52
|
+
"$": ["cat-skeleton.scss"]
|
|
53
|
+
}; }
|
|
54
|
+
static get styleUrls() { return {
|
|
55
|
+
"$": ["cat-skeleton.css"]
|
|
56
|
+
}; }
|
|
57
|
+
static get properties() { return {
|
|
58
|
+
"effect": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "'plain' | 'sheen' | 'pulse'",
|
|
63
|
+
"resolved": "\"plain\" | \"pulse\" | \"sheen\"",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "The animation style of the skeleton."
|
|
71
|
+
},
|
|
72
|
+
"attribute": "effect",
|
|
73
|
+
"reflect": false,
|
|
74
|
+
"defaultValue": "'sheen'"
|
|
75
|
+
},
|
|
76
|
+
"variant": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"mutable": false,
|
|
79
|
+
"complexType": {
|
|
80
|
+
"original": "'rectangle' | 'square' | 'circle' | 'head' | 'body'",
|
|
81
|
+
"resolved": "\"body\" | \"circle\" | \"head\" | \"rectangle\" | \"square\"",
|
|
82
|
+
"references": {}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": "The rendering style of the skeleton."
|
|
89
|
+
},
|
|
90
|
+
"attribute": "variant",
|
|
91
|
+
"reflect": false,
|
|
92
|
+
"defaultValue": "'rectangle'"
|
|
93
|
+
},
|
|
94
|
+
"size": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"mutable": false,
|
|
97
|
+
"complexType": {
|
|
98
|
+
"original": "'xs' | 's' | 'm' | 'l' | 'xl'",
|
|
99
|
+
"resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
|
|
100
|
+
"references": {}
|
|
101
|
+
},
|
|
102
|
+
"required": false,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": "The size of the skeleton. If the variant is set to \"head\", the size values\n\"xs\" to \"xl\" translate to the head levels `h1` to `h5`."
|
|
107
|
+
},
|
|
108
|
+
"attribute": "size",
|
|
109
|
+
"reflect": false,
|
|
110
|
+
"defaultValue": "'m'"
|
|
111
|
+
},
|
|
112
|
+
"lines": {
|
|
113
|
+
"type": "number",
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "number",
|
|
117
|
+
"resolved": "number | undefined",
|
|
118
|
+
"references": {}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": true,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": "The number of text lines to be rendered for \"head\" and \"body\" variants.\nDefaults to 1 for \"head\" and 3 for \"body\". Will be ignored for other\nvariants."
|
|
125
|
+
},
|
|
126
|
+
"attribute": "lines",
|
|
127
|
+
"reflect": false
|
|
128
|
+
}
|
|
129
|
+
}; }
|
|
130
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CatAlert extends Components.CatAlert, HTMLElement {}
|
|
4
|
+
export const CatAlert: {
|
|
5
|
+
prototype: CatAlert;
|
|
6
|
+
new (): CatAlert;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
const CatAlert$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* The color palette of the alert.
|
|
12
|
+
*/
|
|
13
|
+
this.color = 'primary';
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h("div", { part: "alert", class: {
|
|
17
|
+
'cat-alert': true,
|
|
18
|
+
[`cat-alert-${this.color}`]: Boolean(this.color)
|
|
19
|
+
} }, h("slot", null)));
|
|
20
|
+
}
|
|
21
|
+
static get style() { return catAlertCss; }
|
|
22
|
+
}, [1, "cat-alert", {
|
|
23
|
+
"color": [1]
|
|
24
|
+
}]);
|
|
25
|
+
function defineCustomElement$1() {
|
|
26
|
+
if (typeof customElements === "undefined") {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const components = ["cat-alert"];
|
|
30
|
+
components.forEach(tagName => { switch (tagName) {
|
|
31
|
+
case "cat-alert":
|
|
32
|
+
if (!customElements.get(tagName)) {
|
|
33
|
+
customElements.define(tagName, CatAlert$1);
|
|
34
|
+
}
|
|
35
|
+
break;
|
|
36
|
+
} });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const CatAlert = CatAlert$1;
|
|
40
|
+
const defineCustomElement = defineCustomElement$1;
|
|
41
|
+
|
|
42
|
+
export { CatAlert, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CatBadge extends Components.CatBadge, HTMLElement {}
|
|
4
|
+
export const CatBadge: {
|
|
5
|
+
prototype: CatBadge;
|
|
6
|
+
new (): CatBadge;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
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 0px 0px 0px 0.5rem}100%{box-shadow:transparent 0px 0px 0px 0px}}@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 0px 0px 0px 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2)}100%{box-shadow:transparent 0px 0px 0px 0px, inset 0 0 0 1px rgba(var(--border), 0.2)}}";
|
|
4
|
+
|
|
5
|
+
const CatBadge$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* The rendering style of the badge.
|
|
12
|
+
*/
|
|
13
|
+
this.variant = 'filled';
|
|
14
|
+
/**
|
|
15
|
+
* The color palette of the badge.
|
|
16
|
+
*/
|
|
17
|
+
this.color = 'primary';
|
|
18
|
+
/**
|
|
19
|
+
* The size of the badge.
|
|
20
|
+
*/
|
|
21
|
+
this.size = 'm';
|
|
22
|
+
/**
|
|
23
|
+
* Use round badge edges.
|
|
24
|
+
*/
|
|
25
|
+
this.round = false;
|
|
26
|
+
/**
|
|
27
|
+
* Draw attention to the badge with a subtle animation.
|
|
28
|
+
*/
|
|
29
|
+
this.pulse = false;
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return (h("span", { part: "badge", class: {
|
|
33
|
+
'cat-badge': true,
|
|
34
|
+
'cat-badge-round': this.round,
|
|
35
|
+
'cat-badge-pulse': this.pulse,
|
|
36
|
+
[`cat-badge-${this.variant}`]: Boolean(this.variant),
|
|
37
|
+
[`cat-badge-${this.color}`]: Boolean(this.color),
|
|
38
|
+
[`cat-badge-${this.size}`]: Boolean(this.size)
|
|
39
|
+
} }, h("slot", null)));
|
|
40
|
+
}
|
|
41
|
+
static get style() { return catBadgeCss; }
|
|
42
|
+
}, [1, "cat-badge", {
|
|
43
|
+
"variant": [1],
|
|
44
|
+
"color": [1],
|
|
45
|
+
"size": [1],
|
|
46
|
+
"round": [4],
|
|
47
|
+
"pulse": [4]
|
|
48
|
+
}]);
|
|
49
|
+
function defineCustomElement$1() {
|
|
50
|
+
if (typeof customElements === "undefined") {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const components = ["cat-badge"];
|
|
54
|
+
components.forEach(tagName => { switch (tagName) {
|
|
55
|
+
case "cat-badge":
|
|
56
|
+
if (!customElements.get(tagName)) {
|
|
57
|
+
customElements.define(tagName, CatBadge$1);
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
} });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const CatBadge = CatBadge$1;
|
|
64
|
+
const defineCustomElement = defineCustomElement$1;
|
|
65
|
+
|
|
66
|
+
export { CatBadge, defineCustomElement };
|
|
@@ -1,46 +1,19 @@
|
|
|
1
|
-
import { HTMLElement, createEvent, h
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$3 } from './cat-icon2.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './cat-spinner2.js';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
6
|
|
|
7
|
-
function getDefaultExportFromCjs (x) {
|
|
8
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
7
|
function createCommonjsModule(fn, basedir, module) {
|
|
12
8
|
return module = {
|
|
13
9
|
path: basedir,
|
|
14
10
|
exports: {},
|
|
15
11
|
require: function (path, base) {
|
|
16
|
-
return commonjsRequire(
|
|
12
|
+
return commonjsRequire();
|
|
17
13
|
}
|
|
18
14
|
}, fn(module, module.exports), module.exports;
|
|
19
15
|
}
|
|
20
16
|
|
|
21
|
-
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
22
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
26
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function getAugmentedNamespace(n) {
|
|
30
|
-
if (n.__esModule) return n;
|
|
31
|
-
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
32
|
-
Object.keys(n).forEach(function (k) {
|
|
33
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
34
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function () {
|
|
37
|
-
return n[k];
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
return a;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
17
|
function commonjsRequire () {
|
|
45
18
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
46
19
|
}
|
|
@@ -53,16 +26,12 @@ var loglevel = createCommonjsModule(function (module) {
|
|
|
53
26
|
* Licensed under the MIT license.
|
|
54
27
|
*/
|
|
55
28
|
(function (root, definition) {
|
|
56
|
-
|
|
57
|
-
if (typeof undefined === 'function' && undefined.amd) {
|
|
58
|
-
undefined(definition);
|
|
59
|
-
} else if ('object' === 'object' && module.exports) {
|
|
29
|
+
if (module.exports) {
|
|
60
30
|
module.exports = definition();
|
|
61
31
|
} else {
|
|
62
32
|
root.log = definition();
|
|
63
33
|
}
|
|
64
34
|
}(commonjsGlobal, function () {
|
|
65
|
-
"use strict";
|
|
66
35
|
|
|
67
36
|
// Slightly dubious tricks to cut down minimized file size
|
|
68
37
|
var noop = function() {};
|
|
@@ -460,24 +429,25 @@ function createEmptyStyleRule(query) {
|
|
|
460
429
|
}
|
|
461
430
|
}
|
|
462
431
|
|
|
463
|
-
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}.cat-button{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-content{flex:1 1 auto;text-align:center}.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:
|
|
432
|
+
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{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-content{flex:1 1 auto;text-align:center}.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}";
|
|
464
433
|
|
|
465
|
-
|
|
434
|
+
const CatButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
466
435
|
constructor() {
|
|
467
436
|
super();
|
|
468
437
|
this.__registerHost();
|
|
469
438
|
this.__attachShadow();
|
|
439
|
+
this.catClick = createEvent(this, "catClick", 7);
|
|
470
440
|
this.catFocus = createEvent(this, "catFocus", 7);
|
|
471
441
|
this.catBlur = createEvent(this, "catBlur", 7);
|
|
472
442
|
this._iconOnly = true;
|
|
473
443
|
/**
|
|
474
444
|
* The rendering style of the button.
|
|
475
445
|
*/
|
|
476
|
-
this.variant = '
|
|
446
|
+
this.variant = 'outlined';
|
|
477
447
|
/**
|
|
478
448
|
* The color palette of the button.
|
|
479
449
|
*/
|
|
480
|
-
this.color = '
|
|
450
|
+
this.color = 'secondary';
|
|
481
451
|
/**
|
|
482
452
|
* The size of the button.
|
|
483
453
|
*/
|
|
@@ -569,7 +539,7 @@ let CatButton$1 = class extends HTMLElement {
|
|
|
569
539
|
[`cat-button-${this.variant}`]: Boolean(this.variant),
|
|
570
540
|
[`cat-button-${this.color}`]: Boolean(this.color),
|
|
571
541
|
[`cat-button-${this.size}`]: Boolean(this.size)
|
|
572
|
-
}, onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
|
|
542
|
+
}, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
|
|
573
543
|
}
|
|
574
544
|
else {
|
|
575
545
|
return (h("button", { ref: el => (this.button = el), type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, id: this.buttonId, part: "button", class: {
|
|
@@ -582,7 +552,7 @@ let CatButton$1 = class extends HTMLElement {
|
|
|
582
552
|
[`cat-button-${this.variant}`]: Boolean(this.variant),
|
|
583
553
|
[`cat-button-${this.color}`]: Boolean(this.color),
|
|
584
554
|
[`cat-button-${this.size}`]: Boolean(this.size)
|
|
585
|
-
}, onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
|
|
555
|
+
}, onClick: this.onClick.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
|
|
586
556
|
}
|
|
587
557
|
}
|
|
588
558
|
get iconSize() {
|
|
@@ -618,6 +588,9 @@ let CatButton$1 = class extends HTMLElement {
|
|
|
618
588
|
this.loading ? h("cat-spinner", { size: this.spinnerSize }) : null
|
|
619
589
|
];
|
|
620
590
|
}
|
|
591
|
+
onClick(event) {
|
|
592
|
+
this.catClick.emit(event);
|
|
593
|
+
}
|
|
621
594
|
onFocus(event) {
|
|
622
595
|
this.catFocus.emit(event);
|
|
623
596
|
}
|
|
@@ -628,8 +601,7 @@ let CatButton$1 = class extends HTMLElement {
|
|
|
628
601
|
"iconOnly": ["onIconOnlyChanged"]
|
|
629
602
|
}; }
|
|
630
603
|
static get style() { return catButtonCss; }
|
|
631
|
-
}
|
|
632
|
-
CatButton$1 = /*@__PURE__*/ proxyCustomElement(CatButton$1, [1, "cat-button", {
|
|
604
|
+
}, [1, "cat-button", {
|
|
633
605
|
"variant": [1],
|
|
634
606
|
"color": [1],
|
|
635
607
|
"size": [1],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HTMLElement, h
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { C as CatIconRegistry } from './cat-icon-registry.js';
|
|
3
3
|
|
|
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}";
|
|
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
|
-
|
|
6
|
+
const CatIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
9
9
|
this.__registerHost();
|
|
@@ -24,8 +24,7 @@ let CatIcon = class extends HTMLElement {
|
|
|
24
24
|
} }));
|
|
25
25
|
}
|
|
26
26
|
static get style() { return catIconCss; }
|
|
27
|
-
}
|
|
28
|
-
CatIcon = /*@__PURE__*/ proxyCustomElement(CatIcon, [1, "cat-icon", {
|
|
27
|
+
}, [1, "cat-icon", {
|
|
29
28
|
"icon": [1],
|
|
30
29
|
"size": [1],
|
|
31
30
|
"a11yLabel": [1, "a11y-label"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CatMenu extends Components.CatMenu, HTMLElement {}
|
|
4
|
+
export const CatMenu: {
|
|
5
|
+
prototype: CatMenu;
|
|
6
|
+
new (): CatMenu;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|