@drivy/cobalt 0.46.0 → 0.46.2

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.
@@ -5,11 +5,7 @@ $daySize: spacing(md);
5
5
  .cobalt-CalendarView {
6
6
  display: flex;
7
7
 
8
- &__month {
9
- &:not(:last-child) {
10
- margin-right: spacing(sm);
11
- }
12
- }
8
+ gap: spacing(sm);
13
9
 
14
10
  &__monthName {
15
11
  @include c-text-section-heading;
@@ -18,9 +14,7 @@ $daySize: spacing(md);
18
14
  &__week {
19
15
  display: flex;
20
16
 
21
- &:not(:last-child) {
22
- margin-bottom: 4px;
23
- }
17
+ gap: spacing(unit);
24
18
  }
25
19
 
26
20
  &__day {
@@ -38,26 +32,23 @@ $daySize: spacing(md);
38
32
  border-radius: math.div($daySize, 2);
39
33
 
40
34
  &--disabled {
41
- @include bg-color(neutral);
35
+ @include bg-color(blocker);
42
36
  @include text-color(subdued);
43
37
  }
44
38
 
45
39
  &--highlighted {
46
- @include text-color(inversed);
47
- @include bg-color(connect);
40
+ @include text-color(onRental);
41
+ @include bg-color(rental);
48
42
  }
49
43
 
50
44
  &--semi-highlighted {
51
- @include bg-color(connectAlt);
45
+ @include text-color(onRentalAlt);
46
+ @include bg-color(rentalAlt);
52
47
  }
53
48
 
54
49
  &--past {
55
50
  @include text-color(subdued);
56
51
  opacity: 0.4;
57
52
  }
58
-
59
- &:not(:first-child) {
60
- margin-left: 4px;
61
- }
62
53
  }
63
54
  }
@@ -11,6 +11,8 @@
11
11
  justify-content: center;
12
12
  align-items: center;
13
13
 
14
+ flex-shrink: 0;
15
+
14
16
  border-radius: border-radius(lg);
15
17
 
16
18
  .cobalt-Icon {
@@ -22,10 +22,6 @@
22
22
  fill: var(--c-icon-info);
23
23
  }
24
24
 
25
- .cobalt-Icon--colorInfoAlt {
26
- fill: var(--c-icon-infoAlt);
27
- }
28
-
29
25
  .cobalt-Icon--colorError {
30
26
  fill: var(--c-icon-error);
31
27
  }
@@ -42,10 +38,6 @@
42
38
  fill: var(--c-icon-successAlt);
43
39
  }
44
40
 
45
- .cobalt-Icon--colorWarning {
46
- fill: var(--c-icon-warning);
47
- }
48
-
49
41
  .cobalt-Icon--colorConnect {
50
42
  fill: var(--c-icon-connect);
51
43
  }
@@ -54,18 +46,6 @@
54
46
  fill: var(--c-icon-connectAlt);
55
47
  }
56
48
 
57
- .cobalt-Icon--colorKeyExchange {
58
- fill: var(--c-icon-keyExchange);
59
- }
60
-
61
- .cobalt-Icon--colorPicked {
62
- fill: var(--c-icon-picked);
63
- }
64
-
65
- .cobalt-Icon--colorRideshare {
66
- fill: var(--c-icon-rideshare);
67
- }
68
-
69
49
  .cobalt-Icon--colorDriver {
70
50
  fill: var(--c-icon-driver);
71
51
  }
@@ -74,16 +54,16 @@
74
54
  fill: var(--c-icon-owner);
75
55
  }
76
56
 
77
- .cobalt-Icon--colorDisabled {
78
- fill: var(--c-icon-disabled);
57
+ .cobalt-Icon--colorWarning {
58
+ fill: var(--c-icon-warning);
79
59
  }
80
60
 
81
- .cobalt-Icon--colorDisabledAlt {
82
- fill: var(--c-icon-disabledAlt);
61
+ .cobalt-Icon--colorInfoAlt {
62
+ fill: var(--c-icon-infoAlt);
83
63
  }
84
64
 
85
- .cobalt-Icon--colorInversed {
86
- fill: var(--c-icon-inversed);
65
+ .cobalt-Icon--colorDisabled {
66
+ fill: var(--c-icon-disabled);
87
67
  }
88
68
 
89
69
  .cobalt-Icon--colorOnAccent {
@@ -114,16 +94,42 @@
114
94
  fill: var(--c-icon-onPicked);
115
95
  }
116
96
 
97
+ .cobalt-Icon--colorKeyExchange {
98
+ fill: var(--c-icon-keyExchange);
99
+ }
100
+
101
+ .cobalt-Icon--colorPicked {
102
+ fill: var(--c-icon-picked);
103
+ }
104
+
105
+ .cobalt-Icon--colorRideshare {
106
+ fill: var(--c-icon-rideshare);
107
+ }
108
+
117
109
  .cobalt-Icon--colorOnBase {
118
110
  fill: var(--c-icon-onBase);
119
111
  }
120
112
 
113
+ .cobalt-Icon--colorDisabledAlt {
114
+ fill: var(--c-icon-disabledAlt);
115
+ }
116
+
117
+ .cobalt-Icon--colorOnRental {
118
+ fill: var(--c-icon-onRental);
119
+ }
120
+
121
+ .cobalt-Icon--colorInversed {
122
+ fill: var(--c-icon-inversed);
123
+ }
124
+
121
125
  .cobalt-Icon--colorBaseInteractive {
122
126
  fill: var(--c-icon-baseInteractive);
123
127
  }
124
128
 
125
129
  .cobalt-Icon--colorBaseInteractive:hover,
126
- .cobalt-Icon--colorBaseInteractive:focus {
130
+ .cobalt-Icon--colorBaseInteractive:focus,
131
+ .c-text-baseInteractive:hover .cobalt-Icon--colorBaseInteractive,
132
+ .c-text-baseInteractive:focus .cobalt-Icon--colorBaseInteractive {
127
133
  fill: var(--c-icon-baseInteractive--hover);
128
134
  }
129
135
 
@@ -132,7 +138,9 @@
132
138
  }
133
139
 
134
140
  .cobalt-Icon--colorSubduedInteractive:hover,
135
- .cobalt-Icon--colorSubduedInteractive:focus {
141
+ .cobalt-Icon--colorSubduedInteractive:focus,
142
+ .c-text-subduedInteractive:hover .cobalt-Icon--colorSubduedInteractive,
143
+ .c-text-subduedInteractive:focus .cobalt-Icon--colorSubduedInteractive {
136
144
  fill: var(--c-icon-subduedInteractive--hover);
137
145
  }
138
146
 
@@ -141,7 +149,9 @@
141
149
  }
142
150
 
143
151
  .cobalt-Icon--colorAccentInteractive:hover,
144
- .cobalt-Icon--colorAccentInteractive:focus {
152
+ .cobalt-Icon--colorAccentInteractive:focus,
153
+ .c-text-accentInteractive:hover .cobalt-Icon--colorAccentInteractive,
154
+ .c-text-accentInteractive:focus .cobalt-Icon--colorAccentInteractive {
145
155
  fill: var(--c-icon-accentInteractive--hover);
146
156
  }
147
157
 
@@ -150,6 +160,8 @@
150
160
  }
151
161
 
152
162
  .cobalt-Icon--colorAccentAltInteractive:hover,
153
- .cobalt-Icon--colorAccentAltInteractive:focus {
163
+ .cobalt-Icon--colorAccentAltInteractive:focus,
164
+ .c-text-accentAltInteractive:hover .cobalt-Icon--colorAccentAltInteractive,
165
+ .c-text-accentAltInteractive:focus .cobalt-Icon--colorAccentAltInteractive {
154
166
  fill: var(--c-icon-accentAltInteractive--hover);
155
167
  }
@@ -28,28 +28,44 @@
28
28
  margin-right: auto;
29
29
  }
30
30
 
31
- .cobalt-layout-flexibleWithConstraint--large {
32
- max-width: 1200px;
33
- }
31
+ @include class-with-responsive-variants(
32
+ "cobalt-layout-flexibleWithConstraint--large",
33
+ (
34
+ "max-width": 1200px
35
+ )
36
+ );
34
37
 
35
- .cobalt-layout-flexibleWithConstraint--medium {
36
- max-width: 840px;
37
- }
38
+ @include class-with-responsive-variants(
39
+ "cobalt-layout-flexibleWithConstraint--medium",
40
+ (
41
+ "max-width": 840px
42
+ )
43
+ );
38
44
 
39
- .cobalt-layout-flexibleWithConstraint--small {
40
- max-width: 540px;
41
- }
45
+ @include class-with-responsive-variants(
46
+ "cobalt-layout-flexibleWithConstraint--small",
47
+ (
48
+ "max-width": 540px
49
+ )
50
+ );
42
51
 
43
- .cobalt-layout-fixed--280 {
44
- width: 280px;
45
- }
52
+ @include class-with-responsive-variants(
53
+ "cobalt-layout-fixed--280",
54
+ (
55
+ "width": 280px
56
+ )
57
+ );
46
58
 
47
- .cobalt-layout-fixed--420 {
48
- width: 420px;
49
- }
50
-
51
- .cobalt-layout-fixed--600 {
52
- width: 600px;
53
- }
59
+ @include class-with-responsive-variants(
60
+ "cobalt-layout-fixed--420",
61
+ (
62
+ "width": 420px
63
+ )
64
+ );
54
65
 
55
- // 48px paddiing bottom
66
+ @include class-with-responsive-variants(
67
+ "cobalt-layout-fixed--600",
68
+ (
69
+ "width": 600px
70
+ )
71
+ );
@@ -15,9 +15,6 @@ $theme-colors-map: (
15
15
  successAlt: var(--c-background-successAlt),
16
16
  connect: var(--c-background-connect),
17
17
  connectAlt: var(--c-background-connectAlt),
18
- keyExchange: var(--c-background-keyExchange),
19
- picked: var(--c-background-picked),
20
- rideshare: var(--c-background-rideshare),
21
18
  driver: var(--c-background-driver),
22
19
  owner: var(--c-background-owner),
23
20
  disabled: var(--c-background-disabled),
@@ -26,9 +23,13 @@ $theme-colors-map: (
26
23
  seasonLow: var(--c-background-seasonLow),
27
24
  seasonMedium: var(--c-background-seasonMedium),
28
25
  seasonHigh: var(--c-background-seasonHigh),
29
- seasonVeryhigh: var(--c-background-seasonVeryhigh),
26
+ seasonVeryHigh: var(--c-background-seasonVeryHigh),
30
27
  rental: var(--c-background-rental),
28
+ rentalAlt: var(--c-background-rentalAlt),
31
29
  blocker: var(--c-background-blocker),
30
+ rideshare: var(--c-background-rideshare),
31
+ keyExchange: var(--c-background-keyExchange),
32
+ picked: var(--c-background-picked),
32
33
  base: var(--c-background-base),
33
34
  secondaryInteractive: (
34
35
  DEFAULT: var(--c-background-secondaryInteractive),
@@ -57,21 +58,17 @@ $theme-colors-map: (
57
58
  accent: var(--c-text-accent),
58
59
  accentAlt: var(--c-text-accentAlt),
59
60
  info: var(--c-text-info),
60
- infoAlt: var(--c-text-infoAlt),
61
61
  error: var(--c-text-error),
62
62
  errorAlt: var(--c-text-errorAlt),
63
63
  success: var(--c-text-success),
64
64
  successAlt: var(--c-text-successAlt),
65
- warning: var(--c-text-warning),
66
65
  connect: var(--c-text-connect),
67
66
  connectAlt: var(--c-text-connectAlt),
68
- keyExchange: var(--c-text-keyExchange),
69
- picked: var(--c-text-picked),
70
- rideshare: var(--c-text-rideshare),
71
67
  driver: var(--c-text-driver),
72
68
  owner: var(--c-text-owner),
69
+ warning: var(--c-text-warning),
70
+ infoAlt: var(--c-text-infoAlt),
73
71
  disabled: var(--c-text-disabled),
74
- inversed: var(--c-text-inversed),
75
72
  onAccent: var(--c-text-onAccent),
76
73
  onRideshare: var(--c-text-onRideshare),
77
74
  onError: var(--c-text-onError),
@@ -79,7 +76,17 @@ $theme-colors-map: (
79
76
  onConnect: var(--c-text-onConnect),
80
77
  onKeyExchange: var(--c-text-onKeyExchange),
81
78
  onPicked: var(--c-text-onPicked),
79
+ keyExchange: var(--c-text-keyExchange),
80
+ picked: var(--c-text-picked),
81
+ rideshare: var(--c-text-rideshare),
82
82
  onBase: var(--c-text-onBase),
83
+ onSeasonLow: var(--c-text-onSeasonLow),
84
+ onSeasonMedium: var(--c-text-onSeasonMedium),
85
+ onSeasonHigh: var(--c-text-onSeasonHigh),
86
+ onSeasonVeryHigh: var(--c-text-onSeasonVeryHigh),
87
+ onRental: var(--c-text-onRental),
88
+ onRentalAlt: var(--c-text-onRentalAlt),
89
+ inversed: var(--c-text-inversed),
83
90
  baseInteractive: (
84
91
  DEFAULT: var(--c-text-baseInteractive),
85
92
  hover: var(--c-text-baseInteractive--hover)
@@ -103,22 +110,17 @@ $theme-colors-map: (
103
110
  accent: var(--c-icon-accent),
104
111
  accentAlt: var(--c-icon-accentAlt),
105
112
  info: var(--c-icon-info),
106
- infoAlt: var(--c-icon-infoAlt),
107
113
  error: var(--c-icon-error),
108
114
  errorAlt: var(--c-icon-errorAlt),
109
115
  success: var(--c-icon-success),
110
116
  successAlt: var(--c-icon-successAlt),
111
- warning: var(--c-icon-warning),
112
117
  connect: var(--c-icon-connect),
113
118
  connectAlt: var(--c-icon-connectAlt),
114
- keyExchange: var(--c-icon-keyExchange),
115
- picked: var(--c-icon-picked),
116
- rideshare: var(--c-icon-rideshare),
117
119
  driver: var(--c-icon-driver),
118
120
  owner: var(--c-icon-owner),
121
+ warning: var(--c-icon-warning),
122
+ infoAlt: var(--c-icon-infoAlt),
119
123
  disabled: var(--c-icon-disabled),
120
- disabledAlt: var(--c-icon-disabledAlt),
121
- inversed: var(--c-icon-inversed),
122
124
  onAccent: var(--c-icon-onAccent),
123
125
  onRideshare: var(--c-icon-onRideshare),
124
126
  onError: var(--c-icon-onError),
@@ -126,7 +128,13 @@ $theme-colors-map: (
126
128
  onConnect: var(--c-icon-onConnect),
127
129
  onKeyExchange: var(--c-icon-onKeyExchange),
128
130
  onPicked: var(--c-icon-onPicked),
131
+ keyExchange: var(--c-icon-keyExchange),
132
+ picked: var(--c-icon-picked),
133
+ rideshare: var(--c-icon-rideshare),
129
134
  onBase: var(--c-icon-onBase),
135
+ disabledAlt: var(--c-icon-disabledAlt),
136
+ onRental: var(--c-icon-onRental),
137
+ inversed: var(--c-icon-inversed),
130
138
  baseInteractive: (
131
139
  DEFAULT: var(--c-icon-baseInteractive),
132
140
  hover: var(--c-icon-baseInteractive--hover)
@@ -147,26 +155,26 @@ $theme-colors-map: (
147
155
  stroke: (
148
156
  base: var(--c-stroke-base),
149
157
  subdued: var(--c-stroke-subdued),
150
- strong: var(--c-stroke-strong),
151
158
  accent: var(--c-stroke-accent),
152
159
  accentAlt: var(--c-stroke-accentAlt),
153
- error: var(--c-stroke-error),
154
- errorAlt: var(--c-stroke-errorAlt),
155
160
  success: var(--c-stroke-success),
156
161
  successAlt: var(--c-stroke-successAlt),
157
- connect: var(--c-stroke-connect),
158
- keyExchange: var(--c-stroke-keyExchange),
159
- picked: var(--c-stroke-picked),
160
- rideshare: var(--c-stroke-rideshare),
162
+ error: var(--c-stroke-error),
163
+ errorAlt: var(--c-stroke-errorAlt),
164
+ strong: var(--c-stroke-strong),
165
+ onAccent: var(--c-stroke-onAccent),
161
166
  rental: var(--c-stroke-rental),
162
167
  blocker: var(--c-stroke-blocker),
163
- onAccent: var(--c-stroke-onAccent),
164
168
  onError: var(--c-stroke-onError),
165
169
  onSuccess: var(--c-stroke-onSuccess),
170
+ connect: var(--c-stroke-connect),
171
+ keyExchange: var(--c-stroke-keyExchange),
172
+ picked: var(--c-stroke-picked),
166
173
  onConnect: var(--c-stroke-onConnect),
167
- onPicked: var(--c-stroke-onPicked),
168
174
  onKeyExchange: var(--c-stroke-onKeyExchange),
175
+ onPicked: var(--c-stroke-onPicked),
169
176
  onRideshare: var(--c-stroke-onRideshare),
177
+ rideshare: var(--c-stroke-rideshare),
170
178
  onBase: var(--c-stroke-onBase),
171
179
  baseInteractive: (
172
180
  DEFAULT: var(--c-stroke-baseInteractive),
@@ -256,6 +264,21 @@ $theme-colors-map: (
256
264
  press: var(--c-buttonLabel-successAltInteractive--press)
257
265
  )
258
266
  ),
267
+ fill: (
268
+ base: var(--c-fill-base),
269
+ accent: var(--c-fill-accent),
270
+ secondary: var(--c-fill-secondary),
271
+ subdued: var(--c-fill-subdued),
272
+ neutral: var(--c-fill-neutral),
273
+ negative: var(--c-fill-negative),
274
+ accentAlt: var(--c-fill-accentAlt),
275
+ disabled: var(--c-fill-disabled),
276
+ error: var(--c-fill-error),
277
+ success: var(--c-fill-success),
278
+ rental: var(--c-fill-rental),
279
+ blocker: var(--c-fill-blocker),
280
+ primary: var(--c-fill-primary)
281
+ ),
259
282
  buttonBackground: (
260
283
  selected: var(--c-buttonBackground-selected),
261
284
  primary: var(--c-buttonBackground-primary),
@@ -292,21 +315,6 @@ $theme-colors-map: (
292
315
  press: var(--c-buttonBackground-successAltInteractive--press)
293
316
  )
294
317
  ),
295
- fill: (
296
- base: var(--c-fill-base),
297
- subdued: var(--c-fill-subdued),
298
- secondary: var(--c-fill-secondary),
299
- accent: var(--c-fill-accent),
300
- accentAlt: var(--c-fill-accentAlt),
301
- error: var(--c-fill-error),
302
- success: var(--c-fill-success),
303
- neutral: var(--c-fill-neutral),
304
- negative: var(--c-fill-negative),
305
- disabled: var(--c-fill-disabled),
306
- rental: var(--c-fill-rental),
307
- blocker: var(--c-fill-blocker),
308
- primary: var(--c-fill-primary)
309
- ),
310
318
  illustrations: (
311
319
  primary: var(--c-illustrations-primary),
312
320
  secondary: var(--c-illustrations-secondary),
@@ -47,3 +47,23 @@ $breakpoint-data: (
47
47
  @content;
48
48
  }
49
49
  }
50
+
51
+ // Mixin to generate the same properties for all breakpoints
52
+ @mixin class-with-responsive-variants($class-name, $properties) {
53
+ .#{$class-name} {
54
+ @each $property, $value in $properties {
55
+ #{$property}: $value;
56
+ }
57
+ }
58
+
59
+ // Loop through the breakpoints and generate prefixed classes for all breakpoints
60
+ @each $breakpoint, $breakpoint-value in $breakpoint-data {
61
+ @media (min-width: $breakpoint-value) {
62
+ .#{$breakpoint}\:#{$class-name} {
63
+ @each $property, $value in $properties {
64
+ #{$property}: $value;
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }