@westayltd/design-tokens 0.3.0 → 0.3.2

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/colors.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "900": "#4D4D4D",
15
15
  "800": "#636363",
16
16
  "700": "#757575",
17
- "600": "#909090",
17
+ "600": "#919191",
18
18
  "500": "#A9A9A9",
19
19
  "400": "#C0C0C0",
20
20
  "300": "#DCDCDC",
@@ -88,14 +88,15 @@
88
88
  "100": "#F7EEDD"
89
89
  },
90
90
  "link": {
91
- "800": "#255965",
92
- "700": "#246B7A",
93
- "600": "#258495",
94
- "500": "#2CAFBE",
95
- "400": "#45C0CB",
96
- "300": "#80D9E0",
97
- "200": "#B4E9ED",
98
- "100": "#D7F4F6"
91
+ "800": "#204CAD",
92
+ "700": "#1F5ED6",
93
+ "600": "#2774E9",
94
+ "500": "#3D92F4",
95
+ "400": "#62B1F8",
96
+ "300": "#94CDFC",
97
+ "200": "#C0E0FD",
98
+ "100": "#DBEDFE",
99
+ "50": "#EFF7FF"
99
100
  },
100
101
  "paleSteel": {
101
102
  "800": "#202236",
@@ -107,17 +108,6 @@
107
108
  "200": "#E8E8ED",
108
109
  "100": "#F9F9FB"
109
110
  },
110
- "label": {
111
- "800": "#204CAD",
112
- "700": "#1F5ED6",
113
- "600": "#2774E9",
114
- "500": "#3D92F4",
115
- "400": "#62B1F8",
116
- "300": "#94CDFC",
117
- "200": "#C0E0FD",
118
- "100": "#DBEDFE",
119
- "50": "#EFF7FF"
120
- },
121
111
  "loyalty": {
122
112
  "900": "#482B54",
123
113
  "800": "#5F3672",
@@ -168,6 +158,10 @@
168
158
  "body": "#4D4D4D",
169
159
  "secondary": "#757575",
170
160
  "tertiary": "#A9A9A9"
161
+ },
162
+ "borderColors": {
163
+ "DEFAULT": "#E5E5E5",
164
+ "dark": "#4D4D4D"
171
165
  }
172
166
  },
173
167
 
package/dist/index.cjs CHANGED
@@ -41,7 +41,7 @@ var colors_default = {
41
41
  "900": "#4D4D4D",
42
42
  "800": "#636363",
43
43
  "700": "#757575",
44
- "600": "#909090",
44
+ "600": "#919191",
45
45
  "500": "#A9A9A9",
46
46
  "400": "#C0C0C0",
47
47
  "300": "#DCDCDC",
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var colors_default = {
15
15
  "900": "#4D4D4D",
16
16
  "800": "#636363",
17
17
  "700": "#757575",
18
- "600": "#909090",
18
+ "600": "#919191",
19
19
  "500": "#A9A9A9",
20
20
  "400": "#C0C0C0",
21
21
  "300": "#DCDCDC",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@westayltd/design-tokens",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/README.md DELETED
@@ -1,213 +0,0 @@
1
- # @westayltd/design-tokens
2
-
3
- A comprehensive design token system for Westay applications, providing consistent colors, spacing, typography, and radius values across the platform.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @westayltd/design-tokens
9
- ```
10
-
11
- ## Usage
12
-
13
- ### Import All Tokens
14
-
15
- ```typescript
16
- import { tokens } from '@westayltd/design-tokens';
17
-
18
- // Access all tokens
19
- const brandColor = tokens.colors.light.brand.crimson[500];
20
- const spacing = tokens.spacing[4]; // "16px"
21
- const fontSize = tokens.typography.fontSize.base; // "16px"
22
- const borderRadius = tokens.radius.md; // "10px"
23
- ```
24
-
25
- ### Import Individual Token Files
26
-
27
- You can also import individual JSON files directly:
28
-
29
- ```typescript
30
- import colors from '@westayltd/design-tokens/colors';
31
- import spacing from '@westayltd/design-tokens/spacing';
32
- import typography from '@westayltd/design-tokens/typography';
33
- import radius from '@westayltd/design-tokens/radius';
34
- ```
35
-
36
- ### TypeScript Support
37
-
38
- The package includes full TypeScript definitions:
39
-
40
- ```typescript
41
- import { tokens, ThemeMode, Tokens } from '@westayltd/design-tokens';
42
-
43
- // Type-safe access
44
- const mode: ThemeMode = 'light';
45
- const color: string = tokens.colors[mode].brand.crimson[500];
46
- ```
47
-
48
- ## Available Tokens
49
-
50
- ### Colors
51
-
52
- The color system supports both light and dark themes:
53
-
54
- ```typescript
55
- import { tokens } from '@westayltd/design-tokens';
56
-
57
- // Light theme colors
58
- tokens.colors.light.brand.crimson[500] // "#F17878"
59
- tokens.colors.light.brand.burgundy[500] // "#D8A6AE"
60
- tokens.colors.light.brand.royals[500] // "#004484"
61
- tokens.colors.light.brand.oldMoney[500] // "#448E80"
62
- tokens.colors.light.surface.bg // Background colors
63
- tokens.colors.light.text.primary // Text colors
64
- tokens.colors.light.feedback.success // Feedback colors
65
-
66
- // Dark theme colors
67
- tokens.colors.dark.brand.crimson[500]
68
- tokens.colors.dark.surface.bg
69
- tokens.colors.dark.text.primary
70
- ```
71
-
72
- **Color Categories:**
73
- - **Brand**: Crimson, Burgundy, Royals, OldMoney
74
- - **Surface**: Background, subtle, raised, border colors
75
- - **Text**: Primary, secondary, muted, inverse
76
- - **Feedback**: Success, error, warning, info
77
-
78
- ### Spacing
79
-
80
- Consistent spacing scale from 0 to 12:
81
-
82
- ```typescript
83
- tokens.spacing[0] // "0px"
84
- tokens.spacing[1] // "4px"
85
- tokens.spacing[2] // "8px"
86
- tokens.spacing[3] // "12px"
87
- tokens.spacing[4] // "16px"
88
- tokens.spacing[5] // "20px"
89
- tokens.spacing[6] // "24px"
90
- tokens.spacing[8] // "32px"
91
- tokens.spacing[10] // "40px"
92
- tokens.spacing[12] // "48px"
93
- ```
94
-
95
- ### Typography
96
-
97
- Font families, sizes, weights, and line heights:
98
-
99
- ```typescript
100
- // Font Family
101
- tokens.typography.fontFamily.sans // ["Helvetica", "Arial", "sans-serif"]
102
-
103
- // Font Sizes
104
- tokens.typography.fontSize.xs // "12px"
105
- tokens.typography.fontSize.sm // "14px"
106
- tokens.typography.fontSize.base // "16px"
107
- tokens.typography.fontSize.lg // "18px"
108
- tokens.typography.fontSize.xl // "20px"
109
- tokens.typography.fontSize['2xl'] // "24px"
110
- tokens.typography.fontSize['3xl'] // "30px"
111
-
112
- // Font Weights
113
- tokens.typography.fontWeight.regular // "400"
114
- tokens.typography.fontWeight.medium // "500"
115
- tokens.typography.fontWeight.semibold // "600"
116
- tokens.typography.fontWeight.bold // "700"
117
-
118
- // Line Heights
119
- tokens.typography.lineHeight.tight // "1.2"
120
- tokens.typography.lineHeight.normal // "1.5"
121
- tokens.typography.lineHeight.relaxed // "1.7"
122
- ```
123
-
124
- ### Radius
125
-
126
- Border radius values:
127
-
128
- ```typescript
129
- tokens.radius.none // "0px"
130
- tokens.radius.sm // "6px"
131
- tokens.radius.md // "10px"
132
- tokens.radius.lg // "14px"
133
- tokens.radius.xl // "20px"
134
- tokens.radius.full // "9999px"
135
- ```
136
-
137
- ## Building the Package
138
-
139
- To build the package from source:
140
-
141
- ```bash
142
- cd design-tokens
143
- npm install
144
- npm run build
145
- ```
146
-
147
- This will:
148
- - Compile TypeScript to both CommonJS and ES Module formats
149
- - Generate TypeScript declaration files (`.d.ts`)
150
- - Generate source maps for debugging
151
- - Output files to the `dist/` directory
152
-
153
- ### Development Mode
154
-
155
- For development with watch mode:
156
-
157
- ```bash
158
- npm run dev
159
- ```
160
-
161
- This will automatically rebuild when source files change.
162
-
163
- ## Package Structure
164
-
165
- ```
166
- design-tokens/
167
- ├── colors.json # Color tokens (light & dark themes)
168
- ├── spacing.json # Spacing scale
169
- ├── typography.json # Typography tokens
170
- ├── radius.json # Border radius tokens
171
- ├── index.ts # Main entry point
172
- ├── tsconfig.json # TypeScript configuration
173
- ├── tsup.config.ts # Build configuration
174
- ├── package.json # Package metadata
175
- └── dist/ # Built output
176
- ├── index.js # ES Module build
177
- ├── index.cjs # CommonJS build
178
- ├── index.d.ts # TypeScript declarations
179
- └── *.map # Source maps
180
- ```
181
-
182
- ## Exports
183
-
184
- The package exports:
185
-
186
- - **Main export**: `@westayltd/design-tokens` - Full tokens object with TypeScript types
187
- - **Colors**: `@westayltd/design-tokens/colors` - Colors JSON file
188
- - **Spacing**: `@westayltd/design-tokens/spacing` - Spacing JSON file
189
- - **Typography**: `@westayltd/design-tokens/typography` - Typography JSON file
190
- - **Radius**: `@westayltd/design-tokens/radius` - Radius JSON file
191
-
192
- ## TypeScript Types
193
-
194
- The package exports the following TypeScript types:
195
-
196
- ```typescript
197
- import type {
198
- ThemeMode, // "light" | "dark"
199
- Tokens, // Complete tokens object type
200
- Colors, // Colors type
201
- Spacing, // Spacing type
202
- Typography, // Typography type
203
- Radius // Radius type
204
- } from '@westayltd/design-tokens';
205
- ```
206
-
207
- ## Version
208
-
209
- Current version: **0.2.1**
210
-
211
- ## License
212
-
213
- MIT