@microsoft/atlas-css 3.27.2 → 3.29.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/dist/class-names.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +43 -6
- package/src/components/form/checkbox.scss +33 -11
- package/src/core/focus.scss +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/atlas-css",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"description": "Styles backing the Atlas Design System used by Microsoft's Developer Relations.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -8,11 +8,44 @@
|
|
|
8
8
|
"lint-fix": "stylelint \"./src/**/*.scss\" --fix",
|
|
9
9
|
"start": "parcel watch src/index.scss",
|
|
10
10
|
"build": "npm run build:css && npm run tokens && npm run class-names",
|
|
11
|
-
"build:css": "
|
|
12
|
-
"tokens": "
|
|
13
|
-
"class-names": "
|
|
11
|
+
"build:css": "wireit",
|
|
12
|
+
"tokens": "wireit",
|
|
13
|
+
"class-names": "wireit",
|
|
14
14
|
"prepublishOnly": "npm run lint && npm run build"
|
|
15
15
|
},
|
|
16
|
+
"wireit": {
|
|
17
|
+
"build:css": {
|
|
18
|
+
"command": "parcel build src/index.scss --no-cache",
|
|
19
|
+
"files": [
|
|
20
|
+
"./src/**/*.scss"
|
|
21
|
+
],
|
|
22
|
+
"output": [
|
|
23
|
+
"./dist/**/*.css"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"tokens": {
|
|
27
|
+
"command": "node ./tokens/index.js",
|
|
28
|
+
"files": [
|
|
29
|
+
"./tokens/index.js",
|
|
30
|
+
"./src/tokens/**/*.scss"
|
|
31
|
+
],
|
|
32
|
+
"output": [
|
|
33
|
+
"./dist/tokens.json",
|
|
34
|
+
"./dist/tokens.ts"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"class-names": {
|
|
38
|
+
"command": "node ./class-names/index.js",
|
|
39
|
+
"files": [
|
|
40
|
+
"./class-names/index.js",
|
|
41
|
+
"./dist/index.css"
|
|
42
|
+
],
|
|
43
|
+
"dependencies": [
|
|
44
|
+
"build:css",
|
|
45
|
+
"tokens"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
16
49
|
"homepage": "https://github.com/microsoft/atlas-design",
|
|
17
50
|
"repository": {
|
|
18
51
|
"type": "git",
|
|
@@ -33,6 +66,9 @@
|
|
|
33
66
|
"css",
|
|
34
67
|
"scss"
|
|
35
68
|
],
|
|
69
|
+
"resolutions": {
|
|
70
|
+
"sass": "grass"
|
|
71
|
+
},
|
|
36
72
|
"author": "Microsoft Corporation",
|
|
37
73
|
"license": "MIT",
|
|
38
74
|
"devDependencies": {
|
|
@@ -45,10 +81,11 @@
|
|
|
45
81
|
"lightningcss": "1.16.0",
|
|
46
82
|
"prettier": "^2.7.1",
|
|
47
83
|
"quicktype-core": "^6.0.62",
|
|
48
|
-
"
|
|
84
|
+
"grass": "^1.0.2",
|
|
49
85
|
"sass-export": "^2.1.2",
|
|
50
86
|
"stylelint": "^14.13.0",
|
|
51
87
|
"stylelint-config-prettier": "^9.0.3",
|
|
52
|
-
"stylelint-prettier": "^2.0.0"
|
|
88
|
+
"stylelint-prettier": "^2.0.0",
|
|
89
|
+
"wireit": "^0.9.5"
|
|
53
90
|
}
|
|
54
91
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
$checkbox-border-radius: $border-radius-sm !default;
|
|
4
4
|
$checkbox-border-width: 0.0625em !default;
|
|
5
5
|
$checkbox-unchecked-border-color: $control-border !default;
|
|
6
|
+
$checkbox-invalid-border-color: $danger !default;
|
|
6
7
|
$checkbox-color: $primary !default;
|
|
7
8
|
$checkbox-check-color: $primary-invert !default;
|
|
8
9
|
$checkbox-check-hover-color: $text-subtle !default;
|
|
@@ -61,21 +62,17 @@ $checkbox-spacing: $spacer-3 !default;
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
@include
|
|
65
|
+
&.checkbox-sm {
|
|
66
|
+
@include control-sm;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
&.checkbox-
|
|
69
|
-
|
|
69
|
+
&.checkbox-lg {
|
|
70
|
+
@include control-lg;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
input[type='checkbox'] {
|
|
73
74
|
@include visually-hidden();
|
|
74
75
|
|
|
75
|
-
&:focus-visible + .checkbox-check {
|
|
76
|
-
@extend %focus;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
76
|
&:checked + .checkbox-check {
|
|
80
77
|
border-color: $checkbox-color;
|
|
81
78
|
background-color: $checkbox-color;
|
|
@@ -87,9 +84,22 @@ $checkbox-spacing: $spacer-3 !default;
|
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
86
|
|
|
90
|
-
&[disabled]
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
&[disabled] {
|
|
88
|
+
+ .checkbox-check {
|
|
89
|
+
border-color: $checkbox-unchecked-border-color;
|
|
90
|
+
opacity: 0.6;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
+ .checkbox-check,
|
|
94
|
+
~ .checkbox-text {
|
|
95
|
+
cursor: not-allowed;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include focus-visible {
|
|
100
|
+
+ .checkbox-check {
|
|
101
|
+
@extend %focus;
|
|
102
|
+
}
|
|
93
103
|
}
|
|
94
104
|
}
|
|
95
105
|
|
|
@@ -116,4 +126,16 @@ $checkbox-spacing: $spacer-3 !default;
|
|
|
116
126
|
border-color: $checkbox-check-color;
|
|
117
127
|
}
|
|
118
128
|
}
|
|
129
|
+
|
|
130
|
+
&.is-invalid {
|
|
131
|
+
input[type='checkbox']:not(:checked) + .checkbox-check {
|
|
132
|
+
border-color: $checkbox-invalid-border-color;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:hover {
|
|
137
|
+
input[type='checkbox']:not(:checked):not([disabled]) + .checkbox-check::before {
|
|
138
|
+
@include checkmark;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
119
141
|
}
|