@drivy/cobalt 0.26.3 → 0.28.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.
- package/cjs/tokens/colors.js +13 -1
- package/cjs/tokens/colors.js.map +1 -1
- package/cjs/tokens/palette.js +14 -1
- package/cjs/tokens/palette.js.map +1 -1
- package/cjs/tokens/theme.js +18 -8
- package/cjs/tokens/theme.js.map +1 -1
- package/package.json +4 -4
- package/styles/components/Buttons/index.scss +1 -1
- package/styles/components/Form/Autocomplete/index.scss +1 -3
- package/styles/components/Form/CheckablePill.scss +25 -30
- package/styles/components/Form/Checkmark.scss +19 -34
- package/styles/components/Form/Fieldset.scss +3 -3
- package/styles/components/Form/Hint.scss +4 -7
- package/styles/components/Form/RadioWithDetails.scss +20 -21
- package/styles/components/Form/Select.scss +2 -1
- package/styles/components/Form/Slider.scss +16 -12
- package/styles/components/Form/Stepper.scss +5 -7
- package/styles/components/Form/TextArea.scss +3 -3
- package/styles/components/Form/TextInput.scss +9 -8
- package/styles/components/Form/ToggleSwitch.scss +16 -18
- package/styles/components/Form/field.scss +1 -1
- package/styles/components/Form/form.scss +14 -45
- package/styles/components/Icon/iconColors.scss +8 -8
- package/styles/components/Modal/index.scss +1 -1
- package/styles/core/_colors-map.scss +18 -8
- package/styles/core/palette.scss +13 -0
- package/styles/core/theme.scss +14 -6
- package/styles/core/typography.scss +0 -174
- package/styles/core.scss +0 -1
- package/styles/global.scss +0 -1
- package/tokens/colors.js +10 -2
- package/tokens/colors.js.map +1 -1
- package/tokens/palette.js +14 -2
- package/tokens/palette.js.map +1 -1
- package/tokens/theme.js +18 -8
- package/tokens/theme.js.map +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/tokens/index.d.ts +31 -6
- package/utilities.css +194 -14
- package/styles/core/card.scss +0 -31
- package/styles/global/typography.scss +0 -78
package/cjs/tokens/colors.js
CHANGED
|
@@ -33,6 +33,10 @@ const green = {
|
|
|
33
33
|
const blue = "#2ea2ea";
|
|
34
34
|
const deprecatedBlueGhost = "#2ea2ea0f";
|
|
35
35
|
const deprecatedDriver = "#ffd988";
|
|
36
|
+
const deprecatedSeasonLow = "#BDFFAC";
|
|
37
|
+
const deprecatedSeasonMedium = "#94EA84";
|
|
38
|
+
const deprecatedSeasonHigh = "#73C865";
|
|
39
|
+
const deprecatedSeasonVeryHigh = "#54A949";
|
|
36
40
|
var _colors = {
|
|
37
41
|
white: white,
|
|
38
42
|
grey: grey,
|
|
@@ -46,7 +50,11 @@ var _colors = {
|
|
|
46
50
|
green: green,
|
|
47
51
|
blue: blue,
|
|
48
52
|
deprecatedBlueGhost: deprecatedBlueGhost,
|
|
49
|
-
deprecatedDriver: deprecatedDriver
|
|
53
|
+
deprecatedDriver: deprecatedDriver,
|
|
54
|
+
deprecatedSeasonLow: deprecatedSeasonLow,
|
|
55
|
+
deprecatedSeasonMedium: deprecatedSeasonMedium,
|
|
56
|
+
deprecatedSeasonHigh: deprecatedSeasonHigh,
|
|
57
|
+
deprecatedSeasonVeryHigh: deprecatedSeasonVeryHigh
|
|
50
58
|
};
|
|
51
59
|
|
|
52
60
|
exports.amber = amber;
|
|
@@ -55,6 +63,10 @@ exports.coral = coral;
|
|
|
55
63
|
exports["default"] = _colors;
|
|
56
64
|
exports.deprecatedBlueGhost = deprecatedBlueGhost;
|
|
57
65
|
exports.deprecatedDriver = deprecatedDriver;
|
|
66
|
+
exports.deprecatedSeasonHigh = deprecatedSeasonHigh;
|
|
67
|
+
exports.deprecatedSeasonLow = deprecatedSeasonLow;
|
|
68
|
+
exports.deprecatedSeasonMedium = deprecatedSeasonMedium;
|
|
69
|
+
exports.deprecatedSeasonVeryHigh = deprecatedSeasonVeryHigh;
|
|
58
70
|
exports.graphite = graphite;
|
|
59
71
|
exports.green = green;
|
|
60
72
|
exports.grey = grey;
|
package/cjs/tokens/colors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"colors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/cjs/tokens/palette.js
CHANGED
|
@@ -24,6 +24,7 @@ const green = {
|
|
|
24
24
|
const navy = {
|
|
25
25
|
"50": "#F1F1F4",
|
|
26
26
|
"100": "#E3E2E8",
|
|
27
|
+
"200": "#BBB8C7",
|
|
27
28
|
"300": "#7B728E",
|
|
28
29
|
"500": "#362E53",
|
|
29
30
|
"700": "#261A48",
|
|
@@ -79,6 +80,16 @@ const yellow = {
|
|
|
79
80
|
"900": "#75592D",
|
|
80
81
|
"1000": "#3B2E17"
|
|
81
82
|
};
|
|
83
|
+
const season = {
|
|
84
|
+
"100": "#BDFFAC",
|
|
85
|
+
"200": "#94EA84",
|
|
86
|
+
"300": "#73C865",
|
|
87
|
+
"400": "#54A949",
|
|
88
|
+
"700": "#0B7011",
|
|
89
|
+
"800": "#005100",
|
|
90
|
+
"900": "#030",
|
|
91
|
+
"1000": "#001900"
|
|
92
|
+
};
|
|
82
93
|
var _palette = {
|
|
83
94
|
black: black,
|
|
84
95
|
grey: grey,
|
|
@@ -91,7 +102,8 @@ var _palette = {
|
|
|
91
102
|
red: red,
|
|
92
103
|
turquoise: turquoise,
|
|
93
104
|
white: white,
|
|
94
|
-
yellow: yellow
|
|
105
|
+
yellow: yellow,
|
|
106
|
+
season: season
|
|
95
107
|
};
|
|
96
108
|
|
|
97
109
|
exports.black = black;
|
|
@@ -104,6 +116,7 @@ exports.purple = purple;
|
|
|
104
116
|
exports.purpleDeep = purpleDeep;
|
|
105
117
|
exports.purpleLight = purpleLight;
|
|
106
118
|
exports.red = red;
|
|
119
|
+
exports.season = season;
|
|
107
120
|
exports.turquoise = turquoise;
|
|
108
121
|
exports.white = white;
|
|
109
122
|
exports.yellow = yellow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"palette.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/cjs/tokens/theme.js
CHANGED
|
@@ -38,7 +38,11 @@ const background = {
|
|
|
38
38
|
owner: "indigo.dark/navy.700/navy.700",
|
|
39
39
|
disabled: "grey.light/navy.100/black.50",
|
|
40
40
|
neutral: "grey.light/navy.100/black.50",
|
|
41
|
-
neutralAlt: "grey.lighter/navy.50/black.100"
|
|
41
|
+
neutralAlt: "grey.lighter/navy.50/black.100",
|
|
42
|
+
seasonLow: "deprecatedSeasonLow/season.100/season.700",
|
|
43
|
+
seasonMedium: "deprecatedSeasonMedium/season.200/season.800",
|
|
44
|
+
seasonHigh: "deprecatedSeasonHigh/season.300/season.900",
|
|
45
|
+
seasonVeryHigh: "deprecatedSeasonVeryHigh/season.400/season.1000"
|
|
42
46
|
};
|
|
43
47
|
const text = {
|
|
44
48
|
base: "graphite/navy.700/grey.100",
|
|
@@ -62,15 +66,15 @@ const text = {
|
|
|
62
66
|
hover: "white/purple.700/grey.100"
|
|
63
67
|
},
|
|
64
68
|
info: "graphite.light/yellow.900/yellow.300",
|
|
69
|
+
infoAlt: "turquoise/yellow.500/yellow.700",
|
|
65
70
|
error: "red/red.500/red.400",
|
|
66
71
|
errorAlt: "white/red.500/red.500",
|
|
67
72
|
success: "green/green.700/green.700",
|
|
68
73
|
successAlt: "white/green.900/green.100",
|
|
74
|
+
warning: "coral/orange.500/orange.300",
|
|
69
75
|
connect: "turquoise/turquoise.500/turquoise.500",
|
|
70
76
|
driver: "graphite/navy.700/navy.700",
|
|
71
77
|
owner: "white/white/grey.100",
|
|
72
|
-
warning: "coral/orange.500/orange.300",
|
|
73
|
-
infoAlt: "turquoise/yellow.500/yellow.700",
|
|
74
78
|
inversed: "white/white/white"
|
|
75
79
|
};
|
|
76
80
|
const buttonBackground = {
|
|
@@ -185,16 +189,16 @@ const icon = {
|
|
|
185
189
|
hover: "white/purple.700/grey.100"
|
|
186
190
|
},
|
|
187
191
|
info: "graphite.light/yellow.900/yellow.300",
|
|
192
|
+
infoAlt: "turquoise/yellow.500/yellow.700",
|
|
188
193
|
error: "red/red.500/red.400",
|
|
189
194
|
errorAlt: "red/red.500/red.200",
|
|
190
195
|
success: "green/green.700/green.700",
|
|
191
196
|
successAlt: "white/green.900/green.100",
|
|
197
|
+
warning: "coral/orange.500/orange.300",
|
|
192
198
|
connect: "turquoise/turquoise.500/white",
|
|
193
199
|
connectAlt: "turquoise/turquoise.900/turquoise.50",
|
|
194
200
|
driver: "graphite/navy.700//navy.700",
|
|
195
201
|
owner: "white/white/white",
|
|
196
|
-
warning: "coral/orange.500/orange.300",
|
|
197
|
-
infoAlt: "turquoise/yellow.500/yellow.700",
|
|
198
202
|
inversed: "white/white/white",
|
|
199
203
|
disabled: "grey.lighter/navy.100/black.50"
|
|
200
204
|
};
|
|
@@ -205,6 +209,12 @@ const stroke = {
|
|
|
205
209
|
hover: "graphite.light/navy.300/purpleDeep.400",
|
|
206
210
|
press: "graphite/navy.500/purpleDeep.400"
|
|
207
211
|
},
|
|
212
|
+
strong: "grey.dark/navy.300/navy.200",
|
|
213
|
+
strongInteractive: {
|
|
214
|
+
DEFAULT: "grey.dark/navy.300/navy.200",
|
|
215
|
+
hover: "graphite.light/navy.500/purpleDeep.400",
|
|
216
|
+
press: "graphite/navy.700/purpleDeep.400"
|
|
217
|
+
},
|
|
208
218
|
subdued: "grey.light/navy.100/black.50",
|
|
209
219
|
accent: "indigo/purple.500/purpleDeep.400",
|
|
210
220
|
accentInteractive: {
|
|
@@ -225,10 +235,10 @@ const fill = {
|
|
|
225
235
|
accent: "purple/purple.500/purpleDeep.400",
|
|
226
236
|
accentAlt: "purple/purple.100/purpleDeep.900",
|
|
227
237
|
error: "red/red.500/red.500",
|
|
228
|
-
success: "green/green.500/green.700",
|
|
229
238
|
negative: "red/red.150/red.900",
|
|
230
|
-
|
|
231
|
-
disabled: "grey.dark/navy.300/grey.300"
|
|
239
|
+
success: "green/green.500/green.700",
|
|
240
|
+
disabled: "grey.dark/navy.300/grey.300",
|
|
241
|
+
neutral: "grey.lighter/navy.50/black.100"
|
|
232
242
|
};
|
|
233
243
|
var _theme = {
|
|
234
244
|
background: background,
|
package/cjs/tokens/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivy/cobalt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Opinionated design system for Drivy's projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"lodash.throttle": "4.1.1",
|
|
33
33
|
"media-typer": "1.1.0",
|
|
34
34
|
"nanoid": "4.0.0",
|
|
35
|
-
"postcss": "8.4.
|
|
35
|
+
"postcss": "8.4.21",
|
|
36
36
|
"tailwindcss": "2.2.19",
|
|
37
37
|
"tippy.js": "6.3.7"
|
|
38
38
|
},
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"autoprefixer": "10.4.13",
|
|
68
68
|
"core-js": "3.27.1",
|
|
69
69
|
"css-loader": "6.7.3",
|
|
70
|
-
"eslint": "8.
|
|
70
|
+
"eslint": "8.32.0",
|
|
71
71
|
"file-loader": "6.2.0",
|
|
72
72
|
"jest": "29.3.1",
|
|
73
73
|
"jest-environment-jsdom": "29.3.1",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"stylelint": "14.16.1",
|
|
96
96
|
"svg2vectordrawable": "2.9.1",
|
|
97
97
|
"svgo": "3.0.2",
|
|
98
|
-
"ts-jest": "29.0.
|
|
98
|
+
"ts-jest": "29.0.5",
|
|
99
99
|
"ts-node": "10.9.1",
|
|
100
100
|
"typescript": "4.9.4"
|
|
101
101
|
},
|
|
@@ -71,11 +71,9 @@
|
|
|
71
71
|
&--forceDisplayResults
|
|
72
72
|
.cobalt-Autocomplete__input-wrapper
|
|
73
73
|
.cobalt-TextField__Input {
|
|
74
|
+
@include border(accent, 2);
|
|
74
75
|
border-bottom-right-radius: 0;
|
|
75
76
|
border-bottom-left-radius: 0;
|
|
76
|
-
|
|
77
|
-
box-shadow: 0 2px 12px 0 rgba($form-element--default-active-color, 0.16),
|
|
78
|
-
inset 0 0 0 1px $form-element--default-active-color;
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
&__list {
|
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
.cobalt-CheckablePillField {
|
|
4
4
|
$self: &;
|
|
5
5
|
$height: 40px;
|
|
6
|
-
$border-width: 2px;
|
|
7
6
|
$animation-duration: 100ms;
|
|
8
7
|
$toggle-switch-focus-offset: math.div($height, 10);
|
|
9
|
-
$main-color: color(indigo);
|
|
10
|
-
$main-color-light: color(indigo);
|
|
11
8
|
|
|
12
9
|
position: relative;
|
|
13
10
|
|
|
@@ -31,6 +28,9 @@
|
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
&__Label {
|
|
31
|
+
@include border(base, 2);
|
|
32
|
+
@include text-color(base);
|
|
33
|
+
@include bg-color(secondary);
|
|
34
34
|
position: relative;
|
|
35
35
|
|
|
36
36
|
display: flex;
|
|
@@ -38,21 +38,17 @@
|
|
|
38
38
|
height: $height;
|
|
39
39
|
box-sizing: border-box;
|
|
40
40
|
padding: 0 spacing(md);
|
|
41
|
-
border: $border-width solid color(grey);
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
// We remove the border-bottom and border-top width
|
|
43
|
+
line-height: $height - 2px * 2;
|
|
45
44
|
|
|
46
45
|
border-radius: math.div($height, 2);
|
|
47
|
-
background-color: color(white);
|
|
48
46
|
box-shadow: 0 2px 6px 0 rgba(#000, 0.12);
|
|
49
47
|
|
|
50
48
|
transition: $animation-duration;
|
|
51
49
|
|
|
52
50
|
&:hover {
|
|
53
|
-
border-color
|
|
54
|
-
|
|
55
|
-
fill: $main-color;
|
|
51
|
+
@include border-color(accent);
|
|
56
52
|
box-shadow: 0 4px 4px 0 rgba(#000, 0.16);
|
|
57
53
|
|
|
58
54
|
transform: translateY(-1px);
|
|
@@ -70,63 +66,62 @@
|
|
|
70
66
|
}
|
|
71
67
|
|
|
72
68
|
&__Input:focus + #{ $self }__Label:after {
|
|
69
|
+
// Color the shadow by using default text color
|
|
70
|
+
@include text-color(accent);
|
|
73
71
|
position: absolute;
|
|
74
72
|
|
|
75
|
-
box-shadow: 0 0 0 1px
|
|
73
|
+
box-shadow: 0 0 0 1px;
|
|
76
74
|
content: "";
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
&__Input:disabled + #{ $self }__Label {
|
|
80
|
-
|
|
78
|
+
@include border(base, 2);
|
|
79
|
+
@include bg-color(disabled);
|
|
81
80
|
|
|
82
81
|
cursor: default;
|
|
83
82
|
box-shadow: none;
|
|
84
|
-
background-color: color(grey, light);
|
|
85
83
|
opacity: 0.8;
|
|
86
84
|
|
|
87
85
|
transform: none;
|
|
88
86
|
}
|
|
89
87
|
|
|
90
88
|
&__Input:checked + #{ $self }__Label {
|
|
89
|
+
@include bg-color(accentAlt);
|
|
90
|
+
@include text-color(accentAlt);
|
|
91
91
|
border-color: transparent;
|
|
92
|
-
|
|
93
|
-
color: color(white);
|
|
94
|
-
|
|
95
|
-
background-color: $main-color-light;
|
|
96
92
|
}
|
|
97
93
|
|
|
98
94
|
&--with-icon {
|
|
99
95
|
.cobalt-Icon {
|
|
96
|
+
@include semantic-color(base, icon, fill);
|
|
100
97
|
margin-right: spacing(xs);
|
|
101
98
|
|
|
102
|
-
fill: $main-color-light;
|
|
103
|
-
|
|
104
99
|
transition: fill $animation-duration ease-in-out;
|
|
105
100
|
}
|
|
106
101
|
|
|
107
102
|
#{ $self }__Input:checked + #{ $self }__Label .cobalt-Icon {
|
|
108
|
-
|
|
103
|
+
@include semantic-color(accentAlt, icon, fill);
|
|
109
104
|
}
|
|
110
105
|
}
|
|
111
106
|
|
|
112
107
|
&--error {
|
|
113
108
|
#{ $self }__Input + #{ $self }__Label {
|
|
114
|
-
border-color
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
@include border-color(error);
|
|
110
|
+
@include text-color(base);
|
|
111
|
+
@include bg-color(secondary);
|
|
117
112
|
|
|
118
|
-
|
|
113
|
+
.cobalt-Icon {
|
|
114
|
+
@include semantic-color(base, icon, fill);
|
|
115
|
+
}
|
|
119
116
|
}
|
|
120
117
|
|
|
121
118
|
#{ $self }__Input:checked + #{ $self }__Label {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
background-color: color(red);
|
|
119
|
+
@include text-color(errorAlt);
|
|
120
|
+
@include bg-color(errorAlt);
|
|
121
|
+
@include border-color(errorAlt);
|
|
127
122
|
|
|
128
123
|
.cobalt-Icon {
|
|
129
|
-
|
|
124
|
+
@include semantic-color(errorAlt, icon, fill);
|
|
130
125
|
}
|
|
131
126
|
}
|
|
132
127
|
}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
@import "./form";
|
|
2
|
-
|
|
3
1
|
.cobalt- {
|
|
4
2
|
&CheckmarkField {
|
|
5
3
|
$self: &;
|
|
6
|
-
|
|
7
|
-
$disabled-color: color(grey, dark);
|
|
8
|
-
$error-color: $form-element--error-color;
|
|
9
|
-
|
|
10
4
|
$radio-checkmark-size: 20px;
|
|
11
5
|
$checkbox-checkmark-size: 18px;
|
|
12
|
-
|
|
6
|
+
|
|
7
|
+
@include text-color(base);
|
|
13
8
|
|
|
14
9
|
position: relative;
|
|
15
10
|
|
|
@@ -20,7 +15,6 @@
|
|
|
20
15
|
font-family: font-family(base);
|
|
21
16
|
font-size: font-size(body);
|
|
22
17
|
line-height: line-height(body);
|
|
23
|
-
color: color(graphite);
|
|
24
18
|
|
|
25
19
|
&__Input {
|
|
26
20
|
position: absolute;
|
|
@@ -33,12 +27,12 @@
|
|
|
33
27
|
opacity: 0;
|
|
34
28
|
|
|
35
29
|
& + #{ $self }__Checkmark {
|
|
30
|
+
@include border(accent, 2);
|
|
36
31
|
display: inline-block;
|
|
37
32
|
|
|
38
33
|
flex: 0 0 auto;
|
|
39
34
|
|
|
40
35
|
margin-right: spacing(xs);
|
|
41
|
-
border: 2px solid $checkmark-color;
|
|
42
36
|
|
|
43
37
|
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
|
|
44
38
|
cursor: pointer;
|
|
@@ -47,11 +41,7 @@
|
|
|
47
41
|
}
|
|
48
42
|
|
|
49
43
|
&[disabled] ~ .cobalt-CheckmarkField__Label {
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&:focus + #{ $self }__Checkmark {
|
|
54
|
-
box-shadow: 0 2px 12px 0 rgba($form-element--default-active-color, 0.3);
|
|
44
|
+
@include text-color(subdued);
|
|
55
45
|
}
|
|
56
46
|
}
|
|
57
47
|
|
|
@@ -67,20 +57,21 @@
|
|
|
67
57
|
}
|
|
68
58
|
|
|
69
59
|
& + #{ $self }__Checkmark::after {
|
|
60
|
+
@include border(accent);
|
|
61
|
+
@include bg-color(accentAlt);
|
|
62
|
+
|
|
70
63
|
position: absolute;
|
|
71
64
|
|
|
72
65
|
top: 3px;
|
|
73
66
|
left: 3px;
|
|
74
|
-
|
|
75
|
-
border: 5px
|
|
67
|
+
// Exception for radio inputs
|
|
68
|
+
border-width: 5px;
|
|
76
69
|
|
|
77
70
|
border-radius: 50%;
|
|
78
71
|
|
|
79
72
|
content: "";
|
|
80
73
|
opacity: 0;
|
|
81
74
|
|
|
82
|
-
background-color: $checkmark-color;
|
|
83
|
-
|
|
84
75
|
transition: transform 120ms ease-in-out;
|
|
85
76
|
|
|
86
77
|
transform: scale(0.4);
|
|
@@ -95,15 +86,14 @@
|
|
|
95
86
|
}
|
|
96
87
|
|
|
97
88
|
&[disabled] + #{ $self }__Checkmark {
|
|
98
|
-
border-color
|
|
89
|
+
@include border-color(subdued);
|
|
99
90
|
|
|
100
91
|
box-shadow: none;
|
|
101
92
|
}
|
|
102
93
|
|
|
103
94
|
&[disabled]:checked ~ #{ $self }__Checkmark::after {
|
|
104
|
-
border-color
|
|
105
|
-
|
|
106
|
-
background-color: $disabled-color;
|
|
95
|
+
@include border-color(subdued);
|
|
96
|
+
@include bg-color(disabled);
|
|
107
97
|
}
|
|
108
98
|
}
|
|
109
99
|
|
|
@@ -130,7 +120,7 @@
|
|
|
130
120
|
}
|
|
131
121
|
|
|
132
122
|
&:checked + #{ $self }__Checkmark {
|
|
133
|
-
|
|
123
|
+
@include bg-color(accentAlt);
|
|
134
124
|
will-change: background-color;
|
|
135
125
|
}
|
|
136
126
|
|
|
@@ -149,13 +139,13 @@
|
|
|
149
139
|
}
|
|
150
140
|
|
|
151
141
|
&[disabled] + #{ $self }__Checkmark {
|
|
152
|
-
border-color
|
|
142
|
+
@include border-color(subdued);
|
|
153
143
|
|
|
154
144
|
box-shadow: none;
|
|
155
145
|
}
|
|
156
146
|
|
|
157
147
|
&[disabled]:checked + #{ $self }__Checkmark {
|
|
158
|
-
|
|
148
|
+
@include bg-color(disabled);
|
|
159
149
|
}
|
|
160
150
|
}
|
|
161
151
|
|
|
@@ -173,21 +163,16 @@
|
|
|
173
163
|
|
|
174
164
|
&--error {
|
|
175
165
|
#{ $self }__Input + #{ $self }__Checkmark {
|
|
176
|
-
border-color
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
#{ $self }__Input:focus + #{ $self }__Checkmark {
|
|
180
|
-
box-shadow: 0 2px 12px 0 rgba($form-element--error-color, 0.36);
|
|
166
|
+
@include border-color(error);
|
|
181
167
|
}
|
|
182
168
|
|
|
183
169
|
#{ $self }__Input[type="radio"]:checked + #{ $self }__Checkmark::after {
|
|
184
|
-
border-color
|
|
185
|
-
|
|
186
|
-
background-color: $error-color;
|
|
170
|
+
@include border-color(error);
|
|
171
|
+
@include bg-color(errorInteractive);
|
|
187
172
|
}
|
|
188
173
|
|
|
189
174
|
#{ $self }__Input[type="checkbox"]:checked + #{ $self }__Checkmark {
|
|
190
|
-
|
|
175
|
+
@include bg-color(errorInteractive);
|
|
191
176
|
}
|
|
192
177
|
}
|
|
193
178
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.cobalt- {
|
|
2
2
|
&Fieldset {
|
|
3
|
-
|
|
3
|
+
@include border-top(subdued);
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
// We remove the border-width
|
|
6
|
+
padding: (spacing(sm) - 1px) 0 0 0;
|
|
7
7
|
|
|
8
8
|
& > legend {
|
|
9
9
|
@include c-text-title-sm;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
@import "./form";
|
|
2
|
-
|
|
3
1
|
.cobalt- {
|
|
4
2
|
&Hint {
|
|
3
|
+
@include text-color(subdued);
|
|
5
4
|
@include c-text-body-md;
|
|
6
5
|
|
|
7
6
|
position: relative;
|
|
@@ -13,8 +12,6 @@
|
|
|
13
12
|
justify-content: flex-start;
|
|
14
13
|
align-items: flex-start;
|
|
15
14
|
|
|
16
|
-
color: color(graphite, light);
|
|
17
|
-
|
|
18
15
|
font-size: 13px;
|
|
19
16
|
line-height: 16px;
|
|
20
17
|
|
|
@@ -27,15 +24,15 @@
|
|
|
27
24
|
}
|
|
28
25
|
|
|
29
26
|
&--success {
|
|
30
|
-
|
|
27
|
+
@include text-color(success);
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
&--error {
|
|
34
|
-
|
|
31
|
+
@include text-color(error);
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
a {
|
|
38
|
-
|
|
35
|
+
@include text-color(accentInteractive);
|
|
39
36
|
text-decoration: none;
|
|
40
37
|
}
|
|
41
38
|
|
|
@@ -7,21 +7,18 @@
|
|
|
7
7
|
flex-grow: 1;
|
|
8
8
|
|
|
9
9
|
--visual-radio-size: 18px;
|
|
10
|
-
--visual-radio-color: #{color(indigo)};
|
|
11
10
|
|
|
12
11
|
.cobalt-radio-with-details__inner {
|
|
12
|
+
@include border(strongInteractive);
|
|
13
|
+
@include text-color(base);
|
|
14
|
+
@include bg-color(secondary);
|
|
13
15
|
height: 100%;
|
|
14
16
|
display: flex;
|
|
15
17
|
flex-direction: row;
|
|
16
18
|
align-items: flex-start;
|
|
17
19
|
|
|
18
20
|
padding: spacing(sm);
|
|
19
|
-
border: border(grey);
|
|
20
|
-
border-color: color(grey, dark);
|
|
21
21
|
|
|
22
|
-
color: color(indigo);
|
|
23
|
-
|
|
24
|
-
background-color: color(white);
|
|
25
22
|
cursor: pointer;
|
|
26
23
|
border-radius: border-radius(lg);
|
|
27
24
|
|
|
@@ -43,7 +40,7 @@
|
|
|
43
40
|
}
|
|
44
41
|
|
|
45
42
|
.cobalt-radio-with-details__title {
|
|
46
|
-
|
|
43
|
+
@include text-color(base);
|
|
47
44
|
font-size: 14px;
|
|
48
45
|
font-weight: 600;
|
|
49
46
|
line-height: 18px;
|
|
@@ -53,7 +50,7 @@
|
|
|
53
50
|
|
|
54
51
|
.cobalt-radio-with-details__description {
|
|
55
52
|
@include c-text-body-md;
|
|
56
|
-
|
|
53
|
+
@include text-color(subdued);
|
|
57
54
|
|
|
58
55
|
transition: color 150ms ease-in-out;
|
|
59
56
|
}
|
|
@@ -75,13 +72,13 @@
|
|
|
75
72
|
wordwrap: normal;
|
|
76
73
|
|
|
77
74
|
& + #{ $self }__inner #{ $self }__visual-input {
|
|
75
|
+
@include border(accent, 2);
|
|
78
76
|
position: relative;
|
|
79
77
|
top: 3px;
|
|
80
78
|
|
|
81
79
|
flex: 0 0 auto;
|
|
82
80
|
width: var(--visual-radio-size);
|
|
83
81
|
height: var(--visual-radio-size);
|
|
84
|
-
border: 2px solid var(--visual-radio-color);
|
|
85
82
|
|
|
86
83
|
border-radius: 50%;
|
|
87
84
|
|
|
@@ -92,38 +89,40 @@
|
|
|
92
89
|
}
|
|
93
90
|
|
|
94
91
|
&:focus-visible + #{ $self }__inner {
|
|
95
|
-
|
|
96
|
-
box-shadow: 0 2px 12px 0 rgba(
|
|
92
|
+
@include semantic-color(accentAlt, stroke, outline-color);
|
|
93
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
|
|
94
|
+
outline-style: dashed;
|
|
95
|
+
outline-width: 1px;
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
&:checked + #{ $self }__inner {
|
|
100
|
-
border-color
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
background-color: var(--visual-radio-color);
|
|
99
|
+
@include border-color(accent);
|
|
100
|
+
@include text-color(accentAlt);
|
|
101
|
+
@include bg-color(accentAlt);
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
&:checked + #{ $self }__inner #{ $self }__visual-input {
|
|
108
|
-
|
|
105
|
+
@include semantic-color(accentAlt, icon, border-color);
|
|
109
106
|
}
|
|
110
107
|
|
|
111
108
|
&:checked + #{ $self }__inner #{ $self }__title,
|
|
112
109
|
&:checked + #{ $self }__inner #{ $self }__description {
|
|
113
|
-
|
|
110
|
+
@include text-color(accentAlt);
|
|
114
111
|
}
|
|
115
112
|
|
|
116
113
|
& + #{ $self }__inner #{ $self }__visual-input::after {
|
|
114
|
+
@include border(accent);
|
|
115
|
+
@include bg-color(accentAlt);
|
|
117
116
|
position: absolute;
|
|
118
117
|
left: 2px;
|
|
119
118
|
top: 2px;
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
// Execption for radio inputs
|
|
121
|
+
border-width: 5px;
|
|
122
122
|
|
|
123
123
|
border-radius: 50%;
|
|
124
124
|
content: "";
|
|
125
125
|
opacity: 0;
|
|
126
|
-
background-color: var(--visual-radio-color);
|
|
127
126
|
|
|
128
127
|
transition: transform 120ms ease-in-out;
|
|
129
128
|
transform: scale(0.4);
|
|
@@ -131,7 +130,7 @@
|
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
&:checked + #{ $self }__inner #{ $self }__visual-input::after {
|
|
134
|
-
|
|
133
|
+
@include semantic-color(accentAlt, icon, border-color);
|
|
135
134
|
|
|
136
135
|
opacity: 1;
|
|
137
136
|
|