@drivy/cobalt 0.29.2 → 0.31.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 (43) hide show
  1. package/cjs/tokens/theme.js +1 -1
  2. package/components/Card/index.js +3 -2
  3. package/components/Card/index.js.map +1 -1
  4. package/components/Flash/index.js +4 -4
  5. package/components/Flash/index.js.map +1 -1
  6. package/components/Form/Autocomplete/index.js +1 -1
  7. package/components/Form/Autocomplete/index.js.map +1 -1
  8. package/components/Form/Slider.js.map +1 -1
  9. package/package.json +11 -11
  10. package/styles/components/Accordion/index.scss +1 -1
  11. package/styles/components/Alerter/index.scss +2 -4
  12. package/styles/components/BulletList/index.scss +1 -2
  13. package/styles/components/Buttons/DefaultButton/index.scss +12 -12
  14. package/styles/components/Buttons/GhostButton/index.scss +4 -4
  15. package/styles/components/Buttons/InversedButton/index.scss +2 -2
  16. package/styles/components/Buttons/index.scss +6 -7
  17. package/styles/components/Calendar/CalendarRangePicker/index.scss +13 -18
  18. package/styles/components/Calendar/CalendarView/index.scss +6 -8
  19. package/styles/components/Card/index.scss +16 -6
  20. package/styles/components/Cell/index.scss +1 -1
  21. package/styles/components/Flash/index.scss +2 -4
  22. package/styles/components/Form/Autocomplete/index.scss +10 -21
  23. package/styles/components/Form/CheckablePill.scss +5 -6
  24. package/styles/components/Form/Checkmark.scss +1 -5
  25. package/styles/components/Form/Hint.scss +0 -9
  26. package/styles/components/Form/RadioWithDetails.scss +5 -5
  27. package/styles/components/Form/TextInput.scss +5 -5
  28. package/styles/components/Form/ToggleSwitch.scss +1 -1
  29. package/styles/components/Helper/index.scss +0 -3
  30. package/styles/components/Icon/index.scss +1 -2
  31. package/styles/components/Note/index.scss +4 -0
  32. package/styles/components/PhotoDropzone/index.scss +1 -2
  33. package/styles/components/TabBar/index.scss +1 -1
  34. package/styles/components/Tag/index.scss +2 -4
  35. package/styles/core/_colors-map.scss +164 -164
  36. package/styles/core/color.scss +28 -6
  37. package/styles/core/text.scss +37 -19
  38. package/styles/core/theme.scss +486 -160
  39. package/styles/core/typography.scss +12 -12
  40. package/tokens/theme.js +1 -1
  41. package/types/components/Card/index.d.ts +3 -1
  42. package/types/components/Form/Slider.d.ts +2 -2
  43. package/utilities.css +651 -295
@@ -12,7 +12,7 @@
12
12
 
13
13
  &--softDivided {
14
14
  &::before {
15
- @include semantic-color(base, stroke, background-color);
15
+ @include semantic-color(stroke, base, background-color);
16
16
 
17
17
  position: absolute;
18
18
  top: 0;
@@ -13,10 +13,8 @@
13
13
  box-shadow: elevation(lg);
14
14
 
15
15
  &--info {
16
- // TOFIX: there is no matching semantic color for this case
17
- color: color(white);
18
-
19
- background-color: color(graphite);
16
+ @include bg-color(info);
17
+ @include text-color(info);
20
18
  }
21
19
 
22
20
  &--success {
@@ -1,14 +1,6 @@
1
1
  @import "@reach/combobox/styles.css";
2
2
 
3
3
  .cobalt-Autocomplete {
4
- $border-color: color(indigo);
5
- $border-separator-popover-color: color(grey, light);
6
- $selected-item-color: color(purple);
7
- $selected-item-background-color: color(grey, lighter);
8
- $selected-item-background-darken-color: darken(
9
- $selected-item-background-color,
10
- 2
11
- );
12
4
  $autocomplete-popover-zindex: 2147483647; //max z-index value
13
5
 
14
6
  @include form-field-container;
@@ -33,6 +25,7 @@
33
25
  }
34
26
 
35
27
  &__popover {
28
+ @include border(accent, 2);
36
29
  position: absolute;
37
30
 
38
31
  z-index: $autocomplete-popover-zindex;
@@ -47,14 +40,10 @@
47
40
  border-bottom-right-radius: 4px;
48
41
  border-bottom-left-radius: 4px;
49
42
 
50
- border: 2px solid $border-color;
51
-
52
43
  background-color: color(white);
53
44
 
54
- box-shadow: 0 2px 2px 0 rgba($border-color, 0.06),
55
- 0 6px 6px 0 rgba($border-color, 0.04),
56
- 0 8px 8px 0 rgba($border-color, 0.06),
57
- inset 0 1px 0 0 $border-separator-popover-color;
45
+ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.06), 0 6px 6px 0 rgba(0, 0, 0, 0.04),
46
+ 0 8px 8px 0 rgba(0, 0, 0, 0.06);
58
47
 
59
48
  border-top-width: 0;
60
49
 
@@ -82,6 +71,8 @@
82
71
  }
83
72
 
84
73
  &__item {
74
+ @include bg-color(secondaryInteractive);
75
+
85
76
  width: 100%;
86
77
  display: flex;
87
78
  padding: 0;
@@ -91,19 +82,17 @@
91
82
 
92
83
  &__item:hover,
93
84
  &__item[aria-selected="true"] {
94
- color: $selected-item-color;
85
+ @include text-color(accentAlt);
95
86
 
96
87
  cursor: pointer;
97
88
 
98
- background-color: $selected-item-background-color;
99
-
100
89
  .cobalt-Icon {
101
- fill: $selected-item-color;
90
+ @include semantic-color(icon, accent, fill);
102
91
  }
103
92
  }
104
93
 
105
94
  &__item[aria-selected="true"]:hover {
106
- background-color: $selected-item-background-darken-color;
95
+ @include bg-color(accentAlt);
107
96
  }
108
97
 
109
98
  &__popover .cobalt-Autocomplete__item-icon {
@@ -133,12 +122,12 @@
133
122
  }
134
123
 
135
124
  &__item-wrapper--disabled {
136
- color: color(grey, dark);
125
+ @include text-color(subdued);
137
126
 
138
127
  cursor: auto;
139
128
 
140
129
  .cobalt-Icon {
141
- fill: color(grey, dark) !important;
130
+ fill: var(--c-icon-subdued) !important;
142
131
  }
143
132
  }
144
133
 
@@ -43,7 +43,6 @@
43
43
  line-height: $height - 2px * 2;
44
44
 
45
45
  border-radius: math.div($height, 2);
46
- box-shadow: 0 2px 6px 0 rgba(#000, 0.12);
47
46
 
48
47
  transition: $animation-duration;
49
48
 
@@ -88,19 +87,19 @@
88
87
  &__Input:checked + #{ $self }__Label {
89
88
  @include bg-color(accentAlt);
90
89
  @include text-color(accentAlt);
91
- border-color: transparent;
90
+ @include border(accentAlt, 2);
92
91
  }
93
92
 
94
93
  &--with-icon {
95
94
  .cobalt-Icon {
96
- @include semantic-color(base, icon, fill);
95
+ @include semantic-color(icon, base, fill);
97
96
  margin-right: spacing(xs);
98
97
 
99
98
  transition: fill $animation-duration ease-in-out;
100
99
  }
101
100
 
102
101
  #{ $self }__Input:checked + #{ $self }__Label .cobalt-Icon {
103
- @include semantic-color(accentAlt, icon, fill);
102
+ @include semantic-color(icon, accentAlt, fill);
104
103
  }
105
104
  }
106
105
 
@@ -111,7 +110,7 @@
111
110
  @include bg-color(secondary);
112
111
 
113
112
  .cobalt-Icon {
114
- @include semantic-color(base, icon, fill);
113
+ @include semantic-color(icon, base, fill);
115
114
  }
116
115
  }
117
116
 
@@ -121,7 +120,7 @@
121
120
  @include border-color(errorAlt);
122
121
 
123
122
  .cobalt-Icon {
124
- @include semantic-color(errorAlt, icon, fill);
123
+ @include semantic-color(icon, errorAlt, fill);
125
124
  }
126
125
  }
127
126
  }
@@ -5,17 +5,13 @@
5
5
  $checkbox-checkmark-size: 18px;
6
6
 
7
7
  @include text-color(base);
8
+ @include c-text-body-md;
8
9
 
9
10
  position: relative;
10
11
 
11
12
  margin-bottom: spacing(xs);
12
13
  display: block;
13
14
 
14
- font-weight: 400;
15
- font-family: font-family(base);
16
- font-size: font-size(body);
17
- line-height: line-height(body);
18
-
19
15
  &__Input {
20
16
  position: absolute;
21
17
 
@@ -30,14 +30,5 @@
30
30
  &--error {
31
31
  @include text-color(error);
32
32
  }
33
-
34
- a {
35
- @include text-color(accentInteractive);
36
- text-decoration: none;
37
- }
38
-
39
- a:hover {
40
- text-decoration: underline;
41
- }
42
33
  }
43
34
  }
@@ -9,7 +9,7 @@
9
9
  --visual-radio-size: 18px;
10
10
 
11
11
  .cobalt-radio-with-details__inner {
12
- @include border(strongInteractive);
12
+ @include border(baseInteractive);
13
13
  @include text-color(base);
14
14
  @include bg-color(secondary);
15
15
  height: 100%;
@@ -49,7 +49,7 @@
49
49
  }
50
50
 
51
51
  .cobalt-radio-with-details__description {
52
- @include c-text-body-md;
52
+ @include c-text-body-sm;
53
53
  @include text-color(subdued);
54
54
 
55
55
  transition: color 150ms ease-in-out;
@@ -89,7 +89,7 @@
89
89
  }
90
90
 
91
91
  &:focus-visible + #{ $self }__inner {
92
- @include semantic-color(accentAlt, stroke, outline-color);
92
+ @include semantic-color(stroke, accentAlt, outline-color);
93
93
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
94
94
  outline-style: dashed;
95
95
  outline-width: 1px;
@@ -102,7 +102,7 @@
102
102
  }
103
103
 
104
104
  &:checked + #{ $self }__inner #{ $self }__visual-input {
105
- @include semantic-color(accentAlt, icon, border-color);
105
+ @include semantic-color(icon, accentAlt, border-color);
106
106
  }
107
107
 
108
108
  &:checked + #{ $self }__inner #{ $self }__title,
@@ -130,7 +130,7 @@
130
130
  }
131
131
 
132
132
  &:checked + #{ $self }__inner #{ $self }__visual-input::after {
133
- @include semantic-color(accentAlt, icon, border-color);
133
+ @include semantic-color(icon, accentAlt, border-color);
134
134
 
135
135
  opacity: 1;
136
136
 
@@ -9,7 +9,7 @@
9
9
  position: relative;
10
10
 
11
11
  &__Icon {
12
- @include semantic-color(base, icon, fill);
12
+ @include semantic-color(icon, base, fill);
13
13
  position: absolute;
14
14
  top: 0;
15
15
  left: spacing(xs);
@@ -37,22 +37,22 @@
37
37
  }
38
38
 
39
39
  #{ $self }__Input + #{ $self }__Icon {
40
- @include semantic-color(accent, icon, fill);
40
+ @include semantic-color(icon, accent, fill);
41
41
  pointer-events: none;
42
42
  }
43
43
 
44
44
  #{ $self }__Input:placeholder-shown + #{ $self }__Icon {
45
- @include semantic-color(subdued, icon, fill);
45
+ @include semantic-color(icon, subdued, fill);
46
46
  opacity: 0.7;
47
47
  }
48
48
 
49
49
  #{ $self }__Input:focus + #{ $self }__Icon,
50
50
  #{ $self }__Input:focus:placeholder-shown + #{ $self }__Icon {
51
- @include semantic-color(accent, icon, fill);
51
+ @include semantic-color(icon, accent, fill);
52
52
  }
53
53
 
54
54
  #{ $self }__Input:disabled + #{ $self }__Icon {
55
- @include semantic-color(subdued, icon, fill);
55
+ @include semantic-color(icon, subdued, fill);
56
56
  opacity: 0.7;
57
57
  }
58
58
  }
@@ -120,7 +120,7 @@ $toggle-switch-size-large: 28px;
120
120
  }
121
121
 
122
122
  &__ToggleSwitchSlider {
123
- @include semantic-color(base, stroke, background-color);
123
+ @include semantic-color(stroke, base, background-color);
124
124
  display: inline-block;
125
125
 
126
126
  transition: $animation-duration;
@@ -3,9 +3,6 @@
3
3
  @include bg-color(secondary);
4
4
  padding: spacing(sm);
5
5
 
6
- // FIXME: remove when releasing semantics color
7
- background-color: fade-out(color(purple), 0.92);
8
-
9
6
  border-radius: border-radius(xl);
10
7
 
11
8
  &__title {
@@ -24,13 +24,12 @@
24
24
  }
25
25
 
26
26
  &Icon--contained {
27
- @include bg-color(secondary);
27
+ @include bg-color(neutralAlt);
28
28
  height: 40px;
29
29
  width: 40px;
30
30
  padding: math.div(40px - 24px, 2);
31
31
 
32
32
  border-radius: 50%;
33
- box-shadow: elevation(base);
34
33
  }
35
34
 
36
35
  &Icon--size16 {
@@ -9,6 +9,10 @@
9
9
  padding: spacing(sm);
10
10
 
11
11
  border-radius: border-radius(lg);
12
+
13
+ a {
14
+ color: inherit;
15
+ }
12
16
  }
13
17
 
14
18
  &Note--fullWidth {
@@ -31,8 +31,7 @@
31
31
  }
32
32
 
33
33
  .cobalt-photo-dropzone--dragging {
34
- // FIXME NEW COLORS: this background doesn't match any semantic color
35
- background-color: #f6e5f5;
34
+ @include bg-color(accentAlt);
36
35
 
37
36
  transition: background-color 0.25s;
38
37
 
@@ -41,7 +41,7 @@
41
41
  }
42
42
 
43
43
  &TabScroller--underlined:after {
44
- @include fill-bg-color(base);
44
+ @include semantic-color(stroke, base, background);
45
45
  position: absolute;
46
46
  bottom: 0;
47
47
 
@@ -18,9 +18,7 @@
18
18
  }
19
19
 
20
20
  &Tag--important {
21
- // TOFIX Move to errorAlt for bg and text
22
- @include text-color(error);
23
-
24
- background-color: lighten(color(red), 24);
21
+ @include bg-color(errorAlt);
22
+ @include text-color(errorAlt);
25
23
  }
26
24
  }