@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.
Files changed (176) hide show
  1. package/PUBLISHING.md +469 -0
  2. package/README.md +423 -0
  3. package/dist/cjs/index-Couc0LVo.js +1571 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +12 -0
  6. package/dist/cjs/luster-accordion_19.cjs.entry.js +555 -0
  7. package/dist/cjs/luster-card.cjs.entry.js +25 -0
  8. package/dist/cjs/luster.cjs.js +24 -0
  9. package/dist/collection/collection-manifest.json +32 -0
  10. package/dist/collection/components/luster-accordion/luster-accordion.css +76 -0
  11. package/dist/collection/components/luster-accordion/luster-accordion.js +160 -0
  12. package/dist/collection/components/luster-accordion/luster-accordion.stories.js +88 -0
  13. package/dist/collection/components/luster-activity-item/luster-activity-item.css +102 -0
  14. package/dist/collection/components/luster-activity-item/luster-activity-item.js +188 -0
  15. package/dist/collection/components/luster-activity-item/luster-activity-item.stories.js +94 -0
  16. package/dist/collection/components/luster-alert/luster-alert.css +71 -0
  17. package/dist/collection/components/luster-alert/luster-alert.js +171 -0
  18. package/dist/collection/components/luster-alert/luster-alert.stories.js +82 -0
  19. package/dist/collection/components/luster-article-card/luster-article-card.css +120 -0
  20. package/dist/collection/components/luster-article-card/luster-article-card.js +192 -0
  21. package/dist/collection/components/luster-article-card/luster-article-card.stories.js +82 -0
  22. package/dist/collection/components/luster-badge/luster-badge.css +38 -0
  23. package/dist/collection/components/luster-badge/luster-badge.js +87 -0
  24. package/dist/collection/components/luster-badge/luster-badge.stories.js +86 -0
  25. package/dist/collection/components/luster-button/luster-button.css +121 -0
  26. package/dist/collection/components/luster-button/luster-button.js +179 -0
  27. package/dist/collection/components/luster-button/luster-button.stories.js +103 -0
  28. package/dist/collection/components/luster-card/luster-card.css +29 -0
  29. package/dist/collection/components/luster-card/luster-card.js +92 -0
  30. package/dist/collection/components/luster-card/luster-card.stories.js +67 -0
  31. package/dist/collection/components/luster-checkbox/luster-checkbox.css +42 -0
  32. package/dist/collection/components/luster-checkbox/luster-checkbox.js +162 -0
  33. package/dist/collection/components/luster-checkbox/luster-checkbox.stories.js +78 -0
  34. package/dist/collection/components/luster-color-swatch/luster-color-swatch.css +33 -0
  35. package/dist/collection/components/luster-color-swatch/luster-color-swatch.js +108 -0
  36. package/dist/collection/components/luster-color-swatch/luster-color-swatch.stories.js +58 -0
  37. package/dist/collection/components/luster-feature-quote/luster-feature-quote.css +84 -0
  38. package/dist/collection/components/luster-feature-quote/luster-feature-quote.js +108 -0
  39. package/dist/collection/components/luster-feature-quote/luster-feature-quote.stories.js +52 -0
  40. package/dist/collection/components/luster-hero/luster-hero.css +119 -0
  41. package/dist/collection/components/luster-hero/luster-hero.js +129 -0
  42. package/dist/collection/components/luster-hero/luster-hero.stories.js +72 -0
  43. package/dist/collection/components/luster-input/luster-input.css +72 -0
  44. package/dist/collection/components/luster-input/luster-input.js +332 -0
  45. package/dist/collection/components/luster-input/luster-input.stories.js +106 -0
  46. package/dist/collection/components/luster-modal/luster-modal.css +103 -0
  47. package/dist/collection/components/luster-modal/luster-modal.js +215 -0
  48. package/dist/collection/components/luster-modal/luster-modal.stories.js +78 -0
  49. package/dist/collection/components/luster-navbar/luster-navbar.css +151 -0
  50. package/dist/collection/components/luster-navbar/luster-navbar.js +87 -0
  51. package/dist/collection/components/luster-navbar/luster-navbar.stories.js +41 -0
  52. package/dist/collection/components/luster-profile-card/luster-profile-card.css +89 -0
  53. package/dist/collection/components/luster-profile-card/luster-profile-card.js +194 -0
  54. package/dist/collection/components/luster-profile-card/luster-profile-card.stories.js +56 -0
  55. package/dist/collection/components/luster-resource-table/luster-resource-table.css +141 -0
  56. package/dist/collection/components/luster-resource-table/luster-resource-table.js +78 -0
  57. package/dist/collection/components/luster-resource-table/luster-resource-table.stories.js +44 -0
  58. package/dist/collection/components/luster-sidebar/luster-sidebar.css +152 -0
  59. package/dist/collection/components/luster-sidebar/luster-sidebar.js +78 -0
  60. package/dist/collection/components/luster-sidebar/luster-sidebar.stories.js +34 -0
  61. package/dist/collection/components/luster-stat-card/luster-stat-card.css +82 -0
  62. package/dist/collection/components/luster-stat-card/luster-stat-card.js +194 -0
  63. package/dist/collection/components/luster-stat-card/luster-stat-card.stories.js +75 -0
  64. package/dist/collection/components/luster-tabs/luster-tabs.css +35 -0
  65. package/dist/collection/components/luster-tabs/luster-tabs.js +116 -0
  66. package/dist/collection/components/luster-tabs/luster-tabs.stories.js +56 -0
  67. package/dist/collection/components/luster-toggle/luster-toggle.css +48 -0
  68. package/dist/collection/components/luster-toggle/luster-toggle.js +120 -0
  69. package/dist/collection/components/luster-toggle/luster-toggle.stories.js +66 -0
  70. package/dist/components/index.d.ts +33 -0
  71. package/dist/components/index.js +1 -0
  72. package/dist/components/luster-accordion.d.ts +11 -0
  73. package/dist/components/luster-accordion.js +1 -0
  74. package/dist/components/luster-activity-item.d.ts +11 -0
  75. package/dist/components/luster-activity-item.js +1 -0
  76. package/dist/components/luster-alert.d.ts +11 -0
  77. package/dist/components/luster-alert.js +1 -0
  78. package/dist/components/luster-article-card.d.ts +11 -0
  79. package/dist/components/luster-article-card.js +1 -0
  80. package/dist/components/luster-badge.d.ts +11 -0
  81. package/dist/components/luster-badge.js +1 -0
  82. package/dist/components/luster-badge2.js +1 -0
  83. package/dist/components/luster-button.d.ts +11 -0
  84. package/dist/components/luster-button.js +1 -0
  85. package/dist/components/luster-button2.js +1 -0
  86. package/dist/components/luster-card.d.ts +11 -0
  87. package/dist/components/luster-card.js +1 -0
  88. package/dist/components/luster-checkbox.d.ts +11 -0
  89. package/dist/components/luster-checkbox.js +1 -0
  90. package/dist/components/luster-color-swatch.d.ts +11 -0
  91. package/dist/components/luster-color-swatch.js +1 -0
  92. package/dist/components/luster-feature-quote.d.ts +11 -0
  93. package/dist/components/luster-feature-quote.js +1 -0
  94. package/dist/components/luster-hero.d.ts +11 -0
  95. package/dist/components/luster-hero.js +1 -0
  96. package/dist/components/luster-input.d.ts +11 -0
  97. package/dist/components/luster-input.js +1 -0
  98. package/dist/components/luster-modal.d.ts +11 -0
  99. package/dist/components/luster-modal.js +1 -0
  100. package/dist/components/luster-navbar.d.ts +11 -0
  101. package/dist/components/luster-navbar.js +1 -0
  102. package/dist/components/luster-profile-card.d.ts +11 -0
  103. package/dist/components/luster-profile-card.js +1 -0
  104. package/dist/components/luster-resource-table.d.ts +11 -0
  105. package/dist/components/luster-resource-table.js +1 -0
  106. package/dist/components/luster-sidebar.d.ts +11 -0
  107. package/dist/components/luster-sidebar.js +1 -0
  108. package/dist/components/luster-stat-card.d.ts +11 -0
  109. package/dist/components/luster-stat-card.js +1 -0
  110. package/dist/components/luster-tabs.d.ts +11 -0
  111. package/dist/components/luster-tabs.js +1 -0
  112. package/dist/components/luster-toggle.d.ts +11 -0
  113. package/dist/components/luster-toggle.js +1 -0
  114. package/dist/components/luster-toggle2.js +1 -0
  115. package/dist/esm/index-CeYIN8dN.js +1563 -0
  116. package/dist/esm/index.js +1 -0
  117. package/dist/esm/loader.js +10 -0
  118. package/dist/esm/luster-accordion_19.entry.js +535 -0
  119. package/dist/esm/luster-card.entry.js +23 -0
  120. package/dist/esm/luster.js +20 -0
  121. package/dist/index.cjs.js +1 -0
  122. package/dist/index.js +1 -0
  123. package/dist/luster/index.esm.js +0 -0
  124. package/dist/luster/luster.css +313 -0
  125. package/dist/luster/luster.esm.js +1 -0
  126. package/dist/luster/p-3c4ce897.entry.js +1 -0
  127. package/dist/luster/p-CeYIN8dN.js +2 -0
  128. package/dist/luster/p-e368ec08.entry.js +1 -0
  129. package/dist/types/.stencil/luster-accordion/luster-accordion.d.ts +13 -0
  130. package/dist/types/.stencil/luster-accordion/luster-accordion.stories.d.ts +10 -0
  131. package/dist/types/.stencil/luster-activity-item/luster-activity-item.d.ts +11 -0
  132. package/dist/types/.stencil/luster-activity-item/luster-activity-item.stories.d.ts +9 -0
  133. package/dist/types/.stencil/luster-alert/luster-alert.d.ts +13 -0
  134. package/dist/types/.stencil/luster-alert/luster-alert.stories.d.ts +10 -0
  135. package/dist/types/.stencil/luster-article-card/luster-article-card.d.ts +11 -0
  136. package/dist/types/.stencil/luster-article-card/luster-article-card.stories.d.ts +8 -0
  137. package/dist/types/.stencil/luster-badge/luster-badge.d.ts +6 -0
  138. package/dist/types/.stencil/luster-badge/luster-badge.stories.d.ts +12 -0
  139. package/dist/types/.stencil/luster-button/luster-button.d.ts +12 -0
  140. package/dist/types/.stencil/luster-button/luster-button.stories.d.ts +13 -0
  141. package/dist/types/.stencil/luster-card/luster-card.d.ts +6 -0
  142. package/dist/types/.stencil/luster-card/luster-card.stories.d.ts +10 -0
  143. package/dist/types/.stencil/luster-checkbox/luster-checkbox.d.ts +13 -0
  144. package/dist/types/.stencil/luster-checkbox/luster-checkbox.stories.d.ts +10 -0
  145. package/dist/types/.stencil/luster-color-swatch/luster-color-swatch.d.ts +7 -0
  146. package/dist/types/.stencil/luster-color-swatch/luster-color-swatch.stories.d.ts +8 -0
  147. package/dist/types/.stencil/luster-feature-quote/luster-feature-quote.d.ts +7 -0
  148. package/dist/types/.stencil/luster-feature-quote/luster-feature-quote.stories.d.ts +8 -0
  149. package/dist/types/.stencil/luster-hero/luster-hero.d.ts +8 -0
  150. package/dist/types/.stencil/luster-hero/luster-hero.stories.d.ts +8 -0
  151. package/dist/types/.stencil/luster-input/luster-input.d.ts +25 -0
  152. package/dist/types/.stencil/luster-input/luster-input.stories.d.ts +9 -0
  153. package/dist/types/.stencil/luster-modal/luster-modal.d.ts +17 -0
  154. package/dist/types/.stencil/luster-modal/luster-modal.stories.d.ts +8 -0
  155. package/dist/types/.stencil/luster-navbar/luster-navbar.d.ts +6 -0
  156. package/dist/types/.stencil/luster-navbar/luster-navbar.stories.d.ts +6 -0
  157. package/dist/types/.stencil/luster-profile-card/luster-profile-card.d.ts +11 -0
  158. package/dist/types/.stencil/luster-profile-card/luster-profile-card.stories.d.ts +7 -0
  159. package/dist/types/.stencil/luster-resource-table/luster-resource-table.d.ts +14 -0
  160. package/dist/types/.stencil/luster-resource-table/luster-resource-table.stories.d.ts +6 -0
  161. package/dist/types/.stencil/luster-sidebar/luster-sidebar.d.ts +9 -0
  162. package/dist/types/.stencil/luster-sidebar/luster-sidebar.stories.d.ts +8 -0
  163. package/dist/types/.stencil/luster-stat-card/luster-stat-card.d.ts +11 -0
  164. package/dist/types/.stencil/luster-stat-card/luster-stat-card.stories.d.ts +8 -0
  165. package/dist/types/.stencil/luster-tabs/luster-tabs.d.ts +15 -0
  166. package/dist/types/.stencil/luster-tabs/luster-tabs.stories.d.ts +7 -0
  167. package/dist/types/.stencil/luster-toggle/luster-toggle.d.ts +11 -0
  168. package/dist/types/.stencil/luster-toggle/luster-toggle.stories.d.ts +9 -0
  169. package/dist/types/components.d.ts +1355 -0
  170. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  171. package/loader/cdn.js +1 -0
  172. package/loader/index.cjs.js +1 -0
  173. package/loader/index.d.ts +24 -0
  174. package/loader/index.es2017.js +1 -0
  175. package/loader/index.js +2 -0
  176. package/package.json +73 -0
@@ -0,0 +1,194 @@
1
+ import { h } from "@stencil/core";
2
+ export class DcProfileCard {
3
+ constructor() {
4
+ this.name = '';
5
+ this.role = '';
6
+ this.avatar = '';
7
+ this.stat1Value = '';
8
+ this.stat1Label = '';
9
+ this.stat2Value = '';
10
+ this.stat2Label = '';
11
+ this.ctaLabel = 'View Portfolio';
12
+ }
13
+ render() {
14
+ return (h("div", { key: '69a8fff167fee4805499b3bb754d286c2287413b', class: "profile-card" }, h("div", { key: 'd2547d0cec607d9d001b3074f69557f06d863e3d', class: "profile-card__avatar" }, this.avatar
15
+ ? h("img", { src: this.avatar, alt: this.name, class: "profile-card__avatar-img" })
16
+ : h("span", { class: "profile-card__avatar-initials" }, this.name.split(' ').map(n => n[0]).join('').slice(0, 2))), h("div", { key: '22f74d3a2982647a4fcfb807fb8ece81a59d2b9c', class: "profile-card__info" }, h("h3", { key: '06d8567c4c4be29e3653d39357fbf0235a907303', class: "profile-card__name" }, this.name), h("span", { key: '9e8500c7a3d5ee6c895d6209c067c9441dce7d2f', class: "profile-card__role" }, this.role)), (this.stat1Value || this.stat2Value) && (h("div", { key: '5dd61dcd4d290b140e50de1bf4ca3befb81d6f3a', class: "profile-card__stats" }, this.stat1Value && (h("div", { key: '2c972fdc9dd621540e7d7fc572df27bb61fef70a', class: "profile-card__stat" }, h("span", { key: '9693a5bb68e674a3c21681c8ba4b99ca12bf934c', class: "profile-card__stat-value" }, this.stat1Value), h("span", { key: 'ece29d1b9fdc7ebdc4461298bcae931f6d83e8ed', class: "profile-card__stat-label" }, this.stat1Label))), this.stat2Value && (h("div", { key: '211198eda038b08f6093289b7f97c8d5fdac6b6e', class: "profile-card__stat" }, h("span", { key: 'ce84623aeeed41e2b48f0e50a10b4b633fd5b246', class: "profile-card__stat-value" }, this.stat2Value), h("span", { key: 'dcfad2516563bdef51e37623a8fd3c474bea40a6', class: "profile-card__stat-label" }, this.stat2Label))))), h("luster-button", { key: '5de015471f6e29cc283aef60bb7097ec384b3b15', variant: "primary", "full-width": true }, this.ctaLabel)));
17
+ }
18
+ static get is() { return "luster-profile-card"; }
19
+ static get encapsulation() { return "shadow"; }
20
+ static get originalStyleUrls() {
21
+ return {
22
+ "$": ["luster-profile-card.css"]
23
+ };
24
+ }
25
+ static get styleUrls() {
26
+ return {
27
+ "$": ["luster-profile-card.css"]
28
+ };
29
+ }
30
+ static get properties() {
31
+ return {
32
+ "name": {
33
+ "type": "string",
34
+ "mutable": false,
35
+ "complexType": {
36
+ "original": "string",
37
+ "resolved": "string",
38
+ "references": {}
39
+ },
40
+ "required": false,
41
+ "optional": false,
42
+ "docs": {
43
+ "tags": [],
44
+ "text": ""
45
+ },
46
+ "getter": false,
47
+ "setter": false,
48
+ "reflect": false,
49
+ "attribute": "name",
50
+ "defaultValue": "''"
51
+ },
52
+ "role": {
53
+ "type": "string",
54
+ "mutable": false,
55
+ "complexType": {
56
+ "original": "string",
57
+ "resolved": "string",
58
+ "references": {}
59
+ },
60
+ "required": false,
61
+ "optional": false,
62
+ "docs": {
63
+ "tags": [],
64
+ "text": ""
65
+ },
66
+ "getter": false,
67
+ "setter": false,
68
+ "reflect": false,
69
+ "attribute": "role",
70
+ "defaultValue": "''"
71
+ },
72
+ "avatar": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "string",
77
+ "resolved": "string",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": false,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": ""
85
+ },
86
+ "getter": false,
87
+ "setter": false,
88
+ "reflect": false,
89
+ "attribute": "avatar",
90
+ "defaultValue": "''"
91
+ },
92
+ "stat1Value": {
93
+ "type": "string",
94
+ "mutable": false,
95
+ "complexType": {
96
+ "original": "string",
97
+ "resolved": "string",
98
+ "references": {}
99
+ },
100
+ "required": false,
101
+ "optional": false,
102
+ "docs": {
103
+ "tags": [],
104
+ "text": ""
105
+ },
106
+ "getter": false,
107
+ "setter": false,
108
+ "reflect": false,
109
+ "attribute": "stat-1-value",
110
+ "defaultValue": "''"
111
+ },
112
+ "stat1Label": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "string",
117
+ "resolved": "string",
118
+ "references": {}
119
+ },
120
+ "required": false,
121
+ "optional": false,
122
+ "docs": {
123
+ "tags": [],
124
+ "text": ""
125
+ },
126
+ "getter": false,
127
+ "setter": false,
128
+ "reflect": false,
129
+ "attribute": "stat-1-label",
130
+ "defaultValue": "''"
131
+ },
132
+ "stat2Value": {
133
+ "type": "string",
134
+ "mutable": false,
135
+ "complexType": {
136
+ "original": "string",
137
+ "resolved": "string",
138
+ "references": {}
139
+ },
140
+ "required": false,
141
+ "optional": false,
142
+ "docs": {
143
+ "tags": [],
144
+ "text": ""
145
+ },
146
+ "getter": false,
147
+ "setter": false,
148
+ "reflect": false,
149
+ "attribute": "stat-2-value",
150
+ "defaultValue": "''"
151
+ },
152
+ "stat2Label": {
153
+ "type": "string",
154
+ "mutable": false,
155
+ "complexType": {
156
+ "original": "string",
157
+ "resolved": "string",
158
+ "references": {}
159
+ },
160
+ "required": false,
161
+ "optional": false,
162
+ "docs": {
163
+ "tags": [],
164
+ "text": ""
165
+ },
166
+ "getter": false,
167
+ "setter": false,
168
+ "reflect": false,
169
+ "attribute": "stat-2-label",
170
+ "defaultValue": "''"
171
+ },
172
+ "ctaLabel": {
173
+ "type": "string",
174
+ "mutable": false,
175
+ "complexType": {
176
+ "original": "string",
177
+ "resolved": "string",
178
+ "references": {}
179
+ },
180
+ "required": false,
181
+ "optional": false,
182
+ "docs": {
183
+ "tags": [],
184
+ "text": ""
185
+ },
186
+ "getter": false,
187
+ "setter": false,
188
+ "reflect": false,
189
+ "attribute": "cta-label",
190
+ "defaultValue": "'View Portfolio'"
191
+ }
192
+ };
193
+ }
194
+ }
@@ -0,0 +1,56 @@
1
+ import { html } from "lit";
2
+ const meta = {
3
+ title: 'Cards/Profile Card',
4
+ tags: ['autodocs'],
5
+ parameters: {
6
+ docs: {
7
+ description: {
8
+ component: 'Cartão de perfil de usuário com avatar, estatísticas e CTA. Props: `name`, `role`, `avatar`, `stat1-value`, `stat1-label`, `stat2-value`, `stat2-label`, `cta-label`.',
9
+ },
10
+ },
11
+ },
12
+ argTypes: {
13
+ name: { control: 'text', description: 'Nome do usuário' },
14
+ role: { control: 'text', description: 'Cargo / função' },
15
+ avatar: { control: 'text', description: 'URL do avatar (vazio = iniciais)' },
16
+ stat1Value: { control: 'text', description: 'Valor da estatística 1' },
17
+ stat1Label: { control: 'text', description: 'Label da estatística 1' },
18
+ stat2Value: { control: 'text', description: 'Valor da estatística 2' },
19
+ stat2Label: { control: 'text', description: 'Label da estatística 2' },
20
+ ctaLabel: { control: 'text', description: 'Label do botão CTA' },
21
+ },
22
+ args: {
23
+ name: 'Alex Curator',
24
+ role: 'Lead Editor',
25
+ avatar: '',
26
+ stat1Value: '142',
27
+ stat1Label: 'Articles',
28
+ stat2Value: '4.9k',
29
+ stat2Label: 'Followers',
30
+ ctaLabel: 'View Portfolio',
31
+ },
32
+ };
33
+ export default meta;
34
+ const render = (args) => html `
35
+ <luster-profile-card
36
+ name="${args.name}"
37
+ role="${args.role}"
38
+ avatar="${args.avatar}"
39
+ stat1-value="${args.stat1Value}"
40
+ stat1-label="${args.stat1Label}"
41
+ stat2-value="${args.stat2Value}"
42
+ stat2-label="${args.stat2Label}"
43
+ cta-label="${args.ctaLabel}"
44
+ ></luster-profile-card>
45
+ `;
46
+ export const Default = { render };
47
+ export const NoStats = {
48
+ name: 'No Stats',
49
+ args: { stat1Value: '', stat2Value: '' },
50
+ render,
51
+ };
52
+ export const CustomCTA = {
53
+ name: 'Custom CTA',
54
+ args: { ctaLabel: 'Message Alex', name: 'Alex Vieira', role: 'Design Engineer' },
55
+ render,
56
+ };
@@ -0,0 +1,141 @@
1
+ :host { display: block; }
2
+
3
+ .resource-table {
4
+ background: var(--dc-surface-container-high);
5
+ border-radius: var(--dc-round-4);
6
+ overflow: hidden;
7
+ }
8
+
9
+ .resource-table__header {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: space-between;
13
+ padding: var(--dc-space-4) var(--dc-space-6);
14
+ border-bottom: 1px solid var(--dc-border-faint);
15
+ }
16
+
17
+ .resource-table__section-label {
18
+ font-family: var(--dc-font-display);
19
+ font-size: var(--dc-title-sm);
20
+ font-weight: 700;
21
+ color: var(--dc-on-surface);
22
+ }
23
+
24
+ .resource-table__actions {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: var(--dc-space-3);
28
+ }
29
+
30
+ .resource-table__filter-btn {
31
+ display: flex;
32
+ align-items: center;
33
+ gap: var(--dc-space-2);
34
+ padding: var(--dc-space-1) var(--dc-space-3);
35
+ background: var(--dc-close-bg);
36
+ border: 1px solid var(--dc-border-medium);
37
+ border-radius: var(--dc-round-2);
38
+ color: var(--dc-on-surface-variant);
39
+ font-family: var(--dc-font-body);
40
+ font-size: var(--dc-label-md);
41
+ font-weight: 500;
42
+ cursor: pointer;
43
+ transition: all var(--dc-transition-fast);
44
+ }
45
+
46
+ .resource-table__filter-btn:hover { background: var(--dc-close-hover); color: var(--dc-on-surface); }
47
+
48
+ .resource-table__table {
49
+ width: 100%;
50
+ border-collapse: collapse;
51
+ }
52
+
53
+ .resource-table__th {
54
+ padding: var(--dc-space-3) var(--dc-space-6);
55
+ text-align: left;
56
+ font-size: var(--dc-label-sm);
57
+ font-weight: 700;
58
+ color: var(--dc-on-surface-variant);
59
+ letter-spacing: var(--dc-tracking-wide);
60
+ text-transform: uppercase;
61
+ background: var(--dc-surface-container);
62
+ }
63
+
64
+ .resource-table__row {
65
+ transition: background var(--dc-transition-fast);
66
+ border-bottom: 1px solid var(--dc-divider);
67
+ }
68
+
69
+ .resource-table__row:hover { background: var(--dc-hover-tint); }
70
+ .resource-table__row:last-child { border-bottom: none; }
71
+
72
+ .resource-table__td {
73
+ padding: var(--dc-space-3) var(--dc-space-6);
74
+ vertical-align: middle;
75
+ }
76
+
77
+ .resource-table__name-cell {
78
+ display: flex;
79
+ align-items: center;
80
+ gap: var(--dc-space-3);
81
+ }
82
+
83
+ .resource-table__row-icon {
84
+ width: 32px;
85
+ height: 32px;
86
+ border-radius: var(--dc-round-2);
87
+ background: var(--dc-icon-bg);
88
+ flex-shrink: 0;
89
+ }
90
+
91
+ .resource-table__name {
92
+ font-size: var(--dc-body-sm);
93
+ font-weight: 600;
94
+ color: var(--dc-on-surface);
95
+ }
96
+
97
+ .resource-table__category {
98
+ font-size: var(--dc-body-sm);
99
+ color: var(--dc-on-surface-variant);
100
+ }
101
+
102
+ .score-bar {
103
+ display: flex;
104
+ align-items: center;
105
+ gap: var(--dc-space-3);
106
+ }
107
+
108
+ .score-bar__track {
109
+ flex: 1;
110
+ height: 4px;
111
+ background: var(--dc-close-hover);
112
+ border-radius: var(--dc-round-full);
113
+ overflow: hidden;
114
+ min-width: 80px;
115
+ }
116
+
117
+ .score-bar__fill {
118
+ height: 100%;
119
+ border-radius: var(--dc-round-full);
120
+ transition: width var(--dc-transition-slow);
121
+ }
122
+
123
+ .score-bar__label {
124
+ font-size: var(--dc-label-sm);
125
+ color: var(--dc-on-surface-variant);
126
+ min-width: 24px;
127
+ }
128
+
129
+ .resource-table__action-btn {
130
+ background: none;
131
+ border: none;
132
+ color: var(--dc-on-surface-variant);
133
+ cursor: pointer;
134
+ padding: var(--dc-space-1);
135
+ border-radius: var(--dc-round-2);
136
+ display: flex;
137
+ align-items: center;
138
+ transition: all var(--dc-transition-fast);
139
+ }
140
+
141
+ .resource-table__action-btn:hover { background: var(--dc-hover-tint-icon-md); color: var(--dc-on-surface); }
@@ -0,0 +1,78 @@
1
+ import { h } from "@stencil/core";
2
+ export class DcResourceTable {
3
+ constructor() {
4
+ this.rows = '[]';
5
+ this.parsedRows = [];
6
+ }
7
+ componentWillLoad() {
8
+ if (typeof this.rows === 'string') {
9
+ try {
10
+ this.parsedRows = JSON.parse(this.rows);
11
+ }
12
+ catch (_a) {
13
+ this.parsedRows = [];
14
+ }
15
+ }
16
+ else {
17
+ this.parsedRows = this.rows;
18
+ }
19
+ }
20
+ getStatusVariant(status) {
21
+ if (status === 'active')
22
+ return 'success';
23
+ if (status === 'stable')
24
+ return 'primary';
25
+ if (status === 'beta')
26
+ return 'beta';
27
+ return 'error';
28
+ }
29
+ renderScoreBar(score) {
30
+ const color = score >= 80 ? 'var(--dc-primary)' : score >= 50 ? 'var(--dc-warning)' : 'var(--dc-error)';
31
+ return (h("div", { class: "score-bar" }, h("div", { class: "score-bar__track" }, h("div", { class: "score-bar__fill", style: { width: `${score}%`, background: color } })), h("span", { class: "score-bar__label" }, score)));
32
+ }
33
+ render() {
34
+ return (h("div", { key: '6bdeb9b52ef5582e7f0e8c393c9227c80f84f008', class: "resource-table" }, h("div", { key: 'e0487a74bad62fa8b102dff89a0830a5699b5ed0', class: "resource-table__header" }, h("span", { key: '569ff5a31ce8851b717d860cac1572a2276b4570', class: "resource-table__section-label" }, "Resource Registry"), h("div", { key: '1188c11c3ac56f061e7b8e429ca4124cf4eb9003', class: "resource-table__actions" }, h("button", { key: '6918269ebfdc7036de0f215af7917f6c4fd30fef', class: "resource-table__filter-btn" }, h("svg", { key: 'df3013ce155e854c73e119b4cb6460a64dc8c745', width: "14", height: "14", viewBox: "0 0 24 24", fill: "none" }, h("polygon", { key: '8c6e8e05f16f1ae2381ea5854cfbe895d649b50c', points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3", stroke: "currentColor", "stroke-width": "2", "stroke-linejoin": "round" })), "Filter"), h("luster-button", { key: '8f279527c0c382383606b8adc630fd073d1a0228', variant: "primary", size: "sm" }, h("svg", { key: '9084bef4d4a7c36a65ec2ad638e8ac2306fe9e8b', width: "12", height: "12", viewBox: "0 0 24 24", fill: "none" }, h("line", { key: 'f0fe5080bf336f57543d7c2674c89133799c446e', x1: "12", y1: "5", x2: "12", y2: "19", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round" }), h("line", { key: '2ba13c955df243e207f23412fd83711d739bd7c7', x1: "5", y1: "12", x2: "19", y2: "12", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round" })), "New Resource"))), h("table", { key: 'babbd76b01ed435059b1aa464bfb8b18d232b055', class: "resource-table__table" }, h("thead", { key: 'c4c6c3da19b5fc1ffd6054972d5984559e91ba21' }, h("tr", { key: '99ef959a0097257388338bd19fdd5bc5c3034135' }, h("th", { key: '4620f3a90752404ed11a6b0fb5bd61b46593bdc6', class: "resource-table__th" }, "Resource Name"), h("th", { key: '56a8d39b968cb1792df91eb33a15f52e25b5f033', class: "resource-table__th" }, "Category"), h("th", { key: '2f73489d579a24238ff62bccd275869afcf5ca5e', class: "resource-table__th" }, "Status"), h("th", { key: '6bacb56a5f7243da34c64da024aee65eadf86183', class: "resource-table__th" }, "Score"), h("th", { key: '7a0d111e4a20b1d249343c3b0f7c5a1125aff7eb', class: "resource-table__th" }, "Actions"))), h("tbody", { key: '86dbffb47088aac4ca6f549e5813c3cab148419a' }, this.parsedRows.map((row, i) => (h("tr", { key: i, class: "resource-table__row" }, h("td", { class: "resource-table__td resource-table__td--name" }, h("div", { class: "resource-table__name-cell" }, h("div", { class: "resource-table__row-icon" }), h("span", { class: "resource-table__name" }, row.name))), h("td", { class: "resource-table__td" }, h("span", { class: "resource-table__category" }, row.category)), h("td", { class: "resource-table__td" }, h("luster-badge", { variant: this.getStatusVariant(row.status), dot: true }, row.status.charAt(0).toUpperCase() + row.status.slice(1))), h("td", { class: "resource-table__td" }, this.renderScoreBar(row.score)), h("td", { class: "resource-table__td" }, h("button", { class: "resource-table__action-btn", "aria-label": "More actions" }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none" }, h("circle", { cx: "12", cy: "5", r: "1.5", fill: "currentColor" }), h("circle", { cx: "12", cy: "12", r: "1.5", fill: "currentColor" }), h("circle", { cx: "12", cy: "19", r: "1.5", fill: "currentColor" })))))))))));
35
+ }
36
+ static get is() { return "luster-resource-table"; }
37
+ static get encapsulation() { return "shadow"; }
38
+ static get originalStyleUrls() {
39
+ return {
40
+ "$": ["luster-resource-table.css"]
41
+ };
42
+ }
43
+ static get styleUrls() {
44
+ return {
45
+ "$": ["luster-resource-table.css"]
46
+ };
47
+ }
48
+ static get properties() {
49
+ return {
50
+ "rows": {
51
+ "type": "string",
52
+ "mutable": false,
53
+ "complexType": {
54
+ "original": "ResourceRow[] | string",
55
+ "resolved": "ResourceRow[] | string",
56
+ "references": {
57
+ "ResourceRow": {
58
+ "location": "local",
59
+ "path": "C:/Users/vieir/Documents/estudos/luster/stencil-ds/src/components/luster-resource-table/luster-resource-table.tsx",
60
+ "id": "src/components/luster-resource-table/luster-resource-table.tsx::ResourceRow"
61
+ }
62
+ }
63
+ },
64
+ "required": false,
65
+ "optional": false,
66
+ "docs": {
67
+ "tags": [],
68
+ "text": ""
69
+ },
70
+ "getter": false,
71
+ "setter": false,
72
+ "reflect": false,
73
+ "attribute": "rows",
74
+ "defaultValue": "'[]'"
75
+ }
76
+ };
77
+ }
78
+ }
@@ -0,0 +1,44 @@
1
+ import { html } from "lit";
2
+ const sampleRows = JSON.stringify([
3
+ { name: 'luster-button', category: 'Interaction', status: 'active', score: 98 },
4
+ { name: 'luster-input', category: 'Form', status: 'active', score: 95 },
5
+ { name: 'luster-modal', category: 'Overlay', status: 'active', score: 88 },
6
+ { name: 'luster-hero', category: 'Layout', status: 'beta', score: 72 },
7
+ { name: 'luster-tabs', category: 'Navigation', status: 'stable', score: 91 },
8
+ { name: 'luster-accordion', category: 'Disclosure', status: 'active', score: 85 },
9
+ { name: 'dc-button', category: 'Legacy', status: 'deprecated', score: 20 },
10
+ ]);
11
+ const meta = {
12
+ title: 'Cards/Resource Table',
13
+ tags: ['autodocs'],
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: 'Tabela de registro de recursos com status, categoria e score de qualidade. Props: `rows` (JSON array).',
18
+ },
19
+ },
20
+ layout: 'fullscreen',
21
+ },
22
+ argTypes: {
23
+ rows: {
24
+ control: 'text',
25
+ description: 'Array JSON de linhas: `[{name, category, status, score}]`',
26
+ },
27
+ },
28
+ args: { rows: sampleRows },
29
+ };
30
+ export default meta;
31
+ const render = (args) => html `
32
+ <luster-resource-table rows="${args.rows}"></luster-resource-table>
33
+ `;
34
+ export const Default = { render };
35
+ export const ShortList = {
36
+ name: 'Short List',
37
+ args: {
38
+ rows: JSON.stringify([
39
+ { name: 'luster-badge', category: 'Display', status: 'active', score: 100 },
40
+ { name: 'luster-toggle', category: 'Form', status: 'active', score: 96 },
41
+ ]),
42
+ },
43
+ render,
44
+ };
@@ -0,0 +1,152 @@
1
+ :host {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 196px;
5
+ min-width: 196px;
6
+ background: var(--dc-surface-container-low);
7
+ height: 100%;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .sidebar {
12
+ display: flex;
13
+ flex-direction: column;
14
+ height: 100%;
15
+ padding: var(--dc-space-4) 0;
16
+ }
17
+
18
+ .sidebar__nav {
19
+ flex: 1;
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 2px;
23
+ padding: 0 var(--dc-space-3);
24
+ overflow-y: auto;
25
+ }
26
+
27
+ .sidebar__item {
28
+ display: flex;
29
+ align-items: center;
30
+ gap: var(--dc-space-3);
31
+ padding: var(--dc-space-2) var(--dc-space-3);
32
+ border-radius: var(--dc-round-2);
33
+ cursor: pointer;
34
+ text-decoration: none;
35
+ color: var(--dc-on-surface-variant);
36
+ font-family: var(--dc-font-body);
37
+ font-size: var(--dc-body-md);
38
+ font-weight: 500;
39
+ transition: all var(--dc-transition-fast);
40
+ line-height: 1.3;
41
+ }
42
+
43
+ .sidebar__item:hover {
44
+ background: var(--dc-hover-tint-md);
45
+ color: var(--dc-on-surface);
46
+ }
47
+
48
+ .sidebar__item--active {
49
+ background: var(--dc-focus-ring);
50
+ color: var(--dc-primary);
51
+ }
52
+
53
+ .sidebar__item--active .sidebar__icon {
54
+ color: var(--dc-primary);
55
+ }
56
+
57
+ .sidebar__item--sm {
58
+ padding: var(--dc-space-1) var(--dc-space-3);
59
+ font-size: var(--dc-label-md);
60
+ }
61
+
62
+ .sidebar__icon {
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ flex-shrink: 0;
67
+ color: inherit;
68
+ }
69
+
70
+ .sidebar__label {
71
+ line-height: 1.2;
72
+ }
73
+
74
+ .sidebar__bottom {
75
+ padding: var(--dc-space-3) var(--dc-space-3) 0;
76
+ display: flex;
77
+ flex-direction: column;
78
+ gap: var(--dc-space-2);
79
+ border-top: 1px solid var(--dc-border-default);
80
+ margin-top: var(--dc-space-3);
81
+ }
82
+
83
+ .sidebar__new-btn {
84
+ display: flex;
85
+ align-items: center;
86
+ justify-content: center;
87
+ gap: var(--dc-space-2);
88
+ padding: var(--dc-space-2) var(--dc-space-3);
89
+ background: var(--dc-hover-tint-strong);
90
+ border: 1px solid var(--dc-focus-ring);
91
+ border-radius: var(--dc-round-2);
92
+ color: var(--dc-primary);
93
+ font-family: var(--dc-font-body);
94
+ font-size: var(--dc-label-md);
95
+ font-weight: 600;
96
+ cursor: pointer;
97
+ transition: all var(--dc-transition-fast);
98
+ width: 100%;
99
+ }
100
+
101
+ .sidebar__new-btn:hover {
102
+ background: var(--dc-hover-tint-strong);
103
+ border-color: var(--dc-focus-ring-hover);
104
+ }
105
+
106
+ .sidebar__footer-links {
107
+ display: flex;
108
+ flex-direction: column;
109
+ gap: 2px;
110
+ }
111
+
112
+ .sidebar__user {
113
+ display: flex;
114
+ align-items: center;
115
+ gap: var(--dc-space-3);
116
+ padding: var(--dc-space-2) 0 var(--dc-space-2) var(--dc-space-1);
117
+ }
118
+
119
+ .sidebar__user-avatar {
120
+ width: 30px;
121
+ height: 30px;
122
+ border-radius: var(--dc-round-full);
123
+ background: linear-gradient(135deg, var(--dc-primary), var(--dc-primary-dim));
124
+ display: flex;
125
+ align-items: center;
126
+ justify-content: center;
127
+ font-size: 10px;
128
+ font-weight: 700;
129
+ color: var(--dc-on-primary);
130
+ flex-shrink: 0;
131
+ }
132
+
133
+ .sidebar__user-info {
134
+ display: flex;
135
+ flex-direction: column;
136
+ gap: 1px;
137
+ overflow: hidden;
138
+ }
139
+
140
+ .sidebar__user-name {
141
+ font-size: var(--dc-label-md);
142
+ font-weight: 600;
143
+ color: var(--dc-on-surface);
144
+ white-space: nowrap;
145
+ overflow: hidden;
146
+ text-overflow: ellipsis;
147
+ }
148
+
149
+ .sidebar__user-role {
150
+ font-size: var(--dc-label-sm);
151
+ color: var(--dc-on-surface-variant);
152
+ }