@jobber/design 0.63.0 → 0.64.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.
Files changed (42) hide show
  1. package/README.md +29 -15
  2. package/dist/{icons/iconMap.d.ts → assets/icon.map.d.ts} +166 -165
  3. package/{foundation.native.d.ts → dist/assets/tokens.all.colors.d.ts} +55 -143
  4. package/{foundation.android.d.ts → dist/assets/tokens.android.d.ts} +175 -175
  5. package/dist/assets/tokens.color.d.ts +80 -0
  6. package/dist/assets/tokens.dark.d.ts +79 -0
  7. package/{foundation.ios.d.ts → dist/assets/tokens.ios.d.ts} +175 -175
  8. package/dist/assets/tokens.semantic.d.ts +46 -0
  9. package/{foundation.d.ts → dist/assets/tokens.web.d.ts} +178 -171
  10. package/dist/color.css +79 -0
  11. package/dist/colors.cjs +79 -0
  12. package/dist/colors.mjs +79 -0
  13. package/dist/dark.mode.css +115 -0
  14. package/dist/dark.theme.css +78 -0
  15. package/dist/foundation.css +369 -0
  16. package/dist/icon.map.js +562 -0
  17. package/dist/iconStyles/iconColors.d.ts +148 -0
  18. package/dist/iconStyles/iconSizes.d.ts +16 -0
  19. package/dist/iconStyles/iconStyles.mobile.d.ts +1 -0
  20. package/dist/iconStyles/iconStyles.web.d.ts +2 -0
  21. package/dist/index.cjs +2462 -0
  22. package/dist/index.d.ts +50 -3
  23. package/dist/index.mjs +2447 -0
  24. package/dist/semantic.css +45 -0
  25. package/package.json +60 -41
  26. package/rollup.config.mjs +19 -0
  27. package/dist/icons/Icon.css.d.ts +0 -40
  28. package/dist/icons/IconColors.css.d.ts +0 -52
  29. package/dist/icons/Sizes.css.d.ts +0 -7
  30. package/dist/icons/getIcon.d.ts +0 -31
  31. package/dist/icons/getIcon.test.d.ts +0 -1
  32. package/dist/icons/iconStyles.d.ts +0 -278
  33. package/dist/index.js +0 -1305
  34. package/foundation.android.js +0 -352
  35. package/foundation.css +0 -440
  36. package/foundation.ios.js +0 -352
  37. package/foundation.js +0 -317
  38. package/foundation.native.js +0 -352
  39. package/foundation.scss +0 -319
  40. package/icons/Icon.css +0 -125
  41. package/icons/IconColors.css +0 -193
  42. package/icons/Sizes.css +0 -16
@@ -0,0 +1,45 @@
1
+ :root {
2
+ --base-unit: 16px;
3
+ --color-interactive: hsl(107, 58%, 33%);
4
+ --color-interactive--hover: hsl(107, 65%, 24%);
5
+ --color-interactive--subtle: hsl(198, 35%, 21%);
6
+ --color-interactive--subtle--hover: hsl(197, 90%, 12%);
7
+ --color-destructive: hsl(6, 64%, 51%);
8
+ --color-destructive--hover: hsl(6, 100%, 35%);
9
+ --color-disabled: hsl(0, 0%, 72%);
10
+ --color-disabled--secondary: hsl(0, 0%, 93%);
11
+ --color-focus: hsl(198, 12%, 57%);
12
+ --color-critical: hsl(6, 64%, 51%);
13
+ --color-critical--surface: hsl(7, 63%, 95%);
14
+ --color-critical--onSurface: hsl(6, 100%, 24%);
15
+ --color-warning: hsl(51, 64%, 49%);
16
+ --color-warning--surface: hsl(52, 64%, 89%);
17
+ --color-warning--onSurface: hsl(51, 64%, 24%);
18
+ --color-success: hsl(107, 58%, 33%);
19
+ --color-success--surface: hsl(109, 28%, 92%);
20
+ --color-success--onSurface: hsl(107, 64%, 16%);
21
+ --color-informative: hsl(207, 79%, 57%);
22
+ --color-informative--surface: hsl(207, 87%, 94%);
23
+ --color-informative--onSurface: hsl(207, 61%, 34%);
24
+ --color-inactive: hsl(198, 25%, 33%);
25
+ --color-inactive--surface: hsl(195, 12%, 94%);
26
+ --color-inactive--onSurface: hsl(197, 90%, 12%);
27
+ --color-heading: hsl(197, 90%, 12%);
28
+ --color-text: hsl(198, 35%, 21%);
29
+ --color-text--secondary: hsl(197, 15%, 45%);
30
+ --color-text--reverse: rgba(255, 255, 255, 1);
31
+ --color-text--reverse--secondary: hsl(200, 13%, 87%);
32
+ --color-icon: hsl(198, 35%, 21%);
33
+ --color-surface: rgba(255, 255, 255, 1);
34
+ --color-surface--hover: hsl(53, 21%, 93%);
35
+ --color-surface--reverse: hsl(197, 90%, 12%);
36
+ --color-surface--active: hsl(51, 17%, 85%);
37
+ --color-surface--background: hsl(53, 21%, 93%);
38
+ --color-surface--background--hover: hsl(51, 17%, 85%);
39
+ --color-surface--background--subtle: hsl(45, 20%, 97%);
40
+ --color-surface--background--subtle--hover: hsl(51, 17%, 85%);
41
+ --color-border: hsl(200, 13%, 87%);
42
+ --color-border--interactive: hsl(200, 13%, 87%);
43
+ --color-border--section: hsl(197, 90%, 12%);
44
+ --color-brand: hsl(79, 85%, 34%);
45
+ }
package/package.json CHANGED
@@ -1,59 +1,78 @@
1
1
  {
2
2
  "name": "@jobber/design",
3
- "version": "0.63.0",
3
+ "version": "0.64.0",
4
4
  "description": "Design foundation for the Jobber Atlantis Design System",
5
5
  "license": "MIT",
6
- "main": "dist/index.js",
6
+ "type": "module",
7
+ "main": "dist/index.cjs",
7
8
  "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "require": "./dist/index.cjs",
13
+ "import": "./dist/index.mjs"
14
+ },
15
+ "./foundation": {
16
+ "types": "./dist/index.d.ts",
17
+ "require": "./dist/index.cjs",
18
+ "import": "./dist/index.mjs"
19
+ },
20
+ "./foundation.js": {
21
+ "types": "./dist/index.d.ts",
22
+ "require": "./dist/index.cjs",
23
+ "import": "./dist/index.mjs"
24
+ },
25
+ "./dist/foundation.css": "./dist/foundation.css",
26
+ "./foundation.css": {
27
+ "import": "./dist/foundation.css",
28
+ "require": "./dist/foundation.css"
29
+ },
30
+ "./dist/dark.mode.css": "./dist/dark.mode.css",
31
+ "./dark.mode.css": {
32
+ "import": "./dist/dark.mode.css",
33
+ "require": "./dist/dark.mode.css"
34
+ },
35
+ "./colors": {
36
+ "import": "./dist/colors.mjs",
37
+ "require:": "./dist/colors.cjs"
38
+ },
39
+ "./colors.js": {
40
+ "import": "./dist/colors.mjs",
41
+ "require:": "./dist/colors.cjs"
42
+ }
43
+ },
8
44
  "files": [
9
45
  "dist/*",
10
46
  "*.css",
47
+ "*.mjs",
48
+ "*.cjs",
49
+ "*.js",
11
50
  "foundation.*",
12
51
  "icons/*"
13
52
  ],
14
53
  "scripts": {
15
- "build": "npm run build:iconMap && npm run build:css && npm run build:css:icons && npm run build:colors && npm run build:cssTypes && npm run build:foundation && npm run build:iconCssStyle && npm run build:rollup",
16
- "build:rollup": "rollup --config",
17
- "build:css": "postcss src/foundation.css --output foundation.css --use postcss-import",
18
- "build:css:icons": "postcss src/icons/*.css --dir icons/ --use postcss-import",
19
- "build:ts": "tsc --project .",
20
- "build:cssTypes": "tcm src/icons",
21
- "build:colors": "node buildColors.js",
22
- "build:foundation": "node buildFoundation.js && node resolveFoundationTokens.js && npm run build:foundationTypes && npm run build:addFoundationExceptions && npm run build:removeTempFiles",
23
- "build:foundationTypes": "tsc --declaration --emitDeclarationOnly --allowJs foundation.js foundation.native.js foundation.android.js foundation.ios.js --outDir . --skipLibCheck",
24
- "build:addFoundationExceptions": "./scripts/addFoundationExceptions.sh",
25
- "build:removeTempFiles": "rm -f src/foundation.js && ./scripts/removeFoundationTempFiles.sh",
26
- "build:iconMap": "ts-node --project ../../tsconfig.bin.json scripts/generateIconMap.ts",
27
- "build:iconCssStyle": "node buildIconStyles.js && npm run build:iconCssStyleTypes",
28
- "build:iconCssStyleTypes": "tsc --declaration --emitDeclarationOnly --allowJs src/icons/iconStyles.ts --outDir ./src/icons --skipLibCheck",
29
- "clean": "rm -rf dist/* icons/* src/icons/iconMap.ts colors.js foundation.* iconStyles.* tsconfig.tsbuildinfo",
54
+ "build:design": "rollup -c rollup.config.mjs",
55
+ "generate:iconMap": "tsx src/scripts/buildIconMap.ts",
56
+ "generate:tokenCSS": "tsx src/scripts/buildTokens.ts",
57
+ "generate:assets": "npm run generate:iconMap && npm run generate:tokenCSS",
58
+ "build": "mkdir -p dist && npm run generate:assets && npm run build:design",
59
+ "watch": "mkdir -p dist & chokidar \"**/*.ts\" \"**/*.json\" \"**/*.svg\"-c \"npm run generate:assets && npm run build:design\"",
60
+ "clean": "rm -rf dist colors.js foundation.css src/assets colors.cjs colors.mjs",
30
61
  "bootstrap": "npm run clean && npm run build"
31
62
  },
32
- "dependencies": {
33
- "classnames": "^2.3.2"
34
- },
35
63
  "devDependencies": {
36
- "@csstools/postcss-extract": "^2.0.1",
37
- "@csstools/postcss-global-data": "^1.0.3",
38
- "@rollup/plugin-commonjs": "^24.0.1",
39
- "@types/node": "^18.15.7",
40
- "autoprefixer": "^9.5.1",
41
- "cheerio": "^1.0.0-rc.12",
42
- "css-to-react-native-transform": "^2.0.0",
43
- "postcss": "^8.4.21",
44
- "postcss-calc": "^8.2.3",
45
- "postcss-cli": "^10.1.0",
46
- "postcss-custom-properties": "^13.1.4",
47
- "postcss-import": "^15.1.0",
48
- "postcss-preset-env": "^8.3.0",
64
+ "@rollup/plugin-commonjs": "^26.0.1",
65
+ "@rollup/plugin-json": "^6.1.0",
66
+ "@rollup/plugin-node-resolve": "^15.2.3",
67
+ "@rollup/plugin-typescript": "^11.1.6",
68
+ "@types/jsdom": "^21.1.7",
69
+ "jsdom": "^24.1.0",
70
+ "postcss": "^8.4.39",
71
+ "postcss-calc": "^10.0.0",
72
+ "postcss-cli": "^11.0.0",
73
+ "postcss-import": "^16.1.0",
49
74
  "rollup": "^4.13.0",
50
- "rollup-plugin-copy": "^3.5.0",
51
- "rollup-plugin-multi-input": "^1.4.1",
52
- "rollup-plugin-postcss": "^4.0.2",
53
- "rollup-plugin-typescript2": "^0.36.0",
54
- "svgo": "^3.0.2",
55
- "typed-css-modules": "^0.7.0",
56
- "typescript": "^4.9.5"
75
+ "tsx": "^4.16.2"
57
76
  },
58
- "gitHead": "98d9817ee15a20b4621d662f673ea81df25e01df"
77
+ "gitHead": "02f3d1f70bf477916078b9e03f786783eab62d2e"
59
78
  }
@@ -0,0 +1,19 @@
1
+ import typescript from "@rollup/plugin-typescript";
2
+ import { nodeResolve } from "@rollup/plugin-node-resolve";
3
+ import commonjs from "@rollup/plugin-commonjs";
4
+ import pluginjson from "@rollup/plugin-json";
5
+
6
+ export default {
7
+ input: "src/index.ts",
8
+ output: [
9
+ {
10
+ file: "dist/index.mjs",
11
+ format: "es",
12
+ },
13
+ {
14
+ file: "dist/index.cjs",
15
+ format: "cjs",
16
+ },
17
+ ],
18
+ plugins: [nodeResolve(), commonjs(), pluginjson(), typescript()],
19
+ };
@@ -1,40 +0,0 @@
1
- declare const styles: {
2
- readonly "icon": string;
3
- readonly "longArrowUp": string;
4
- readonly "longArrowDown": string;
5
- readonly "longArrowRight": string;
6
- readonly "longArrowLeft": string;
7
- readonly "thumbsDown": string;
8
- readonly "person": string;
9
- readonly "clients": string;
10
- readonly "company": string;
11
- readonly "property": string;
12
- readonly "job": string;
13
- readonly "jobOnHold": string;
14
- readonly "visit": string;
15
- readonly "moveVisits": string;
16
- readonly "event": string;
17
- readonly "quote": string;
18
- readonly "request": string;
19
- readonly "task": string;
20
- readonly "userUnassigned": string;
21
- readonly "reminder": string;
22
- readonly "trash": string;
23
- readonly "checkmark": string;
24
- readonly "timer": string;
25
- readonly "invoice": string;
26
- readonly "invoiceLater": string;
27
- readonly "sendInvoice": string;
28
- readonly "paidInvoice": string;
29
- readonly "badInvoice": string;
30
- readonly "payment": string;
31
- readonly "expense": string;
32
- readonly "video": string;
33
- readonly "excel": string;
34
- readonly "pdf": string;
35
- readonly "word": string;
36
- readonly "runningTimer": string;
37
- readonly "spinning": string;
38
- };
39
- export = styles;
40
-
@@ -1,52 +0,0 @@
1
- declare const styles: {
2
- readonly "white": string;
3
- readonly "grey": string;
4
- readonly "greyBlue": string;
5
- readonly "greyBlueDark": string;
6
- readonly "greyBlueLighter": string;
7
- readonly "blue": string;
8
- readonly "lightBlue": string;
9
- readonly "green": string;
10
- readonly "yellow": string;
11
- readonly "red": string;
12
- readonly "navy": string;
13
- readonly "orange": string;
14
- readonly "interactive": string;
15
- readonly "interactiveHover": string;
16
- readonly "destructive": string;
17
- readonly "destructiveHover": string;
18
- readonly "interactiveSubtle": string;
19
- readonly "interactiveSubtleHover": string;
20
- readonly "disabled": string;
21
- readonly "disabledSecondary": string;
22
- readonly "focus": string;
23
- readonly "critical": string;
24
- readonly "criticalSurface": string;
25
- readonly "criticalOnSurface": string;
26
- readonly "warning": string;
27
- readonly "warningSurface": string;
28
- readonly "warningOnSurface": string;
29
- readonly "success": string;
30
- readonly "successSurface": string;
31
- readonly "successOnSurface": string;
32
- readonly "informative": string;
33
- readonly "informativeSurface": string;
34
- readonly "informativeOnSurface": string;
35
- readonly "inactive": string;
36
- readonly "inactiveSurface": string;
37
- readonly "inactiveOnSurface": string;
38
- readonly "heading": string;
39
- readonly "text": string;
40
- readonly "textSecondary": string;
41
- readonly "textReverse": string;
42
- readonly "textReverseSecondary": string;
43
- readonly "surface": string;
44
- readonly "surfaceHover": string;
45
- readonly "surfaceActive": string;
46
- readonly "surfaceBackground": string;
47
- readonly "surfaceReverse": string;
48
- readonly "brand": string;
49
- readonly "brandHighlight": string;
50
- };
51
- export = styles;
52
-
@@ -1,7 +0,0 @@
1
- declare const styles: {
2
- readonly "small": string;
3
- readonly "base": string;
4
- readonly "large": string;
5
- };
6
- export = styles;
7
-
@@ -1,31 +0,0 @@
1
- import sizes from "./Sizes.css";
2
- import colors from "./IconColors.css";
3
- import { iconMap } from "./iconMap";
4
- export declare const iconClassMap: {};
5
- export declare const sizesClassMap: {};
6
- export declare const colorsClassMap: {};
7
- export type IconNames = keyof typeof iconMap.icons | "longArrowUp" | "longArrowDown" | "longArrowRight" | "longArrowLeft" | "remove" | "thumbsDown" | "truck";
8
- export type IconColorNames = keyof typeof colors;
9
- export type IconSizes = keyof typeof sizes;
10
- interface IconProps {
11
- /** The icon to show. */
12
- readonly name: IconNames;
13
- /**
14
- * Changes the size to small or large.
15
- * @default base
16
- */
17
- readonly size?: IconSizes;
18
- /**
19
- * Determines the color of the icon. Some icons have a default system colour
20
- * like quotes, jobs, and invoices. Others that doesn't have a system colour
21
- * falls back to greyBlueDark.
22
- */
23
- readonly color?: IconColorNames;
24
- }
25
- export declare function getIcon({ name, color, size }: IconProps): {
26
- readonly svgClassNames: string;
27
- readonly pathClassNames: string;
28
- readonly paths: string[];
29
- readonly viewBox: string;
30
- };
31
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,278 +0,0 @@
1
- export declare const iconStyles: {
2
- icon: {
3
- fill: string;
4
- display: string;
5
- verticalAlign: string;
6
- };
7
- longArrowUp: {
8
- transform: {
9
- rotate: string;
10
- }[];
11
- };
12
- longArrowDown: {
13
- transform: {
14
- rotate: string;
15
- }[];
16
- };
17
- longArrowRight: {
18
- transform: {
19
- rotate: string;
20
- }[];
21
- };
22
- longArrowLeft: {
23
- transform: {
24
- rotate: string;
25
- }[];
26
- };
27
- thumbsDown: {
28
- transform: {
29
- scaleY: number;
30
- }[];
31
- };
32
- person: {
33
- fill: string;
34
- };
35
- clients: {
36
- fill: string;
37
- };
38
- company: {
39
- fill: string;
40
- };
41
- property: {
42
- fill: string;
43
- };
44
- job: {
45
- fill: string;
46
- };
47
- jobOnHold: {
48
- fill: string;
49
- };
50
- visit: {
51
- fill: string;
52
- };
53
- moveVisits: {
54
- fill: string;
55
- };
56
- event: {
57
- fill: string;
58
- };
59
- quote: {
60
- fill: string;
61
- };
62
- request: {
63
- fill: string;
64
- };
65
- task: {
66
- fill: string;
67
- };
68
- userUnassigned: {
69
- fill: string;
70
- };
71
- reminder: {
72
- fill: string;
73
- };
74
- trash: {
75
- fill: string;
76
- };
77
- checkmark: {
78
- fill: string;
79
- };
80
- timer: {
81
- fill: string;
82
- };
83
- invoice: {
84
- fill: string;
85
- };
86
- invoiceLater: {
87
- fill: string;
88
- };
89
- sendInvoice: {
90
- fill: string;
91
- };
92
- paidInvoice: {
93
- fill: string;
94
- };
95
- badInvoice: {
96
- fill: string;
97
- };
98
- payment: {
99
- fill: string;
100
- };
101
- expense: {
102
- fill: string;
103
- };
104
- video: {
105
- fill: string;
106
- };
107
- excel: {
108
- fill: string;
109
- };
110
- pdf: {
111
- fill: string;
112
- };
113
- word: {
114
- fill: string;
115
- };
116
- runningTimer: {
117
- animationDuration: string;
118
- animationIterationCount: string;
119
- animationName: string;
120
- animationTimingFunction: string;
121
- };
122
- small: {
123
- width: number;
124
- height: number;
125
- };
126
- base: {
127
- width: number;
128
- height: number;
129
- };
130
- large: {
131
- width: number;
132
- height: number;
133
- };
134
- white: {
135
- fill: string;
136
- };
137
- grey: {
138
- fill: string;
139
- };
140
- greyBlue: {
141
- fill: string;
142
- };
143
- greyBlueDark: {
144
- fill: string;
145
- };
146
- greyBlueLighter: {
147
- fill: string;
148
- };
149
- blue: {
150
- fill: string;
151
- };
152
- lightBlue: {
153
- fill: string;
154
- };
155
- green: {
156
- fill: string;
157
- };
158
- yellow: {
159
- fill: string;
160
- };
161
- red: {
162
- fill: string;
163
- };
164
- navy: {
165
- fill: string;
166
- };
167
- orange: {
168
- fill: string;
169
- };
170
- interactive: {
171
- fill: string;
172
- };
173
- interactiveHover: {
174
- fill: string;
175
- };
176
- destructive: {
177
- fill: string;
178
- };
179
- destructiveHover: {
180
- fill: string;
181
- };
182
- interactiveSubtle: {
183
- fill: string;
184
- };
185
- interactiveSubtleHover: {
186
- fill: string;
187
- };
188
- disabled: {
189
- fill: string;
190
- };
191
- disabledSecondary: {
192
- fill: string;
193
- };
194
- focus: {
195
- fill: string;
196
- };
197
- critical: {
198
- fill: string;
199
- };
200
- criticalSurface: {
201
- fill: string;
202
- };
203
- criticalOnSurface: {
204
- fill: string;
205
- };
206
- warning: {
207
- fill: string;
208
- };
209
- warningSurface: {
210
- fill: string;
211
- };
212
- warningOnSurface: {
213
- fill: string;
214
- };
215
- success: {
216
- fill: string;
217
- };
218
- successSurface: {
219
- fill: string;
220
- };
221
- successOnSurface: {
222
- fill: string;
223
- };
224
- informative: {
225
- fill: string;
226
- };
227
- informativeSurface: {
228
- fill: string;
229
- };
230
- informativeOnSurface: {
231
- fill: string;
232
- };
233
- inactive: {
234
- fill: string;
235
- };
236
- inactiveSurface: {
237
- fill: string;
238
- };
239
- inactiveOnSurface: {
240
- fill: string;
241
- };
242
- heading: {
243
- fill: string;
244
- };
245
- text: {
246
- fill: string;
247
- };
248
- textSecondary: {
249
- fill: string;
250
- };
251
- textReverse: {
252
- fill: string;
253
- };
254
- textReverseSecondary: {
255
- fill: string;
256
- };
257
- surface: {
258
- fill: string;
259
- };
260
- surfaceHover: {
261
- fill: string;
262
- };
263
- surfaceActive: {
264
- fill: string;
265
- };
266
- surfaceBackground: {
267
- fill: string;
268
- };
269
- surfaceReverse: {
270
- fill: string;
271
- };
272
- brand: {
273
- fill: string;
274
- };
275
- brandHighlight: {
276
- fill: string;
277
- };
278
- };