@drivy/cobalt 1.1.3 → 1.1.5

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 (58) hide show
  1. package/components/Icon/__generated__/StarHalfIcon.js +2 -2
  2. package/components/Icon/__generated__/StarHalfIcon.js.map +1 -1
  3. package/components/Icon/__generated__/StarIcon.js +2 -2
  4. package/components/Icon/__generated__/StarIcon.js.map +1 -1
  5. package/components/PhotoDropzone/index.js +1 -1
  6. package/components/PhotoDropzone/index.js.map +1 -1
  7. package/icons/star-half.js +1 -1
  8. package/icons/star-half.svg +1 -1
  9. package/icons/star.js +1 -1
  10. package/icons/star.svg +1 -1
  11. package/package.json +15 -15
  12. package/styles/components/BasicCell/index.scss +8 -10
  13. package/styles/components/BulletList/index.scss +3 -3
  14. package/styles/components/Buttons/DefaultButton/index.scss +1 -1
  15. package/styles/components/Buttons/GhostButton/index.scss +2 -4
  16. package/styles/components/Buttons/index.scss +9 -9
  17. package/styles/components/Calendar/CalendarDayPicker/index.scss +10 -11
  18. package/styles/components/Calendar/CalendarRangePicker/index.scss +20 -21
  19. package/styles/components/Calendar/CalendarView/index.scss +11 -13
  20. package/styles/components/Callout/index.scss +5 -16
  21. package/styles/components/Card/index.scss +11 -17
  22. package/styles/components/Cell/index.scss +6 -4
  23. package/styles/components/Chip/index.scss +8 -10
  24. package/styles/components/ContainedIcon/index.scss +11 -11
  25. package/styles/components/EmptyState/index.scss +6 -12
  26. package/styles/components/Flash/index.scss +7 -13
  27. package/styles/components/Form/Autocomplete/index.scss +1 -3
  28. package/styles/components/Form/CheckablePill.scss +9 -19
  29. package/styles/components/Form/Checkmark.scss +14 -23
  30. package/styles/components/Form/ComposedField.scss +2 -2
  31. package/styles/components/Form/Fieldset.scss +6 -9
  32. package/styles/components/Form/Hint.scss +4 -8
  33. package/styles/components/Form/RadioWithDetails.scss +11 -16
  34. package/styles/components/Form/Select.scss +2 -2
  35. package/styles/components/Form/Stepper.scss +7 -8
  36. package/styles/components/Form/TextArea.scss +4 -4
  37. package/styles/components/Form/TextInput.scss +2 -2
  38. package/styles/components/Form/ToggleSwitch.scss +12 -15
  39. package/styles/components/Form/field.scss +8 -6
  40. package/styles/components/Form/form.scss +8 -12
  41. package/styles/components/Helper/index.scss +4 -9
  42. package/styles/components/Icon/index.scss +4 -6
  43. package/styles/components/Pagination/index.scss +1 -1
  44. package/styles/components/PhotoDropzone/index.scss +34 -14
  45. package/styles/components/Pill/index.scss +7 -17
  46. package/styles/components/PlateNumber/index.scss +1 -7
  47. package/styles/components/Popover/index.scss +20 -19
  48. package/styles/components/PriceTable/index.scss +6 -5
  49. package/styles/components/ProgressBanner/index.scss +5 -18
  50. package/styles/components/ProgressBar/index.scss +6 -16
  51. package/styles/components/ProgressCircular/index.scss +5 -5
  52. package/styles/components/Rating/index.scss +4 -5
  53. package/styles/components/Sidepanel/index.scss +4 -4
  54. package/styles/components/TabBar/index.scss +10 -9
  55. package/styles/components/Tabs/index.scss +1 -2
  56. package/styles/components/Tag/index.scss +11 -23
  57. package/styles/core/global-variables.scss +1 -1
  58. package/types/src/components/PhotoDropzone/index.d.ts +1 -1
@@ -47,21 +47,20 @@
47
47
  display: flex;
48
48
  flex-direction: column;
49
49
  justify-content: center;
50
- gap: spacing(md);
50
+ @apply c-gap-md;
51
51
 
52
52
  @include breakpoint($from: sm) {
53
53
  flex-direction: row;
54
- gap: spacing(sm);
54
+ @apply c-gap-sm;
55
55
  }
56
56
  }
57
57
 
58
58
  &__month {
59
- @include bg-color(secondary);
59
+ @apply c-bg-secondary;
60
60
  }
61
61
 
62
62
  &__month-header {
63
- @include c-text-title-sm;
64
- @include text-color(base);
63
+ @apply c-text-title-sm c-text-base;
65
64
  margin-bottom: 12px;
66
65
  padding: 4px;
67
66
 
@@ -87,7 +86,7 @@
87
86
  }
88
87
 
89
88
  &__month__day-header {
90
- @include text-color(subdued);
89
+ @apply c-text-subdued;
91
90
  flex: 1;
92
91
 
93
92
  text-align: center;
@@ -97,7 +96,7 @@
97
96
  }
98
97
 
99
98
  &__day {
100
- @include text-color(base);
99
+ @apply c-text-base;
101
100
 
102
101
  position: relative;
103
102
 
@@ -147,22 +146,22 @@
147
146
  }
148
147
 
149
148
  &--today {
150
- @include text-color(accent);
149
+ @apply c-text-accent;
151
150
  font-weight: 600;
152
151
  }
153
152
 
154
153
  &--selected {
155
- @include text-color(accent);
154
+ @apply c-text-accent;
156
155
 
157
156
  background-color: $calendar-range-day-color;
158
157
 
159
158
  .cobalt-CalendarRangePicker__day-notification {
160
- @include bg-color(accent);
159
+ @apply c-bg-accent;
161
160
  }
162
161
  }
163
162
 
164
163
  &--disabled {
165
- @include text-color(disabled);
164
+ @apply c-text-disabled;
166
165
 
167
166
  text-decoration: line-through;
168
167
  }
@@ -199,19 +198,19 @@
199
198
  }
200
199
 
201
200
  &--active:not(&--invalid) {
202
- @include text-color(onAccent);
201
+ @apply c-text-onAccent;
203
202
  }
204
203
 
205
204
  &--active .cobalt-CalendarRangePicker__day-notification {
206
- @include bg-color(primary);
205
+ @apply c-bg-primary;
207
206
  }
208
207
 
209
208
  &--active:not(&--invalid):after {
210
- @include bg-color(accent);
209
+ @apply c-bg-accent;
211
210
  }
212
211
 
213
212
  &--invalid {
214
- @include text-color(error);
213
+ @apply c-text-error;
215
214
 
216
215
  background-color: $calendar-range-day-invalid-color;
217
216
 
@@ -220,7 +219,7 @@
220
219
  }
221
220
 
222
221
  .cobalt-CalendarRangePicker__day-notification {
223
- @include bg-color(error);
222
+ @apply c-bg-error;
224
223
  }
225
224
  }
226
225
 
@@ -228,13 +227,13 @@
228
227
  &--range
229
228
  ):not(&--startDay) {
230
229
  &:after {
231
- @include bg-color(primary);
230
+ @apply c-bg-primary;
232
231
  }
233
232
  }
234
233
 
235
234
  &--endDay.cobalt-CalendarRangePicker__day--active.cobalt-CalendarRangePicker__day--invalid {
236
235
  &:after {
237
- @include border(error);
236
+ @apply c-border c-border-error;
238
237
  border-width: 2px;
239
238
  }
240
239
  }
@@ -242,7 +241,7 @@
242
241
  //Start day = end day
243
242
  &--startDay.cobalt-CalendarRangePicker__day--endDay {
244
243
  &:before {
245
- @include border(onAccent);
244
+ @apply c-border c-border-onAccent;
246
245
 
247
246
  position: absolute;
248
247
 
@@ -283,7 +282,7 @@
283
282
 
284
283
  margin: 0;
285
284
 
286
- padding: 0 spacing(sm);
285
+ @apply c-py-none c-px-sm;
287
286
 
288
287
  height: 0;
289
288
 
@@ -306,7 +305,7 @@
306
305
  }
307
306
 
308
307
  .tippy-box[data-theme~="range-picker"] {
309
- @include border(base);
308
+ @apply c-border c-border-base;
310
309
  }
311
310
 
312
311
  .tippy-box[data-theme~="range-picker"] .tippy-arrow:after {
@@ -1,24 +1,25 @@
1
1
  @use "sass:math";
2
2
 
3
- $daySize: spacing(md);
3
+ // Define $daySize using the Tailwind theme function
4
+ $daySize: theme("spacing.md");
4
5
 
5
6
  .cobalt-CalendarView {
6
7
  display: flex;
7
8
 
8
- gap: spacing(sm);
9
+ @apply c-gap-sm;
9
10
 
10
11
  &__monthName {
11
- @include c-text-section-heading;
12
+ @apply c-text-section-heading;
12
13
  }
13
14
 
14
15
  &__week {
15
16
  display: flex;
16
17
 
17
- gap: spacing(unit);
18
+ @apply c-gap-2xs;
18
19
  }
19
20
 
20
21
  &__day {
21
- @include text-color(base);
22
+ @apply c-text-base;
22
23
 
23
24
  display: flex;
24
25
  align-items: center;
@@ -29,25 +30,22 @@ $daySize: spacing(md);
29
30
 
30
31
  font-size: 12px;
31
32
 
32
- border-radius: math.div($daySize, 2);
33
+ border-radius: calc(#{$daySize} / 2);
33
34
 
34
35
  &--disabled {
35
- @include bg-color(blocker);
36
- @include text-color(subdued);
36
+ @apply c-bg-blocker c-text-subdued;
37
37
  }
38
38
 
39
39
  &--highlighted {
40
- @include text-color(onRental);
41
- @include bg-color(rental);
40
+ @apply c-text-onRental c-bg-rental;
42
41
  }
43
42
 
44
43
  &--semi-highlighted {
45
- @include text-color(onRentalAlt);
46
- @include bg-color(rentalAlt);
44
+ @apply c-text-onRentalAlt c-bg-rentalAlt;
47
45
  }
48
46
 
49
47
  &--past {
50
- @include text-color(subdued);
48
+ @apply c-text-subdued;
51
49
  opacity: 0.4;
52
50
  }
53
51
  }
@@ -1,18 +1,9 @@
1
1
  .cobalt- {
2
2
  &Callout {
3
- @include c-text-body-md;
4
- @include text-color(base);
5
- @include bg-color(secondary);
3
+ @apply c-text-body-md c-text-base c-bg-secondary c-rounded c-shadow c-p-sm c-mb-md;
6
4
 
7
5
  position: relative;
8
6
 
9
- padding: spacing(sm);
10
- margin-bottom: spacing(md);
11
-
12
- border-radius: 3px;
13
-
14
- box-shadow: elevation(base);
15
-
16
7
  &:before {
17
8
  position: absolute;
18
9
  left: 0;
@@ -31,26 +22,24 @@
31
22
 
32
23
  &Callout--info {
33
24
  &:before {
34
- @include fill-bg-color(secondary);
25
+ @apply c-bg-fill-secondary;
35
26
  }
36
27
  }
37
28
 
38
29
  &Callout--success {
39
30
  &:before {
40
- @include fill-bg-color(success);
31
+ @apply c-bg-fill-success;
41
32
  }
42
33
  }
43
34
 
44
35
  &Callout--error {
45
36
  &:before {
46
- @include fill-bg-color(error);
37
+ @apply c-bg-fill-error;
47
38
  }
48
39
  }
49
40
 
50
41
  &Callout__Title {
51
- @include c-text-title-sm;
52
-
53
- margin-bottom: spacing(xs);
42
+ @apply c-text-title-sm c-mb-xs;
54
43
  }
55
44
 
56
45
  &Callout__Close {
@@ -1,19 +1,15 @@
1
1
  .cobalt- {
2
- $card-border-radius: border-radius(xl);
3
2
  // deprecated
4
3
  $legacy-card-padding-tight: 12px;
5
4
 
6
5
  &Card {
7
- @include bg-color(secondary);
8
- @include border(base);
6
+ @apply c-bg-secondary c-border c-border-base c-rounded-xl;
9
7
  width: 100%;
10
8
 
11
- border-radius: $card-border-radius;
12
-
13
9
  &--legacy {
14
10
  border: 0;
15
11
 
16
- box-shadow: elevation(base);
12
+ @apply c-shadow;
17
13
  }
18
14
 
19
15
  &--responsive {
@@ -26,7 +22,7 @@
26
22
  }
27
23
 
28
24
  &Card__Section {
29
- @include bg-color(secondary);
25
+ @apply c-bg-secondary;
30
26
  position: relative;
31
27
 
32
28
  display: block;
@@ -34,17 +30,17 @@
34
30
  }
35
31
 
36
32
  &Card__Section--subdued {
37
- @include bg-color(neutralAlt);
33
+ @apply c-bg-neutralAlt;
38
34
  }
39
35
 
40
36
  &Card__Section + &Card__Section--divided {
41
- @include border-top(subdued);
37
+ @apply c-border-t c-border-subdued;
42
38
  padding-top: $card-padding - 1px;
43
39
  }
44
40
 
45
41
  &Card__Section + &Card__Section--dividedSoft {
46
42
  &:before {
47
- @include bg-color(neutral);
43
+ @apply c-bg-neutral;
48
44
 
49
45
  position: absolute;
50
46
  top: 0;
@@ -73,28 +69,26 @@
73
69
  // first-of-class, source: https://stackoverflow.com/questions/2717480/css-selector-for-first-element-with-class
74
70
  &Card
75
71
  > .cobalt-Card__Section:not(.cobalt-Card__Section ~ .cobalt-Card__Section) {
76
- border-top-left-radius: $card-border-radius;
77
- border-top-right-radius: $card-border-radius;
72
+ @apply c-rounded-t-xl;
78
73
  }
79
74
 
80
75
  // No last-of-class hack found for now
81
76
  &Card > .cobalt-Card__Section:last-of-type {
82
- border-bottom-right-radius: $card-border-radius;
83
- border-bottom-left-radius: $card-border-radius;
77
+ @apply c-rounded-b-xl;
84
78
  }
85
79
  }
86
80
 
87
81
  a.cobalt-Card__Section[href] {
88
- z-index: zx();
82
+ z-index: theme("zIndex.base");
89
83
 
90
84
  text-decoration: inherit;
91
85
 
92
86
  transition: 150ms ease-out;
93
87
 
94
88
  &:hover {
95
- z-index: zx("above");
89
+ z-index: theme("zIndex.above");
96
90
 
97
- box-shadow: elevation(base);
91
+ @apply c-shadow;
98
92
 
99
93
  transform: scale(1.01);
100
94
  }
@@ -3,7 +3,7 @@
3
3
  position: relative;
4
4
 
5
5
  &--divided {
6
- @include border-top(base);
6
+ @apply c-border-t c-border-base;
7
7
 
8
8
  &:first-of-type {
9
9
  border-top: 0;
@@ -12,15 +12,17 @@
12
12
 
13
13
  &--softDivided {
14
14
  &::before {
15
- @include semantic-color(stroke, base, background-color);
16
-
17
15
  position: absolute;
16
+
18
17
  top: 0;
19
18
  right: 0;
20
19
 
21
20
  display: block;
21
+
22
22
  height: 1px;
23
- width: calc(100% - #{spacing(sm)});
23
+ width: calc(100% - #{theme("spacing.sm")});
24
+
25
+ background-color: theme("semanticBorderColor.base");
24
26
 
25
27
  content: "";
26
28
  }
@@ -5,8 +5,7 @@ $chip-large-height: 50px;
5
5
 
6
6
  .cobalt- {
7
7
  &Chip {
8
- @include border(base);
9
- @include bg-color(secondary);
8
+ @apply c-border c-border-base c-bg-secondary;
10
9
 
11
10
  position: relative;
12
11
 
@@ -22,7 +21,7 @@ $chip-large-height: 50px;
22
21
  }
23
22
 
24
23
  &Chip--interactive {
25
- @include border-color(baseInteractive);
24
+ @apply c-border-baseInteractive;
26
25
 
27
26
  &:not([disabled]) {
28
27
  cursor: pointer;
@@ -41,21 +40,20 @@ $chip-large-height: 50px;
41
40
  }
42
41
 
43
42
  &Chip--large &Chip__Text {
44
- padding: 0 spacing(sm) 0 spacing(xs);
43
+ padding: 0 theme("spacing.sm") 0 theme("spacing.xs");
45
44
  }
46
45
 
47
46
  &Chip--disabled {
48
- @include bg-color(disabled);
47
+ @apply c-bg-disabled;
49
48
  opacity: 0.5;
50
49
  }
51
50
 
52
51
  &Chip--active {
53
- @include bg-color(accentAlt);
54
- @include border-color(accentAlt);
52
+ @apply c-bg-accentAlt c-border-accentAlt;
55
53
  }
56
54
 
57
55
  &Chip--active &Chip__Text {
58
- @include text-color(accentAlt);
56
+ @apply c-text-accentAlt;
59
57
  }
60
58
 
61
59
  &Chip__Content {
@@ -78,9 +76,9 @@ $chip-large-height: 50px;
78
76
  }
79
77
 
80
78
  &Chip__Text {
81
- @include c-text-section-heading;
79
+ @apply c-text-section-heading;
82
80
 
83
- padding: 0 spacing(xs);
81
+ padding: 0 theme("spacing.xs");
84
82
 
85
83
  text-overflow: ellipsis;
86
84
 
@@ -11,7 +11,7 @@
11
11
 
12
12
  flex-shrink: 0;
13
13
 
14
- border-radius: border-radius(lg);
14
+ @apply c-rounded-lg;
15
15
 
16
16
  .cobalt-Icon {
17
17
  @include semantic-color(icon, base, fill);
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  &--colorConnect {
54
- @include bg-color(connect);
54
+ @apply c-bg-connect;
55
55
 
56
56
  .cobalt-Icon {
57
57
  @include semantic-color(icon, onConnect, fill);
@@ -59,7 +59,7 @@
59
59
  }
60
60
 
61
61
  &--colorKeyExchange {
62
- @include bg-color(keyExchange);
62
+ @apply c-bg-keyExchange;
63
63
 
64
64
  .cobalt-Icon {
65
65
  @include semantic-color(icon, onKeyExchange, fill);
@@ -67,7 +67,7 @@
67
67
  }
68
68
 
69
69
  &--colorRideshare {
70
- @include bg-color(rideshare);
70
+ @apply c-bg-rideshare;
71
71
 
72
72
  .cobalt-Icon {
73
73
  @include semantic-color(icon, onRideshare, fill);
@@ -75,11 +75,11 @@
75
75
  }
76
76
 
77
77
  &--colorBaseAlt {
78
- @include bg-color(neutralAlt);
78
+ @apply c-bg-neutralAlt;
79
79
  }
80
80
 
81
81
  &--colorAccentAlt {
82
- @include bg-color(accentAlt);
82
+ @apply c-bg-accentAlt;
83
83
 
84
84
  .cobalt-Icon {
85
85
  @include semantic-color(icon, accent, fill);
@@ -87,7 +87,7 @@
87
87
  }
88
88
 
89
89
  &--colorDisabledAlt {
90
- @include bg-color(disabled);
90
+ @apply c-bg-disabled;
91
91
 
92
92
  .cobalt-Icon {
93
93
  @include semantic-color(icon, subdued, fill);
@@ -95,7 +95,7 @@
95
95
  }
96
96
 
97
97
  &--colorErrorAlt {
98
- @include bg-color(errorAlt);
98
+ @apply c-bg-errorAlt;
99
99
 
100
100
  .cobalt-Icon {
101
101
  @include semantic-color(icon, error, fill);
@@ -103,7 +103,7 @@
103
103
  }
104
104
 
105
105
  &--colorInfoAlt {
106
- @include bg-color(info);
106
+ @apply c-bg-info;
107
107
 
108
108
  .cobalt-Icon {
109
109
  @include semantic-color(icon, info, fill);
@@ -111,7 +111,7 @@
111
111
  }
112
112
 
113
113
  &--colorSuccessAlt {
114
- @include bg-color(successAlt);
114
+ @apply c-bg-successAlt;
115
115
 
116
116
  .cobalt-Icon {
117
117
  @include semantic-color(icon, successAlt, fill);
@@ -119,7 +119,7 @@
119
119
  }
120
120
 
121
121
  &--colorConnectAlt {
122
- @include bg-color(connectAlt);
122
+ @apply c-bg-connectAlt;
123
123
 
124
124
  .cobalt-Icon {
125
125
  @include semantic-color(icon, connectAlt, fill);
@@ -1,34 +1,28 @@
1
1
  .cobalt- {
2
2
  &EmptyState {
3
- max-width: spacing("2xs") * 120;
3
+ @apply c-p-sm;
4
+ max-width: calc(120 * theme("spacing.2xs"));
4
5
  margin-left: auto;
5
6
  margin-right: auto;
6
- padding: spacing(sm);
7
7
 
8
8
  text-align: center;
9
9
 
10
10
  @include breakpoint($from: md) {
11
- padding: spacing(lg);
11
+ @apply c-p-lg;
12
12
  }
13
13
  }
14
14
 
15
15
  &EmptyState__Image {
16
+ @apply c-mb-md;
16
17
  max-width: 100%;
17
18
  height: auto;
18
-
19
- margin-bottom: spacing(md);
20
19
  }
21
20
 
22
21
  &EmptyState__Title {
23
- @include c-text-title-sm;
24
-
25
- margin-bottom: spacing(xs);
22
+ @apply c-text-title-sm c-mb-xs;
26
23
  }
27
24
 
28
25
  &EmptyState__Body {
29
- @include c-text-body-md;
30
- @include text-color(subdued);
31
-
32
- margin-bottom: spacing(md);
26
+ @apply c-text-body-md c-text-subdued c-mb-md;
33
27
  }
34
28
  }
@@ -1,30 +1,24 @@
1
1
  .cobalt- {
2
2
  &Flash {
3
- @include c-text-body-md;
3
+ @apply c-text-body-md c-rounded-md c-shadow-lg;
4
4
 
5
5
  max-width: 800px;
6
6
 
7
7
  display: inline-block;
8
8
 
9
- padding: spacing(sm) spacing(md) spacing(sm) spacing(sm);
10
-
11
- border-radius: border-radius(md);
12
-
13
- box-shadow: elevation(lg);
9
+ padding: theme("spacing.sm") theme("spacing.md") theme("spacing.sm")
10
+ theme("spacing.sm");
14
11
 
15
12
  &--info {
16
- @include bg-color(info);
17
- @include text-color(info);
13
+ @apply c-bg-info c-text-info;
18
14
  }
19
15
 
20
16
  &--success {
21
- @include bg-color(successAlt);
22
- @include text-color(successAlt);
17
+ @apply c-bg-successAlt c-text-successAlt;
23
18
  }
24
19
 
25
20
  &--error {
26
- @include bg-color(errorAlt);
27
- @include text-color(errorAlt);
21
+ @apply c-bg-errorAlt c-text-errorAlt;
28
22
  }
29
23
  }
30
24
 
@@ -35,7 +29,7 @@
35
29
  }
36
30
 
37
31
  &Flash__Icon {
38
- margin-right: spacing(xs);
32
+ @apply c-mr-xs;
39
33
  min-width: 20px;
40
34
  }
41
35
  }
@@ -75,14 +75,12 @@
75
75
  }
76
76
 
77
77
  &__item-wrapper {
78
- @apply c-gap-xs;
78
+ @apply c-gap-xs c-py-xs c-pr-2xs c-pl-[11px];
79
79
 
80
80
  display: flex;
81
81
  justify-content: space-between;
82
82
 
83
83
  width: 100%;
84
-
85
- padding: spacing(xs) spacing("2xs") spacing(xs) 11px;
86
84
  }
87
85
 
88
86
  &__item-wrapper--disabled {