@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
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)
|