@octaviaflow/themes 1.0.1 → 2.0.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.
@@ -0,0 +1,443 @@
1
+ // Code generated by @octaviaflow/themes. DO NOT EDIT.
2
+ //
3
+ // Copyright OctaviaFlow. 2025
4
+ //
5
+ // This source code is licensed under the Apache-2.0 license found in the
6
+ // LICENSE file in the root directory of this source tree.
7
+ //
8
+
9
+ @use 'sass:map';
10
+ @use '../config';
11
+ @use '../theme';
12
+
13
+ /// Internal helper for generating CSS Custom Properties
14
+ @function _get($token) {
15
+ @if config.$use-fallback-value == false {
16
+ @return var(--#{config.$prefix}-#{$token});
17
+ } @else {
18
+ @return var(--#{config.$prefix}-#{$token}, #{theme.get($token)});
19
+ }
20
+ }
21
+
22
+ /// The CSS Custom Property for the `background` token
23
+ $background: _get('background') !default;
24
+
25
+ /// The CSS Custom Property for the `background-active` token
26
+ $background-active: _get('background-active') !default;
27
+
28
+ /// The CSS Custom Property for the `background-selected` token
29
+ $background-selected: _get('background-selected') !default;
30
+
31
+ /// The CSS Custom Property for the `background-selected-hover` token
32
+ $background-selected-hover: _get('background-selected-hover') !default;
33
+
34
+ /// The CSS Custom Property for the `background-hover` token
35
+ $background-hover: _get('background-hover') !default;
36
+
37
+ /// The CSS Custom Property for the `background-brand` token
38
+ $background-brand: _get('background-brand') !default;
39
+
40
+ /// The CSS Custom Property for the `background-inverse` token
41
+ $background-inverse: _get('background-inverse') !default;
42
+
43
+ /// The CSS Custom Property for the `background-inverse-hover` token
44
+ $background-inverse-hover: _get('background-inverse-hover') !default;
45
+
46
+ /// The CSS Custom Property for the `layer-01` token
47
+ $layer-01: _get('layer-01') !default;
48
+
49
+ /// The CSS Custom Property for the `layer-active-01` token
50
+ $layer-active-01: _get('layer-active-01') !default;
51
+
52
+ /// The CSS Custom Property for the `layer-hover-01` token
53
+ $layer-hover-01: _get('layer-hover-01') !default;
54
+
55
+ /// The CSS Custom Property for the `layer-selected-01` token
56
+ $layer-selected-01: _get('layer-selected-01') !default;
57
+
58
+ /// The CSS Custom Property for the `layer-selected-hover-01` token
59
+ $layer-selected-hover-01: _get('layer-selected-hover-01') !default;
60
+
61
+ /// The CSS Custom Property for the `layer-02` token
62
+ $layer-02: _get('layer-02') !default;
63
+
64
+ /// The CSS Custom Property for the `layer-active-02` token
65
+ $layer-active-02: _get('layer-active-02') !default;
66
+
67
+ /// The CSS Custom Property for the `layer-hover-02` token
68
+ $layer-hover-02: _get('layer-hover-02') !default;
69
+
70
+ /// The CSS Custom Property for the `layer-selected-02` token
71
+ $layer-selected-02: _get('layer-selected-02') !default;
72
+
73
+ /// The CSS Custom Property for the `layer-selected-hover-02` token
74
+ $layer-selected-hover-02: _get('layer-selected-hover-02') !default;
75
+
76
+ /// The CSS Custom Property for the `layer-03` token
77
+ $layer-03: _get('layer-03') !default;
78
+
79
+ /// The CSS Custom Property for the `layer-active-03` token
80
+ $layer-active-03: _get('layer-active-03') !default;
81
+
82
+ /// The CSS Custom Property for the `layer-hover-03` token
83
+ $layer-hover-03: _get('layer-hover-03') !default;
84
+
85
+ /// The CSS Custom Property for the `layer-selected-03` token
86
+ $layer-selected-03: _get('layer-selected-03') !default;
87
+
88
+ /// The CSS Custom Property for the `layer-selected-hover-03` token
89
+ $layer-selected-hover-03: _get('layer-selected-hover-03') !default;
90
+
91
+ /// The CSS Custom Property for the `layer-selected-inverse` token
92
+ $layer-selected-inverse: _get('layer-selected-inverse') !default;
93
+
94
+ /// The CSS Custom Property for the `layer-selected-disabled` token
95
+ $layer-selected-disabled: _get('layer-selected-disabled') !default;
96
+
97
+ /// The CSS Custom Property for the `layer-accent-01` token
98
+ $layer-accent-01: _get('layer-accent-01') !default;
99
+
100
+ /// The CSS Custom Property for the `layer-accent-active-01` token
101
+ $layer-accent-active-01: _get('layer-accent-active-01') !default;
102
+
103
+ /// The CSS Custom Property for the `layer-accent-hover-01` token
104
+ $layer-accent-hover-01: _get('layer-accent-hover-01') !default;
105
+
106
+ /// The CSS Custom Property for the `layer-accent-02` token
107
+ $layer-accent-02: _get('layer-accent-02') !default;
108
+
109
+ /// The CSS Custom Property for the `layer-accent-active-02` token
110
+ $layer-accent-active-02: _get('layer-accent-active-02') !default;
111
+
112
+ /// The CSS Custom Property for the `layer-accent-hover-02` token
113
+ $layer-accent-hover-02: _get('layer-accent-hover-02') !default;
114
+
115
+ /// The CSS Custom Property for the `layer-accent-03` token
116
+ $layer-accent-03: _get('layer-accent-03') !default;
117
+
118
+ /// The CSS Custom Property for the `layer-accent-active-03` token
119
+ $layer-accent-active-03: _get('layer-accent-active-03') !default;
120
+
121
+ /// The CSS Custom Property for the `layer-accent-hover-03` token
122
+ $layer-accent-hover-03: _get('layer-accent-hover-03') !default;
123
+
124
+ /// The CSS Custom Property for the `field-01` token
125
+ $field-01: _get('field-01') !default;
126
+
127
+ /// The CSS Custom Property for the `field-hover-01` token
128
+ $field-hover-01: _get('field-hover-01') !default;
129
+
130
+ /// The CSS Custom Property for the `field-02` token
131
+ $field-02: _get('field-02') !default;
132
+
133
+ /// The CSS Custom Property for the `field-hover-02` token
134
+ $field-hover-02: _get('field-hover-02') !default;
135
+
136
+ /// The CSS Custom Property for the `field-03` token
137
+ $field-03: _get('field-03') !default;
138
+
139
+ /// The CSS Custom Property for the `field-hover-03` token
140
+ $field-hover-03: _get('field-hover-03') !default;
141
+
142
+ /// The CSS Custom Property for the `interactive` token
143
+ $interactive: _get('interactive') !default;
144
+
145
+ /// The CSS Custom Property for the `border-subtle-00` token
146
+ $border-subtle-00: _get('border-subtle-00') !default;
147
+
148
+ /// The CSS Custom Property for the `border-subtle-01` token
149
+ $border-subtle-01: _get('border-subtle-01') !default;
150
+
151
+ /// The CSS Custom Property for the `border-subtle-selected-01` token
152
+ $border-subtle-selected-01: _get('border-subtle-selected-01') !default;
153
+
154
+ /// The CSS Custom Property for the `border-subtle-02` token
155
+ $border-subtle-02: _get('border-subtle-02') !default;
156
+
157
+ /// The CSS Custom Property for the `border-subtle-selected-02` token
158
+ $border-subtle-selected-02: _get('border-subtle-selected-02') !default;
159
+
160
+ /// The CSS Custom Property for the `border-subtle-03` token
161
+ $border-subtle-03: _get('border-subtle-03') !default;
162
+
163
+ /// The CSS Custom Property for the `border-subtle-selected-03` token
164
+ $border-subtle-selected-03: _get('border-subtle-selected-03') !default;
165
+
166
+ /// The CSS Custom Property for the `border-strong-01` token
167
+ $border-strong-01: _get('border-strong-01') !default;
168
+
169
+ /// The CSS Custom Property for the `border-strong-02` token
170
+ $border-strong-02: _get('border-strong-02') !default;
171
+
172
+ /// The CSS Custom Property for the `border-strong-03` token
173
+ $border-strong-03: _get('border-strong-03') !default;
174
+
175
+ /// The CSS Custom Property for the `border-tile-01` token
176
+ $border-tile-01: _get('border-tile-01') !default;
177
+
178
+ /// The CSS Custom Property for the `border-tile-02` token
179
+ $border-tile-02: _get('border-tile-02') !default;
180
+
181
+ /// The CSS Custom Property for the `border-tile-03` token
182
+ $border-tile-03: _get('border-tile-03') !default;
183
+
184
+ /// The CSS Custom Property for the `border-inverse` token
185
+ $border-inverse: _get('border-inverse') !default;
186
+
187
+ /// The CSS Custom Property for the `border-interactive` token
188
+ $border-interactive: _get('border-interactive') !default;
189
+
190
+ /// The CSS Custom Property for the `border-disabled` token
191
+ $border-disabled: _get('border-disabled') !default;
192
+
193
+ /// The CSS Custom Property for the `text-primary` token
194
+ $text-primary: _get('text-primary') !default;
195
+
196
+ /// The CSS Custom Property for the `text-secondary` token
197
+ $text-secondary: _get('text-secondary') !default;
198
+
199
+ /// The CSS Custom Property for the `text-placeholder` token
200
+ $text-placeholder: _get('text-placeholder') !default;
201
+
202
+ /// The CSS Custom Property for the `text-helper` token
203
+ $text-helper: _get('text-helper') !default;
204
+
205
+ /// The CSS Custom Property for the `text-error` token
206
+ $text-error: _get('text-error') !default;
207
+
208
+ /// The CSS Custom Property for the `text-inverse` token
209
+ $text-inverse: _get('text-inverse') !default;
210
+
211
+ /// The CSS Custom Property for the `text-on-color` token
212
+ $text-on-color: _get('text-on-color') !default;
213
+
214
+ /// The CSS Custom Property for the `text-on-color-disabled` token
215
+ $text-on-color-disabled: _get('text-on-color-disabled') !default;
216
+
217
+ /// The CSS Custom Property for the `text-disabled` token
218
+ $text-disabled: _get('text-disabled') !default;
219
+
220
+ /// The CSS Custom Property for the `link-primary` token
221
+ $link-primary: _get('link-primary') !default;
222
+
223
+ /// The CSS Custom Property for the `link-primary-hover` token
224
+ $link-primary-hover: _get('link-primary-hover') !default;
225
+
226
+ /// The CSS Custom Property for the `link-secondary` token
227
+ $link-secondary: _get('link-secondary') !default;
228
+
229
+ /// The CSS Custom Property for the `link-inverse-visited` token
230
+ $link-inverse-visited: _get('link-inverse-visited') !default;
231
+
232
+ /// The CSS Custom Property for the `link-visited` token
233
+ $link-visited: _get('link-visited') !default;
234
+
235
+ /// The CSS Custom Property for the `link-inverse` token
236
+ $link-inverse: _get('link-inverse') !default;
237
+
238
+ /// The CSS Custom Property for the `link-inverse-active` token
239
+ $link-inverse-active: _get('link-inverse-active') !default;
240
+
241
+ /// The CSS Custom Property for the `link-inverse-hover` token
242
+ $link-inverse-hover: _get('link-inverse-hover') !default;
243
+
244
+ /// The CSS Custom Property for the `icon-primary` token
245
+ $icon-primary: _get('icon-primary') !default;
246
+
247
+ /// The CSS Custom Property for the `icon-secondary` token
248
+ $icon-secondary: _get('icon-secondary') !default;
249
+
250
+ /// The CSS Custom Property for the `icon-inverse` token
251
+ $icon-inverse: _get('icon-inverse') !default;
252
+
253
+ /// The CSS Custom Property for the `icon-on-color` token
254
+ $icon-on-color: _get('icon-on-color') !default;
255
+
256
+ /// The CSS Custom Property for the `icon-on-color-disabled` token
257
+ $icon-on-color-disabled: _get('icon-on-color-disabled') !default;
258
+
259
+ /// The CSS Custom Property for the `icon-disabled` token
260
+ $icon-disabled: _get('icon-disabled') !default;
261
+
262
+ /// The CSS Custom Property for the `icon-interactive` token
263
+ $icon-interactive: _get('icon-interactive') !default;
264
+
265
+ /// The CSS Custom Property for the `support-error` token
266
+ $support-error: _get('support-error') !default;
267
+
268
+ /// The CSS Custom Property for the `support-success` token
269
+ $support-success: _get('support-success') !default;
270
+
271
+ /// The CSS Custom Property for the `support-warning` token
272
+ $support-warning: _get('support-warning') !default;
273
+
274
+ /// The CSS Custom Property for the `support-info` token
275
+ $support-info: _get('support-info') !default;
276
+
277
+ /// The CSS Custom Property for the `support-error-inverse` token
278
+ $support-error-inverse: _get('support-error-inverse') !default;
279
+
280
+ /// The CSS Custom Property for the `support-success-inverse` token
281
+ $support-success-inverse: _get('support-success-inverse') !default;
282
+
283
+ /// The CSS Custom Property for the `support-warning-inverse` token
284
+ $support-warning-inverse: _get('support-warning-inverse') !default;
285
+
286
+ /// The CSS Custom Property for the `support-info-inverse` token
287
+ $support-info-inverse: _get('support-info-inverse') !default;
288
+
289
+ /// The CSS Custom Property for the `support-caution-major` token
290
+ $support-caution-major: _get('support-caution-major') !default;
291
+
292
+ /// The CSS Custom Property for the `support-caution-minor` token
293
+ $support-caution-minor: _get('support-caution-minor') !default;
294
+
295
+ /// The CSS Custom Property for the `support-caution-undefined` token
296
+ $support-caution-undefined: _get('support-caution-undefined') !default;
297
+
298
+ /// The CSS Custom Property for the `ai-popover-background` token
299
+ $ai-popover-background: _get('ai-popover-background') !default;
300
+
301
+ /// The CSS Custom Property for the `ai-popover-shadow-outer-01` token
302
+ $ai-popover-shadow-outer-01: _get('ai-popover-shadow-outer-01') !default;
303
+
304
+ /// The CSS Custom Property for the `ai-popover-shadow-outer-02` token
305
+ $ai-popover-shadow-outer-02: _get('ai-popover-shadow-outer-02') !default;
306
+
307
+ /// The CSS Custom Property for the `ai-inner-shadow` token
308
+ $ai-inner-shadow: _get('ai-inner-shadow') !default;
309
+
310
+ /// The CSS Custom Property for the `ai-aura-start-sm` token
311
+ $ai-aura-start-sm: _get('ai-aura-start-sm') !default;
312
+
313
+ /// The CSS Custom Property for the `ai-aura-start` token
314
+ $ai-aura-start: _get('ai-aura-start') !default;
315
+
316
+ /// The CSS Custom Property for the `ai-aura-end` token
317
+ $ai-aura-end: _get('ai-aura-end') !default;
318
+
319
+ /// The CSS Custom Property for the `ai-aura-hover-background` token
320
+ $ai-aura-hover-background: _get('ai-aura-hover-background') !default;
321
+
322
+ /// The CSS Custom Property for the `ai-aura-hover-start` token
323
+ $ai-aura-hover-start: _get('ai-aura-hover-start') !default;
324
+
325
+ /// The CSS Custom Property for the `ai-aura-hover-end` token
326
+ $ai-aura-hover-end: _get('ai-aura-hover-end') !default;
327
+
328
+ /// The CSS Custom Property for the `ai-border-strong` token
329
+ $ai-border-strong: _get('ai-border-strong') !default;
330
+
331
+ /// The CSS Custom Property for the `ai-border-start` token
332
+ $ai-border-start: _get('ai-border-start') !default;
333
+
334
+ /// The CSS Custom Property for the `ai-border-end` token
335
+ $ai-border-end: _get('ai-border-end') !default;
336
+
337
+ /// The CSS Custom Property for the `ai-drop-shadow` token
338
+ $ai-drop-shadow: _get('ai-drop-shadow') !default;
339
+
340
+ /// The CSS Custom Property for the `ai-skeleton-background` token
341
+ $ai-skeleton-background: _get('ai-skeleton-background') !default;
342
+
343
+ /// The CSS Custom Property for the `ai-skeleton-element-background` token
344
+ $ai-skeleton-element-background: _get(
345
+ 'ai-skeleton-element-background'
346
+ ) !default;
347
+
348
+ /// The CSS Custom Property for the `ai-overlay` token
349
+ $ai-overlay: _get('ai-overlay') !default;
350
+
351
+ /// The CSS Custom Property for the `ai-popover-caret-center` token
352
+ $ai-popover-caret-center: _get('ai-popover-caret-center') !default;
353
+
354
+ /// The CSS Custom Property for the `ai-popover-caret-bottom` token
355
+ $ai-popover-caret-bottom: _get('ai-popover-caret-bottom') !default;
356
+
357
+ /// The CSS Custom Property for the `ai-popover-caret-bottom-background` token
358
+ $ai-popover-caret-bottom-background: _get(
359
+ 'ai-popover-caret-bottom-background'
360
+ ) !default;
361
+
362
+ /// The CSS Custom Property for the `ai-popover-caret-bottom-background-actions` token
363
+ $ai-popover-caret-bottom-background-actions: _get(
364
+ 'ai-popover-caret-bottom-background-actions'
365
+ ) !default;
366
+
367
+ /// The CSS Custom Property for the `chat-prompt-background` token
368
+ $chat-prompt-background: _get('chat-prompt-background') !default;
369
+
370
+ /// The CSS Custom Property for the `chat-prompt-border-start` token
371
+ $chat-prompt-border-start: _get('chat-prompt-border-start') !default;
372
+
373
+ /// The CSS Custom Property for the `chat-prompt-border-end` token
374
+ $chat-prompt-border-end: _get('chat-prompt-border-end') !default;
375
+
376
+ /// The CSS Custom Property for the `chat-bubble-user` token
377
+ $chat-bubble-user: _get('chat-bubble-user') !default;
378
+
379
+ /// The CSS Custom Property for the `chat-bubble-agent` token
380
+ $chat-bubble-agent: _get('chat-bubble-agent') !default;
381
+
382
+ /// The CSS Custom Property for the `chat-bubble-border` token
383
+ $chat-bubble-border: _get('chat-bubble-border') !default;
384
+
385
+ /// The CSS Custom Property for the `chat-avatar-bot` token
386
+ $chat-avatar-bot: _get('chat-avatar-bot') !default;
387
+
388
+ /// The CSS Custom Property for the `chat-avatar-agent` token
389
+ $chat-avatar-agent: _get('chat-avatar-agent') !default;
390
+
391
+ /// The CSS Custom Property for the `chat-avatar-user` token
392
+ $chat-avatar-user: _get('chat-avatar-user') !default;
393
+
394
+ /// The CSS Custom Property for the `chat-shell-background` token
395
+ $chat-shell-background: _get('chat-shell-background') !default;
396
+
397
+ /// The CSS Custom Property for the `chat-header-background` token
398
+ $chat-header-background: _get('chat-header-background') !default;
399
+
400
+ /// The CSS Custom Property for the `chat-button` token
401
+ $chat-button: _get('chat-button') !default;
402
+
403
+ /// The CSS Custom Property for the `chat-button-hover` token
404
+ $chat-button-hover: _get('chat-button-hover') !default;
405
+
406
+ /// The CSS Custom Property for the `chat-button-text-hover` token
407
+ $chat-button-text-hover: _get('chat-button-text-hover') !default;
408
+
409
+ /// The CSS Custom Property for the `chat-button-active` token
410
+ $chat-button-active: _get('chat-button-active') !default;
411
+
412
+ /// The CSS Custom Property for the `chat-button-selected` token
413
+ $chat-button-selected: _get('chat-button-selected') !default;
414
+
415
+ /// The CSS Custom Property for the `chat-button-text-selected` token
416
+ $chat-button-text-selected: _get('chat-button-text-selected') !default;
417
+
418
+ /// The CSS Custom Property for the `highlight` token
419
+ $highlight: _get('highlight') !default;
420
+
421
+ /// The CSS Custom Property for the `overlay` token
422
+ $overlay: _get('overlay') !default;
423
+
424
+ /// The CSS Custom Property for the `toggle-off` token
425
+ $toggle-off: _get('toggle-off') !default;
426
+
427
+ /// The CSS Custom Property for the `shadow` token
428
+ $shadow: _get('shadow') !default;
429
+
430
+ /// The CSS Custom Property for the `focus` token
431
+ $focus: _get('focus') !default;
432
+
433
+ /// The CSS Custom Property for the `focus-inset` token
434
+ $focus-inset: _get('focus-inset') !default;
435
+
436
+ /// The CSS Custom Property for the `focus-inverse` token
437
+ $focus-inverse: _get('focus-inverse') !default;
438
+
439
+ /// The CSS Custom Property for the `skeleton-background` token
440
+ $skeleton-background: _get('skeleton-background') !default;
441
+
442
+ /// The CSS Custom Property for the `skeleton-element` token
443
+ $skeleton-element: _get('skeleton-element') !default;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright OctaviaFlow. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @jest-environment node
8
+ */
9
+
10
+ import { themes } from '../';
11
+ import { group, TokenFormat } from '../tokens';
12
+
13
+ const tokens = group.getTokens().map((token) => {
14
+ return TokenFormat.convert({
15
+ name: token.name,
16
+ format: TokenFormat.formats.js,
17
+ });
18
+ });
19
+
20
+ describe('themes', () => {
21
+ describe.each(Object.entries(themes))('%s', (_name, theme) => {
22
+ test.each(tokens)('%s should be defined', (token) => {
23
+ expect(theme[token]).toBeDefined();
24
+ });
25
+ });
26
+ });
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright OctaviaFlow. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @jest-environment node
8
+ */
9
+
10
+ import { themes } from '../';
11
+ import { group, TokenFormat } from '../tokens';
12
+
13
+ const tokens = group.getTokens().map((token) => {
14
+ return TokenFormat.convert({
15
+ name: token.name,
16
+ format: TokenFormat.formats.js,
17
+ });
18
+ });
19
+
20
+ describe('themes', () => {
21
+ describe.each(Object.entries(themes))('%s', (_name, theme) => {
22
+ test.each(tokens)('%s should be defined', (token) => {
23
+ expect(theme[token]).toBeDefined();
24
+ });
25
+ });
26
+ });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright OctaviaFlow. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @jest-environment node
8
+ */
9
+
10
+ import Color from 'color';
11
+ import { adjustLightness } from '../tools';
12
+ import { blue60 } from '@octaviaflow/colors';
13
+
14
+ describe('tools', () => {
15
+ describe('adjustLightness', () => {
16
+ const SHIFT_AMOUNT = 5;
17
+
18
+ const baseColor = Color(blue60);
19
+ const baseLightness = baseColor.hsl().round().object().l;
20
+
21
+ it('should increase lightness by a specified amount', () => {
22
+ const newColor = Color(adjustLightness(blue60, SHIFT_AMOUNT));
23
+ const newLightness = newColor.hsl().round().object().l;
24
+ expect(newLightness).toEqual(baseLightness + SHIFT_AMOUNT);
25
+ });
26
+
27
+ it('should decrease lightness by a specified amount when given a negative shift', () => {
28
+ const newColor = Color(adjustLightness(blue60, SHIFT_AMOUNT * -1));
29
+ const newLightness = newColor.hsl().round().object().l;
30
+
31
+ expect(newLightness).toEqual(baseLightness - SHIFT_AMOUNT);
32
+ });
33
+ });
34
+ });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright OctaviaFlow. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @jest-environment node
8
+ */
9
+
10
+ import Color from 'color';
11
+ import { adjustLightness } from '../tools';
12
+ import { blue60 } from '@octaviaflow/colors';
13
+
14
+ describe('tools', () => {
15
+ describe('adjustLightness', () => {
16
+ const SHIFT_AMOUNT = 5;
17
+
18
+ const baseColor = Color(blue60);
19
+ const baseLightness = baseColor.hsl().round().object().l;
20
+
21
+ it('should increase lightness by a specified amount', () => {
22
+ const newColor = Color(adjustLightness(blue60, SHIFT_AMOUNT));
23
+ const newLightness = newColor.hsl().round().object().l;
24
+ expect(newLightness).toEqual(baseLightness + SHIFT_AMOUNT);
25
+ });
26
+
27
+ it('should decrease lightness by a specified amount when given a negative shift', () => {
28
+ const newColor = Color(adjustLightness(blue60, SHIFT_AMOUNT * -1));
29
+ const newLightness = newColor.hsl().round().object().l;
30
+
31
+ expect(newLightness).toEqual(baseLightness - SHIFT_AMOUNT);
32
+ });
33
+ });
34
+ });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright OctaviaFlow. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ export * as contentSwitcherTokens from "./tokens";
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright OctaviaFlow. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { gray20, gray20Hover, gray50, white, rgba } from "@octaviaflow/colors";
9
+
10
+ const transparent = "rgba(0, 0, 0, 0)";
11
+
12
+ export const contentSwitcherSelected = {
13
+ whiteTheme: white,
14
+ g10: white,
15
+ g90: rgba(gray50, 0.24),
16
+ g100: rgba(gray50, 0.24),
17
+ };
18
+
19
+ export const contentSwitcherBackground = {
20
+ whiteTheme: gray20,
21
+ g10: gray20,
22
+ g90: transparent,
23
+ g100: transparent,
24
+ };
25
+
26
+ export const contentSwitcherBackgroundHover = {
27
+ whiteTheme: gray20Hover,
28
+ g10: gray20Hover,
29
+ g90: rgba(gray50, 0.12),
30
+ g100: rgba(gray50, 0.12),
31
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright OctaviaFlow. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ export * as statusTokens from "./tokens";