@idds/styles 1.6.13 → 1.6.14

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 (2) hide show
  1. package/README.md +20 -142
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Shared CSS styles and color tokens for INA Digital Design System.
4
4
 
5
- This package contains all the CSS files used by both `@idds/react` and `@idds/vue` packages. All styles are built from scratch using pure CSS (not dependent on Tailwind CSS classes) and are optimized and bundled using PostCSS (autoprefixer, cssnano, postcss-import) and published from the `dist/` folder.
5
+ This package contains all the CSS files used by the `@idds/react`, `@idds/vue`, and `@idds/js` packages. All styles are built from scratch using pure CSS (not dependent on Tailwind CSS classes) and are optimized and bundled using PostCSS (autoprefixer, cssnano, postcss-import) and published from the `dist/` folder.
6
6
 
7
7
  ## Installation
8
8
 
@@ -54,26 +54,21 @@ This will import:
54
54
 
55
55
  ### Using CDN
56
56
 
57
- You can use `@idds/styles` directly via CDN without installing it as a package. This is useful for quick prototypes, static HTML pages, or when you don't want to set up a build process.
57
+ You can use `@idds/styles` directly via CDN without installing it as a package. This is useful for quick HTML prototyping.
58
58
 
59
59
  #### Complete Bundle (Recommended)
60
60
 
61
- Include the complete bundle which contains all components, base styles, colors, and reset:
62
-
63
61
  ```html
64
62
  <!DOCTYPE html>
65
- <html lang="en">
63
+ <html lang="en" data-theme="light">
66
64
  <head>
67
65
  <meta charset="UTF-8" />
68
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
69
66
  <title>My App</title>
70
-
71
- <!-- INA Digital Design System Styles -->
67
+ <!-- Use unpkg -->
72
68
  <link
73
69
  rel="stylesheet"
74
70
  href="https://unpkg.com/@idds/styles@latest/dist/index.min.css"
75
71
  />
76
-
77
72
  <!-- Or use jsDelivr -->
78
73
  <link
79
74
  rel="stylesheet"
@@ -82,15 +77,13 @@ Include the complete bundle which contains all components, base styles, colors,
82
77
  </head>
83
78
  <body>
84
79
  <!-- Your HTML content using INA Digital Design System classes -->
85
- <div class="ina-button ina-button--primary">Button</div>
80
+ <button class="ina-button ina-button--primary">Button</button>
86
81
  </body>
87
82
  </html>
88
83
  ```
89
84
 
90
85
  #### Base Styles Only
91
86
 
92
- If you only need base styles (colors and reset) without components:
93
-
94
87
  ```html
95
88
  <head>
96
89
  <!-- Base styles only (colors + reset) -->
@@ -106,63 +99,18 @@ If you only need base styles (colors and reset) without components:
106
99
  For production, it's recommended to pin to a specific version instead of `@latest`:
107
100
 
108
101
  ```html
109
- <!-- Using unpkg -->
110
- <link
111
- rel="stylesheet"
112
- href="https://unpkg.com/@idds/styles@1.2.12/dist/index.min.css"
113
- />
114
-
115
- <!-- Using jsDelivr -->
116
- <link
117
- rel="stylesheet"
118
- href="https://cdn.jsdelivr.net/npm/@idds/styles@1.2.12/dist/index.min.css"
119
- />
120
- ```
121
-
122
- #### Available CDN Providers
123
-
124
- - **unpkg**: `https://unpkg.com/@idds/styles@[version]/dist/[file]`
125
- - **jsDelivr**: `https://cdn.jsdelivr.net/npm/@idds/styles@[version]/dist/[file]`
126
-
127
- **Available files:**
128
-
129
- - `index.css` / `index.min.css` - Complete bundle (all components + base)
130
- - `base.css` / `base.min.css` - Base styles only (colors + reset)
131
- - `tailwind/css/[theme].css` / `tailwind/css/[theme].min.css` - Tailwind CSS v4 themes
132
-
133
- **Example CDN URLs:**
134
-
135
- ```html
136
- <!-- Complete bundle (minified) -->
137
- <link
138
- href="https://unpkg.com/@idds/styles@1.2.12/dist/index.min.css"
139
- rel="stylesheet"
140
- />
141
-
142
- <!-- Base styles only (minified) -->
143
- <link
144
- href="https://unpkg.com/@idds/styles@1.2.12/dist/base.min.css"
145
- rel="stylesheet"
146
- />
147
-
148
- <!-- Tailwind theme (minified) -->
102
+ <!-- Example using 1.6.13 -->
149
103
  <link
150
- href="https://unpkg.com/@idds/styles@1.2.12/dist/tailwind/css/idds.min.css"
151
- rel="stylesheet"
152
- />
153
- <link
154
- href="https://unpkg.com/@idds/styles@1.2.12/dist/tailwind/css/bgn.min.css"
155
104
  rel="stylesheet"
105
+ href="https://unpkg.com/@idds/styles@1.6.13/dist/index.min.css"
156
106
  />
157
107
  ```
158
108
 
159
- > **Reference:** Similar to how [Vuetify provides CDN usage](https://vuetifyjs.com/en/getting-started/installation/#using-cdn), `@idds/styles` bundles all components and styles into a single CSS file for easy CDN consumption.
160
-
161
109
  ## Structure
162
110
 
163
111
  The package is published from the `dist/` folder with the following structure:
164
112
 
165
- ```
113
+ ```text
166
114
  @idds/styles/
167
115
  ├── index.css # Complete bundle (all components + base)
168
116
  ├── index.min.css # Minified complete bundle
@@ -174,31 +122,17 @@ The package is published from the `dist/` folder with the following structure:
174
122
  │ ├── idds.min.css # Minified
175
123
  │ ├── bgn.css # BGN brand theme
176
124
  │ ├── bgn.min.css # Minified
177
- ├── inagov.css # INAGov brand theme
178
- │ ├── inaku.css # INAKu brand theme
179
- │ ├── inapas.css # INAPas brand theme
180
- │ ├── bkn.css # BKN brand theme
181
- │ ├── lan.css # LAN brand theme
182
- │ ├── panrb.css # panrb brand theme
183
- │ └── ... # (with .min.css versions)
184
- └── ts/ # Tailwind CSS v3 TypeScript tokens
125
+ └── ... # and other brands (with .min.css versions)
126
+ └── ts/ # Tailwind CSS v3 TypeScript tokens
185
127
  ├── default.ts
186
128
  ├── idds.ts
187
129
  ├── bgn.ts
188
- ├── inagov.ts
189
- ├── inaku.ts
190
- ├── inapas.ts
191
- ├── bkn.ts
192
- ├── lan.ts
193
- ├── panrb.ts
194
- └── ... # Brand-specific tokens
130
+ └── ... # and other brands
195
131
  ```
196
132
 
197
- > **Note:** The `colors/`, `components/`, and `reset/` folders are not published to npm. They are bundled into `base.css` and `index.css` during the build process for optimal performance.
198
-
199
133
  ## Available Components
200
134
 
201
- This package includes CSS for all INA Digital Design System components:
135
+ This package includes CSS for all INA Digital Design System components deployed across React, Vue, and Vanilla JS:
202
136
 
203
137
  - Accordion, AccordionCard, AccordionGroup, ActionDropdown, Alert, Avatar, Badge
204
138
  - BottomSheet, Breadcrumb, Button, ButtonGroup, Card, Checkbox, Chip, Collapse
@@ -207,100 +141,44 @@ This package includes CSS for all INA Digital Design System components:
207
141
  - Pagination, PasswordInput, PhoneInput, ProgressBar, RadioInput, SelectDropdown
208
142
  - SingleFileUpload, Skeleton, Spinner, Stepper, TabHorizontal, TabVertical
209
143
  - Table, TableProgressBar, TextArea, TextField, ThemeToggle, TimePicker
210
- - Toast, Toggle, Tooltip, YearPicker, and more...
144
+ - Toast, Toggle, Tooltip, YearPicker, and more.
211
145
 
212
146
  ## Tailwind CSS Integration (Optional)
213
147
 
214
- This package provides optional Tailwind CSS utilities for both Tailwind v3 and v4. These are **optional** and only needed if you want to use INA Digital color tokens with Tailwind utility classes in your project.
148
+ This package provides **optional** Tailwind CSS utilities if you explicitly want to use INA Digital color tokens alongside Tailwind classes.
215
149
 
216
150
  ### Tailwind CSS v3
217
151
 
218
- For Tailwind v3, use the TypeScript token files:
152
+ For Tailwind v3, import the TypeScript tokens:
219
153
 
220
154
  ```js
221
155
  // tailwind.config.js
222
156
  import iddsTokens from '@idds/styles/tailwind/ts/idds';
223
- import bgnTokens from '@idds/styles/tailwind/ts/bgn'; // Optional: brand theme
224
157
 
225
158
  export default {
226
159
  theme: {
227
160
  extend: {
228
161
  colors: {
229
162
  ...iddsTokens,
230
- ...bgnTokens, // Optional: extend with brand colors
231
163
  },
232
164
  },
233
165
  },
234
166
  };
235
167
  ```
236
168
 
237
- Then you can use classes like:
238
-
239
- - `text-neutral-500`
240
- - `bg-blue-500`
241
- - `text-guide-500` (which uses `--ina-blue-500` = `#0968f6`)
242
-
243
- **Available brand tokens:**
244
-
245
- - `@idds/styles/tailwind/ts/default` - Default tokens
246
- - `@idds/styles/tailwind/ts/idds` - IDDS tokens
247
- - `@idds/styles/tailwind/ts/inagov` - INAGov brand
248
- - `@idds/styles/tailwind/ts/inaku` - INAKu brand
249
- - `@idds/styles/tailwind/ts/inapas` - INAPas brand
250
- - `@idds/styles/tailwind/ts/bgn` - BGN brand
251
- - `@idds/styles/tailwind/ts/bkn` - BKN brand
252
- - `@idds/styles/tailwind/ts/lan` - LAN brand
253
- - `@idds/styles/tailwind/ts/panrb` - panrb brand
254
-
255
169
  ### Tailwind CSS v4
256
170
 
257
- For Tailwind v4, use the CSS files with `@theme` syntax:
171
+ For Tailwind v4, use the CSS files with `@import` configuration inside your entry stylesheet:
258
172
 
259
173
  ```css
260
- /* your main CSS file */
174
+ /* src/index.css */
175
+ @import 'tailwindcss';
261
176
  @import '@idds/styles/tailwind/css/idds.css';
262
- @import '@idds/styles/tailwind/css/bgn.css'; /* Optional: brand theme */
263
- ```
264
-
265
- Or use minified versions for production:
266
-
267
- ```css
268
- @import '@idds/styles/tailwind/css/idds.min.css';
269
- @import '@idds/styles/tailwind/css/bgn.min.css';
270
- ```
271
-
272
- Then you can use classes like:
273
-
274
- - `text-neutral-500`
275
- - `bg-blue-500`
276
- - `text-guide-500` (which uses `--ina-blue-500` = `#0968f6`)
277
-
278
- **Available brand themes (with .min.css versions):**
279
-
280
- - `@idds/styles/tailwind/css/idds.css` - Default theme
281
- - `@idds/styles/tailwind/css/inagov.css` - INAGov brand
282
- - `@idds/styles/tailwind/css/inaku.css` - INAKu brand
283
- - `@idds/styles/tailwind/css/inapas.css` - INAPas brand
284
- - `@idds/styles/tailwind/css/bgn.css` - BGN brand
285
- - `@idds/styles/tailwind/css/bkn.css` - BKN brand
286
- - `@idds/styles/tailwind/css/lan.css` - LAN brand
287
- - `@idds/styles/tailwind/css/panrb.css` - panrb brand
288
-
289
- ### Example Usage
290
-
291
- ```html
292
- <!-- Using Tailwind classes with INA Digital colors -->
293
- <div class="bg-blue-500 text-white p-4">
294
- <p class="text-guide-500">This text uses guide-500 color (#0968f6)</p>
295
- <p class="text-neutral-500">This text uses neutral-500 color</p>
296
- </div>
297
177
  ```
298
178
 
299
- ## Important Notes
179
+ ## Theme Mode Support
300
180
 
301
- - **No Tailwind Dependency**: This package does NOT require Tailwind CSS. All styles are built from scratch using pure CSS.
302
- - **Tailwind Integration is Optional**: The Tailwind token files are provided as a convenience for projects that want to use INA Digital colors with Tailwind utility classes. You can use `@idds/styles` without Tailwind.
303
- - **Component Styles**: Component styles use BEM-like naming convention (e.g., `ina-button`, `ina-button--primary`) and are self-contained.
181
+ Styles natively hook into `[data-theme="dark"]` and `[data-theme="light"]` attribute selectors dynamically via CSS variables mapped internally by this package.
304
182
 
305
183
  ## License
306
184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idds/styles",
3
- "version": "1.6.13",
3
+ "version": "1.6.14",
4
4
  "description": "Shared CSS styles and colors for INA Digital Design System",
5
5
  "type": "module",
6
6
  "main": "./dist/index.css",