shinkansen-cogs 1.9.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.
- package/.prettierignore +4 -0
- package/index.d.mts +1 -1
- package/package.json +52 -45
- package/src/{cogs → js/cogs}/checkbox/index.jsx +1 -1
- package/src/{cogs → js/cogs}/email/index.jsx +1 -1
- package/src/{cogs → js/cogs}/index.jsx +2 -2
- package/src/{cogs → js/cogs}/number/index.jsx +1 -1
- package/src/{cogs → js/cogs}/password/index.jsx +1 -1
- package/src/{cogs → js/cogs}/radio/index.jsx +1 -1
- package/src/{cogs → js/cogs}/select/field/index.jsx +74 -3
- package/src/{cogs → js/cogs}/select/index.jsx +1 -1
- package/src/{cogs → js/cogs}/text/index.jsx +1 -1
- package/src/{cogs → js/cogs}/textarea/index.jsx +1 -1
- package/src/{components → js/components}/field/index.d.mts +12 -0
- package/src/{components → js/components}/field/index.jsx +114 -2
- package/src/{super → js/super}/cogs/index.jsx +4 -4
- package/src/{super → js/super}/components/field/index.jsx +4 -2
- package/src/sass/.stylelintrc +14 -0
- package/src/sass/_cogs.scss +64 -0
- package/src/sass/cogs/_checkbox.scss +88 -0
- package/src/sass/cogs/_disabled.scss +15 -0
- package/src/sass/cogs/_error.scss +50 -0
- package/src/sass/cogs/_radio.scss +94 -0
- package/src/common/index.d.mts +0 -5
- package/src/common/index.mjs +0 -3
- /package/src/{cogs → js/cogs}/checkbox/description/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/checkbox/description/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/description/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/description/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/checkbox/error-message/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/checkbox/error-message/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/error-message/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/error-message/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/checkbox/field/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/checkbox/field/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/field/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/field/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/checkbox/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/checkbox/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/title/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/checkbox/title/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/title/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/checkbox/title/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/email/description/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/email/description/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/email/description/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/email/description/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/email/error-message/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/email/error-message/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/email/error-message/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/email/error-message/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/email/field/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/email/field/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/email/field/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/email/field/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/email/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/email/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/email/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/email/title/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/email/title/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/email/title/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/email/title/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/number/description/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/number/description/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/number/description/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/number/description/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/number/error-message/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/number/error-message/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/number/error-message/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/number/error-message/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/number/field/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/number/field/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/number/field/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/number/field/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/number/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/number/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/number/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/number/title/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/number/title/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/number/title/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/number/title/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/password/description/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/password/description/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/password/description/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/password/description/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/password/error-message/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/password/error-message/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/password/error-message/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/password/error-message/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/password/field/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/password/field/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/password/field/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/password/field/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/password/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/password/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/password/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/password/title/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/password/title/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/password/title/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/password/title/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/radio/description/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/radio/description/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/radio/description/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/radio/description/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/radio/error-message/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/radio/error-message/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/radio/error-message/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/radio/error-message/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/radio/field/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/radio/field/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/radio/field/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/radio/field/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/radio/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/radio/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/radio/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/radio/title/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/radio/title/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/radio/title/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/radio/title/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/select/description/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/select/description/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/select/description/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/select/description/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/select/error-message/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/select/error-message/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/select/error-message/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/select/error-message/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/select/field/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/select/field/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/select/field/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/select/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/select/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/select/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/select/title/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/select/title/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/select/title/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/select/title/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/text/description/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/text/description/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/text/description/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/text/description/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/text/error-message/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/text/error-message/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/text/error-message/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/text/error-message/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/text/field/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/text/field/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/text/field/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/text/field/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/text/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/text/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/text/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/text/title/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/text/title/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/text/title/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/text/title/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/textarea/description/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/textarea/description/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/textarea/description/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/textarea/description/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/textarea/error-message/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/textarea/error-message/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/textarea/error-message/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/textarea/error-message/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/textarea/field/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/textarea/field/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/textarea/field/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/textarea/field/index.jsx +0 -0
- /package/src/{cogs → js/cogs}/textarea/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/textarea/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/textarea/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/textarea/title/index.cjs +0 -0
- /package/src/{cogs → js/cogs}/textarea/title/index.d.cts +0 -0
- /package/src/{cogs → js/cogs}/textarea/title/index.d.mts +0 -0
- /package/src/{cogs → js/cogs}/textarea/title/index.jsx +0 -0
- /package/src/{components → js/components}/common/disabled/index.cjs +0 -0
- /package/src/{components → js/components}/common/disabled/index.d.cts +0 -0
- /package/src/{components → js/components}/common/disabled/index.d.mts +0 -0
- /package/src/{components → js/components}/common/disabled/index.jsx +0 -0
- /package/src/{components → js/components}/common/readonly/index.cjs +0 -0
- /package/src/{components → js/components}/common/readonly/index.d.cts +0 -0
- /package/src/{components → js/components}/common/readonly/index.d.mts +0 -0
- /package/src/{components → js/components}/common/readonly/index.jsx +0 -0
- /package/src/{components → js/components}/common/required/index.cjs +0 -0
- /package/src/{components → js/components}/common/required/index.d.cts +0 -0
- /package/src/{components → js/components}/common/required/index.d.mts +0 -0
- /package/src/{components → js/components}/common/required/index.jsx +0 -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}/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}/field/index.cjs +0 -0
- /package/src/{components → js/components}/field/index.d.cts +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/{super → js/super}/cogs/index.cjs +0 -0
- /package/src/{super → js/super}/cogs/index.d.cts +0 -0
- /package/src/{super → js/super}/cogs/index.d.mts +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/field/index.cjs +0 -0
- /package/src/{super → js/super}/components/field/index.d.cts +0 -0
- /package/src/{super → js/super}/components/field/index.d.mts +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/{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}/index.d.mts +0 -0
- /package/src/{transformers → js/transformers}/index.mjs +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use "design-system/palette";
|
|
2
|
+
@use "design-system/typography";
|
|
3
|
+
|
|
4
|
+
@use "cogs/radio";
|
|
5
|
+
@use "cogs/checkbox";
|
|
6
|
+
@use "cogs/disabled";
|
|
7
|
+
@use "cogs/error";
|
|
8
|
+
|
|
9
|
+
@mixin cogs {
|
|
10
|
+
padding: 0;
|
|
11
|
+
margin: 1rem 0;
|
|
12
|
+
|
|
13
|
+
&:first-child {
|
|
14
|
+
margin-top: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:last-child {
|
|
18
|
+
margin-bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
line-height: 1.375rem;
|
|
22
|
+
|
|
23
|
+
&.radio {
|
|
24
|
+
@include radio.cog-radio;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.checkbox {
|
|
28
|
+
@include checkbox.cog-checkbox;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.disabled {
|
|
32
|
+
@include disabled.cog-disabled;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.error {
|
|
36
|
+
@include error.cog-error;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.description {
|
|
40
|
+
@include typography.secondary-text;
|
|
41
|
+
|
|
42
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
43
|
+
& {
|
|
44
|
+
display: block;
|
|
45
|
+
padding: 0;
|
|
46
|
+
margin: 0 0 0.25rem 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.error-message {
|
|
51
|
+
@include typography.error-standard;
|
|
52
|
+
|
|
53
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
54
|
+
& {
|
|
55
|
+
display: block;
|
|
56
|
+
padding: 0;
|
|
57
|
+
margin: 0 0 0.25rem 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
%cogs {
|
|
63
|
+
@include cogs;
|
|
64
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@use "design-system/helpers/breakpoints";
|
|
2
|
+
@use "design-system/palette";
|
|
3
|
+
|
|
4
|
+
@mixin cog-checkbox {
|
|
5
|
+
position: relative;
|
|
6
|
+
padding-left: 3rem;
|
|
7
|
+
margin-bottom: 0.5rem;
|
|
8
|
+
min-height: 2rem;
|
|
9
|
+
|
|
10
|
+
&:last-of-type {
|
|
11
|
+
margin-bottom: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
label {
|
|
15
|
+
@include breakpoints.breakpoint(mobile) {
|
|
16
|
+
padding-top: 0.375rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include breakpoints.breakpoint(large-mobile) {
|
|
20
|
+
padding-top: 0.375rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@include breakpoints.breakpoint(small-mobile) {
|
|
24
|
+
padding-top: 0.375rem;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
label:before {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
position: absolute;
|
|
31
|
+
left: 0;
|
|
32
|
+
height: 2rem;
|
|
33
|
+
top: 0;
|
|
34
|
+
width: 2rem;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
border: 2px solid currentColor;
|
|
37
|
+
content: "\200b";
|
|
38
|
+
background-color: palette.$white;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
input {
|
|
42
|
+
position: absolute;
|
|
43
|
+
left: 0.5rem;
|
|
44
|
+
top: 0.5rem;
|
|
45
|
+
|
|
46
|
+
&:focus + label:before {
|
|
47
|
+
box-shadow: 0 0 0 2px palette.$outline;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:checked + label:after {
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: 0.625rem; // 10px;
|
|
54
|
+
bottom: 0.625rem; // 10px;
|
|
55
|
+
left: 0.3125rem; // 5px;
|
|
56
|
+
width: 1.375rem; // 22px;
|
|
57
|
+
height: 0.625rem; // 10px;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
border-bottom: 4px solid currentColor;
|
|
60
|
+
border-left: 4px solid currentColor;
|
|
61
|
+
content: "\200b";
|
|
62
|
+
background-color: palette.$white;
|
|
63
|
+
transform: rotate(-45deg);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.disabled {
|
|
68
|
+
input:checked + {
|
|
69
|
+
label::before {
|
|
70
|
+
border-color: palette.$disabled;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
label::after {
|
|
74
|
+
border-left-color: palette.$disabled;
|
|
75
|
+
border-bottom-color: palette.$disabled;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// stylelint-disable-next-line no-descending-specificity
|
|
80
|
+
input + label::before {
|
|
81
|
+
border-color: palette.$disabled;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
%cog-checkbox {
|
|
87
|
+
@include cog-checkbox;
|
|
88
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use "design-system/palette";
|
|
2
|
+
@use "design-system/typography";
|
|
3
|
+
|
|
4
|
+
@mixin cog-disabled {
|
|
5
|
+
input:not([type="checkbox"]):not([type="radio"]),
|
|
6
|
+
select,
|
|
7
|
+
textarea {
|
|
8
|
+
border-color: palette.$disabled;
|
|
9
|
+
color: palette.$disabled;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
%cog-disabled {
|
|
14
|
+
@include cog-disabled;
|
|
15
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use "design-system/palette";
|
|
2
|
+
@use "design-system/typography";
|
|
3
|
+
|
|
4
|
+
@mixin cog-error {
|
|
5
|
+
border-left: 0.25rem solid palette.$error-standard;
|
|
6
|
+
padding: 0 1rem;
|
|
7
|
+
|
|
8
|
+
input:not([type="checkbox"]):not([type="radio"]),
|
|
9
|
+
select,
|
|
10
|
+
textarea {
|
|
11
|
+
border: 2px solid palette.$error-standard;
|
|
12
|
+
|
|
13
|
+
&:focus {
|
|
14
|
+
border-color: palette.$black;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&.radio,
|
|
19
|
+
&.checkbox {
|
|
20
|
+
padding-left: 4rem;
|
|
21
|
+
|
|
22
|
+
// stylelint-disable-next-line no-descending-specificity
|
|
23
|
+
input {
|
|
24
|
+
left: 1.5rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// stylelint-disable-next-line no-descending-specificity
|
|
28
|
+
label:before {
|
|
29
|
+
left: 1rem;
|
|
30
|
+
|
|
31
|
+
border: 2px solid palette.$error-standard;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.radio {
|
|
36
|
+
input:checked + label:after {
|
|
37
|
+
left: 1.5rem;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.checkbox {
|
|
42
|
+
input:checked + label:after {
|
|
43
|
+
left: 1.3125rem; // 21px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
%cog-error {
|
|
49
|
+
@include cog-error;
|
|
50
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
@use "design-system/helpers/breakpoints";
|
|
2
|
+
|
|
3
|
+
@use "design-system/palette";
|
|
4
|
+
@use "design-system/typography";
|
|
5
|
+
|
|
6
|
+
@mixin cog-radio {
|
|
7
|
+
position: relative;
|
|
8
|
+
padding-left: 3rem;
|
|
9
|
+
margin-bottom: 0.5rem;
|
|
10
|
+
min-height: 2rem;
|
|
11
|
+
|
|
12
|
+
&:last-of-type {
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
label {
|
|
17
|
+
@include breakpoints.breakpoint(mobile) {
|
|
18
|
+
padding-top: 0.375rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@include breakpoints.breakpoint(large-mobile) {
|
|
22
|
+
padding-top: 0.375rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include breakpoints.breakpoint(small-mobile) {
|
|
26
|
+
padding-top: 0.375rem;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
label:before {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: 0;
|
|
34
|
+
height: 32px;
|
|
35
|
+
top: 0;
|
|
36
|
+
width: 32px;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
border: 2px solid currentColor;
|
|
39
|
+
border-radius: 50%;
|
|
40
|
+
content: "\200b";
|
|
41
|
+
background-color: palette.$white;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
input {
|
|
45
|
+
position: absolute;
|
|
46
|
+
left: 0.5rem;
|
|
47
|
+
top: 0.5rem;
|
|
48
|
+
|
|
49
|
+
&:focus + label:before {
|
|
50
|
+
box-shadow: 0 0 0 2px palette.$outline;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:checked + label:after {
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 0.5rem;
|
|
57
|
+
bottom: 0.5rem;
|
|
58
|
+
left: 0.5rem;
|
|
59
|
+
right: 0.5rem;
|
|
60
|
+
width: 1rem;
|
|
61
|
+
height: 1rem;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
border: 2px solid currentColor;
|
|
64
|
+
border-radius: 50%;
|
|
65
|
+
content: "\200b";
|
|
66
|
+
background-color: palette.$black;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.disabled {
|
|
71
|
+
input + label {
|
|
72
|
+
&::before,
|
|
73
|
+
&::after {
|
|
74
|
+
border-color: palette.$disabled;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
input:checked + label {
|
|
79
|
+
&::before,
|
|
80
|
+
&::after {
|
|
81
|
+
border-color: palette.$disabled;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// stylelint-disable-next-line no-descending-specificity
|
|
85
|
+
&::after {
|
|
86
|
+
background-color: palette.$disabled;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
%cog-radio {
|
|
93
|
+
@include cog-radio;
|
|
94
|
+
}
|
package/src/common/index.d.mts
DELETED
package/src/common/index.mjs
DELETED
|
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
|