@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,162 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class DcCheckbox {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.label = '';
|
|
5
|
+
this.checked = false;
|
|
6
|
+
this.disabled = false;
|
|
7
|
+
this.indeterminate = false;
|
|
8
|
+
this.value = '';
|
|
9
|
+
this.innerChecked = false;
|
|
10
|
+
this.handleChange = () => {
|
|
11
|
+
if (!this.disabled) {
|
|
12
|
+
this.innerChecked = !this.innerChecked;
|
|
13
|
+
this.dcChange.emit(this.innerChecked);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
componentWillLoad() {
|
|
18
|
+
this.innerChecked = this.checked;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h("label", { key: '045e94d76f2ba6cc1ebbcbb3bfa82289fc761d31', class: `checkbox ${this.disabled ? 'checkbox--disabled' : ''}`, onClick: this.handleChange }, h("span", { key: '2ec03e604ef10657e8cdde93c9878b22525a3b35', class: `checkbox__box ${this.innerChecked ? 'checkbox__box--checked' : ''} ${this.indeterminate ? 'checkbox__box--indeterminate' : ''}` }, this.innerChecked && !this.indeterminate && (h("svg", { key: 'ab90b16c273244ca84f22ae31053f28c620480fd', width: "10", height: "8", viewBox: "0 0 10 8", fill: "none" }, h("path", { key: 'c333e014a043775ceddeebbefbac1e05441e942e', d: "M1 4L3.5 6.5L9 1", stroke: "currentColor", "stroke-width": "1.8", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.indeterminate && (h("svg", { key: '919fbd28b4d3d69a799ee92ff8bce515a855a4c1', width: "10", height: "2", viewBox: "0 0 10 2", fill: "none" }, h("line", { key: '055debe6bfd40ed0a67c62553c1219e3d30a8d52', x1: "1", y1: "1", x2: "9", y2: "1", stroke: "currentColor", "stroke-width": "1.8", "stroke-linecap": "round" })))), this.label && h("span", { key: '6e0a0ab1e3d2a61df2c97fa407761eabd927ef76', class: "checkbox__label" }, this.label)));
|
|
22
|
+
}
|
|
23
|
+
static get is() { return "luster-checkbox"; }
|
|
24
|
+
static get encapsulation() { return "shadow"; }
|
|
25
|
+
static get originalStyleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["luster-checkbox.css"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get styleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["luster-checkbox.css"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get properties() {
|
|
36
|
+
return {
|
|
37
|
+
"label": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "string",
|
|
42
|
+
"resolved": "string",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [],
|
|
49
|
+
"text": ""
|
|
50
|
+
},
|
|
51
|
+
"getter": false,
|
|
52
|
+
"setter": false,
|
|
53
|
+
"reflect": false,
|
|
54
|
+
"attribute": "label",
|
|
55
|
+
"defaultValue": "''"
|
|
56
|
+
},
|
|
57
|
+
"checked": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "boolean",
|
|
62
|
+
"resolved": "boolean",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": ""
|
|
70
|
+
},
|
|
71
|
+
"getter": false,
|
|
72
|
+
"setter": false,
|
|
73
|
+
"reflect": false,
|
|
74
|
+
"attribute": "checked",
|
|
75
|
+
"defaultValue": "false"
|
|
76
|
+
},
|
|
77
|
+
"disabled": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "boolean",
|
|
82
|
+
"resolved": "boolean",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": ""
|
|
90
|
+
},
|
|
91
|
+
"getter": false,
|
|
92
|
+
"setter": false,
|
|
93
|
+
"reflect": false,
|
|
94
|
+
"attribute": "disabled",
|
|
95
|
+
"defaultValue": "false"
|
|
96
|
+
},
|
|
97
|
+
"indeterminate": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "boolean",
|
|
102
|
+
"resolved": "boolean",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": ""
|
|
110
|
+
},
|
|
111
|
+
"getter": false,
|
|
112
|
+
"setter": false,
|
|
113
|
+
"reflect": false,
|
|
114
|
+
"attribute": "indeterminate",
|
|
115
|
+
"defaultValue": "false"
|
|
116
|
+
},
|
|
117
|
+
"value": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "string",
|
|
122
|
+
"resolved": "string",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": ""
|
|
130
|
+
},
|
|
131
|
+
"getter": false,
|
|
132
|
+
"setter": false,
|
|
133
|
+
"reflect": false,
|
|
134
|
+
"attribute": "value",
|
|
135
|
+
"defaultValue": "''"
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
static get states() {
|
|
140
|
+
return {
|
|
141
|
+
"innerChecked": {}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static get events() {
|
|
145
|
+
return [{
|
|
146
|
+
"method": "dcChange",
|
|
147
|
+
"name": "dcChange",
|
|
148
|
+
"bubbles": true,
|
|
149
|
+
"cancelable": true,
|
|
150
|
+
"composed": true,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": ""
|
|
154
|
+
},
|
|
155
|
+
"complexType": {
|
|
156
|
+
"original": "boolean",
|
|
157
|
+
"resolved": "boolean",
|
|
158
|
+
"references": {}
|
|
159
|
+
}
|
|
160
|
+
}];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Foundations/Checkbox',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: 'Caixa de seleção com suporte a estado indeterminado. Props: `label`, `checked`, `disabled`, `indeterminate`, `value`.',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
label: { control: 'text', description: 'Label do checkbox' },
|
|
14
|
+
checked: {
|
|
15
|
+
control: 'boolean',
|
|
16
|
+
description: 'Estado marcado',
|
|
17
|
+
table: { defaultValue: { summary: 'false' } },
|
|
18
|
+
},
|
|
19
|
+
disabled: {
|
|
20
|
+
control: 'boolean',
|
|
21
|
+
description: 'Desabilita interação',
|
|
22
|
+
table: { defaultValue: { summary: 'false' } },
|
|
23
|
+
},
|
|
24
|
+
indeterminate: {
|
|
25
|
+
control: 'boolean',
|
|
26
|
+
description: 'Estado indeterminado',
|
|
27
|
+
table: { defaultValue: { summary: 'false' } },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
args: {
|
|
31
|
+
label: 'Accept terms',
|
|
32
|
+
checked: false,
|
|
33
|
+
disabled: false,
|
|
34
|
+
indeterminate: false,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
const render = (args) => html `
|
|
39
|
+
<luster-checkbox
|
|
40
|
+
label="${args.label}"
|
|
41
|
+
?checked="${args.checked}"
|
|
42
|
+
?disabled="${args.disabled}"
|
|
43
|
+
?indeterminate="${args.indeterminate}"
|
|
44
|
+
></luster-checkbox>
|
|
45
|
+
`;
|
|
46
|
+
export const Default = {
|
|
47
|
+
args: { label: 'Accept terms and conditions', checked: false },
|
|
48
|
+
render,
|
|
49
|
+
};
|
|
50
|
+
export const Checked = {
|
|
51
|
+
args: { label: 'Option selected', checked: true },
|
|
52
|
+
render,
|
|
53
|
+
};
|
|
54
|
+
export const Indeterminate = {
|
|
55
|
+
args: { label: 'Partial selection', indeterminate: true },
|
|
56
|
+
render,
|
|
57
|
+
};
|
|
58
|
+
export const Disabled = {
|
|
59
|
+
args: { label: 'Unavailable option', disabled: true },
|
|
60
|
+
render,
|
|
61
|
+
};
|
|
62
|
+
export const DisabledChecked = {
|
|
63
|
+
name: 'Disabled Checked',
|
|
64
|
+
args: { label: 'Locked selection', checked: true, disabled: true },
|
|
65
|
+
render,
|
|
66
|
+
};
|
|
67
|
+
export const AllStates = {
|
|
68
|
+
name: 'All States',
|
|
69
|
+
render: () => html `
|
|
70
|
+
<div style="display:flex;flex-direction:column;gap:1rem;">
|
|
71
|
+
<luster-checkbox label="Unchecked"></luster-checkbox>
|
|
72
|
+
<luster-checkbox label="Checked" ?checked="${true}"></luster-checkbox>
|
|
73
|
+
<luster-checkbox label="Indeterminate" ?indeterminate="${true}"></luster-checkbox>
|
|
74
|
+
<luster-checkbox label="Disabled" ?disabled="${true}"></luster-checkbox>
|
|
75
|
+
<luster-checkbox label="Disabled checked" ?checked="${true}" ?disabled="${true}"></luster-checkbox>
|
|
76
|
+
</div>
|
|
77
|
+
`,
|
|
78
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
:host { display: inline-flex; }
|
|
2
|
+
|
|
3
|
+
.swatch { display: flex; flex-direction: column; gap: var(--dc-space-2); }
|
|
4
|
+
|
|
5
|
+
.swatch__color {
|
|
6
|
+
border-radius: var(--dc-round-3);
|
|
7
|
+
transition: transform var(--dc-transition-fast);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.swatch__color:hover { transform: scale(1.03); }
|
|
11
|
+
|
|
12
|
+
.swatch--sm .swatch__color { width: 60px; height: 60px; }
|
|
13
|
+
.swatch--md .swatch__color { width: 80px; height: 80px; }
|
|
14
|
+
.swatch--lg .swatch__color { width: 100px; height: 100px; }
|
|
15
|
+
|
|
16
|
+
.swatch__info {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 2px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.swatch__name {
|
|
23
|
+
font-size: var(--dc-label-sm);
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
color: var(--dc-on-surface);
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.swatch__hex {
|
|
30
|
+
font-size: var(--dc-label-sm);
|
|
31
|
+
color: var(--dc-on-surface-variant);
|
|
32
|
+
font-family: monospace;
|
|
33
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class DcColorSwatch {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.color = '#a3a6ff';
|
|
5
|
+
this.name = '';
|
|
6
|
+
this.hex = '';
|
|
7
|
+
this.size = 'md';
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h("div", { key: '6ea9cb759f0d060dd393e6de23429c4b515d7139', class: `swatch swatch--${this.size}` }, h("div", { key: '8b6883cc045ed739c80b10bc416d64156a873109', class: "swatch__color", style: { backgroundColor: this.color } }), h("div", { key: '5c9b62e83b8442a29a623bd8ac1503f78bc965e5', class: "swatch__info" }, this.name && h("span", { key: '5ab7e003ed7158297661bde476f1fbc66e96ff88', class: "swatch__name" }, this.name), this.hex && h("span", { key: 'df26e2458cad5537e2cbd00765256ae2b4eae9ca', class: "swatch__hex" }, this.hex))));
|
|
11
|
+
}
|
|
12
|
+
static get is() { return "luster-color-swatch"; }
|
|
13
|
+
static get encapsulation() { return "shadow"; }
|
|
14
|
+
static get originalStyleUrls() {
|
|
15
|
+
return {
|
|
16
|
+
"$": ["luster-color-swatch.css"]
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static get styleUrls() {
|
|
20
|
+
return {
|
|
21
|
+
"$": ["luster-color-swatch.css"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static get properties() {
|
|
25
|
+
return {
|
|
26
|
+
"color": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"mutable": false,
|
|
29
|
+
"complexType": {
|
|
30
|
+
"original": "string",
|
|
31
|
+
"resolved": "string",
|
|
32
|
+
"references": {}
|
|
33
|
+
},
|
|
34
|
+
"required": false,
|
|
35
|
+
"optional": false,
|
|
36
|
+
"docs": {
|
|
37
|
+
"tags": [],
|
|
38
|
+
"text": ""
|
|
39
|
+
},
|
|
40
|
+
"getter": false,
|
|
41
|
+
"setter": false,
|
|
42
|
+
"reflect": false,
|
|
43
|
+
"attribute": "color",
|
|
44
|
+
"defaultValue": "'#a3a6ff'"
|
|
45
|
+
},
|
|
46
|
+
"name": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "string",
|
|
51
|
+
"resolved": "string",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": ""
|
|
59
|
+
},
|
|
60
|
+
"getter": false,
|
|
61
|
+
"setter": false,
|
|
62
|
+
"reflect": false,
|
|
63
|
+
"attribute": "name",
|
|
64
|
+
"defaultValue": "''"
|
|
65
|
+
},
|
|
66
|
+
"hex": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"mutable": false,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "string",
|
|
71
|
+
"resolved": "string",
|
|
72
|
+
"references": {}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"getter": false,
|
|
81
|
+
"setter": false,
|
|
82
|
+
"reflect": false,
|
|
83
|
+
"attribute": "hex",
|
|
84
|
+
"defaultValue": "''"
|
|
85
|
+
},
|
|
86
|
+
"size": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "'sm' | 'md' | 'lg'",
|
|
91
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": ""
|
|
99
|
+
},
|
|
100
|
+
"getter": false,
|
|
101
|
+
"setter": false,
|
|
102
|
+
"reflect": false,
|
|
103
|
+
"attribute": "size",
|
|
104
|
+
"defaultValue": "'md'"
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Foundations/Color Swatch',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: 'Amostra de cor com nome e valor hex para documentação de tokens. Props: `color`, `name`, `hex`, `size`.',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
color: { control: 'color', description: 'Cor (qualquer valor CSS válido)' },
|
|
14
|
+
name: { control: 'text', description: 'Nome do token' },
|
|
15
|
+
hex: { control: 'text', description: 'Valor hex exibido' },
|
|
16
|
+
size: {
|
|
17
|
+
control: 'select',
|
|
18
|
+
options: ['sm', 'md', 'lg'],
|
|
19
|
+
description: 'Tamanho',
|
|
20
|
+
table: { defaultValue: { summary: 'md' } },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
args: {
|
|
24
|
+
color: '#a3a6ff',
|
|
25
|
+
name: 'Primary',
|
|
26
|
+
hex: '#A3A6FF',
|
|
27
|
+
size: 'md',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
const render = (args) => html `
|
|
32
|
+
<luster-color-swatch
|
|
33
|
+
color="${args.color}"
|
|
34
|
+
name="${args.name}"
|
|
35
|
+
hex="${args.hex}"
|
|
36
|
+
size="${args.size}"
|
|
37
|
+
></luster-color-swatch>
|
|
38
|
+
`;
|
|
39
|
+
export const Default = { render };
|
|
40
|
+
export const Small = { args: { size: 'sm' }, render };
|
|
41
|
+
export const Large = { args: { size: 'lg' }, render };
|
|
42
|
+
export const DesignTokens = {
|
|
43
|
+
name: 'Design Tokens Palette',
|
|
44
|
+
render: () => html `
|
|
45
|
+
<div style="display:flex;flex-wrap:wrap;gap:1rem;">
|
|
46
|
+
<luster-color-swatch color="#a3a6ff" name="Primary" hex="#A3A6FF"></luster-color-swatch>
|
|
47
|
+
<luster-color-swatch color="#6063ee" name="Primary Dim" hex="#6063EE"></luster-color-swatch>
|
|
48
|
+
<luster-color-swatch color="#060e20" name="Surface" hex="#060E20"></luster-color-swatch>
|
|
49
|
+
<luster-color-swatch color="#091328" name="Surface Low" hex="#091328"></luster-color-swatch>
|
|
50
|
+
<luster-color-swatch color="#141f38" name="Surface High" hex="#141F38"></luster-color-swatch>
|
|
51
|
+
<luster-color-swatch color="#dee5ff" name="On Surface" hex="#DEE5FF"></luster-color-swatch>
|
|
52
|
+
<luster-color-swatch color="#a3aac4" name="On Surface Variant" hex="#A3AAC4"></luster-color-swatch>
|
|
53
|
+
<luster-color-swatch color="#3ddc97" name="Success" hex="#3DDC97"></luster-color-swatch>
|
|
54
|
+
<luster-color-swatch color="#ffbe45" name="Warning" hex="#FFBE45"></luster-color-swatch>
|
|
55
|
+
<luster-color-swatch color="#ff6b6b" name="Error" hex="#FF6B6B"></luster-color-swatch>
|
|
56
|
+
</div>
|
|
57
|
+
`,
|
|
58
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
:host { display: block; }
|
|
2
|
+
|
|
3
|
+
.feature-quote {
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: var(--dc-space-6) var(--dc-space-8);
|
|
6
|
+
border-left: 4px solid var(--dc-primary);
|
|
7
|
+
background: var(--dc-surface-container-high);
|
|
8
|
+
border-radius: 0 var(--dc-round-4) var(--dc-round-4) 0;
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.feature-quote--large {
|
|
13
|
+
padding: var(--dc-space-8) var(--dc-space-10);
|
|
14
|
+
border-radius: var(--dc-round-4);
|
|
15
|
+
border-left: 4px solid var(--dc-primary);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.feature-quote--inline {
|
|
19
|
+
background: transparent;
|
|
20
|
+
padding: var(--dc-space-4) var(--dc-space-6);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.feature-quote__mark {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: var(--dc-space-3);
|
|
26
|
+
left: var(--dc-space-5);
|
|
27
|
+
font-family: var(--dc-font-display);
|
|
28
|
+
font-size: 3rem;
|
|
29
|
+
color: var(--dc-primary);
|
|
30
|
+
opacity: 0.4;
|
|
31
|
+
line-height: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.feature-quote__text {
|
|
35
|
+
font-family: var(--dc-font-display);
|
|
36
|
+
font-size: var(--dc-headline-sm);
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
font-style: italic;
|
|
39
|
+
color: var(--dc-primary-fixed);
|
|
40
|
+
line-height: 1.4;
|
|
41
|
+
letter-spacing: var(--dc-tracking-tight);
|
|
42
|
+
margin: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.feature-quote--large .feature-quote__text {
|
|
46
|
+
font-size: var(--dc-headline-md);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.feature-quote__attribution {
|
|
50
|
+
margin-top: var(--dc-space-4);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.feature-quote__author-wrap {
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: var(--dc-space-3);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.feature-quote__author-avatar {
|
|
60
|
+
width: 28px;
|
|
61
|
+
height: 28px;
|
|
62
|
+
border-radius: var(--dc-round-full);
|
|
63
|
+
background: linear-gradient(135deg, var(--dc-primary), var(--dc-primary-dim));
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
font-size: var(--dc-label-sm);
|
|
68
|
+
font-weight: 700;
|
|
69
|
+
color: var(--dc-on-primary);
|
|
70
|
+
flex-shrink: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.feature-quote__author {
|
|
74
|
+
display: block;
|
|
75
|
+
font-size: var(--dc-label-md);
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
color: var(--dc-on-surface);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.feature-quote__role {
|
|
81
|
+
display: block;
|
|
82
|
+
font-size: var(--dc-label-sm);
|
|
83
|
+
color: var(--dc-on-surface-variant);
|
|
84
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class DcFeatureQuote {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.quote = '';
|
|
5
|
+
this.author = '';
|
|
6
|
+
this.role = '';
|
|
7
|
+
this.variant = 'default';
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h("blockquote", { key: '4ed1344a05bfd89c63005ba64b8cd9a32db0f6c5', class: `feature-quote feature-quote--${this.variant}` }, h("span", { key: '47bdfd40fe685f876b64b421ff706afdc42c0541', class: "feature-quote__mark" }, "\""), h("p", { key: '1b3f0735be2544ab0332455875f12c4d3ca51865', class: "feature-quote__text" }, this.quote || h("slot", { key: 'f012c749d221d62ef919c898e181547a154e4b85' })), (this.author || this.role) && (h("footer", { key: '04740fe325d696cfa258e4e946b2385cfa5b2173', class: "feature-quote__attribution" }, this.author && (h("div", { key: '25c2a6ca4d16b965d7563a495ee8350a7ca93e4a', class: "feature-quote__author-wrap" }, h("div", { key: '9e8a34dfe0c05de5440a3d63700fec4b749264c3', class: "feature-quote__author-avatar" }, this.author.charAt(0)), h("div", { key: '113098f2c5fdbecf0d8088d265ddef76c0751776' }, h("span", { key: 'e140de5e35d6aec4fe974d55f2f3b14b4f6c33b8', class: "feature-quote__author" }, this.author), this.role && h("span", { key: 'fd6bd76a054ba0eda2deec30d596d2dc35495bd3', class: "feature-quote__role" }, this.role))))))));
|
|
11
|
+
}
|
|
12
|
+
static get is() { return "luster-feature-quote"; }
|
|
13
|
+
static get encapsulation() { return "shadow"; }
|
|
14
|
+
static get originalStyleUrls() {
|
|
15
|
+
return {
|
|
16
|
+
"$": ["luster-feature-quote.css"]
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static get styleUrls() {
|
|
20
|
+
return {
|
|
21
|
+
"$": ["luster-feature-quote.css"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static get properties() {
|
|
25
|
+
return {
|
|
26
|
+
"quote": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"mutable": false,
|
|
29
|
+
"complexType": {
|
|
30
|
+
"original": "string",
|
|
31
|
+
"resolved": "string",
|
|
32
|
+
"references": {}
|
|
33
|
+
},
|
|
34
|
+
"required": false,
|
|
35
|
+
"optional": false,
|
|
36
|
+
"docs": {
|
|
37
|
+
"tags": [],
|
|
38
|
+
"text": ""
|
|
39
|
+
},
|
|
40
|
+
"getter": false,
|
|
41
|
+
"setter": false,
|
|
42
|
+
"reflect": false,
|
|
43
|
+
"attribute": "quote",
|
|
44
|
+
"defaultValue": "''"
|
|
45
|
+
},
|
|
46
|
+
"author": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "string",
|
|
51
|
+
"resolved": "string",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": ""
|
|
59
|
+
},
|
|
60
|
+
"getter": false,
|
|
61
|
+
"setter": false,
|
|
62
|
+
"reflect": false,
|
|
63
|
+
"attribute": "author",
|
|
64
|
+
"defaultValue": "''"
|
|
65
|
+
},
|
|
66
|
+
"role": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"mutable": false,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "string",
|
|
71
|
+
"resolved": "string",
|
|
72
|
+
"references": {}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"getter": false,
|
|
81
|
+
"setter": false,
|
|
82
|
+
"reflect": false,
|
|
83
|
+
"attribute": "role",
|
|
84
|
+
"defaultValue": "''"
|
|
85
|
+
},
|
|
86
|
+
"variant": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "'default' | 'large' | 'inline'",
|
|
91
|
+
"resolved": "\"default\" | \"inline\" | \"large\"",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": ""
|
|
99
|
+
},
|
|
100
|
+
"getter": false,
|
|
101
|
+
"setter": false,
|
|
102
|
+
"reflect": false,
|
|
103
|
+
"attribute": "variant",
|
|
104
|
+
"defaultValue": "'default'"
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Foundations/Feature Quote',
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: 'Bloco de destaque editorial para citações. Props: `quote`, `author`, `role`, `variant`.',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
quote: { control: 'text', description: 'Texto da citação' },
|
|
14
|
+
author: { control: 'text', description: 'Nome do autor' },
|
|
15
|
+
role: { control: 'text', description: 'Cargo / função do autor' },
|
|
16
|
+
variant: {
|
|
17
|
+
control: 'select',
|
|
18
|
+
options: ['default', 'large', 'inline'],
|
|
19
|
+
description: 'Estilo visual',
|
|
20
|
+
table: { defaultValue: { summary: 'default' } },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
args: {
|
|
24
|
+
quote: 'Good design is as little design as possible.',
|
|
25
|
+
author: 'Dieter Rams',
|
|
26
|
+
role: 'Industrial Designer',
|
|
27
|
+
variant: 'default',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
const render = (args) => html `
|
|
32
|
+
<luster-feature-quote
|
|
33
|
+
quote="${args.quote}"
|
|
34
|
+
author="${args.author}"
|
|
35
|
+
role="${args.role}"
|
|
36
|
+
variant="${args.variant}"
|
|
37
|
+
></luster-feature-quote>
|
|
38
|
+
`;
|
|
39
|
+
export const Default = { render };
|
|
40
|
+
export const Large = {
|
|
41
|
+
args: { variant: 'large' },
|
|
42
|
+
render,
|
|
43
|
+
};
|
|
44
|
+
export const Inline = {
|
|
45
|
+
args: { variant: 'inline' },
|
|
46
|
+
render,
|
|
47
|
+
};
|
|
48
|
+
export const NoAttribution = {
|
|
49
|
+
name: 'No Attribution',
|
|
50
|
+
args: { author: '', role: '' },
|
|
51
|
+
render,
|
|
52
|
+
};
|