@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,120 @@
1
+ :host { display: block; }
2
+
3
+ .article-card {
4
+ background: var(--dc-surface-container-high);
5
+ border-radius: var(--dc-round-4);
6
+ overflow: hidden;
7
+ display: flex;
8
+ flex-direction: column;
9
+ transition: background var(--dc-transition-base);
10
+ cursor: pointer;
11
+ }
12
+
13
+ .article-card:hover { background: var(--dc-surface-bright); }
14
+
15
+ .article-card__image {
16
+ position: relative;
17
+ height: 160px;
18
+ overflow: hidden;
19
+ }
20
+
21
+ .article-card__image img {
22
+ width: 100%;
23
+ height: 100%;
24
+ object-fit: cover;
25
+ }
26
+
27
+ .article-card__image-overlay {
28
+ position: absolute;
29
+ inset: 0;
30
+ background: linear-gradient(to bottom, var(--dc-image-overlay-top) 0%, var(--dc-image-overlay-bottom) 100%);
31
+ }
32
+
33
+ .article-card__body {
34
+ padding: var(--dc-space-5);
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: var(--dc-space-3);
38
+ flex: 1;
39
+ }
40
+
41
+ .article-card__category {
42
+ font-size: var(--dc-label-sm);
43
+ font-weight: 700;
44
+ color: var(--dc-primary);
45
+ letter-spacing: var(--dc-tracking-wider);
46
+ text-transform: uppercase;
47
+ }
48
+
49
+ .article-card__date {
50
+ font-size: var(--dc-label-sm);
51
+ color: var(--dc-on-surface-variant);
52
+ }
53
+
54
+ .article-card__title {
55
+ font-family: var(--dc-font-display);
56
+ font-size: var(--dc-title-lg);
57
+ font-weight: 700;
58
+ color: var(--dc-on-surface);
59
+ letter-spacing: var(--dc-tracking-tight);
60
+ line-height: 1.3;
61
+ margin: 0;
62
+ }
63
+
64
+ .article-card--featured .article-card__title {
65
+ font-size: var(--dc-headline-sm);
66
+ }
67
+
68
+ .article-card__excerpt {
69
+ font-size: var(--dc-body-sm);
70
+ color: var(--dc-on-surface-variant);
71
+ line-height: 1.6;
72
+ margin: 0;
73
+ display: -webkit-box;
74
+ -webkit-line-clamp: 3;
75
+ -webkit-box-orient: vertical;
76
+ overflow: hidden;
77
+ }
78
+
79
+ .article-card__byline {
80
+ display: flex;
81
+ align-items: center;
82
+ gap: var(--dc-space-2);
83
+ margin-top: auto;
84
+ }
85
+
86
+ .article-card__author-avatar {
87
+ width: 24px;
88
+ height: 24px;
89
+ border-radius: var(--dc-round-full);
90
+ background: linear-gradient(135deg, var(--dc-primary), var(--dc-primary-dim));
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: center;
94
+ font-size: 10px;
95
+ font-weight: 700;
96
+ color: var(--dc-on-primary);
97
+ flex-shrink: 0;
98
+ }
99
+
100
+ .article-card__author {
101
+ display: block;
102
+ font-size: var(--dc-label-md);
103
+ font-weight: 600;
104
+ color: var(--dc-on-surface);
105
+ }
106
+
107
+ .article-card__author-role {
108
+ display: block;
109
+ font-size: var(--dc-label-sm);
110
+ color: var(--dc-on-surface-variant);
111
+ }
112
+
113
+ .article-card__read-more {
114
+ display: flex;
115
+ align-items: center;
116
+ gap: var(--dc-space-1);
117
+ font-size: var(--dc-label-sm);
118
+ color: var(--dc-primary);
119
+ margin-left: auto;
120
+ }
@@ -0,0 +1,192 @@
1
+ import { h } from "@stencil/core";
2
+ export class DcArticleCard {
3
+ constructor() {
4
+ this.category = '';
5
+ this.heading = '';
6
+ this.excerpt = '';
7
+ this.date = '';
8
+ this.author = '';
9
+ this.authorRole = '';
10
+ this.imageUrl = '';
11
+ this.featured = false;
12
+ }
13
+ render() {
14
+ return (h("article", { key: '520f8dc527b674523094963a9fe21caa1bfe1cff', class: `article-card ${this.featured ? 'article-card--featured' : ''}` }, this.featured && this.imageUrl && (h("div", { key: '8f190538fbacc6e87be7573a5d91fce8c1f9dd53', class: "article-card__image" }, h("img", { key: '120e1b8d46076ab89333565f9b0c6b98ad6b2850', src: this.imageUrl, alt: this.heading }), h("div", { key: 'a31961b7c434a95ba063f5a0a121c5b3b4709484', class: "article-card__image-overlay" }))), h("div", { key: 'dd331d9b8896566747539b658d4e3c77eff11798', class: "article-card__body" }, this.category && (h("span", { key: '26f6c42e629c2576715d3c0b43ec61a73edbf8f1', class: "article-card__category" }, this.category)), this.date && !this.featured && (h("span", { key: '3d05f2ae1b3b102558422307b545f144ea920cd4', class: "article-card__date" }, this.date)), this.date && this.featured && (h("span", { key: '492c6989b62416e891349a7027ce9cade8be229a', class: "article-card__date" }, this.date)), h("h3", { key: 'aa7a850253dbf612ba16fa9b628a2abd25a74083', class: "article-card__title" }, this.heading), this.excerpt && (h("p", { key: '933fd34f4f424d95f94d05eacbe6b4694cc580a8', class: "article-card__excerpt" }, this.excerpt)), (this.author || this.authorRole) && (h("div", { key: 'b0a42dd52449991dab675fd2d492c6646f7f9dfc', class: "article-card__byline" }, h("div", { key: '2ea5b62143c7f4796f46faca3e6f1fa7419b6c93', class: "article-card__author-avatar" }, this.author.charAt(0)), h("div", { key: 'b1e7ff029659a237da73c7421f5742b1ce655a60' }, h("span", { key: 'e4a71f5e73610d6b5fcce237cd30a1f9eb8512ea', class: "article-card__author" }, this.author), this.authorRole && h("span", { key: '936042578927a847d0601bdfba58afafcc57cbf9', class: "article-card__author-role" }, this.authorRole)), h("span", { key: '5435de2d1ecb991c8500bbb3c7e22b3f3dc7f361', class: "article-card__read-more" }, h("svg", { key: '49186537061817a26ded5538a8b5cf185b5c5e1e', width: "14", height: "14", viewBox: "0 0 24 24", fill: "none" }, h("path", { key: '7304d21f204471e939ebeeeb51d3eb817e392262', d: "M5 12h14M12 5l7 7-7 7", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })), "More"))))));
15
+ }
16
+ static get is() { return "luster-article-card"; }
17
+ static get encapsulation() { return "shadow"; }
18
+ static get originalStyleUrls() {
19
+ return {
20
+ "$": ["luster-article-card.css"]
21
+ };
22
+ }
23
+ static get styleUrls() {
24
+ return {
25
+ "$": ["luster-article-card.css"]
26
+ };
27
+ }
28
+ static get properties() {
29
+ return {
30
+ "category": {
31
+ "type": "string",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "string",
35
+ "resolved": "string",
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": "category",
48
+ "defaultValue": "''"
49
+ },
50
+ "heading": {
51
+ "type": "string",
52
+ "mutable": false,
53
+ "complexType": {
54
+ "original": "string",
55
+ "resolved": "string",
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": "heading",
68
+ "defaultValue": "''"
69
+ },
70
+ "excerpt": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "string",
75
+ "resolved": "string",
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": "excerpt",
88
+ "defaultValue": "''"
89
+ },
90
+ "date": {
91
+ "type": "string",
92
+ "mutable": false,
93
+ "complexType": {
94
+ "original": "string",
95
+ "resolved": "string",
96
+ "references": {}
97
+ },
98
+ "required": false,
99
+ "optional": false,
100
+ "docs": {
101
+ "tags": [],
102
+ "text": ""
103
+ },
104
+ "getter": false,
105
+ "setter": false,
106
+ "reflect": false,
107
+ "attribute": "date",
108
+ "defaultValue": "''"
109
+ },
110
+ "author": {
111
+ "type": "string",
112
+ "mutable": false,
113
+ "complexType": {
114
+ "original": "string",
115
+ "resolved": "string",
116
+ "references": {}
117
+ },
118
+ "required": false,
119
+ "optional": false,
120
+ "docs": {
121
+ "tags": [],
122
+ "text": ""
123
+ },
124
+ "getter": false,
125
+ "setter": false,
126
+ "reflect": false,
127
+ "attribute": "author",
128
+ "defaultValue": "''"
129
+ },
130
+ "authorRole": {
131
+ "type": "string",
132
+ "mutable": false,
133
+ "complexType": {
134
+ "original": "string",
135
+ "resolved": "string",
136
+ "references": {}
137
+ },
138
+ "required": false,
139
+ "optional": false,
140
+ "docs": {
141
+ "tags": [],
142
+ "text": ""
143
+ },
144
+ "getter": false,
145
+ "setter": false,
146
+ "reflect": false,
147
+ "attribute": "author-role",
148
+ "defaultValue": "''"
149
+ },
150
+ "imageUrl": {
151
+ "type": "string",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "string",
155
+ "resolved": "string",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": false,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": ""
163
+ },
164
+ "getter": false,
165
+ "setter": false,
166
+ "reflect": false,
167
+ "attribute": "image-url",
168
+ "defaultValue": "''"
169
+ },
170
+ "featured": {
171
+ "type": "boolean",
172
+ "mutable": false,
173
+ "complexType": {
174
+ "original": "boolean",
175
+ "resolved": "boolean",
176
+ "references": {}
177
+ },
178
+ "required": false,
179
+ "optional": false,
180
+ "docs": {
181
+ "tags": [],
182
+ "text": ""
183
+ },
184
+ "getter": false,
185
+ "setter": false,
186
+ "reflect": false,
187
+ "attribute": "featured",
188
+ "defaultValue": "false"
189
+ }
190
+ };
191
+ }
192
+ }
@@ -0,0 +1,82 @@
1
+ import { html } from "lit";
2
+ const meta = {
3
+ title: 'Cards/Article Card',
4
+ tags: ['autodocs'],
5
+ parameters: {
6
+ docs: {
7
+ description: {
8
+ component: 'Cartão editorial de artigo com suporte a variante featured. Props: `heading`, `excerpt`, `date`, `author`, `author-role`, `category`, `image-url`, `featured`.',
9
+ },
10
+ },
11
+ },
12
+ argTypes: {
13
+ heading: { control: 'text', description: 'Título do artigo' },
14
+ excerpt: { control: 'text', description: 'Resumo do artigo' },
15
+ date: { control: 'text', description: 'Data de publicação' },
16
+ author: { control: 'text', description: 'Nome do autor' },
17
+ authorRole: { control: 'text', description: 'Cargo do autor' },
18
+ category: { control: 'text', description: 'Categoria' },
19
+ imageUrl: { control: 'text', description: 'URL da imagem (apenas no featured)' },
20
+ featured: {
21
+ control: 'boolean',
22
+ description: 'Layout destaque com imagem',
23
+ table: { defaultValue: { summary: 'false' } },
24
+ },
25
+ },
26
+ args: {
27
+ heading: 'The Future of Editorial Design Systems',
28
+ excerpt: 'How modern design tokens and component libraries are reshaping the way editorial teams work.',
29
+ date: 'Apr 11, 2026',
30
+ author: 'Alex Curator',
31
+ authorRole: 'Lead Editor',
32
+ category: 'Design',
33
+ imageUrl: '',
34
+ featured: false,
35
+ },
36
+ };
37
+ export default meta;
38
+ const render = (args) => html `
39
+ <luster-article-card
40
+ heading="${args.heading}"
41
+ excerpt="${args.excerpt}"
42
+ date="${args.date}"
43
+ author="${args.author}"
44
+ author-role="${args.authorRole}"
45
+ category="${args.category}"
46
+ image-url="${args.imageUrl}"
47
+ ?featured="${args.featured}"
48
+ ></luster-article-card>
49
+ `;
50
+ export const Default = { render };
51
+ export const Featured = {
52
+ args: { featured: true },
53
+ render,
54
+ };
55
+ export const NoExcerpt = {
56
+ name: 'No Excerpt',
57
+ args: { excerpt: '' },
58
+ render,
59
+ };
60
+ export const AllCards = {
61
+ name: 'Grid of Cards',
62
+ render: () => html `
63
+ <div style="display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;max-width:720px;">
64
+ <luster-article-card
65
+ heading="The Art of Dark Mode Typography"
66
+ excerpt="Choosing type that works in low-light editorial environments."
67
+ date="Apr 8, 2026"
68
+ author="Sam Viera"
69
+ author-role="Type Director"
70
+ category="Typography"
71
+ ></luster-article-card>
72
+ <luster-article-card
73
+ heading="Designing for Scannability"
74
+ excerpt="Readers skim. Design should help, not hinder."
75
+ date="Apr 5, 2026"
76
+ author="Jordan Reyes"
77
+ author-role="UX Writer"
78
+ category="UX"
79
+ ></luster-article-card>
80
+ </div>
81
+ `,
82
+ };
@@ -0,0 +1,38 @@
1
+ :host { display: inline-flex; }
2
+
3
+ .badge {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ gap: var(--dc-space-1);
7
+ border-radius: var(--dc-round-full);
8
+ font-family: var(--dc-font-body);
9
+ font-weight: 700;
10
+ letter-spacing: var(--dc-tracking-wide);
11
+ text-transform: uppercase;
12
+ white-space: nowrap;
13
+ }
14
+
15
+ .badge--sm { padding: 2px var(--dc-space-2); font-size: 10px; }
16
+ .badge--md { padding: var(--dc-space-1) var(--dc-space-3); font-size: var(--dc-label-sm); }
17
+
18
+ .badge__dot {
19
+ width: 6px;
20
+ height: 6px;
21
+ border-radius: var(--dc-round-full);
22
+ background: currentColor;
23
+ flex-shrink: 0;
24
+ }
25
+
26
+ /* Variants */
27
+ .badge--default { background: rgba(64, 72, 93, 0.4); color: var(--dc-on-surface-variant); }
28
+ .badge--primary { background: rgba(163, 166, 255, 0.15); color: var(--dc-primary); }
29
+ .badge--success { background: rgba(76, 206, 172, 0.15); color: var(--dc-success); }
30
+ .badge--warning { background: rgba(255, 209, 102, 0.15); color: var(--dc-warning); }
31
+ .badge--error { background: rgba(255, 180, 171, 0.15); color: var(--dc-error); }
32
+ .badge--beta { background: rgba(182, 174, 228, 0.15); color: var(--dc-secondary); }
33
+ .badge--live { background: rgba(76, 206, 172, 0.2); color: var(--dc-success); animation: pulse 2s infinite; }
34
+
35
+ @keyframes pulse {
36
+ 0%, 100% { opacity: 1; }
37
+ 50% { opacity: 0.7; }
38
+ }
@@ -0,0 +1,87 @@
1
+ import { h } from "@stencil/core";
2
+ export class DcBadge {
3
+ constructor() {
4
+ this.variant = 'default';
5
+ this.dot = false;
6
+ this.size = 'md';
7
+ }
8
+ render() {
9
+ return (h("span", { key: '4d49db25a7cb0f0bc72b5b7da55c7bdaca4a56a6', class: `badge badge--${this.variant} badge--${this.size}` }, this.dot && h("span", { key: '592ddbcbdfaa412bec7fa021c1e0d230d6716f41', class: "badge__dot" }), h("slot", { key: '8dcb4f58ac4c236ba6a1de5e22afed861bf78a7f' })));
10
+ }
11
+ static get is() { return "luster-badge"; }
12
+ static get encapsulation() { return "shadow"; }
13
+ static get originalStyleUrls() {
14
+ return {
15
+ "$": ["luster-badge.css"]
16
+ };
17
+ }
18
+ static get styleUrls() {
19
+ return {
20
+ "$": ["luster-badge.css"]
21
+ };
22
+ }
23
+ static get properties() {
24
+ return {
25
+ "variant": {
26
+ "type": "string",
27
+ "mutable": false,
28
+ "complexType": {
29
+ "original": "'default' | 'primary' | 'success' | 'warning' | 'error' | 'beta' | 'live'",
30
+ "resolved": "\"beta\" | \"default\" | \"error\" | \"live\" | \"primary\" | \"success\" | \"warning\"",
31
+ "references": {}
32
+ },
33
+ "required": false,
34
+ "optional": false,
35
+ "docs": {
36
+ "tags": [],
37
+ "text": ""
38
+ },
39
+ "getter": false,
40
+ "setter": false,
41
+ "reflect": false,
42
+ "attribute": "variant",
43
+ "defaultValue": "'default'"
44
+ },
45
+ "dot": {
46
+ "type": "boolean",
47
+ "mutable": false,
48
+ "complexType": {
49
+ "original": "boolean",
50
+ "resolved": "boolean",
51
+ "references": {}
52
+ },
53
+ "required": false,
54
+ "optional": false,
55
+ "docs": {
56
+ "tags": [],
57
+ "text": ""
58
+ },
59
+ "getter": false,
60
+ "setter": false,
61
+ "reflect": false,
62
+ "attribute": "dot",
63
+ "defaultValue": "false"
64
+ },
65
+ "size": {
66
+ "type": "string",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "'sm' | 'md'",
70
+ "resolved": "\"md\" | \"sm\"",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": false,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": ""
78
+ },
79
+ "getter": false,
80
+ "setter": false,
81
+ "reflect": false,
82
+ "attribute": "size",
83
+ "defaultValue": "'md'"
84
+ }
85
+ };
86
+ }
87
+ }
@@ -0,0 +1,86 @@
1
+ import { html } from "lit";
2
+ const meta = {
3
+ title: 'Foundations/Badge',
4
+ tags: ['autodocs'],
5
+ parameters: {
6
+ docs: {
7
+ description: {
8
+ component: 'Rótulo de status compacto. Props: `variant`, `size`, `dot`.',
9
+ },
10
+ },
11
+ },
12
+ argTypes: {
13
+ variant: {
14
+ control: 'select',
15
+ options: ['default', 'primary', 'success', 'warning', 'error', 'beta', 'live'],
16
+ description: 'Estilo visual',
17
+ table: { defaultValue: { summary: 'default' } },
18
+ },
19
+ size: {
20
+ control: 'select',
21
+ options: ['sm', 'md'],
22
+ description: 'Tamanho',
23
+ table: { defaultValue: { summary: 'md' } },
24
+ },
25
+ dot: {
26
+ control: 'boolean',
27
+ description: 'Exibe indicador de ponto',
28
+ table: { defaultValue: { summary: 'false' } },
29
+ },
30
+ label: { control: 'text', description: 'Texto do badge (slot)' },
31
+ },
32
+ args: {
33
+ variant: 'default',
34
+ size: 'md',
35
+ dot: false,
36
+ label: 'Badge',
37
+ },
38
+ };
39
+ export default meta;
40
+ const render = (args) => html `
41
+ <luster-badge variant="${args.variant}" size="${args.size}" ?dot="${args.dot}">
42
+ ${args.label}
43
+ </luster-badge>
44
+ `;
45
+ export const Default = {
46
+ args: { variant: 'default', label: 'Default' },
47
+ render,
48
+ };
49
+ export const Primary = {
50
+ args: { variant: 'primary', label: 'Primary' },
51
+ render,
52
+ };
53
+ export const Success = {
54
+ args: { variant: 'success', label: 'Active', dot: true },
55
+ render,
56
+ };
57
+ export const Warning = {
58
+ args: { variant: 'warning', label: 'Warning' },
59
+ render,
60
+ };
61
+ export const Error = {
62
+ args: { variant: 'error', label: 'Error' },
63
+ render,
64
+ };
65
+ export const Beta = {
66
+ args: { variant: 'beta', label: 'Beta' },
67
+ render,
68
+ };
69
+ export const Live = {
70
+ args: { variant: 'live', label: 'Live', dot: true },
71
+ render,
72
+ };
73
+ export const AllVariants = {
74
+ name: 'All Variants',
75
+ render: () => html `
76
+ <div style="display:flex;gap:0.75rem;flex-wrap:wrap;align-items:center;">
77
+ <luster-badge variant="default">Default</luster-badge>
78
+ <luster-badge variant="primary">Primary</luster-badge>
79
+ <luster-badge variant="success" ?dot="${true}">Active</luster-badge>
80
+ <luster-badge variant="warning">Warning</luster-badge>
81
+ <luster-badge variant="error">Error</luster-badge>
82
+ <luster-badge variant="beta">Beta</luster-badge>
83
+ <luster-badge variant="live" ?dot="${true}">Live</luster-badge>
84
+ </div>
85
+ `,
86
+ };