@luster-ui/ui 1.0.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/PUBLISHING.md +469 -0
- package/README.md +423 -0
- package/dist/cjs/index-Couc0LVo.js +1571 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/luster-accordion_19.cjs.entry.js +555 -0
- package/dist/cjs/luster-card.cjs.entry.js +25 -0
- package/dist/cjs/luster.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +32 -0
- package/dist/collection/components/luster-accordion/luster-accordion.css +76 -0
- package/dist/collection/components/luster-accordion/luster-accordion.js +160 -0
- package/dist/collection/components/luster-accordion/luster-accordion.stories.js +88 -0
- package/dist/collection/components/luster-activity-item/luster-activity-item.css +102 -0
- package/dist/collection/components/luster-activity-item/luster-activity-item.js +188 -0
- package/dist/collection/components/luster-activity-item/luster-activity-item.stories.js +94 -0
- package/dist/collection/components/luster-alert/luster-alert.css +71 -0
- package/dist/collection/components/luster-alert/luster-alert.js +171 -0
- package/dist/collection/components/luster-alert/luster-alert.stories.js +82 -0
- package/dist/collection/components/luster-article-card/luster-article-card.css +120 -0
- package/dist/collection/components/luster-article-card/luster-article-card.js +192 -0
- package/dist/collection/components/luster-article-card/luster-article-card.stories.js +82 -0
- package/dist/collection/components/luster-badge/luster-badge.css +38 -0
- package/dist/collection/components/luster-badge/luster-badge.js +87 -0
- package/dist/collection/components/luster-badge/luster-badge.stories.js +86 -0
- package/dist/collection/components/luster-button/luster-button.css +121 -0
- package/dist/collection/components/luster-button/luster-button.js +179 -0
- package/dist/collection/components/luster-button/luster-button.stories.js +103 -0
- package/dist/collection/components/luster-card/luster-card.css +29 -0
- package/dist/collection/components/luster-card/luster-card.js +92 -0
- package/dist/collection/components/luster-card/luster-card.stories.js +67 -0
- package/dist/collection/components/luster-checkbox/luster-checkbox.css +42 -0
- package/dist/collection/components/luster-checkbox/luster-checkbox.js +162 -0
- package/dist/collection/components/luster-checkbox/luster-checkbox.stories.js +78 -0
- package/dist/collection/components/luster-color-swatch/luster-color-swatch.css +33 -0
- package/dist/collection/components/luster-color-swatch/luster-color-swatch.js +108 -0
- package/dist/collection/components/luster-color-swatch/luster-color-swatch.stories.js +58 -0
- package/dist/collection/components/luster-feature-quote/luster-feature-quote.css +84 -0
- package/dist/collection/components/luster-feature-quote/luster-feature-quote.js +108 -0
- package/dist/collection/components/luster-feature-quote/luster-feature-quote.stories.js +52 -0
- package/dist/collection/components/luster-hero/luster-hero.css +119 -0
- package/dist/collection/components/luster-hero/luster-hero.js +129 -0
- package/dist/collection/components/luster-hero/luster-hero.stories.js +72 -0
- package/dist/collection/components/luster-input/luster-input.css +72 -0
- package/dist/collection/components/luster-input/luster-input.js +332 -0
- package/dist/collection/components/luster-input/luster-input.stories.js +106 -0
- package/dist/collection/components/luster-modal/luster-modal.css +103 -0
- package/dist/collection/components/luster-modal/luster-modal.js +215 -0
- package/dist/collection/components/luster-modal/luster-modal.stories.js +78 -0
- package/dist/collection/components/luster-navbar/luster-navbar.css +151 -0
- package/dist/collection/components/luster-navbar/luster-navbar.js +87 -0
- package/dist/collection/components/luster-navbar/luster-navbar.stories.js +41 -0
- package/dist/collection/components/luster-profile-card/luster-profile-card.css +89 -0
- package/dist/collection/components/luster-profile-card/luster-profile-card.js +194 -0
- package/dist/collection/components/luster-profile-card/luster-profile-card.stories.js +56 -0
- package/dist/collection/components/luster-resource-table/luster-resource-table.css +141 -0
- package/dist/collection/components/luster-resource-table/luster-resource-table.js +78 -0
- package/dist/collection/components/luster-resource-table/luster-resource-table.stories.js +44 -0
- package/dist/collection/components/luster-sidebar/luster-sidebar.css +152 -0
- package/dist/collection/components/luster-sidebar/luster-sidebar.js +78 -0
- package/dist/collection/components/luster-sidebar/luster-sidebar.stories.js +34 -0
- package/dist/collection/components/luster-stat-card/luster-stat-card.css +82 -0
- package/dist/collection/components/luster-stat-card/luster-stat-card.js +194 -0
- package/dist/collection/components/luster-stat-card/luster-stat-card.stories.js +75 -0
- package/dist/collection/components/luster-tabs/luster-tabs.css +35 -0
- package/dist/collection/components/luster-tabs/luster-tabs.js +116 -0
- package/dist/collection/components/luster-tabs/luster-tabs.stories.js +56 -0
- package/dist/collection/components/luster-toggle/luster-toggle.css +48 -0
- package/dist/collection/components/luster-toggle/luster-toggle.js +120 -0
- package/dist/collection/components/luster-toggle/luster-toggle.stories.js +66 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +1 -0
- package/dist/components/luster-accordion.d.ts +11 -0
- package/dist/components/luster-accordion.js +1 -0
- package/dist/components/luster-activity-item.d.ts +11 -0
- package/dist/components/luster-activity-item.js +1 -0
- package/dist/components/luster-alert.d.ts +11 -0
- package/dist/components/luster-alert.js +1 -0
- package/dist/components/luster-article-card.d.ts +11 -0
- package/dist/components/luster-article-card.js +1 -0
- package/dist/components/luster-badge.d.ts +11 -0
- package/dist/components/luster-badge.js +1 -0
- package/dist/components/luster-badge2.js +1 -0
- package/dist/components/luster-button.d.ts +11 -0
- package/dist/components/luster-button.js +1 -0
- package/dist/components/luster-button2.js +1 -0
- package/dist/components/luster-card.d.ts +11 -0
- package/dist/components/luster-card.js +1 -0
- package/dist/components/luster-checkbox.d.ts +11 -0
- package/dist/components/luster-checkbox.js +1 -0
- package/dist/components/luster-color-swatch.d.ts +11 -0
- package/dist/components/luster-color-swatch.js +1 -0
- package/dist/components/luster-feature-quote.d.ts +11 -0
- package/dist/components/luster-feature-quote.js +1 -0
- package/dist/components/luster-hero.d.ts +11 -0
- package/dist/components/luster-hero.js +1 -0
- package/dist/components/luster-input.d.ts +11 -0
- package/dist/components/luster-input.js +1 -0
- package/dist/components/luster-modal.d.ts +11 -0
- package/dist/components/luster-modal.js +1 -0
- package/dist/components/luster-navbar.d.ts +11 -0
- package/dist/components/luster-navbar.js +1 -0
- package/dist/components/luster-profile-card.d.ts +11 -0
- package/dist/components/luster-profile-card.js +1 -0
- package/dist/components/luster-resource-table.d.ts +11 -0
- package/dist/components/luster-resource-table.js +1 -0
- package/dist/components/luster-sidebar.d.ts +11 -0
- package/dist/components/luster-sidebar.js +1 -0
- package/dist/components/luster-stat-card.d.ts +11 -0
- package/dist/components/luster-stat-card.js +1 -0
- package/dist/components/luster-tabs.d.ts +11 -0
- package/dist/components/luster-tabs.js +1 -0
- package/dist/components/luster-toggle.d.ts +11 -0
- package/dist/components/luster-toggle.js +1 -0
- package/dist/components/luster-toggle2.js +1 -0
- package/dist/esm/index-CeYIN8dN.js +1563 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/luster-accordion_19.entry.js +535 -0
- package/dist/esm/luster-card.entry.js +23 -0
- package/dist/esm/luster.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/luster/index.esm.js +0 -0
- package/dist/luster/luster.css +313 -0
- package/dist/luster/luster.esm.js +1 -0
- package/dist/luster/p-3c4ce897.entry.js +1 -0
- package/dist/luster/p-CeYIN8dN.js +2 -0
- package/dist/luster/p-e368ec08.entry.js +1 -0
- package/dist/types/.stencil/luster-accordion/luster-accordion.d.ts +13 -0
- package/dist/types/.stencil/luster-accordion/luster-accordion.stories.d.ts +10 -0
- package/dist/types/.stencil/luster-activity-item/luster-activity-item.d.ts +11 -0
- package/dist/types/.stencil/luster-activity-item/luster-activity-item.stories.d.ts +9 -0
- package/dist/types/.stencil/luster-alert/luster-alert.d.ts +13 -0
- package/dist/types/.stencil/luster-alert/luster-alert.stories.d.ts +10 -0
- package/dist/types/.stencil/luster-article-card/luster-article-card.d.ts +11 -0
- package/dist/types/.stencil/luster-article-card/luster-article-card.stories.d.ts +8 -0
- package/dist/types/.stencil/luster-badge/luster-badge.d.ts +6 -0
- package/dist/types/.stencil/luster-badge/luster-badge.stories.d.ts +12 -0
- package/dist/types/.stencil/luster-button/luster-button.d.ts +12 -0
- package/dist/types/.stencil/luster-button/luster-button.stories.d.ts +13 -0
- package/dist/types/.stencil/luster-card/luster-card.d.ts +6 -0
- package/dist/types/.stencil/luster-card/luster-card.stories.d.ts +10 -0
- package/dist/types/.stencil/luster-checkbox/luster-checkbox.d.ts +13 -0
- package/dist/types/.stencil/luster-checkbox/luster-checkbox.stories.d.ts +10 -0
- package/dist/types/.stencil/luster-color-swatch/luster-color-swatch.d.ts +7 -0
- package/dist/types/.stencil/luster-color-swatch/luster-color-swatch.stories.d.ts +8 -0
- package/dist/types/.stencil/luster-feature-quote/luster-feature-quote.d.ts +7 -0
- package/dist/types/.stencil/luster-feature-quote/luster-feature-quote.stories.d.ts +8 -0
- package/dist/types/.stencil/luster-hero/luster-hero.d.ts +8 -0
- package/dist/types/.stencil/luster-hero/luster-hero.stories.d.ts +8 -0
- package/dist/types/.stencil/luster-input/luster-input.d.ts +25 -0
- package/dist/types/.stencil/luster-input/luster-input.stories.d.ts +9 -0
- package/dist/types/.stencil/luster-modal/luster-modal.d.ts +17 -0
- package/dist/types/.stencil/luster-modal/luster-modal.stories.d.ts +8 -0
- package/dist/types/.stencil/luster-navbar/luster-navbar.d.ts +6 -0
- package/dist/types/.stencil/luster-navbar/luster-navbar.stories.d.ts +6 -0
- package/dist/types/.stencil/luster-profile-card/luster-profile-card.d.ts +11 -0
- package/dist/types/.stencil/luster-profile-card/luster-profile-card.stories.d.ts +7 -0
- package/dist/types/.stencil/luster-resource-table/luster-resource-table.d.ts +14 -0
- package/dist/types/.stencil/luster-resource-table/luster-resource-table.stories.d.ts +6 -0
- package/dist/types/.stencil/luster-sidebar/luster-sidebar.d.ts +9 -0
- package/dist/types/.stencil/luster-sidebar/luster-sidebar.stories.d.ts +8 -0
- package/dist/types/.stencil/luster-stat-card/luster-stat-card.d.ts +11 -0
- package/dist/types/.stencil/luster-stat-card/luster-stat-card.stories.d.ts +8 -0
- package/dist/types/.stencil/luster-tabs/luster-tabs.d.ts +15 -0
- package/dist/types/.stencil/luster-tabs/luster-tabs.stories.d.ts +7 -0
- package/dist/types/.stencil/luster-toggle/luster-toggle.d.ts +11 -0
- package/dist/types/.stencil/luster-toggle/luster-toggle.stories.d.ts +9 -0
- package/dist/types/components.d.ts +1355 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -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 +73 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:host([full-width]) {
|
|
6
|
+
display: flex;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.btn {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
gap: var(--dc-space-2);
|
|
15
|
+
border: none;
|
|
16
|
+
border-radius: var(--dc-round-2);
|
|
17
|
+
font-family: var(--dc-font-body);
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
position: relative;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
transition: all var(--dc-transition-base);
|
|
25
|
+
letter-spacing: 0.01em;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.btn--full { width: 100%; }
|
|
29
|
+
|
|
30
|
+
/* Sizes */
|
|
31
|
+
.btn--sm { padding: var(--dc-space-1) var(--dc-space-3); font-size: var(--dc-label-md); height: 32px; }
|
|
32
|
+
.btn--md { padding: var(--dc-space-2) var(--dc-space-5); font-size: var(--dc-body-md); height: 40px; }
|
|
33
|
+
.btn--lg { padding: var(--dc-space-3) var(--dc-space-6); font-size: var(--dc-body-lg); height: 48px; }
|
|
34
|
+
|
|
35
|
+
/* Primary - gradient "lit from within" */
|
|
36
|
+
.btn--primary {
|
|
37
|
+
background: linear-gradient(135deg, var(--dc-primary) 0%, var(--dc-primary-dim) 100%);
|
|
38
|
+
color: var(--dc-on-primary);
|
|
39
|
+
box-shadow: var(--dc-btn-primary-shadow);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.btn--primary:hover:not(:disabled) {
|
|
43
|
+
background: var(--dc-btn-primary-gradient-hover);
|
|
44
|
+
box-shadow: var(--dc-btn-primary-shadow-hover);
|
|
45
|
+
transform: translateY(-1px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.btn--primary:active:not(:disabled) {
|
|
49
|
+
transform: translateY(0);
|
|
50
|
+
box-shadow: var(--dc-btn-primary-shadow-press);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Secondary - ghost border */
|
|
54
|
+
.btn--secondary {
|
|
55
|
+
background: transparent;
|
|
56
|
+
color: var(--dc-on-surface);
|
|
57
|
+
border: 1px solid var(--dc-border-strong);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.btn--secondary:hover:not(:disabled) {
|
|
61
|
+
background: var(--dc-hover-tint-icon);
|
|
62
|
+
border-color: var(--dc-border-hover);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Tertiary - text only */
|
|
66
|
+
.btn--tertiary {
|
|
67
|
+
background: transparent;
|
|
68
|
+
color: var(--dc-primary);
|
|
69
|
+
padding-left: var(--dc-space-2);
|
|
70
|
+
padding-right: var(--dc-space-2);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.btn--tertiary:hover:not(:disabled) {
|
|
74
|
+
color: var(--dc-primary-fixed);
|
|
75
|
+
background: var(--dc-hover-tint-strong);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Destructive */
|
|
79
|
+
.btn--destructive {
|
|
80
|
+
background: transparent;
|
|
81
|
+
color: var(--dc-error);
|
|
82
|
+
border: 1px solid var(--dc-error-border);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.btn--destructive:hover:not(:disabled) {
|
|
86
|
+
background: var(--dc-error-bg);
|
|
87
|
+
border-color: var(--dc-error-border-hover);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Disabled */
|
|
91
|
+
.btn:disabled {
|
|
92
|
+
opacity: 0.4;
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
transform: none !important;
|
|
95
|
+
box-shadow: none !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Loading */
|
|
99
|
+
.btn--loading {
|
|
100
|
+
cursor: wait;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.btn__spinner {
|
|
104
|
+
display: inline-block;
|
|
105
|
+
width: 14px;
|
|
106
|
+
height: 14px;
|
|
107
|
+
border: 2px solid var(--dc-spinner-border);
|
|
108
|
+
border-top-color: currentColor;
|
|
109
|
+
border-radius: var(--dc-round-full);
|
|
110
|
+
animation: spin 0.6s linear infinite;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.btn__content {
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: var(--dc-space-2);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@keyframes spin {
|
|
120
|
+
to { transform: rotate(360deg); }
|
|
121
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class DcButton {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.variant = 'primary';
|
|
5
|
+
this.size = 'md';
|
|
6
|
+
this.disabled = false;
|
|
7
|
+
this.loading = false;
|
|
8
|
+
this.fullWidth = false;
|
|
9
|
+
this.type = 'button';
|
|
10
|
+
this.handleClick = () => {
|
|
11
|
+
if (!this.disabled && !this.loading) {
|
|
12
|
+
this.dcClick.emit();
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (h("button", { key: 'b1f275431288cf48cdcd77fd0ff0ce94ed6c7471', class: [
|
|
18
|
+
'btn',
|
|
19
|
+
`btn--${this.variant}`,
|
|
20
|
+
`btn--${this.size}`,
|
|
21
|
+
this.loading ? 'btn--loading' : '',
|
|
22
|
+
this.fullWidth ? 'btn--full' : '',
|
|
23
|
+
].filter(Boolean).join(' '), disabled: this.disabled || this.loading, type: this.type, onClick: this.handleClick }, this.loading && (h("span", { key: '024a89db11699ec8f4a2606cf550ad060cf9981a', class: "btn__spinner", "aria-hidden": "true" })), h("span", { key: '8586524c1551bdf8dc6d5c597f5fc5ecebd54054', class: "btn__content" }, h("slot", { key: '5f8ace974b28574208c5f4fc146573d0bdb100c3' }))));
|
|
24
|
+
}
|
|
25
|
+
static get is() { return "luster-button"; }
|
|
26
|
+
static get encapsulation() { return "shadow"; }
|
|
27
|
+
static get originalStyleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["luster-button.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get styleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["luster-button.css"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get properties() {
|
|
38
|
+
return {
|
|
39
|
+
"variant": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"mutable": false,
|
|
42
|
+
"complexType": {
|
|
43
|
+
"original": "'primary' | 'secondary' | 'tertiary' | 'destructive'",
|
|
44
|
+
"resolved": "\"destructive\" | \"primary\" | \"secondary\" | \"tertiary\"",
|
|
45
|
+
"references": {}
|
|
46
|
+
},
|
|
47
|
+
"required": false,
|
|
48
|
+
"optional": false,
|
|
49
|
+
"docs": {
|
|
50
|
+
"tags": [],
|
|
51
|
+
"text": ""
|
|
52
|
+
},
|
|
53
|
+
"getter": false,
|
|
54
|
+
"setter": false,
|
|
55
|
+
"reflect": false,
|
|
56
|
+
"attribute": "variant",
|
|
57
|
+
"defaultValue": "'primary'"
|
|
58
|
+
},
|
|
59
|
+
"size": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "'sm' | 'md' | 'lg'",
|
|
64
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": ""
|
|
72
|
+
},
|
|
73
|
+
"getter": false,
|
|
74
|
+
"setter": false,
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"attribute": "size",
|
|
77
|
+
"defaultValue": "'md'"
|
|
78
|
+
},
|
|
79
|
+
"disabled": {
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"mutable": false,
|
|
82
|
+
"complexType": {
|
|
83
|
+
"original": "boolean",
|
|
84
|
+
"resolved": "boolean",
|
|
85
|
+
"references": {}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": false,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": ""
|
|
92
|
+
},
|
|
93
|
+
"getter": false,
|
|
94
|
+
"setter": false,
|
|
95
|
+
"reflect": false,
|
|
96
|
+
"attribute": "disabled",
|
|
97
|
+
"defaultValue": "false"
|
|
98
|
+
},
|
|
99
|
+
"loading": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "boolean",
|
|
104
|
+
"resolved": "boolean",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"attribute": "loading",
|
|
117
|
+
"defaultValue": "false"
|
|
118
|
+
},
|
|
119
|
+
"fullWidth": {
|
|
120
|
+
"type": "boolean",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "boolean",
|
|
124
|
+
"resolved": "boolean",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": ""
|
|
132
|
+
},
|
|
133
|
+
"getter": false,
|
|
134
|
+
"setter": false,
|
|
135
|
+
"reflect": false,
|
|
136
|
+
"attribute": "full-width",
|
|
137
|
+
"defaultValue": "false"
|
|
138
|
+
},
|
|
139
|
+
"type": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "'button' | 'submit' | 'reset'",
|
|
144
|
+
"resolved": "\"button\" | \"reset\" | \"submit\"",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": ""
|
|
152
|
+
},
|
|
153
|
+
"getter": false,
|
|
154
|
+
"setter": false,
|
|
155
|
+
"reflect": false,
|
|
156
|
+
"attribute": "type",
|
|
157
|
+
"defaultValue": "'button'"
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
static get events() {
|
|
162
|
+
return [{
|
|
163
|
+
"method": "dcClick",
|
|
164
|
+
"name": "dcClick",
|
|
165
|
+
"bubbles": true,
|
|
166
|
+
"cancelable": true,
|
|
167
|
+
"composed": true,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "void",
|
|
174
|
+
"resolved": "void",
|
|
175
|
+
"references": {}
|
|
176
|
+
}
|
|
177
|
+
}];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Foundations/Button',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: 'Botão multi-variante. Suporta gradiente primary, ghost secondary, text tertiary e destructive. Props: `variant`, `size`, `loading`, `disabled`, `full-width`.',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
variant: {
|
|
14
|
+
control: 'select',
|
|
15
|
+
options: ['primary', 'secondary', 'tertiary', 'destructive'],
|
|
16
|
+
description: 'Estilo visual do botão',
|
|
17
|
+
table: { defaultValue: { summary: 'primary' } },
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
control: 'select',
|
|
21
|
+
options: ['sm', 'md', 'lg'],
|
|
22
|
+
description: 'Tamanho',
|
|
23
|
+
table: { defaultValue: { summary: 'md' } },
|
|
24
|
+
},
|
|
25
|
+
loading: {
|
|
26
|
+
control: 'boolean',
|
|
27
|
+
description: 'Estado de carregamento — exibe spinner',
|
|
28
|
+
table: { defaultValue: { summary: 'false' } },
|
|
29
|
+
},
|
|
30
|
+
disabled: {
|
|
31
|
+
control: 'boolean',
|
|
32
|
+
description: 'Desabilita interação',
|
|
33
|
+
table: { defaultValue: { summary: 'false' } },
|
|
34
|
+
},
|
|
35
|
+
label: {
|
|
36
|
+
control: 'text',
|
|
37
|
+
description: 'Texto do botão (slot)',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
args: {
|
|
41
|
+
variant: 'primary',
|
|
42
|
+
size: 'md',
|
|
43
|
+
loading: false,
|
|
44
|
+
disabled: false,
|
|
45
|
+
label: 'Click me',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
export default meta;
|
|
49
|
+
const render = (args) => html `
|
|
50
|
+
<luster-button
|
|
51
|
+
variant="${args.variant}"
|
|
52
|
+
size="${args.size}"
|
|
53
|
+
?loading="${args.loading}"
|
|
54
|
+
?disabled="${args.disabled}"
|
|
55
|
+
>
|
|
56
|
+
${args.label}
|
|
57
|
+
</luster-button>
|
|
58
|
+
`;
|
|
59
|
+
export const Primary = {
|
|
60
|
+
args: { variant: 'primary', label: 'Primary Action' },
|
|
61
|
+
render,
|
|
62
|
+
};
|
|
63
|
+
export const Secondary = {
|
|
64
|
+
args: { variant: 'secondary', label: 'Secondary Style' },
|
|
65
|
+
render,
|
|
66
|
+
};
|
|
67
|
+
export const Tertiary = {
|
|
68
|
+
args: { variant: 'tertiary', label: 'Show Link' },
|
|
69
|
+
render,
|
|
70
|
+
};
|
|
71
|
+
export const Destructive = {
|
|
72
|
+
args: { variant: 'destructive', label: 'Delete Item' },
|
|
73
|
+
render,
|
|
74
|
+
};
|
|
75
|
+
export const Loading = {
|
|
76
|
+
args: { variant: 'primary', loading: true, label: 'Processing' },
|
|
77
|
+
render,
|
|
78
|
+
};
|
|
79
|
+
export const Disabled = {
|
|
80
|
+
args: { variant: 'primary', disabled: true, label: 'Unavailable' },
|
|
81
|
+
render,
|
|
82
|
+
};
|
|
83
|
+
export const SmallSize = {
|
|
84
|
+
args: { variant: 'primary', size: 'sm', label: 'Small' },
|
|
85
|
+
render,
|
|
86
|
+
};
|
|
87
|
+
export const LargeSize = {
|
|
88
|
+
args: { variant: 'primary', size: 'lg', label: 'Large Action' },
|
|
89
|
+
render,
|
|
90
|
+
};
|
|
91
|
+
export const AllVariants = {
|
|
92
|
+
name: 'All Variants',
|
|
93
|
+
render: () => html `
|
|
94
|
+
<div style="display:flex;gap:1rem;flex-wrap:wrap;align-items:center;">
|
|
95
|
+
<luster-button variant="primary">Primary</luster-button>
|
|
96
|
+
<luster-button variant="secondary">Secondary</luster-button>
|
|
97
|
+
<luster-button variant="tertiary">Tertiary</luster-button>
|
|
98
|
+
<luster-button variant="destructive">Destructive</luster-button>
|
|
99
|
+
<luster-button variant="primary" ?loading="${true}">Loading</luster-button>
|
|
100
|
+
<luster-button variant="primary" ?disabled="${true}">Disabled</luster-button>
|
|
101
|
+
</div>
|
|
102
|
+
`,
|
|
103
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
:host { display: block; }
|
|
2
|
+
|
|
3
|
+
.card {
|
|
4
|
+
border-radius: var(--dc-round-4);
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
transition: background var(--dc-transition-base), box-shadow var(--dc-transition-base);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Padding */
|
|
10
|
+
.card--pad-none { padding: 0; }
|
|
11
|
+
.card--pad-sm { padding: var(--dc-space-4); }
|
|
12
|
+
.card--pad-md { padding: var(--dc-space-6); }
|
|
13
|
+
.card--pad-lg { padding: var(--dc-space-8); }
|
|
14
|
+
|
|
15
|
+
/* Variants */
|
|
16
|
+
.card--default { background: var(--dc-surface-container-high); }
|
|
17
|
+
.card--elevated { background: var(--dc-surface-container-highest); box-shadow: var(--dc-shadow-md); }
|
|
18
|
+
.card--feature { background: var(--dc-surface-container-high); border: 1px solid var(--dc-border-default); }
|
|
19
|
+
|
|
20
|
+
.card--glass {
|
|
21
|
+
background: var(--dc-glass-bg);
|
|
22
|
+
backdrop-filter: blur(20px);
|
|
23
|
+
-webkit-backdrop-filter: blur(20px);
|
|
24
|
+
border: 1px solid var(--dc-border-default);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Hoverable */
|
|
28
|
+
.card--hoverable { cursor: pointer; }
|
|
29
|
+
.card--hoverable:hover { background: var(--dc-surface-bright); box-shadow: var(--dc-shadow-lg); }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class DcCard {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.variant = 'default';
|
|
5
|
+
this.padding = 'md';
|
|
6
|
+
this.hoverable = false;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h("div", { key: 'b49300a94d3ec06822794698af4a1d8da248d319', class: [
|
|
10
|
+
'card',
|
|
11
|
+
`card--${this.variant}`,
|
|
12
|
+
`card--pad-${this.padding}`,
|
|
13
|
+
this.hoverable ? 'card--hoverable' : '',
|
|
14
|
+
].filter(Boolean).join(' ') }, h("slot", { key: '05c26e4626e0610588ab6694355f315b0adc9327' })));
|
|
15
|
+
}
|
|
16
|
+
static get is() { return "luster-card"; }
|
|
17
|
+
static get encapsulation() { return "shadow"; }
|
|
18
|
+
static get originalStyleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["luster-card.css"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static get styleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["luster-card.css"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get properties() {
|
|
29
|
+
return {
|
|
30
|
+
"variant": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"mutable": false,
|
|
33
|
+
"complexType": {
|
|
34
|
+
"original": "'default' | 'elevated' | 'glass' | 'feature'",
|
|
35
|
+
"resolved": "\"default\" | \"elevated\" | \"feature\" | \"glass\"",
|
|
36
|
+
"references": {}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": ""
|
|
43
|
+
},
|
|
44
|
+
"getter": false,
|
|
45
|
+
"setter": false,
|
|
46
|
+
"reflect": false,
|
|
47
|
+
"attribute": "variant",
|
|
48
|
+
"defaultValue": "'default'"
|
|
49
|
+
},
|
|
50
|
+
"padding": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"mutable": false,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "'sm' | 'md' | 'lg' | 'none'",
|
|
55
|
+
"resolved": "\"lg\" | \"md\" | \"none\" | \"sm\"",
|
|
56
|
+
"references": {}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
},
|
|
64
|
+
"getter": false,
|
|
65
|
+
"setter": false,
|
|
66
|
+
"reflect": false,
|
|
67
|
+
"attribute": "padding",
|
|
68
|
+
"defaultValue": "'md'"
|
|
69
|
+
},
|
|
70
|
+
"hoverable": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "boolean",
|
|
75
|
+
"resolved": "boolean",
|
|
76
|
+
"references": {}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": ""
|
|
83
|
+
},
|
|
84
|
+
"getter": false,
|
|
85
|
+
"setter": false,
|
|
86
|
+
"reflect": false,
|
|
87
|
+
"attribute": "hoverable",
|
|
88
|
+
"defaultValue": "false"
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Foundations/Card',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: 'Contêiner de conteúdo com variantes visuais. Props: `variant`, `padding`, `hoverable`.',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
variant: {
|
|
14
|
+
control: 'select',
|
|
15
|
+
options: ['default', 'elevated', 'glass', 'feature'],
|
|
16
|
+
description: 'Estilo visual',
|
|
17
|
+
table: { defaultValue: { summary: 'default' } },
|
|
18
|
+
},
|
|
19
|
+
padding: {
|
|
20
|
+
control: 'select',
|
|
21
|
+
options: ['none', 'sm', 'md', 'lg'],
|
|
22
|
+
description: 'Espaçamento interno',
|
|
23
|
+
table: { defaultValue: { summary: 'md' } },
|
|
24
|
+
},
|
|
25
|
+
hoverable: {
|
|
26
|
+
control: 'boolean',
|
|
27
|
+
description: 'Efeito ao passar o mouse',
|
|
28
|
+
table: { defaultValue: { summary: 'false' } },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
args: {
|
|
32
|
+
variant: 'default',
|
|
33
|
+
padding: 'md',
|
|
34
|
+
hoverable: false,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
const render = (args) => html `
|
|
39
|
+
<luster-card variant="${args.variant}" padding="${args.padding}" ?hoverable="${args.hoverable}">
|
|
40
|
+
<div style="color:var(--dc-on-surface);">
|
|
41
|
+
<strong>Card heading</strong>
|
|
42
|
+
<p style="margin:0.5rem 0 0;color:var(--dc-on-surface-variant);font-size:0.875rem;">
|
|
43
|
+
Some content inside the card goes here.
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
</luster-card>
|
|
47
|
+
`;
|
|
48
|
+
export const Default = { args: { variant: 'default' }, render };
|
|
49
|
+
export const Elevated = { args: { variant: 'elevated' }, render };
|
|
50
|
+
export const Glass = { args: { variant: 'glass' }, render };
|
|
51
|
+
export const Feature = { args: { variant: 'feature' }, render };
|
|
52
|
+
export const Hoverable = { args: { variant: 'elevated', hoverable: true }, render };
|
|
53
|
+
export const AllVariants = {
|
|
54
|
+
name: 'All Variants',
|
|
55
|
+
render: () => html `
|
|
56
|
+
<div style="display:flex;gap:1rem;flex-wrap:wrap;">
|
|
57
|
+
${['default', 'elevated', 'glass', 'feature'].map((v) => html `
|
|
58
|
+
<luster-card variant="${v}" padding="md">
|
|
59
|
+
<div style="color:var(--dc-on-surface);min-width:140px;">
|
|
60
|
+
<strong style="font-size:0.8rem;text-transform:uppercase;letter-spacing:0.05em;">${v}</strong>
|
|
61
|
+
<p style="margin:0.5rem 0 0;color:var(--dc-on-surface-variant);font-size:0.8rem;">Sample content</p>
|
|
62
|
+
</div>
|
|
63
|
+
</luster-card>
|
|
64
|
+
`)}
|
|
65
|
+
</div>
|
|
66
|
+
`,
|
|
67
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
:host { display: inline-flex; }
|
|
2
|
+
|
|
3
|
+
.checkbox {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--dc-space-3);
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
user-select: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.checkbox--disabled { opacity: 0.4; cursor: not-allowed; }
|
|
12
|
+
|
|
13
|
+
.checkbox__box {
|
|
14
|
+
width: 18px;
|
|
15
|
+
height: 18px;
|
|
16
|
+
border-radius: var(--dc-round-1);
|
|
17
|
+
border: 1.5px solid var(--dc-border-strong);
|
|
18
|
+
background: var(--dc-surface-container-lowest);
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
transition: all var(--dc-transition-fast);
|
|
24
|
+
color: var(--dc-on-primary);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.checkbox__box--checked,
|
|
28
|
+
.checkbox__box--indeterminate {
|
|
29
|
+
background: var(--dc-primary);
|
|
30
|
+
border-color: var(--dc-primary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.checkbox:hover .checkbox__box:not(.checkbox__box--checked) {
|
|
34
|
+
border-color: var(--dc-primary);
|
|
35
|
+
background: var(--dc-hover-tint-strong);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.checkbox__label {
|
|
39
|
+
font-family: var(--dc-font-body);
|
|
40
|
+
font-size: var(--dc-body-md);
|
|
41
|
+
color: var(--dc-on-surface);
|
|
42
|
+
}
|