@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
package/theming.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const postcss = require('postcss');
|
|
4
|
+
const postcssrc = require('postcss-load-config');
|
|
5
|
+
const postcssJs = require('postcss-js');
|
|
6
|
+
|
|
7
|
+
const DEFAULT_THEME = '@digigov/theme-default';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Load custom theme CSS as base styles.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} [options={}]
|
|
13
|
+
* @param {string} [options.theme] - Custom theme package name or file path.
|
|
14
|
+
* @param {boolean} [options.eject] - Whether to ignore the default Digigov CSS base styles.
|
|
15
|
+
* @param {boolean} [options.debug] - Whether to log debug information.
|
|
16
|
+
* @returns {object} - The base styles as CSS-in-JS object.
|
|
17
|
+
*/
|
|
18
|
+
function getThemeBaseStyle(options = {}) {
|
|
19
|
+
const { theme: userTheme, eject, debug } = options;
|
|
20
|
+
|
|
21
|
+
if (!userTheme) {
|
|
22
|
+
// do not load any theme
|
|
23
|
+
if (eject) return;
|
|
24
|
+
// load default theme
|
|
25
|
+
const css = loadCss(debug, DEFAULT_THEME);
|
|
26
|
+
return processCss(css);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// only load user theme
|
|
30
|
+
if (eject) {
|
|
31
|
+
const css = loadCss(debug, userTheme);
|
|
32
|
+
return processCss(css);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// load both default and user theme
|
|
36
|
+
const css = loadCss(debug, DEFAULT_THEME, userTheme);
|
|
37
|
+
return processCss(css);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Check if the given theme is a local file or package.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} userTheme - File path or package name.
|
|
44
|
+
* @returns {boolean} - Whether the theme is a local file.
|
|
45
|
+
*/
|
|
46
|
+
function isLocalTheme(userTheme) {
|
|
47
|
+
return (
|
|
48
|
+
userTheme.startsWith('./') ||
|
|
49
|
+
userTheme.startsWith('../') ||
|
|
50
|
+
path.isAbsolute(userTheme)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Load CSS from given package or file path.
|
|
56
|
+
*
|
|
57
|
+
* @param {boolean} debug - Whether to log debug information.
|
|
58
|
+
* @param {...string} pkgOrPathList - Package name or file path.
|
|
59
|
+
*
|
|
60
|
+
* @returns {string} - The CSS content.
|
|
61
|
+
*/
|
|
62
|
+
function loadCss(debug, ...pkgOrPathList) {
|
|
63
|
+
const includedThemes = [...pkgOrPathList];
|
|
64
|
+
const css = pkgOrPathList
|
|
65
|
+
.map((pkgOrPath) => {
|
|
66
|
+
try {
|
|
67
|
+
let cssFilePath = isLocalTheme(pkgOrPath)
|
|
68
|
+
? path.resolve(pkgOrPath)
|
|
69
|
+
: require.resolve(pkgOrPath);
|
|
70
|
+
|
|
71
|
+
if (!fs.existsSync(cssFilePath)) {
|
|
72
|
+
throw new Error(`File not found: ${cssFilePath}`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (path.extname(cssFilePath) === '.js') {
|
|
76
|
+
const dir = path.dirname(cssFilePath);
|
|
77
|
+
const indexCssFile = path.join(dir, 'index.css');
|
|
78
|
+
if (fs.existsSync(indexCssFile)) {
|
|
79
|
+
cssFilePath = indexCssFile;
|
|
80
|
+
} else {
|
|
81
|
+
throw new Error('No CSS index file found');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return fs.readFileSync(cssFilePath).toString();
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error(`Failed to load CSS from ${pkgOrPath}.`, error);
|
|
88
|
+
delete includedThemes[includedThemes.indexOf(pkgOrPath)];
|
|
89
|
+
return '';
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
.join('\n');
|
|
93
|
+
|
|
94
|
+
if (debug && includedThemes.length > 0)
|
|
95
|
+
console.log(
|
|
96
|
+
'\x1b[32m%s\x1b[0m',
|
|
97
|
+
`🎨 Including theme${includedThemes.length > 1 ? 's' : ''}:`,
|
|
98
|
+
'\x1b[0m',
|
|
99
|
+
'' + includedThemes.join(', ')
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
return css;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Process CSS into a CSS-in-JS object.
|
|
107
|
+
* @param {string} css - The CSS content to process.
|
|
108
|
+
* @returns {object} - The merged CSS-in-JS object.
|
|
109
|
+
*/
|
|
110
|
+
function processCss(css) {
|
|
111
|
+
try {
|
|
112
|
+
const { plugins, options } = postcssrc.sync({}, __dirname);
|
|
113
|
+
const processedCss = postcss(plugins).process(css, options).result.root;
|
|
114
|
+
return postcssJs.objectify(processedCss);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.error('Failed to process CSS.', error);
|
|
117
|
+
return {};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
module.exports = getThemeBaseStyle;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"accordion__section-heading": {
|
|
3
|
-
"font-size": {
|
|
4
|
-
"xs": "var(--text-lg)",
|
|
5
|
-
"md": "var(--text-xl)"
|
|
6
|
-
}
|
|
7
|
-
},
|
|
8
|
-
"accordion__section-summary": {
|
|
9
|
-
"background": {
|
|
10
|
-
"xs": "var(--color-base-100)"
|
|
11
|
-
},
|
|
12
|
-
"background-hover": {
|
|
13
|
-
"xs": "var(--color-base-200)"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"back-to-top-link": {
|
|
3
|
-
"color": {
|
|
4
|
-
"xs": "var(--color-link)"
|
|
5
|
-
},
|
|
6
|
-
"color-active": {
|
|
7
|
-
"xs": "var(--color-link-active)"
|
|
8
|
-
},
|
|
9
|
-
"color-hover": {
|
|
10
|
-
"xs": "var(--color-link-hover)"
|
|
11
|
-
},
|
|
12
|
-
"padding": {
|
|
13
|
-
"xs": "0px"
|
|
14
|
-
},
|
|
15
|
-
"font-size": {
|
|
16
|
-
"xs": "var(--text-base)",
|
|
17
|
-
"md": "var(--text-lg)"
|
|
18
|
-
},
|
|
19
|
-
"line-height": {
|
|
20
|
-
"xs": "var(--line-h-base)",
|
|
21
|
-
"md": "var(--line-h-lg)"
|
|
22
|
-
},
|
|
23
|
-
"letter-spacing": {
|
|
24
|
-
"xs": "var(--letter-spacing-normal)"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"backgroundColor": "gray",
|
|
3
|
-
"backgroundContrastRatios": [
|
|
4
|
-
1, 1.19, 1.6, 2.11, 2.87, 3.9, 5.3, 7.91, 12.13, 14.74, 18, 21
|
|
5
|
-
],
|
|
6
|
-
"colors": {
|
|
7
|
-
"dynamic": {
|
|
8
|
-
"gray": ["#6c6a71", "#252930"],
|
|
9
|
-
"red": ["#b60202"],
|
|
10
|
-
"orange": ["#ff9900"],
|
|
11
|
-
"green": ["#10874c", "#006636"],
|
|
12
|
-
"blue": ["#00b0f0", "#0149a7"],
|
|
13
|
-
"purple": ["#9B69E2", "#4c2b91"]
|
|
14
|
-
},
|
|
15
|
-
"static": {
|
|
16
|
-
"yellow": "#ffdd00"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"contrastRatios": [2.39, 3.1, 4.54, 5.65, 7, 10.2, 12.13],
|
|
20
|
-
"brandColors": {
|
|
21
|
-
"primary": "#003375",
|
|
22
|
-
"secondary": "#00b0f0",
|
|
23
|
-
"tertiary": "#0065b3"
|
|
24
|
-
},
|
|
25
|
-
"defaultTheme": "light",
|
|
26
|
-
"themes": {
|
|
27
|
-
"default": {
|
|
28
|
-
"base": {
|
|
29
|
-
"100": ["gray", "100"],
|
|
30
|
-
"200": ["gray", "200"],
|
|
31
|
-
"300": ["gray", "300"],
|
|
32
|
-
"400": ["gray", "400"],
|
|
33
|
-
"500": ["gray", "500"],
|
|
34
|
-
"600": ["gray", "600"],
|
|
35
|
-
"700": ["gray", "700"],
|
|
36
|
-
"800": ["gray", "800"],
|
|
37
|
-
"900": ["gray", "900"],
|
|
38
|
-
"1000": ["gray", "1000"],
|
|
39
|
-
"1100": ["gray", "1100"],
|
|
40
|
-
"content": ["gray", "1000"],
|
|
41
|
-
"content-secondary": ["gray", "700"],
|
|
42
|
-
"content-invert": ["gray", "100"]
|
|
43
|
-
},
|
|
44
|
-
"accent": {
|
|
45
|
-
"default": ["gray", "1000"],
|
|
46
|
-
"focus": ["gray", "900"],
|
|
47
|
-
"content": ["gray", "100"]
|
|
48
|
-
},
|
|
49
|
-
"focus": {
|
|
50
|
-
"default": ["yellow", "100"]
|
|
51
|
-
},
|
|
52
|
-
"error": {
|
|
53
|
-
"default": ["red", "500"],
|
|
54
|
-
"hover": ["red", "600"],
|
|
55
|
-
"text": ["red", "500"]
|
|
56
|
-
},
|
|
57
|
-
"success": {
|
|
58
|
-
"default": ["green", "500"],
|
|
59
|
-
"hover": ["green", "600"]
|
|
60
|
-
},
|
|
61
|
-
"link": {
|
|
62
|
-
"default": ["blue", "500"],
|
|
63
|
-
"hover": ["blue", "600"],
|
|
64
|
-
"active": ["gray", "1000"],
|
|
65
|
-
"visited": ["purple", "600"]
|
|
66
|
-
},
|
|
67
|
-
"warning": { "default": ["orange", "100"] },
|
|
68
|
-
"info": {
|
|
69
|
-
"default": ["blue", "400"],
|
|
70
|
-
"hover": ["blue", "500"]
|
|
71
|
-
},
|
|
72
|
-
"footer": {
|
|
73
|
-
"default": [
|
|
74
|
-
"blue",
|
|
75
|
-
"500"
|
|
76
|
-
],
|
|
77
|
-
"hover": [
|
|
78
|
-
"blue",
|
|
79
|
-
"600"
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
|
-
"white": { "default": ["gray", "100"] },
|
|
83
|
-
"black": { "default": ["gray", "1200"] }
|
|
84
|
-
},
|
|
85
|
-
"light": {
|
|
86
|
-
"_config": {
|
|
87
|
-
"lightness": 100,
|
|
88
|
-
"fgColor": "#0D0F15"
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"dark": {
|
|
92
|
-
"_config": {
|
|
93
|
-
"lightness": 6,
|
|
94
|
-
"fgColor": "#F5F5F6"
|
|
95
|
-
},
|
|
96
|
-
"error": {
|
|
97
|
-
"default": ["red", "200"],
|
|
98
|
-
"hover": ["red", "300"],
|
|
99
|
-
"text": ["red", "300"]
|
|
100
|
-
},
|
|
101
|
-
"success": {
|
|
102
|
-
"default": ["green", "200"],
|
|
103
|
-
"hover": ["green", "300"]
|
|
104
|
-
},
|
|
105
|
-
"link": {
|
|
106
|
-
"default": ["blue", "400"],
|
|
107
|
-
"hover": ["blue", "500"],
|
|
108
|
-
"active": ["blue", "100"],
|
|
109
|
-
"visited": ["purple", "300"]
|
|
110
|
-
},
|
|
111
|
-
"warning": { "default": ["orange", "500"] },
|
|
112
|
-
"info": {
|
|
113
|
-
"default": ["blue", "300"],
|
|
114
|
-
"hover": ["blue", "400"]
|
|
115
|
-
},
|
|
116
|
-
"white": { "default": ["gray", "1200"] },
|
|
117
|
-
"black": { "default": ["gray", "100"] }
|
|
118
|
-
},
|
|
119
|
-
"darker": {
|
|
120
|
-
"_config": {
|
|
121
|
-
"lightness": 0,
|
|
122
|
-
"fgColor": "#EAEAEB"
|
|
123
|
-
},
|
|
124
|
-
"error": {
|
|
125
|
-
"default": ["red", "300"],
|
|
126
|
-
"hover": ["red", "400"]
|
|
127
|
-
},
|
|
128
|
-
"success": {
|
|
129
|
-
"default": ["green", "300"],
|
|
130
|
-
"hover": ["green", "400"]
|
|
131
|
-
},
|
|
132
|
-
"link": {
|
|
133
|
-
"default": ["blue", "400"],
|
|
134
|
-
"hover": ["blue", "500"],
|
|
135
|
-
"active": ["blue", "100"],
|
|
136
|
-
"visited": ["purple", "300"]
|
|
137
|
-
},
|
|
138
|
-
"warning": { "default": ["orange", "500"] },
|
|
139
|
-
"info": {
|
|
140
|
-
"default": ["blue", "200"],
|
|
141
|
-
"hover": ["blue", "300"]
|
|
142
|
-
},
|
|
143
|
-
"white": { "default": ["gray", "1200"] },
|
|
144
|
-
"black": { "default": ["gray", "100"] }
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
package/defaultTheme/button.json
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"btn": {
|
|
3
|
-
"border-radius": {
|
|
4
|
-
"xs": "0px"
|
|
5
|
-
},
|
|
6
|
-
"padding-y": {
|
|
7
|
-
"xs": "0.5rem",
|
|
8
|
-
"print": "0.5rem"
|
|
9
|
-
},
|
|
10
|
-
"padding-x": {
|
|
11
|
-
"xs": "1.25rem",
|
|
12
|
-
"print": "1rem"
|
|
13
|
-
},
|
|
14
|
-
"letter-spacing": {
|
|
15
|
-
"xs": "var(--letter-spacing-wide)"
|
|
16
|
-
},
|
|
17
|
-
"font-size": {
|
|
18
|
-
"xs": "var(--text-base)",
|
|
19
|
-
"md": "var(--text-lg)"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"btn-cta": {
|
|
23
|
-
"font-size": {
|
|
24
|
-
"xs": "var(--text-lg)",
|
|
25
|
-
"md": "var(--text-xl)"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"btn-primary": {
|
|
29
|
-
"background-color": {
|
|
30
|
-
"xs": "var(--color-success)",
|
|
31
|
-
"print": "var(--color-white)"
|
|
32
|
-
},
|
|
33
|
-
"color": {
|
|
34
|
-
"xs": "var(--color-white)",
|
|
35
|
-
"print": "var(--color-base-content)"
|
|
36
|
-
},
|
|
37
|
-
"background-color-hover": {
|
|
38
|
-
"xs": "var(--color-success-hover)"
|
|
39
|
-
},
|
|
40
|
-
"color-hover": {
|
|
41
|
-
"xs": "var(--color-white)"
|
|
42
|
-
},
|
|
43
|
-
"background-color-active": {
|
|
44
|
-
"xs": "var(--color-success-hover)"
|
|
45
|
-
},
|
|
46
|
-
"box-shadow": {
|
|
47
|
-
"xs": "0 2px 0 var(--color-base-content)"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"btn-secondary": {
|
|
51
|
-
"background-color": {
|
|
52
|
-
"xs": "var(--color-base-300)",
|
|
53
|
-
"print": "var(--color-white)"
|
|
54
|
-
},
|
|
55
|
-
"color": {
|
|
56
|
-
"xs": "var(--color-base-content)",
|
|
57
|
-
"print": "var(--color-base-content)"
|
|
58
|
-
},
|
|
59
|
-
"background-color-hover": {
|
|
60
|
-
"xs": "var(--color-base-400)"
|
|
61
|
-
},
|
|
62
|
-
"color-hover": {
|
|
63
|
-
"xs": "var(--color-base-content)"
|
|
64
|
-
},
|
|
65
|
-
"background-color-active": {
|
|
66
|
-
"xs": "var(--color-base-500)"
|
|
67
|
-
},
|
|
68
|
-
"box-shadow": {
|
|
69
|
-
"xs": "0 2px 0 var(--color-base-500)"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"btn-warning": {
|
|
73
|
-
"background-color": {
|
|
74
|
-
"xs": "var(--color-error)",
|
|
75
|
-
"print": "var(--color-white)"
|
|
76
|
-
},
|
|
77
|
-
"color": {
|
|
78
|
-
"xs": "var(--color-white)",
|
|
79
|
-
"print": "var(--color-base-content)"
|
|
80
|
-
},
|
|
81
|
-
"background-color-hover": {
|
|
82
|
-
"xs": "var(--color-error-hover)"
|
|
83
|
-
},
|
|
84
|
-
"color-hover": {
|
|
85
|
-
"xs": "var(--color-white)"
|
|
86
|
-
},
|
|
87
|
-
"background-color-active": {
|
|
88
|
-
"xs": "var(--color-error-hover)"
|
|
89
|
-
},
|
|
90
|
-
"box-shadow": {
|
|
91
|
-
"xs": "0 2px 0 var(--color-base-content)"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
package/defaultTheme/card.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"card__content": {
|
|
3
|
-
"font-size": {
|
|
4
|
-
"xs": "var(--text-sm)",
|
|
5
|
-
"md": "var(--text-base)"
|
|
6
|
-
},
|
|
7
|
-
"line-height": {
|
|
8
|
-
"xs": "var(--line-h-sm)",
|
|
9
|
-
"md": "var(--line-h-base)"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"card": {
|
|
13
|
-
"border-radius": {
|
|
14
|
-
"xs": "var(--border-radius-lg)"
|
|
15
|
-
},
|
|
16
|
-
"background-color": {
|
|
17
|
-
"xs": "var(--color-base-100)"
|
|
18
|
-
},
|
|
19
|
-
"padding": {
|
|
20
|
-
"xs": "0"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
package/defaultTheme/form.json
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"fieldset__legend": {
|
|
3
|
-
"margin-bottom": {
|
|
4
|
-
"xs": "1rem"
|
|
5
|
-
},
|
|
6
|
-
"font-weight": {
|
|
7
|
-
"xs": "700"
|
|
8
|
-
},
|
|
9
|
-
"letter-spacing": {
|
|
10
|
-
"xs": "var(--letter-spacing-normal)"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"fieldset__legend--xl": {
|
|
14
|
-
"font-size": {
|
|
15
|
-
"xs": "var(--text-3xl)",
|
|
16
|
-
"md": "var(--text-5xl)"
|
|
17
|
-
},
|
|
18
|
-
"line-height": {
|
|
19
|
-
"xs": "var(--line-h-3xl)",
|
|
20
|
-
"md": "var(--line-h-5xl)"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"fieldset__legend--lg": {
|
|
24
|
-
"font-size": {
|
|
25
|
-
"xs": "var(--text-2xl)",
|
|
26
|
-
"md": "var(--text-4xl)"
|
|
27
|
-
},
|
|
28
|
-
"line-height": {
|
|
29
|
-
"xs": "var(--line-h-2xl)",
|
|
30
|
-
"md": "var(--line-h-4xl)"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"fieldset__legend--md": {
|
|
34
|
-
"font-size": {
|
|
35
|
-
"xs": "var(--text-xl)",
|
|
36
|
-
"md": "var(--text-2xl)"
|
|
37
|
-
},
|
|
38
|
-
"line-height": {
|
|
39
|
-
"xs": "var(--line-h-xl)",
|
|
40
|
-
"md": "var(--line-h-2xl)"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"fieldset__legend--sm": {
|
|
44
|
-
"font-size": {
|
|
45
|
-
"xs": "var(--text-base)",
|
|
46
|
-
"md": "var(--text-lg)"
|
|
47
|
-
},
|
|
48
|
-
"line-height": {
|
|
49
|
-
"xs": "var(--line-h-base)",
|
|
50
|
-
"md": "var(--line-h-lg)"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"label": {
|
|
54
|
-
"font-size": {
|
|
55
|
-
"xs": "var(--text-base)",
|
|
56
|
-
"md": "var(--text-lg)"
|
|
57
|
-
},
|
|
58
|
-
"line-height": {
|
|
59
|
-
"xs": "var(--line-h-base)",
|
|
60
|
-
"md": "var(--line-h-lg)"
|
|
61
|
-
},
|
|
62
|
-
"letter-spacing": {
|
|
63
|
-
"xs": "var(--letter-spacing-normal)"
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"label__title": {
|
|
67
|
-
"margin-bottom": {
|
|
68
|
-
"xs": "0rem"
|
|
69
|
-
},
|
|
70
|
-
"font-weight": {
|
|
71
|
-
"xs": "700"
|
|
72
|
-
},
|
|
73
|
-
"letter-spacing": {
|
|
74
|
-
"xs": "var(--letter-spacing-normal)"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"label__title--xl": {
|
|
78
|
-
"font-size": {
|
|
79
|
-
"xs": "var(--text-3xl)",
|
|
80
|
-
"md": "var(--text-5xl)"
|
|
81
|
-
},
|
|
82
|
-
"line-height": {
|
|
83
|
-
"xs": "var(--line-h-3xl)",
|
|
84
|
-
"md": "var(--line-h-5xl)"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
"label__title--lg": {
|
|
88
|
-
"font-size": {
|
|
89
|
-
"xs": "var(--text-2xl)",
|
|
90
|
-
"md": "var(--text-4xl)"
|
|
91
|
-
},
|
|
92
|
-
"line-height": {
|
|
93
|
-
"xs": "var(--line-h-2xl)",
|
|
94
|
-
"md": "var(--line-h-4xl)"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"label__title--md": {
|
|
98
|
-
"font-size": {
|
|
99
|
-
"xs": "var(--text-xl)",
|
|
100
|
-
"md": "var(--text-2xl)"
|
|
101
|
-
},
|
|
102
|
-
"line-height": {
|
|
103
|
-
"xs": "var(--line-h-xl)",
|
|
104
|
-
"md": "var(--line-h-2xl)"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"label__title--sm": {
|
|
108
|
-
"font-size": {
|
|
109
|
-
"xs": "var(--text-base)",
|
|
110
|
-
"md": "var(--text-lg)"
|
|
111
|
-
},
|
|
112
|
-
"line-height": {
|
|
113
|
-
"xs": "var(--line-h-base)",
|
|
114
|
-
"md": "var(--line-h-lg)"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
"input": {
|
|
118
|
-
"border-radius": {
|
|
119
|
-
"xs": "var(--border-radius-md)"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"textarea": {
|
|
123
|
-
"border-radius": {
|
|
124
|
-
"xs": "var(--border-radius-md)"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"select": {
|
|
128
|
-
"border-radius": {
|
|
129
|
-
"xs": "var(--border-radius-md)"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
"text-sm-default": "0.875rem",
|
|
4
|
-
"text-base-default": "1rem",
|
|
5
|
-
"text-lg-default": "1.1875rem",
|
|
6
|
-
"text-xl-default": "1.25rem",
|
|
7
|
-
"text-2xl-default": "1.5rem",
|
|
8
|
-
"text-3xl-default": "1.875rem",
|
|
9
|
-
"text-4xl-default": "2.25rem",
|
|
10
|
-
"text-5xl-default": "3rem",
|
|
11
|
-
|
|
12
|
-
"text-sm-large": "1rem",
|
|
13
|
-
"text-base-large": "1.25rem",
|
|
14
|
-
"text-lg-large": "1.4rem",
|
|
15
|
-
"text-xl-large": "1.6rem",
|
|
16
|
-
"text-2xl-large": "1.875rem",
|
|
17
|
-
"text-3xl-large": "2.25rem",
|
|
18
|
-
"text-4xl-large": "2.5rem",
|
|
19
|
-
"text-5xl-large": "3rem",
|
|
20
|
-
|
|
21
|
-
"text-sm": "var(--text-sm-default)",
|
|
22
|
-
"text-base": "var(--text-base-default)",
|
|
23
|
-
"text-lg": "var(--text-lg-default)",
|
|
24
|
-
"text-xl": "var(--text-xl-default)",
|
|
25
|
-
"text-2xl": "var(--text-2xl-default)",
|
|
26
|
-
"text-3xl": "var(--text-3xl-default)",
|
|
27
|
-
"text-4xl": "var(--text-4xl-default)",
|
|
28
|
-
"text-5xl": "var(--text-5xl-default)",
|
|
29
|
-
|
|
30
|
-
"line-h-sm-default": "1.375",
|
|
31
|
-
"line-h-base-default": "1.375",
|
|
32
|
-
"line-h-lg-default": "1.375",
|
|
33
|
-
"line-h-xl-default": "1.25",
|
|
34
|
-
"line-h-2xl-default": "1.25",
|
|
35
|
-
"line-h-3xl-default": "1.25",
|
|
36
|
-
"line-h-4xl-default": "1.25",
|
|
37
|
-
"line-h-5xl-default": "1.25",
|
|
38
|
-
|
|
39
|
-
"line-h-sm-large": "2",
|
|
40
|
-
"line-h-base-large": "2",
|
|
41
|
-
"line-h-lg-large": "2",
|
|
42
|
-
"line-h-xl-large": "1.75",
|
|
43
|
-
"line-h-2xl-large": "1.75",
|
|
44
|
-
"line-h-3xl-large": "1.5",
|
|
45
|
-
"line-h-4xl-large": "1.5",
|
|
46
|
-
"line-h-5xl-large": "1.25",
|
|
47
|
-
|
|
48
|
-
"line-h-sm": "var(--line-h-sm-default)",
|
|
49
|
-
"line-h-base": "var(--line-h-base-default)",
|
|
50
|
-
"line-h-lg": "var(--line-h-lg-default)",
|
|
51
|
-
"line-h-xl": "var(--line-h-xl-default)",
|
|
52
|
-
"line-h-2xl": "var(--line-h-2xl-default)",
|
|
53
|
-
"line-h-3xl": "var(--line-h-3xl-default)",
|
|
54
|
-
"line-h-4xl": "var(--line-h-4xl-default)",
|
|
55
|
-
"line-h-5xl": "var(--line-h-5xl-default)",
|
|
56
|
-
|
|
57
|
-
"letter-spacing-normal-default": "normal",
|
|
58
|
-
"letter-spacing-wide-default": "0.025rem",
|
|
59
|
-
"letter-spacing-wider-default": "0.05rem",
|
|
60
|
-
"letter-spacing-widest-default": "0.075rem",
|
|
61
|
-
|
|
62
|
-
"letter-spacing-normal-extra": "0.05rem",
|
|
63
|
-
"letter-spacing-wide-extra": "0.075rem",
|
|
64
|
-
"letter-spacing-wider-extra": "0.01rem",
|
|
65
|
-
"letter-spacing-widest-extra": "0.125rem",
|
|
66
|
-
|
|
67
|
-
"letter-spacing-normal": "var(--letter-spacing-normal-default)",
|
|
68
|
-
"letter-spacing-wide": "var(--letter-spacing-wide-default)",
|
|
69
|
-
"letter-spacing-wider": "var(--letter-spacing-wider-default)",
|
|
70
|
-
"letter-spacing-widest": "var(--letter-spacing-widest-default)",
|
|
71
|
-
|
|
72
|
-
"border-radius-md": "0px",
|
|
73
|
-
"border-radius-lg": "0px",
|
|
74
|
-
|
|
75
|
-
"color-footer-link": "var(--color-link)",
|
|
76
|
-
"color-footer-link-hover": "var(--color-link-hover)",
|
|
77
|
-
|
|
78
|
-
"color-header-text": "var(--color-white)",
|
|
79
|
-
"color-header-text-hover": "var(--color-white)"
|
|
80
|
-
|
|
81
|
-
}
|
package/defaultTheme/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const extractFromLeo = require("../leoTheme");
|
|
2
|
-
const brandConfig = require("./brandConfig.json");
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
name: "light",
|
|
6
|
-
variables: {
|
|
7
|
-
globals: {
|
|
8
|
-
...require("./globals.json"),
|
|
9
|
-
},
|
|
10
|
-
components: {
|
|
11
|
-
...require("./accordion.json"),
|
|
12
|
-
...require("./breadcrumbs.json"),
|
|
13
|
-
...require("./back-to-top.json"),
|
|
14
|
-
...require("./button.json"),
|
|
15
|
-
...require("./card.json"),
|
|
16
|
-
...require("./form.json"),
|
|
17
|
-
...require("./layout.json"),
|
|
18
|
-
...require("./misc.json"),
|
|
19
|
-
...require("./panel.json"),
|
|
20
|
-
...require("./phase-banner.json"),
|
|
21
|
-
...require("./radios.json"),
|
|
22
|
-
...require("./summary-list.json"),
|
|
23
|
-
...require("./typography.json"),
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
colors: extractFromLeo(brandConfig, "light"),
|
|
27
|
-
};
|