@vsn-ux/gaia-styles 0.3.2 → 0.4.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.
@@ -4,6 +4,9 @@
4
4
  "white": {
5
5
  "$value": "#FFFFFF"
6
6
  },
7
+ "black": {
8
+ "$value": "#000000"
9
+ },
7
10
  "cyan": {
8
11
  "60": {
9
12
  "$value": "#377EA0"
@@ -157,6 +160,9 @@
157
160
  },
158
161
  "40": {
159
162
  "$value": "#C3ACF9"
163
+ },
164
+ "80": {
165
+ "$value": "#591ab5"
160
166
  }
161
167
  },
162
168
  "pink": {
@@ -316,7 +322,7 @@
316
322
  "$value": "{color.primary.90}"
317
323
  },
318
324
  "disabled": {
319
- "$value": "{color.neutral}"
325
+ "$value": "{color.utility.grey}"
320
326
  },
321
327
  "disable-selected": {
322
328
  "$value": "{color.neutral.60}"
@@ -338,6 +344,9 @@
338
344
  },
339
345
  "on-disabled": {
340
346
  "$value": "{color.primary.70}"
347
+ },
348
+ "link-visited": {
349
+ "$value": "{color.purple.80}"
341
350
  }
342
351
  },
343
352
  "surface": {
@@ -372,12 +381,12 @@
372
381
  "$value": "{color.orange.20}"
373
382
  },
374
383
  "disable-selected": {
375
- "$value": "{color.neutral.50}"
384
+ "$value": "{color.neutral.60}"
376
385
  }
377
386
  },
378
387
  "border": {
379
388
  "primary": {
380
- "$value": "{color.neutral.30}"
389
+ "$value": "{color.neutral.60}"
381
390
  },
382
391
  "secondary": {
383
392
  "$value": "{color.secondary.30}"
@@ -443,89 +452,122 @@
443
452
  },
444
453
  "disabled": {
445
454
  "$value": "{color.neutral}"
455
+ },
456
+ "pictograms": {
457
+ "pictogram-fill": {
458
+ "$value": "{color.neutral}"
459
+ },
460
+ "pictogram-emphasis": {
461
+ "$value": "{color.neutral}"
462
+ }
463
+ }
464
+ },
465
+ "sequential-graph": {
466
+ "100": {
467
+ "$value": "{color.teal.100}"
468
+ },
469
+ "90": {
470
+ "$value": "{color.teal.90}"
471
+ },
472
+ "80": {
473
+ "$value": "{color.teal.80}"
474
+ },
475
+ "70": {
476
+ "$value": "{color.teal.70}"
477
+ },
478
+ "60": {
479
+ "$value": "{color.teal.60}"
480
+ },
481
+ "50": {
482
+ "$value": "{color.teal.50}"
483
+ },
484
+ "40": {
485
+ "$value": "{color.teal.40}"
486
+ },
487
+ "30": {
488
+ "$value": "{color.teal.30}"
489
+ },
490
+ "20": {
491
+ "$value": "{color.teal.20}"
492
+ },
493
+ "10": {
494
+ "$value": "{color.teal.10}"
495
+ }
496
+ },
497
+ "miscellaneous": {
498
+ "overlay": {
499
+ "$value": {
500
+ "colorSpace": "oklch",
501
+ "channels": [0.4949, 10.28, 270.77],
502
+ "alpha": 0.57
503
+ }
504
+ },
505
+ "skeleton-element": {
506
+ "$value": "{color.neutral.10}"
507
+ },
508
+ "skeleton-highlight": {
509
+ "$value": "{color.neutral.20}"
446
510
  }
447
511
  }
448
512
  },
449
513
  "size": {
450
514
  "$type": "dimension",
451
- "0": {
452
- "$value": "0px"
453
- },
454
- "2": {
455
- "$value": "2px"
456
- },
457
- "4": {
458
- "$value": "4px"
459
- },
460
- "8": {
461
- "$value": "8px"
462
- },
463
- "10": {
464
- "$value": "10px"
465
- },
466
- "11": {
467
- "$value": "11px"
468
- },
469
- "12": {
470
- "$value": "12px"
471
- },
472
- "14": {
473
- "$value": "14px"
474
- },
475
- "16": {
476
- "$value": "16px"
477
- },
478
- "20": {
479
- "$value": "20px"
480
- },
481
- "24": {
482
- "$value": "24px"
483
- },
484
- "32": {
485
- "$value": "32px"
486
- },
487
- "36": {
488
- "$value": "36px"
489
- },
490
- "40": {
491
- "$value": "40px"
492
- },
493
- "48": {
494
- "$value": "48px"
495
- },
496
- "64": {
497
- "$value": "64px"
498
- },
499
- "80": {
500
- "$value": "80px"
501
- },
502
- "96": {
503
- "$value": "96px"
504
- },
505
- "160": {
506
- "$value": "160px"
507
- },
508
- "font": {
509
- "xs": {
510
- "$value": "{size.11}"
515
+ "border-width": {
516
+ "none": {
517
+ "$value": "0px"
511
518
  },
512
519
  "sm": {
513
- "$value": "{size.12}"
520
+ "$value": "1px"
514
521
  },
515
522
  "md": {
516
- "$value": "{size.14}"
523
+ "$value": "2px"
517
524
  },
518
525
  "lg": {
519
- "$value": "{size.16}"
526
+ "$value": "4px"
527
+ }
528
+ },
529
+ "spacing": {
530
+ "00": {
531
+ "$value": "0px"
532
+ },
533
+ "01": {
534
+ "$value": "0.125rem"
535
+ },
536
+ "02": {
537
+ "$value": "0.25rem"
538
+ },
539
+ "03": {
540
+ "$value": "0.5rem"
541
+ },
542
+ "04": {
543
+ "$value": "0.75rem"
544
+ },
545
+ "05": {
546
+ "$value": "1rem"
547
+ },
548
+ "06": {
549
+ "$value": "1.5rem"
550
+ },
551
+ "07": {
552
+ "$value": "2rem"
553
+ },
554
+ "08": {
555
+ "$value": "2.5rem"
556
+ },
557
+ "09": {
558
+ "$value": "3rem"
559
+ },
560
+ "10": {
561
+ "$value": "4rem"
520
562
  },
521
- "xl": {
522
- "$value": "{size.20}"
563
+ "11": {
564
+ "$value": "5rem"
523
565
  },
524
- "2xl": {
525
- "$value": "{size.24}"
566
+ "12": {
567
+ "$value": "6rem"
526
568
  },
527
- "3xl": {
528
- "$value": "{size.36}"
569
+ "13": {
570
+ "$value": "10rem"
529
571
  }
530
572
  }
531
573
  },
@@ -534,15 +576,93 @@
534
576
  "$value": "4px",
535
577
  "round": {
536
578
  "$type": "dimension",
537
- "$value": "99999px"
579
+ "$value": "999px"
538
580
  },
539
581
  "sharp": {
540
582
  "$type": "dimension",
541
- "$value": "0.28px"
583
+ "$value": "0.02rem"
542
584
  }
543
585
  },
544
- "font-family": {
545
- "$type": "fontFamily",
546
- "$value": "Inter"
586
+ "font": {
587
+ "family": {
588
+ "primary": {
589
+ "$type": "fontFamily",
590
+ "$value": ["Inter", "-system-ui", "sans-serif"]
591
+ }
592
+ },
593
+ "weight": {
594
+ "$type": "fontWeight",
595
+ "normal": {
596
+ "$value": "normal"
597
+ },
598
+ "medium": {
599
+ "$value": "medium"
600
+ },
601
+ "semibold": {
602
+ "$value": "semi-bold"
603
+ },
604
+ "bold": {
605
+ "$value": "bold"
606
+ }
607
+ }
608
+ },
609
+ "text": {
610
+ "$type": "typography",
611
+ "xs": {
612
+ "$value": {
613
+ "fontSize": "0.6875rem",
614
+ "fontStyle": "normal",
615
+ "tracking": "0.005rem",
616
+ "lineHeight": 1
617
+ }
618
+ },
619
+ "sm": {
620
+ "$value": {
621
+ "fontSize": "0.75rem",
622
+ "fontStyle": "normal",
623
+ "tracking": 0,
624
+ "lineHeight": 1.25
625
+ }
626
+ },
627
+ "md": {
628
+ "$value": {
629
+ "fontSize": "0.875rem",
630
+ "fontStyle": "normal",
631
+ "tracking": "-0.006rem",
632
+ "lineHeight": 1.25
633
+ }
634
+ },
635
+ "lg": {
636
+ "$value": {
637
+ "fontSize": "1rem",
638
+ "fontStyle": "normal",
639
+ "tracking": "-0.011rem",
640
+ "lineHeight": 1.5
641
+ }
642
+ },
643
+ "xl": {
644
+ "$value": {
645
+ "fontSize": "1.25rem",
646
+ "fontStyle": "normal",
647
+ "tracking": "-0.017rem",
648
+ "lineHeight": 2
649
+ }
650
+ },
651
+ "2xl": {
652
+ "$value": {
653
+ "fontSize": "1.5rem",
654
+ "fontStyle": "normal",
655
+ "tracking": "-0.019rem",
656
+ "lineHeight": 2.25
657
+ }
658
+ },
659
+ "3xl": {
660
+ "$value": {
661
+ "fontSize": "2.25rem",
662
+ "fontStyle": "normal",
663
+ "tracking": "-0.022rem",
664
+ "lineHeight": 3.5
665
+ }
666
+ }
547
667
  }
548
668
  }
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  &:disabled {
40
- @apply border-(--ga-color-border-disabled) bg-(--ga-color-surace-page) text-(--ga-color-text-disabled);
40
+ @apply border-(--ga-color-border-disabled) bg-(--ga-color-surface-page) text-(--ga-color-text-disabled);
41
41
  }
42
42
  }
43
43
 
@@ -1,40 +1,28 @@
1
1
  .ga-segmented-control {
2
- @apply text-md inline-flex h-10 items-center justify-center align-middle;
2
+ @apply text-md inline-flex items-center justify-center gap-1 rounded border border-(--ga-color-border-primary) p-0.5 align-middle;
3
3
 
4
4
  .ga-segmented-control__button {
5
- @apply text-cyan-80 border-neutral-30 inline-flex h-10 items-center justify-center gap-2 border-t border-b border-l bg-white px-4 align-middle leading-1 font-medium;
5
+ @apply inline-flex h-9 cursor-pointer items-center justify-center gap-2 rounded border border-transparent bg-(--ga-color-surface-primary) px-4 align-middle leading-1 text-(--ga-color-text-action);
6
6
 
7
- &:first-of-type {
8
- @apply rounded-l;
7
+ &.ga-segmented-control__button--selected,
8
+ &:hover {
9
+ @apply border-(--ga-color-border-action);
9
10
  }
10
11
 
11
- &:last-of-type {
12
- @apply rounded-r border-r;
12
+ &:hover {
13
+ @apply bg-(--ga-color-surface-action-hover-2) text-(--ga-color-text-action-hover);
13
14
  }
14
15
 
15
- &.ga-segmented-control__button--selected {
16
- @apply bg-cyan-80 text-orange-10 font-semibold;
16
+ &:focus-visible {
17
+ @apply outline-2 outline-offset-2 outline-(--ga-color-border-focus);
17
18
  }
18
19
 
19
- &:not(
20
- .ga-segmented-control__button--selected,
21
- .ga-segmented-control__button--disabled,
22
- :disabled
23
- ) {
24
- @apply cursor-pointer;
20
+ &.ga-segmented-control__button--icon-only {
21
+ @apply px-[0.5625rem];
25
22
 
26
23
  &:hover {
27
- @apply bg-(--ga-color-surface-action-hover-2);
24
+ @apply text-(--ga-color-icon-action-hover);
28
25
  }
29
-
30
- &:active {
31
- @apply bg-white;
32
- }
33
- }
34
-
35
- &.ga-segmented-control__button--disabled,
36
- &:disabled {
37
- @apply bg-neutral-10 border-neutral-30 text-grey-40;
38
26
  }
39
27
  }
40
28
  }
@@ -0,0 +1,76 @@
1
+ .ga-switch {
2
+ @apply relative inline-flex items-center gap-3;
3
+
4
+ .ga-switch__marker {
5
+ @apply pointer-events-none absolute top-0 left-0 inline-block h-6 w-12 rounded-full border border-(--ga-color-border-action) bg-(--ga-color-surface-primary);
6
+ }
7
+
8
+ .ga-switch__check-icon {
9
+ @apply absolute top-0.75 left-1.5 text-(--ga-color-icon-on-primary) opacity-0 transition-opacity duration-300;
10
+ }
11
+
12
+ .ga-switch__slider {
13
+ @apply pointer-events-none absolute top-0.75 left-0.75 inline-block h-4 w-4 rounded-full bg-(--ga-color-surface-action) transition-transform duration-300;
14
+ }
15
+
16
+ .ga-switch__label {
17
+ @apply select-none;
18
+ }
19
+
20
+ input {
21
+ @apply inline-block h-6 w-12 cursor-pointer rounded-full opacity-0;
22
+
23
+ &:hover ~ .ga-switch__marker {
24
+ @apply bg-(--ga-color-surface-action-hover-2);
25
+
26
+ .ga-switch__slider {
27
+ @apply bg-(--ga-color-surface-action-hover);
28
+ }
29
+ }
30
+
31
+ &:checked {
32
+ ~ .ga-switch__marker {
33
+ @apply border-(--ga-color-border-action) bg-(--ga-color-surface-action);
34
+
35
+ .ga-switch__slider {
36
+ @apply translate-x-6 bg-(--ga-color-surface-primary);
37
+ }
38
+
39
+ .ga-switch__check-icon {
40
+ @apply opacity-100;
41
+ }
42
+ }
43
+
44
+ &:hover:not(:disabled) ~ .ga-switch__marker {
45
+ @apply bg-(--ga-color-surface-action-hover);
46
+
47
+ .ga-switch__slider {
48
+ @apply bg-(--ga-color-surface-action-hover-2);
49
+ }
50
+ }
51
+ }
52
+
53
+ &:focus-visible ~ .ga-switch__marker {
54
+ @apply outline-2 outline-offset-2 outline-(--ga-color-border-focus);
55
+ }
56
+
57
+ &:disabled {
58
+ @apply cursor-not-allowed;
59
+
60
+ ~ .ga-switch__marker {
61
+ @apply border-(--ga-color-border-disabled) bg-(--ga-color-surface-disabled);
62
+
63
+ .ga-switch__check-icon {
64
+ @apply text-(--ga-color-icon-on-disabled);
65
+ }
66
+ .ga-switch__slider {
67
+ @apply bg-(--ga-color-icon-on-disabled);
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ &.ga-switch--invalid input ~ .ga-switch__marker {
74
+ @apply outline-2 outline-offset-2 outline-(--ga-color-border-error);
75
+ }
76
+ }
@@ -11,6 +11,7 @@
11
11
  @import './components/radio.css';
12
12
  @import './components/segmented-control.css';
13
13
  @import './components/select.css';
14
+ @import './components/switch.css';
14
15
  @import './components/tag.css';
15
16
  @import './components/text-area.css';
16
17
  @import './components/tooltip.css';
@@ -52,26 +52,26 @@
52
52
  --font-inter--font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */
53
53
  --default-font-family: var(--font-inter);
54
54
 
55
- --text-xs: var(--ga-size-font-xs);
56
- --text-xs--line-height: calc(var(--spacing) * 4 * 1);
55
+ --text-xs: var(--ga-text-xs-font-size);
56
+ --text-xs--line-height: var(--ga-text-xs-line-height);
57
57
  --text-xs--letter-spacing: calc(var(--spacing) * 4 * 0.005);
58
- --text-sm: var(--ga-size-font-sm);
59
- --text-sm--line-height: calc(var(--spacing) * 4 * 1.25);
58
+ --text-sm: var(--ga-text-sm-font-size);
59
+ --text-sm--line-height: var(--ga-text-sm-line-height);
60
60
  --text-sm--letter-spacing: 0;
61
- --text-md: var(--ga-size-font-md);
62
- --text-md--line-height: calc(var(--spacing) * 4 * 1.25);
61
+ --text-md: var(--ga-text-md-font-size);
62
+ --text-md--line-height: var(--ga-text-md-line-height);
63
63
  --text-md--letter-spacing: calc(var(--spacing) * 4 * -0.006);
64
- --text-lg: var(--ga-size-font-lg);
65
- --text-lg--line-height: calc(var(--spacing) * 4 * 1.5);
64
+ --text-lg: var(--ga-text-lg-font-size);
65
+ --text-lg--line-height: var(--ga-text-lg-line-height);
66
66
  --text-lg--letter-spacing: calc(var(--spacing) * 4 * -0.011);
67
- --text-xl: var(--ga-size-font-xl);
68
- --text-xl--line-height: calc(var(--spacing) * 4 * 2);
67
+ --text-xl: var(--ga-text-xl-font-size);
68
+ --text-xl--line-height: var(--ga-text-xl-line-height);
69
69
  --text-xl--letter-spacing: calc(var(--spacing) * 4 * -0.017);
70
- --text-2xl: var(--ga-size-font-2xl);
71
- --text-2xl--line-height: calc(var(--spacing) * 4 * 2.25);
70
+ --text-2xl: var(--ga-text-2xl-font-size);
71
+ --text-2xl--line-height: var(--ga-text-2xl-line-height);
72
72
  --text-2xl--letter-spacing: calc(var(--spacing) * 4 * -0.019);
73
- --text-3xl: var(--ga-size-font-3xl);
74
- --text-3xl--line-height: calc(var(--spacing) * 4 * 3.5);
73
+ --text-3xl: var(--ga-text-3xl-font-size);
74
+ --text-3xl--line-height: var(--ga-text-3xl-line-height);
75
75
  --text-3xl--letter-spacing: calc(var(--spacing) * 4 * -0.022);
76
76
 
77
77
  --font-weight-normal: 400;