shinkansen-sprockets 1.3.2 → 2.0.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/.prettierignore +4 -0
- package/package.json +49 -42
- package/src/sass/.stylelintrc +14 -0
- package/src/sass/_sprockets.scss +80 -0
- package/src/sass/sprockets/_check-answers.scss +55 -0
- package/src/sass/sprockets/_error-summary.scss +58 -0
- package/src/sass/sprockets/_error.scss +49 -0
- /package/src/{components → js/components}/common/text-content/index.cjs +0 -0
- /package/src/{components → js/components}/common/text-content/index.d.cts +0 -0
- /package/src/{components → js/components}/common/text-content/index.d.mts +0 -0
- /package/src/{components → js/components}/common/text-content/index.jsx +0 -0
- /package/src/{components → js/components}/common/visually-hidden-text/index.cjs +0 -0
- /package/src/{components → js/components}/common/visually-hidden-text/index.d.cts +0 -0
- /package/src/{components → js/components}/common/visually-hidden-text/index.d.mts +0 -0
- /package/src/{components → js/components}/common/visually-hidden-text/index.jsx +0 -0
- /package/src/{components → js/components}/description/index.cjs +0 -0
- /package/src/{components → js/components}/description/index.d.cts +0 -0
- /package/src/{components → js/components}/description/index.d.mts +0 -0
- /package/src/{components → js/components}/description/index.jsx +0 -0
- /package/src/{components → js/components}/error-message/index.cjs +0 -0
- /package/src/{components → js/components}/error-message/index.d.cts +0 -0
- /package/src/{components → js/components}/error-message/index.d.mts +0 -0
- /package/src/{components → js/components}/error-message/index.jsx +0 -0
- /package/src/{components → js/components}/group/index.cjs +0 -0
- /package/src/{components → js/components}/group/index.d.cts +0 -0
- /package/src/{components → js/components}/group/index.d.mts +0 -0
- /package/src/{components → js/components}/group/index.jsx +0 -0
- /package/src/{components → js/components}/index.cjs +0 -0
- /package/src/{components → js/components}/index.d.cts +0 -0
- /package/src/{components → js/components}/index.d.mts +0 -0
- /package/src/{components → js/components}/index.mjs +0 -0
- /package/src/{components → js/components}/title/index.cjs +0 -0
- /package/src/{components → js/components}/title/index.d.cts +0 -0
- /package/src/{components → js/components}/title/index.d.mts +0 -0
- /package/src/{components → js/components}/title/index.jsx +0 -0
- /package/src/{index.cjs → js/index.cjs} +0 -0
- /package/src/{index.d.cts → js/index.d.cts} +0 -0
- /package/src/{index.d.mts → js/index.d.mts} +0 -0
- /package/src/{index.mjs → js/index.mjs} +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/answer-title.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/answer-title.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/answer-title.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/answer-title.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/answer-value.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/answer-value.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/answer-value.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/answer-value.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/change-answer.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/change-answer.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/change-answer.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/change-answer.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/group/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/title/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/title/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/title/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/check-answers/title/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/group/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/group/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/group/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/group/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/title/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/title/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/title/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/error-summary/title/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/description/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/description/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/description/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/description/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/error-message/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/error-message/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/error-message/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/error-message/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/group/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/group/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/group/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/group/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/title/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/title/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/title/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/fieldset/title/index.jsx +0 -0
- /package/src/{sprockets → js/sprockets}/index.cjs +0 -0
- /package/src/{sprockets → js/sprockets}/index.d.cts +0 -0
- /package/src/{sprockets → js/sprockets}/index.d.mts +0 -0
- /package/src/{sprockets → js/sprockets}/index.jsx +0 -0
- /package/src/{super → js/super}/components/description/index.cjs +0 -0
- /package/src/{super → js/super}/components/description/index.d.cts +0 -0
- /package/src/{super → js/super}/components/description/index.d.mts +0 -0
- /package/src/{super → js/super}/components/description/index.jsx +0 -0
- /package/src/{super → js/super}/components/error-message/index.cjs +0 -0
- /package/src/{super → js/super}/components/error-message/index.d.cts +0 -0
- /package/src/{super → js/super}/components/error-message/index.d.mts +0 -0
- /package/src/{super → js/super}/components/error-message/index.jsx +0 -0
- /package/src/{super → js/super}/components/group/index.cjs +0 -0
- /package/src/{super → js/super}/components/group/index.d.cts +0 -0
- /package/src/{super → js/super}/components/group/index.d.mts +0 -0
- /package/src/{super → js/super}/components/group/index.jsx +0 -0
- /package/src/{super → js/super}/components/index.cjs +0 -0
- /package/src/{super → js/super}/components/index.d.cts +0 -0
- /package/src/{super → js/super}/components/index.d.mts +0 -0
- /package/src/{super → js/super}/components/index.mjs +0 -0
- /package/src/{super → js/super}/components/title/index.cjs +0 -0
- /package/src/{super → js/super}/components/title/index.d.cts +0 -0
- /package/src/{super → js/super}/components/title/index.d.mts +0 -0
- /package/src/{super → js/super}/components/title/index.jsx +0 -0
- /package/src/{super → js/super}/sprockets/index.cjs +0 -0
- /package/src/{super → js/super}/sprockets/index.d.cts +0 -0
- /package/src/{super → js/super}/sprockets/index.d.mts +0 -0
- /package/src/{super → js/super}/sprockets/index.jsx +0 -0
- /package/src/{transformers → js/transformers}/check-answers/index.d.mts +0 -0
- /package/src/{transformers → js/transformers}/check-answers/index.mjs +0 -0
- /package/src/{transformers → js/transformers}/common/index.d.mts +0 -0
- /package/src/{transformers → js/transformers}/common/index.mjs +0 -0
- /package/src/{transformers → js/transformers}/error-message/index.d.mts +0 -0
- /package/src/{transformers → js/transformers}/error-message/index.mjs +0 -0
- /package/src/{transformers → js/transformers}/error-summary/index.d.mts +0 -0
- /package/src/{transformers → js/transformers}/error-summary/index.mjs +0 -0
- /package/src/{transformers → js/transformers}/index.d.mts +0 -0
- /package/src/{transformers → js/transformers}/index.mjs +0 -0
package/.prettierignore
ADDED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "shinkansen-sprockets",
|
3
|
-
"version": "
|
3
|
+
"version": "2.0.0",
|
4
4
|
"description": "Shinkansen Sprockets",
|
5
5
|
"keywords": [
|
6
6
|
"Shinkansen",
|
@@ -10,7 +10,7 @@
|
|
10
10
|
"Karakuri",
|
11
11
|
"React"
|
12
12
|
],
|
13
|
-
"main": "./src/index.mjs",
|
13
|
+
"main": "./src/js/index.mjs",
|
14
14
|
"type": "module",
|
15
15
|
"types": "./index.d.mts",
|
16
16
|
"author": {
|
@@ -27,22 +27,27 @@
|
|
27
27
|
"url": "git+ssh://git@github.com/modernpoacher/shinkansen-sprockets.git"
|
28
28
|
},
|
29
29
|
"scripts": {
|
30
|
-
"build": "cross-env DEBUG=shinkansen-sprockets* webpack",
|
30
|
+
"build": "cross-env DEBUG=shinkansen-sprockets* webpack -c .storybook/webpack.config.mjs",
|
31
31
|
"build-storybook": "storybook build",
|
32
|
-
"build:watch": "
|
33
|
-
"lint": "
|
34
|
-
"lint:fix": "npm run lint
|
32
|
+
"build:watch": "npm run build -- -w",
|
33
|
+
"lint": "npm run lint:js && npm run lint:sass",
|
34
|
+
"lint:fix": "npm run lint:js:fix && npm run lint:sass:fix",
|
35
|
+
"lint:js": "eslint",
|
36
|
+
"lint:js:fix": "npm run lint:js -- --fix",
|
37
|
+
"lint:sass": "stylelint src/sass .storybook/*.scss",
|
38
|
+
"lint:sass:fix": "npm run lint:sass -- --fix",
|
35
39
|
"nvm": "bash nvm.sh",
|
40
|
+
"prebuild": "npm run nvm",
|
36
41
|
"prelint": "npm run nvm",
|
37
42
|
"prepare": "husky",
|
38
|
-
"
|
39
|
-
"prestorybook": "npm run build && npm run transform",
|
43
|
+
"prestorybook": "npm run build && npm run prettier && npm run transform",
|
40
44
|
"pretest": "npm run nvm",
|
45
|
+
"prettier": "prettier src/sass .storybook --write",
|
41
46
|
"storybook": "storybook dev -p 6007",
|
42
47
|
"test": "npm run test:mocha && npm run test:jest",
|
43
48
|
"test:jest": "cross-env NODE_ENV=test jest",
|
44
49
|
"test:mocha": "cross-env NODE_ENV=test mocha test --recursive",
|
45
|
-
"transform": "cross-env DEBUG=shinkansen-sprockets*
|
50
|
+
"transform": "cross-env DEBUG=shinkansen-sprockets* .storybook/transform.sh"
|
46
51
|
},
|
47
52
|
"dependencies": {
|
48
53
|
"classnames": "^2.5.1",
|
@@ -56,7 +61,7 @@
|
|
56
61
|
"@babel/preset-env": "^7.26.9",
|
57
62
|
"@babel/preset-react": "^7.26.3",
|
58
63
|
"@babel/register": "^7.25.9",
|
59
|
-
"@modernpoacher/design-system": "
|
64
|
+
"@modernpoacher/design-system": "2.0.0",
|
60
65
|
"@sequencemedia/eslint-config-standard": "^0.2.42",
|
61
66
|
"@sequencemedia/eslint-config-typescript": "^0.1.58",
|
62
67
|
"@storybook/addon-actions": "^8.6.4",
|
@@ -78,7 +83,6 @@
|
|
78
83
|
"@typescript-eslint/parser": "^8.26.0",
|
79
84
|
"autoprefixer": "^10.4.20",
|
80
85
|
"chai": "^5.2.0",
|
81
|
-
"clean-webpack-plugin": "^4.0.0",
|
82
86
|
"core-js": "^3.41.0",
|
83
87
|
"cross-env": "^7.0.3",
|
84
88
|
"eslint": "^9.22.0",
|
@@ -96,6 +100,7 @@
|
|
96
100
|
"postcss-import": "^16.1.0",
|
97
101
|
"postcss-loader": "^8.1.1",
|
98
102
|
"postcss-map": "^0.11.0",
|
103
|
+
"prettier": "^3.5.3",
|
99
104
|
"prop-types": "^15.8.1",
|
100
105
|
"react": "18.3.1",
|
101
106
|
"react-dom": "18.3.1",
|
@@ -105,57 +110,59 @@
|
|
105
110
|
"sass": "^1.85.1",
|
106
111
|
"sass-loader": "^16.0.5",
|
107
112
|
"storybook": "^8.6.4",
|
113
|
+
"stylelint": "^16.15.0",
|
114
|
+
"stylelint-config-recommended-scss": "^14.1.0",
|
115
|
+
"stylelint-scss": "^6.11.1",
|
108
116
|
"webpack": "^5.98.0",
|
109
117
|
"webpack-cli": "^6.0.1"
|
110
118
|
},
|
111
119
|
"imports": {
|
112
|
-
"#build/paths": "./build/paths.mjs",
|
113
120
|
"#sprockets": {
|
114
|
-
"require": "./src/index.cjs",
|
115
|
-
"import": "./src/index.mjs"
|
121
|
+
"require": "./src/js/index.cjs",
|
122
|
+
"import": "./src/js/index.mjs"
|
116
123
|
},
|
117
124
|
"#sprockets/components": {
|
118
|
-
"require": "./src/components/index.cjs",
|
119
|
-
"import": "./src/components/index.mjs"
|
125
|
+
"require": "./src/js/components/index.cjs",
|
126
|
+
"import": "./src/js/components/index.mjs"
|
120
127
|
},
|
121
|
-
"#sprockets/components/*": "./src/components/*/index.cjs",
|
122
|
-
"#sprockets/sprockets": "./src/sprockets/index.cjs",
|
123
|
-
"#sprockets/sprockets/*": "./src/sprockets/*/index.cjs",
|
124
|
-
"#sprockets/sprockets/check-answers/group/*": "./src/sprockets/check-answers/group/*.cjs",
|
125
|
-
"#sprockets/sprockets/error-summary/group/*": "./src/sprockets/error-summary/group/*.cjs",
|
128
|
+
"#sprockets/components/*": "./src/js/components/*/index.cjs",
|
129
|
+
"#sprockets/sprockets": "./src/js/sprockets/index.cjs",
|
130
|
+
"#sprockets/sprockets/*": "./src/js/sprockets/*/index.cjs",
|
131
|
+
"#sprockets/sprockets/check-answers/group/*": "./src/js/sprockets/check-answers/group/*.cjs",
|
132
|
+
"#sprockets/sprockets/error-summary/group/*": "./src/js/sprockets/error-summary/group/*.cjs",
|
126
133
|
"#sprockets/super/components": {
|
127
|
-
"require": "./src/super/components/index.cjs",
|
128
|
-
"import": "./src/super/components/index.mjs"
|
134
|
+
"require": "./src/js/super/components/index.cjs",
|
135
|
+
"import": "./src/js/super/components/index.mjs"
|
129
136
|
},
|
130
|
-
"#sprockets/super/components/*": "./src/super/components/*/index.cjs",
|
131
|
-
"#sprockets/super/sprockets": "./src/super/sprockets/index.cjs",
|
132
|
-
"#sprockets/transformers": "./src/transformers/index.mjs",
|
133
|
-
"#sprockets/transformers/*": "./src/transformers/*/index.mjs",
|
137
|
+
"#sprockets/super/components/*": "./src/js/super/components/*/index.cjs",
|
138
|
+
"#sprockets/super/sprockets": "./src/js/super/sprockets/index.cjs",
|
139
|
+
"#sprockets/transformers": "./src/js/transformers/index.mjs",
|
140
|
+
"#sprockets/transformers/*": "./src/js/transformers/*/index.mjs",
|
134
141
|
"#stories/definitions/*": "./stories/definitions/*.json",
|
135
142
|
"#stories/errors": "./stories/errors.mjs",
|
136
143
|
"#stories/sprockets/*": "./stories/sprockets/*/index.stories.jsx"
|
137
144
|
},
|
138
145
|
"exports": {
|
139
146
|
".": {
|
140
|
-
"require": "./src/index.cjs",
|
141
|
-
"import": "./src/index.mjs"
|
147
|
+
"require": "./src/js/index.cjs",
|
148
|
+
"import": "./src/js/index.mjs"
|
142
149
|
},
|
143
150
|
"./components": {
|
144
|
-
"require": "./src/components/index.cjs",
|
145
|
-
"import": "./src/components/index.mjs"
|
151
|
+
"require": "./src/js/components/index.cjs",
|
152
|
+
"import": "./src/js/components/index.mjs"
|
146
153
|
},
|
147
|
-
"./components/*": "./src/components/*/index.cjs",
|
148
|
-
"./sprockets": "./src/sprockets/index.cjs",
|
149
|
-
"./sprockets/*": "./src/sprockets/*/index.cjs",
|
150
|
-
"./sprockets/check-answers/group/*": "./src/sprockets/check-answers/group/*.cjs",
|
151
|
-
"./sprockets/error-summary/group/*": "./src/sprockets/error-summary/group/*.cjs",
|
154
|
+
"./components/*": "./src/js/components/*/index.cjs",
|
155
|
+
"./sprockets": "./src/js/sprockets/index.cjs",
|
156
|
+
"./sprockets/*": "./src/js/sprockets/*/index.cjs",
|
157
|
+
"./sprockets/check-answers/group/*": "./src/js/sprockets/check-answers/group/*.cjs",
|
158
|
+
"./sprockets/error-summary/group/*": "./src/js/sprockets/error-summary/group/*.cjs",
|
152
159
|
"./super/components": {
|
153
|
-
"require": "./src/super/components/index.cjs",
|
154
|
-
"import": "./src/super/components/index.mjs"
|
160
|
+
"require": "./src/js/super/components/index.cjs",
|
161
|
+
"import": "./src/js/super/components/index.mjs"
|
155
162
|
},
|
156
|
-
"./super/components/*": "./src/super/components/*/index.cjs",
|
157
|
-
"./super/sprockets": "./src/super/sprockets/index.cjs",
|
158
|
-
"./transformers": "./src/transformers/index.mjs",
|
159
|
-
"./transformers/*": "./src/transformers/*/index.mjs"
|
163
|
+
"./super/components/*": "./src/js/super/components/*/index.cjs",
|
164
|
+
"./super/sprockets": "./src/js/super/sprockets/index.cjs",
|
165
|
+
"./transformers": "./src/js/transformers/index.mjs",
|
166
|
+
"./transformers/*": "./src/js/transformers/*/index.mjs"
|
160
167
|
}
|
161
168
|
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
@use "design-system/palette";
|
2
|
+
@use "design-system/typography";
|
3
|
+
|
4
|
+
@use "sprockets/error-summary";
|
5
|
+
@use "sprockets/check-answers";
|
6
|
+
@use "sprockets/error";
|
7
|
+
|
8
|
+
@mixin sprockets {
|
9
|
+
padding: 0;
|
10
|
+
margin: 1rem 0;
|
11
|
+
|
12
|
+
&:first-child {
|
13
|
+
margin-top: 0;
|
14
|
+
}
|
15
|
+
|
16
|
+
&:last-child {
|
17
|
+
margin-bottom: 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
line-height: 1.375rem;
|
21
|
+
|
22
|
+
&.error-summary {
|
23
|
+
@include error-summary.sprocket-error-summary;
|
24
|
+
}
|
25
|
+
|
26
|
+
&.check-answers {
|
27
|
+
@include check-answers.sprocket-check-answers;
|
28
|
+
}
|
29
|
+
|
30
|
+
&.fieldset {
|
31
|
+
legend {
|
32
|
+
@include typography.heading-m;
|
33
|
+
|
34
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
35
|
+
& {
|
36
|
+
padding: 0;
|
37
|
+
margin-top: 0;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
&.error {
|
42
|
+
@include error.sprocket-error;
|
43
|
+
|
44
|
+
padding-left: 1rem;
|
45
|
+
}
|
46
|
+
|
47
|
+
.description {
|
48
|
+
@include typography.secondary-text;
|
49
|
+
|
50
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
51
|
+
& {
|
52
|
+
display: block;
|
53
|
+
padding: 0;
|
54
|
+
margin: 0 0 0.25rem 0;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
.error-message {
|
59
|
+
@include typography.error-standard;
|
60
|
+
|
61
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
62
|
+
& {
|
63
|
+
display: block;
|
64
|
+
padding: 0;
|
65
|
+
margin: 0 0 0.25rem 0;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Descendants
|
72
|
+
*/
|
73
|
+
.sprocket {
|
74
|
+
margin-bottom: 0;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
%sprockets {
|
79
|
+
@include sprockets;
|
80
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
@use "design-system/helpers/invisible";
|
2
|
+
|
3
|
+
@use "design-system/palette";
|
4
|
+
@use "design-system/typography";
|
5
|
+
|
6
|
+
@mixin sprocket-check-answers {
|
7
|
+
& > h2:first-child {
|
8
|
+
margin-top: 0;
|
9
|
+
}
|
10
|
+
|
11
|
+
dl {
|
12
|
+
display: table;
|
13
|
+
width: 100%;
|
14
|
+
table-layout: fixed;
|
15
|
+
|
16
|
+
.answer {
|
17
|
+
display: table-row;
|
18
|
+
}
|
19
|
+
|
20
|
+
dt,
|
21
|
+
dd {
|
22
|
+
display: table-cell;
|
23
|
+
padding: 0.25rem 0;
|
24
|
+
border-bottom: 2px solid palette.$grey-1;
|
25
|
+
}
|
26
|
+
|
27
|
+
.answer-title {
|
28
|
+
@include typography.heading-s;
|
29
|
+
|
30
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
31
|
+
& {
|
32
|
+
width: 30%;
|
33
|
+
padding-right: 1rem;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.answer-value {
|
38
|
+
width: 50%;
|
39
|
+
}
|
40
|
+
|
41
|
+
.change-answer {
|
42
|
+
width: 20%;
|
43
|
+
padding-left: 1rem;
|
44
|
+
text-align: right;
|
45
|
+
|
46
|
+
.visually-hidden-text {
|
47
|
+
@include invisible.invisible;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
%sprocket-check-answers {
|
54
|
+
@include sprocket-check-answers;
|
55
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
@use "design-system/helpers/invisible";
|
2
|
+
|
3
|
+
@use "design-system/palette";
|
4
|
+
@use "design-system/typography";
|
5
|
+
|
6
|
+
@mixin sprocket-error-summary {
|
7
|
+
background-color: palette.$white;
|
8
|
+
border: 0.25rem solid palette.$error-standard;
|
9
|
+
display: block;
|
10
|
+
padding: 1rem;
|
11
|
+
line-height: 2rem;
|
12
|
+
|
13
|
+
& > h2:first-child {
|
14
|
+
margin-top: 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
ul {
|
18
|
+
margin-bottom: 0;
|
19
|
+
padding: 0;
|
20
|
+
list-style-type: none;
|
21
|
+
}
|
22
|
+
|
23
|
+
li {
|
24
|
+
@include typography.error-standard;
|
25
|
+
|
26
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
27
|
+
& {
|
28
|
+
display: block;
|
29
|
+
padding: 0;
|
30
|
+
margin: 0 0 0.25rem 0;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
a {
|
35
|
+
@include typography.error-standard;
|
36
|
+
|
37
|
+
&:focus {
|
38
|
+
outline: 3px solid transparent;
|
39
|
+
text-decoration: none;
|
40
|
+
outline-offset: 0;
|
41
|
+
box-shadow:
|
42
|
+
0 -2px palette.$outline,
|
43
|
+
0 4px palette.$black;
|
44
|
+
color: palette.$standard;
|
45
|
+
background-color: palette.$outline;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
&:focus {
|
50
|
+
outline: 3px solid palette.$outline;
|
51
|
+
outline-offset: 0;
|
52
|
+
border-color: palette.$black;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
%sprocket-error-summary {
|
57
|
+
@include sprocket-error-summary;
|
58
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
@use "design-system/palette";
|
2
|
+
@use "design-system/typography";
|
3
|
+
|
4
|
+
@mixin sprocket-error {
|
5
|
+
border-left: 0.25rem solid palette.$error-standard;
|
6
|
+
|
7
|
+
input:not([type="checkbox"]):not([type="radio"]),
|
8
|
+
select,
|
9
|
+
textarea {
|
10
|
+
border: 2px solid palette.$error-standard;
|
11
|
+
|
12
|
+
&:focus {
|
13
|
+
border-color: palette.$black;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
&.radio,
|
18
|
+
&.checkbox {
|
19
|
+
padding-left: 4rem;
|
20
|
+
|
21
|
+
// stylelint-disable-next-line no-descending-specificity
|
22
|
+
input {
|
23
|
+
left: 1.5rem;
|
24
|
+
}
|
25
|
+
|
26
|
+
// stylelint-disable-next-line no-descending-specificity
|
27
|
+
label:before {
|
28
|
+
left: 1rem;
|
29
|
+
|
30
|
+
border: 2px solid palette.$error-standard;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
&.radio {
|
35
|
+
input:checked + label:after {
|
36
|
+
left: 1.5rem;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
&.checkbox {
|
41
|
+
input:checked + label:after {
|
42
|
+
left: 1.3125rem; // 21px;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
%sprocket-error {
|
48
|
+
@include sprocket-error;
|
49
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|