claritas-web-framework 8.5.8 → 8.5.9
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/.prettierrc +10 -10
- package/README.md +1 -1
- package/dist/index.css +1 -1
- package/index.html +20 -20
- package/index.js +2 -2
- package/package.json +33 -33
- package/sass/_functions.scss +55 -55
- package/sass/_helpers.scss +8 -8
- package/sass/_mixins.scss +12 -12
- package/sass/_modules.scss +30 -30
- package/sass/_reboot.scss +264 -264
- package/sass/_root.scss +56 -56
- package/sass/_utilities.scss +17 -17
- package/sass/_variables.scss +445 -445
- package/sass/helpers/_container.scss +11 -11
- package/sass/helpers/_embed.scss +36 -36
- package/sass/helpers/_grid.scss +53 -53
- package/sass/helpers/_image.scss +5 -5
- package/sass/helpers/_link.scss +15 -15
- package/sass/helpers/_rfs.scss +303 -303
- package/sass/helpers/_screenReader.scss +13 -13
- package/sass/helpers/_wrap.scss +5 -5
- package/sass/index.scss +12 -12
- package/sass/mixins/_breakpoints.scss +133 -133
- package/sass/mixins/_button.scss +116 -116
- package/sass/mixins/_caret.scss +41 -41
- package/sass/mixins/_clearfix.scss +7 -7
- package/sass/mixins/_colors.scss +23 -23
- package/sass/mixins/_container.scss +21 -21
- package/sass/mixins/_gradient.scss +55 -55
- package/sass/mixins/_grid.scss +156 -156
- package/sass/mixins/_group.scss +70 -70
- package/sass/mixins/_list.scss +18 -18
- package/sass/mixins/_screenReader.scss +22 -22
- package/sass/mixins/_wrap.scss +7 -7
- package/sass/modules/_alert.scss +60 -60
- package/sass/modules/_breadcrumbs.scss +43 -43
- package/sass/modules/_button.scss +170 -170
- package/sass/modules/_card.scss +107 -107
- package/sass/modules/_close.scss +59 -59
- package/sass/modules/_details.scss +48 -48
- package/sass/modules/_dialog.scss +47 -47
- package/sass/modules/_dropdown.scss +44 -43
- package/sass/modules/_form.scss +261 -261
- package/sass/modules/_list.scss +78 -78
- package/sass/modules/_loader.scss +183 -183
- package/sass/modules/_modal.scss +45 -45
- package/sass/modules/_nav.scss +136 -135
- package/sass/modules/_pill.scss +61 -61
- package/sass/modules/_table.scss +96 -96
- package/sass/modules/_tabs.scss +88 -93
- package/sass/modules/_tag.scss +72 -72
- package/sass/modules/_tile.scss +101 -101
- package/sass/modules/_tooltip.scss +108 -108
- package/sass/modules/form/_checkbox.scss +78 -78
- package/sass/modules/form/_file.scss +149 -149
- package/sass/modules/form/_formFieldGroup.scss +60 -60
- package/sass/modules/form/_output.scss +6 -6
- package/sass/modules/form/_progress.scss +55 -55
- package/sass/modules/form/_radio.scss +57 -57
- package/sass/modules/form/_range.scss +144 -144
- package/sass/modules/form/_select.scss +22 -22
- package/sass/modules/form/_text.scss +28 -28
- package/sass/modules/form/_textarea.scss +3 -3
- package/sass/modules/form/_toggle.scss +68 -68
- package/sass/utilities/_align.scss +25 -25
- package/sass/utilities/_border.scss +59 -59
- package/sass/utilities/_colors.scss +76 -76
- package/sass/utilities/_display.scss +25 -25
- package/sass/utilities/_flex.scss +65 -65
- package/sass/utilities/_float.scss +17 -17
- package/sass/utilities/_order.scss +23 -23
- package/sass/utilities/_overflow.scss +25 -25
- package/sass/utilities/_pointerEvents.scss +17 -17
- package/sass/utilities/_position.scss +59 -59
- package/sass/utilities/_shadow.scss +7 -7
- package/sass/utilities/_size.scss +118 -118
- package/sass/utilities/_spacing.scss +107 -107
- package/sass/utilities/_translate.scss +15 -15
- package/sass/utilities/_typography.scss +62 -62
- package/sass/utilities/_visibility.scss +17 -17
- package/sass/utilities/_zIndex.scss +15 -15
- package/tests.js +5 -5
- package/webpack.config.js +27 -27
- package/webpack.plugins.js +15 -15
- package/webpack.rules.js +8 -8
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "./../variables" as *;
|
|
3
|
-
|
|
4
|
-
[data-tooltip] {
|
|
5
|
-
position: relative;
|
|
6
|
-
cursor: help;
|
|
7
|
-
|
|
8
|
-
&::after,
|
|
9
|
-
&::before {
|
|
10
|
-
transition:
|
|
11
|
-
opacity 0.2s ease-in-out,
|
|
12
|
-
visibility 0.2s ease-in-out;
|
|
13
|
-
transform: translate3d(0, 0, 0);
|
|
14
|
-
position: absolute;
|
|
15
|
-
visibility: hidden;
|
|
16
|
-
opacity: 0;
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
z-index: var(--zindex-tooltip);
|
|
19
|
-
color: var(--white);
|
|
20
|
-
text-align: center;
|
|
21
|
-
font-size: var(--font-size-small);
|
|
22
|
-
line-height: normal;
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&::before {
|
|
27
|
-
content: "";
|
|
28
|
-
border-top: 6px solid hsl(0deg 0% 0% / 75%);
|
|
29
|
-
border-right: 6px solid transparent;
|
|
30
|
-
border-bottom: 0 none;
|
|
31
|
-
border-left: 6px solid transparent;
|
|
32
|
-
inset: -6px auto auto 50%;
|
|
33
|
-
margin: 0 0 0 -6px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&::after {
|
|
37
|
-
background-color: hsl(0deg 0% 0% / 75%);
|
|
38
|
-
content: attr(data-tooltip);
|
|
39
|
-
width: auto;
|
|
40
|
-
min-width: calc(var(--spacer) * 6);
|
|
41
|
-
padding: 4px 8px;
|
|
42
|
-
border-radius: 3px;
|
|
43
|
-
inset: auto auto 100% 50%;
|
|
44
|
-
transform: translateY(-6px) translateX(-50%);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&.tooltip--large {
|
|
48
|
-
&::after {
|
|
49
|
-
min-width: calc(var(--spacer) * 16);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&[data-placement="left"] {
|
|
54
|
-
&::before {
|
|
55
|
-
border-top: 6px solid transparent;
|
|
56
|
-
border-right: 0 none;
|
|
57
|
-
border-bottom: 6px solid transparent;
|
|
58
|
-
border-left: 6px solid hsl(0deg 0% 0% / 75%);
|
|
59
|
-
inset: 50% auto auto -6px;
|
|
60
|
-
margin: -6px 0 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&::after {
|
|
64
|
-
inset: 50% 100% auto auto;
|
|
65
|
-
transform: translateY(-50%) translateX(-6px);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&[data-placement="right"] {
|
|
70
|
-
&::before {
|
|
71
|
-
border-top: 6px solid transparent;
|
|
72
|
-
border-right: 6px solid hsl(0deg 0% 0% / 75%);
|
|
73
|
-
border-bottom: 6px solid transparent;
|
|
74
|
-
border-left: 0 none;
|
|
75
|
-
inset: 50% -6px auto auto;
|
|
76
|
-
margin: -6px 0 0;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&::after {
|
|
80
|
-
inset: 50% auto auto 100%;
|
|
81
|
-
transform: translateY(-50%) translateX(6px);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&[data-placement="bottom"] {
|
|
86
|
-
&::before {
|
|
87
|
-
border-top: 0 none;
|
|
88
|
-
border-right: 6px solid transparent;
|
|
89
|
-
border-bottom: 6px solid hsl(0deg 0% 0% / 75%);
|
|
90
|
-
border-left: 6px solid transparent;
|
|
91
|
-
inset: auto auto -6px 50%;
|
|
92
|
-
margin: 0 0 0 -6px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&::after {
|
|
96
|
-
inset: 100% auto auto 50%;
|
|
97
|
-
transform: translateY(6px) translateX(-50%);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&:hover {
|
|
102
|
-
&::after,
|
|
103
|
-
&::before {
|
|
104
|
-
visibility: visible;
|
|
105
|
-
opacity: 1;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "./../variables" as *;
|
|
3
|
+
|
|
4
|
+
[data-tooltip] {
|
|
5
|
+
position: relative;
|
|
6
|
+
cursor: help;
|
|
7
|
+
|
|
8
|
+
&::after,
|
|
9
|
+
&::before {
|
|
10
|
+
transition:
|
|
11
|
+
opacity 0.2s ease-in-out,
|
|
12
|
+
visibility 0.2s ease-in-out;
|
|
13
|
+
transform: translate3d(0, 0, 0);
|
|
14
|
+
position: absolute;
|
|
15
|
+
visibility: hidden;
|
|
16
|
+
opacity: 0;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
z-index: var(--zindex-tooltip);
|
|
19
|
+
color: var(--white);
|
|
20
|
+
text-align: center;
|
|
21
|
+
font-size: var(--font-size-small);
|
|
22
|
+
line-height: normal;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&::before {
|
|
27
|
+
content: "";
|
|
28
|
+
border-top: 6px solid hsl(0deg 0% 0% / 75%);
|
|
29
|
+
border-right: 6px solid transparent;
|
|
30
|
+
border-bottom: 0 none;
|
|
31
|
+
border-left: 6px solid transparent;
|
|
32
|
+
inset: -6px auto auto 50%;
|
|
33
|
+
margin: 0 0 0 -6px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&::after {
|
|
37
|
+
background-color: hsl(0deg 0% 0% / 75%);
|
|
38
|
+
content: attr(data-tooltip);
|
|
39
|
+
width: auto;
|
|
40
|
+
min-width: calc(var(--spacer) * 6);
|
|
41
|
+
padding: 4px 8px;
|
|
42
|
+
border-radius: 3px;
|
|
43
|
+
inset: auto auto 100% 50%;
|
|
44
|
+
transform: translateY(-6px) translateX(-50%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.tooltip--large {
|
|
48
|
+
&::after {
|
|
49
|
+
min-width: calc(var(--spacer) * 16);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&[data-placement="left"] {
|
|
54
|
+
&::before {
|
|
55
|
+
border-top: 6px solid transparent;
|
|
56
|
+
border-right: 0 none;
|
|
57
|
+
border-bottom: 6px solid transparent;
|
|
58
|
+
border-left: 6px solid hsl(0deg 0% 0% / 75%);
|
|
59
|
+
inset: 50% auto auto -6px;
|
|
60
|
+
margin: -6px 0 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&::after {
|
|
64
|
+
inset: 50% 100% auto auto;
|
|
65
|
+
transform: translateY(-50%) translateX(-6px);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&[data-placement="right"] {
|
|
70
|
+
&::before {
|
|
71
|
+
border-top: 6px solid transparent;
|
|
72
|
+
border-right: 6px solid hsl(0deg 0% 0% / 75%);
|
|
73
|
+
border-bottom: 6px solid transparent;
|
|
74
|
+
border-left: 0 none;
|
|
75
|
+
inset: 50% -6px auto auto;
|
|
76
|
+
margin: -6px 0 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&::after {
|
|
80
|
+
inset: 50% auto auto 100%;
|
|
81
|
+
transform: translateY(-50%) translateX(6px);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&[data-placement="bottom"] {
|
|
86
|
+
&::before {
|
|
87
|
+
border-top: 0 none;
|
|
88
|
+
border-right: 6px solid transparent;
|
|
89
|
+
border-bottom: 6px solid hsl(0deg 0% 0% / 75%);
|
|
90
|
+
border-left: 6px solid transparent;
|
|
91
|
+
inset: auto auto -6px 50%;
|
|
92
|
+
margin: 0 0 0 -6px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&::after {
|
|
96
|
+
inset: 100% auto auto 50%;
|
|
97
|
+
transform: translateY(6px) translateX(-50%);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
&::after,
|
|
103
|
+
&::before {
|
|
104
|
+
visibility: visible;
|
|
105
|
+
opacity: 1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "./../../variables" as *;
|
|
3
|
-
@use "./../../mixins/breakpoints" as *;
|
|
4
|
-
|
|
5
|
-
.form__control.checkbox {
|
|
6
|
-
& > * {
|
|
7
|
-
&:not(:last-child) {
|
|
8
|
-
margin-right: var(--spacer);
|
|
9
|
-
|
|
10
|
-
@include media-breakpoint-up("desktop") {
|
|
11
|
-
margin-right: calc(var(--spacer) * 0.5);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
& input[type="checkbox"] {
|
|
17
|
-
--input-width: auto;
|
|
18
|
-
--input-desktop-width: auto;
|
|
19
|
-
|
|
20
|
-
aspect-ratio: 1;
|
|
21
|
-
flex-shrink: 0;
|
|
22
|
-
vertical-align: text-bottom;
|
|
23
|
-
|
|
24
|
-
&::before {
|
|
25
|
-
content: "";
|
|
26
|
-
position: absolute;
|
|
27
|
-
margin: auto;
|
|
28
|
-
inset: 0;
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:checked {
|
|
33
|
-
background: var(--input-detail-background);
|
|
34
|
-
|
|
35
|
-
&::before {
|
|
36
|
-
border-right: 2px solid var(--white);
|
|
37
|
-
border-bottom: 2px solid var(--white);
|
|
38
|
-
height: 65%;
|
|
39
|
-
width: 32.5%;
|
|
40
|
-
transform: rotate(45deg) translateY(-15%) translateX(-15%);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&:disabled,
|
|
44
|
-
&.disabled,
|
|
45
|
-
&[aria-disabled="true"] {
|
|
46
|
-
background: var(--input-disabled-detail-background);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:indeterminate,
|
|
51
|
-
&[aria-checked="mixed"] {
|
|
52
|
-
&::before {
|
|
53
|
-
border: 2px solid var(--white);
|
|
54
|
-
height: 0;
|
|
55
|
-
width: 65%;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&.input--small {
|
|
60
|
-
--input-width: auto;
|
|
61
|
-
--input-desktop-width: auto;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.input--large {
|
|
65
|
-
--input-width: auto;
|
|
66
|
-
--input-desktop-width: auto;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@each $key, $value in $all-colors {
|
|
70
|
-
&.input--#{$key} {
|
|
71
|
-
&:checked {
|
|
72
|
-
--input-detail-background: var(--#{$key});
|
|
73
|
-
--input-disabled-detail-background: hsl(from var(--#{$key}) h s l / #{$color-disabled-alpha});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "./../../variables" as *;
|
|
3
|
+
@use "./../../mixins/breakpoints" as *;
|
|
4
|
+
|
|
5
|
+
.form__control.checkbox {
|
|
6
|
+
& > * {
|
|
7
|
+
&:not(:last-child) {
|
|
8
|
+
margin-right: var(--spacer);
|
|
9
|
+
|
|
10
|
+
@include media-breakpoint-up("desktop") {
|
|
11
|
+
margin-right: calc(var(--spacer) * 0.5);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
& input[type="checkbox"] {
|
|
17
|
+
--input-width: auto;
|
|
18
|
+
--input-desktop-width: auto;
|
|
19
|
+
|
|
20
|
+
aspect-ratio: 1;
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
vertical-align: text-bottom;
|
|
23
|
+
|
|
24
|
+
&::before {
|
|
25
|
+
content: "";
|
|
26
|
+
position: absolute;
|
|
27
|
+
margin: auto;
|
|
28
|
+
inset: 0;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:checked {
|
|
33
|
+
background: var(--input-detail-background);
|
|
34
|
+
|
|
35
|
+
&::before {
|
|
36
|
+
border-right: 2px solid var(--white);
|
|
37
|
+
border-bottom: 2px solid var(--white);
|
|
38
|
+
height: 65%;
|
|
39
|
+
width: 32.5%;
|
|
40
|
+
transform: rotate(45deg) translateY(-15%) translateX(-15%);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:disabled,
|
|
44
|
+
&.disabled,
|
|
45
|
+
&[aria-disabled="true"] {
|
|
46
|
+
background: var(--input-disabled-detail-background);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:indeterminate,
|
|
51
|
+
&[aria-checked="mixed"] {
|
|
52
|
+
&::before {
|
|
53
|
+
border: 2px solid var(--white);
|
|
54
|
+
height: 0;
|
|
55
|
+
width: 65%;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.input--small {
|
|
60
|
+
--input-width: auto;
|
|
61
|
+
--input-desktop-width: auto;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.input--large {
|
|
65
|
+
--input-width: auto;
|
|
66
|
+
--input-desktop-width: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@each $key, $value in $all-colors {
|
|
70
|
+
&.input--#{$key} {
|
|
71
|
+
&:checked {
|
|
72
|
+
--input-detail-background: var(--#{$key});
|
|
73
|
+
--input-disabled-detail-background: hsl(from var(--#{$key}) h s l / #{$color-disabled-alpha});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "./../../variables" as *;
|
|
3
|
-
@use "./../../functions" as *;
|
|
4
|
-
|
|
5
|
-
.form__control.fancyfile {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
|
|
9
|
-
& input[type="file"] {
|
|
10
|
-
order: 1;
|
|
11
|
-
position: absolute;
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
inset: 0;
|
|
15
|
-
opacity: 0;
|
|
16
|
-
|
|
17
|
-
& ~ .file--name {
|
|
18
|
-
order: 999;
|
|
19
|
-
|
|
20
|
-
&:not(:empty) {
|
|
21
|
-
border-right: 1px solid var(--border-color-main);
|
|
22
|
-
border-bottom: 1px solid var(--border-color-main);
|
|
23
|
-
border-left: 1px solid var(--border-color-main);
|
|
24
|
-
border-bottom-right-radius: var(--border-radius-medium);
|
|
25
|
-
border-bottom-left-radius: var(--border-radius-medium);
|
|
26
|
-
padding: $input-padding-y $input-padding-x;
|
|
27
|
-
white-space: nowrap;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
text-overflow: ellipsis;
|
|
30
|
-
text-align: center;
|
|
31
|
-
transition: $form-transition;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&:empty {
|
|
35
|
-
& ~ .form__label {
|
|
36
|
-
border-bottom-right-radius: var(--border-radius-medium);
|
|
37
|
-
border-bottom-left-radius: var(--border-radius-medium);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
& ~ .form__label {
|
|
43
|
-
order: 2;
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
width: 100%;
|
|
46
|
-
display: block;
|
|
47
|
-
position: relative;
|
|
48
|
-
margin-bottom: 0;
|
|
49
|
-
text-align: center;
|
|
50
|
-
padding: var(--spacer) var(--spacer) calc(var(--spacer) * 3);
|
|
51
|
-
border: 1px solid var(--border-color-main);
|
|
52
|
-
border-top-left-radius: var(--border-radius-medium);
|
|
53
|
-
border-top-right-radius: var(--border-radius-medium);
|
|
54
|
-
background-color: var(--gray-1);
|
|
55
|
-
transition: $form-transition;
|
|
56
|
-
|
|
57
|
-
&::after {
|
|
58
|
-
content: "";
|
|
59
|
-
position: absolute;
|
|
60
|
-
width: calc(var(--spacer) * 2);
|
|
61
|
-
height: calc(var(--spacer) * 2);
|
|
62
|
-
top: auto;
|
|
63
|
-
left: 50%;
|
|
64
|
-
bottom: calc(var(--spacer) * 0.5);
|
|
65
|
-
transform: translateX(-50%);
|
|
66
|
-
margin: 0;
|
|
67
|
-
background-size: calc(var(--spacer) * 2) auto;
|
|
68
|
-
background-image: escape-svg($form-file-indicator);
|
|
69
|
-
transition:
|
|
70
|
-
background-image 0.15s ease-in-out,
|
|
71
|
-
$form-transition;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&:hover {
|
|
76
|
-
& ~ .form__label {
|
|
77
|
-
border-color: var(--input-hover-border-color);
|
|
78
|
-
background-color: var(--gray-2);
|
|
79
|
-
|
|
80
|
-
&::after {
|
|
81
|
-
background-image: escape-svg($form-file-indicator-hover);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
& ~ .file--name {
|
|
86
|
-
&:not(:empty) {
|
|
87
|
-
border-color: var(--input-hover-border-color);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@each $key, $value in $theme-colors {
|
|
93
|
-
&.input--#{$key} {
|
|
94
|
-
& ~ .form__label {
|
|
95
|
-
border-color: $value;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
& ~ .file--name {
|
|
99
|
-
&:not(:empty) {
|
|
100
|
-
border-color: $value;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:hover {
|
|
105
|
-
& ~ .form__label {
|
|
106
|
-
border-color: color.mix(black, $value, 25%);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
& ~ .file--name {
|
|
110
|
-
&:not(:empty) {
|
|
111
|
-
border-color: color.mix(black, $value, 25%);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
input[type="file"] {
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
|
|
123
|
-
&::-webkit-file-upload-button,
|
|
124
|
-
&::file-selector-button {
|
|
125
|
-
background-color: var(--light);
|
|
126
|
-
padding: $input-padding-y $input-padding-x;
|
|
127
|
-
margin: calc($input-padding-y * -1) $input-padding-x calc($input-padding-y * -1) calc($input-padding-x * -1);
|
|
128
|
-
-webkit-margin-end: $input-padding-x;
|
|
129
|
-
margin-inline-end: $input-padding-x;
|
|
130
|
-
color: var(--body-color);
|
|
131
|
-
pointer-events: none;
|
|
132
|
-
border-color: var(--border-color-main);
|
|
133
|
-
border-style: solid;
|
|
134
|
-
border-width: 0;
|
|
135
|
-
border-inline-end-width: 1px;
|
|
136
|
-
border-right-width: 1px;
|
|
137
|
-
border-radius: var(--border-radius-medium) 0 0 var(--border-radius-medium);
|
|
138
|
-
transition: $form-transition;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&:hover {
|
|
142
|
-
&:not(:disabled, [readonly]) {
|
|
143
|
-
&::-webkit-file-upload-button,
|
|
144
|
-
&::file-selector-button {
|
|
145
|
-
background-color: var(--gray-2);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "./../../variables" as *;
|
|
3
|
+
@use "./../../functions" as *;
|
|
4
|
+
|
|
5
|
+
.form__control.fancyfile {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
|
|
9
|
+
& input[type="file"] {
|
|
10
|
+
order: 1;
|
|
11
|
+
position: absolute;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
inset: 0;
|
|
15
|
+
opacity: 0;
|
|
16
|
+
|
|
17
|
+
& ~ .file--name {
|
|
18
|
+
order: 999;
|
|
19
|
+
|
|
20
|
+
&:not(:empty) {
|
|
21
|
+
border-right: 1px solid var(--border-color-main);
|
|
22
|
+
border-bottom: 1px solid var(--border-color-main);
|
|
23
|
+
border-left: 1px solid var(--border-color-main);
|
|
24
|
+
border-bottom-right-radius: var(--border-radius-medium);
|
|
25
|
+
border-bottom-left-radius: var(--border-radius-medium);
|
|
26
|
+
padding: $input-padding-y $input-padding-x;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
text-align: center;
|
|
31
|
+
transition: $form-transition;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:empty {
|
|
35
|
+
& ~ .form__label {
|
|
36
|
+
border-bottom-right-radius: var(--border-radius-medium);
|
|
37
|
+
border-bottom-left-radius: var(--border-radius-medium);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& ~ .form__label {
|
|
43
|
+
order: 2;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
width: 100%;
|
|
46
|
+
display: block;
|
|
47
|
+
position: relative;
|
|
48
|
+
margin-bottom: 0;
|
|
49
|
+
text-align: center;
|
|
50
|
+
padding: var(--spacer) var(--spacer) calc(var(--spacer) * 3);
|
|
51
|
+
border: 1px solid var(--border-color-main);
|
|
52
|
+
border-top-left-radius: var(--border-radius-medium);
|
|
53
|
+
border-top-right-radius: var(--border-radius-medium);
|
|
54
|
+
background-color: var(--gray-1);
|
|
55
|
+
transition: $form-transition;
|
|
56
|
+
|
|
57
|
+
&::after {
|
|
58
|
+
content: "";
|
|
59
|
+
position: absolute;
|
|
60
|
+
width: calc(var(--spacer) * 2);
|
|
61
|
+
height: calc(var(--spacer) * 2);
|
|
62
|
+
top: auto;
|
|
63
|
+
left: 50%;
|
|
64
|
+
bottom: calc(var(--spacer) * 0.5);
|
|
65
|
+
transform: translateX(-50%);
|
|
66
|
+
margin: 0;
|
|
67
|
+
background-size: calc(var(--spacer) * 2) auto;
|
|
68
|
+
background-image: escape-svg($form-file-indicator);
|
|
69
|
+
transition:
|
|
70
|
+
background-image 0.15s ease-in-out,
|
|
71
|
+
$form-transition;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
& ~ .form__label {
|
|
77
|
+
border-color: var(--input-hover-border-color);
|
|
78
|
+
background-color: var(--gray-2);
|
|
79
|
+
|
|
80
|
+
&::after {
|
|
81
|
+
background-image: escape-svg($form-file-indicator-hover);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
& ~ .file--name {
|
|
86
|
+
&:not(:empty) {
|
|
87
|
+
border-color: var(--input-hover-border-color);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@each $key, $value in $theme-colors {
|
|
93
|
+
&.input--#{$key} {
|
|
94
|
+
& ~ .form__label {
|
|
95
|
+
border-color: $value;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
& ~ .file--name {
|
|
99
|
+
&:not(:empty) {
|
|
100
|
+
border-color: $value;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:hover {
|
|
105
|
+
& ~ .form__label {
|
|
106
|
+
border-color: color.mix(black, $value, 25%);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
& ~ .file--name {
|
|
110
|
+
&:not(:empty) {
|
|
111
|
+
border-color: color.mix(black, $value, 25%);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
input[type="file"] {
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
|
|
123
|
+
&::-webkit-file-upload-button,
|
|
124
|
+
&::file-selector-button {
|
|
125
|
+
background-color: var(--light);
|
|
126
|
+
padding: $input-padding-y $input-padding-x;
|
|
127
|
+
margin: calc($input-padding-y * -1) $input-padding-x calc($input-padding-y * -1) calc($input-padding-x * -1);
|
|
128
|
+
-webkit-margin-end: $input-padding-x;
|
|
129
|
+
margin-inline-end: $input-padding-x;
|
|
130
|
+
color: var(--body-color);
|
|
131
|
+
pointer-events: none;
|
|
132
|
+
border-color: var(--border-color-main);
|
|
133
|
+
border-style: solid;
|
|
134
|
+
border-width: 0;
|
|
135
|
+
border-inline-end-width: 1px;
|
|
136
|
+
border-right-width: 1px;
|
|
137
|
+
border-radius: var(--border-radius-medium) 0 0 var(--border-radius-medium);
|
|
138
|
+
transition: $form-transition;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:hover {
|
|
142
|
+
&:not(:disabled, [readonly]) {
|
|
143
|
+
&::-webkit-file-upload-button,
|
|
144
|
+
&::file-selector-button {
|
|
145
|
+
background-color: var(--gray-2);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|