@flodesk/grain 2.20.2 → 2.21.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 (75) hide show
  1. package/es/components/arrange.js +2 -2
  2. package/es/components/box.js +31 -11
  3. package/es/components/button.js +5 -5
  4. package/es/components/icon-button.js +4 -4
  5. package/es/components/icon-toggle.js +8 -8
  6. package/es/components/icon.js +4 -4
  7. package/es/components/index.js +11 -11
  8. package/es/components/stack.js +4 -4
  9. package/es/components/text-button.js +3 -3
  10. package/es/components/text-input.js +5 -5
  11. package/es/components/text-toggle.js +5 -5
  12. package/es/components/text.js +4 -4
  13. package/es/foundational/index.js +4 -4
  14. package/es/hooks/index.js +1 -1
  15. package/es/hooks/useMedia.js +1 -1
  16. package/es/icons/icon-align-center.js +1 -1
  17. package/es/icons/icon-align-left.js +1 -1
  18. package/es/icons/icon-align-right.js +1 -1
  19. package/es/icons/icon-arrow-down.js +1 -1
  20. package/es/icons/icon-arrow-left.js +1 -1
  21. package/es/icons/icon-arrow-right.js +1 -1
  22. package/es/icons/icon-arrow-up.js +1 -1
  23. package/es/icons/icon-browser.js +1 -1
  24. package/es/icons/icon-chart.js +1 -1
  25. package/es/icons/icon-check.js +1 -1
  26. package/es/icons/icon-chevron-down.js +1 -1
  27. package/es/icons/icon-chevron-horizontal.js +1 -1
  28. package/es/icons/icon-chevron-left.js +1 -1
  29. package/es/icons/icon-chevron-right.js +1 -1
  30. package/es/icons/icon-chevron-up.js +1 -1
  31. package/es/icons/icon-chevron-vertical.js +1 -1
  32. package/es/icons/icon-clip.js +1 -1
  33. package/es/icons/icon-clock.js +1 -1
  34. package/es/icons/icon-crop.js +1 -1
  35. package/es/icons/icon-cross.js +1 -1
  36. package/es/icons/icon-download.js +1 -1
  37. package/es/icons/icon-duplicate.js +1 -1
  38. package/es/icons/icon-ellipsis.js +1 -1
  39. package/es/icons/icon-file.js +1 -1
  40. package/es/icons/icon-folder-add.js +1 -1
  41. package/es/icons/icon-folder.js +1 -1
  42. package/es/icons/icon-gear.js +1 -1
  43. package/es/icons/icon-globe.js +1 -1
  44. package/es/icons/icon-heart.js +1 -1
  45. package/es/icons/icon-image.js +1 -1
  46. package/es/icons/icon-link.js +1 -1
  47. package/es/icons/icon-mail.js +1 -1
  48. package/es/icons/icon-minus.js +1 -1
  49. package/es/icons/icon-monitor.js +1 -1
  50. package/es/icons/icon-pencil.js +1 -1
  51. package/es/icons/icon-phone.js +1 -1
  52. package/es/icons/icon-plus.js +1 -1
  53. package/es/icons/icon-redo.js +1 -1
  54. package/es/icons/icon-search.js +1 -1
  55. package/es/icons/icon-send.js +1 -1
  56. package/es/icons/icon-share.js +1 -1
  57. package/es/icons/icon-smile.js +1 -1
  58. package/es/icons/icon-switch.js +1 -1
  59. package/es/icons/icon-tablet.js +1 -1
  60. package/es/icons/icon-text-align-center.js +1 -1
  61. package/es/icons/icon-text-align-left.js +1 -1
  62. package/es/icons/icon-text-align-right.js +1 -1
  63. package/es/icons/icon-trash.js +1 -1
  64. package/es/icons/icon-type.js +1 -1
  65. package/es/icons/icon-undo.js +1 -1
  66. package/es/icons/icon-upload.js +1 -1
  67. package/es/icons/index.js +51 -51
  68. package/es/index.js +3 -3
  69. package/es/types.js +11 -11
  70. package/es/utilities/helpers.js +5 -5
  71. package/es/utilities/index.js +21 -21
  72. package/es/utilities/responsive.js +18 -19
  73. package/es/utilities/styles.js +13 -13
  74. package/es/variables.js +104 -101
  75. package/package.json +6 -2
package/es/variables.js CHANGED
@@ -1,114 +1,117 @@
1
- var _vars;
2
-
3
- import "core-js/modules/es.object.define-property.js";
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- export var grnPrefix = "--grn-";
8
- export var varNames = {
9
- text: {
10
- group: "texts",
11
- prefix: "text"
1
+ export var grnPrefix = '--grn-';
2
+ export var vars = {
3
+ texts: {
4
+ s: 's',
5
+ m: 'm',
6
+ l: 'l',
7
+ xl: 'xl',
8
+ xxl: 'xxl'
12
9
  },
13
- icon: {
14
- group: "icons",
15
- prefix: "icon"
10
+ icons: {
11
+ s: 's',
12
+ m: 'm',
13
+ l: 'l',
14
+ xl: 'xl',
15
+ xxl: 'xxl'
16
16
  },
17
- space: {
18
- group: "spaces",
19
- prefix: "space"
17
+ spaces: {
18
+ xs: 'xs',
19
+ s: 's',
20
+ m: 'm',
21
+ l: 'l',
22
+ xl: 'xl',
23
+ xxl: 'xxl'
20
24
  },
21
- weight: {
22
- group: "weights",
23
- prefix: "weight"
25
+ weights: {
26
+ normal: 'normal',
27
+ medium: 'medium',
28
+ semiBold: 'semiBold'
24
29
  },
25
- radius: {
26
- group: "radiuses",
27
- prefix: "radius"
30
+ radii: {
31
+ s: 's',
32
+ m: 'm',
33
+ l: 'l'
28
34
  },
29
- shadow: {
30
- group: "shadows",
31
- prefix: "shadow"
35
+ shadows: {
36
+ s: 's',
37
+ m: 'm',
38
+ l: 'l'
32
39
  },
33
- transition: {
34
- group: "transitions",
35
- prefix: "transition"
40
+ transitions: {
41
+ slow: 'slow',
42
+ fast: 'fast',
43
+ xFast: 'xFast'
36
44
  },
37
- color: {
38
- group: "colors",
39
- prefix: "color"
45
+ colors: {
46
+ greys: {
47
+ grey8: 'grey8',
48
+ grey7: 'grey7',
49
+ grey6: 'grey6',
50
+ grey5: 'grey5',
51
+ grey4: 'grey4',
52
+ grey3: 'grey3',
53
+ grey2: 'grey2',
54
+ grey1: 'grey1'
55
+ },
56
+ fades: {
57
+ fade7: 'fade7',
58
+ fade6: 'fade6',
59
+ fade5: 'fade5',
60
+ fade4: 'fade4',
61
+ fade3: 'fade3',
62
+ fade2: 'fade2',
63
+ fade1: 'fade1'
64
+ },
65
+ bases: {
66
+ blue: 'blue',
67
+ red: 'red'
68
+ },
69
+ semantics: {
70
+ body: 'body',
71
+ bodyDimmed: 'bodyDimmed',
72
+ accent: 'accent',
73
+ backgroundSecondary: 'backgroundSecondary',
74
+ background: 'background',
75
+ overlay: 'overlay',
76
+ border: 'border',
77
+ selection: 'selection',
78
+ danger: 'danger',
79
+ disabledContent: 'disabledContent',
80
+ disabledBackground: 'disabledBackground'
81
+ }
40
82
  }
41
83
  };
42
- export var vars = (_vars = {}, _defineProperty(_vars, varNames.text.group, {
43
- s: "s",
44
- m: "m",
45
- l: "l",
46
- xl: "xl",
47
- xxl: "xxl"
48
- }), _defineProperty(_vars, varNames.icon.group, {
49
- s: "s",
50
- m: "m",
51
- l: "l",
52
- xl: "xl",
53
- xxl: "xxl"
54
- }), _defineProperty(_vars, varNames.space.group, {
55
- xs: "xs",
56
- s: "s",
57
- m: "m",
58
- l: "l",
59
- xl: "xl",
60
- xxl: "xxl"
61
- }), _defineProperty(_vars, varNames.weight.group, {
62
- normal: "normal",
63
- medium: "medium",
64
- semiBold: "semiBold"
65
- }), _defineProperty(_vars, varNames.radius.group, {
66
- s: "s",
67
- m: "m",
68
- l: "l"
69
- }), _defineProperty(_vars, varNames.shadow.group, {
70
- s: "s",
71
- m: "m",
72
- l: "l"
73
- }), _defineProperty(_vars, varNames.transition.group, {
74
- slow: "slow",
75
- fast: "fast",
76
- xFast: "xFast"
77
- }), _defineProperty(_vars, varNames.color.group, {
78
- greys: {
79
- grey8: "grey8",
80
- grey7: "grey7",
81
- grey6: "grey6",
82
- grey5: "grey5",
83
- grey4: "grey4",
84
- grey3: "grey3",
85
- grey2: "grey2",
86
- grey1: "grey1"
84
+ export var varInfo = {
85
+ texts: {
86
+ name: 'texts',
87
+ prefix: 'text'
87
88
  },
88
- fades: {
89
- fade7: "fade7",
90
- fade6: "fade6",
91
- fade5: "fade5",
92
- fade4: "fade4",
93
- fade3: "fade3",
94
- fade2: "fade2",
95
- fade1: "fade1"
89
+ icons: {
90
+ name: 'icons',
91
+ prefix: 'icon'
96
92
  },
97
- baseColors: {
98
- blue: "blue",
99
- red: "red"
93
+ spaces: {
94
+ name: 'spaces',
95
+ prefix: 'space'
100
96
  },
101
- semanticColors: {
102
- body: "body",
103
- bodyDimmed: "bodyDimmed",
104
- accent: "accent",
105
- backgroundSecondary: "backgroundSecondary",
106
- background: "background",
107
- overlay: "overlay",
108
- border: "border",
109
- selection: "selection",
110
- danger: "danger",
111
- disabledContent: "disabledContent",
112
- disabledBackground: "disabledBackground"
97
+ weights: {
98
+ name: 'weights',
99
+ prefix: 'weight'
100
+ },
101
+ radii: {
102
+ name: 'radii',
103
+ prefix: 'radius'
104
+ },
105
+ shadows: {
106
+ name: 'shadows',
107
+ prefix: 'shadow'
108
+ },
109
+ transitions: {
110
+ name: 'transitions',
111
+ prefix: 'transition'
112
+ },
113
+ colors: {
114
+ name: 'colors',
115
+ prefix: 'color'
113
116
  }
114
- }), _vars);
117
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "2.20.2",
3
+ "version": "2.21.0",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "author": "Flodesk",
@@ -10,7 +10,7 @@
10
10
  "dev": "next dev -p 4000",
11
11
  "build": "next build",
12
12
  "start": "next start",
13
- "lint": "next lint",
13
+ "lint": "next lint --dir .",
14
14
  "semantic-release": "semantic-release",
15
15
  "build:es": "del es/* && cross-env NODE_ENV=production babel --no-babelrc --config-file ./babel.config.es.js --out-dir es --copy-files src"
16
16
  },
@@ -45,7 +45,11 @@
45
45
  "del-cli": "^4.0.1",
46
46
  "eslint": "8.16.0",
47
47
  "eslint-config-next": "12.1.6",
48
+ "eslint-config-prettier": "^8.5.0",
49
+ "eslint-plugin-import": "^2.26.0",
50
+ "eslint-plugin-prettier": "^4.2.1",
48
51
  "next": "12.1.6",
52
+ "prettier": "^2.7.1",
49
53
  "react-docgen": "^6.0.0-alpha.3",
50
54
  "react-live": "^3.1.0",
51
55
  "semantic-release": "^19.0.2",