@credenza3/css 0.0.1-rc.2 → 0.0.1-rc.3
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/README.md +240 -71
- package/package.json +1 -1
- package/src/base.css +12 -12
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @credenza3/css
|
|
2
2
|
|
|
3
|
-
Credenza design system — CSS tokens, component
|
|
3
|
+
Credenza design system — CSS custom properties (design tokens), `cr-` prefixed component classes, and a Tailwind CSS preset based on the Credenza style guide.
|
|
4
|
+
|
|
5
|
+
> **Every class in this package starts with `cr-`** so it's always clear when you're using a Credenza style.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
@@ -12,7 +14,7 @@ npm install @credenza3/css
|
|
|
12
14
|
|
|
13
15
|
### 1. Import the CSS
|
|
14
16
|
|
|
15
|
-
Import the full stylesheet
|
|
17
|
+
Import the full stylesheet to get all Credenza design tokens and `cr-` component classes:
|
|
16
18
|
|
|
17
19
|
```css
|
|
18
20
|
/* In your main CSS file */
|
|
@@ -29,10 +31,10 @@ You can also import individual modules:
|
|
|
29
31
|
|
|
30
32
|
```css
|
|
31
33
|
@import "@credenza3/css/variables.css"; /* CSS custom properties only */
|
|
32
|
-
@import "@credenza3/css/base.css"; /* Poppins font +
|
|
33
|
-
@import "@credenza3/css/buttons.css"; /*
|
|
34
|
-
@import "@credenza3/css/badges.css"; /*
|
|
35
|
-
@import "@credenza3/css/controls.css"; /*
|
|
34
|
+
@import "@credenza3/css/base.css"; /* Poppins font + cr-h1–cr-h6 */
|
|
35
|
+
@import "@credenza3/css/buttons.css"; /* cr-btn-* components */
|
|
36
|
+
@import "@credenza3/css/badges.css"; /* cr-badge-* components */
|
|
37
|
+
@import "@credenza3/css/controls.css"; /* cr-toggle, cr-avatar, cr-step */
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
### 2. Tailwind CSS Preset
|
|
@@ -48,29 +50,21 @@ module.exports = {
|
|
|
48
50
|
};
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
This extends your Tailwind theme with Credenza colors, fonts, and sizes.
|
|
53
|
+
This extends your Tailwind theme with Credenza colors, fonts, and heading sizes.
|
|
52
54
|
|
|
53
55
|
### Tree-shaking / Unused CSS
|
|
54
56
|
|
|
55
|
-
The preset automatically adds the `@credenza3/css` source files to Tailwind's `content` array. This means Tailwind's built-in PurgeCSS will scan the package's CSS for class names and **only include the
|
|
57
|
+
The preset automatically adds the `@credenza3/css` source files to Tailwind's `content` array. This means Tailwind's built-in PurgeCSS will scan the package's CSS for class names and **only include the `cr-` component classes you actually use in your markup** — everything else is stripped in production.
|
|
56
58
|
|
|
57
59
|
No extra configuration is needed on your side beyond adding the preset.
|
|
58
60
|
|
|
59
|
-
You can then use classes like:
|
|
60
|
-
|
|
61
|
-
```html
|
|
62
|
-
<p class="font-poppins text-credenza bg-irish">Hello</p>
|
|
63
|
-
<h1 class="text-h1 font-poppins">Heading 1</h1>
|
|
64
|
-
<span class="text-skol bg-triple-crown px-3 py-1 rounded-pill">Tag</span>
|
|
65
|
-
```
|
|
66
|
-
|
|
67
61
|
---
|
|
68
62
|
|
|
69
63
|
## Design Tokens
|
|
70
64
|
|
|
71
65
|
### CSS Custom Properties
|
|
72
66
|
|
|
73
|
-
All tokens are
|
|
67
|
+
All tokens are defined on `:root` and prefixed with `--cr-`. Use them anywhere:
|
|
74
68
|
|
|
75
69
|
```css
|
|
76
70
|
.my-component {
|
|
@@ -108,115 +102,247 @@ All tokens are available as CSS custom properties on `:root`. Use them anywhere:
|
|
|
108
102
|
| `--cr-color-alert` | Alert | `#f44336` |
|
|
109
103
|
| `--cr-color-link` | Link | `#e91e63` |
|
|
110
104
|
|
|
111
|
-
###
|
|
105
|
+
### Typography Tokens
|
|
112
106
|
|
|
113
|
-
|
|
107
|
+
| Token | Value |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| `--cr-font-family` | `"Poppins", sans-serif` |
|
|
110
|
+
| `--cr-font-extralight` | `200` |
|
|
111
|
+
| `--cr-font-light` | `300` |
|
|
112
|
+
| `--cr-font-regular` | `400` |
|
|
113
|
+
| `--cr-font-medium` | `500` |
|
|
114
|
+
| `--cr-font-bold` | `700` |
|
|
115
|
+
| `--cr-font-black` | `900` |
|
|
114
116
|
|
|
115
|
-
|
|
116
|
-
- `bg-skol`, `text-skol`, `border-skol`
|
|
117
|
-
- `bg-the-lake-show`, `text-the-lake-show`
|
|
118
|
-
- `bg-irish`, `bg-oriole`, `bg-rose`, `bg-triple-crown`
|
|
119
|
-
- `bg-cr-success`, `bg-cr-info`, `bg-cr-warning`, `bg-cr-alert`, `bg-cr-link`
|
|
120
|
-
- … and all `text-*`, `border-*`, `ring-*` variants of the above
|
|
117
|
+
### Tailwind Utility Classes (via preset)
|
|
121
118
|
|
|
122
|
-
|
|
119
|
+
With the preset enabled you get Tailwind classes mapped to Credenza tokens:
|
|
123
120
|
|
|
124
|
-
|
|
|
125
|
-
| --- | --- |
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
121
|
+
| Category | Example classes |
|
|
122
|
+
| --- | --- |
|
|
123
|
+
| Colors | `bg-credenza`, `text-skol`, `border-the-lake-show`, `bg-irish`, `text-cr-alert` … |
|
|
124
|
+
| Font family | `font-poppins` |
|
|
125
|
+
| Font weight | `font-extralight`, `font-light`, `font-regular`, `font-medium`, `font-bold`, `font-black` |
|
|
126
|
+
| Heading sizes | `text-h1`, `text-h2`, `text-h3`, `text-h4`, `text-h5`, `text-h6` |
|
|
127
|
+
| Border radius | `rounded-pill` |
|
|
128
|
+
| Focus rings | `shadow-cr-focus`, `shadow-cr-focus-alert`, `ring-skol` |
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Component Classes Reference
|
|
133
|
+
|
|
134
|
+
Every component class is prefixed with `cr-`.
|
|
132
135
|
|
|
133
|
-
|
|
136
|
+
### Headings (`cr-h1` – `cr-h6`)
|
|
134
137
|
|
|
135
|
-
|
|
138
|
+
Apply heading styles to **any** element. These don't style bare `<h1>`–`<h6>` elements — you always opt in explicitly.
|
|
139
|
+
|
|
140
|
+
| Class | Font | Weight | Size |
|
|
141
|
+
| --- | --- | --- | --- |
|
|
142
|
+
| `cr-h1` | Poppins | Regular (400) | 30px / 1.875rem |
|
|
143
|
+
| `cr-h2` | Poppins | Light (300) | 24px / 1.5rem |
|
|
144
|
+
| `cr-h3` | Poppins | Medium (500) | 18px / 1.125rem |
|
|
145
|
+
| `cr-h4` | Poppins | Regular (400) | 16px / 1rem |
|
|
146
|
+
| `cr-h5` | Poppins | Regular (400) | 14px / 0.875rem |
|
|
147
|
+
| `cr-h6` | Poppins | Regular (400) | 12px / 0.75rem |
|
|
136
148
|
|
|
137
149
|
```html
|
|
138
|
-
<
|
|
139
|
-
<
|
|
150
|
+
<h1 class="cr-h1">Page Title</h1>
|
|
151
|
+
<span class="cr-h3">Looks like an H3</span>
|
|
152
|
+
<p class="cr-h5">Small heading style on a paragraph</p>
|
|
140
153
|
```
|
|
141
154
|
|
|
142
|
-
Font weight classes: `font-extralight`, `font-light`, `font-regular`, `font-medium`, `font-bold`, `font-black`.
|
|
143
|
-
|
|
144
155
|
---
|
|
145
156
|
|
|
146
|
-
## Component Classes
|
|
147
|
-
|
|
148
157
|
### Buttons
|
|
149
158
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
159
|
+
#### Base + Variants
|
|
160
|
+
|
|
161
|
+
Every button starts with `cr-btn` and adds a variant modifier:
|
|
153
162
|
|
|
154
|
-
|
|
155
|
-
|
|
163
|
+
| Class | Description |
|
|
164
|
+
| --- | --- |
|
|
165
|
+
| `cr-btn` | Base button (required) |
|
|
166
|
+
| `cr-btn-primary` | Dark filled button (Credenza #333) |
|
|
167
|
+
| `cr-btn-outline` | Transparent with border |
|
|
168
|
+
| `cr-btn-success` | Green status button |
|
|
169
|
+
| `cr-btn-info` | Purple status button |
|
|
170
|
+
| `cr-btn-warning` | Orange status button |
|
|
171
|
+
| `cr-btn-alert` | Red status button |
|
|
172
|
+
| `cr-btn-link` | Text-only link-style button |
|
|
156
173
|
|
|
157
|
-
|
|
174
|
+
```html
|
|
175
|
+
<button class="cr-btn cr-btn-primary">Button</button>
|
|
176
|
+
<button class="cr-btn cr-btn-outline">Outline</button>
|
|
158
177
|
<button class="cr-btn cr-btn-success">Success</button>
|
|
159
178
|
<button class="cr-btn cr-btn-info">Info</button>
|
|
160
179
|
<button class="cr-btn cr-btn-warning">Warning</button>
|
|
161
180
|
<button class="cr-btn cr-btn-alert">Alert</button>
|
|
162
|
-
|
|
163
|
-
<!-- Link-style button -->
|
|
164
181
|
<button class="cr-btn cr-btn-link">Link</button>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### States
|
|
185
|
+
|
|
186
|
+
| Class / Attribute | Description |
|
|
187
|
+
| --- | --- |
|
|
188
|
+
| `:hover` | Automatic hover style |
|
|
189
|
+
| `:active` | Automatic click/press style |
|
|
190
|
+
| `disabled` attribute | Native disabled state |
|
|
191
|
+
| `cr-btn-disabled` | Class-based disabled state |
|
|
192
|
+
| `cr-btn-focused` | Class-based focus ring |
|
|
193
|
+
| `:focus-visible` | Automatic keyboard focus ring |
|
|
165
194
|
|
|
166
|
-
|
|
195
|
+
```html
|
|
167
196
|
<button class="cr-btn cr-btn-primary" disabled>Disabled</button>
|
|
197
|
+
<button class="cr-btn cr-btn-primary cr-btn-focused">Focused</button>
|
|
198
|
+
```
|
|
168
199
|
|
|
169
|
-
|
|
200
|
+
#### Sizes
|
|
201
|
+
|
|
202
|
+
| Class | Description |
|
|
203
|
+
| --- | --- |
|
|
204
|
+
| `cr-btn-sm` | Small button |
|
|
205
|
+
| `cr-btn-lg` | Large button |
|
|
206
|
+
|
|
207
|
+
```html
|
|
170
208
|
<button class="cr-btn cr-btn-primary cr-btn-sm">Small</button>
|
|
171
209
|
<button class="cr-btn cr-btn-primary cr-btn-lg">Large</button>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### Login / Social Buttons
|
|
172
213
|
|
|
173
|
-
|
|
214
|
+
| Class | Description |
|
|
215
|
+
| --- | --- |
|
|
216
|
+
| `cr-btn-login` | Full-width social login button |
|
|
217
|
+
| `cr-btn-login-icon` | Icon inside a login button |
|
|
218
|
+
| `cr-btn-login-icon-only` | Square icon-only social button |
|
|
219
|
+
|
|
220
|
+
```html
|
|
174
221
|
<button class="cr-btn-login">
|
|
175
222
|
<img class="cr-btn-login-icon" src="google.svg" alt="" />
|
|
176
223
|
Continue with Google
|
|
177
224
|
</button>
|
|
178
225
|
|
|
179
|
-
<!-- Icon-only social button -->
|
|
180
226
|
<button class="cr-btn-login-icon-only">
|
|
181
227
|
<img class="cr-btn-login-icon" src="google.svg" alt="Google" />
|
|
182
228
|
</button>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
#### App Buttons (Open Gmail / Outlook)
|
|
232
|
+
|
|
233
|
+
| Class | Description |
|
|
234
|
+
| --- | --- |
|
|
235
|
+
| `cr-btn-app` | Bordered app-launch button |
|
|
236
|
+
| `cr-btn-app-icon` | Icon inside an app button |
|
|
183
237
|
|
|
184
|
-
|
|
238
|
+
```html
|
|
185
239
|
<a class="cr-btn-app" href="#">
|
|
186
240
|
<img class="cr-btn-app-icon" src="gmail.svg" alt="" />
|
|
187
241
|
Open Gmail
|
|
188
242
|
</a>
|
|
189
243
|
```
|
|
190
244
|
|
|
245
|
+
#### Icon Button Helper
|
|
246
|
+
|
|
247
|
+
| Class | Description |
|
|
248
|
+
| --- | --- |
|
|
249
|
+
| `cr-btn-icon` | Inline-flex container for icon + label |
|
|
250
|
+
|
|
251
|
+
```html
|
|
252
|
+
<button class="cr-btn cr-btn-primary cr-btn-icon">
|
|
253
|
+
<svg>…</svg>
|
|
254
|
+
Save
|
|
255
|
+
</button>
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
191
260
|
### Badges
|
|
192
261
|
|
|
262
|
+
#### Base + Status Variants
|
|
263
|
+
|
|
264
|
+
| Class | Description |
|
|
265
|
+
| --- | --- |
|
|
266
|
+
| `cr-badge` | Base badge (required) |
|
|
267
|
+
| `cr-badge-success` | Green badge |
|
|
268
|
+
| `cr-badge-pending` | Orange badge |
|
|
269
|
+
| `cr-badge-failed` | Red badge |
|
|
270
|
+
| `cr-badge-info` | Purple badge |
|
|
271
|
+
|
|
193
272
|
```html
|
|
194
|
-
<!-- Status badges -->
|
|
195
273
|
<span class="cr-badge cr-badge-success">Success</span>
|
|
196
274
|
<span class="cr-badge cr-badge-pending">Pending</span>
|
|
197
275
|
<span class="cr-badge cr-badge-failed">Failed</span>
|
|
198
276
|
<span class="cr-badge cr-badge-info">Info</span>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
#### Outline Variants
|
|
280
|
+
|
|
281
|
+
| Class | Description |
|
|
282
|
+
| --- | --- |
|
|
283
|
+
| `cr-badge-outline-success` | Green outline badge |
|
|
284
|
+
| `cr-badge-outline-pending` | Orange outline badge |
|
|
285
|
+
| `cr-badge-outline-failed` | Red outline badge |
|
|
286
|
+
| `cr-badge-outline-info` | Purple outline badge |
|
|
199
287
|
|
|
200
|
-
|
|
288
|
+
```html
|
|
201
289
|
<span class="cr-badge cr-badge-outline-success">Success</span>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
#### Count Badges (number pills)
|
|
202
293
|
|
|
203
|
-
|
|
294
|
+
| Class | Description |
|
|
295
|
+
| --- | --- |
|
|
296
|
+
| `cr-badge-count` | Base count pill (dark) |
|
|
297
|
+
| `cr-badge-count-success` | Green count pill |
|
|
298
|
+
| `cr-badge-count-warning` | Orange count pill |
|
|
299
|
+
| `cr-badge-count-alert` | Red count pill |
|
|
300
|
+
| `cr-badge-count-info` | Purple count pill |
|
|
301
|
+
|
|
302
|
+
```html
|
|
204
303
|
<span class="cr-badge-count">1</span>
|
|
205
304
|
<span class="cr-badge-count">10</span>
|
|
206
305
|
<span class="cr-badge-count cr-badge-count-alert">100</span>
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### Powered-by Badge
|
|
207
309
|
|
|
208
|
-
|
|
310
|
+
| Class | Description |
|
|
311
|
+
| --- | --- |
|
|
312
|
+
| `cr-badge-powered` | "Powered by Credenza" container |
|
|
313
|
+
| `cr-badge-powered-icon` | Icon inside powered badge |
|
|
314
|
+
|
|
315
|
+
```html
|
|
209
316
|
<span class="cr-badge-powered">
|
|
210
317
|
<img class="cr-badge-powered-icon" src="credenza-icon.svg" alt="" />
|
|
211
318
|
Powered by Credenza
|
|
212
319
|
</span>
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### Badge Sizes
|
|
323
|
+
|
|
324
|
+
| Class | Description |
|
|
325
|
+
| --- | --- |
|
|
326
|
+
| `cr-badge-sm` | Small badge |
|
|
327
|
+
| `cr-badge-lg` | Large badge |
|
|
213
328
|
|
|
214
|
-
|
|
329
|
+
```html
|
|
215
330
|
<span class="cr-badge cr-badge-success cr-badge-sm">Small</span>
|
|
216
331
|
<span class="cr-badge cr-badge-success cr-badge-lg">Large</span>
|
|
217
332
|
```
|
|
218
333
|
|
|
219
|
-
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
### Toggle Switch
|
|
337
|
+
|
|
338
|
+
| Class | Description |
|
|
339
|
+
| --- | --- |
|
|
340
|
+
| `cr-toggle` | Wrapper `<label>` |
|
|
341
|
+
| `cr-toggle-input` | Hidden `<input type="checkbox">` |
|
|
342
|
+
| `cr-toggle-track` | Visual track + thumb |
|
|
343
|
+
| `cr-toggle-label` | Label text |
|
|
344
|
+
| `cr-toggle-label-off` | "Off" helper text |
|
|
345
|
+
| `cr-toggle-label-on` | "On" helper text |
|
|
220
346
|
|
|
221
347
|
```html
|
|
222
348
|
<label class="cr-toggle">
|
|
@@ -234,8 +360,27 @@ Font weight classes: `font-extralight`, `font-light`, `font-regular`, `font-medi
|
|
|
234
360
|
</label>
|
|
235
361
|
```
|
|
236
362
|
|
|
363
|
+
States handled automatically: `:checked`, `:focus-visible`, `:disabled`.
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
237
367
|
### Avatars
|
|
238
368
|
|
|
369
|
+
| Class | Description |
|
|
370
|
+
| --- | --- |
|
|
371
|
+
| `cr-avatar` | Base avatar (required) |
|
|
372
|
+
| `cr-avatar-xs` | 20px |
|
|
373
|
+
| `cr-avatar-sm` | 28px |
|
|
374
|
+
| `cr-avatar-md` | 36px |
|
|
375
|
+
| `cr-avatar-lg` | 48px |
|
|
376
|
+
| `cr-avatar-xl` | 64px |
|
|
377
|
+
| `cr-avatar-ring` | Skol-colored ring around avatar |
|
|
378
|
+
| `cr-avatar-group` | Overlapping avatar row |
|
|
379
|
+
| `cr-avatar-initials` | Centered uppercase initials |
|
|
380
|
+
| `cr-avatar-status` | Online status dot (green) |
|
|
381
|
+
| `cr-avatar-status-offline` | Offline status dot (gray) |
|
|
382
|
+
| `cr-avatar-status-busy` | Busy status dot (red) |
|
|
383
|
+
|
|
239
384
|
```html
|
|
240
385
|
<!-- Image avatar -->
|
|
241
386
|
<span class="cr-avatar cr-avatar-md">
|
|
@@ -252,17 +397,28 @@ Font weight classes: `font-extralight`, `font-light`, `font-regular`, `font-medi
|
|
|
252
397
|
<img src="photo.jpg" alt="User" />
|
|
253
398
|
</span>
|
|
254
399
|
|
|
255
|
-
<!-- Avatar group -->
|
|
400
|
+
<!-- Avatar group (overlapping) -->
|
|
256
401
|
<div class="cr-avatar-group">
|
|
257
402
|
<span class="cr-avatar cr-avatar-sm"><img src="a.jpg" alt="" /></span>
|
|
258
403
|
<span class="cr-avatar cr-avatar-sm"><img src="b.jpg" alt="" /></span>
|
|
259
404
|
<span class="cr-avatar cr-avatar-sm"><img src="c.jpg" alt="" /></span>
|
|
260
405
|
</div>
|
|
261
|
-
|
|
262
|
-
<!-- Sizes: cr-avatar-xs, cr-avatar-sm, cr-avatar-md, cr-avatar-lg, cr-avatar-xl -->
|
|
263
406
|
```
|
|
264
407
|
|
|
265
|
-
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
### Steps / Stepper
|
|
411
|
+
|
|
412
|
+
| Class | Description |
|
|
413
|
+
| --- | --- |
|
|
414
|
+
| `cr-steps` | Wrapper flex container |
|
|
415
|
+
| `cr-step` | Individual step |
|
|
416
|
+
| `cr-step-indicator` | Numbered circle |
|
|
417
|
+
| `cr-step-label` | Step label text |
|
|
418
|
+
| `cr-step-connector` | Line between steps |
|
|
419
|
+
| `cr-step-active` | Currently active step |
|
|
420
|
+
| `cr-step-completed` | Completed step |
|
|
421
|
+
| `cr-step-dot` | Dot-style variant (small dot instead of number) |
|
|
266
422
|
|
|
267
423
|
```html
|
|
268
424
|
<div class="cr-steps">
|
|
@@ -295,17 +451,30 @@ Font weight classes: `font-extralight`, `font-light`, `font-regular`, `font-medi
|
|
|
295
451
|
|
|
296
452
|
---
|
|
297
453
|
|
|
454
|
+
## Complete `cr-` Class List
|
|
455
|
+
|
|
456
|
+
| Category | Classes |
|
|
457
|
+
| --- | --- |
|
|
458
|
+
| **Headings** | `cr-h1` `cr-h2` `cr-h3` `cr-h4` `cr-h5` `cr-h6` |
|
|
459
|
+
| **Buttons** | `cr-btn` `cr-btn-primary` `cr-btn-outline` `cr-btn-success` `cr-btn-info` `cr-btn-warning` `cr-btn-alert` `cr-btn-link` `cr-btn-disabled` `cr-btn-focused` `cr-btn-sm` `cr-btn-lg` `cr-btn-icon` `cr-btn-login` `cr-btn-login-icon` `cr-btn-login-icon-only` `cr-btn-app` `cr-btn-app-icon` |
|
|
460
|
+
| **Badges** | `cr-badge` `cr-badge-success` `cr-badge-pending` `cr-badge-failed` `cr-badge-info` `cr-badge-outline-success` `cr-badge-outline-pending` `cr-badge-outline-failed` `cr-badge-outline-info` `cr-badge-count` `cr-badge-count-success` `cr-badge-count-warning` `cr-badge-count-alert` `cr-badge-count-info` `cr-badge-powered` `cr-badge-powered-icon` `cr-badge-sm` `cr-badge-lg` |
|
|
461
|
+
| **Toggle** | `cr-toggle` `cr-toggle-input` `cr-toggle-track` `cr-toggle-label` `cr-toggle-label-off` `cr-toggle-label-on` |
|
|
462
|
+
| **Avatars** | `cr-avatar` `cr-avatar-xs` `cr-avatar-sm` `cr-avatar-md` `cr-avatar-lg` `cr-avatar-xl` `cr-avatar-ring` `cr-avatar-group` `cr-avatar-initials` `cr-avatar-status` `cr-avatar-status-offline` `cr-avatar-status-busy` |
|
|
463
|
+
| **Steps** | `cr-steps` `cr-step` `cr-step-indicator` `cr-step-label` `cr-step-connector` `cr-step-active` `cr-step-completed` `cr-step-dot` |
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
298
467
|
## File Structure
|
|
299
468
|
|
|
300
469
|
```
|
|
301
|
-
@credenza3/css
|
|
470
|
+
@credenza3/css
|
|
302
471
|
├── src/
|
|
303
472
|
│ ├── index.css ← main entry (imports everything)
|
|
304
|
-
│ ├── variables.css ← CSS custom properties
|
|
305
|
-
│ ├── base.css ← Poppins font import
|
|
306
|
-
│ ├── buttons.css ←
|
|
307
|
-
│ ├── badges.css ←
|
|
308
|
-
│ └── controls.css ←
|
|
473
|
+
│ ├── variables.css ← --cr-* CSS custom properties
|
|
474
|
+
│ ├── base.css ← Poppins font import + cr-h1–cr-h6
|
|
475
|
+
│ ├── buttons.css ← cr-btn-* component classes
|
|
476
|
+
│ ├── badges.css ← cr-badge-* component classes
|
|
477
|
+
│ └── controls.css ← cr-toggle, cr-avatar, cr-step components
|
|
309
478
|
├── tailwind-preset.js ← Tailwind CSS theme preset
|
|
310
479
|
├── package.json
|
|
311
480
|
└── README.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@credenza3/css",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
3
|
+
"version": "0.0.1-rc.3",
|
|
4
4
|
"description": "Credenza design system — CSS tokens, component styles, and Tailwind CSS preset based on the Credenza style guide.",
|
|
5
5
|
"main": "src/index.css",
|
|
6
6
|
"style": "src/index.css",
|
package/src/base.css
CHANGED
|
@@ -15,47 +15,47 @@
|
|
|
15
15
|
H6 — Poppins Regular 12
|
|
16
16
|
----------------------------------------------------------------------- */
|
|
17
17
|
|
|
18
|
-
h1,
|
|
19
|
-
h2,
|
|
20
|
-
h3,
|
|
21
|
-
h4,
|
|
22
|
-
h5,
|
|
23
|
-
h6 {
|
|
18
|
+
.cr-h1,
|
|
19
|
+
.cr-h2,
|
|
20
|
+
.cr-h3,
|
|
21
|
+
.cr-h4,
|
|
22
|
+
.cr-h5,
|
|
23
|
+
.cr-h6 {
|
|
24
24
|
font-family: var(--cr-font-family);
|
|
25
25
|
color: var(--cr-color-credenza);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
h1 {
|
|
28
|
+
.cr-h1 {
|
|
29
29
|
font-size: 1.875rem; /* 30px */
|
|
30
30
|
font-weight: var(--cr-font-regular);
|
|
31
31
|
line-height: 1.25;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
h2 {
|
|
34
|
+
.cr-h2 {
|
|
35
35
|
font-size: 1.5rem; /* 24px */
|
|
36
36
|
font-weight: var(--cr-font-light);
|
|
37
37
|
line-height: 1.25;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
h3 {
|
|
40
|
+
.cr-h3 {
|
|
41
41
|
font-size: 1.125rem; /* 18px */
|
|
42
42
|
font-weight: var(--cr-font-medium);
|
|
43
43
|
line-height: 1.375;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
h4 {
|
|
46
|
+
.cr-h4 {
|
|
47
47
|
font-size: 1rem; /* 16px */
|
|
48
48
|
font-weight: var(--cr-font-regular);
|
|
49
49
|
line-height: 1.375;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
h5 {
|
|
52
|
+
.cr-h5 {
|
|
53
53
|
font-size: 0.875rem; /* 14px */
|
|
54
54
|
font-weight: var(--cr-font-regular);
|
|
55
55
|
line-height: 1.5;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
h6 {
|
|
58
|
+
.cr-h6 {
|
|
59
59
|
font-size: 0.75rem; /* 12px */
|
|
60
60
|
font-weight: var(--cr-font-regular);
|
|
61
61
|
line-height: 1.5;
|