@drivy/cobalt 0.30.0 → 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.
- package/components/Form/Slider.js.map +1 -1
- package/package.json +11 -11
- package/styles/components/Accordion/index.scss +1 -1
- package/styles/components/Buttons/DefaultButton/index.scss +12 -12
- package/styles/components/Buttons/GhostButton/index.scss +4 -4
- package/styles/components/Buttons/InversedButton/index.scss +2 -2
- package/styles/components/Buttons/index.scss +6 -6
- package/styles/components/Cell/index.scss +1 -1
- package/styles/components/Form/Autocomplete/index.scss +1 -1
- package/styles/components/Form/CheckablePill.scss +4 -4
- package/styles/components/Form/RadioWithDetails.scss +3 -3
- package/styles/components/Form/TextInput.scss +5 -5
- package/styles/components/Form/ToggleSwitch.scss +1 -1
- package/styles/components/TabBar/index.scss +1 -1
- package/styles/core/_colors-map.scss +164 -164
- package/styles/core/color.scss +28 -6
- package/styles/core/theme.scss +326 -0
- package/types/components/Form/Slider.d.ts +2 -2
- package/utilities.css +326 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../../src/components/Form/Slider.tsx"],"sourcesContent":["import React, { useState } from \"react\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\nimport {\n Slider as ReachSlider,\n SliderProps as ReachSliderProps,\n} from \"@reach/slider\"\nimport classNames from \"classnames\"\n\ntype NativeEventType =\n | \"onPointerDown\"\n | \"onPointerUp\"\n | \"onMouseDown\"\n | \"onMouseMove\"\n | \"onMouseUp\"\n | \"onTouchStart\"\n | \"onTouchMove\"\n | \"onTouchEnd\"\n\nexport type SliderPropsType = {\n /**\n * mandatory for A11y\n */\n ariaLabel: string\n value?: number\n defaultValue?: number\n /**\n * minimum selectable value (default is 0)\n */\n min?: number\n /**\n * maximum selectable value (default is 100)\n */\n max?: number\n /**\n * values interval\n */\n step?: number\n disabled?: boolean\n /**\n * Listener called when the value is changed\n */\n onChange?: (newValue: number) => void\n /**\n * Function used to visually display the slider value\n */\n renderValue?: (\n value: number,\n status: FormElement[\"status\"]\n ) => React.ReactElement\n\n onPointerDown?: ReachSliderProps[\"onPointerDown\"]\n onPointerUp?: ReachSliderProps[\"onPointerUp\"]\n onMouseDown?: ReachSliderProps[\"onMouseDown\"]\n onMouseMove?: ReachSliderProps[\"onMouseMove\"]\n onMouseUp?: ReachSliderProps[\"onMouseUp\"]\n onTouchStart?: ReachSliderProps[\"onTouchStart\"]\n onTouchMove?: ReachSliderProps[\"onTouchMove\"]\n onTouchEnd?: ReachSliderProps[\"onTouchEnd\"]\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void\n} & FormElement &\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n NativeEventType | \"css\" | \"enterKeyHint\"\n >\n\nconst Slider = ({\n defaultValue,\n value,\n min,\n max,\n status,\n disabled,\n onChange,\n renderValue,\n ariaLabel,\n ...restProps\n}: SliderPropsType) => {\n function initValue() {\n if (value != null) return value\n if (defaultValue != null) return defaultValue\n if (min != null) return min\n return 0\n }\n\n const [sliderValue, setSliderValue] = useState(() => initValue())\n\n return (\n <div\n className={classNames(\"cobalt-slider\", {\n \"cobalt-slider--disabled\": disabled,\n })}\n >\n {renderValue && (\n <div className=\"cobalt-slider__value-container\">\n {renderValue(sliderValue, status)}\n </div>\n )}\n\n <ReachSlider\n {...restProps}\n aria-label={ariaLabel}\n handleAlignment=\"contain\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n disabled={disabled}\n onChange={(newValue) => {\n setSliderValue(newValue)\n onChange && onChange(newValue)\n }}\n />\n </div>\n )\n}\n\nconst wrappedComponent = withFieldLabelAndHint(Slider)\nwrappedComponent.displayName = \"Slider\"\n\nexport default wrappedComponent\n\ntype SliderValueMetaProps = {\n children: React.ReactNode\n}\nexport const SliderValueMeta = ({ children }: SliderValueMetaProps) => {\n return <span className=\"cobalt-slider__value-meta\">{children}</span>\n}\n"],"names":["classNames","ReachSlider"],"mappings":";;;;;AAkEA,MAAM,MAAM,GAAG,CAAC,EACd,YAAY,EACZ,KAAK,EACL,GAAG,EACH,GAAG,EACH,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,EACT,GAAG,SAAS,EACI,KAAI;AACpB,IAAA,SAAS,SAAS,GAAA;QAChB,IAAI,KAAK,IAAI,IAAI;AAAE,YAAA,OAAO,KAAK,CAAA;QAC/B,IAAI,YAAY,IAAI,IAAI;AAAE,YAAA,OAAO,YAAY,CAAA;QAC7C,IAAI,GAAG,IAAI,IAAI;AAAE,YAAA,OAAO,GAAG,CAAA;AAC3B,QAAA,OAAO,CAAC,CAAA;KACT;AAED,IAAA,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,MAAM,SAAS,EAAE,CAAC,CAAA;AAEjE,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEA,EAAU,CAAC,eAAe,EAAE;AACrC,YAAA,yBAAyB,EAAE,QAAQ;SACpC,CAAC,EAAA;AAED,QAAA,WAAW,KACV,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,gCAAgC,EAAA,EAC5C,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,CAC7B,CACP;AAED,QAAA,KAAA,CAAA,aAAA,CAACC,QAAW,EAAA,EAAA,GACN,SAAS,EAAA,YAAA,EACD,SAAS,EACrB,eAAe,EAAC,SAAS,EACzB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,QAAQ,KAAI;gBACrB,cAAc,CAAC,QAAQ,CAAC,CAAA;AACxB,gBAAA,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAA;aAC/B,EAAA,CACD,CACE,EACP;AACH,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,MAAM,EAAC;AACtD,gBAAgB,CAAC,WAAW,GAAG,QAAQ,CAAA;MAO1B,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAwB,KAAI;AACpE,IAAA,OAAO,8BAAM,SAAS,EAAC,2BAA2B,EAAE,EAAA,QAAQ,CAAQ,CAAA;AACtE;;;;"}
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../../src/components/Form/Slider.tsx"],"sourcesContent":["import React, { useState } from \"react\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\nimport {\n Slider as ReachSlider,\n SliderProps as ReachSliderProps,\n} from \"@reach/slider\"\nimport classNames from \"classnames\"\n\ntype NativeEventType =\n | \"onPointerDown\"\n | \"onPointerUp\"\n | \"onMouseDown\"\n | \"onMouseMove\"\n | \"onMouseUp\"\n | \"onTouchStart\"\n | \"onTouchMove\"\n | \"onTouchEnd\"\n\nexport type SliderPropsType = {\n /**\n * mandatory for A11y\n */\n ariaLabel: string\n value?: number\n defaultValue?: number\n /**\n * minimum selectable value (default is 0)\n */\n min?: number\n /**\n * maximum selectable value (default is 100)\n */\n max?: number\n /**\n * values interval\n */\n step?: number\n disabled?: boolean\n /**\n * Listener called when the value is changed\n */\n onChange?: (newValue: number) => void\n /**\n * Function used to visually display the slider value\n */\n renderValue?: (\n value: number,\n status: FormElement[\"status\"]\n ) => React.ReactElement\n\n onPointerDown?: ReachSliderProps[\"onPointerDown\"]\n onPointerUp?: ReachSliderProps[\"onPointerUp\"]\n onMouseDown?: ReachSliderProps[\"onMouseDown\"]\n onMouseMove?: ReachSliderProps[\"onMouseMove\"]\n onMouseUp?: ReachSliderProps[\"onMouseUp\"]\n onTouchStart?: ReachSliderProps[\"onTouchStart\"]\n onTouchMove?: ReachSliderProps[\"onTouchMove\"]\n onTouchEnd?: ReachSliderProps[\"onTouchEnd\"]\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void\n} & FormElement &\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n NativeEventType | \"css\" | \"enterKeyHint\" | \"onChange\"\n >\n\nconst Slider = ({\n defaultValue,\n value,\n min,\n max,\n status,\n disabled,\n onChange,\n renderValue,\n ariaLabel,\n ...restProps\n}: SliderPropsType) => {\n function initValue() {\n if (value != null) return value\n if (defaultValue != null) return defaultValue\n if (min != null) return min\n return 0\n }\n\n const [sliderValue, setSliderValue] = useState(() => initValue())\n\n return (\n <div\n className={classNames(\"cobalt-slider\", {\n \"cobalt-slider--disabled\": disabled,\n })}\n >\n {renderValue && (\n <div className=\"cobalt-slider__value-container\">\n {renderValue(sliderValue, status)}\n </div>\n )}\n\n <ReachSlider\n {...restProps}\n aria-label={ariaLabel}\n handleAlignment=\"contain\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n disabled={disabled}\n onChange={(newValue) => {\n setSliderValue(newValue)\n onChange && onChange(newValue)\n }}\n />\n </div>\n )\n}\n\nconst wrappedComponent = withFieldLabelAndHint(Slider)\nwrappedComponent.displayName = \"Slider\"\n\nexport default wrappedComponent\n\ntype SliderValueMetaProps = {\n children: React.ReactNode\n}\nexport const SliderValueMeta = ({ children }: SliderValueMetaProps) => {\n return <span className=\"cobalt-slider__value-meta\">{children}</span>\n}\n"],"names":["classNames","ReachSlider"],"mappings":";;;;;AAkEA,MAAM,MAAM,GAAG,CAAC,EACd,YAAY,EACZ,KAAK,EACL,GAAG,EACH,GAAG,EACH,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,EACT,GAAG,SAAS,EACI,KAAI;AACpB,IAAA,SAAS,SAAS,GAAA;QAChB,IAAI,KAAK,IAAI,IAAI;AAAE,YAAA,OAAO,KAAK,CAAA;QAC/B,IAAI,YAAY,IAAI,IAAI;AAAE,YAAA,OAAO,YAAY,CAAA;QAC7C,IAAI,GAAG,IAAI,IAAI;AAAE,YAAA,OAAO,GAAG,CAAA;AAC3B,QAAA,OAAO,CAAC,CAAA;KACT;AAED,IAAA,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,MAAM,SAAS,EAAE,CAAC,CAAA;AAEjE,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEA,EAAU,CAAC,eAAe,EAAE;AACrC,YAAA,yBAAyB,EAAE,QAAQ;SACpC,CAAC,EAAA;AAED,QAAA,WAAW,KACV,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,gCAAgC,EAAA,EAC5C,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,CAC7B,CACP;AAED,QAAA,KAAA,CAAA,aAAA,CAACC,QAAW,EAAA,EAAA,GACN,SAAS,EAAA,YAAA,EACD,SAAS,EACrB,eAAe,EAAC,SAAS,EACzB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,QAAQ,KAAI;gBACrB,cAAc,CAAC,QAAQ,CAAC,CAAA;AACxB,gBAAA,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAA;aAC/B,EAAA,CACD,CACE,EACP;AACH,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,MAAM,EAAC;AACtD,gBAAgB,CAAC,WAAW,GAAG,QAAQ,CAAA;MAO1B,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAwB,KAAI;AACpE,IAAA,OAAO,8BAAM,SAAS,EAAC,2BAA2B,EAAE,EAAA,QAAQ,CAAQ,CAAA;AACtE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivy/cobalt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Opinionated design system for Drivy's projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"date-fns": "2.29.3",
|
|
32
32
|
"lodash.throttle": "4.1.1",
|
|
33
33
|
"media-typer": "1.1.0",
|
|
34
|
-
"nanoid": "4.0.
|
|
34
|
+
"nanoid": "4.0.1",
|
|
35
35
|
"postcss": "8.4.21",
|
|
36
36
|
"tailwindcss": "2.2.19",
|
|
37
37
|
"tippy.js": "6.3.7"
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"@percy/storybook": "3.3.1",
|
|
50
50
|
"@rollup/plugin-json": "6.0.0",
|
|
51
51
|
"@rushstack/eslint-patch": "1.2.0",
|
|
52
|
-
"@storybook/addon-essentials": "6.5.
|
|
53
|
-
"@storybook/addons": "6.5.
|
|
54
|
-
"@storybook/builder-webpack5": "6.5.
|
|
55
|
-
"@storybook/manager-webpack5": "6.5.
|
|
56
|
-
"@storybook/react": "6.5.
|
|
52
|
+
"@storybook/addon-essentials": "6.5.16",
|
|
53
|
+
"@storybook/addons": "6.5.16",
|
|
54
|
+
"@storybook/builder-webpack5": "6.5.16",
|
|
55
|
+
"@storybook/manager-webpack5": "6.5.16",
|
|
56
|
+
"@storybook/react": "6.5.16",
|
|
57
57
|
"@svgr/cli": "6.5.1",
|
|
58
58
|
"@testing-library/jest-dom": "5.16.5",
|
|
59
59
|
"@testing-library/react": "13.4.0",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"@types/react": "18.0.26",
|
|
66
66
|
"@whitespace/storybook-addon-html": "^5.1.1",
|
|
67
67
|
"autoprefixer": "10.4.13",
|
|
68
|
-
"core-js": "3.
|
|
68
|
+
"core-js": "3.28.0",
|
|
69
69
|
"css-loader": "6.7.3",
|
|
70
|
-
"eslint": "8.
|
|
70
|
+
"eslint": "8.34.0",
|
|
71
71
|
"file-loader": "6.2.0",
|
|
72
72
|
"jest": "29.3.1",
|
|
73
73
|
"jest-environment-jsdom": "29.3.1",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"rollup-plugin-postcss": "4.0.2",
|
|
88
88
|
"rollup-plugin-svgo": "2.0.0",
|
|
89
89
|
"rollup-plugin-typescript2": "0.34.1",
|
|
90
|
-
"sass": "1.
|
|
90
|
+
"sass": "1.58.1",
|
|
91
91
|
"sass-loader": "13.2.0",
|
|
92
92
|
"sharp": "0.31.3",
|
|
93
93
|
"sharp-cli": "4.1.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"svgo": "3.0.2",
|
|
98
98
|
"ts-jest": "29.0.5",
|
|
99
99
|
"ts-node": "10.9.1",
|
|
100
|
-
"typescript": "4.9.
|
|
100
|
+
"typescript": "4.9.5"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"build": "./scripts/build.sh",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
&::before,
|
|
47
47
|
&::after {
|
|
48
48
|
// This element is actually an icon but animated, so we can use icon colors here
|
|
49
|
-
@include semantic-color(
|
|
49
|
+
@include semantic-color(icon, subdued, background-color);
|
|
50
50
|
position: absolute;
|
|
51
51
|
|
|
52
52
|
content: "";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
.cob-Button__default {
|
|
2
2
|
@include semantic-color(
|
|
3
|
-
secondaryInteractive,
|
|
4
3
|
buttonBackground,
|
|
4
|
+
secondaryInteractive,
|
|
5
5
|
background-color
|
|
6
6
|
);
|
|
7
|
-
@include semantic-color(
|
|
8
|
-
@include semantic-color(
|
|
7
|
+
@include semantic-color(stroke, baseInteractive, border-color);
|
|
8
|
+
@include semantic-color(buttonLabel, secondaryInteractive, color);
|
|
9
9
|
|
|
10
10
|
&--primary {
|
|
11
11
|
@include semantic-color(
|
|
12
|
-
primaryInteractive,
|
|
13
12
|
buttonBackground,
|
|
13
|
+
primaryInteractive,
|
|
14
14
|
background-color
|
|
15
15
|
);
|
|
16
|
-
@include semantic-color(
|
|
16
|
+
@include semantic-color(buttonLabel, primaryInteractive, color);
|
|
17
17
|
|
|
18
18
|
border-color: transparent;
|
|
19
19
|
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
|
|
26
26
|
&.cob-Button__default--destructive {
|
|
27
27
|
@include semantic-color(
|
|
28
|
-
destructiveInteractive,
|
|
29
28
|
buttonBackground,
|
|
29
|
+
destructiveInteractive,
|
|
30
30
|
background-color
|
|
31
31
|
);
|
|
32
|
-
@include semantic-color(
|
|
32
|
+
@include semantic-color(buttonLabel, destructiveInteractive, color);
|
|
33
33
|
|
|
34
34
|
border-color: transparent;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&--destructive {
|
|
39
|
-
@include semantic-color(
|
|
39
|
+
@include semantic-color(text, error, color);
|
|
40
40
|
|
|
41
41
|
&:hover,
|
|
42
42
|
&:focus,
|
|
43
43
|
&:active {
|
|
44
|
-
@include semantic-color(
|
|
45
|
-
@include semantic-color(
|
|
44
|
+
@include semantic-color(text, error, color);
|
|
45
|
+
@include semantic-color(stroke, error, border-color);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
&--selected:focus,
|
|
51
51
|
&--selected:active,
|
|
52
52
|
&--selected {
|
|
53
|
-
@include semantic-color(
|
|
54
|
-
@include semantic-color(
|
|
53
|
+
@include semantic-color(buttonBackground, selected, background-color);
|
|
54
|
+
@include semantic-color(buttonLabel, selected, color);
|
|
55
55
|
@include border-color(accent);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.cob-Button__ghost {
|
|
2
|
-
@include semantic-color(
|
|
2
|
+
@include semantic-color(buttonLabel, tertiaryInteractive, color);
|
|
3
3
|
@include semantic-color(
|
|
4
|
-
tertiaryInteractive,
|
|
5
4
|
buttonBackground,
|
|
5
|
+
tertiaryInteractive,
|
|
6
6
|
background-color
|
|
7
7
|
);
|
|
8
8
|
border-color: transparent;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&.cob-Button__ghost--destructive {
|
|
21
|
-
@include semantic-color(
|
|
21
|
+
@include semantic-color(text, error, color);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&.cob-Button__ghost--standalone {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
&[data-disabled]:not([data-disabled="false"]),
|
|
36
36
|
&.cob-Button--disabled {
|
|
37
37
|
@include semantic-color(
|
|
38
|
-
tertiaryInteractive,
|
|
39
38
|
buttonBackground,
|
|
39
|
+
tertiaryInteractive,
|
|
40
40
|
background-color
|
|
41
41
|
);
|
|
42
42
|
border-color: transparent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.cob-Button__inversed {
|
|
2
|
-
@include semantic-color(
|
|
3
|
-
@include semantic-color(
|
|
2
|
+
@include semantic-color(text, inversed, color);
|
|
3
|
+
@include semantic-color(stroke, base, border-color);
|
|
4
4
|
|
|
5
5
|
background-color: transparent;
|
|
6
6
|
box-shadow: none;
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
&[disabled],
|
|
98
98
|
&[data-disabled]:not([data-disabled="false"]),
|
|
99
99
|
&.cob-Button--disabled {
|
|
100
|
-
@include semantic-color(
|
|
101
|
-
@include semantic-color(
|
|
102
|
-
@include semantic-color(
|
|
100
|
+
@include semantic-color(buttonBackground, disabled, background-color);
|
|
101
|
+
@include semantic-color(buttonLabel, disabled, color);
|
|
102
|
+
@include semantic-color(stroke, subdued, border-color);
|
|
103
103
|
|
|
104
104
|
opacity: 1;
|
|
105
105
|
cursor: not-allowed;
|
|
@@ -110,9 +110,9 @@
|
|
|
110
110
|
&:hover,
|
|
111
111
|
&:focus,
|
|
112
112
|
&:active {
|
|
113
|
-
@include semantic-color(
|
|
114
|
-
@include semantic-color(
|
|
115
|
-
@include semantic-color(
|
|
113
|
+
@include semantic-color(buttonBackground, disabled, background-color);
|
|
114
|
+
@include semantic-color(buttonLabel, disabled, color);
|
|
115
|
+
@include semantic-color(stroke, subdued, border-color);
|
|
116
116
|
box-shadow: none;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -92,14 +92,14 @@
|
|
|
92
92
|
|
|
93
93
|
&--with-icon {
|
|
94
94
|
.cobalt-Icon {
|
|
95
|
-
@include semantic-color(
|
|
95
|
+
@include semantic-color(icon, base, fill);
|
|
96
96
|
margin-right: spacing(xs);
|
|
97
97
|
|
|
98
98
|
transition: fill $animation-duration ease-in-out;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
#{ $self }__Input:checked + #{ $self }__Label .cobalt-Icon {
|
|
102
|
-
@include semantic-color(
|
|
102
|
+
@include semantic-color(icon, accentAlt, fill);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
@include bg-color(secondary);
|
|
111
111
|
|
|
112
112
|
.cobalt-Icon {
|
|
113
|
-
@include semantic-color(
|
|
113
|
+
@include semantic-color(icon, base, fill);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
@include border-color(errorAlt);
|
|
121
121
|
|
|
122
122
|
.cobalt-Icon {
|
|
123
|
-
@include semantic-color(
|
|
123
|
+
@include semantic-color(icon, errorAlt, fill);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
&:focus-visible + #{ $self }__inner {
|
|
92
|
-
@include semantic-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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
51
|
+
@include semantic-color(icon, accent, fill);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
#{ $self }__Input:disabled + #{ $self }__Icon {
|
|
55
|
-
@include semantic-color(
|
|
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(
|
|
123
|
+
@include semantic-color(stroke, base, background-color);
|
|
124
124
|
display: inline-block;
|
|
125
125
|
|
|
126
126
|
transition: $animation-duration;
|