orcs-design-system 3.2.4 → 3.2.6

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 (96) hide show
  1. package/es/GlobalStyles.js +1 -31
  2. package/es/SystemThemeProvider.js +11 -5
  3. package/es/assets/Colour/Colour.stories.js +211 -0
  4. package/es/assets/Colour/index.js +3 -3
  5. package/es/components/ActionsMenu/ActionsMenu.stories.js +260 -233
  6. package/es/components/ActionsMenu/index.js +144 -229
  7. package/es/components/Avatar/Avatar.stories.js +212 -196
  8. package/es/components/Avatar/index.js +280 -307
  9. package/es/components/Badge/Badge.stories.js +71 -46
  10. package/es/components/Badge/index.js +71 -74
  11. package/es/components/Box/Box.stories.js +51 -35
  12. package/es/components/Box/index.js +33 -34
  13. package/es/components/Button/Button.stories.js +161 -145
  14. package/es/components/Button/ButtonLink.stories.js +152 -139
  15. package/es/components/Button/index.js +79 -99
  16. package/es/components/ButtonGroup/ButtonGroup.stories.js +43 -42
  17. package/es/components/ButtonGroup/ButtonGroupItem.stories.js +11 -13
  18. package/es/components/ButtonGroup/index.js +103 -99
  19. package/es/components/Card/Card.stories.js +94 -62
  20. package/es/components/Card/index.js +50 -71
  21. package/es/components/Checkbox/Checkbox.stories.js +37 -43
  22. package/es/components/Checkbox/index.js +61 -76
  23. package/es/components/DatePicker/DatePicker.stories.js +86 -118
  24. package/es/components/DatePicker/index.js +71 -187
  25. package/es/components/Divider/Divider.stories.js +39 -42
  26. package/es/components/Divider/index.js +21 -27
  27. package/es/components/Expandable/Expandable.stories.js +46 -36
  28. package/es/components/Expandable/index.js +55 -82
  29. package/es/components/Flex/Flex.stories.js +19 -5
  30. package/es/components/Flex/FlexItem.stories.js +10 -9
  31. package/es/components/Flex/index.js +34 -27
  32. package/es/components/Grid/Grid.stories.js +129 -55
  33. package/es/components/Grid/index.js +25 -24
  34. package/es/components/Header/Header.stories.js +101 -92
  35. package/es/components/Header/index.js +433 -436
  36. package/es/components/HeaderSimple/HeaderSimple.stories.js +23 -27
  37. package/es/components/HeaderSimple/index.js +73 -68
  38. package/es/components/Icon/Icon.stories.js +58 -57
  39. package/es/components/Icon/index.js +48 -46
  40. package/es/components/Loading/Loading.stories.js +32 -39
  41. package/es/components/Loading/index.js +44 -51
  42. package/es/components/Modal/Modal.stories.js +172 -153
  43. package/es/components/Modal/index.js +126 -134
  44. package/es/components/Notification/Notification.stories.js +59 -58
  45. package/es/components/Notification/index.js +123 -133
  46. package/es/components/Popover/Popover.stories.js +134 -102
  47. package/es/components/Popover/index.js +65 -111
  48. package/es/components/ProgressBar/ProgressBar.stories.js +36 -39
  49. package/es/components/ProgressBar/index.js +29 -34
  50. package/es/components/RadioButton/RadioButton.stories.js +32 -37
  51. package/es/components/RadioButton/index.js +170 -184
  52. package/es/components/Range/Range.stories.js +19 -19
  53. package/es/components/Range/index.js +35 -45
  54. package/es/components/Select/Select.stories.js +107 -128
  55. package/es/components/Select/index.js +324 -336
  56. package/es/components/SideNav/NavItem.js +112 -122
  57. package/es/components/SideNav/SideNav.stories.js +84 -57
  58. package/es/components/SideNav/index.js +161 -185
  59. package/es/components/Sidebar/Sidebar.stories.js +50 -33
  60. package/es/components/Sidebar/index.js +152 -155
  61. package/es/components/Spacer/Spacer.stories.js +35 -32
  62. package/es/components/Spacer/index.js +20 -20
  63. package/es/components/StatusDot/StatusDot.stories.js +103 -90
  64. package/es/components/StatusDot/index.js +36 -38
  65. package/es/components/StyledLink/StyledLink.stories.js +68 -69
  66. package/es/components/StyledLink/index.js +47 -48
  67. package/es/components/Table/Table.stories.js +118 -112
  68. package/es/components/Table/getExpandColumnConfig.js +67 -62
  69. package/es/components/Table/index.js +24 -27
  70. package/es/components/Table/muiStyleOverrides.js +10 -8
  71. package/es/components/Tabs/Tab.stories.js +55 -38
  72. package/es/components/Tabs/TabsContainer.stories.js +30 -22
  73. package/es/components/Tabs/index.js +95 -92
  74. package/es/components/Tag/Tag.stories.js +250 -220
  75. package/es/components/Tag/index.js +118 -190
  76. package/es/components/TextArea/TextArea.stories.js +76 -89
  77. package/es/components/TextArea/index.js +117 -115
  78. package/es/components/TextInput/TextInput.stories.js +41 -61
  79. package/es/components/TextInput/index.js +127 -171
  80. package/es/components/Toggle/Toggle.stories.js +63 -62
  81. package/es/components/Toggle/index.js +43 -77
  82. package/es/components/TreeNav/TreeNav.stories.js +7 -8
  83. package/es/components/TreeNav/index.js +72 -69
  84. package/es/components/Typography/Typography.stories.js +174 -0
  85. package/es/components/Typography/index.js +252 -308
  86. package/es/components.test.js +1 -1
  87. package/es/hooks/isVisible.js +6 -10
  88. package/es/hooks/keepInView.js +27 -32
  89. package/es/hooks/keypress.js +14 -14
  90. package/es/hooks/useInputFocus.js +5 -5
  91. package/es/hooks/usePrevious.js +3 -3
  92. package/es/systemThemeCollapsed.js +53 -53
  93. package/es/systemtheme.js +53 -53
  94. package/es/utils/selectUtil.js +1 -1
  95. package/es/utils/selectUtil.test.js +6 -6
  96. package/package.json +29 -38
@@ -3,355 +3,299 @@ import { typography, space, layout, color, variant, compose } from "styled-syste
3
3
  import css from "@styled-system/css";
4
4
  import shouldForwardProp from "@styled-system/should-forward-prop";
5
5
  import { themeGet } from "@styled-system/theme-get";
6
- var typeStyles = compose(typography, color, space, layout);
7
- export var H1 = styled("h1").withConfig({
6
+ const typeStyles = compose(typography, color, space, layout);
7
+ export const H1 = styled("h1").withConfig({
8
8
  displayName: "Typography__H1",
9
9
  componentId: "sc-1613j99-0"
10
- })(function (props) {
11
- return css({
12
- fontFamily: themeGet("fonts.main")(props),
13
- fontSize: themeGet("fontSizes.6")(props),
14
- fontWeight: themeGet("fontWeights.1")(props),
15
- textTransform: props.uppercase ? "uppercase" : "none",
16
- wordBreak: props.breakWord ? "break-word" : "normal"
17
- });
18
- }, function (props) {
19
- return variant({
20
- prop: "weight",
21
- variants: {
22
- light: {
23
- fontWeight: themeGet("fontWeights.0")(props)
24
- },
25
- bold: {
26
- fontWeight: themeGet("fontWeights.2")(props)
27
- }
10
+ })(props => css({
11
+ fontFamily: themeGet("fonts.main")(props),
12
+ fontSize: themeGet("fontSizes.6")(props),
13
+ fontWeight: themeGet("fontWeights.1")(props),
14
+ textTransform: props.uppercase ? "uppercase" : "none",
15
+ wordBreak: props.breakWord ? "break-word" : "normal"
16
+ }), props => variant({
17
+ prop: "weight",
18
+ variants: {
19
+ light: {
20
+ fontWeight: themeGet("fontWeights.0")(props)
21
+ },
22
+ bold: {
23
+ fontWeight: themeGet("fontWeights.2")(props)
28
24
  }
29
- });
30
- }, function (props) {
31
- return variant({
32
- prop: "sizing",
33
- variants: {
34
- large: {
35
- fontSize: themeGet("fontSizes.7")(props)
36
- },
37
- small: {
38
- fontSize: themeGet("fontSizes.5")(props)
39
- }
25
+ }
26
+ }), props => variant({
27
+ prop: "sizing",
28
+ variants: {
29
+ large: {
30
+ fontSize: themeGet("fontSizes.7")(props)
31
+ },
32
+ small: {
33
+ fontSize: themeGet("fontSizes.5")(props)
40
34
  }
41
- });
42
- }, typeStyles);
43
- export var H2 = styled("h2").withConfig({
35
+ }
36
+ }), typeStyles);
37
+ export const H2 = styled("h2").withConfig({
44
38
  displayName: "Typography__H2",
45
39
  componentId: "sc-1613j99-1"
46
- })(function (props) {
47
- return css({
48
- fontFamily: themeGet("fonts.main")(props),
49
- fontSize: themeGet("fontSizes.5")(props),
50
- fontWeight: themeGet("fontWeights.1")(props),
51
- textTransform: props.uppercase ? "uppercase" : "none",
52
- wordBreak: props.breakWord ? "break-word" : "normal"
53
- });
54
- }, function (props) {
55
- return variant({
56
- prop: "weight",
57
- variants: {
58
- light: {
59
- fontWeight: themeGet("fontWeights.0")(props)
60
- },
61
- bold: {
62
- fontWeight: themeGet("fontWeights.2")(props)
63
- }
40
+ })(props => css({
41
+ fontFamily: themeGet("fonts.main")(props),
42
+ fontSize: themeGet("fontSizes.5")(props),
43
+ fontWeight: themeGet("fontWeights.1")(props),
44
+ textTransform: props.uppercase ? "uppercase" : "none",
45
+ wordBreak: props.breakWord ? "break-word" : "normal"
46
+ }), props => variant({
47
+ prop: "weight",
48
+ variants: {
49
+ light: {
50
+ fontWeight: themeGet("fontWeights.0")(props)
51
+ },
52
+ bold: {
53
+ fontWeight: themeGet("fontWeights.2")(props)
64
54
  }
65
- });
66
- }, function (props) {
67
- return variant({
68
- prop: "sizing",
69
- variants: {
70
- large: {
71
- fontSize: themeGet("fontSizes.6")(props)
72
- },
73
- small: {
74
- fontSize: themeGet("fontSizes.4")(props)
75
- }
55
+ }
56
+ }), props => variant({
57
+ prop: "sizing",
58
+ variants: {
59
+ large: {
60
+ fontSize: themeGet("fontSizes.6")(props)
61
+ },
62
+ small: {
63
+ fontSize: themeGet("fontSizes.4")(props)
76
64
  }
77
- });
78
- }, typeStyles);
79
- export var H3 = styled("h3").withConfig({
65
+ }
66
+ }), typeStyles);
67
+ export const H3 = styled("h3").withConfig({
80
68
  displayName: "Typography__H3",
81
69
  componentId: "sc-1613j99-2"
82
- })(function (props) {
83
- return css({
84
- fontFamily: themeGet("fonts.main")(props),
85
- fontSize: themeGet("fontSizes.4")(props),
86
- fontWeight: themeGet("fontWeights.1")(props),
87
- textTransform: props.uppercase ? "uppercase" : "none",
88
- wordBreak: props.breakWord ? "break-word" : "normal"
89
- });
90
- }, function (props) {
91
- return variant({
92
- prop: "weight",
93
- variants: {
94
- light: {
95
- fontWeight: themeGet("fontWeights.0")(props)
96
- },
97
- bold: {
98
- fontWeight: themeGet("fontWeights.2")(props)
99
- }
70
+ })(props => css({
71
+ fontFamily: themeGet("fonts.main")(props),
72
+ fontSize: themeGet("fontSizes.4")(props),
73
+ fontWeight: themeGet("fontWeights.1")(props),
74
+ textTransform: props.uppercase ? "uppercase" : "none",
75
+ wordBreak: props.breakWord ? "break-word" : "normal"
76
+ }), props => variant({
77
+ prop: "weight",
78
+ variants: {
79
+ light: {
80
+ fontWeight: themeGet("fontWeights.0")(props)
81
+ },
82
+ bold: {
83
+ fontWeight: themeGet("fontWeights.2")(props)
100
84
  }
101
- });
102
- }, function (props) {
103
- return variant({
104
- prop: "sizing",
105
- variants: {
106
- large: {
107
- fontSize: themeGet("fontSizes.5")(props)
108
- },
109
- small: {
110
- fontSize: themeGet("fontSizes.3")(props)
111
- }
85
+ }
86
+ }), props => variant({
87
+ prop: "sizing",
88
+ variants: {
89
+ large: {
90
+ fontSize: themeGet("fontSizes.5")(props)
91
+ },
92
+ small: {
93
+ fontSize: themeGet("fontSizes.3")(props)
112
94
  }
113
- });
114
- }, typeStyles);
115
- export var H4 = styled("h4").withConfig({
95
+ }
96
+ }), typeStyles);
97
+ export const H4 = styled("h4").withConfig({
116
98
  displayName: "Typography__H4",
117
99
  componentId: "sc-1613j99-3"
118
- })(function (props) {
119
- return css({
120
- fontFamily: themeGet("fonts.main")(props),
121
- fontSize: themeGet("fontSizes.3")(props),
122
- fontWeight: themeGet("fontWeights.1")(props),
123
- textTransform: props.uppercase ? "uppercase" : "none",
124
- wordBreak: props.breakWord ? "break-word" : "normal"
125
- });
126
- }, function (props) {
127
- return variant({
128
- prop: "weight",
129
- variants: {
130
- light: {
131
- fontWeight: themeGet("fontWeights.0")(props)
132
- },
133
- bold: {
134
- fontWeight: themeGet("fontWeights.2")(props)
135
- }
100
+ })(props => css({
101
+ fontFamily: themeGet("fonts.main")(props),
102
+ fontSize: themeGet("fontSizes.3")(props),
103
+ fontWeight: themeGet("fontWeights.1")(props),
104
+ textTransform: props.uppercase ? "uppercase" : "none",
105
+ wordBreak: props.breakWord ? "break-word" : "normal"
106
+ }), props => variant({
107
+ prop: "weight",
108
+ variants: {
109
+ light: {
110
+ fontWeight: themeGet("fontWeights.0")(props)
111
+ },
112
+ bold: {
113
+ fontWeight: themeGet("fontWeights.2")(props)
136
114
  }
137
- });
138
- }, function (props) {
139
- return variant({
140
- prop: "sizing",
141
- variants: {
142
- large: {
143
- fontSize: themeGet("fontSizes.4")(props)
144
- },
145
- small: {
146
- fontSize: themeGet("fontSizes.2")(props)
147
- }
115
+ }
116
+ }), props => variant({
117
+ prop: "sizing",
118
+ variants: {
119
+ large: {
120
+ fontSize: themeGet("fontSizes.4")(props)
121
+ },
122
+ small: {
123
+ fontSize: themeGet("fontSizes.2")(props)
148
124
  }
149
- });
150
- }, typeStyles);
151
- export var H5 = styled("h5").withConfig({
125
+ }
126
+ }), typeStyles);
127
+ export const H5 = styled("h5").withConfig({
152
128
  displayName: "Typography__H5",
153
129
  componentId: "sc-1613j99-4"
154
- })(function (props) {
155
- return css({
156
- fontFamily: themeGet("fonts.main")(props),
157
- fontSize: themeGet("fontSizes.2")(props),
158
- fontWeight: themeGet("fontWeights.1")(props),
159
- textTransform: props.uppercase ? "uppercase" : "none",
160
- wordBreak: props.breakWord ? "break-word" : "normal"
161
- });
162
- }, function (props) {
163
- return variant({
164
- prop: "weight",
165
- variants: {
166
- light: {
167
- fontWeight: themeGet("fontWeights.0")(props)
168
- },
169
- bold: {
170
- fontWeight: themeGet("fontWeights.2")(props)
171
- }
130
+ })(props => css({
131
+ fontFamily: themeGet("fonts.main")(props),
132
+ fontSize: themeGet("fontSizes.2")(props),
133
+ fontWeight: themeGet("fontWeights.1")(props),
134
+ textTransform: props.uppercase ? "uppercase" : "none",
135
+ wordBreak: props.breakWord ? "break-word" : "normal"
136
+ }), props => variant({
137
+ prop: "weight",
138
+ variants: {
139
+ light: {
140
+ fontWeight: themeGet("fontWeights.0")(props)
141
+ },
142
+ bold: {
143
+ fontWeight: themeGet("fontWeights.2")(props)
172
144
  }
173
- });
174
- }, function (props) {
175
- return variant({
176
- prop: "sizing",
177
- variants: {
178
- large: {
179
- fontSize: themeGet("fontSizes.3")(props)
180
- },
181
- small: {
182
- fontSize: themeGet("fontSizes.1")(props)
183
- }
145
+ }
146
+ }), props => variant({
147
+ prop: "sizing",
148
+ variants: {
149
+ large: {
150
+ fontSize: themeGet("fontSizes.3")(props)
151
+ },
152
+ small: {
153
+ fontSize: themeGet("fontSizes.1")(props)
184
154
  }
185
- });
186
- }, typeStyles);
187
- export var H6 = styled("h6").withConfig({
155
+ }
156
+ }), typeStyles);
157
+ export const H6 = styled("h6").withConfig({
188
158
  displayName: "Typography__H6",
189
159
  componentId: "sc-1613j99-5"
190
- })(function (props) {
191
- return css({
192
- fontFamily: themeGet("fonts.main")(props),
193
- fontSize: themeGet("fontSizes.1")(props),
194
- fontWeight: themeGet("fontWeights.1")(props),
195
- textTransform: props.uppercase ? "uppercase" : "none",
196
- wordBreak: props.breakWord ? "break-word" : "normal"
197
- });
198
- }, function (props) {
199
- return variant({
200
- prop: "weight",
201
- variants: {
202
- light: {
203
- fontWeight: themeGet("fontWeights.0")(props)
204
- },
205
- bold: {
206
- fontWeight: themeGet("fontWeights.2")(props)
207
- }
160
+ })(props => css({
161
+ fontFamily: themeGet("fonts.main")(props),
162
+ fontSize: themeGet("fontSizes.1")(props),
163
+ fontWeight: themeGet("fontWeights.1")(props),
164
+ textTransform: props.uppercase ? "uppercase" : "none",
165
+ wordBreak: props.breakWord ? "break-word" : "normal"
166
+ }), props => variant({
167
+ prop: "weight",
168
+ variants: {
169
+ light: {
170
+ fontWeight: themeGet("fontWeights.0")(props)
171
+ },
172
+ bold: {
173
+ fontWeight: themeGet("fontWeights.2")(props)
208
174
  }
209
- });
210
- }, function (props) {
211
- return variant({
212
- prop: "sizing",
213
- variants: {
214
- large: {
215
- fontSize: themeGet("fontSizes.2")(props)
216
- },
217
- small: {
218
- fontSize: themeGet("fontSizes.0")(props)
219
- }
175
+ }
176
+ }), props => variant({
177
+ prop: "sizing",
178
+ variants: {
179
+ large: {
180
+ fontSize: themeGet("fontSizes.2")(props)
181
+ },
182
+ small: {
183
+ fontSize: themeGet("fontSizes.0")(props)
220
184
  }
221
- });
222
- }, typeStyles);
223
- export var P = styled("p").withConfig({
185
+ }
186
+ }), typeStyles);
187
+ export const P = styled("p").withConfig({
224
188
  displayName: "Typography__P",
225
189
  componentId: "sc-1613j99-6"
226
- })(function (props) {
227
- return css({
228
- fontFamily: themeGet("fonts.main")(props),
229
- fontSize: themeGet("fontSizes.2")(props),
230
- fontWeight: themeGet("fontWeights.1")(props),
231
- textTransform: props.uppercase ? "uppercase" : "none",
232
- wordBreak: props.breakWord ? "break-word" : "normal"
233
- });
234
- }, function (props) {
235
- return variant({
236
- prop: "weight",
237
- variants: {
238
- light: {
239
- fontWeight: themeGet("fontWeights.0")(props)
240
- },
241
- bold: {
242
- fontWeight: themeGet("fontWeights.2")(props)
243
- }
190
+ })(props => css({
191
+ fontFamily: themeGet("fonts.main")(props),
192
+ fontSize: themeGet("fontSizes.2")(props),
193
+ fontWeight: themeGet("fontWeights.1")(props),
194
+ textTransform: props.uppercase ? "uppercase" : "none",
195
+ wordBreak: props.breakWord ? "break-word" : "normal"
196
+ }), props => variant({
197
+ prop: "weight",
198
+ variants: {
199
+ light: {
200
+ fontWeight: themeGet("fontWeights.0")(props)
201
+ },
202
+ bold: {
203
+ fontWeight: themeGet("fontWeights.2")(props)
244
204
  }
245
- });
246
- }, function (props) {
247
- return variant({
248
- prop: "sizing",
249
- variants: {
250
- large: {
251
- fontSize: themeGet("fontSizes.3")(props)
252
- }
205
+ }
206
+ }), props => variant({
207
+ prop: "sizing",
208
+ variants: {
209
+ large: {
210
+ fontSize: themeGet("fontSizes.3")(props)
253
211
  }
254
- });
255
- }, typeStyles);
256
- export var Small = styled("small").withConfig({
257
- shouldForwardProp: shouldForwardProp,
212
+ }
213
+ }), typeStyles);
214
+ export const Small = styled("small").withConfig({
215
+ shouldForwardProp,
258
216
  displayName: "Typography__Small",
259
217
  componentId: "sc-1613j99-7"
260
218
  }).attrs({
261
219
  className: "Small"
262
- })(function (props) {
263
- return css({
264
- fontSize: themeGet("fontSizes.1")(props),
265
- textTransform: props.uppercase ? "uppercase" : "none",
266
- wordBreak: props.breakWord ? "break-word" : "normal"
267
- });
268
- }, function (props) {
269
- return variant({
270
- prop: "weight",
271
- variants: {
272
- light: {
273
- fontWeight: themeGet("fontWeights.0")(props)
274
- },
275
- bold: {
276
- fontWeight: themeGet("fontWeights.2")(props)
277
- }
220
+ })(props => css({
221
+ fontSize: themeGet("fontSizes.1")(props),
222
+ textTransform: props.uppercase ? "uppercase" : "none",
223
+ wordBreak: props.breakWord ? "break-word" : "normal"
224
+ }), props => variant({
225
+ prop: "weight",
226
+ variants: {
227
+ light: {
228
+ fontWeight: themeGet("fontWeights.0")(props)
229
+ },
230
+ bold: {
231
+ fontWeight: themeGet("fontWeights.2")(props)
278
232
  }
279
- });
280
- }, typeStyles);
281
- export var Text = styled("span").withConfig({
233
+ }
234
+ }), typeStyles);
235
+ export const Text = styled("span").withConfig({
282
236
  displayName: "Typography__Text",
283
237
  componentId: "sc-1613j99-8"
284
- })(function (props) {
285
- return css({
286
- fontFamily: themeGet("fonts.main")(props),
287
- fontSize: themeGet("fontSizes.2")(props),
288
- fontWeight: themeGet("fontWeights.1")(props),
289
- textTransform: props.uppercase ? "uppercase" : "none",
290
- wordBreak: props.breakWord ? "break-word" : "normal"
291
- });
292
- }, function (props) {
293
- return variant({
294
- prop: "weight",
295
- variants: {
296
- light: {
297
- fontWeight: themeGet("fontWeights.0")(props)
298
- },
299
- bold: {
300
- fontWeight: themeGet("fontWeights.2")(props)
301
- }
238
+ })(props => css({
239
+ fontFamily: themeGet("fonts.main")(props),
240
+ fontSize: themeGet("fontSizes.2")(props),
241
+ fontWeight: themeGet("fontWeights.1")(props),
242
+ textTransform: props.uppercase ? "uppercase" : "none",
243
+ wordBreak: props.breakWord ? "break-word" : "normal"
244
+ }), props => variant({
245
+ prop: "weight",
246
+ variants: {
247
+ light: {
248
+ fontWeight: themeGet("fontWeights.0")(props)
249
+ },
250
+ bold: {
251
+ fontWeight: themeGet("fontWeights.2")(props)
302
252
  }
303
- });
304
- }, function (props) {
305
- return variant({
306
- prop: "sizing",
307
- variants: {
308
- large: {
309
- fontSize: themeGet("fontSizes.3")(props)
310
- }
253
+ }
254
+ }), props => variant({
255
+ prop: "sizing",
256
+ variants: {
257
+ large: {
258
+ fontSize: themeGet("fontSizes.3")(props)
311
259
  }
312
- });
313
- }, typeStyles);
314
- export var Quote = styled("blockquote").withConfig({
260
+ }
261
+ }), typeStyles);
262
+ export const Quote = styled("blockquote").withConfig({
315
263
  displayName: "Typography__Quote",
316
264
  componentId: "sc-1613j99-9"
317
- })(function (props) {
318
- return css({
265
+ })(props => css({
266
+ display: "block",
267
+ fontSize: themeGet("fontSizes.3")(props),
268
+ fontWeight: themeGet("fontWeights.1")(props),
269
+ borderLeftStyle: "solid",
270
+ borderLeftWidth: 3,
271
+ borderLeftColor: "greyLight",
272
+ p: 4,
273
+ em: {
319
274
  display: "block",
320
- fontSize: themeGet("fontSizes.3")(props),
321
- fontWeight: themeGet("fontWeights.1")(props),
322
- borderLeftStyle: "solid",
323
- borderLeftWidth: 3,
324
- borderLeftColor: "greyLight",
325
- p: 4,
326
- em: {
327
- display: "block",
328
- fontStyle: "italic",
329
- fontSize: themeGet("fontSizes.2")(props),
330
- color: themeGet("colors.greyDark")(props)
331
- }
332
- });
333
- }, typeStyles);
334
- export var Code = styled("div").withConfig({
275
+ fontStyle: "italic",
276
+ fontSize: themeGet("fontSizes.2")(props),
277
+ color: themeGet("colors.greyDark")(props)
278
+ }
279
+ }), typeStyles);
280
+ export const Code = styled("div").withConfig({
335
281
  displayName: "Typography__Code",
336
282
  componentId: "sc-1613j99-10"
337
- })(function (props) {
338
- return css({
339
- padding: 3,
340
- fontSize: themeGet("fontSizes.2")(props),
341
- fontFamily: "monospace",
342
- backgroundColor: themeGet("colors.warningLightest")(props)
343
- });
344
- });
283
+ })(props => css({
284
+ padding: 3,
285
+ fontSize: themeGet("fontSizes.2")(props),
286
+ fontFamily: "monospace",
287
+ backgroundColor: themeGet("colors.warningLightest")(props)
288
+ }));
345
289
  export default {
346
- H1: H1,
347
- H2: H2,
348
- H3: H3,
349
- H4: H4,
350
- H5: H5,
351
- H6: H6,
352
- P: P,
353
- Text: Text,
354
- Quote: Quote,
355
- Small: Small,
356
- Code: Code
290
+ H1,
291
+ H2,
292
+ H3,
293
+ H4,
294
+ H5,
295
+ H6,
296
+ P,
297
+ Text,
298
+ Quote,
299
+ Small,
300
+ Code
357
301
  };
@@ -1,4 +1,4 @@
1
1
  import * as components from ".";
2
- test("all components exported", function () {
2
+ test("all components exported", () => {
3
3
  expect(Object.keys(components)).toMatchInlineSnapshot("\n Array [\n \"ActionsMenu\",\n \"ActionsMenuBody\",\n \"ActionsMenuHeading\",\n \"ActionsMenuItem\",\n \"Avatar\",\n \"Badge\",\n \"Box\",\n \"Button\",\n \"ButtonGroupContainer\",\n \"ButtonGroupItem\",\n \"ButtonLink\",\n \"Card\",\n \"Checkbox\",\n \"Code\",\n \"DatePicker\",\n \"Divider\",\n \"Expandable\",\n \"Flex\",\n \"FlexItem\",\n \"GlobalStyles\",\n \"Grid\",\n \"GridItem\",\n \"H1\",\n \"H2\",\n \"H3\",\n \"H4\",\n \"H5\",\n \"H6\",\n \"Header\",\n \"HeaderSimple\",\n \"Icon\",\n \"Loading\",\n \"Modal\",\n \"Notification\",\n \"P\",\n \"Popover\",\n \"ProgressBar\",\n \"Quote\",\n \"RadioButton\",\n \"Range\",\n \"Select\",\n \"SideNav\",\n \"Sidebar\",\n \"SidebarClose\",\n \"SidebarPanel\",\n \"SidebarPanels\",\n \"SidebarTab\",\n \"SidebarTabs\",\n \"Small\",\n \"Spacer\",\n \"StatusDot\",\n \"StyledLink\",\n \"SystemThemeProvider\",\n \"Tab\",\n \"Table\",\n \"TabsContainer\",\n \"Tag\",\n \"Text\",\n \"TextArea\",\n \"TextInput\",\n \"Toggle\",\n \"TreeNav\",\n \"Typography\",\n \"VARIANT_COLORS\",\n \"getOptionByValue\",\n \"styleLink\",\n \"systemThemeCollapsed\",\n \"systemtheme\",\n ]\n ");
4
4
  });
@@ -1,22 +1,18 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
1
  import { useEffect, useRef, useState } from "react";
3
2
  export default function useIsVisible() {
4
- var _useState = useState(false),
5
- _useState2 = _slicedToArray(_useState, 2),
6
- isVisible = _useState2[0],
7
- setIsVisible = _useState2[1];
8
- var ref = useRef();
9
- useEffect(function () {
3
+ const [isVisible, setIsVisible] = useState(false);
4
+ const ref = useRef();
5
+ useEffect(() => {
10
6
  if (!ref.current) return;
11
- var interval = window.setInterval(function () {
7
+ const interval = window.setInterval(() => {
12
8
  if (ref.current) {
13
- var currentIsVisible = window.getComputedStyle(ref.current).visibility === "visible";
9
+ const currentIsVisible = window.getComputedStyle(ref.current).visibility === "visible";
14
10
  if (isVisible !== currentIsVisible) {
15
11
  setIsVisible(currentIsVisible);
16
12
  }
17
13
  }
18
14
  }, 250);
19
- return function () {
15
+ return () => {
20
16
  clearInterval(interval);
21
17
  };
22
18
  }, [ref, isVisible]);