@sproutsocial/racine 11.0.2 → 11.1.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 (77) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/__flow__/index.js +1 -0
  3. package/__flow__/systemProps/background.js +28 -0
  4. package/__flow__/systemProps/border.js +76 -0
  5. package/__flow__/systemProps/color.js +25 -0
  6. package/__flow__/systemProps/custom.js +23 -0
  7. package/__flow__/systemProps/flexbox.js +42 -0
  8. package/__flow__/systemProps/grid.js +43 -0
  9. package/__flow__/systemProps/index.js +17 -0
  10. package/__flow__/systemProps/layout.js +43 -0
  11. package/__flow__/systemProps/position.js +29 -0
  12. package/__flow__/systemProps/shadow.js +18 -0
  13. package/__flow__/systemProps/space.js +83 -0
  14. package/__flow__/systemProps/systemProps.js +55 -0
  15. package/__flow__/systemProps/tests/__snapshots__/background.test.js.snap +96 -0
  16. package/__flow__/systemProps/tests/__snapshots__/border.test.js.snap +469 -0
  17. package/__flow__/systemProps/tests/__snapshots__/color.test.js.snap +55 -0
  18. package/__flow__/systemProps/tests/__snapshots__/custom.test.js.snap +36 -0
  19. package/__flow__/systemProps/tests/__snapshots__/flexbox.test.js.snap +239 -0
  20. package/__flow__/systemProps/tests/__snapshots__/grid.test.js.snap +166 -0
  21. package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +218 -0
  22. package/__flow__/systemProps/tests/__snapshots__/position.test.js.snap +115 -0
  23. package/__flow__/systemProps/tests/__snapshots__/shadow.test.js.snap +25 -0
  24. package/__flow__/systemProps/tests/__snapshots__/space.test.js.snap +39 -0
  25. package/__flow__/systemProps/tests/__snapshots__/typography.test.js.snap +166 -0
  26. package/__flow__/systemProps/tests/__snapshots__/variant.test.js.snap +17 -0
  27. package/__flow__/systemProps/tests/background.test.js +90 -0
  28. package/__flow__/systemProps/tests/border.test.js +299 -0
  29. package/__flow__/systemProps/tests/color.test.js +49 -0
  30. package/__flow__/systemProps/tests/custom.test.js +38 -0
  31. package/__flow__/systemProps/tests/flexbox.test.js +150 -0
  32. package/__flow__/systemProps/tests/grid.test.js +123 -0
  33. package/__flow__/systemProps/tests/layout.test.js +135 -0
  34. package/__flow__/systemProps/tests/position.test.js +78 -0
  35. package/__flow__/systemProps/tests/shadow.test.js +30 -0
  36. package/__flow__/systemProps/tests/space.test.js +32 -0
  37. package/__flow__/systemProps/tests/types.flow.js +55 -0
  38. package/__flow__/systemProps/tests/typography.test.js +93 -0
  39. package/__flow__/systemProps/tests/variant.test.js +25 -0
  40. package/__flow__/systemProps/types.flow.js +20 -0
  41. package/__flow__/systemProps/typography.js +34 -0
  42. package/__flow__/systemProps/variant.js +18 -0
  43. package/commonjs/index.js +78 -0
  44. package/commonjs/systemProps/background.js +9 -0
  45. package/commonjs/systemProps/border.js +9 -0
  46. package/commonjs/systemProps/color.js +9 -0
  47. package/commonjs/systemProps/custom.js +12 -0
  48. package/commonjs/systemProps/flexbox.js +9 -0
  49. package/commonjs/systemProps/grid.js +9 -0
  50. package/commonjs/systemProps/index.js +115 -0
  51. package/commonjs/systemProps/layout.js +9 -0
  52. package/commonjs/systemProps/position.js +9 -0
  53. package/commonjs/systemProps/shadow.js +9 -0
  54. package/commonjs/systemProps/space.js +10 -0
  55. package/commonjs/systemProps/systemProps.js +33 -0
  56. package/commonjs/systemProps/tests/types.flow.js +46 -0
  57. package/commonjs/systemProps/types.flow.js +1 -0
  58. package/commonjs/systemProps/typography.js +9 -0
  59. package/commonjs/systemProps/variant.js +12 -0
  60. package/lib/index.js +1 -0
  61. package/lib/systemProps/background.js +2 -0
  62. package/lib/systemProps/border.js +2 -0
  63. package/lib/systemProps/color.js +2 -0
  64. package/lib/systemProps/custom.js +5 -0
  65. package/lib/systemProps/flexbox.js +2 -0
  66. package/lib/systemProps/grid.js +2 -0
  67. package/lib/systemProps/index.js +14 -0
  68. package/lib/systemProps/layout.js +2 -0
  69. package/lib/systemProps/position.js +2 -0
  70. package/lib/systemProps/shadow.js +2 -0
  71. package/lib/systemProps/space.js +3 -0
  72. package/lib/systemProps/systemProps.js +14 -0
  73. package/lib/systemProps/tests/types.flow.js +44 -0
  74. package/lib/systemProps/types.flow.js +0 -0
  75. package/lib/systemProps/typography.js +2 -0
  76. package/lib/systemProps/variant.js +5 -0
  77. package/package.json +12 -2
@@ -0,0 +1,2 @@
1
+ import { shadow } from "styled-system";
2
+ export var shadowSystemProps = shadow;
@@ -0,0 +1,3 @@
1
+ /* eslint-disable prettier/prettier */
2
+ import { space } from "styled-system";
3
+ export var spaceSystemProps = space;
@@ -0,0 +1,14 @@
1
+ import { compose } from "styled-system";
2
+ import { backgroundSystemProps } from "./background";
3
+ import { borderSystemProps } from "./border";
4
+ import { colorSystemProps } from "./color";
5
+ import { customSystemProps } from "./custom";
6
+ import { flexboxSystemProps } from "./flexbox";
7
+ import { gridSystemProps } from "./grid";
8
+ import { layoutSystemProps } from "./layout";
9
+ import { positionSystemProps } from "./position";
10
+ import { shadowSystemProps } from "./shadow";
11
+ import { spaceSystemProps } from "./space";
12
+ import { typographySystemProps } from "./typography";
13
+ import { variantSystemProps } from "./variant";
14
+ export var systemProps = compose(customSystemProps, variantSystemProps, backgroundSystemProps, borderSystemProps, colorSystemProps, flexboxSystemProps, gridSystemProps, layoutSystemProps, positionSystemProps, shadowSystemProps, spaceSystemProps, typographySystemProps);
@@ -0,0 +1,44 @@
1
+ /**
2
+ * All system props should be responsive but accepting a tuple of length 1-5.
3
+ */
4
+ "a";
5
+ ["a"];
6
+ ["a", "a"];
7
+ ["a", "a", "a"];
8
+ ["a", "a", "a", "a"];
9
+ ["a", "a", "a", "a", "a"]; // $FlowExpectedError
10
+
11
+ ["a", "a", "a", "a", "a", "a"]; // $FlowExpectedError
12
+
13
+ ["b"]; // $FlowExpectedError
14
+
15
+ [null];
16
+ /**
17
+ * All system props should accept "base" values: boolean, null, and undefined.
18
+ */
19
+
20
+ "a";
21
+ true;
22
+ false;
23
+ null;
24
+ undefined;
25
+ /**
26
+ * All system props should be responsive and allow "base" values.
27
+ */
28
+
29
+ "a";
30
+ "b";
31
+ true;
32
+ false;
33
+ null;
34
+ undefined;
35
+ ["a", null, undefined, false, "b"];
36
+ ["a"]; // $FlowExpectedError
37
+
38
+ "c"; // $FlowExpectedError
39
+
40
+ 1; // $FlowExpectedError
41
+
42
+ ({}); // $FlowExpectedError
43
+
44
+ [];
File without changes
@@ -0,0 +1,2 @@
1
+ import { typography } from "styled-system";
2
+ export var typographySystemProps = typography;
@@ -0,0 +1,5 @@
1
+ import { compose, variant } from "styled-system";
2
+ export var variantSystemProps = compose(variant({
3
+ key: "typography",
4
+ prop: "typeScale"
5
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "11.0.2",
3
+ "version": "11.1.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",
@@ -34,7 +34,7 @@
34
34
  "start-package-only": "npm-run-all install-deps clean -p build-icons watch-package",
35
35
  "start": "npm-run-all install-deps clean -p build-icons watch-package watch-app",
36
36
  "build": "npm-run-all clean -p build-icons build-package -s build-app",
37
- "flow": "yarn run build-icons && flow check",
37
+ "flow": "yarn run build-icons && flow check --max-warnings 0",
38
38
  "lint-js": "eslint --max-warnings=0 --fix .",
39
39
  "lint-css": "stylelint 'src/**/*.js'",
40
40
  "lint-icons": "yarn icon-lint check 'icons/*.svg'",
@@ -193,5 +193,15 @@
193
193
  "moduleNameMapper": {
194
194
  "\\.(css|scss|sass)$": "identity-obj-proxy"
195
195
  }
196
+ },
197
+ "prettier": {
198
+ "overrides": [
199
+ {
200
+ "files": "*.js",
201
+ "options": {
202
+ "parser": "babel-flow"
203
+ }
204
+ }
205
+ ]
196
206
  }
197
207
  }