shinkansen-sprockets 1.3.2 → 2.0.1

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 (133) hide show
  1. package/.prettierignore +4 -0
  2. package/package.json +51 -44
  3. package/src/sass/.stylelintrc +14 -0
  4. package/src/sass/_sprockets.scss +80 -0
  5. package/src/sass/sprockets/_check-answers.scss +55 -0
  6. package/src/sass/sprockets/_error-summary.scss +58 -0
  7. package/src/sass/sprockets/_error.scss +49 -0
  8. /package/src/{components → js/components}/common/text-content/index.cjs +0 -0
  9. /package/src/{components → js/components}/common/text-content/index.d.cts +0 -0
  10. /package/src/{components → js/components}/common/text-content/index.d.mts +0 -0
  11. /package/src/{components → js/components}/common/text-content/index.jsx +0 -0
  12. /package/src/{components → js/components}/common/visually-hidden-text/index.cjs +0 -0
  13. /package/src/{components → js/components}/common/visually-hidden-text/index.d.cts +0 -0
  14. /package/src/{components → js/components}/common/visually-hidden-text/index.d.mts +0 -0
  15. /package/src/{components → js/components}/common/visually-hidden-text/index.jsx +0 -0
  16. /package/src/{components → js/components}/description/index.cjs +0 -0
  17. /package/src/{components → js/components}/description/index.d.cts +0 -0
  18. /package/src/{components → js/components}/description/index.d.mts +0 -0
  19. /package/src/{components → js/components}/description/index.jsx +0 -0
  20. /package/src/{components → js/components}/error-message/index.cjs +0 -0
  21. /package/src/{components → js/components}/error-message/index.d.cts +0 -0
  22. /package/src/{components → js/components}/error-message/index.d.mts +0 -0
  23. /package/src/{components → js/components}/error-message/index.jsx +0 -0
  24. /package/src/{components → js/components}/group/index.cjs +0 -0
  25. /package/src/{components → js/components}/group/index.d.cts +0 -0
  26. /package/src/{components → js/components}/group/index.d.mts +0 -0
  27. /package/src/{components → js/components}/group/index.jsx +0 -0
  28. /package/src/{components → js/components}/index.cjs +0 -0
  29. /package/src/{components → js/components}/index.d.cts +0 -0
  30. /package/src/{components → js/components}/index.d.mts +0 -0
  31. /package/src/{components → js/components}/index.mjs +0 -0
  32. /package/src/{components → js/components}/title/index.cjs +0 -0
  33. /package/src/{components → js/components}/title/index.d.cts +0 -0
  34. /package/src/{components → js/components}/title/index.d.mts +0 -0
  35. /package/src/{components → js/components}/title/index.jsx +0 -0
  36. /package/src/{index.cjs → js/index.cjs} +0 -0
  37. /package/src/{index.d.cts → js/index.d.cts} +0 -0
  38. /package/src/{index.d.mts → js/index.d.mts} +0 -0
  39. /package/src/{index.mjs → js/index.mjs} +0 -0
  40. /package/src/{sprockets → js/sprockets}/check-answers/group/answer-title.cjs +0 -0
  41. /package/src/{sprockets → js/sprockets}/check-answers/group/answer-title.d.cts +0 -0
  42. /package/src/{sprockets → js/sprockets}/check-answers/group/answer-title.d.mts +0 -0
  43. /package/src/{sprockets → js/sprockets}/check-answers/group/answer-title.jsx +0 -0
  44. /package/src/{sprockets → js/sprockets}/check-answers/group/answer-value.cjs +0 -0
  45. /package/src/{sprockets → js/sprockets}/check-answers/group/answer-value.d.cts +0 -0
  46. /package/src/{sprockets → js/sprockets}/check-answers/group/answer-value.d.mts +0 -0
  47. /package/src/{sprockets → js/sprockets}/check-answers/group/answer-value.jsx +0 -0
  48. /package/src/{sprockets → js/sprockets}/check-answers/group/change-answer.cjs +0 -0
  49. /package/src/{sprockets → js/sprockets}/check-answers/group/change-answer.d.cts +0 -0
  50. /package/src/{sprockets → js/sprockets}/check-answers/group/change-answer.d.mts +0 -0
  51. /package/src/{sprockets → js/sprockets}/check-answers/group/change-answer.jsx +0 -0
  52. /package/src/{sprockets → js/sprockets}/check-answers/group/index.cjs +0 -0
  53. /package/src/{sprockets → js/sprockets}/check-answers/group/index.d.cts +0 -0
  54. /package/src/{sprockets → js/sprockets}/check-answers/group/index.d.mts +0 -0
  55. /package/src/{sprockets → js/sprockets}/check-answers/group/index.jsx +0 -0
  56. /package/src/{sprockets → js/sprockets}/check-answers/index.cjs +0 -0
  57. /package/src/{sprockets → js/sprockets}/check-answers/index.d.cts +0 -0
  58. /package/src/{sprockets → js/sprockets}/check-answers/index.d.mts +0 -0
  59. /package/src/{sprockets → js/sprockets}/check-answers/index.jsx +0 -0
  60. /package/src/{sprockets → js/sprockets}/check-answers/title/index.cjs +0 -0
  61. /package/src/{sprockets → js/sprockets}/check-answers/title/index.d.cts +0 -0
  62. /package/src/{sprockets → js/sprockets}/check-answers/title/index.d.mts +0 -0
  63. /package/src/{sprockets → js/sprockets}/check-answers/title/index.jsx +0 -0
  64. /package/src/{sprockets → js/sprockets}/error-summary/group/index.cjs +0 -0
  65. /package/src/{sprockets → js/sprockets}/error-summary/group/index.d.cts +0 -0
  66. /package/src/{sprockets → js/sprockets}/error-summary/group/index.d.mts +0 -0
  67. /package/src/{sprockets → js/sprockets}/error-summary/group/index.jsx +0 -0
  68. /package/src/{sprockets → js/sprockets}/error-summary/index.cjs +0 -0
  69. /package/src/{sprockets → js/sprockets}/error-summary/index.d.cts +0 -0
  70. /package/src/{sprockets → js/sprockets}/error-summary/index.d.mts +0 -0
  71. /package/src/{sprockets → js/sprockets}/error-summary/index.jsx +0 -0
  72. /package/src/{sprockets → js/sprockets}/error-summary/title/index.cjs +0 -0
  73. /package/src/{sprockets → js/sprockets}/error-summary/title/index.d.cts +0 -0
  74. /package/src/{sprockets → js/sprockets}/error-summary/title/index.d.mts +0 -0
  75. /package/src/{sprockets → js/sprockets}/error-summary/title/index.jsx +0 -0
  76. /package/src/{sprockets → js/sprockets}/fieldset/description/index.cjs +0 -0
  77. /package/src/{sprockets → js/sprockets}/fieldset/description/index.d.cts +0 -0
  78. /package/src/{sprockets → js/sprockets}/fieldset/description/index.d.mts +0 -0
  79. /package/src/{sprockets → js/sprockets}/fieldset/description/index.jsx +0 -0
  80. /package/src/{sprockets → js/sprockets}/fieldset/error-message/index.cjs +0 -0
  81. /package/src/{sprockets → js/sprockets}/fieldset/error-message/index.d.cts +0 -0
  82. /package/src/{sprockets → js/sprockets}/fieldset/error-message/index.d.mts +0 -0
  83. /package/src/{sprockets → js/sprockets}/fieldset/error-message/index.jsx +0 -0
  84. /package/src/{sprockets → js/sprockets}/fieldset/group/index.cjs +0 -0
  85. /package/src/{sprockets → js/sprockets}/fieldset/group/index.d.cts +0 -0
  86. /package/src/{sprockets → js/sprockets}/fieldset/group/index.d.mts +0 -0
  87. /package/src/{sprockets → js/sprockets}/fieldset/group/index.jsx +0 -0
  88. /package/src/{sprockets → js/sprockets}/fieldset/index.cjs +0 -0
  89. /package/src/{sprockets → js/sprockets}/fieldset/index.d.cts +0 -0
  90. /package/src/{sprockets → js/sprockets}/fieldset/index.d.mts +0 -0
  91. /package/src/{sprockets → js/sprockets}/fieldset/index.jsx +0 -0
  92. /package/src/{sprockets → js/sprockets}/fieldset/title/index.cjs +0 -0
  93. /package/src/{sprockets → js/sprockets}/fieldset/title/index.d.cts +0 -0
  94. /package/src/{sprockets → js/sprockets}/fieldset/title/index.d.mts +0 -0
  95. /package/src/{sprockets → js/sprockets}/fieldset/title/index.jsx +0 -0
  96. /package/src/{sprockets → js/sprockets}/index.cjs +0 -0
  97. /package/src/{sprockets → js/sprockets}/index.d.cts +0 -0
  98. /package/src/{sprockets → js/sprockets}/index.d.mts +0 -0
  99. /package/src/{sprockets → js/sprockets}/index.jsx +0 -0
  100. /package/src/{super → js/super}/components/description/index.cjs +0 -0
  101. /package/src/{super → js/super}/components/description/index.d.cts +0 -0
  102. /package/src/{super → js/super}/components/description/index.d.mts +0 -0
  103. /package/src/{super → js/super}/components/description/index.jsx +0 -0
  104. /package/src/{super → js/super}/components/error-message/index.cjs +0 -0
  105. /package/src/{super → js/super}/components/error-message/index.d.cts +0 -0
  106. /package/src/{super → js/super}/components/error-message/index.d.mts +0 -0
  107. /package/src/{super → js/super}/components/error-message/index.jsx +0 -0
  108. /package/src/{super → js/super}/components/group/index.cjs +0 -0
  109. /package/src/{super → js/super}/components/group/index.d.cts +0 -0
  110. /package/src/{super → js/super}/components/group/index.d.mts +0 -0
  111. /package/src/{super → js/super}/components/group/index.jsx +0 -0
  112. /package/src/{super → js/super}/components/index.cjs +0 -0
  113. /package/src/{super → js/super}/components/index.d.cts +0 -0
  114. /package/src/{super → js/super}/components/index.d.mts +0 -0
  115. /package/src/{super → js/super}/components/index.mjs +0 -0
  116. /package/src/{super → js/super}/components/title/index.cjs +0 -0
  117. /package/src/{super → js/super}/components/title/index.d.cts +0 -0
  118. /package/src/{super → js/super}/components/title/index.d.mts +0 -0
  119. /package/src/{super → js/super}/components/title/index.jsx +0 -0
  120. /package/src/{super → js/super}/sprockets/index.cjs +0 -0
  121. /package/src/{super → js/super}/sprockets/index.d.cts +0 -0
  122. /package/src/{super → js/super}/sprockets/index.d.mts +0 -0
  123. /package/src/{super → js/super}/sprockets/index.jsx +0 -0
  124. /package/src/{transformers → js/transformers}/check-answers/index.d.mts +0 -0
  125. /package/src/{transformers → js/transformers}/check-answers/index.mjs +0 -0
  126. /package/src/{transformers → js/transformers}/common/index.d.mts +0 -0
  127. /package/src/{transformers → js/transformers}/common/index.mjs +0 -0
  128. /package/src/{transformers → js/transformers}/error-message/index.d.mts +0 -0
  129. /package/src/{transformers → js/transformers}/error-message/index.mjs +0 -0
  130. /package/src/{transformers → js/transformers}/error-summary/index.d.mts +0 -0
  131. /package/src/{transformers → js/transformers}/error-summary/index.mjs +0 -0
  132. /package/src/{transformers → js/transformers}/index.d.mts +0 -0
  133. /package/src/{transformers → js/transformers}/index.mjs +0 -0
@@ -0,0 +1,4 @@
1
+ *.html
2
+ *.mjs
3
+ *.cjs
4
+ .stylelintrc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-sprockets",
3
- "version": "1.3.2",
3
+ "version": "2.0.1",
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": "cross-env DEBUG=shinkansen-sprockets* webpack --watch",
33
- "lint": "eslint",
34
- "lint:fix": "npm run lint -- --fix",
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
- "prepublishOnly": "cross-env NODE_ENV=production npm run build",
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* ./transform.sh"
50
+ "transform": "cross-env DEBUG=shinkansen-sprockets* .storybook/transform.sh"
46
51
  },
47
52
  "dependencies": {
48
53
  "classnames": "^2.5.1",
@@ -56,9 +61,9 @@
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": "1.2.0",
64
+ "@modernpoacher/design-system": "2.0.1",
60
65
  "@sequencemedia/eslint-config-standard": "^0.2.42",
61
- "@sequencemedia/eslint-config-typescript": "^0.1.58",
66
+ "@sequencemedia/eslint-config-typescript": "^0.1.59",
62
67
  "@storybook/addon-actions": "^8.6.4",
63
68
  "@storybook/addon-essentials": "^8.6.4",
64
69
  "@storybook/addon-links": "^8.6.4",
@@ -76,9 +81,8 @@
76
81
  "@types/react-test-renderer": "^19.0.0",
77
82
  "@typescript-eslint/eslint-plugin": "^8.26.0",
78
83
  "@typescript-eslint/parser": "^8.26.0",
79
- "autoprefixer": "^10.4.20",
84
+ "autoprefixer": "^10.4.21",
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,14 @@
1
+ {
2
+ "extends": "stylelint-config-recommended-scss",
3
+ "plugins": [
4
+ "stylelint-scss"
5
+ ],
6
+ "rules": {
7
+ "no-descending-specificity": [
8
+ true,
9
+ {
10
+ "severity": "warning"
11
+ }
12
+ ]
13
+ }
14
+ }
@@ -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