@haiilo/catalyst 0.2.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/assets/fonts/AzeretMono-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Bold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Italic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Medium.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Black.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Black.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Hairline.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Hairline.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Heavy.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Heavy.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Light.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Light.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-LightItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-LightItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Medium.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Medium.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Semibold.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Semibold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Thin.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Thin.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff2 +0 -0
- package/dist/catalyst/catalyst.css +1 -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-89a97b7b.entry.js +10 -0
- package/dist/catalyst/p-89a97b7b.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_9.cjs.entry.js +4557 -0
- package/dist/cjs/cat-alert_9.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/assets/fonts/AzeretMono-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Bold.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Italic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Medium.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Black.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Black.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-BlackItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-BlackItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Hairline.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Hairline.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-HairlineItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Heavy.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Heavy.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-HeavyItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Light.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Light.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-LightItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-LightItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Medium.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Medium.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-MediumItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-MediumItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Semibold.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Semibold.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Thin.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Thin.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-ThinItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-ThinItalic.woff2 +0 -0
- package/dist/collection/collection-manifest.json +21 -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 +184 -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/components/cat-tooltip/cat-tooltip.css +37 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +254 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -0
- package/dist/collection/index.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/first-tabbable.js +6 -0
- package/dist/collection/utils/first-tabbable.js.map +1 -0
- package/dist/collection/utils/is-touch-screen.js +3 -0
- package/dist/collection/utils/is-touch-screen.js.map +1 -0
- package/dist/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/components/cat-menu.js +870 -0
- 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/{cat-input.d.ts → cat-tooltip.d.ts} +4 -4
- package/dist/components/cat-tooltip.js +154 -0
- package/dist/components/cat-tooltip.js.map +1 -0
- package/dist/components/first-tabbable.js +1495 -0
- package/dist/components/first-tabbable.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_9.entry.js +4545 -0
- package/dist/esm/cat-alert_9.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/components/cat-menu/cat-menu.d.ts +0 -1
- package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +46 -0
- package/dist/types/components.d.ts +61 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/first-tabbable.d.ts +4 -0
- package/dist/types/utils/is-touch-screen.d.ts +2 -0
- package/package.json +12 -19
- 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 +0 -2986
- 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/types/components/cat-input/cat-input.d.ts +0 -70
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
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-scrollable/cat-scrollable.js",
|
|
9
|
+
"./components/cat-skeleton/cat-skeleton.js",
|
|
10
|
+
"./components/cat-spinner/cat-spinner.js",
|
|
11
|
+
"./components/cat-tooltip/cat-tooltip.js"
|
|
12
|
+
],
|
|
13
|
+
"compiler": {
|
|
14
|
+
"name": "@stencil/core",
|
|
15
|
+
"version": "2.15.0",
|
|
16
|
+
"typescriptVersion": "4.5.4"
|
|
17
|
+
},
|
|
18
|
+
"collections": [],
|
|
19
|
+
"bundles": [],
|
|
20
|
+
"global": "init.js"
|
|
21
|
+
}
|
|
@@ -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,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"]}
|