@servicetitan/hammer-token 0.0.0-rc-20250807234739
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/.turbo/turbo-build.log +37 -0
- package/CHANGELOG.md +385 -0
- package/build/web/core/component-variables.scss +139 -0
- package/build/web/core/component.js +645 -0
- package/build/web/core/component.scss +69 -0
- package/build/web/core/css-utils/a2-border.css +53 -0
- package/build/web/core/css-utils/a2-color.css +235 -0
- package/build/web/core/css-utils/a2-font.css +49 -0
- package/build/web/core/css-utils/a2-spacing.css +483 -0
- package/build/web/core/css-utils/a2-utils.css +785 -0
- package/build/web/core/css-utils/border.css +53 -0
- package/build/web/core/css-utils/color.css +235 -0
- package/build/web/core/css-utils/font.css +49 -0
- package/build/web/core/css-utils/spacing.css +483 -0
- package/build/web/core/css-utils/utils.css +785 -0
- package/build/web/core/index.js +5 -0
- package/build/web/core/primitive-variables.scss +126 -0
- package/build/web/core/primitive.js +124 -0
- package/build/web/core/primitive.scss +124 -0
- package/build/web/core/raw.js +229 -0
- package/build/web/core/semantic-variables.scss +246 -0
- package/build/web/core/semantic.js +911 -0
- package/build/web/core/semantic.scss +137 -0
- package/build/web/index.d.ts +4 -0
- package/build/web/index.js +3 -0
- package/config.js +504 -0
- package/eslint.config.mjs +4 -0
- package/package.json +25 -0
- package/src/global/primitive/breakpoint.js +19 -0
- package/src/global/primitive/color.js +231 -0
- package/src/global/primitive/duration.js +16 -0
- package/src/global/primitive/font.js +60 -0
- package/src/global/primitive/radius.js +31 -0
- package/src/global/primitive/size.js +55 -0
- package/src/global/primitive/transition.js +16 -0
- package/src/theme/core/background.js +170 -0
- package/src/theme/core/border.js +103 -0
- package/src/theme/core/charts.js +439 -0
- package/src/theme/core/component/button.js +708 -0
- package/src/theme/core/component/checkbox.js +405 -0
- package/src/theme/core/focus.js +35 -0
- package/src/theme/core/foreground.js +148 -0
- package/src/theme/core/overlay.js +137 -0
- package/src/theme/core/shadow.js +29 -0
- package/src/theme/core/status.js +49 -0
- package/src/theme/core/typography.js +82 -0
- package/src/utils/copy-css-utils-cli.js +37 -0
- package/src/utils/css-utils-format-utils.js +267 -0
- package/type/types.ts +341 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
2
|
+
const { color } = require("../../global/primitive/color");
|
|
3
|
+
const { size } = require("../../global/primitive/size");
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
shadow: {
|
|
7
|
+
color: {
|
|
8
|
+
value: `${color.neutral["400"].value}14`,
|
|
9
|
+
attributes: {
|
|
10
|
+
appearance: {
|
|
11
|
+
dark: {
|
|
12
|
+
value: `${color.neutral["0"].value}14`,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
flat: {
|
|
19
|
+
value: `${size["0"].value} ${size["0"].value} ${size["0"].value}`,
|
|
20
|
+
},
|
|
21
|
+
float: {
|
|
22
|
+
value: `${size["0"].value} ${size.half.value} ${size["2"].value}`,
|
|
23
|
+
},
|
|
24
|
+
overlay: {
|
|
25
|
+
value: `${size["0"].value} ${size["2"].value} ${size["6"].value}`,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
2
|
+
const { color } = require("../../global/primitive/color");
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
status: {
|
|
6
|
+
color: {
|
|
7
|
+
info: {
|
|
8
|
+
value: color.blue["500"].value,
|
|
9
|
+
attributes: {
|
|
10
|
+
appearance: {
|
|
11
|
+
dark: {
|
|
12
|
+
value: color.blue["300"].value,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
danger: {
|
|
18
|
+
value: color.red["500"].value,
|
|
19
|
+
attributes: {
|
|
20
|
+
appearance: {
|
|
21
|
+
dark: {
|
|
22
|
+
value: color.red["300"].value,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
success: {
|
|
28
|
+
value: color.green["500"].value,
|
|
29
|
+
attributes: {
|
|
30
|
+
appearance: {
|
|
31
|
+
dark: {
|
|
32
|
+
value: color.green["300"].value,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
warning: {
|
|
38
|
+
value: color.yellow["500"].value,
|
|
39
|
+
attributes: {
|
|
40
|
+
appearance: {
|
|
41
|
+
dark: {
|
|
42
|
+
value: color.yellow["300"].value,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
2
|
+
const { font } = require("../../global/primitive/font");
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
typography: {
|
|
6
|
+
paragraph: {
|
|
7
|
+
size: {
|
|
8
|
+
xsmall: {
|
|
9
|
+
value: font.size["200"].value,
|
|
10
|
+
},
|
|
11
|
+
small: {
|
|
12
|
+
value: font.size["300"].value,
|
|
13
|
+
},
|
|
14
|
+
default: {
|
|
15
|
+
value: font.size["400"].value,
|
|
16
|
+
},
|
|
17
|
+
large: {
|
|
18
|
+
value: font.size["500"].value,
|
|
19
|
+
},
|
|
20
|
+
xlarge: {
|
|
21
|
+
value: font.size["600"].value,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
"font-weight": {
|
|
25
|
+
value: font.weight.normal.value,
|
|
26
|
+
},
|
|
27
|
+
"font-family": {
|
|
28
|
+
value: font.family.base.value,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
heading: {
|
|
32
|
+
size: {
|
|
33
|
+
xsmall: {
|
|
34
|
+
value: font.size["300"].value,
|
|
35
|
+
},
|
|
36
|
+
small: {
|
|
37
|
+
value: font.size["400"].value,
|
|
38
|
+
},
|
|
39
|
+
default: {
|
|
40
|
+
value: font.size["500"].value,
|
|
41
|
+
},
|
|
42
|
+
large: {
|
|
43
|
+
value: font.size["600"].value,
|
|
44
|
+
},
|
|
45
|
+
xlarge: {
|
|
46
|
+
value: font.size["800"].value,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
"font-weight": {
|
|
50
|
+
value: font.weight.bold.value,
|
|
51
|
+
},
|
|
52
|
+
"font-family": {
|
|
53
|
+
value: font.family.display.value,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
label: {
|
|
57
|
+
size: {
|
|
58
|
+
xsmall: {
|
|
59
|
+
value: font.size["100"].value,
|
|
60
|
+
},
|
|
61
|
+
small: {
|
|
62
|
+
value: font.size["200"].value,
|
|
63
|
+
},
|
|
64
|
+
default: {
|
|
65
|
+
value: font.size["300"].value,
|
|
66
|
+
},
|
|
67
|
+
large: {
|
|
68
|
+
value: font.size["400"].value,
|
|
69
|
+
},
|
|
70
|
+
xlarge: {
|
|
71
|
+
value: font.size["500"].value,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
"font-weight": {
|
|
75
|
+
value: font.weight.semibold.value,
|
|
76
|
+
},
|
|
77
|
+
"font-family": {
|
|
78
|
+
value: font.family.base.value,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
3
|
+
const { program } = require("commander");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
|
|
7
|
+
function run() {
|
|
8
|
+
program
|
|
9
|
+
.command("copy-css-utils")
|
|
10
|
+
.description("Copy the CSS Utils files from hammer-token into your project")
|
|
11
|
+
.argument("<string>", "directory to copy CSS utils files to")
|
|
12
|
+
.action((dir) => {
|
|
13
|
+
console.log(`Copying CSS Utils files to: ${dir}`);
|
|
14
|
+
const cssUtilsFilesPathString = path.resolve(
|
|
15
|
+
__dirname,
|
|
16
|
+
"../../build/web/core/css-utils",
|
|
17
|
+
);
|
|
18
|
+
fs.cpSync(cssUtilsFilesPathString, dir, { recursive: true });
|
|
19
|
+
const copiedFiles = fs.readdirSync(dir, { encoding: "utf-8" });
|
|
20
|
+
copiedFiles.forEach((file) => {
|
|
21
|
+
const fileWithDir = `${dir}/${file}`;
|
|
22
|
+
fs.readFile(fileWithDir, "utf-8", (err, contents) => {
|
|
23
|
+
if (err) {
|
|
24
|
+
return console.error(err);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
fs.writeFile(fileWithDir, contents, "utf-8", (e) => {
|
|
28
|
+
if (e) console.log(e);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
program.parse();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
run();
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
const cssUtilsFormatter = (
|
|
2
|
+
dictionary,
|
|
3
|
+
generateFn,
|
|
4
|
+
{ hasDark, prefix = "" },
|
|
5
|
+
) => {
|
|
6
|
+
const result = dictionary.allTokens
|
|
7
|
+
.filter((token) => token.name.includes("color"))
|
|
8
|
+
.map((token) => {
|
|
9
|
+
const value = getVarValue(dictionary, token);
|
|
10
|
+
const name = `${token.name.replace("Default", "")}`;
|
|
11
|
+
|
|
12
|
+
if (hasDark && token.attributes.appearance) {
|
|
13
|
+
const darkValue = getVarValue(dictionary, token, { isDark: true });
|
|
14
|
+
return generateFn(name, value, { darkValue, prefix });
|
|
15
|
+
}
|
|
16
|
+
return generateFn(name, value, { prefix });
|
|
17
|
+
})
|
|
18
|
+
.flat()
|
|
19
|
+
.map((t) => `${t}`)
|
|
20
|
+
.sort((a, b) => a.localeCompare(b))
|
|
21
|
+
.join(`\n`);
|
|
22
|
+
|
|
23
|
+
const fallback = dictionary.allTokens
|
|
24
|
+
.map((token) => {
|
|
25
|
+
const value = getVarValue(dictionary, token);
|
|
26
|
+
const name = `${token.name.replace("Default", "")}`;
|
|
27
|
+
return generateFn(name, value, { prefix });
|
|
28
|
+
})
|
|
29
|
+
.flat()
|
|
30
|
+
.map((t) => `${t}`)
|
|
31
|
+
.sort((a, b) => a.localeCompare(b))
|
|
32
|
+
.join(`\n`);
|
|
33
|
+
|
|
34
|
+
return `@layer starter, reset, base, state, application;
|
|
35
|
+
|
|
36
|
+
${fallback}
|
|
37
|
+
${
|
|
38
|
+
result.length > 0
|
|
39
|
+
? `\n@supports (color: light-dark(#fff, #000)) {
|
|
40
|
+
${result.replaceAll("\n", "\n ")}
|
|
41
|
+
}`
|
|
42
|
+
: ""
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@layer application {
|
|
46
|
+
${fallback.replaceAll("\n", "\n ")}
|
|
47
|
+
${
|
|
48
|
+
result.length > 0
|
|
49
|
+
? `\n @supports (color: light-dark(#fff, #000)) {
|
|
50
|
+
${result.replaceAll("\n", "\n ")}
|
|
51
|
+
}`
|
|
52
|
+
: ""
|
|
53
|
+
}
|
|
54
|
+
}`;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const getNewValueFromRef = (value, ref) => {
|
|
58
|
+
return value.replace(ref.value, function () {
|
|
59
|
+
// fallback for nested vars
|
|
60
|
+
if (ref.name === undefined) {
|
|
61
|
+
return `${ref.value}`;
|
|
62
|
+
} else {
|
|
63
|
+
return `var(--${ref.name}, ${ref.value})`;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const colorHasAlphaValue = (value) => {
|
|
69
|
+
// e.g. var(--something)44 isn't valid
|
|
70
|
+
return /\)[\d]+/.test(value);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Allow for CSS var instead of static value
|
|
75
|
+
*/
|
|
76
|
+
const getVarValue = (dictionary, token, { isDark } = {}) => {
|
|
77
|
+
let value;
|
|
78
|
+
|
|
79
|
+
if (isDark) {
|
|
80
|
+
value = JSON.stringify(token.attributes.appearance.dark.value);
|
|
81
|
+
if (
|
|
82
|
+
dictionary.usesReference(token.original.attributes.appearance.dark.value)
|
|
83
|
+
) {
|
|
84
|
+
const refs = dictionary.getReferences(
|
|
85
|
+
token.original.attributes.appearance.dark.value,
|
|
86
|
+
);
|
|
87
|
+
refs.forEach((ref) => {
|
|
88
|
+
const newValue = getNewValueFromRef(value, ref);
|
|
89
|
+
if (colorHasAlphaValue(newValue) === false) {
|
|
90
|
+
value = newValue;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
} else {
|
|
95
|
+
value = JSON.stringify(token.value);
|
|
96
|
+
if (dictionary.usesReference(token.original.value)) {
|
|
97
|
+
const refs = dictionary.getReferences(token.original.value);
|
|
98
|
+
refs.forEach((ref) => {
|
|
99
|
+
const newValue = getNewValueFromRef(value, ref);
|
|
100
|
+
if (colorHasAlphaValue(newValue) === false) {
|
|
101
|
+
value = newValue;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return value.replaceAll('"', "");
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const removeDefaultFromName = (name) => {
|
|
111
|
+
return name.replace("-default", "");
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const generateBorderClasses = (
|
|
115
|
+
name,
|
|
116
|
+
value,
|
|
117
|
+
{ darkValue, prefix = "" } = {},
|
|
118
|
+
) => {
|
|
119
|
+
const classes = [];
|
|
120
|
+
|
|
121
|
+
if (name.startsWith("border-radius")) {
|
|
122
|
+
classes.push(
|
|
123
|
+
`.${prefix}${name} {border-radius: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
124
|
+
);
|
|
125
|
+
} else if (name.startsWith("border-width")) {
|
|
126
|
+
classes.push(
|
|
127
|
+
`.${prefix}${name} {border-width: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
128
|
+
);
|
|
129
|
+
} else if (name.startsWith("border-color")) {
|
|
130
|
+
if (darkValue) {
|
|
131
|
+
classes.push(
|
|
132
|
+
`.${prefix}${name} {border-color: var(--${removeDefaultFromName(name)}, light-dark(${value}, ${darkValue}))}`,
|
|
133
|
+
);
|
|
134
|
+
} else {
|
|
135
|
+
classes.push(
|
|
136
|
+
`.${prefix}${name} {border-color: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return classes;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const generateColorClasses = (name, value, { darkValue, prefix = "" } = {}) => {
|
|
144
|
+
const classes = [];
|
|
145
|
+
|
|
146
|
+
if (darkValue) {
|
|
147
|
+
if (name.startsWith("background-color")) {
|
|
148
|
+
classes.push(
|
|
149
|
+
`.${prefix}${name.replace("background-color", "bg")} {background-color: var(--${removeDefaultFromName(name)}, light-dark(${value}, ${darkValue}))}`,
|
|
150
|
+
);
|
|
151
|
+
} else if (name.startsWith("foreground-color")) {
|
|
152
|
+
classes.push(
|
|
153
|
+
`.${prefix}${name.replace("foreground-color", "c")} {color: var(--${removeDefaultFromName(name)}, light-dark(${value}, ${darkValue}))}`,
|
|
154
|
+
);
|
|
155
|
+
} else if (name.startsWith("overlay-color")) {
|
|
156
|
+
classes.push(
|
|
157
|
+
`.${prefix}${name.replace("overlay-color", "bg-overlay")} {background-color: var(--${removeDefaultFromName(name)}, light-dark(${value}, ${darkValue}))}`,
|
|
158
|
+
);
|
|
159
|
+
} else if (name.startsWith("status-color")) {
|
|
160
|
+
classes.push(
|
|
161
|
+
`.${prefix}${name.replace("status-color", "c-status")} {color: var(--${removeDefaultFromName(name)}, light-dark(${value}, ${darkValue}))}`,
|
|
162
|
+
`.${prefix}${name.replace("status-color", "bg-status")} {background-color: var(--${removeDefaultFromName(name)}, light-dark(${value}, ${darkValue}))}`,
|
|
163
|
+
);
|
|
164
|
+
if (!name.includes("danger")) {
|
|
165
|
+
classes.push(
|
|
166
|
+
`.${prefix}${name.replace("status-color", "border-color-status")} {border-color: var(--${removeDefaultFromName(name)}, light-dark(${value}, ${darkValue}))}`,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
} else if (name.startsWith("border-color")) {
|
|
170
|
+
classes.push(
|
|
171
|
+
`.${prefix}${name} {border-color: var(--${removeDefaultFromName(name)}, light-dark(${value}, ${darkValue}))}`,
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
if (name.startsWith("background-color")) {
|
|
176
|
+
classes.push(
|
|
177
|
+
`.${prefix}${name.replace("background-color", "bg")} {background-color: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
178
|
+
);
|
|
179
|
+
} else if (name.startsWith("foreground-color")) {
|
|
180
|
+
classes.push(
|
|
181
|
+
`.${prefix}${name.replace("foreground-color", "c")} {color: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
182
|
+
);
|
|
183
|
+
} else if (name.startsWith("overlay-color")) {
|
|
184
|
+
classes.push(
|
|
185
|
+
`.${prefix}${name.replace("overlay-color", "bg-overlay")} {background-color: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
186
|
+
);
|
|
187
|
+
} else if (name.startsWith("status-color")) {
|
|
188
|
+
classes.push(
|
|
189
|
+
`.${prefix}${name.replace("status-color", "c-status")} {color: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
190
|
+
`.${prefix}${name.replace("status-color", "bg-status")} {background-color: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
191
|
+
);
|
|
192
|
+
if (!name.includes("danger")) {
|
|
193
|
+
classes.push(
|
|
194
|
+
`.${prefix}${name.replace("status-color", "border-color-status")} {border-color: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
} else if (name.startsWith("border-color")) {
|
|
198
|
+
classes.push(
|
|
199
|
+
`.${prefix}${name} {border-color: var(--${removeDefaultFromName(name)}, ${value})}`,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return classes;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const generateFontClasses = (name, value, { prefix = "" } = {}) => {
|
|
208
|
+
const classes = [];
|
|
209
|
+
|
|
210
|
+
if (name.startsWith("typography")) {
|
|
211
|
+
if (name.includes("-font-family")) {
|
|
212
|
+
classes.push(
|
|
213
|
+
`.${prefix}${name.replace("typography", "ff").replace("-font-family", "")} {font-family: ${value}}`,
|
|
214
|
+
);
|
|
215
|
+
} else if (name.includes("-font-weight")) {
|
|
216
|
+
classes.push(
|
|
217
|
+
`.${prefix}${name.replace("typography", "fw").replace("-font-weight", "")} {font-weight: ${value}}`,
|
|
218
|
+
);
|
|
219
|
+
} else if (name.includes("-size")) {
|
|
220
|
+
classes.push(
|
|
221
|
+
`.${prefix}${name.replace("typography", "fs").replace("-size", "")} {font-size: ${value}}`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return classes;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
const generateSpacingClasses = (name, value, { prefix = "" } = {}) => {
|
|
230
|
+
const nameWithoutPrefix = name.substring(name.indexOf("-"));
|
|
231
|
+
|
|
232
|
+
const directions = [
|
|
233
|
+
"inline-start",
|
|
234
|
+
"inline-end",
|
|
235
|
+
"block-start",
|
|
236
|
+
"block-end",
|
|
237
|
+
"block",
|
|
238
|
+
"inline",
|
|
239
|
+
];
|
|
240
|
+
const classes = [];
|
|
241
|
+
|
|
242
|
+
directions.forEach((direction) => {
|
|
243
|
+
classes.push(
|
|
244
|
+
`.${prefix}m-${direction}${nameWithoutPrefix} {margin-${direction}: var(--${name}, ${value})}`,
|
|
245
|
+
);
|
|
246
|
+
classes.push(
|
|
247
|
+
`.${prefix}p-${direction}${nameWithoutPrefix} {padding-${direction}: var(--${name}, ${value})}`,
|
|
248
|
+
);
|
|
249
|
+
});
|
|
250
|
+
classes.push(
|
|
251
|
+
`.${prefix}m${nameWithoutPrefix} {margin: var(--${name}, ${value})}`,
|
|
252
|
+
);
|
|
253
|
+
classes.push(
|
|
254
|
+
`.${prefix}p${nameWithoutPrefix} {padding: var(--${name}, ${value})}`,
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
return classes;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
module.exports = {
|
|
261
|
+
cssUtilsFormatter,
|
|
262
|
+
getVarValue,
|
|
263
|
+
generateBorderClasses,
|
|
264
|
+
generateColorClasses,
|
|
265
|
+
generateFontClasses,
|
|
266
|
+
generateSpacingClasses,
|
|
267
|
+
};
|