@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
package/README.md ADDED
@@ -0,0 +1,423 @@
1
+ # @yvstudio/luster-ui
2
+
3
+ **Luster** is an editorial-first Web Components design system built with [Stencil.js](https://stenciljs.com/). It ships framework-agnostic components that work in any HTML page, React, Vue, Angular, or plain JavaScript — no build step required on the consumer side.
4
+
5
+ ---
6
+
7
+ ## Contents
8
+
9
+ - [Quick start](#quick-start)
10
+ - [Using in a project](#using-in-a-project)
11
+ - [Component comparison: vanilla CSS vs @yvstudio/luster-ui](#component-comparison-vanilla-css-vs-lusterui)
12
+ - [All components](#all-components)
13
+ - [Design tokens](#design-tokens)
14
+ - [Storybook](#storybook)
15
+ - [Publishing to npm](#publishing-to-npm)
16
+ - [Local development](#local-development)
17
+
18
+ ---
19
+
20
+ ## Quick start
21
+
22
+ ### Via CDN (no install)
23
+
24
+ ```html
25
+ <head>
26
+ <script type="module" src="https://unpkg.com/@yvstudio/luster-ui/dist/luster/luster.esm.js"></script>
27
+ </head>
28
+
29
+ <body>
30
+ <luster-button variant="primary">Hello Luster</luster-button>
31
+ </body>
32
+ ```
33
+
34
+ ### Via npm
35
+
36
+ ```bash
37
+ npm install @yvstudio/luster-ui
38
+ ```
39
+
40
+ ```js
41
+ import { defineCustomElements } from '@yvstudio/luster-ui/loader';
42
+ defineCustomElements();
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Using in a project
48
+
49
+ ### Vanilla HTML
50
+
51
+ ```html
52
+ <!DOCTYPE html>
53
+ <html>
54
+ <head>
55
+ <script type="module" src="node_modules/@yvstudio/luster-ui/dist/luster/luster.esm.js"></script>
56
+ <!-- or from CDN -->
57
+ </head>
58
+ <body>
59
+ <luster-button variant="primary">Click me</luster-button>
60
+ <luster-input label="Email" placeholder="you@example.com"></luster-input>
61
+ <luster-badge variant="success" dot>Active</luster-badge>
62
+ </body>
63
+ </html>
64
+ ```
65
+
66
+ ### React
67
+
68
+ ```tsx
69
+ import { defineCustomElements } from '@yvstudio/luster-ui/loader';
70
+ defineCustomElements();
71
+
72
+ export function MyPage() {
73
+ return (
74
+ <luster-button variant="primary" onClick={() => alert('clicked!')}>
75
+ Launch
76
+ </luster-button>
77
+ );
78
+ }
79
+ ```
80
+
81
+ ### Vue 3
82
+
83
+ ```vue
84
+ <script setup>
85
+ import { defineCustomElements } from '@yvstudio/luster-ui/loader';
86
+ defineCustomElements();
87
+ </script>
88
+
89
+ <template>
90
+ <luster-button variant="secondary">Vue button</luster-button>
91
+ </template>
92
+ ```
93
+
94
+ ### Angular
95
+
96
+ In `app.module.ts`:
97
+
98
+ ```ts
99
+ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
100
+ import { defineCustomElements } from '@yvstudio/luster-ui/loader';
101
+
102
+ defineCustomElements();
103
+
104
+ @NgModule({
105
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
106
+ })
107
+ export class AppModule {}
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Component comparison: vanilla CSS vs @yvstudio/luster-ui
113
+
114
+ The example below builds the same **article card** two ways — raw HTML + CSS and then with `@yvstudio/luster-ui`.
115
+
116
+ ### With vanilla HTML + CSS
117
+
118
+ ```html
119
+ <!-- index.html -->
120
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
121
+
122
+ <div class="article-card">
123
+ <span class="article-card__category">Design</span>
124
+ <span class="article-card__date">Apr 11, 2026</span>
125
+ <h3 class="article-card__title">The Future of Editorial Design Systems</h3>
126
+ <p class="article-card__excerpt">
127
+ How modern design tokens and component libraries are reshaping
128
+ the way editorial teams work.
129
+ </p>
130
+ <div class="article-card__byline">
131
+ <div class="article-card__avatar">A</div>
132
+ <div>
133
+ <span class="article-card__author">Alex Curator</span>
134
+ <span class="article-card__role">Lead Editor</span>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ ```
139
+
140
+ ```css
141
+ /* styles.css — ~60 lines you must write and maintain */
142
+ .article-card {
143
+ background: #141f38;
144
+ border: 1px solid #40485d;
145
+ border-radius: 0.75rem;
146
+ padding: 1.5rem;
147
+ max-width: 360px;
148
+ font-family: 'Inter', sans-serif;
149
+ transition: border-color 250ms ease, box-shadow 250ms ease;
150
+ }
151
+ .article-card:hover {
152
+ border-color: rgba(163, 166, 255, 0.3);
153
+ box-shadow: 0 8px 40px 0 rgba(96, 99, 238, 0.12);
154
+ }
155
+ .article-card__category {
156
+ font-size: 0.6875rem;
157
+ font-weight: 600;
158
+ letter-spacing: 0.12em;
159
+ text-transform: uppercase;
160
+ color: #a3a6ff;
161
+ }
162
+ .article-card__date {
163
+ font-size: 0.75rem;
164
+ color: #a3aac4;
165
+ margin-left: 0.75rem;
166
+ }
167
+ .article-card__title {
168
+ font-size: 1.125rem;
169
+ font-weight: 700;
170
+ color: #dee5ff;
171
+ margin: 0.5rem 0;
172
+ line-height: 1.35;
173
+ }
174
+ .article-card__excerpt {
175
+ font-size: 0.875rem;
176
+ color: #a3aac4;
177
+ line-height: 1.6;
178
+ margin-bottom: 1.25rem;
179
+ }
180
+ .article-card__byline {
181
+ display: flex;
182
+ align-items: center;
183
+ gap: 0.625rem;
184
+ }
185
+ .article-card__avatar {
186
+ width: 28px;
187
+ height: 28px;
188
+ border-radius: 9999px;
189
+ background: linear-gradient(135deg, #a3a6ff, #6063ee);
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ font-size: 0.6875rem;
194
+ font-weight: 700;
195
+ color: #0a0040;
196
+ }
197
+ .article-card__author {
198
+ display: block;
199
+ font-size: 0.75rem;
200
+ font-weight: 600;
201
+ color: #dee5ff;
202
+ }
203
+ .article-card__role {
204
+ display: block;
205
+ font-size: 0.6875rem;
206
+ color: #a3aac4;
207
+ }
208
+ ```
209
+
210
+ **Total: ~25 lines HTML + ~60 lines CSS = 85 lines** — all tokens hardcoded. Changing the brand colour means a find-and-replace across every file.
211
+
212
+ ---
213
+
214
+ ### With @yvstudio/luster-ui
215
+
216
+ ```html
217
+ <!-- index.html -->
218
+ <script type="module" src="https://unpkg.com/@yvstudio/luster-ui/dist/luster/luster.esm.js"></script>
219
+
220
+ <luster-article-card
221
+ category="Design"
222
+ date="Apr 11, 2026"
223
+ heading="The Future of Editorial Design Systems"
224
+ excerpt="How modern design tokens and component libraries are reshaping the way editorial teams work."
225
+ author="Alex Curator"
226
+ author-role="Lead Editor"
227
+ ></luster-article-card>
228
+ ```
229
+
230
+ **Total: 1 script tag + 8 lines HTML = 9 lines.** Zero CSS to write.
231
+
232
+ #### What you gain
233
+
234
+ | | Vanilla CSS | @yvstudio/luster-ui |
235
+ |---|---|---|
236
+ | Lines of code | ~85 | ~9 |
237
+ | Hover / focus states | Write yourself | Built-in |
238
+ | Consistent tokens | Hardcoded hex values | CSS custom properties on `:root` |
239
+ | Dark mode ready | Manual | Yes — tokens designed for dark surfaces |
240
+ | Accessibility (ARIA) | Manual | Built-in |
241
+ | Works in React / Vue / Angular | Yes | Yes — Web Components are framework-agnostic |
242
+ | Brand update | Find & replace | Change one token |
243
+ | Interactive states (loading, disabled) | Write yourself | Props: `?loading`, `?disabled` |
244
+
245
+ ---
246
+
247
+ ## All components
248
+
249
+ ### Foundations
250
+ | Component | Tag | Key props |
251
+ |---|---|---|
252
+ | Button | `<luster-button>` | `variant`, `size`, `loading`, `disabled` |
253
+ | Input | `<luster-input>` | `label`, `type`, `error`, `error-message`, `helper-text`, `disabled` |
254
+ | Badge | `<luster-badge>` | `variant`, `size`, `dot` |
255
+ | Checkbox | `<luster-checkbox>` | `label`, `checked`, `indeterminate`, `disabled` |
256
+ | Toggle | `<luster-toggle>` | `label`, `checked`, `disabled` |
257
+ | Card | `<luster-card>` | `variant`, `padding`, `hoverable` |
258
+ | Feature Quote | `<luster-feature-quote>` | `quote`, `author`, `role`, `variant` |
259
+ | Color Swatch | `<luster-color-swatch>` | `color`, `name`, `hex`, `size` |
260
+
261
+ ### Navigation & Feedback
262
+ | Component | Tag | Key props |
263
+ |---|---|---|
264
+ | Tabs | `<luster-tabs>` | `tabs` (JSON), `active` |
265
+ | Alert | `<luster-alert>` | `variant`, `heading`, `message`, `dismissible`, `timestamp` |
266
+ | Modal | `<luster-modal>` | `open`, `heading`, `subtitle`, `size`, `confirm-label`, `cancel-label` |
267
+ | Accordion | `<luster-accordion>` | `heading`, `subtitle`, `badge`, `badge-variant`, `expanded` |
268
+ | Navbar | `<luster-navbar>` | `logo-title`, `logo-sub`, `active-link` |
269
+ | Sidebar | `<luster-sidebar>` | `active` |
270
+
271
+ ### Cards & Data
272
+ | Component | Tag | Key props |
273
+ |---|---|---|
274
+ | Profile Card | `<luster-profile-card>` | `name`, `role`, `avatar`, `stat1-value`, `stat1-label`, `stat2-value`, `stat2-label`, `cta-label` |
275
+ | Article Card | `<luster-article-card>` | `heading`, `excerpt`, `date`, `author`, `author-role`, `category`, `image-url`, `featured` |
276
+ | Stat Card | `<luster-stat-card>` | `heading`, `description`, `version`, `status`, `users`, `has-toggle`, `toggle-on` |
277
+ | Resource Table | `<luster-resource-table>` | `rows` (JSON array) |
278
+ | Activity Item | `<luster-activity-item>` | `label`, `description`, `time`, `variant`, `icon`, `file-size`, `downloadable` |
279
+
280
+ ### Layout
281
+ | Component | Tag | Key props |
282
+ |---|---|---|
283
+ | Hero | `<luster-hero>` | `heading`, `subtitle`, `section`, `image-url`, `parallax` |
284
+
285
+ ---
286
+
287
+ ## Design tokens
288
+
289
+ All tokens are CSS custom properties defined on `:root`. They are inherited through shadow DOM boundaries, so you can override them globally.
290
+
291
+ ```css
292
+ :root {
293
+ /* Surfaces */
294
+ --dc-surface: #060e20;
295
+ --dc-surface-container-low: #091328;
296
+ --dc-surface-container-high: #141f38;
297
+
298
+ /* Primary */
299
+ --dc-primary: #a3a6ff;
300
+ --dc-primary-dim: #6063ee;
301
+
302
+ /* Text */
303
+ --dc-on-surface: #dee5ff;
304
+ --dc-on-surface-variant: #a3aac4;
305
+
306
+ /* Semantic */
307
+ --dc-success: #4cceac;
308
+ --dc-warning: #ffd166;
309
+ --dc-error: #ffb4ab;
310
+
311
+ /* Typography */
312
+ --dc-font-display: 'Manrope', sans-serif;
313
+ --dc-font-body: 'Inter', sans-serif;
314
+
315
+ /* Spacing (4px base) */
316
+ --dc-space-4: 1rem; /* 16px */
317
+ --dc-space-6: 1.5rem; /* 24px */
318
+ --dc-space-8: 2rem; /* 32px */
319
+
320
+ /* Radius */
321
+ --dc-round-2: 0.5rem;
322
+ --dc-round-3: 0.75rem;
323
+ --dc-round-full: 9999px;
324
+
325
+ /* Shadows (primary-tinted) */
326
+ --dc-shadow-sm: 0 4px 24px 0 rgba(96, 99, 238, 0.08);
327
+ --dc-shadow-md: 0 8px 40px 0 rgba(96, 99, 238, 0.12);
328
+
329
+ /* Transitions */
330
+ --dc-transition-base: 250ms ease;
331
+ }
332
+ ```
333
+
334
+ ### Overriding the brand colour
335
+
336
+ ```css
337
+ /* your-app.css */
338
+ :root {
339
+ --dc-primary: #f97316; /* orange brand */
340
+ --dc-primary-dim: #ea580c;
341
+ }
342
+ ```
343
+
344
+ All components pick up the change automatically — no component code touched.
345
+
346
+ ---
347
+
348
+ ## Storybook
349
+
350
+ ```bash
351
+ # Start the dev server
352
+ npm run storybook # http://localhost:6006
353
+
354
+ # Build a static version
355
+ npm run storybook:build # output → storybook-static/
356
+ ```
357
+
358
+ ---
359
+
360
+ ## Publishing to npm
361
+
362
+ ```bash
363
+ # 1. Build production artefacts
364
+ npm run build:prod
365
+
366
+ # 2. Publish (scoped package — requires --access public first time)
367
+ npm publish --access public
368
+ ```
369
+
370
+ After publishing, consumers install with:
371
+
372
+ ```bash
373
+ npm install @yvstudio/luster-ui
374
+ ```
375
+
376
+ ---
377
+
378
+ ## Local development
379
+
380
+ ```bash
381
+ # Clone the repo
382
+ git clone https://github.com/YasmimVieira/digital-curator-ds
383
+ cd digital-curator-ds/stencil-ds
384
+
385
+ # Install dependencies
386
+ npm install
387
+
388
+ # Start Stencil dev server (http://localhost:3335)
389
+ npm start
390
+
391
+ # Or open Storybook (http://localhost:6006)
392
+ npm run storybook
393
+
394
+ # Generate a new component scaffold
395
+ npm run generate
396
+ ```
397
+
398
+ ### Project structure
399
+
400
+ ```
401
+ stencil-ds/
402
+ ├── src/
403
+ │ ├── components/
404
+ │ │ ├── luster-button/
405
+ │ │ │ ├── luster-button.tsx # Component logic (Stencil)
406
+ │ │ │ ├── luster-button.css # Scoped styles
407
+ │ │ │ └── luster-button.stories.ts # Storybook stories
408
+ │ │ └── ... # 19 more components
409
+ │ ├── global/
410
+ │ │ └── global.css # Design tokens + reset
411
+ │ └── index.html # Local demo page
412
+ ├── .storybook/
413
+ │ ├── main.ts # Storybook config
414
+ │ └── preview.ts # Global decorators + backgrounds
415
+ ├── stencil.config.ts
416
+ └── package.json
417
+ ```
418
+
419
+ ---
420
+
421
+ ## License
422
+
423
+ MIT © [YasmimVieira](https://github.com/YasmimVieira)