@aziontech/theme 0.1.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.
Files changed (156) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +466 -0
  3. package/package.json +52 -0
  4. package/src/azion/_custom.scss +3 -0
  5. package/src/azion/_extensions.scss +37 -0
  6. package/src/azion/_fonts.scss +153 -0
  7. package/src/azion/_variables-widget.scss +400 -0
  8. package/src/azion/_variables.scss +407 -0
  9. package/src/azion/custom/_code.scss +11 -0
  10. package/src/azion/custom/_focus.scss +5 -0
  11. package/src/azion/custom/_scrollbehavior.scss +6 -0
  12. package/src/azion/custom/_selection.scss +4 -0
  13. package/src/azion/custom/_special-button.scss +57 -0
  14. package/src/azion/extended-components/_autocomplete.scss +13 -0
  15. package/src/azion/extended-components/_badge.scss +53 -0
  16. package/src/azion/extended-components/_breadcumb.scss +18 -0
  17. package/src/azion/extended-components/_button.scss +134 -0
  18. package/src/azion/extended-components/_calendar.scss +310 -0
  19. package/src/azion/extended-components/_carousel.scss +9 -0
  20. package/src/azion/extended-components/_checkbox.scss +33 -0
  21. package/src/azion/extended-components/_datatable.scss +130 -0
  22. package/src/azion/extended-components/_dialog.scss +45 -0
  23. package/src/azion/extended-components/_divider.scss +37 -0
  24. package/src/azion/extended-components/_dropdown.scss +10 -0
  25. package/src/azion/extended-components/_dropdownitem.scss +13 -0
  26. package/src/azion/extended-components/_inlinemessage.scss +10 -0
  27. package/src/azion/extended-components/_inputnumber.scss +40 -0
  28. package/src/azion/extended-components/_inputpassword.scss +4 -0
  29. package/src/azion/extended-components/_inputswitch.scss +53 -0
  30. package/src/azion/extended-components/_listbox.scss +35 -0
  31. package/src/azion/extended-components/_markdown.scss +135 -0
  32. package/src/azion/extended-components/_menuitem.scss +22 -0
  33. package/src/azion/extended-components/_multiselect.scss +167 -0
  34. package/src/azion/extended-components/_overlaypanel.scss +18 -0
  35. package/src/azion/extended-components/_picklist.scss +25 -0
  36. package/src/azion/extended-components/_progressbar.scss +6 -0
  37. package/src/azion/extended-components/_radiobutton.scss +63 -0
  38. package/src/azion/extended-components/_selectbutton.scss +36 -0
  39. package/src/azion/extended-components/_sidebar.scss +28 -0
  40. package/src/azion/extended-components/_splitbutton.scss +22 -0
  41. package/src/azion/extended-components/_tabmenu.scss +21 -0
  42. package/src/azion/extended-components/_tabview.scss +41 -0
  43. package/src/azion/extended-components/_tag.scss +47 -0
  44. package/src/azion/extended-components/_toast.scss +9 -0
  45. package/src/azion/extended-components/_tooltip.scss +7 -0
  46. package/src/azion/extended-components/_treeselect.scss +10 -0
  47. package/src/azion/extended-components/jsonform/_inputcheckbox.scss +41 -0
  48. package/src/azion/extended-components/jsonform/_inputtext.scss +26 -0
  49. package/src/azion/extended-components/jsonform/_label.scss +185 -0
  50. package/src/azion/extended-components/jsonform/_select.scss +34 -0
  51. package/src/azion/theme-base/_colors.scss +18 -0
  52. package/src/azion/theme-base/_common.scss +75 -0
  53. package/src/azion/theme-base/_components.scss +103 -0
  54. package/src/azion/theme-base/_mixins.scss +250 -0
  55. package/src/azion/theme-base/components/button/_button.scss +567 -0
  56. package/src/azion/theme-base/components/button/_speeddial.scss +97 -0
  57. package/src/azion/theme-base/components/button/_splitbutton.scss +390 -0
  58. package/src/azion/theme-base/components/data/_carousel.scss +37 -0
  59. package/src/azion/theme-base/components/data/_datatable.scss +347 -0
  60. package/src/azion/theme-base/components/data/_dataview.scss +47 -0
  61. package/src/azion/theme-base/components/data/_filter.scss +138 -0
  62. package/src/azion/theme-base/components/data/_orderlist.scss +70 -0
  63. package/src/azion/theme-base/components/data/_organizationchart.scss +50 -0
  64. package/src/azion/theme-base/components/data/_paginator.scss +92 -0
  65. package/src/azion/theme-base/components/data/_picklist.scss +70 -0
  66. package/src/azion/theme-base/components/data/_timeline.scss +38 -0
  67. package/src/azion/theme-base/components/data/_tree.scss +90 -0
  68. package/src/azion/theme-base/components/data/_treetable.scss +251 -0
  69. package/src/azion/theme-base/components/file/_fileupload.scss +82 -0
  70. package/src/azion/theme-base/components/input/_autocomplete.scss +114 -0
  71. package/src/azion/theme-base/components/input/_calendar.scss +251 -0
  72. package/src/azion/theme-base/components/input/_cascadeselect.scss +106 -0
  73. package/src/azion/theme-base/components/input/_checkbox.scss +86 -0
  74. package/src/azion/theme-base/components/input/_chips.scss +53 -0
  75. package/src/azion/theme-base/components/input/_colorpicker.scss +18 -0
  76. package/src/azion/theme-base/components/input/_dropdown.scss +147 -0
  77. package/src/azion/theme-base/components/input/_editor.scss +122 -0
  78. package/src/azion/theme-base/components/input/_inputgroup.scss +74 -0
  79. package/src/azion/theme-base/components/input/_inputnumber.scss +5 -0
  80. package/src/azion/theme-base/components/input/_inputswitch.scss +62 -0
  81. package/src/azion/theme-base/components/input/_inputtext.scss +100 -0
  82. package/src/azion/theme-base/components/input/_listbox.scss +89 -0
  83. package/src/azion/theme-base/components/input/_multiselect.scss +166 -0
  84. package/src/azion/theme-base/components/input/_password.scss +33 -0
  85. package/src/azion/theme-base/components/input/_radiobutton.scss +78 -0
  86. package/src/azion/theme-base/components/input/_rating.scss +60 -0
  87. package/src/azion/theme-base/components/input/_selectbutton.scss +50 -0
  88. package/src/azion/theme-base/components/input/_slider.scss +49 -0
  89. package/src/azion/theme-base/components/input/_togglebutton.scss +52 -0
  90. package/src/azion/theme-base/components/input/_treeselect.scss +91 -0
  91. package/src/azion/theme-base/components/menu/_breadcrumb.scss +42 -0
  92. package/src/azion/theme-base/components/menu/_contextmenu.scss +39 -0
  93. package/src/azion/theme-base/components/menu/_dock.scss +95 -0
  94. package/src/azion/theme-base/components/menu/_megamenu.scss +55 -0
  95. package/src/azion/theme-base/components/menu/_menu.scss +33 -0
  96. package/src/azion/theme-base/components/menu/_menubar.scss +141 -0
  97. package/src/azion/theme-base/components/menu/_panelmenu.scss +153 -0
  98. package/src/azion/theme-base/components/menu/_steps.scss +56 -0
  99. package/src/azion/theme-base/components/menu/_tabmenu.scss +49 -0
  100. package/src/azion/theme-base/components/menu/_tieredmenu.scss +43 -0
  101. package/src/azion/theme-base/components/messages/_inlinemessage.scss +64 -0
  102. package/src/azion/theme-base/components/messages/_message.scss +100 -0
  103. package/src/azion/theme-base/components/messages/_toast.scss +100 -0
  104. package/src/azion/theme-base/components/misc/_avatar.scss +30 -0
  105. package/src/azion/theme-base/components/misc/_badge.scss +48 -0
  106. package/src/azion/theme-base/components/misc/_blockui.scss +0 -0
  107. package/src/azion/theme-base/components/misc/_chip.scss +39 -0
  108. package/src/azion/theme-base/components/misc/_inplace.scss +17 -0
  109. package/src/azion/theme-base/components/misc/_progressbar.scss +17 -0
  110. package/src/azion/theme-base/components/misc/_progressspinner.scss +49 -0
  111. package/src/azion/theme-base/components/misc/_scrolltop.scss +25 -0
  112. package/src/azion/theme-base/components/misc/_skeleton.scss +8 -0
  113. package/src/azion/theme-base/components/misc/_tag.scss +40 -0
  114. package/src/azion/theme-base/components/misc/_terminal.scss +12 -0
  115. package/src/azion/theme-base/components/multimedia/_galleria.scss +151 -0
  116. package/src/azion/theme-base/components/multimedia/_image.scss +54 -0
  117. package/src/azion/theme-base/components/overlay/_confirmpopup.scss +72 -0
  118. package/src/azion/theme-base/components/overlay/_dialog.scss +64 -0
  119. package/src/azion/theme-base/components/overlay/_overlaypanel.scss +38 -0
  120. package/src/azion/theme-base/components/overlay/_sidebar.scss +23 -0
  121. package/src/azion/theme-base/components/overlay/_tooltip.scss +33 -0
  122. package/src/azion/theme-base/components/panel/_accordion.scss +118 -0
  123. package/src/azion/theme-base/components/panel/_card.scss +30 -0
  124. package/src/azion/theme-base/components/panel/_divider.scss +40 -0
  125. package/src/azion/theme-base/components/panel/_fieldset.scss +51 -0
  126. package/src/azion/theme-base/components/panel/_panel.scss +47 -0
  127. package/src/azion/theme-base/components/panel/_scrollpanel.scss +11 -0
  128. package/src/azion/theme-base/components/panel/_splitter.scss +24 -0
  129. package/src/azion/theme-base/components/panel/_tabview.scss +66 -0
  130. package/src/azion/theme-base/components/panel/_toolbar.scss +11 -0
  131. package/src/azion/theme-widget.scss +9 -0
  132. package/src/azion/theme.scss +9 -0
  133. package/src/azion/variables/_button.scss +438 -0
  134. package/src/azion/variables/_data.scss +346 -0
  135. package/src/azion/variables/_form.scss +570 -0
  136. package/src/azion/variables/_general.scss +149 -0
  137. package/src/azion/variables/_media.scss +231 -0
  138. package/src/azion/variables/_menu.scss +287 -0
  139. package/src/azion/variables/_message.scss +145 -0
  140. package/src/azion/variables/_misc.scss +143 -0
  141. package/src/azion/variables/_overlay.scss +67 -0
  142. package/src/azion/variables/_panel.scss +327 -0
  143. package/src/tokens/README.md +345 -0
  144. package/src/tokens/build/css-vars.js +41 -0
  145. package/src/tokens/build/preset.js +69 -0
  146. package/src/tokens/build/refs.js +7 -0
  147. package/src/tokens/build/resolve.js +102 -0
  148. package/src/tokens/build/tailwind-helper.js +12 -0
  149. package/src/tokens/build/tailwind-plugin.js +175 -0
  150. package/src/tokens/colors-brand.js +24 -0
  151. package/src/tokens/index.js +16 -0
  152. package/src/tokens/primitives/brand.js +69 -0
  153. package/src/tokens/primitives/colors.js +133 -0
  154. package/src/tokens/semantic/backgrounds.js +48 -0
  155. package/src/tokens/semantic/borders.js +46 -0
  156. package/src/tokens/semantic/text.js +78 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Azion Technologies
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,466 @@
1
+ <h1 align="center">azion-theme</h1>
2
+
3
+ ![production](https://github.com/aziontech/azion-theme/actions/workflows/release.yml/badge.svg)
4
+
5
+ <p align="center">
6
+ <img
7
+ src="./doc/cover-image.png"
8
+ width="1200px"
9
+ />
10
+ </p>
11
+
12
+ The Azion Theme repository is focused on sharing our style kit across interfaces and should be used in all company projects, including Azion Console Kit, Azion Site, Landing Pages, and all user interactions with Azion.
13
+
14
+ ## 📋 Table of Contents
15
+
16
+ - [Installation](#-installation)
17
+ - [Usage](#-usage)
18
+ - [Development](#-development)
19
+ - [Building](#-building)
20
+ - [Release Process](#-release-process)
21
+ - [Design Tokens](#-design-tokens)
22
+ - [Links](#-links)
23
+
24
+ ## 🚀 Installation
25
+
26
+ To install the `azion-theme` project, you need to follow the command. Choose one of your preferences: npm or yarn:
27
+
28
+ ```bash
29
+ npm install azion-theme --save
30
+ # or
31
+ yarn add azion-theme
32
+ ```
33
+
34
+ Alternatively, you can configure the `package.json` file by adding the dependency:
35
+
36
+ ```json
37
+ {
38
+ "dependencies": {
39
+ "azion-theme": "^1.4.0"
40
+ }
41
+ }
42
+ ```
43
+
44
+ After updating the `package.json` file, run `npm install` in the root of your project to install the Azion Theme.
45
+
46
+ ### 🔗 Integration with Front-End Project
47
+
48
+ To integrate the Azion Theme into your front-end project, you need to import the theme files in your project's entry point file (App.vue, main.js, index.js, etc.):
49
+
50
+ ```javascript
51
+ import 'azion-theme/dark'
52
+ import 'azion-theme/light'
53
+ ```
54
+
55
+ Make sure to include these imports at the top of your entry point file to ensure the styles are applied correctly throughout your application.
56
+
57
+ ## 💻 Development
58
+
59
+ To work locally, you should clone both the `azion-theme` repository and the other repository where the theme will be used.
60
+
61
+ ### Example:
62
+
63
+ In this example, we will use the [azion-webkit](https://github.com/aziontech/azion-webkit) repository:
64
+
65
+ 1. Clone the `azion-webkit` and `azion-theme` repositories:
66
+
67
+ ```bash
68
+ git clone https://github.com/aziontech/azion-webkit.git
69
+ git clone https://github.com/aziontech/azion-theme.git
70
+ ```
71
+
72
+ 2. Install dependencies and create the link point:
73
+
74
+ ```bash
75
+ cd ./azion-theme && npm i && npm link
76
+ ```
77
+
78
+ 3. Link the `azion-theme` to the `azion-webkit` project:
79
+
80
+ ```bash
81
+ cd ../azion-webkit && npm i && npm link azion-theme
82
+ ```
83
+
84
+ Any modifications made to `azion-theme` will be reflected on this development server with hot reload.
85
+
86
+ ## 🏗️ Building
87
+
88
+ This package is built automatically using Semantic Release during the release process. However, you can also build it manually for development purposes.
89
+
90
+ ### Build Process
91
+
92
+ The build process includes the following steps:
93
+
94
+ 1. **Validate Theme Tokens** - Ensures all token files are valid and properly formatted
95
+ 2. **Clean dist/ Directory** - Removes any previously generated files
96
+ 3. **Compile Tokens** - Merges all token definitions into a distributable format
97
+ 4. **Generate CSS Files** - Creates CSS files with CSS variables for light/dark themes
98
+ 5. **Generate package.json** - Creates a distributable package manifest
99
+ 6. **Copy Documentation** - Copies LICENSE and README.md into the dist folder
100
+ 7. **Generate Type Definitions** - Creates TypeScript declaration files
101
+
102
+ ### Manual Build
103
+
104
+ To build the package manually:
105
+
106
+ ```bash
107
+ cd packages/theme
108
+ npm run build
109
+ ```
110
+
111
+ This will generate the `dist/` directory with all necessary files.
112
+
113
+ ### Preview Build
114
+
115
+ To preview what the build will look like without publishing:
116
+
117
+ ```bash
118
+ npm run pack:dry
119
+ ```
120
+
121
+ This will generate a tarball preview using npm pack --dry-run.
122
+
123
+ ### Clean Build Artifacts
124
+
125
+ To remove all generated files:
126
+
127
+ ```bash
128
+ npm run clean
129
+ ```
130
+
131
+ This will remove the `dist/` directory.
132
+
133
+ ## 📦 Release Process
134
+
135
+ This package uses Semantic Release for automated versioning and publishing.
136
+
137
+ ### Automatic Release Workflow
138
+
139
+ 1. Commits following the conventional commit format are analyzed
140
+ 2. Version numbers are automatically incremented based on commit type
141
+ 3. Release notes are generated automatically
142
+ 4. A changelog is updated
143
+ 5. The package is built
144
+ 6. The package is published to npm with provenance
145
+ 7. GitHub release is created
146
+
147
+ ### Commit Convention
148
+
149
+ Use this format for conventional commits:
150
+
151
+ ```
152
+ [#ticket] type: subject
153
+ ```
154
+
155
+ Where:
156
+
157
+ - `[#ticket]` - Optional Jira ticket reference (e.g., `[#AZ-1234]`)
158
+ - `type` - One of: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`
159
+ - `subject` - Brief description of the change
160
+
161
+ Examples:
162
+
163
+ - `feat(tokens): Add new primary color variants`
164
+ - `fix(theme): Update border radius values`
165
+ - `chore(build): Update semantic-release configuration`
166
+
167
+ ### Release Types
168
+
169
+ - **feat (new features)**: **minor** version increment
170
+ - **fix (bug fixes)**: **patch** version increment
171
+ - **hotfix (emergency fixes)**: **patch** version increment
172
+ - **chore, docs, style, refactor**: **patch** version increment
173
+
174
+ ### CI/CD Workflow
175
+
176
+ The workflow is defined in `.github/workflows/package-theme.yml` and runs on pushes to the `main` branch when `packages/theme/**` files change.
177
+
178
+ ### Required Secrets
179
+
180
+ To enable automated npm publishing, configure the following GitHub secrets:
181
+
182
+ - `NPM_TOKEN` - Your npm authentication token with publish permissions
183
+
184
+ Without this token, the build will still complete and generate release notes, but npm publishing will be skipped.
185
+
186
+ ### Manual Release
187
+
188
+ You can also trigger a manual release:
189
+
190
+ ```bash
191
+ npx semantic-release
192
+ ```
193
+
194
+ This will require the `NPM_TOKEN` to be available in your environment.
195
+
196
+ ## 🎨 Design Tokens
197
+
198
+ This project includes **primitive color tokens** extracted directly from Figma, ready to be consumed via Tailwind CSS.
199
+
200
+ ### 🚀 How to Use the Tokens
201
+
202
+ ```javascript
203
+ // tailwind.config.js
204
+ import typography from '@tailwindcss/typography'
205
+ import { tokenUtilities } from 'azion-theme/tokens/build/tailwind-plugin'
206
+ import colors from 'azion-theme/tokens'
207
+
208
+ export default {
209
+ content: ['./src/**/*.{js,ts,jsx,tsx,html}'],
210
+ darkMode: ['class', '.dark', '.azion.azion-dark'],
211
+ theme: {
212
+ extend: {
213
+ colors: {
214
+ ...colors
215
+ }
216
+ }
217
+ },
218
+ plugins: [tokenUtilities(), typography]
219
+ }
220
+ ```
221
+
222
+ #### Token structure overview
223
+
224
+ **Global/Primitive tokens** (direct values, use with `dark:` variant):
225
+
226
+ ```javascript
227
+ // Primitive palettes (all with 50-950 shades)
228
+ colors.orange[500] // #fe601f
229
+ colors.violet[500] // #8a84ec
230
+ colors.neutral[900] // #171717
231
+
232
+ // Brand colors
233
+ colors.brand.black // #0a0a0a
234
+ colors.brand.white // #fafafa
235
+ colors.brand.orange // #fe601f
236
+
237
+ // Brand primitives (aliases)
238
+ colors.primary[500] // orange palette
239
+ colors.accent[500] // violet palette
240
+
241
+ // Surface primitives (neutral-based)
242
+ colors.surface[950] // #0a0a0a
243
+ ```
244
+
245
+ **Semantic tokens** (theme-aware, no `dark:` variant needed):
246
+
247
+ ```javascript
248
+ // Text colors - automatically switches between light/dark
249
+ colors.text.base // neutral-900 (light) / neutral-50 (dark)
250
+ colors.text.muted // neutral-600 (light) / neutral-400 (dark)
251
+ colors.text.accent // accent-500 (both modes)
252
+
253
+ // Background colors - theme-aware layers
254
+ colors.background.layer1 // surface-0 (light) / surface-800 (dark)
255
+ colors.background.layer2 // surface-50 (light) / surface-700 (dark)
256
+ colors.background.canvas // surface-100 (light) / surface-950 (dark)
257
+
258
+ // Border colors - theme-aware borders
259
+ colors.border.base // surface-200 (light) / surface-700 (dark)
260
+ colors.border.primary // primary-500 (both modes)
261
+ colors.border.accent // accent-500 (both modes)
262
+ ```
263
+
264
+ #### Usage in HTML/Tailwind Classes
265
+
266
+ **Using semantic tokens** (theme-aware, no `dark:` variant needed):
267
+
268
+ ```html
269
+ <!-- Semantic background - automatically switches theme -->
270
+ <div class="bg-layer1">Layer 1 background (white in light, dark in dark mode)</div>
271
+
272
+ <!-- Semantic text colors -->
273
+ <p class="text-base">Base text color (auto-adapts to theme)</p>
274
+
275
+ <!-- Semantic borders -->
276
+ <div class="border border-base">Border adapts to current theme</div>
277
+
278
+ <!-- Semantic interactive states -->
279
+ <button class="bg-layer1 hover:bg-layer1-hover border border-primary text-primary">
280
+ Themed button
281
+ </button>
282
+ ```
283
+
284
+ **Using global tokens** (can use `dark:` in this cases):
285
+
286
+ ```html
287
+ <!-- Background with dark variant -->
288
+ <div class="bg-neutral-50 dark:bg-neutral-950">Adaptive background</div>
289
+
290
+ <!-- Text colors with dark variant -->
291
+ <p class="text-neutral-900 dark:text-neutral-100">Primary text color</p>
292
+
293
+ <!-- Border colors with dark variant -->
294
+ <div class="border border-neutral-200 dark:border-neutral-800">Card with adaptive border</div>
295
+
296
+ <!-- Using brand colors (no dark variant needed) -->
297
+ <button class="bg-orange-500 text-white hover:bg-orange-600">Action Button</button>
298
+ ```
299
+
300
+ **Available token classes:**
301
+
302
+ _Global tokens_ (use with `dark:` variant):
303
+
304
+ - **Neutrals:** `neutral-50` → `neutral-950` (surface backgrounds, text, borders)
305
+ - **Brand:** `orange-50` → `orange-950` (primary actions)
306
+ - **Accent:** `violet-50` → `violet-950` (secondary highlights)
307
+ - **Status:** `red-*`, `green-*`, `yellow-*`, `blue-*` (semantic status colors)
308
+
309
+ _Semantic tokens_ (theme-aware, no `dark:` needed):
310
+
311
+ - **Text:** `text-base`, `text-muted`, `text-accent`, `text-primary`, `text-link`
312
+ - **Background:** `bg-layer1`, `bg-layer2`, `bg-canvas`, `bg-base`
313
+ - **Border:** `border-base`, `border-primary`, `border-accent`, `border-warning`, `border-success`, `border-danger`
314
+
315
+ ### Theme Switch Compatibility
316
+
317
+ The CSS variable initializer targets both the Tailwind `.dark` class and the existing theme classes used by the SCSS theme:
318
+
319
+ ```css
320
+ :root,
321
+ [data-theme='light'],
322
+ .azion.azion-light {
323
+ /* light vars */
324
+ }
325
+ [data-theme='dark'],
326
+ .dark,
327
+ .azion.azion-dark {
328
+ /* dark vars */
329
+ }
330
+ ```
331
+
332
+ ### Granular Imports (Advanced)
333
+
334
+ ```javascript
335
+ // Named exports for specific token types
336
+ import {
337
+ primitives,
338
+ brandColors,
339
+ brandPrimitives,
340
+ surfacePrimitives,
341
+ preset,
342
+ createTailwindConfig,
343
+ tokenUtilities
344
+ } from 'azion-theme/tokens'
345
+ ```
346
+
347
+ ### 🛠️ Sync & Maintenance (With Script)
348
+
349
+ #### How to feed new and changed tokens from Figma
350
+
351
+ 1. **Update Figma Variables**
352
+ - Ensure **Global** and **Semantic** variables are updated and organized correctly (naming, groups, modes, and values).
353
+
354
+ 2. **Open the Tokens Studio for Figma plugin**
355
+
356
+ 3. **Import Figma Variables into Tokens Studio**
357
+ - Use Tokens Studio’s import-from-variables flow to bring the current Variables state into the token sets.
358
+
359
+ 4. **Export to file/folder**
360
+ - Export using **Multiple files**.
361
+
362
+ 5. **Copy the exported files into this repo**
363
+ - Place them under [`src/tokens/figma-reference-tokens-studio/`](src/tokens/figma-reference-tokens-studio:1) (replace existing contents).
364
+
365
+ 6. **Regenerate the code tokens**
366
+ - Run:
367
+
368
+ ```bash
369
+ node ./scripts/figma-sync.js
370
+ ```
371
+
372
+ 7. **Review and commit**
373
+ - Inspect the diff in the generated files and validate light/dark semantics before committing.
374
+
375
+ Files affected by the script:
376
+
377
+ - [`src/tokens/primitives/colors.js`](src/tokens/primitives/colors.js)
378
+ - [`src/tokens/primitives/brand.js`](src/tokens/primitives/brand.js)
379
+ - [`src/tokens/semantic/text.js`](src/tokens/semantic/text.js)
380
+ - [`src/tokens/semantic/backgrounds.js`](src/tokens/semantic/backgrounds.js)
381
+ - [`src/tokens/semantic/borders.js`](src/tokens/semantic/borders.js)
382
+
383
+ ### 🧰 Manual Maintenance (Without Script)
384
+
385
+ When updating or adding tokens manually, edit the files below depending on the token type:
386
+
387
+ - **Primitive palettes:** [`src/tokens/primitives/colors.js`](src/tokens/primitives/colors.js)
388
+ - **Brand + surface primitives:** [`src/tokens/primitives/brand.js`](src/tokens/primitives/brand.js)
389
+ - **Semantic text (light/dark):** [`src/tokens/semantic/text.js`](src/tokens/semantic/text.js)
390
+ - **Semantic backgrounds (light/dark):** [`src/tokens/semantic/backgrounds.js`](src/tokens/semantic/backgrounds.js)
391
+ - **Semantic borders (light/dark):** [`src/tokens/semantic/borders.js`](src/tokens/semantic/borders.js)
392
+ - **Brand aliases:** [`src/tokens/colors-brand.js`](src/tokens/colors-brand.js)
393
+ - **Tailwind mappings (class names):** [`src/tokens/build/preset.js`](src/tokens/build/preset.js)
394
+ - **CSS vars output/selectors:** [`src/tokens/build/css-vars.js`](src/tokens/build/css-vars.js)
395
+
396
+ Checklist when adding a new token manually:
397
+
398
+ 1. Add/update the primitive or surface scale value (if needed).
399
+ 2. Add matching semantic entries for both `light` and `dark`.
400
+ 3. Update Tailwind mappings if you want a class for the token.
401
+ 4. Regenerate or verify CSS vars output for both themes.
402
+
403
+ ### 🎨 Available Colors
404
+
405
+ #### Main Palette (Orange)
406
+
407
+ - `orange-50` → `orange-950`
408
+ - **Primary**: `orange-500` (#fe601f)
409
+
410
+ #### Brand Palette
411
+
412
+ - `brand-black` (#0a0a0a)
413
+ - `brand-white` (#fafafa)
414
+ - `brand-dark-gray` (#171717)
415
+ - `brand-medium-gray` (#737373)
416
+
417
+ #### Other Complete Palettes
418
+
419
+ - **Violet, Slate, Gray, Neutral, Blue, Red, Yellow, Green**
420
+ - All with 11 shades (50 → 950)
421
+
422
+ #### Semantic Colors
423
+
424
+ - `primary` (orange-500)
425
+ - `success` (green-500)
426
+ - `warning` (yellow-500)
427
+ - `error` (red-500)
428
+ - `info` (blue-500)
429
+
430
+ ### ⚠️ Troubleshooting
431
+
432
+ #### If you get import errors:
433
+
434
+ **ES Modules (recommended)**
435
+
436
+ ```javascript
437
+ import colors from 'azion-theme/tokens'
438
+ ```
439
+
440
+ **Named exports**
441
+
442
+ ```javascript
443
+ import { primitives, brandColors, brandPrimitives, surfacePrimitives } from 'azion-theme/tokens'
444
+ ```
445
+
446
+ **Direct file imports**
447
+
448
+ ```javascript
449
+ import { primitives } from 'azion-theme/tokens/primitives/colors.js'
450
+ import { brandColors } from 'azion-theme/tokens/colors-brand.js'
451
+ ```
452
+
453
+ **Configure Vite (if using Vite)**
454
+ Add to your `vite.config.js`:
455
+
456
+ ```javascript
457
+ export default {
458
+ resolve: {
459
+ conditions: ['import', 'module', 'browser', 'default']
460
+ }
461
+ }
462
+ ```
463
+
464
+ ## 🔗 Links
465
+
466
+ - [Figma Global Tokens](https://www.figma.com/design/t97pXRs7xME3SJDs5iZ5RF/Global-Tokens?node-id=0-1)
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@aziontech/theme",
3
+ "type": "module",
4
+ "version": "0.1.0",
5
+ "author": "aziontech",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/aziontech/webkit.git",
10
+ "directory": "packages/theme"
11
+ },
12
+ "scripts": {
13
+ "publish": "cd dist && npm publish && cd ..",
14
+ "pack:dry": "cd dist && npm pack --dry-run && cd ..",
15
+ "format": "prettier --write scripts/ src/"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "keywords": [
21
+ "design-tokens",
22
+ "theme",
23
+ "css",
24
+ "css-vars",
25
+ "tailwind-css",
26
+ "branding",
27
+ "ui-kit",
28
+ "token-generator"
29
+ ],
30
+ "devDependencies": {
31
+ "tailwindcss": "^3.4.17",
32
+ "@semantic-release/changelog": "^6.0.3",
33
+ "@semantic-release/commit-analyzer": "^10.0.1",
34
+ "@semantic-release/exec": "^6.0.3",
35
+ "@semantic-release/git": "^10.0.1",
36
+ "@semantic-release/github": "^9.2.6",
37
+ "@semantic-release/npm": "^11.0.0",
38
+ "@semantic-release/release-notes-generator": "^12.1.0",
39
+ "conventional-changelog-conventionalcommits": "^7.0.0",
40
+ "semantic-release": "^23.0.0"
41
+ },
42
+ "files": [
43
+ "src/",
44
+ "LICENSE"
45
+ ],
46
+ "main": "./default.js",
47
+ "exports": {
48
+ ".": "./default.js",
49
+ "./widget": "./widget.js",
50
+ "./tokens": "./src/tokens/index.js"
51
+ }
52
+ }
@@ -0,0 +1,3 @@
1
+ @import './custom/selection';
2
+ @import './custom/special-button';
3
+ @import './custom/code'
@@ -0,0 +1,37 @@
1
+ @layer primevue {
2
+ @import './extended-components/autocomplete';
3
+ @import './extended-components/button';
4
+ @import './extended-components/splitbutton';
5
+ @import './extended-components/selectbutton';
6
+ @import './extended-components/tabview';
7
+ @import './extended-components/tabmenu';
8
+ @import './extended-components/divider';
9
+ @import './extended-components/dropdownitem';
10
+ @import './extended-components/inlinemessage';
11
+ @import './extended-components/breadcumb';
12
+ @import './extended-components/sidebar';
13
+ @import './extended-components/tooltip';
14
+ @import './extended-components/datatable';
15
+ @import './extended-components/inputpassword';
16
+ @import './extended-components/toast';
17
+ @import './extended-components/inputswitch';
18
+ @import './extended-components/radiobutton';
19
+ @import './extended-components/checkbox';
20
+ @import './extended-components/tag';
21
+ @import './extended-components/markdown';
22
+ @import './extended-components/listbox';
23
+ @import './extended-components/inputnumber';
24
+ @import './extended-components/calendar';
25
+ @import './extended-components/badge';
26
+ @import './extended-components/menuitem';
27
+ @import './extended-components/progressbar';
28
+ @import './extended-components/dialog';
29
+ @import './extended-components/multiselect';
30
+ @import './extended-components/carousel';
31
+ @import './extended-components/dropdown';
32
+ @import './extended-components/treeselect';
33
+ @import './extended-components/jsonform/_select';
34
+ @import './extended-components/jsonform/_inputtext';
35
+ @import './extended-components/jsonform/_inputcheckbox';
36
+ @import './extended-components/jsonform/_label';
37
+ }