@digigov/css 0.34.1 → 0.36.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/defaultTheme/brandConfig.json +135 -0
- package/defaultTheme/button.json +3 -3
- package/defaultTheme/card.json +12 -0
- package/defaultTheme/index.js +12 -69
- package/defaultTheme/panel.json +43 -0
- package/defaultTheme/typography.json +4 -4
- package/dist/base/index.css +3 -3
- package/dist/base.js +1 -1
- package/dist/components.js +1 -1
- package/dist/digigov.css +4 -4
- package/package.json +4 -2
- package/src/base/index.css +1 -1
- package/src/components/accessibility-menu.css +6 -6
- package/src/components/accordion.css +2 -2
- package/src/components/admin-footer.css +1 -1
- package/src/components/admin-form.css +1 -1
- package/src/components/admin-header.css +1 -1
- package/src/components/autocomplete.css +7 -7
- package/src/components/bottom-info.css +1 -1
- package/src/components/button.css +5 -5
- package/src/components/card.css +6 -4
- package/src/components/checkboxes.css +2 -2
- package/src/components/cookie.css +1 -1
- package/src/components/details.css +1 -1
- package/src/components/drawer.css +17 -8
- package/src/components/dropdown.css +10 -7
- package/src/components/fillable.css +2 -2
- package/src/components/filter.css +6 -6
- package/src/components/footer.css +3 -3
- package/src/components/form.css +10 -5
- package/src/components/full-page-background.css +1 -1
- package/src/components/header.css +9 -9
- package/src/components/kitchensink.css +1 -4
- package/src/components/layout.css +1 -1
- package/src/components/misc.css +4 -4
- package/src/components/modal.css +3 -3
- package/src/components/nav.css +94 -88
- package/src/components/notification-banner.css +4 -4
- package/src/components/pagination.css +2 -2
- package/src/components/panel.css +10 -2
- package/src/components/phase-banner.css +4 -4
- package/src/components/radios.css +2 -2
- package/src/components/stepnav.css +4 -4
- package/src/components/summary-list.css +2 -2
- package/src/components/svg-icons.css +3 -3
- package/src/components/table.css +28 -9
- package/src/components/tabs.css +3 -3
- package/src/components/task-list.css +5 -5
- package/src/components/typography.css +6 -6
- package/src/pages/form.js +7 -7
- package/src/pages/index.js +7 -7
- package/tailwind.config.js +34 -31
- package/themes.plugin.js +26 -23
package/tailwind.config.js
CHANGED
|
@@ -6,34 +6,36 @@ const allColors = [
|
|
|
6
6
|
"transparent",
|
|
7
7
|
"current",
|
|
8
8
|
"primary",
|
|
9
|
-
"primary-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"secondary200",
|
|
9
|
+
"primary-100",
|
|
10
|
+
"primary-200",
|
|
11
|
+
"primary-300",
|
|
13
12
|
"secondary",
|
|
14
|
-
"secondary-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
13
|
+
"secondary-100",
|
|
14
|
+
"secondary-200",
|
|
15
|
+
"secondary-300",
|
|
16
|
+
"tertiary",
|
|
17
|
+
"tertiary-100",
|
|
18
|
+
"tertiary-200",
|
|
19
|
+
"tertiary-300",
|
|
21
20
|
"accent",
|
|
22
21
|
"accent-focus",
|
|
23
22
|
"accent-content",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
23
|
+
"base-100",
|
|
24
|
+
"base-200",
|
|
25
|
+
"base-300",
|
|
26
|
+
"base-400",
|
|
27
|
+
"base-500",
|
|
28
|
+
"base-600",
|
|
29
|
+
"base-700",
|
|
30
|
+
"base-800",
|
|
31
|
+
"base-900",
|
|
32
|
+
"base-1000",
|
|
33
|
+
"base-11000",
|
|
33
34
|
"base-content",
|
|
34
35
|
"base-content-secondary",
|
|
35
36
|
"base-content-invert",
|
|
36
37
|
"info",
|
|
38
|
+
"info-hover",
|
|
37
39
|
"success",
|
|
38
40
|
"success-hover",
|
|
39
41
|
"warning",
|
|
@@ -45,17 +47,18 @@ const allColors = [
|
|
|
45
47
|
"link-visited",
|
|
46
48
|
"link-active",
|
|
47
49
|
"white",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
50
|
+
"gray-100",
|
|
51
|
+
"gray-200",
|
|
52
|
+
"gray-300",
|
|
53
|
+
"gray-400",
|
|
54
|
+
"gray-500",
|
|
55
|
+
"gray-600",
|
|
56
|
+
"gray-700",
|
|
57
|
+
"gray-800",
|
|
58
|
+
"gray-900",
|
|
59
|
+
"gray-1000",
|
|
60
|
+
"gray-1100",
|
|
61
|
+
"gray-1200",
|
|
59
62
|
"black",
|
|
60
63
|
"shadow200",
|
|
61
64
|
"shadow600",
|
package/themes.plugin.js
CHANGED
|
@@ -28,19 +28,21 @@ function addThemes({ addBase, addComponents, theme, config }) {
|
|
|
28
28
|
}
|
|
29
29
|
hasRun = true;
|
|
30
30
|
function extractColorVars(colorObj, colorGroup = "") {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
return Object.keys(colorObj).reduce((vars, colorKey) => {
|
|
32
|
+
const value = colorObj[colorKey];
|
|
33
|
+
const colorName =
|
|
34
|
+
colorKey == "default"
|
|
35
|
+
? `--color${colorGroup}`
|
|
36
|
+
: `--color${colorGroup}-${colorKey}`;
|
|
37
|
+
const newVars =
|
|
38
|
+
typeof value === "string"
|
|
39
|
+
? {
|
|
40
|
+
[colorName]: value,
|
|
41
|
+
[`${colorName}-rgb`]: hexToRGB(value),
|
|
42
|
+
}
|
|
43
|
+
: extractColorVars(value, `-${colorKey}`);
|
|
44
|
+
return { ...vars, ...newVars };
|
|
45
|
+
}, {});
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
function extractMediaQueriesFromComponentVars(componentObj, customTheme) {
|
|
@@ -55,21 +57,23 @@ function addThemes({ addBase, addComponents, theme, config }) {
|
|
|
55
57
|
const newAttr = { [newAttrKey]: newAttrValue };
|
|
56
58
|
const newClass = `.${prefix}-${componentClass}`;
|
|
57
59
|
const newMedia = mediaQueriesMapping[componentMedia];
|
|
58
|
-
const newTheme =
|
|
59
|
-
|
|
60
|
+
const newTheme =
|
|
61
|
+
customTheme === defaultTheme ? "" : `.${customTheme}`;
|
|
62
|
+
|
|
60
63
|
if (mediaObj[newMedia]) {
|
|
61
64
|
if (mediaObj[newMedia][newTheme][newClass]) {
|
|
62
|
-
mediaObj[newMedia][newTheme][newClass][newAttrKey] =
|
|
65
|
+
mediaObj[newMedia][newTheme][newClass][newAttrKey] =
|
|
66
|
+
newAttrValue;
|
|
63
67
|
} else {
|
|
64
68
|
mediaObj[newMedia][newTheme][newClass] = newAttr;
|
|
65
69
|
}
|
|
66
70
|
} else {
|
|
67
|
-
mediaObj[newMedia] = { [newTheme]: { [newClass]: newAttr }};
|
|
68
|
-
}
|
|
71
|
+
mediaObj[newMedia] = { [newTheme]: { [newClass]: newAttr } };
|
|
72
|
+
}
|
|
69
73
|
}
|
|
70
|
-
|
|
71
|
-
});
|
|
74
|
+
);
|
|
72
75
|
});
|
|
76
|
+
});
|
|
73
77
|
return mediaObj;
|
|
74
78
|
}
|
|
75
79
|
|
|
@@ -136,13 +140,12 @@ function addThemes({ addBase, addComponents, theme, config }) {
|
|
|
136
140
|
);
|
|
137
141
|
Object.keys(extractedVariables).forEach((key) => {
|
|
138
142
|
if (base[key]) {
|
|
139
|
-
base[key] = {...base[key], ...extractedVariables[key]}
|
|
143
|
+
base[key] = { ...base[key], ...extractedVariables[key] };
|
|
140
144
|
} else {
|
|
141
145
|
base[key] = extractedVariables[key];
|
|
142
146
|
}
|
|
143
|
-
});
|
|
147
|
+
});
|
|
144
148
|
}
|
|
145
|
-
|
|
146
149
|
}
|
|
147
150
|
addBase(base);
|
|
148
151
|
}
|