@stencil-kit/core 0.0.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/LICENSE +21 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/index-BrMvRGjk.js +1430 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/my-badge.cjs.entry.js +29 -0
- package/dist/cjs/my-button.cjs.entry.js +29 -0
- package/dist/cjs/my-card.cjs.entry.js +29 -0
- package/dist/cjs/my-component.cjs.entry.js +33 -0
- package/dist/cjs/stencil-library.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +16 -0
- package/dist/collection/components/my-badge/my-badge.css +67 -0
- package/dist/collection/components/my-badge/my-badge.js +94 -0
- package/dist/collection/components/my-button/my-button.css +75 -0
- package/dist/collection/components/my-button/my-button.js +94 -0
- package/dist/collection/components/my-card/my-card.css +76 -0
- package/dist/collection/components/my-card/my-card.js +92 -0
- package/dist/collection/components/my-component/my-component.cmp.test.js +27 -0
- package/dist/collection/components/my-component/my-component.css +3 -0
- package/dist/collection/components/my-component/my-component.js +95 -0
- package/dist/collection/index.js +10 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/collection/utils/utils.unit.test.js +16 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/my-badge.d.ts +11 -0
- package/dist/components/my-badge.js +1 -0
- package/dist/components/my-button.d.ts +11 -0
- package/dist/components/my-button.js +1 -0
- package/dist/components/my-card.d.ts +11 -0
- package/dist/components/my-card.js +1 -0
- package/dist/components/my-component.d.ts +11 -0
- package/dist/components/my-component.js +1 -0
- package/dist/components/p-BJi3ojZX.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/index-Bdf40fwG.js +1424 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/my-badge.entry.js +27 -0
- package/dist/esm/my-button.entry.js +27 -0
- package/dist/esm/my-card.entry.js +27 -0
- package/dist/esm/my-component.entry.js +31 -0
- package/dist/esm/stencil-library.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil-library/index.esm.js +1 -0
- package/dist/stencil-library/p-2b74a573.entry.js +1 -0
- package/dist/stencil-library/p-Bdf40fwG.js +2 -0
- package/dist/stencil-library/p-DQuL1Twl.js +1 -0
- package/dist/stencil-library/p-b36446f6.entry.js +1 -0
- package/dist/stencil-library/p-ba774cf9.entry.js +1 -0
- package/dist/stencil-library/p-fd06de5e.entry.js +1 -0
- package/dist/stencil-library/stencil-library.esm.js +1 -0
- package/dist/types/components/my-badge/my-badge.d.ts +15 -0
- package/dist/types/components/my-button/my-button.d.ts +15 -0
- package/dist/types/components/my-card/my-card.d.ts +15 -0
- package/dist/types/components/my-component/my-component.cmp.test.d.ts +1 -0
- package/dist/types/components/my-component/my-component.d.ts +16 -0
- package/dist/types/components.d.ts +208 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/types/utils/utils.unit.test.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +69 -0
- package/readme.md +111 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BrMvRGjk.js');
|
|
4
|
+
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
|
+
|
|
6
|
+
const defineCustomElements = async (win, options) => {
|
|
7
|
+
if (typeof window === 'undefined') return undefined;
|
|
8
|
+
await appGlobals.globalScripts();
|
|
9
|
+
return index.bootstrapLazy([["my-badge.cjs",[[769,"my-badge",{"color":[1],"size":[1],"pill":[4]}]]],["my-button.cjs",[[769,"my-button",{"variant":[1],"size":[1],"disabled":[4]}]]],["my-card.cjs",[[769,"my-card",{"cardTitle":[1,"card-title"],"subtitle":[1],"elevation":[1]}]]],["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.setNonce = index.setNonce;
|
|
13
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BrMvRGjk.js');
|
|
4
|
+
|
|
5
|
+
const myBadgeCss = () => `:host{display:inline-block}.badge{display:inline-flex;align-items:center;justify-content:center;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;font-weight:600;border-radius:4px;transition:all 0.2s ease}.badge--pill{border-radius:100px}.badge--small{padding:4px 8px;font-size:11px;line-height:1}.badge--medium{padding:6px 12px;font-size:13px;line-height:1}.badge--large{padding:8px 16px;font-size:15px;line-height:1}.badge--success{background-color:#10b981;color:white}.badge--warning{background-color:#f59e0b;color:white}.badge--error{background-color:#ef4444;color:white}.badge--info{background-color:#3b82f6;color:white}.badge--neutral{background-color:#6b7280;color:white}.badge:hover{opacity:0.9;transform:scale(1.05)}`;
|
|
6
|
+
|
|
7
|
+
const MyBadge = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Badge color variant
|
|
13
|
+
*/
|
|
14
|
+
color = 'neutral';
|
|
15
|
+
/**
|
|
16
|
+
* Badge size
|
|
17
|
+
*/
|
|
18
|
+
size = 'medium';
|
|
19
|
+
/**
|
|
20
|
+
* Rounded pill style
|
|
21
|
+
*/
|
|
22
|
+
pill = false;
|
|
23
|
+
render() {
|
|
24
|
+
return (index.h("span", { key: '33a316730b54199e32c7ecbd1160997411e5ff95', class: `badge badge--${this.color} badge--${this.size} ${this.pill ? 'badge--pill' : ''}` }, index.h("slot", { key: 'eb7a3e46ea27e7d714dcc60723ca7f5801204674' })));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
MyBadge.style = myBadgeCss();
|
|
28
|
+
|
|
29
|
+
exports.my_badge = MyBadge;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BrMvRGjk.js');
|
|
4
|
+
|
|
5
|
+
const myButtonCss = () => `:host{display:inline-block}.btn{font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;font-weight:600;border:none;border-radius:8px;cursor:pointer;transition:all 0.2s ease;text-align:center;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15)}.btn:active:not(:disabled){transform:translateY(0)}.btn:disabled{opacity:0.5;cursor:not-allowed}.btn--small{padding:8px 16px;font-size:14px}.btn--medium{padding:12px 24px;font-size:16px}.btn--large{padding:16px 32px;font-size:18px}.btn--primary{background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);color:white}.btn--primary:hover:not(:disabled){background:linear-gradient(135deg, #5568d3 0%, #63408a 100%)}.btn--secondary{background:linear-gradient(135deg, #f093fb 0%, #f5576c 100%);color:white}.btn--secondary:hover:not(:disabled){background:linear-gradient(135deg, #d97ee0 0%, #db4a5d 100%)}.btn--danger{background:linear-gradient(135deg, #fa709a 0%, #fee140 100%);color:#333}.btn--danger:hover:not(:disabled){background:linear-gradient(135deg, #e55d87 0%, #e5ca2b 100%)}`;
|
|
6
|
+
|
|
7
|
+
const MyButton = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The button variant
|
|
13
|
+
*/
|
|
14
|
+
variant = 'primary';
|
|
15
|
+
/**
|
|
16
|
+
* The button size
|
|
17
|
+
*/
|
|
18
|
+
size = 'medium';
|
|
19
|
+
/**
|
|
20
|
+
* Disabled state
|
|
21
|
+
*/
|
|
22
|
+
disabled = false;
|
|
23
|
+
render() {
|
|
24
|
+
return (index.h("button", { key: '94d04ac3ac7441f76510463322200c2b7a01d569', class: `btn btn--${this.variant} btn--${this.size}`, disabled: this.disabled }, index.h("slot", { key: '80f6c9a56010f80635288b16804d33c780232da5' })));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
MyButton.style = myButtonCss();
|
|
28
|
+
|
|
29
|
+
exports.my_button = MyButton;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BrMvRGjk.js');
|
|
4
|
+
|
|
5
|
+
const myCardCss = () => `:host{display:block}.card{background:white;border-radius:12px;overflow:hidden;transition:all 0.3s ease;border:1px solid #e5e7eb}.card:hover{transform:translateY(-4px)}.card--low{box-shadow:0 1px 3px rgba(0, 0, 0, 0.1)}.card--low:hover{box-shadow:0 4px 6px rgba(0, 0, 0, 0.1)}.card--medium{box-shadow:0 4px 6px rgba(0, 0, 0, 0.1)}.card--medium:hover{box-shadow:0 10px 15px rgba(0, 0, 0, 0.15)}.card--high{box-shadow:0 10px 15px rgba(0, 0, 0, 0.15)}.card--high:hover{box-shadow:0 20px 25px rgba(0, 0, 0, 0.2)}.card__header{padding:24px 24px 0}.card__title{margin:0;font-size:24px;font-weight:700;color:#1f2937;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif}.card__subtitle{margin:8px 0 0;font-size:14px;color:#6b7280;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif}.card__content{padding:24px;color:#374151;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;line-height:1.6}.card__footer{padding:0 24px 24px;display:flex;gap:12px;align-items:center}.card__footer:empty{display:none}`;
|
|
6
|
+
|
|
7
|
+
const MyCard = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Card title
|
|
13
|
+
*/
|
|
14
|
+
cardTitle;
|
|
15
|
+
/**
|
|
16
|
+
* Card subtitle
|
|
17
|
+
*/
|
|
18
|
+
subtitle;
|
|
19
|
+
/**
|
|
20
|
+
* Card elevation (shadow depth)
|
|
21
|
+
*/
|
|
22
|
+
elevation = 'medium';
|
|
23
|
+
render() {
|
|
24
|
+
return (index.h("div", { key: '771331816e786b93963b10dcc4577c89da6385c5', class: `card card--${this.elevation}` }, this.cardTitle && (index.h("div", { key: '525c2dfdda668cb45895f6f1e9b55e6923b9538d', class: "card__header" }, index.h("h3", { key: 'a3025832b6ce60e73dce68f575bca6fbb1143913', class: "card__title" }, this.cardTitle), this.subtitle && index.h("p", { key: '3c3f094449a06aa41b63db17b3ab27e7e29be437', class: "card__subtitle" }, this.subtitle))), index.h("div", { key: '628c69443cf48fb07ee98fde44c0c2f6de148ed5', class: "card__content" }, index.h("slot", { key: 'f0c2c156603f2179314e7c58aabefbeda3b2e911' })), index.h("div", { key: '8f5a30d595399c6a606a5cde67c393aca93e3d0d', class: "card__footer" }, index.h("slot", { key: '1cb72bdc25ce96673d85c9fc86ff5661975cd412', name: "footer" }))));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
MyCard.style = myCardCss();
|
|
28
|
+
|
|
29
|
+
exports.my_card = MyCard;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BrMvRGjk.js');
|
|
4
|
+
var index$1 = require('./index.cjs.js');
|
|
5
|
+
|
|
6
|
+
const myComponentCss = () => `:host{display:block}`;
|
|
7
|
+
|
|
8
|
+
const MyComponent = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The first name
|
|
14
|
+
*/
|
|
15
|
+
first;
|
|
16
|
+
/**
|
|
17
|
+
* The middle name
|
|
18
|
+
*/
|
|
19
|
+
middle;
|
|
20
|
+
/**
|
|
21
|
+
* The last name
|
|
22
|
+
*/
|
|
23
|
+
last;
|
|
24
|
+
getText() {
|
|
25
|
+
return index$1.format(this.first, this.middle, this.last);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return index.h("div", { key: '543ff9a15c7d307e7e59a1143b033faeee29b1cb' }, "Hello, World! I'm ", this.getText());
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
MyComponent.style = myComponentCss();
|
|
32
|
+
|
|
33
|
+
exports.my_component = MyComponent;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BrMvRGjk.js');
|
|
4
|
+
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
|
+
|
|
6
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
7
|
+
/*
|
|
8
|
+
Stencil Client Patch Browser v4.43.5 | MIT Licensed | https://stenciljs.com
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('stencil-library.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["my-badge.cjs",[[769,"my-badge",{"color":[1],"size":[1],"pill":[4]}]]],["my-button.cjs",[[769,"my-button",{"variant":[1],"size":[1],"disabled":[4]}]]],["my-card.cjs",[[769,"my-card",{"cardTitle":[1,"card-title"],"subtitle":[1],"elevation":[1]}]]],["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"components/my-badge/my-badge.js",
|
|
4
|
+
"components/my-button/my-button.js",
|
|
5
|
+
"components/my-card/my-card.js",
|
|
6
|
+
"components/my-component/my-component.js"
|
|
7
|
+
],
|
|
8
|
+
"mixins": [],
|
|
9
|
+
"compiler": {
|
|
10
|
+
"name": "@stencil/core",
|
|
11
|
+
"version": "4.43.5",
|
|
12
|
+
"typescriptVersion": "5.8.3"
|
|
13
|
+
},
|
|
14
|
+
"collections": [],
|
|
15
|
+
"bundles": []
|
|
16
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.badge {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
transition: all 0.2s ease;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.badge--pill {
|
|
16
|
+
border-radius: 100px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Sizes */
|
|
20
|
+
.badge--small {
|
|
21
|
+
padding: 4px 8px;
|
|
22
|
+
font-size: 11px;
|
|
23
|
+
line-height: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.badge--medium {
|
|
27
|
+
padding: 6px 12px;
|
|
28
|
+
font-size: 13px;
|
|
29
|
+
line-height: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.badge--large {
|
|
33
|
+
padding: 8px 16px;
|
|
34
|
+
font-size: 15px;
|
|
35
|
+
line-height: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Colors */
|
|
39
|
+
.badge--success {
|
|
40
|
+
background-color: #10b981;
|
|
41
|
+
color: white;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.badge--warning {
|
|
45
|
+
background-color: #f59e0b;
|
|
46
|
+
color: white;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.badge--error {
|
|
50
|
+
background-color: #ef4444;
|
|
51
|
+
color: white;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.badge--info {
|
|
55
|
+
background-color: #3b82f6;
|
|
56
|
+
color: white;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.badge--neutral {
|
|
60
|
+
background-color: #6b7280;
|
|
61
|
+
color: white;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.badge:hover {
|
|
65
|
+
opacity: 0.9;
|
|
66
|
+
transform: scale(1.05);
|
|
67
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class MyBadge {
|
|
3
|
+
/**
|
|
4
|
+
* Badge color variant
|
|
5
|
+
*/
|
|
6
|
+
color = 'neutral';
|
|
7
|
+
/**
|
|
8
|
+
* Badge size
|
|
9
|
+
*/
|
|
10
|
+
size = 'medium';
|
|
11
|
+
/**
|
|
12
|
+
* Rounded pill style
|
|
13
|
+
*/
|
|
14
|
+
pill = false;
|
|
15
|
+
render() {
|
|
16
|
+
return (h("span", { key: '33a316730b54199e32c7ecbd1160997411e5ff95', class: `badge badge--${this.color} badge--${this.size} ${this.pill ? 'badge--pill' : ''}` }, h("slot", { key: 'eb7a3e46ea27e7d714dcc60723ca7f5801204674' })));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "my-badge"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get originalStyleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["my-badge.css"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get styleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["my-badge.css"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get properties() {
|
|
31
|
+
return {
|
|
32
|
+
"color": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"mutable": false,
|
|
35
|
+
"complexType": {
|
|
36
|
+
"original": "'success' | 'warning' | 'error' | 'info' | 'neutral'",
|
|
37
|
+
"resolved": "\"error\" | \"info\" | \"neutral\" | \"success\" | \"warning\"",
|
|
38
|
+
"references": {}
|
|
39
|
+
},
|
|
40
|
+
"required": false,
|
|
41
|
+
"optional": false,
|
|
42
|
+
"docs": {
|
|
43
|
+
"tags": [],
|
|
44
|
+
"text": "Badge color variant"
|
|
45
|
+
},
|
|
46
|
+
"getter": false,
|
|
47
|
+
"setter": false,
|
|
48
|
+
"reflect": false,
|
|
49
|
+
"attribute": "color",
|
|
50
|
+
"defaultValue": "'neutral'"
|
|
51
|
+
},
|
|
52
|
+
"size": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "'small' | 'medium' | 'large'",
|
|
57
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": "Badge size"
|
|
65
|
+
},
|
|
66
|
+
"getter": false,
|
|
67
|
+
"setter": false,
|
|
68
|
+
"reflect": false,
|
|
69
|
+
"attribute": "size",
|
|
70
|
+
"defaultValue": "'medium'"
|
|
71
|
+
},
|
|
72
|
+
"pill": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "boolean",
|
|
77
|
+
"resolved": "boolean",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": false,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": "Rounded pill style"
|
|
85
|
+
},
|
|
86
|
+
"getter": false,
|
|
87
|
+
"setter": false,
|
|
88
|
+
"reflect": false,
|
|
89
|
+
"attribute": "pill",
|
|
90
|
+
"defaultValue": "false"
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.btn {
|
|
6
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
border: none;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
transition: all 0.2s ease;
|
|
12
|
+
text-align: center;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.btn:hover:not(:disabled) {
|
|
20
|
+
transform: translateY(-2px);
|
|
21
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.btn:active:not(:disabled) {
|
|
25
|
+
transform: translateY(0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.btn:disabled {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Sizes */
|
|
34
|
+
.btn--small {
|
|
35
|
+
padding: 8px 16px;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.btn--medium {
|
|
40
|
+
padding: 12px 24px;
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.btn--large {
|
|
45
|
+
padding: 16px 32px;
|
|
46
|
+
font-size: 18px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Variants */
|
|
50
|
+
.btn--primary {
|
|
51
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
52
|
+
color: white;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.btn--primary:hover:not(:disabled) {
|
|
56
|
+
background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.btn--secondary {
|
|
60
|
+
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
|
61
|
+
color: white;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.btn--secondary:hover:not(:disabled) {
|
|
65
|
+
background: linear-gradient(135deg, #d97ee0 0%, #db4a5d 100%);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.btn--danger {
|
|
69
|
+
background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
|
|
70
|
+
color: #333;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.btn--danger:hover:not(:disabled) {
|
|
74
|
+
background: linear-gradient(135deg, #e55d87 0%, #e5ca2b 100%);
|
|
75
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class MyButton {
|
|
3
|
+
/**
|
|
4
|
+
* The button variant
|
|
5
|
+
*/
|
|
6
|
+
variant = 'primary';
|
|
7
|
+
/**
|
|
8
|
+
* The button size
|
|
9
|
+
*/
|
|
10
|
+
size = 'medium';
|
|
11
|
+
/**
|
|
12
|
+
* Disabled state
|
|
13
|
+
*/
|
|
14
|
+
disabled = false;
|
|
15
|
+
render() {
|
|
16
|
+
return (h("button", { key: '94d04ac3ac7441f76510463322200c2b7a01d569', class: `btn btn--${this.variant} btn--${this.size}`, disabled: this.disabled }, h("slot", { key: '80f6c9a56010f80635288b16804d33c780232da5' })));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "my-button"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get originalStyleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["my-button.css"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get styleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["my-button.css"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get properties() {
|
|
31
|
+
return {
|
|
32
|
+
"variant": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"mutable": false,
|
|
35
|
+
"complexType": {
|
|
36
|
+
"original": "'primary' | 'secondary' | 'danger'",
|
|
37
|
+
"resolved": "\"danger\" | \"primary\" | \"secondary\"",
|
|
38
|
+
"references": {}
|
|
39
|
+
},
|
|
40
|
+
"required": false,
|
|
41
|
+
"optional": false,
|
|
42
|
+
"docs": {
|
|
43
|
+
"tags": [],
|
|
44
|
+
"text": "The button variant"
|
|
45
|
+
},
|
|
46
|
+
"getter": false,
|
|
47
|
+
"setter": false,
|
|
48
|
+
"reflect": false,
|
|
49
|
+
"attribute": "variant",
|
|
50
|
+
"defaultValue": "'primary'"
|
|
51
|
+
},
|
|
52
|
+
"size": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "'small' | 'medium' | 'large'",
|
|
57
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": "The button size"
|
|
65
|
+
},
|
|
66
|
+
"getter": false,
|
|
67
|
+
"setter": false,
|
|
68
|
+
"reflect": false,
|
|
69
|
+
"attribute": "size",
|
|
70
|
+
"defaultValue": "'medium'"
|
|
71
|
+
},
|
|
72
|
+
"disabled": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "boolean",
|
|
77
|
+
"resolved": "boolean",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": false,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": "Disabled state"
|
|
85
|
+
},
|
|
86
|
+
"getter": false,
|
|
87
|
+
"setter": false,
|
|
88
|
+
"reflect": false,
|
|
89
|
+
"attribute": "disabled",
|
|
90
|
+
"defaultValue": "false"
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.card {
|
|
6
|
+
background: white;
|
|
7
|
+
border-radius: 12px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
transition: all 0.3s ease;
|
|
10
|
+
border: 1px solid #e5e7eb;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.card:hover {
|
|
14
|
+
transform: translateY(-4px);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.card--low {
|
|
18
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.card--low:hover {
|
|
22
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.card--medium {
|
|
26
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.card--medium:hover {
|
|
30
|
+
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.card--high {
|
|
34
|
+
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.card--high:hover {
|
|
38
|
+
box-shadow: 0 20px 25px rgba(0, 0, 0, 0.2);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.card__header {
|
|
42
|
+
padding: 24px 24px 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.card__title {
|
|
46
|
+
margin: 0;
|
|
47
|
+
font-size: 24px;
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
color: #1f2937;
|
|
50
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.card__subtitle {
|
|
54
|
+
margin: 8px 0 0;
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
color: #6b7280;
|
|
57
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.card__content {
|
|
61
|
+
padding: 24px;
|
|
62
|
+
color: #374151;
|
|
63
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
64
|
+
line-height: 1.6;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.card__footer {
|
|
68
|
+
padding: 0 24px 24px;
|
|
69
|
+
display: flex;
|
|
70
|
+
gap: 12px;
|
|
71
|
+
align-items: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.card__footer:empty {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|