@jobber/design 1.0.0-alpha.0 → 1.0.0-pre.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.md +46 -0
- package/buildColors.js +15 -0
- package/buildFoundation.js +15 -0
- package/buildIconStyles.js +44 -0
- package/foundation_config/postcss-filter-rules/index.js +17 -0
- package/foundation_config/postcss.config.js +58 -0
- package/package-lock.json +8595 -0
- package/package.json +7 -3
- package/src/Borders.mdx +65 -0
- package/src/Colors.mdx +295 -0
- package/src/Elevations.mdx +107 -0
- package/src/Radii.mdx +40 -0
- package/src/ResponsiveBreakpoints.mdx +48 -0
- package/src/Spacing.mdx +121 -0
- package/src/Typography.mdx +191 -0
- package/src/animation.mdx +82 -0
- package/src/borders.css +6 -0
- package/src/colors.css +178 -0
- package/src/elevations.css +12 -0
- package/src/foundation.css +11 -0
- package/src/icons/Colors.css +187 -0
- package/src/icons/Colors.css.d.ts +51 -0
- package/src/icons/Icon.css +102 -0
- package/src/icons/Icon.css.d.ts +37 -0
- package/src/icons/Sizes.css +14 -0
- package/src/icons/Sizes.css.d.ts +7 -0
- package/src/icons/getIcon.test.ts +73 -0
- package/src/icons/getIcon.ts +116 -0
- package/src/icons/iconMap.ts +430 -0
- package/src/icons/iconStyles.d.ts +262 -0
- package/src/icons/iconStyles.ts +269 -0
- package/src/index.ts +10 -0
- package/src/radii.css +6 -0
- package/src/responsiveBreakpoints.css +3 -0
- package/src/shadows.css +13 -0
- package/src/spacing.css +13 -0
- package/src/styles.css +9 -0
- package/src/timings.css +7 -0
- package/src/typography.css +53 -0
- package/tsconfig.json +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,52 @@ menu: Changelog
|
|
|
8
8
|
All notable changes to this project will be documented in this file.
|
|
9
9
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
10
10
|
|
|
11
|
+
# [1.0.0-pre.0](https://github.com/GetJobber/atlantis/compare/@jobber/design@0.26.0...@jobber/design@1.0.0-pre.0) (2023-01-24)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **design:** BREAKING CHANGE: Implement new typefaces in Atlantis [JOB-46209] ([#952](https://github.com/GetJobber/atlantis/issues/952)) ([15f604c](https://github.com/GetJobber/atlantis/commit/15f604cc51ee6881a5ed9c1be01081c76cf5ce6e))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### BREAKING CHANGES
|
|
20
|
+
|
|
21
|
+
* **design:** Added Jobber Fonts support
|
|
22
|
+
|
|
23
|
+
* Remove file that was needed for major bump in design
|
|
24
|
+
|
|
25
|
+
* Revert "update button styles"
|
|
26
|
+
|
|
27
|
+
This reverts commit d5278133003f4f770af56d583ef104b5abc8b886.
|
|
28
|
+
|
|
29
|
+
* Remove unneeded logging
|
|
30
|
+
|
|
31
|
+
* Update install instructions for non-jobber developers
|
|
32
|
+
|
|
33
|
+
* Changed how package works when being installed to better support non jobber devs.
|
|
34
|
+
|
|
35
|
+
* Use variables in docz instead of a string
|
|
36
|
+
|
|
37
|
+
* Remove change that caused failures for Jobber people
|
|
38
|
+
|
|
39
|
+
* Moved script location
|
|
40
|
+
|
|
41
|
+
* Maybe fix cloudflare builds. Hopefully
|
|
42
|
+
|
|
43
|
+
* Update README.md
|
|
44
|
+
|
|
45
|
+
* Updated prerelease docs.
|
|
46
|
+
Verify fonts aren't bundled with pre-releases.
|
|
47
|
+
|
|
48
|
+
* rebuild cloudflare
|
|
49
|
+
|
|
50
|
+
Co-authored-by: Chris Murray <39704901+chris-at-jobber@users.noreply.github.com>
|
|
51
|
+
Co-authored-by: Michael Paradis <michael.p@getjobber.com>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
11
57
|
# [1.0.0-alpha.0](https://github.com/GetJobber/atlantis/compare/@jobber/design@0.26.0...@jobber/design@1.0.0-alpha.0) (2023-01-24)
|
|
12
58
|
|
|
13
59
|
|
package/buildColors.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const postcss = require("postcss");
|
|
5
|
+
const postcssCustomProperties = require("postcss-custom-properties");
|
|
6
|
+
|
|
7
|
+
const colors = fs.readFileSync("src/colors.css");
|
|
8
|
+
|
|
9
|
+
postcss([
|
|
10
|
+
postcssCustomProperties({
|
|
11
|
+
exportTo: ["colors.js"],
|
|
12
|
+
}),
|
|
13
|
+
])
|
|
14
|
+
.process(colors, { from: undefined })
|
|
15
|
+
.then();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const postcss = require("postcss");
|
|
5
|
+
const postcssCustomProperties = require("postcss-custom-properties");
|
|
6
|
+
|
|
7
|
+
const foundation = fs.readFileSync("./foundation.css");
|
|
8
|
+
|
|
9
|
+
postcss([
|
|
10
|
+
postcssCustomProperties({
|
|
11
|
+
exportTo: ["src/foundation.js"],
|
|
12
|
+
}),
|
|
13
|
+
])
|
|
14
|
+
.process(foundation, { from: undefined })
|
|
15
|
+
.then();
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const postcss = require("postcss");
|
|
7
|
+
const postcssCustomProperties = require("postcss-custom-properties");
|
|
8
|
+
const postcssCalc = require("postcss-calc");
|
|
9
|
+
const transform = require("css-to-react-native-transform").default;
|
|
10
|
+
|
|
11
|
+
const icon = fs.readFileSync("src/icons/Icon.css");
|
|
12
|
+
const size = fs.readFileSync("src/icons/Sizes.css");
|
|
13
|
+
const color = fs.readFileSync("src/icons/Colors.css");
|
|
14
|
+
|
|
15
|
+
const allCss = [icon, size, color].join("\n");
|
|
16
|
+
|
|
17
|
+
postcss([
|
|
18
|
+
postcssCustomProperties({
|
|
19
|
+
preserve: false,
|
|
20
|
+
importFrom: ["foundation.css"],
|
|
21
|
+
}),
|
|
22
|
+
postcssCalc(),
|
|
23
|
+
])
|
|
24
|
+
.process(allCss, { from: undefined })
|
|
25
|
+
.then(function (result) {
|
|
26
|
+
const calculated = transform(result.css);
|
|
27
|
+
const jsonContent =
|
|
28
|
+
"/* This file is automatically generated by buildIconStyle.js and should not be edited. */\n" +
|
|
29
|
+
"export const iconStyles = " +
|
|
30
|
+
JSON.stringify(calculated, undefined, 2);
|
|
31
|
+
|
|
32
|
+
fs.writeFile(
|
|
33
|
+
path.join(__dirname, "src/icons/iconStyles.ts"),
|
|
34
|
+
jsonContent,
|
|
35
|
+
"utf8",
|
|
36
|
+
function (err) {
|
|
37
|
+
if (err) {
|
|
38
|
+
console.log("An error occurred while writing JSON object to File.");
|
|
39
|
+
return console.log(err);
|
|
40
|
+
}
|
|
41
|
+
console.log("JSON file has been saved.");
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
|
|
4
|
+
const postcss = require("postcss");
|
|
5
|
+
|
|
6
|
+
module.exports = postcss.plugin(
|
|
7
|
+
"postcss-filter-rules",
|
|
8
|
+
(opts = { ruleFilters: [] }) => {
|
|
9
|
+
// Work with options here
|
|
10
|
+
|
|
11
|
+
return root => {
|
|
12
|
+
root.nodes.forEach(rule => {
|
|
13
|
+
opts.ruleFilters.forEach(filter => filter(rule));
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
/* eslint-env node */
|
|
3
|
+
|
|
4
|
+
const postcssCustomProperties = require("postcss-custom-properties");
|
|
5
|
+
const postcssImport = require("postcss-import");
|
|
6
|
+
const postcssCopy = require("postcss-copy");
|
|
7
|
+
const removeRule = require("./postcss-filter-rules");
|
|
8
|
+
|
|
9
|
+
let maintainPath;
|
|
10
|
+
let hasJobberFonts = false;
|
|
11
|
+
try {
|
|
12
|
+
({ maintainPath } = require("@jobber/fonts"));
|
|
13
|
+
hasJobberFonts = true;
|
|
14
|
+
} catch (e) {
|
|
15
|
+
hasJobberFonts = false;
|
|
16
|
+
}
|
|
17
|
+
function removeFontImport(rule) {
|
|
18
|
+
if (rule.params?.includes("@jobber/fonts")) {
|
|
19
|
+
if (!hasJobberFonts) {
|
|
20
|
+
console.warn("remove rule in foundation config", { hasJobberFonts });
|
|
21
|
+
rule.remove();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const postcssCopyInstance = postcssCopy({
|
|
26
|
+
dest: "./dist",
|
|
27
|
+
basePath: ["./src", "./node_modules"],
|
|
28
|
+
preservePath: true,
|
|
29
|
+
template(fileMeta) {
|
|
30
|
+
return fileMeta.filename;
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const postcssImportInstance = postcssImport({
|
|
34
|
+
basedir: ["./src", "./node_modules"],
|
|
35
|
+
filter: path => {
|
|
36
|
+
if (path.includes("@jobber/fonts")) {
|
|
37
|
+
console.warn("include fonts, import, foundation config", {
|
|
38
|
+
hasJobberFonts,
|
|
39
|
+
});
|
|
40
|
+
return hasJobberFonts;
|
|
41
|
+
} else {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
module.exports = {
|
|
48
|
+
plugins: [
|
|
49
|
+
removeRule({ ruleFilters: [removeFontImport] }),
|
|
50
|
+
postcssImportInstance,
|
|
51
|
+
hasJobberFonts && postcssCopyInstance,
|
|
52
|
+
hasJobberFonts &&
|
|
53
|
+
maintainPath({ pathToFind: "dist/fonts", pathToSet: "./dist/fonts" }),
|
|
54
|
+
postcssCustomProperties({
|
|
55
|
+
exportTo: ["src/foundation.js"],
|
|
56
|
+
}),
|
|
57
|
+
],
|
|
58
|
+
};
|