@bcc-code/design-tokens 3.0.4 → 3.0.6

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 CHANGED
@@ -1,63 +1,102 @@
1
- # @bcc-code/design-tokens
2
-
3
- Design tokens for BCC projects with CSS, Tailwind v4, and PrimeVue support.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @bcc-code/design-tokens
9
- ```
10
-
11
- ## Usage
12
-
13
- ### CSS Variables
14
-
15
- ```css
16
- @import '@bcc-code/design-tokens/css/light';
17
- /* or */
18
- @import '@bcc-code/design-tokens/css/dark';
19
- ```
20
-
21
- ```css
22
- .card {
23
- background: var(--color-elevation-surface-default);
24
- color: var(--color-text-default);
25
- padding: var(--space-300);
26
- }
27
- ```
28
-
29
- ### Tailwind CSS v4
30
-
31
- ```css
32
- @import '@bcc-code/design-tokens/tailwind/light';
33
- /* or */
34
- @import '@bcc-code/design-tokens/tailwind/dark';
35
- ```
36
-
37
- ```html
38
- <div class="bg-elevation-surface-default text-default p-300">
39
- Content
40
- </div>
41
- ```
42
-
43
- ### PrimeVue
44
-
45
- ```javascript
46
- import BCCPreset from "@bcc-code/design-tokens/primevue";
47
-
48
- app.use(PrimeVue, {
49
- theme: {
50
- preset: BCCPreset
51
- }
52
- });
53
- ```
54
-
55
- ## CDN
56
-
57
- ```html
58
- <link rel="stylesheet" href="https://unpkg.com/@bcc-code/design-tokens@latest/build/bcc/light.css">
59
- ```
60
-
61
- ## License
62
-
1
+ # @bcc-code/design-tokens
2
+
3
+ BCC Design System tokens with support for CSS variables, Tailwind CSS v4, and PrimeVue themes. Generates consistent design tokens from Figma Token Studio with automatic light/dark mode support.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @bcc-code/design-tokens
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### CSS Variables
14
+
15
+ Import theme-specific CSS variables:
16
+
17
+ ```css
18
+ @import '@bcc-code/design-tokens/css/light';
19
+ @import '@bcc-code/design-tokens/css/dark';
20
+ ```
21
+
22
+ Use semantic tokens in your styles:
23
+
24
+ ```css
25
+ .card {
26
+ background: var(--color-elevation-surface-default);
27
+ color: var(--color-text-default);
28
+ padding: var(--space-300);
29
+ border-radius: var(--border-radius-md);
30
+ font-family: var(--font-family-archivo);
31
+ }
32
+ ```
33
+
34
+ ### Tailwind CSS v4
35
+
36
+ Import Tailwind utilities with design tokens:
37
+
38
+ ```css
39
+ @import '@bcc-code/design-tokens/tailwind/light';
40
+ @import '@bcc-code/design-tokens/tailwind/dark';
41
+ ```
42
+
43
+ Use utility classes:
44
+
45
+ ```html
46
+ <div class="bg-surface-default text-default p-300 rounded-md">
47
+ Content with BCC design tokens
48
+ </div>
49
+ ```
50
+
51
+ ### PrimeVue Integration
52
+
53
+ Configure PrimeVue with BCC theme preset:
54
+
55
+ ```javascript
56
+ import { createApp } from 'vue'
57
+ import PrimeVue from 'primevue/config'
58
+ import BCCPreset from '@bcc-code/design-tokens/primevue'
59
+
60
+ const app = createApp(App)
61
+
62
+ app.use(PrimeVue, {
63
+ theme: {
64
+ preset: BCCPreset,
65
+ options: {
66
+ prefix: 'p',
67
+ darkModeSelector: '.p-dark',
68
+ cssLayer: false
69
+ }
70
+ }
71
+ })
72
+ ```
73
+
74
+ Enable dark mode by adding the `p-dark` class to your root element:
75
+
76
+ ```javascript
77
+ // Toggle dark mode
78
+ document.documentElement.classList.toggle('p-dark')
79
+ ```
80
+
81
+ ## Token Categories
82
+
83
+ - **Colors**: Semantic color tokens for text, backgrounds, borders, and states
84
+ - **Typography**: Font families, sizes, weights, and line heights
85
+ - **Spacing**: Consistent spacing scale for margins, padding, and gaps
86
+ - **Border Radius**: Border radius values for consistent corner rounding
87
+ - **Elevation**: Surface tokens for different elevation levels
88
+
89
+ ## CDN Usage
90
+
91
+ ```html
92
+ <link rel="stylesheet" href="https://unpkg.com/@bcc-code/design-tokens@latest/build/bcc/light.css">
93
+ <link rel="stylesheet" href="https://unpkg.com/@bcc-code/design-tokens@latest/build/bcc/dark.css">
94
+ ```
95
+
96
+ ## Development
97
+
98
+ A demo application is available in the `demo/` directory to test and showcase the design token integration with PrimeVue components.
99
+
100
+ ## License
101
+
63
102
  MIT © BCC Code