@digigov/css 2.0.0-60d81ed8 → 2.0.0-6452adf3
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/dist/base/index.css +1 -1
- package/dist/base.js +1 -1
- package/dist/components.js +1 -1
- package/dist/digigov.css +3 -3
- package/dist/utilities/index.css +1 -1
- package/dist/utilities.js +1 -1
- package/index.js +99 -69
- package/package.json +11 -11
- package/postcss.config.js +4 -4
- package/src/base/index.css +1 -0
- package/src/base/postcss.config.js +11 -10
- package/src/base/tailwind.config.js +4 -11
- package/src/components/button.common.css +1 -1
- package/src/components/button.css +1 -1
- package/src/components/button.native.css +2 -3
- package/src/components/copy-to-clipboard.css +1 -1
- package/src/components/drawer.css +23 -3
- package/src/components/filter.css +71 -22
- package/src/components/kitchensink.css +2 -2
- package/src/components/loader.common.css +7 -0
- package/src/components/loader.css +3 -1
- package/src/components/loader.native.css +5 -0
- package/src/components/modal.common.css +2 -2
- package/src/components/modal.css +9 -9
- package/src/components/modal.native.css +3 -3
- package/src/components/pagination.css +19 -3
- package/src/components/postcss.config.js +7 -6
- package/src/components/stack.common.css +67 -0
- package/src/components/stack.css +23 -21
- package/src/components/stack.native.css +68 -0
- package/src/components/typography.common.css +1 -4
- package/src/components/typography.css +5 -1
- package/src/index.native.css +2 -0
- package/src/utilities/postcss.config.js +7 -6
- package/tailwind.config.js +102 -106
- package/theming.js +121 -0
- package/defaultTheme/accordion.json +0 -16
- package/defaultTheme/back-to-top.json +0 -27
- package/defaultTheme/brandConfig.json +0 -147
- package/defaultTheme/breadcrumbs.json +0 -8
- package/defaultTheme/button.json +0 -94
- package/defaultTheme/card.json +0 -23
- package/defaultTheme/form.json +0 -132
- package/defaultTheme/globals.json +0 -81
- package/defaultTheme/index.js +0 -27
- package/defaultTheme/layout.json +0 -55
- package/defaultTheme/misc.json +0 -68
- package/defaultTheme/panel.json +0 -48
- package/defaultTheme/phase-banner.json +0 -8
- package/defaultTheme/radios.json +0 -8
- package/defaultTheme/summary-list.json +0 -8
- package/defaultTheme/typography.json +0 -295
- package/themes.plugin.js +0 -148
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
@import './modal.common.css';
|
|
2
2
|
|
|
3
|
-
.ds-modal {
|
|
3
|
+
.ds-modal-container {
|
|
4
4
|
@apply absolute justify-center items-center top-0 left-0 right-0 bottom-0;
|
|
5
5
|
background-color: rgba(var(--color-black-rgb), 0.5);
|
|
6
6
|
}
|
|
7
|
-
.ds-
|
|
7
|
+
.ds-modal {
|
|
8
8
|
@apply util-modal__body;
|
|
9
9
|
}
|
|
10
|
-
.ds-
|
|
10
|
+
.ds-modal__body {
|
|
11
11
|
@apply util-modal__container;
|
|
12
12
|
}
|
|
13
13
|
.ds-modal__content__text {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.ds-pagination {
|
|
2
|
-
@apply flex flex-wrap items-center justify-items-center justify-between
|
|
2
|
+
@apply flex flex-wrap items-center justify-items-center justify-between
|
|
3
|
+
gap-y-2 md:gap-y-4 gap-x-6 mb-4 md:mb-8;
|
|
3
4
|
&.ds-pagination--sm {
|
|
4
5
|
.ds-pagination__label,
|
|
5
6
|
.ds-pagination__item--current {
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
@apply text-base-content md:leading-normal;
|
|
18
19
|
}
|
|
19
20
|
.ds-pagination__list {
|
|
20
|
-
@apply flex items-center;
|
|
21
|
+
@apply flex items-center flex-wrap;
|
|
21
22
|
}
|
|
22
23
|
.ds-pagination__item {
|
|
23
24
|
@apply inline-block p-2 m-0;
|
|
@@ -32,6 +33,14 @@
|
|
|
32
33
|
@apply font-bold;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
36
|
+
@media (max-width: 639.9px) {
|
|
37
|
+
.ds-pagination__item {
|
|
38
|
+
@apply py-0;
|
|
39
|
+
&.ds-pagination__item--current {
|
|
40
|
+
@apply flex items-center justify-center min-h-12 min-w-12;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
35
44
|
|
|
36
45
|
/* overrides */
|
|
37
46
|
|
|
@@ -69,6 +78,13 @@
|
|
|
69
78
|
}
|
|
70
79
|
}
|
|
71
80
|
.ds-link {
|
|
72
|
-
@apply flex items-center no-underline;
|
|
81
|
+
@apply flex items-center justify-center no-underline;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@media (max-width: 639.9px) {
|
|
85
|
+
.ds-pagination__item {
|
|
86
|
+
.ds-link {
|
|
87
|
+
@apply min-h-12 min-w-12;
|
|
88
|
+
}
|
|
73
89
|
}
|
|
74
90
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/** @type {import('postcss-load-config').Config} */
|
|
2
2
|
const config = {
|
|
3
3
|
plugins: [
|
|
4
|
-
require(
|
|
5
|
-
require(
|
|
6
|
-
require(
|
|
7
|
-
require(
|
|
8
|
-
require(
|
|
4
|
+
require('postcss-import'),
|
|
5
|
+
require('tailwindcss/nesting'),
|
|
6
|
+
require('tailwindcss')('./src/components/tailwind.config.js'),
|
|
7
|
+
require('autoprefixer'),
|
|
8
|
+
require('postcss-sort-media-queries'),
|
|
9
|
+
require('cssnano')({
|
|
9
10
|
preset: [
|
|
10
|
-
|
|
11
|
+
'default',
|
|
11
12
|
{
|
|
12
13
|
mergeRules: false,
|
|
13
14
|
},
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@tailwind utilities;
|
|
2
|
+
|
|
3
|
+
@layer utilities {
|
|
4
|
+
.util-stack {
|
|
5
|
+
@apply flex flex-col flex-wrap;
|
|
6
|
+
}
|
|
7
|
+
.util-stack--row {
|
|
8
|
+
@apply flex-row;
|
|
9
|
+
}
|
|
10
|
+
.util-stack--reverse-row {
|
|
11
|
+
@apply flex-row-reverse;
|
|
12
|
+
}
|
|
13
|
+
.util-stack--col-reverse {
|
|
14
|
+
@apply flex-col-reverse;
|
|
15
|
+
}
|
|
16
|
+
.util-stack--nowrap {
|
|
17
|
+
@apply flex-nowrap;
|
|
18
|
+
}
|
|
19
|
+
.util-stack--justify-flex-start {
|
|
20
|
+
@apply justify-start;
|
|
21
|
+
}
|
|
22
|
+
.util-stack--justify-flex-end {
|
|
23
|
+
@apply justify-end;
|
|
24
|
+
}
|
|
25
|
+
.util-stack--justify-center {
|
|
26
|
+
@apply justify-center;
|
|
27
|
+
}
|
|
28
|
+
.util-stack--justify-space-between {
|
|
29
|
+
@apply justify-between;
|
|
30
|
+
}
|
|
31
|
+
.util-stack--justify-space-around {
|
|
32
|
+
@apply justify-around;
|
|
33
|
+
}
|
|
34
|
+
.util-stack--justify-space-evenly {
|
|
35
|
+
@apply justify-evenly;
|
|
36
|
+
}
|
|
37
|
+
.util-stack--align-stretch {
|
|
38
|
+
@apply items-stretch;
|
|
39
|
+
}
|
|
40
|
+
.util-stack--align-flex-start {
|
|
41
|
+
@apply items-start;
|
|
42
|
+
}
|
|
43
|
+
.util-stack--align-flex-end {
|
|
44
|
+
@apply items-end;
|
|
45
|
+
}
|
|
46
|
+
.util-stack--align-center {
|
|
47
|
+
@apply items-center;
|
|
48
|
+
}
|
|
49
|
+
.util-stack--align-baseline {
|
|
50
|
+
@apply items-baseline;
|
|
51
|
+
}
|
|
52
|
+
.util-stack--content-flex-start {
|
|
53
|
+
@apply content-start;
|
|
54
|
+
}
|
|
55
|
+
.util-stack--content-flex-end {
|
|
56
|
+
@apply content-end;
|
|
57
|
+
}
|
|
58
|
+
.util-stack--content-center {
|
|
59
|
+
@apply content-center;
|
|
60
|
+
}
|
|
61
|
+
.util-stack--content-space-between {
|
|
62
|
+
@apply content-between;
|
|
63
|
+
}
|
|
64
|
+
.util-stack--content-space-around {
|
|
65
|
+
@apply content-around;
|
|
66
|
+
}
|
|
67
|
+
}
|
package/src/components/stack.css
CHANGED
|
@@ -1,64 +1,66 @@
|
|
|
1
|
+
@import './stack.common.css';
|
|
2
|
+
|
|
1
3
|
.ds-stack {
|
|
2
|
-
@apply
|
|
4
|
+
@apply util-stack;
|
|
3
5
|
&.ds-stack--row {
|
|
4
|
-
@apply
|
|
6
|
+
@apply util-stack--row;
|
|
5
7
|
}
|
|
6
8
|
&.ds-stack--reverse-row {
|
|
7
|
-
@apply
|
|
9
|
+
@apply util-stack--reverse-row;
|
|
8
10
|
}
|
|
9
11
|
&.ds-stack--col-reverse {
|
|
10
|
-
@apply
|
|
12
|
+
@apply util-stack--col-reverse;
|
|
11
13
|
}
|
|
12
14
|
&.ds-stack--nowrap {
|
|
13
|
-
@apply
|
|
15
|
+
@apply util-stack--nowrap;
|
|
14
16
|
}
|
|
15
17
|
&.ds-stack--justify-flex-start {
|
|
16
|
-
@apply justify-start;
|
|
18
|
+
@apply util-stack--justify-flex-start;
|
|
17
19
|
}
|
|
18
20
|
&.ds-stack--justify-flex-end {
|
|
19
|
-
@apply justify-end;
|
|
21
|
+
@apply util-stack--justify-flex-end;
|
|
20
22
|
}
|
|
21
23
|
&.ds-stack--justify-center {
|
|
22
|
-
@apply justify-center;
|
|
24
|
+
@apply util-stack--justify-center;
|
|
23
25
|
}
|
|
24
26
|
&.ds-stack--justify-space-between {
|
|
25
|
-
@apply justify-between;
|
|
27
|
+
@apply util-stack--justify-space-between;
|
|
26
28
|
}
|
|
27
29
|
&.ds-stack--justify-space-around {
|
|
28
|
-
@apply justify-around;
|
|
30
|
+
@apply util-stack--justify-space-around;
|
|
29
31
|
}
|
|
30
32
|
&.ds-stack--justify-space-evenly {
|
|
31
|
-
@apply justify-evenly;
|
|
33
|
+
@apply util-stack--justify-space-evenly;
|
|
32
34
|
}
|
|
33
35
|
&.ds-stack--align-stretch {
|
|
34
|
-
@apply
|
|
36
|
+
@apply util-stack--align-stretch;
|
|
35
37
|
}
|
|
36
38
|
&.ds-stack--align-flex-start {
|
|
37
|
-
@apply
|
|
39
|
+
@apply util-stack--align-flex-start;
|
|
38
40
|
}
|
|
39
41
|
&.ds-stack--align-flex-end {
|
|
40
|
-
@apply
|
|
42
|
+
@apply util-stack--align-flex-end;
|
|
41
43
|
}
|
|
42
44
|
&.ds-stack--align-center {
|
|
43
|
-
@apply
|
|
45
|
+
@apply util-stack--align-center;
|
|
44
46
|
}
|
|
45
47
|
&.ds-stack--align-baseline {
|
|
46
|
-
@apply
|
|
48
|
+
@apply util-stack--align-baseline;
|
|
47
49
|
}
|
|
48
50
|
&.ds-stack--content-flex-start {
|
|
49
|
-
@apply content-start;
|
|
51
|
+
@apply util-stack--content-flex-start;
|
|
50
52
|
}
|
|
51
53
|
&.ds-stack--content-flex-end {
|
|
52
|
-
@apply content-end;
|
|
54
|
+
@apply util-stack--content-flex-end;
|
|
53
55
|
}
|
|
54
56
|
&.ds-stack--content-center {
|
|
55
|
-
@apply content-center;
|
|
57
|
+
@apply util-stack--content-center;
|
|
56
58
|
}
|
|
57
59
|
&.ds-stack--content-space-between {
|
|
58
|
-
@apply content-between;
|
|
60
|
+
@apply util-stack--content-space-between;
|
|
59
61
|
}
|
|
60
62
|
&.ds-stack--content-space-around {
|
|
61
|
-
@apply content-around;
|
|
63
|
+
@apply util-stack--content-space-around;
|
|
62
64
|
}
|
|
63
65
|
&.ds-stack--content-space-evenly {
|
|
64
66
|
@apply content-evenly;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@import './stack.common.css';
|
|
2
|
+
|
|
3
|
+
.ds-stack {
|
|
4
|
+
@apply util-stack;
|
|
5
|
+
}
|
|
6
|
+
.ds-stack--row {
|
|
7
|
+
@apply util-stack--row;
|
|
8
|
+
}
|
|
9
|
+
.ds-stack--reverse-row {
|
|
10
|
+
@apply util-stack--reverse-row;
|
|
11
|
+
}
|
|
12
|
+
.ds-stack--col-reverse {
|
|
13
|
+
@apply util-stack--col-reverse;
|
|
14
|
+
}
|
|
15
|
+
.ds-stack--nowrap {
|
|
16
|
+
@apply util-stack--nowrap;
|
|
17
|
+
}
|
|
18
|
+
.ds-stack--justify-flex-start {
|
|
19
|
+
@apply util-stack--justify-flex-start;
|
|
20
|
+
}
|
|
21
|
+
.ds-stack--justify-flex-end {
|
|
22
|
+
@apply util-stack--justify-flex-end;
|
|
23
|
+
}
|
|
24
|
+
.ds-stack--justify-center {
|
|
25
|
+
@apply util-stack--justify-center;
|
|
26
|
+
}
|
|
27
|
+
.ds-stack--justify-space-between {
|
|
28
|
+
@apply util-stack--justify-space-between;
|
|
29
|
+
}
|
|
30
|
+
.ds-stack--justify-space-around {
|
|
31
|
+
@apply util-stack--justify-space-around;
|
|
32
|
+
}
|
|
33
|
+
.ds-stack--justify-space-evenly {
|
|
34
|
+
@apply util-stack--justify-space-evenly;
|
|
35
|
+
}
|
|
36
|
+
.ds-stack--align-stretch {
|
|
37
|
+
@apply util-stack--align-stretch;
|
|
38
|
+
}
|
|
39
|
+
.ds-stack--align-flex-start {
|
|
40
|
+
@apply util-stack--align-flex-start;
|
|
41
|
+
}
|
|
42
|
+
.ds-stack--align-flex-end {
|
|
43
|
+
@apply util-stack--align-flex-end;
|
|
44
|
+
}
|
|
45
|
+
.ds-stack--align-center {
|
|
46
|
+
@apply util-stack--align-center;
|
|
47
|
+
}
|
|
48
|
+
.ds-stack--align-baseline {
|
|
49
|
+
@apply util-stack--align-baseline;
|
|
50
|
+
}
|
|
51
|
+
.ds-stack--content-flex-start {
|
|
52
|
+
@apply util-stack--content-flex-start;
|
|
53
|
+
}
|
|
54
|
+
.ds-stack--content-flex-end {
|
|
55
|
+
@apply util-stack--content-flex-end;
|
|
56
|
+
}
|
|
57
|
+
.ds-stack--content-center {
|
|
58
|
+
@apply util-stack--content-center;
|
|
59
|
+
}
|
|
60
|
+
.ds-stack--content-space-between {
|
|
61
|
+
@apply util-stack--content-space-between;
|
|
62
|
+
}
|
|
63
|
+
.ds-stack--content-space-around {
|
|
64
|
+
@apply util-stack--content-space-around;
|
|
65
|
+
}
|
|
66
|
+
.ds-stack--content-space-evenly {
|
|
67
|
+
justify-content: 'space-evenly';
|
|
68
|
+
}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
}
|
|
52
52
|
.util-link {
|
|
53
53
|
@apply focus:bg-focus;
|
|
54
|
-
padding: var(--link-padding);
|
|
54
|
+
padding: var(--link-padding-y) var(--link-padding-x);
|
|
55
55
|
}
|
|
56
56
|
.util-link-text {
|
|
57
57
|
/* @apply focus:text-link-active underline; */
|
|
@@ -59,9 +59,6 @@
|
|
|
59
59
|
color: var(--link-color);
|
|
60
60
|
font-size: var(--link-font-size);
|
|
61
61
|
line-height: var(--link-line-height);
|
|
62
|
-
/* &:focus {
|
|
63
|
-
text-decoration: none !important;
|
|
64
|
-
} */
|
|
65
62
|
}
|
|
66
63
|
|
|
67
64
|
.util-caption-xl {
|
|
@@ -129,6 +129,9 @@
|
|
|
129
129
|
&:last-child {
|
|
130
130
|
@apply mb-0;
|
|
131
131
|
}
|
|
132
|
+
> button.ds-link:only-child {
|
|
133
|
+
display: inline-flex;
|
|
134
|
+
}
|
|
132
135
|
}
|
|
133
136
|
}
|
|
134
137
|
.ds-list__item > .ds-list--bullet:nth-child(1) {
|
|
@@ -174,7 +177,7 @@
|
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
.ds-link {
|
|
177
|
-
@apply focus:text-link-active util-link util-link-text cursor-pointer;
|
|
180
|
+
@apply focus:text-link-active util-link util-link-text cursor-pointer text-left;
|
|
178
181
|
letter-spacing: var(--link-letter-spacing);
|
|
179
182
|
&:hover {
|
|
180
183
|
text-decoration-thickness: 2px;
|
|
@@ -278,6 +281,7 @@
|
|
|
278
281
|
}
|
|
279
282
|
}
|
|
280
283
|
button.ds-link {
|
|
284
|
+
@apply text-left;
|
|
281
285
|
.ds-svg-icon {
|
|
282
286
|
@apply ml-1;
|
|
283
287
|
}
|
package/src/index.native.css
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/** @type {import('postcss-load-config').Config} */
|
|
2
2
|
const config = {
|
|
3
3
|
plugins: [
|
|
4
|
-
require(
|
|
5
|
-
require(
|
|
6
|
-
require(
|
|
7
|
-
require(
|
|
8
|
-
require(
|
|
4
|
+
require('postcss-import'),
|
|
5
|
+
require('tailwindcss/nesting'),
|
|
6
|
+
require('tailwindcss')('./src/utilities/tailwind.config.js'),
|
|
7
|
+
require('autoprefixer'),
|
|
8
|
+
require('postcss-sort-media-queries'),
|
|
9
|
+
require('cssnano')({
|
|
9
10
|
preset: [
|
|
10
|
-
|
|
11
|
+
'default',
|
|
11
12
|
{
|
|
12
13
|
mergeRules: false,
|
|
13
14
|
},
|
package/tailwind.config.js
CHANGED
|
@@ -1,72 +1,70 @@
|
|
|
1
|
-
const
|
|
2
|
-
const defaultTheme = require("tailwindcss/defaultTheme");
|
|
3
|
-
const themesPlugin = require("./themes.plugin");
|
|
1
|
+
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
4
2
|
|
|
5
3
|
const allColors = [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
4
|
+
'transparent',
|
|
5
|
+
'current',
|
|
6
|
+
'primary',
|
|
7
|
+
'primary-100',
|
|
8
|
+
'primary-200',
|
|
9
|
+
'primary-300',
|
|
10
|
+
'secondary',
|
|
11
|
+
'secondary-100',
|
|
12
|
+
'secondary-200',
|
|
13
|
+
'secondary-300',
|
|
14
|
+
'tertiary',
|
|
15
|
+
'tertiary-100',
|
|
16
|
+
'tertiary-200',
|
|
17
|
+
'tertiary-300',
|
|
18
|
+
'accent',
|
|
19
|
+
'accent-focus',
|
|
20
|
+
'accent-content',
|
|
21
|
+
'base-100',
|
|
22
|
+
'base-200',
|
|
23
|
+
'base-300',
|
|
24
|
+
'base-400',
|
|
25
|
+
'base-500',
|
|
26
|
+
'base-600',
|
|
27
|
+
'base-700',
|
|
28
|
+
'base-800',
|
|
29
|
+
'base-900',
|
|
30
|
+
'base-1000',
|
|
31
|
+
'base-11000',
|
|
32
|
+
'base-content',
|
|
33
|
+
'base-content-secondary',
|
|
34
|
+
'base-content-invert',
|
|
35
|
+
'info',
|
|
36
|
+
'info-hover',
|
|
37
|
+
'success',
|
|
38
|
+
'success-hover',
|
|
39
|
+
'warning',
|
|
40
|
+
'error',
|
|
41
|
+
'error-hover',
|
|
42
|
+
'error-text',
|
|
43
|
+
'focus',
|
|
44
|
+
'link',
|
|
45
|
+
'link-hover',
|
|
46
|
+
'link-visited',
|
|
47
|
+
'link-active',
|
|
48
|
+
'white',
|
|
49
|
+
'gray-100',
|
|
50
|
+
'gray-200',
|
|
51
|
+
'gray-300',
|
|
52
|
+
'gray-400',
|
|
53
|
+
'gray-500',
|
|
54
|
+
'gray-600',
|
|
55
|
+
'gray-700',
|
|
56
|
+
'gray-800',
|
|
57
|
+
'gray-900',
|
|
58
|
+
'gray-1000',
|
|
59
|
+
'gray-1100',
|
|
60
|
+
'gray-1200',
|
|
61
|
+
'black',
|
|
62
|
+
'shadow200',
|
|
63
|
+
'shadow600',
|
|
66
64
|
];
|
|
67
65
|
|
|
68
66
|
const colorVariables = allColors.reduce((colorVars, color) => {
|
|
69
|
-
if ([
|
|
67
|
+
if (['transparent', 'currentColor'].includes(color)) {
|
|
70
68
|
colorVars[color] = color;
|
|
71
69
|
} else {
|
|
72
70
|
colorVars[color] = ({ opacityVariable, opacityValue }) => {
|
|
@@ -81,94 +79,92 @@ const colorVariables = allColors.reduce((colorVars, color) => {
|
|
|
81
79
|
}
|
|
82
80
|
return colorVars;
|
|
83
81
|
}, {});
|
|
82
|
+
|
|
84
83
|
const screens = require('./screens.json');
|
|
85
84
|
const screensWithPixels = Object.keys(screens).reduce((screenVars, screen) => {
|
|
86
85
|
screenVars[screen] = `${screens[screen]}px`;
|
|
87
86
|
return screenVars;
|
|
88
|
-
},{})
|
|
87
|
+
}, {});
|
|
88
|
+
|
|
89
89
|
/** @type {import('tailwindcss').Config} */
|
|
90
90
|
module.exports = {
|
|
91
|
-
darkMode:
|
|
91
|
+
darkMode: 'class',
|
|
92
92
|
content: {
|
|
93
|
-
files: [
|
|
93
|
+
files: ['./src/*.css'],
|
|
94
94
|
relative: true,
|
|
95
95
|
},
|
|
96
|
-
themes: {
|
|
97
|
-
light: require.resolve("./defaultTheme"),
|
|
98
|
-
},
|
|
99
|
-
defaultTheme: "light",
|
|
100
96
|
theme: {
|
|
101
97
|
colors: colorVariables,
|
|
98
|
+
screens: {
|
|
99
|
+
...screensWithPixels,
|
|
100
|
+
print: { raw: 'print' },
|
|
101
|
+
xsOnly: { min: '0px', max: '639.98px' },
|
|
102
|
+
smOnly: { min: '640px', max: '767.98px' },
|
|
103
|
+
mdOnly: { min: '768px', max: '1023.98px' },
|
|
104
|
+
lgOnly: { min: '1024px', max: '1279.98px' },
|
|
105
|
+
xlOnly: { min: '1280px', max: '1535.98px' },
|
|
106
|
+
},
|
|
102
107
|
container: {
|
|
103
108
|
center: true,
|
|
104
109
|
},
|
|
105
110
|
fontSize: {
|
|
106
111
|
...defaultTheme.fontSize,
|
|
107
|
-
lg:
|
|
108
|
-
},
|
|
109
|
-
screens: {
|
|
110
|
-
...screensWithPixels,
|
|
111
|
-
print: { raw: "print" },
|
|
112
|
-
xsOnly: { min: "0px", max: "639.98px" },
|
|
113
|
-
smOnly: { min: "640px", max: "767.98px" },
|
|
114
|
-
mdOnly: { min: "768px", max: "1023.98px" },
|
|
115
|
-
lgOnly: { min: "1024px", max: "1279.98px" },
|
|
116
|
-
xlOnly: { min: "1280px", max: "1535.98px" },
|
|
112
|
+
lg: '1.1875rem',
|
|
117
113
|
},
|
|
118
114
|
fontFamily: {
|
|
119
|
-
sans: [
|
|
115
|
+
sans: ['Roboto', ...defaultTheme.fontFamily.sans],
|
|
120
116
|
},
|
|
121
117
|
extend: {
|
|
122
118
|
height: {
|
|
123
|
-
fit:
|
|
119
|
+
fit: 'fit-content',
|
|
124
120
|
},
|
|
125
121
|
width: {
|
|
126
|
-
fit:
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
fit: 'fit-content',
|
|
123
|
+
'2xl': '42rem',
|
|
124
|
+
'4xl': '56rem',
|
|
129
125
|
},
|
|
130
126
|
maxWidth: {
|
|
131
|
-
fit:
|
|
127
|
+
fit: 'fit-content',
|
|
132
128
|
},
|
|
133
129
|
minWidth: {
|
|
134
|
-
4:
|
|
135
|
-
10:
|
|
136
|
-
|
|
137
|
-
|
|
130
|
+
4: '1rem',
|
|
131
|
+
10: '2.5rem',
|
|
132
|
+
12: '3rem',
|
|
133
|
+
32: '8rem',
|
|
134
|
+
52: '13rem',
|
|
138
135
|
},
|
|
139
136
|
minHeight: {
|
|
140
|
-
4:
|
|
141
|
-
6:
|
|
142
|
-
8:
|
|
143
|
-
10:
|
|
144
|
-
12:
|
|
145
|
-
14:
|
|
137
|
+
4: '1rem',
|
|
138
|
+
6: '1.5rem',
|
|
139
|
+
8: '2rem',
|
|
140
|
+
10: '2.5rem',
|
|
141
|
+
12: '3rem',
|
|
142
|
+
14: '3.5rem',
|
|
146
143
|
},
|
|
147
144
|
borderWidth: {
|
|
148
|
-
3:
|
|
149
|
-
5:
|
|
150
|
-
6:
|
|
145
|
+
3: '3px',
|
|
146
|
+
5: '5px',
|
|
147
|
+
6: '6px',
|
|
151
148
|
},
|
|
152
149
|
flexGrow: {
|
|
153
|
-
2:
|
|
150
|
+
2: '2',
|
|
154
151
|
},
|
|
155
152
|
zIndex: {
|
|
156
|
-
|
|
153
|
+
'/1': -1,
|
|
157
154
|
1: 1,
|
|
158
155
|
2: 2,
|
|
159
156
|
3: 3,
|
|
160
157
|
5: 5,
|
|
161
158
|
},
|
|
162
159
|
opacity: {
|
|
163
|
-
85:
|
|
160
|
+
85: '0.85',
|
|
164
161
|
},
|
|
165
162
|
margin: {
|
|
166
|
-
15:
|
|
163
|
+
15: '3.75rem',
|
|
167
164
|
},
|
|
168
165
|
boxShadow: {
|
|
169
|
-
thick:
|
|
166
|
+
thick: '0 0 30px rgba(0, 0, 0, 0.6)',
|
|
170
167
|
},
|
|
171
168
|
},
|
|
172
169
|
},
|
|
173
|
-
plugins: [plugin(themesPlugin)],
|
|
174
170
|
};
|