@digigov/css 0.6.2 → 0.8.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/CHANGELOG.json +74 -0
- package/CHANGELOG.md +35 -1
- package/colors/color-values.js +57 -87
- package/colors/index.js +4 -15
- package/dist/base/index.css +5 -3
- package/dist/base.css +5 -3
- package/dist/base.js +1 -1
- package/dist/components.css +1 -1
- package/dist/components.js +1 -1
- package/dist/digigov.css +5 -3
- package/dist/utilities/index.css +1 -1
- package/dist/utilities.css +1 -1
- package/dist/utilities.js +1 -1
- package/index.js +22 -1
- package/package.json +4 -4
- package/postcss.config.js +13 -1
- package/src/base/base.css +0 -1
- package/src/base/index.css +2 -0
- package/src/base/tailwind.config.js +4 -1
- package/src/components/accordion.css +3 -3
- package/src/components/breadcrumps.css +4 -4
- package/src/components/button.css +12 -22
- package/src/components/checkboxes.css +1 -1
- package/src/components/details.css +3 -3
- package/src/components/filter.css +1 -1
- package/src/components/footer.css +2 -2
- package/src/components/form.css +12 -4
- package/src/components/header.css +6 -8
- package/src/components/index.css +2 -1
- package/src/components/modal.css +29 -0
- package/src/components/nav.css +2 -2
- package/src/components/notification-banner.css +2 -2
- package/src/components/radios.css +2 -9
- package/src/components/tabs.css +3 -3
- package/src/components/typography.css +4 -4
- package/src/utilities/index.css +15 -0
- package/src/utilities/utilities.css +15 -0
- package/tailwind.config.js +8 -18
- package/colors/windi.js +0 -12
package/src/components/form.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
.govgr-input, .govgr-select, .govgr-textarea{
|
|
24
24
|
@apply md:text-lg text-base w-full p-2 border-2 border-base-content;
|
|
25
25
|
&:focus {
|
|
26
|
-
outline:
|
|
26
|
+
outline: 4px solid var(--color-focus);
|
|
27
27
|
outline-offset: 0;
|
|
28
28
|
-webkit-box-shadow: inset 0 0 0 2px;
|
|
29
29
|
box-shadow: inset 0 0 0 2px;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
.govgr-file-upload:focus {
|
|
33
33
|
outline: 3px solid;
|
|
34
|
-
box-shadow: 0 0 0 7px
|
|
34
|
+
box-shadow: 0 0 0 7px var(--color-focus);
|
|
35
35
|
}
|
|
36
36
|
.govgr-date-input {
|
|
37
37
|
@apply flex;
|
|
@@ -93,11 +93,19 @@
|
|
|
93
93
|
}
|
|
94
94
|
/* error handling */
|
|
95
95
|
.govgr-field__error {
|
|
96
|
-
|
|
96
|
+
@apply border-l-5 border-error px-0 pl-4;
|
|
97
97
|
}
|
|
98
98
|
.govgr-error-message {
|
|
99
99
|
@apply md:text-lg text-base block mb-4 text-error font-semibold;
|
|
100
100
|
}
|
|
101
101
|
.govgr-error-input {
|
|
102
102
|
@apply border-error border-3;
|
|
103
|
-
|
|
103
|
+
&:focus {
|
|
104
|
+
outline: 4px solid var(--color-focus);
|
|
105
|
+
outline-offset: 0;
|
|
106
|
+
-webkit-box-shadow: inset 0 0 0 1px var(--color-error);
|
|
107
|
+
box-shadow: inset 0 0 0 1px var(--color-error);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
}
|
|
6
6
|
.govgr-header__container {
|
|
7
|
-
@apply
|
|
7
|
+
@apply px-4 py-2 mx-auto max-w-5xl w-full flex justify-between items-center;
|
|
8
8
|
}
|
|
9
9
|
.govgr-header__container-full {
|
|
10
10
|
@apply max-w-full;
|
|
@@ -20,11 +20,9 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.govgr-header-title:focus {
|
|
23
|
-
@apply text-gray-900;
|
|
24
|
-
background-color: #fd0;
|
|
25
|
-
box-shadow: 0 -2px #fd0, 0 4px #0b0c0c;
|
|
26
23
|
text-decoration:none;
|
|
27
|
-
outline:
|
|
24
|
+
outline: 4px solid var(--color-focus);
|
|
25
|
+
outline-offset: 4px;
|
|
28
26
|
}
|
|
29
27
|
.govgr-header-logo {
|
|
30
28
|
@apply h-12;
|
|
@@ -33,9 +31,9 @@
|
|
|
33
31
|
@apply h-10;
|
|
34
32
|
}
|
|
35
33
|
.govgr-header-link:focus{
|
|
36
|
-
box-shadow: 0px 0px 0px 4px
|
|
37
|
-
-webkit-box-shadow: 0px 0px 0px 4px
|
|
38
|
-
-moz-box-shadow: 0px 0px 0px 4px
|
|
34
|
+
box-shadow: 0px 0px 0px 4px var(--color-focus);
|
|
35
|
+
-webkit-box-shadow: 0px 0px 0px 4px var(--color-focus);
|
|
36
|
+
-moz-box-shadow: 0px 0px 0px 4px var(--color-focus);
|
|
39
37
|
outline: none;
|
|
40
38
|
text-decoration: none;
|
|
41
39
|
}
|
package/src/components/index.css
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.govgr-modal {
|
|
2
|
+
@apply hidden justify-center items-center content-center
|
|
3
|
+
mb-7 text-base-content bg-opacity-50
|
|
4
|
+
fixed z-10 left-0 top-0 w-full h-full overflow-auto;
|
|
5
|
+
}
|
|
6
|
+
.govgr-modal__body {
|
|
7
|
+
@apply w-full max-w-md md:max-w-lg lg:max-w-4xl
|
|
8
|
+
h-fit-content md:h-auto my-auto mx-4
|
|
9
|
+
bg-white
|
|
10
|
+
border border-solid border-base-200;
|
|
11
|
+
}
|
|
12
|
+
.govgr-modal__content {
|
|
13
|
+
@apply grid gap-6 p-5;
|
|
14
|
+
}
|
|
15
|
+
.govgr-modal__open {
|
|
16
|
+
@apply flex;
|
|
17
|
+
}
|
|
18
|
+
.govgr-modal__heading {
|
|
19
|
+
@apply md:text-2xl text-xl font-bold;
|
|
20
|
+
}
|
|
21
|
+
.govgr-modal__text {
|
|
22
|
+
@apply text-base lg:text-xl text-lg;
|
|
23
|
+
}
|
|
24
|
+
.govgr-modal__action {
|
|
25
|
+
@apply flex flex-wrap items-center gap-y-4;
|
|
26
|
+
* {
|
|
27
|
+
@apply mb-0;
|
|
28
|
+
}
|
|
29
|
+
}
|
package/src/components/nav.css
CHANGED
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.govgr-horizontal-nav__item:focus {
|
|
68
|
-
background-color:
|
|
69
|
-
box-shadow: 0 -2px
|
|
68
|
+
background-color: var(--color-focus);
|
|
69
|
+
box-shadow: 0 -2px var(--color-focus), 0 4px #0b0c0c;
|
|
70
70
|
outline: none;
|
|
71
71
|
}
|
|
72
72
|
.govgr-horizontal-nav__item-active, .govgr-vertical-nav__item--active {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
text-decoration-thickness: 2px;
|
|
37
37
|
}
|
|
38
38
|
&:focus {
|
|
39
|
-
background-color:
|
|
40
|
-
box-shadow: 0 -2px
|
|
39
|
+
background-color: var(--color-focus);
|
|
40
|
+
box-shadow: 0 -2px var(--color-focus), 0 4px #0b0c0c;
|
|
41
41
|
text-decoration:none;
|
|
42
42
|
outline: none;
|
|
43
43
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.govgr-radios__item {
|
|
2
|
-
@apply block relative mb-4 pl-
|
|
2
|
+
@apply block relative mb-4 pl-12;
|
|
3
3
|
min-height: 40px;
|
|
4
4
|
|
|
5
5
|
}
|
|
@@ -45,13 +45,6 @@
|
|
|
45
45
|
background: currentColor;
|
|
46
46
|
}
|
|
47
47
|
&:checked {
|
|
48
|
-
&:before {
|
|
49
|
-
/* border-width: 4px;
|
|
50
|
-
outline: 3px solid transparent;
|
|
51
|
-
outline-offset: 1px;
|
|
52
|
-
-webkit-box-shadow: 0 0 0 3px #fd0;
|
|
53
|
-
box-shadow: 0 0 0 3px #fd0; */
|
|
54
|
-
}
|
|
55
48
|
&:after {
|
|
56
49
|
opacity: 1;
|
|
57
50
|
}
|
|
@@ -61,7 +54,7 @@
|
|
|
61
54
|
&:before {
|
|
62
55
|
outline: 3px solid transparent;
|
|
63
56
|
outline-offset: 1px;
|
|
64
|
-
box-shadow: 0 0 0
|
|
57
|
+
box-shadow: 0 0 0 4px var(--color-focus);
|
|
65
58
|
border-width: 4px;
|
|
66
59
|
}
|
|
67
60
|
}
|
package/src/components/tabs.css
CHANGED
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
left: 0;
|
|
40
40
|
}
|
|
41
41
|
&:focus {
|
|
42
|
-
background-color:
|
|
42
|
+
background-color: var(--color-focus);
|
|
43
43
|
outline: 3px solid transparent;
|
|
44
|
-
-webkit-box-shadow: inset 0 0 0 3px
|
|
45
|
-
box-shadow: inset 0 0 0 3px
|
|
44
|
+
-webkit-box-shadow: inset 0 0 0 3px var(--color-focus);
|
|
45
|
+
box-shadow: inset 0 0 0 3px var(--color-focus);
|
|
46
46
|
outline-offset: 0px;
|
|
47
47
|
text-decoration-thickness: .2rem;
|
|
48
48
|
}
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
text-decoration-thickness: 2px;
|
|
102
102
|
}
|
|
103
103
|
&:focus {
|
|
104
|
-
background-color:
|
|
105
|
-
box-shadow: 0 -2px
|
|
104
|
+
background-color: var(--color-focus);
|
|
105
|
+
box-shadow: 0 -2px var(--color-focus), 0 4px #0b0c0c;
|
|
106
106
|
text-decoration:none;
|
|
107
107
|
outline: none;
|
|
108
108
|
}
|
|
@@ -131,8 +131,8 @@
|
|
|
131
131
|
text-decoration-thickness: 2px;
|
|
132
132
|
}
|
|
133
133
|
&:focus {
|
|
134
|
-
background-color:
|
|
135
|
-
box-shadow: 0 -2px
|
|
134
|
+
background-color: var(--color-focus);
|
|
135
|
+
box-shadow: 0 -2px var(--color-focus), 0 4px #0b0c0c;
|
|
136
136
|
text-decoration:none;
|
|
137
137
|
outline: none;
|
|
138
138
|
}
|
package/src/utilities/index.css
CHANGED
|
@@ -63,4 +63,19 @@
|
|
|
63
63
|
}
|
|
64
64
|
.govgr-grid__col-span-12 {
|
|
65
65
|
@apply col-span-12;
|
|
66
|
+
}
|
|
67
|
+
.govgr-lg-up {
|
|
68
|
+
@apply lg:hidden;
|
|
69
|
+
}
|
|
70
|
+
.govgr-md-up {
|
|
71
|
+
@apply md:hidden;
|
|
72
|
+
}
|
|
73
|
+
.govgr-sm-up {
|
|
74
|
+
@apply sm:hidden;
|
|
75
|
+
}
|
|
76
|
+
.govgr-xl-up {
|
|
77
|
+
@apply xl:hidden;
|
|
78
|
+
}
|
|
79
|
+
.govgr-xs-up {
|
|
80
|
+
@apply xs:hidden;
|
|
66
81
|
}
|
|
@@ -69,4 +69,19 @@
|
|
|
69
69
|
.govgr-grid__col-span-12 {
|
|
70
70
|
@apply col-span-12;
|
|
71
71
|
}
|
|
72
|
+
.govgr-lg-up {
|
|
73
|
+
@apply lg:hidden;
|
|
74
|
+
}
|
|
75
|
+
.govgr-md-up {
|
|
76
|
+
@apply md:hidden;
|
|
77
|
+
}
|
|
78
|
+
.govgr-sm-up {
|
|
79
|
+
@apply sm:hidden;
|
|
80
|
+
}
|
|
81
|
+
.govgr-xl-up {
|
|
82
|
+
@apply xl:hidden;
|
|
83
|
+
}
|
|
84
|
+
.govgr-xs-up {
|
|
85
|
+
@apply xs:hidden;
|
|
86
|
+
}
|
|
72
87
|
};
|
package/tailwind.config.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
const plugin = require('tailwindcss/plugin')
|
|
1
2
|
const defaultTheme = require('tailwindcss/defaultTheme')
|
|
3
|
+
const colors = require('./colors');
|
|
4
|
+
const colorVarsPlugin = require('./color-vars.plugin')
|
|
5
|
+
|
|
2
6
|
const buildOnly = !process.env['DIGIGOV_CSS_BUILD'] ? {
|
|
3
7
|
mode: 'jit',
|
|
4
8
|
} : {}
|
|
5
9
|
module.exports = {
|
|
6
10
|
...buildOnly,
|
|
7
11
|
theme: {
|
|
8
|
-
colors
|
|
12
|
+
colors,
|
|
9
13
|
container: {
|
|
10
14
|
center: true,
|
|
11
15
|
},
|
|
@@ -91,21 +95,7 @@ module.exports = {
|
|
|
91
95
|
borderColor: ['active']
|
|
92
96
|
}
|
|
93
97
|
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
// 'backgroundImage',
|
|
98
|
-
// 'borderColor',
|
|
99
|
-
// 'divideColor',
|
|
100
|
-
// 'gradientColorStops',
|
|
101
|
-
// 'placeholderColor',
|
|
102
|
-
// 'preflight',
|
|
103
|
-
// 'ringColor',
|
|
104
|
-
// 'ringOffsetColor',
|
|
105
|
-
// 'ringOffsetWidth',
|
|
106
|
-
// 'ringOpacity',
|
|
107
|
-
// 'ringWidth',
|
|
108
|
-
// 'textColor',
|
|
109
|
-
// 'transitionProperty',
|
|
110
|
-
// ],
|
|
98
|
+
plugins: [
|
|
99
|
+
plugin(colorVarsPlugin)
|
|
100
|
+
],
|
|
111
101
|
};
|
package/colors/windi.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const colorValues = require('./color-values')
|
|
2
|
-
|
|
3
|
-
let colorObject = {
|
|
4
|
-
"transparent": "transparent",
|
|
5
|
-
"current": "currentColor",
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
for (const [key, item] of Object.entries(colorValues)) {
|
|
9
|
-
colorObject[key] = `hsla(var(--${item.name}, ${item.value}) / var(--tw-bg-opacity, 1))`
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
module.exports = colorObject
|