@octaviaflow/themes 1.0.1

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 (46) hide show
  1. package/README.md +122 -0
  2. package/docs/sass.md +189 -0
  3. package/index.scss +11 -0
  4. package/lib/index.js +5634 -0
  5. package/package.json +49 -0
  6. package/scss/_component-tokens.scss +10 -0
  7. package/scss/_config.scss +11 -0
  8. package/scss/_theme.scss +120 -0
  9. package/scss/_themes.scss +8 -0
  10. package/scss/_tokens.scss +8 -0
  11. package/scss/_utilities.scss +18 -0
  12. package/scss/compat/_themes.scss +8 -0
  13. package/scss/compat/_tokens.scss +8 -0
  14. package/scss/compat/generated/_themes.scss +271 -0
  15. package/scss/compat/generated/_tokens.scss +206 -0
  16. package/src/component-tokens/button/index.js +10 -0
  17. package/src/component-tokens/button/tokens.js +132 -0
  18. package/src/component-tokens/notification/index.js +10 -0
  19. package/src/component-tokens/notification/tokens.js +107 -0
  20. package/src/component-tokens/tag/index.js +10 -0
  21. package/src/component-tokens/tag/tokens.js +362 -0
  22. package/src/g10.js +346 -0
  23. package/src/g100.js +349 -0
  24. package/src/g90.js +350 -0
  25. package/src/index.js +42 -0
  26. package/src/tokens/Token.js +37 -0
  27. package/src/tokens/TokenFormat.js +91 -0
  28. package/src/tokens/TokenGroup.js +164 -0
  29. package/src/tokens/TokenSet.js +80 -0
  30. package/src/tokens/components.js +97 -0
  31. package/src/tokens/index.js +71 -0
  32. package/src/tokens/layout.js +42 -0
  33. package/src/tokens/type.js +52 -0
  34. package/src/tokens/v10.js +191 -0
  35. package/src/tokens/v11TokenGroup.js +436 -0
  36. package/src/tokens/v11TokenSet.js +94 -0
  37. package/src/tools.js +80 -0
  38. package/src/v10/g10.js +352 -0
  39. package/src/v10/g100.js +351 -0
  40. package/src/v10/g90.js +353 -0
  41. package/src/v10/index.js +25 -0
  42. package/src/v10/metadata.yml +217 -0
  43. package/src/v10/tokens.js +400 -0
  44. package/src/v10/white.js +355 -0
  45. package/src/white.js +349 -0
  46. package/telemetry.yml +17 -0
@@ -0,0 +1,217 @@
1
+ tokens:
2
+ - name: interactive01
3
+ role:
4
+ - Primary interactive color
5
+ - Primary buttons
6
+ - name: interactive02
7
+ role:
8
+ - Secondary interactive color
9
+ - Secondary button
10
+ - name: interactive03
11
+ role:
12
+ - 4.5:1 AA contrast
13
+ - Tertiary button
14
+ - name: interactive04
15
+ role:
16
+ - 3:1 AA contrast
17
+ - Selected elements
18
+ - Active elements
19
+ - Accent icons
20
+ - name: uiBackground
21
+ role:
22
+ - Default page background
23
+ - name: ui01
24
+ role:
25
+ - Primary container background
26
+ - Secondary page background
27
+ - name: ui02
28
+ role:
29
+ - Primary page background
30
+ - Secondary container background
31
+ - name: ui03
32
+ role:
33
+ - Subtle border
34
+ - Tertiary background color
35
+ - name: ui04
36
+ role:
37
+ - 3:1 AA element contrast
38
+ - Medium contrast border
39
+ - name: ui05
40
+ role:
41
+ - 4.5:1 AA element contrast
42
+ - High contrast border
43
+ - Emphasis elements
44
+ - name: text01
45
+ role:
46
+ - Primary text
47
+ - Body copy
48
+ - Headers
49
+ - Hover text color for text02
50
+ - name: text02
51
+ role:
52
+ - Secondary text
53
+ - Input labels
54
+ - Help text
55
+ - name: text03
56
+ role:
57
+ - Placeholder text
58
+ - name: text04
59
+ role:
60
+ - Text on interactive colors
61
+ - name: icon01
62
+ role:
63
+ - Primary icons
64
+ - name: icon02
65
+ role:
66
+ - Secondary icons
67
+ - name: icon03
68
+ role:
69
+ - Tertiary icons
70
+ - Icons on interactive colors
71
+ - Icons on non-ui colors
72
+ - name: link01
73
+ role:
74
+ - Primary links
75
+ - Ghost button
76
+ - name: link02
77
+ role:
78
+ - Secondary link color for lower contrast backgrounds
79
+ - name: field01
80
+ role:
81
+ - Default input fields
82
+ - Field color on $ui-backgrounds
83
+ - name: field02
84
+ role:
85
+ - Input field color on ui02 backgrounds
86
+
87
+ - name: inverse01
88
+ role:
89
+ - Inverse text color
90
+ - Inverse icon color
91
+ - name: inverse02
92
+ role:
93
+ - High contrast backgrounds
94
+ - High contrast elements
95
+ - name: support01
96
+ role:
97
+ - Error
98
+ - name: support02
99
+ role:
100
+ - Success
101
+ - name: support03
102
+ role:
103
+ - Warning
104
+ - name: support04
105
+ role:
106
+ - Information
107
+ - name: inverseSupport01
108
+ role:
109
+ - Error on high contrast backgrounds
110
+ - name: inverseSupport02
111
+ role:
112
+ - Success on high contrast backgrounds
113
+ - name: inverseSupport03
114
+ role:
115
+ - Warning on high contrast backgrounds
116
+ - name: inverseSupport04
117
+ role:
118
+ - Information on high contrast backgrounds
119
+ - name: overlay01
120
+ role:
121
+ - Background overlay
122
+ - name: focus
123
+ role:
124
+ - Focus border
125
+ - Focus underline
126
+ - name: hoverPrimary
127
+ role:
128
+ - interactive01 hover
129
+ - name: activePrimary
130
+ role:
131
+ - interactive01 active
132
+ - name: hoverPrimaryText
133
+ role:
134
+ - interactive01 text hover
135
+ - name: hoverSecondary
136
+ role:
137
+ - interactive02 hover
138
+ - name: activeSecondary
139
+ role:
140
+ - interactive02 active
141
+ - inverse01 active
142
+ - name: hoverTertiary
143
+ role:
144
+ - interactive03 hover
145
+ - inverse01 hover
146
+ - name: activeTertiary
147
+ role:
148
+ - interactive03 active
149
+ - name: hoverUI
150
+ role:
151
+ - ui01 hover
152
+ - ui02 hover
153
+ - Transparent background hover
154
+ - name: activeUI
155
+ role:
156
+ - ui01 active
157
+ - ui02 active
158
+ - name: selectedUI
159
+ role:
160
+ - Selected UI elements
161
+ - name: hoverSelectedUI
162
+ role:
163
+ - Data table selected row hover
164
+ - name: hoverDanger
165
+ role:
166
+ - Danger hover
167
+ - support01 hover
168
+ - name: activeDanger
169
+ role:
170
+ - Danger active
171
+ - support01 active
172
+ - name: hoverRow
173
+ role:
174
+ - Row hover
175
+ - name: visitedLink
176
+ role:
177
+ - Visited links
178
+ - name: disabled01
179
+ role:
180
+ - Disabled fields
181
+ - Disabled backgrounds
182
+ - Disabled border
183
+ - name: disabled02
184
+ role:
185
+ - Disabled elements on disabled01
186
+ - Disabled label
187
+ - Disabled text on disabled01
188
+ - Disabled icons
189
+ - Disabled border
190
+ - name: disabled03
191
+ role:
192
+ - Disabled text on disabled02
193
+ - Disabled icons on disabled02
194
+ - name: highlight
195
+ role:
196
+ - interactive01 high light
197
+ - name: skeleton01
198
+ role:
199
+ - Skeleton state of graphics
200
+ - name: skeleton02
201
+ role:
202
+ - Skeleton state of text
203
+ - name: brand01
204
+ alias: interactive01
205
+ deprecated: true
206
+ - name: brand02
207
+ alias: interactive02
208
+ deprecated: true
209
+ - name: brand03
210
+ alias: interactive03
211
+ deprecated: true
212
+ - name: active01
213
+ alias: activeUI
214
+ deprecated: true
215
+ - name: hoverField
216
+ alias: hoverUI
217
+ deprecated: true
@@ -0,0 +1,400 @@
1
+ /**
2
+ * Copyright OctaviaFlow
3
+ * Author: Vishal Kumar
4
+ * Created: 11/November/2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+
11
+ import { unstable_tokens as type } from '@octaviaflow/type';
12
+ import { unstable_tokens as layout } from '@octaviaflow/layout';
13
+
14
+ // The color token names for a Carbon theme, value corresponds to what they're
15
+ // exported as in JavaScript
16
+ const colors = [
17
+ // Core
18
+ 'interactive01',
19
+ 'interactive02',
20
+ 'interactive03',
21
+ 'interactive04',
22
+
23
+ 'uiBackground',
24
+
25
+ 'ui01',
26
+ 'ui02',
27
+ 'ui03',
28
+ 'ui04',
29
+ 'ui05',
30
+
31
+ 'text01',
32
+ 'text02',
33
+ 'text03',
34
+ 'text04',
35
+ 'text05',
36
+ 'textError',
37
+
38
+ 'icon01',
39
+ 'icon02',
40
+ 'icon03',
41
+
42
+ 'link01',
43
+ 'link02',
44
+
45
+ 'inverseLink',
46
+
47
+ 'field01',
48
+ 'field02',
49
+
50
+ 'inverse01',
51
+ 'inverse02',
52
+
53
+ 'support01',
54
+ 'support02',
55
+ 'support03',
56
+ 'support04',
57
+
58
+ 'inverseSupport01',
59
+ 'inverseSupport02',
60
+ 'inverseSupport03',
61
+ 'inverseSupport04',
62
+
63
+ 'overlay01',
64
+
65
+ 'danger01',
66
+ 'danger02',
67
+
68
+ // Interactive states
69
+ 'focus',
70
+ 'inverseFocusUi',
71
+
72
+ 'hoverPrimary',
73
+ 'activePrimary',
74
+ 'hoverPrimaryText',
75
+
76
+ 'hoverSecondary',
77
+ 'activeSecondary',
78
+
79
+ 'hoverTertiary',
80
+ 'activeTertiary',
81
+
82
+ 'hoverUI',
83
+ 'hoverLightUI',
84
+ 'hoverSelectedUI',
85
+ 'activeUI',
86
+ 'activeLightUI',
87
+ 'selectedUI',
88
+ 'selectedLightUI',
89
+ 'inverseHoverUI',
90
+
91
+ 'hoverDanger',
92
+ 'activeDanger',
93
+
94
+ 'hoverRow',
95
+
96
+ 'visitedLink',
97
+
98
+ 'disabled01',
99
+ 'disabled02',
100
+ 'disabled03',
101
+
102
+ 'highlight',
103
+
104
+ 'decorative01',
105
+
106
+ 'buttonSeparator',
107
+
108
+ 'skeleton01',
109
+ 'skeleton02',
110
+
111
+ // New color tokens
112
+ // TO-DO: remove fallback color when v11 is released and assign carbon colors to new tokens
113
+ 'background',
114
+ 'layer',
115
+ 'layerAccent',
116
+ 'layerAccentHover',
117
+ 'layerAccentActive',
118
+ 'field',
119
+ 'backgroundInverse',
120
+ 'backgroundBrand',
121
+ 'interactive',
122
+
123
+ 'borderSubtle',
124
+ 'borderStrong',
125
+ 'borderInverse',
126
+ 'borderInteractive',
127
+
128
+ 'textPrimary',
129
+ 'textSecondary',
130
+ 'textPlaceholder',
131
+ 'textHelper',
132
+ 'textOnColor',
133
+ 'textInverse',
134
+
135
+ 'linkPrimary',
136
+ 'linkSecondary',
137
+ 'linkVisited',
138
+ 'linkInverse',
139
+
140
+ 'iconPrimary',
141
+ 'iconSecondary',
142
+ 'iconOnColor',
143
+ 'iconInverse',
144
+
145
+ 'supportError',
146
+ 'supportSuccess',
147
+ 'supportWarning',
148
+ 'supportInfo',
149
+ 'supportErrorInverse',
150
+ 'supportSuccessInverse',
151
+ 'supportWarningInverse',
152
+ 'supportInfoInverse',
153
+
154
+ 'overlay',
155
+ 'toggleOff',
156
+ 'shadow',
157
+
158
+ 'buttonPrimary',
159
+ 'buttonSecondary',
160
+ 'buttonTertiary',
161
+ 'buttonDangerPrimary',
162
+ 'buttonDangerSecondary',
163
+
164
+ 'backgroundActive',
165
+ 'layerActive',
166
+
167
+ 'buttonDangerActive',
168
+ 'buttonPrimaryActive',
169
+ 'buttonSecondaryActive',
170
+ 'buttonTertiaryActive',
171
+
172
+ 'focusInset',
173
+ 'focusInverse',
174
+
175
+ 'backgroundHover',
176
+ 'layerHover',
177
+ 'fieldHover',
178
+ 'backgroundInverseHover',
179
+ 'linkPrimaryHover',
180
+ 'buttonDangerHover',
181
+ 'buttonPrimaryHover',
182
+ 'buttonSecondaryHover',
183
+ 'buttonTertiaryHover',
184
+
185
+ 'backgroundSelected',
186
+ 'backgroundSelectedHover',
187
+ 'layerSelected',
188
+ 'layerSelectedHover',
189
+ 'layerSelectedInverse',
190
+ 'borderSubtleSelected',
191
+
192
+ 'borderDisabled',
193
+
194
+ 'textDisabled',
195
+ 'buttonDisabled',
196
+ 'iconDisabled',
197
+
198
+ 'textOnColorDisabled',
199
+ 'iconOnColorDisabled',
200
+ 'layerSelectedDisabled',
201
+
202
+ 'skeletonBackground',
203
+ 'skeletonElement',
204
+
205
+ // Deprecated
206
+ 'brand01',
207
+ 'brand02',
208
+ 'brand03',
209
+ 'active01',
210
+ 'hoverField',
211
+ 'danger',
212
+ ];
213
+
214
+ export const tokens = {
215
+ colors,
216
+ type,
217
+ layout,
218
+ };
219
+
220
+ export const unstable__meta = {
221
+ colors: [
222
+ {
223
+ type: 'core',
224
+ tokens: [
225
+ 'uiBackground',
226
+ 'interactive01',
227
+ 'interactive02',
228
+ 'interactive03',
229
+ 'interactive04',
230
+ 'brand01',
231
+ 'brand02',
232
+ 'brand03',
233
+ 'danger',
234
+ 'danger01',
235
+ 'danger02',
236
+ 'ui01',
237
+ 'ui02',
238
+ 'ui03',
239
+ 'ui04',
240
+ 'ui05',
241
+ 'text01',
242
+ 'text02',
243
+ 'text03',
244
+ 'text04',
245
+ 'text05',
246
+ 'textError',
247
+ 'link01',
248
+ 'link02',
249
+ 'icon01',
250
+ 'icon02',
251
+ 'icon03',
252
+ 'field01',
253
+ 'field02',
254
+ 'inverse01',
255
+ 'inverse02',
256
+ 'inverseLink',
257
+ 'support01',
258
+ 'support02',
259
+ 'support03',
260
+ 'support04',
261
+ 'inverseSupport01',
262
+ 'inverseSupport02',
263
+ 'inverseSupport03',
264
+ 'inverseSupport04',
265
+ 'overlay01',
266
+
267
+ //new tokens
268
+ 'background',
269
+ 'layer',
270
+ 'layerAccent',
271
+ 'layerAccentHover',
272
+ 'layerAccentActive',
273
+ 'field',
274
+ 'backgroundInverse',
275
+ 'backgroundBrand',
276
+ 'interactive',
277
+
278
+ 'borderSubtle',
279
+ 'borderStrong',
280
+ 'borderInverse',
281
+ 'borderInteractive',
282
+
283
+ 'textPrimary',
284
+ 'textSecondary',
285
+ 'textPlaceholder',
286
+ 'textHelper',
287
+ 'textOnColor',
288
+ 'textInverse',
289
+
290
+ 'linkPrimary',
291
+ 'linkSecondary',
292
+ 'linkVisited',
293
+ 'linkInverse',
294
+
295
+ 'iconPrimary',
296
+ 'iconSecondary',
297
+ 'iconOnColor',
298
+ 'iconInverse',
299
+
300
+ 'supportError',
301
+ 'supportSuccess',
302
+ 'supportWarning',
303
+ 'supportInfo',
304
+ 'supportErrorInverse',
305
+ 'supportSuccessInverse',
306
+ 'supportWarningInverse',
307
+ 'supportInfoInverse',
308
+
309
+ 'overlay',
310
+ 'toggleOff',
311
+ 'shadow',
312
+
313
+ 'buttonPrimary',
314
+ 'buttonSecondary',
315
+ 'buttonTertiary',
316
+ 'buttonDangerPrimary',
317
+ 'buttonDangerSecondary',
318
+ ],
319
+ },
320
+ {
321
+ type: 'interactive',
322
+ tokens: [
323
+ 'focus',
324
+ 'inverseFocusUi',
325
+ 'hoverPrimary',
326
+ 'hoverPrimaryText',
327
+ 'hoverSecondary',
328
+ 'hoverTertiary',
329
+ 'hoverUI',
330
+ 'hoverLightUI',
331
+ 'hoverSelectedUI',
332
+ 'hoverDanger',
333
+ 'hoverRow',
334
+ 'activePrimary',
335
+ 'activeSecondary',
336
+ 'activeTertiary',
337
+ 'activeUI',
338
+ 'activeLightUI',
339
+ 'activeDanger',
340
+ 'selectedUI',
341
+ 'selectedLightUI',
342
+ 'highlight',
343
+ 'skeleton01',
344
+ 'skeleton02',
345
+ 'visitedLink',
346
+ 'disabled01',
347
+ 'disabled02',
348
+ 'disabled03',
349
+ 'inverseHoverUI',
350
+ 'active01',
351
+ 'hoverField',
352
+ 'decorative01',
353
+ 'buttonSeparator',
354
+
355
+ // new tokens
356
+ 'backgroundActive',
357
+ 'layerActive',
358
+
359
+ 'buttonDangerActive',
360
+ 'buttonPrimaryActive',
361
+ 'buttonSecondaryActive',
362
+ 'buttonTertiaryActive',
363
+
364
+ 'focusInset',
365
+ 'focusInverse',
366
+
367
+ 'backgroundHover',
368
+ 'layerHover',
369
+ 'fieldHover',
370
+ 'backgroundInverseHover',
371
+ 'linkPrimaryHover',
372
+ 'buttonDangerHover',
373
+ 'buttonPrimaryHover',
374
+ 'buttonSecondaryHover',
375
+ 'buttonTertiaryHover',
376
+
377
+ 'backgroundSelected',
378
+ 'backgroundSelectedHover',
379
+ 'layerSelected',
380
+ 'layerSelectedHover',
381
+ 'layerSelectedInverse',
382
+ 'borderSubtleSelected',
383
+
384
+ 'borderDisabled',
385
+
386
+ 'textDisabled',
387
+ 'buttonDisabled',
388
+ 'iconDisabled',
389
+
390
+ 'textOnColorDisabled',
391
+ 'iconOnColorDisabled',
392
+ 'layerSelectedDisabled',
393
+
394
+ 'skeletonBackground',
395
+ 'skeletonElement',
396
+ ],
397
+ },
398
+ ],
399
+ deprecated: ['brand01', 'brand02', 'brand03', 'active01', 'danger'],
400
+ };