@drivy/cobalt 1.1.3 → 1.1.4

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 (56) 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/icons/star-half.js +1 -1
  6. package/icons/star-half.svg +1 -1
  7. package/icons/star.js +1 -1
  8. package/icons/star.svg +1 -1
  9. package/package.json +15 -15
  10. package/styles/components/BasicCell/index.scss +8 -10
  11. package/styles/components/BulletList/index.scss +3 -3
  12. package/styles/components/Buttons/DefaultButton/index.scss +1 -1
  13. package/styles/components/Buttons/GhostButton/index.scss +2 -4
  14. package/styles/components/Buttons/index.scss +9 -9
  15. package/styles/components/Calendar/CalendarDayPicker/index.scss +10 -11
  16. package/styles/components/Calendar/CalendarRangePicker/index.scss +20 -21
  17. package/styles/components/Calendar/CalendarView/index.scss +11 -13
  18. package/styles/components/Callout/index.scss +5 -16
  19. package/styles/components/Card/index.scss +11 -17
  20. package/styles/components/Cell/index.scss +6 -4
  21. package/styles/components/Chip/index.scss +8 -10
  22. package/styles/components/ContainedIcon/index.scss +11 -11
  23. package/styles/components/EmptyState/index.scss +6 -12
  24. package/styles/components/Flash/index.scss +7 -13
  25. package/styles/components/Form/Autocomplete/index.scss +1 -3
  26. package/styles/components/Form/CheckablePill.scss +9 -19
  27. package/styles/components/Form/Checkmark.scss +14 -23
  28. package/styles/components/Form/ComposedField.scss +2 -2
  29. package/styles/components/Form/Fieldset.scss +6 -9
  30. package/styles/components/Form/Hint.scss +4 -8
  31. package/styles/components/Form/RadioWithDetails.scss +11 -16
  32. package/styles/components/Form/Select.scss +2 -2
  33. package/styles/components/Form/Stepper.scss +7 -8
  34. package/styles/components/Form/TextArea.scss +4 -4
  35. package/styles/components/Form/TextInput.scss +2 -2
  36. package/styles/components/Form/ToggleSwitch.scss +12 -15
  37. package/styles/components/Form/field.scss +8 -6
  38. package/styles/components/Form/form.scss +8 -12
  39. package/styles/components/Helper/index.scss +4 -9
  40. package/styles/components/Icon/index.scss +4 -6
  41. package/styles/components/Pagination/index.scss +1 -1
  42. package/styles/components/PhotoDropzone/index.scss +9 -12
  43. package/styles/components/Pill/index.scss +7 -17
  44. package/styles/components/PlateNumber/index.scss +1 -7
  45. package/styles/components/Popover/index.scss +20 -19
  46. package/styles/components/PriceTable/index.scss +6 -5
  47. package/styles/components/ProgressBanner/index.scss +5 -18
  48. package/styles/components/ProgressBar/index.scss +6 -16
  49. package/styles/components/ProgressCircular/index.scss +5 -5
  50. package/styles/components/Rating/index.scss +4 -5
  51. package/styles/components/Sidepanel/index.scss +4 -4
  52. package/styles/components/TabBar/index.scss +10 -9
  53. package/styles/components/Tabs/index.scss +1 -2
  54. package/styles/components/Tag/index.scss +11 -23
  55. package/styles/core/global-variables.scss +1 -1
  56. package/utils/getCobaltTailwindcssConfig.js.map +1 -1
@@ -4,35 +4,36 @@
4
4
 
5
5
  [data-theme~="cobalt-popover"] {
6
6
  &.tippy-box {
7
- @include bg-color(secondary);
8
- @include text-color(base);
9
-
10
- box-shadow: elevation(lg);
11
-
12
- border-radius: border-radius(lg);
7
+ @apply c-bg-secondary c-text-base c-shadow-lg c-rounded-lg;
13
8
  }
14
9
 
15
10
  .tippy-content {
16
11
  padding: 0;
17
12
  min-width: 16rem;
18
13
 
19
- border-radius: border-radius(lg);
14
+ @apply c-rounded-lg;
20
15
  }
21
16
 
22
17
  &[data-placement^="top"] > .tippy-arrow::before {
23
- border-top-color: color-var(background, secondary) !important;
18
+ border-top-color: var(--theme-semanticBackgroundColor-secondary) !important;
24
19
  }
25
20
 
26
21
  &[data-placement^="bottom"] > .tippy-arrow::before {
27
- border-bottom-color: color-var(background, secondary) !important;
22
+ border-bottom-color: var(
23
+ --theme-semanticBackgroundColor-secondary
24
+ ) !important;
28
25
  }
29
26
 
30
27
  &[data-placement^="left"] > .tippy-arrow::before {
31
- border-left-color: color-var(background, secondary) !important;
28
+ border-left-color: var(
29
+ --theme-semanticBackgroundColor-secondary
30
+ ) !important;
32
31
  }
33
32
 
34
33
  &[data-placement^="right"] > .tippy-arrow::before {
35
- border-right-color: color-var(background, secondary) !important;
34
+ border-right-color: var(
35
+ --theme-semanticBackgroundColor-secondary
36
+ ) !important;
36
37
  }
37
38
  }
38
39
 
@@ -44,27 +45,27 @@
44
45
 
45
46
  [data-theme~="cobalt-popover--withArrow"] {
46
47
  &.tippy-box {
47
- border-radius: border-radius(xl);
48
+ @apply c-rounded-xl;
48
49
  }
49
50
 
50
51
  .tippy-content {
51
- border-radius: border-radius(xl);
52
+ @apply c-rounded-xl;
52
53
  }
53
54
  }
54
55
 
55
56
  .cobalt-popover--bodySpacing {
56
- padding: spacing(md);
57
+ padding: theme("spacing.md");
57
58
  }
58
59
 
59
60
  .use-cobalt-dark-theme {
60
61
  [data-theme~="cobalt-popover"] {
61
- box-shadow: 0 0 0 1px color-var(stroke, base);
62
+ box-shadow: 0 0 0 1px var(--theme-semanticBorderColor-base);
62
63
 
63
64
  &[data-placement^="top"] > .tippy-arrow {
64
65
  bottom: -1px;
65
66
 
66
67
  &::before {
67
- border-top-color: color-var(stroke, base) !important;
68
+ border-top-color: var(--theme-semanticBorderColor-base) !important;
68
69
  }
69
70
  }
70
71
 
@@ -72,7 +73,7 @@
72
73
  top: -1px;
73
74
 
74
75
  &::before {
75
- border-bottom-color: color-var(stroke, base) !important;
76
+ border-bottom-color: var(--theme-semanticBorderColor-base) !important;
76
77
  }
77
78
  }
78
79
 
@@ -80,7 +81,7 @@
80
81
  right: -1px;
81
82
 
82
83
  &::before {
83
- border-left-color: color-var(stroke, base) !important;
84
+ border-left-color: var(--theme-semanticBorderColor-base) !important;
84
85
  }
85
86
  }
86
87
 
@@ -88,7 +89,7 @@
88
89
  left: -1px;
89
90
 
90
91
  &::before {
91
- border-right-color: color-var(stroke, base) !important;
92
+ border-right-color: var(--theme-semanticBorderColor-base) !important;
92
93
  }
93
94
  }
94
95
  }
@@ -1,17 +1,18 @@
1
1
  .cobalt- {
2
2
  &PriceTable__Row {
3
- @include c-text-body-md;
3
+ @apply c-text-body-md;
4
4
 
5
5
  display: flex;
6
6
  justify-content: space-between;
7
7
 
8
8
  &:not(:last-child) {
9
- margin-bottom: spacing(sm);
9
+ @apply c-mb-sm;
10
10
  }
11
11
  }
12
12
 
13
13
  &PriceTable__Label {
14
- margin-right: spacing("2xs");
14
+ @apply c-mr-2xs;
15
+
15
16
  width: 100%;
16
17
  }
17
18
 
@@ -20,11 +21,11 @@
20
21
  white-space: nowrap;
21
22
 
22
23
  &--discount {
23
- @include text-color(success);
24
+ @apply c-text-success;
24
25
  }
25
26
 
26
27
  &:empty:before {
27
- @include text-color(subdued);
28
+ @apply c-text-subdued;
28
29
  font-weight: normal;
29
30
 
30
31
  content: "—";
@@ -1,46 +1,34 @@
1
1
  .cobalt-progressBanner {
2
- @include bg-color(info);
3
- @include text-color(info);
2
+ @apply c-bg-info c-text-info c-rounded-xl c-p-sm c-gap-sm;
4
3
 
5
4
  display: inline-flex;
6
5
  align-items: center;
7
6
 
8
- padding: spacing(sm);
9
-
10
- border-radius: border-radius(xl);
11
-
12
- gap: spacing(sm);
13
-
14
7
  &__progress-container {
15
8
  font-weight: 600;
16
9
  }
17
10
 
18
11
  &__completed-icon-container {
19
- @include bg-color(primary);
12
+ @apply c-bg-primary c-rounded-full c-w-xl c-h-xl;
20
13
 
21
14
  display: flex;
22
15
 
23
16
  justify-content: center;
24
17
  align-items: center;
25
18
 
26
- width: spacing(xl);
27
- height: spacing(xl);
28
-
29
19
  margin: 0 5px; // ProgressCircular stroke width
30
20
 
31
21
  flex-shrink: 0;
32
-
33
- border-radius: 50%;
34
22
  }
35
23
 
36
24
  &__text-container {
25
+ @apply c-gap-2xs;
37
26
  display: flex;
38
27
  flex-direction: column;
39
- gap: spacing("2xs");
40
28
  }
41
29
 
42
30
  &__title {
43
- @include c-text-title-xs;
31
+ @apply c-text-title-xs;
44
32
  }
45
33
 
46
34
  &__description {
@@ -48,8 +36,7 @@
48
36
  }
49
37
 
50
38
  &--completed {
51
- @include bg-color(successAlt);
52
- @include text-color(successAlt);
39
+ @apply c-bg-successAlt c-text-successAlt;
53
40
  }
54
41
 
55
42
  &__completed-icon-container--animated .cobalt-Icon {
@@ -6,53 +6,43 @@
6
6
  }
7
7
 
8
8
  &ProgressBar__Progression {
9
- @include c-text-title-md;
10
- @include text-color(infoAlt);
9
+ @apply c-text-title-md c-text-infoAlt;
11
10
  }
12
11
 
13
12
  &ProgressBar__Title {
14
- @include c-text-title-sm;
15
- @include text-color(base);
13
+ @apply c-text-title-sm c-text-base;
16
14
  }
17
15
 
18
16
  &ProgressBar__CompletedCheckbox {
19
17
  path {
20
- @include fill-color(secondary);
18
+ fill: theme("semanticFillColor.secondary");
21
19
  }
22
20
  }
23
21
 
24
22
  &ProgressBar__Container {
25
- @include fill-bg-color(subdued);
23
+ @apply c-bg-fill-subdued c-rounded c-mt-sm c-h-2xs;
26
24
  position: relative;
27
25
 
28
- margin-top: spacing(sm);
29
-
30
- height: spacing("2xs");
31
26
  width: 100%;
32
27
 
33
28
  border-radius: 2px;
34
29
  }
35
30
 
36
31
  &ProgressBar__Foreground {
37
- @include fill-bg-color(secondary);
32
+ @apply c-bg-fill-secondary c-rounded c-h-2xs;
38
33
  position: absolute;
39
34
  left: 0;
40
35
  top: 0;
41
36
 
42
- height: spacing("2xs");
43
-
44
37
  border-radius: 2px;
45
38
  }
46
39
 
47
40
  &ProgressBar__Tick {
48
- @include fill-bg-color(secondary);
41
+ @apply c-bg-fill-secondary c-rounded c-w-2xs c-h-sm;
49
42
  position: absolute;
50
43
  top: -6px;
51
44
  right: 0;
52
45
 
53
- height: 4 * spacing("2xs");
54
- width: spacing("2xs");
55
-
56
46
  border-radius: 2px;
57
47
  }
58
48
  }
@@ -1,7 +1,7 @@
1
1
  .cobalt-circularProgressBar {
2
2
  --content-size: 64px;
3
3
  --total-size: calc((var(--content-size) / 4) + var(--content-size));
4
- --progress-color: #{color-var(fill, base)};
4
+ --progress-color: var(--theme-semanticFillColor-base);
5
5
 
6
6
  position: relative;
7
7
 
@@ -36,7 +36,7 @@
36
36
  }
37
37
 
38
38
  &__content {
39
- @include bg-color(primary);
39
+ @apply c-bg-primary;
40
40
 
41
41
  position: absolute;
42
42
 
@@ -72,14 +72,14 @@
72
72
  }
73
73
 
74
74
  &--info {
75
- --progress-color: #{color-var(fill, secondary)};
75
+ --progress-color: var(--theme-semanticFillColor-secondary);
76
76
  }
77
77
 
78
78
  &--error {
79
- --progress-color: #{color-var(fill, error)};
79
+ --progress-color: var(--theme-semanticFillColor-error);
80
80
  }
81
81
 
82
82
  &--success {
83
- --progress-color: #{color-var(fill, success)};
83
+ --progress-color: var(--theme-semanticFillColor-success);
84
84
  }
85
85
  }
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .cobalt-rating__label {
13
- @include text-color(subdued);
13
+ @apply c-text-subdued;
14
14
  line-height: 14px;
15
15
  font-size: 14px;
16
16
  }
@@ -36,8 +36,7 @@
36
36
  }
37
37
 
38
38
  &--icon-size-48 .cobalt-Icon {
39
- height: spacing(xl);
40
- width: spacing(xl);
39
+ @apply c-h-xl c-w-xl;
41
40
  }
42
41
 
43
42
  &__icon-wrapper {
@@ -81,8 +80,8 @@
81
80
  &:not(:hover):not(:focus-visible) input:focus {
82
81
  // focus feedback with keyboard navigation only
83
82
  & + .cobalt-Icon {
84
- @include border(accent);
85
- border-radius: spacing("2xs");
83
+ @apply c-border-accent;
84
+ border-radius: theme("spacing.2xs");
86
85
  }
87
86
  }
88
87
 
@@ -1,11 +1,11 @@
1
1
  .cobalt-sidepanel {
2
- @include bg-color(primary);
2
+ @apply c-bg-primary;
3
3
 
4
4
  position: fixed;
5
5
 
6
6
  top: 0;
7
7
  right: 0;
8
- z-index: zx(sidepanel);
8
+ z-index: theme("zIndex.sidepanel");
9
9
 
10
10
  height: 100vh;
11
11
 
@@ -26,7 +26,7 @@
26
26
  }
27
27
 
28
28
  &--visible {
29
- box-shadow: elevation(lg);
29
+ @apply c-shadow-lg;
30
30
  }
31
31
  }
32
32
 
@@ -36,7 +36,7 @@
36
36
  top: 0;
37
37
  left: 0;
38
38
 
39
- z-index: zx(sidepanel-below);
39
+ z-index: theme("zIndex.sidepanel-below");
40
40
 
41
41
  background-color: fade-out(black, 0.2);
42
42
 
@@ -7,7 +7,7 @@
7
7
  }
8
8
 
9
9
  &TabBar__ScrollControl {
10
- flex: 0 0 spacing(lg);
10
+ flex: 0 0 theme("spacing.lg");
11
11
  display: flex;
12
12
  }
13
13
 
@@ -41,13 +41,15 @@
41
41
  }
42
42
 
43
43
  &TabScroller--underlined:after {
44
- @include semantic-color(stroke, base, background);
45
44
  position: absolute;
45
+
46
46
  bottom: 0;
47
47
 
48
48
  width: 100%;
49
49
  height: 1px;
50
50
 
51
+ background: theme("semanticBorderColor.base");
52
+
51
53
  content: "";
52
54
  }
53
55
 
@@ -77,17 +79,16 @@
77
79
  }
78
80
 
79
81
  &Tab {
80
- @include c-text-section-heading;
81
- @include bg-color(secondaryInteractive);
82
+ @apply c-text-section-heading c-bg-secondaryInteractive;
82
83
 
83
84
  position: relative;
84
- z-index: zx("above");
85
+ z-index: theme("zIndex.above");
85
86
 
86
87
  display: flex;
87
88
  flex: 1 0 auto;
88
89
  justify-content: center;
89
- height: 17 * spacing("2xs");
90
- padding: 0 spacing(md);
90
+ height: calc(17 * theme("spacing.2xs"));
91
+ padding: 0 theme("spacing.md");
91
92
 
92
93
  box-sizing: border-box;
93
94
  border: 0;
@@ -128,10 +129,10 @@
128
129
  }
129
130
 
130
131
  &[aria-selected="true"] {
131
- @include text-color(base);
132
+ @apply c-text-base;
132
133
 
133
134
  &:after {
134
- @include fill-bg-color(accent);
135
+ @apply c-bg-fill-accent;
135
136
 
136
137
  transform: scaleX(1);
137
138
  }
@@ -14,14 +14,13 @@
14
14
  }
15
15
 
16
16
  .cobalt-tabs__label {
17
- @apply c-text-section-heading c-bg-secondaryInteractive;
17
+ @apply c-text-section-heading c-bg-secondaryInteractive c-p-md;
18
18
  position: relative;
19
19
 
20
20
  display: flex;
21
21
  justify-content: center;
22
22
  flex: 1 0 auto;
23
23
  align-items: center;
24
- padding: spacing(md);
25
24
  border: 0;
26
25
 
27
26
  text-align: center;
@@ -1,14 +1,13 @@
1
1
  .cobalt- {
2
2
  &Tag {
3
- @include bg-color(neutralAlt);
4
- @include text-color(base);
3
+ @apply c-bg-neutralAlt c-text-base c-rounded;
5
4
  display: inline-flex;
6
5
 
7
6
  align-items: center;
8
7
 
9
8
  height: 20px;
10
9
 
11
- padding: 2px spacing("2xs");
10
+ @apply c-py-[2px] c-px-2xs;
12
11
 
13
12
  font-family: font-family(base);
14
13
 
@@ -18,8 +17,6 @@
18
17
 
19
18
  line-height: 16px;
20
19
 
21
- border-radius: border-radius();
22
-
23
20
  letter-spacing: normal;
24
21
  }
25
22
 
@@ -28,47 +25,38 @@
28
25
  }
29
26
 
30
27
  &Tag--important {
31
- @include text-color(errorAlt);
32
- @include bg-color(errorAlt);
28
+ @apply c-text-errorAlt c-bg-errorAlt;
33
29
  }
34
30
 
35
31
  &Tag--importantPrimary {
36
- @include text-color(onError);
37
- @include bg-color(error);
32
+ @apply c-text-onError c-bg-error;
38
33
  }
39
34
 
40
35
  &Tag--success {
41
- @include text-color(successAlt);
42
- @include bg-color(successAlt);
36
+ @apply c-text-successAlt c-bg-successAlt;
43
37
  }
44
38
 
45
39
  &Tag--successPrimary {
46
- @include text-color(onSuccess);
47
- @include bg-color(success);
40
+ @apply c-text-onSuccess c-bg-success;
48
41
  }
49
42
 
50
43
  &Tag--info {
51
- @include text-color(info);
52
- @include bg-color(info);
44
+ @apply c-text-info c-bg-info;
53
45
  }
54
46
 
55
47
  &Tag--accent {
56
- @include text-color(accentAlt);
57
- @include bg-color(accentAlt);
48
+ @apply c-text-accentAlt c-bg-accentAlt;
58
49
  }
59
50
 
60
51
  &Tag--accentPrimary {
61
- @include text-color(onAccent);
62
- @include bg-color(accent);
52
+ @apply c-text-onAccent c-bg-accent;
63
53
  }
64
54
 
65
55
  &Tag--connect {
66
- @include text-color(connectAlt);
67
- @include bg-color(connectAlt);
56
+ @apply c-text-connectAlt c-bg-connectAlt;
68
57
  }
69
58
 
70
59
  &Tag--connectPrimary {
71
- @include text-color(onConnect);
72
- @include bg-color(connect);
60
+ @apply c-text-onConnect c-bg-connect;
73
61
  }
74
62
  }
@@ -1,2 +1,2 @@
1
- $card-padding: spacing(md);
1
+ $card-padding: theme("spacing.md");
2
2
  $unit: 4px;
@@ -1 +1 @@
1
- {"version":3,"file":"getCobaltTailwindcssConfig.js","sources":["../../utils/getCobaltTailwindcssConfig.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireGetCobaltTailwindcssConfig } from \"/Users/thibaudesnouf/sources/cobalt/utils/getCobaltTailwindcssConfig.js\";\nvar getCobaltTailwindcssConfigExports = requireGetCobaltTailwindcssConfig();\nexport { getCobaltTailwindcssConfigExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(getCobaltTailwindcssConfigExports);"],"names":[],"mappings":";;;AAEA,IAAI,iCAAiC,GAAG,iCAAiC,EAAE,CAAC;AAE5E,iCAAe,aAAa,uBAAuB,CAAC,iCAAiC,CAAC;;;;"}
1
+ {"version":3,"file":"getCobaltTailwindcssConfig.js","sources":["../../utils/getCobaltTailwindcssConfig.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireGetCobaltTailwindcssConfig } from \"/Users/cedric/Dev/drivy/cobalt/utils/getCobaltTailwindcssConfig.js\";\nvar getCobaltTailwindcssConfigExports = requireGetCobaltTailwindcssConfig();\nexport { getCobaltTailwindcssConfigExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(getCobaltTailwindcssConfigExports);"],"names":[],"mappings":";;;AAEA,IAAI,iCAAiC,GAAG,iCAAiC,EAAE,CAAC;AAE5E,iCAAe,aAAa,uBAAuB,CAAC,iCAAiC,CAAC;;;;"}