@sproutsocial/racine 18.0.0 → 19.0.1

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 (107) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/__flow__/index.flow.js +1 -8
  3. package/commonjs/Card/subComponents.js +6 -0
  4. package/commonjs/Collapsible/Collapsible.js +2 -2
  5. package/commonjs/TableHeaderCell/TableHeaderCell.js +3 -1
  6. package/commonjs/Toast/styles.js +2 -4
  7. package/commonjs/index.flow.js +48 -64
  8. package/commonjs/index.js +8 -24
  9. package/commonjs/react.d.js +1 -0
  10. package/commonjs/themes/light/theme.js +33 -1
  11. package/commonjs/utils/use-measure.js +65 -0
  12. package/dist/themes/dark/theme.scss +28 -0
  13. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +28 -0
  14. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +28 -0
  15. package/dist/themes/light/theme.scss +56 -0
  16. package/dist/types/Box/Box.d.ts +1 -1
  17. package/dist/types/Box/Box.d.ts.map +1 -1
  18. package/dist/types/Card/Card.d.ts.map +1 -1
  19. package/dist/types/Card/subComponents.d.ts.map +1 -1
  20. package/dist/types/Card/utils.d.ts +1 -0
  21. package/dist/types/Card/utils.d.ts.map +1 -1
  22. package/dist/types/Checkbox/styles.d.ts +1 -1
  23. package/dist/types/Checkbox/styles.d.ts.map +1 -1
  24. package/dist/types/Collapsible/styles.d.ts +1 -1
  25. package/dist/types/DatePicker/styles.d.ts +1 -1
  26. package/dist/types/Drawer/styles.d.ts +1 -1
  27. package/dist/types/Drawer/styles.d.ts.map +1 -1
  28. package/dist/types/Fieldset/styles.d.ts +1 -1
  29. package/dist/types/Fieldset/styles.d.ts.map +1 -1
  30. package/dist/types/Menu/styles.d.ts +2 -2
  31. package/dist/types/Menu/styles.d.ts.map +1 -1
  32. package/dist/types/Menu/utils/hooks.d.ts +1 -0
  33. package/dist/types/Menu/utils/hooks.d.ts.map +1 -1
  34. package/dist/types/Message/styles.d.ts +6 -5
  35. package/dist/types/Message/styles.d.ts.map +1 -1
  36. package/dist/types/Modal/Modal.d.ts +1 -1
  37. package/dist/types/Modal/styles.d.ts +4 -4
  38. package/dist/types/Modal/styles.d.ts.map +1 -1
  39. package/dist/types/SegmentedControl/styles.d.ts +2 -2
  40. package/dist/types/SegmentedControl/styles.d.ts.map +1 -1
  41. package/dist/types/Skeleton/Skeleton.d.ts +1 -1
  42. package/dist/types/Skeleton/Skeleton.d.ts.map +1 -1
  43. package/dist/types/StatefulStory.d.ts +1 -0
  44. package/dist/types/StatefulStory.d.ts.map +1 -1
  45. package/dist/types/TableHeaderCell/TableHeaderCell.d.ts.map +1 -1
  46. package/dist/types/Toast/styles.d.ts +2 -1
  47. package/dist/types/Toast/styles.d.ts.map +1 -1
  48. package/dist/types/Tooltip/styles.d.ts +1 -1
  49. package/dist/types/Tooltip/styles.d.ts.map +1 -1
  50. package/dist/types/index.d.ts +1 -5
  51. package/dist/types/index.d.ts.map +1 -1
  52. package/dist/types/themes/dark/theme.d.ts +28 -0
  53. package/dist/types/themes/dark/theme.d.ts.map +1 -1
  54. package/dist/types/themes/light/theme.d.ts +56 -0
  55. package/dist/types/themes/light/theme.d.ts.map +1 -1
  56. package/dist/types/utils/use-measure.d.ts +14 -0
  57. package/dist/types/utils/use-measure.d.ts.map +1 -0
  58. package/lib/Card/subComponents.js +6 -0
  59. package/lib/Collapsible/Collapsible.js +1 -1
  60. package/lib/TableHeaderCell/TableHeaderCell.js +3 -1
  61. package/lib/Toast/styles.js +2 -3
  62. package/lib/index.flow.js +1 -7
  63. package/lib/index.js +2 -7
  64. package/lib/react.d.js +0 -0
  65. package/lib/themes/light/theme.js +30 -0
  66. package/lib/utils/use-measure.js +59 -0
  67. package/package.json +30 -36
  68. package/__flow__/OverflowList/OverflowList.flow.js +0 -22
  69. package/__flow__/OverflowList/index.flow.js +0 -2
  70. package/__flow__/dataviz/DataVizRotation.flow.js +0 -12
  71. package/__flow__/dataviz/index.flow.js +0 -2
  72. package/commonjs/OverflowList/OverflowList.flow.js +0 -6
  73. package/commonjs/OverflowList/OverflowList.js +0 -115
  74. package/commonjs/OverflowList/OverflowListTypes.js +0 -5
  75. package/commonjs/OverflowList/index.flow.js +0 -16
  76. package/commonjs/OverflowList/index.js +0 -31
  77. package/commonjs/OverflowList/styles.js +0 -25
  78. package/commonjs/dataviz/DataVizRotation.flow.js +0 -6
  79. package/commonjs/dataviz/DataVizRotation.js +0 -21
  80. package/commonjs/dataviz/DataVizRotationTypes.js +0 -5
  81. package/commonjs/dataviz/index.flow.js +0 -16
  82. package/commonjs/dataviz/index.js +0 -27
  83. package/dist/types/OverflowList/OverflowList.d.ts +0 -5
  84. package/dist/types/OverflowList/OverflowList.d.ts.map +0 -1
  85. package/dist/types/OverflowList/OverflowListTypes.d.ts +0 -16
  86. package/dist/types/OverflowList/OverflowListTypes.d.ts.map +0 -1
  87. package/dist/types/OverflowList/index.d.ts +0 -5
  88. package/dist/types/OverflowList/index.d.ts.map +0 -1
  89. package/dist/types/OverflowList/styles.d.ts +0 -4
  90. package/dist/types/OverflowList/styles.d.ts.map +0 -1
  91. package/dist/types/dataviz/DataVizRotation.d.ts +0 -5
  92. package/dist/types/dataviz/DataVizRotation.d.ts.map +0 -1
  93. package/dist/types/dataviz/DataVizRotationTypes.d.ts +0 -5
  94. package/dist/types/dataviz/DataVizRotationTypes.d.ts.map +0 -1
  95. package/dist/types/dataviz/index.d.ts +0 -3
  96. package/dist/types/dataviz/index.d.ts.map +0 -1
  97. package/lib/OverflowList/OverflowList.flow.js +0 -1
  98. package/lib/OverflowList/OverflowList.js +0 -104
  99. package/lib/OverflowList/OverflowListTypes.js +0 -1
  100. package/lib/OverflowList/index.flow.js +0 -1
  101. package/lib/OverflowList/index.js +0 -4
  102. package/lib/OverflowList/styles.js +0 -14
  103. package/lib/dataviz/DataVizRotation.flow.js +0 -1
  104. package/lib/dataviz/DataVizRotation.js +0 -13
  105. package/lib/dataviz/DataVizRotationTypes.js +0 -1
  106. package/lib/dataviz/index.flow.js +0 -1
  107. package/lib/dataviz/index.js +0 -2
package/lib/index.flow.js CHANGED
@@ -42,7 +42,6 @@ export { default as Menu, MenuButton, MenuButtonContext, MenuItemContainer } fro
42
42
  export { default as Message } from "./Message/index.flow";
43
43
  export { default as Modal } from "./Modal/index.flow";
44
44
  export { default as Numeral } from "./Numeral/index.flow";
45
- export { default as OverflowList } from "./OverflowList/index.flow";
46
45
  export { default as PartnerLogo } from "./PartnerLogo/index.flow";
47
46
  export { default as Popout } from "./Popout/index.flow";
48
47
  export { default as Radio } from "./Radio/index.flow";
@@ -77,9 +76,4 @@ export { legacyBadgeColors } from "./Badge/index.flow";
77
76
  /**
78
77
  * @deprecated Alert has been renamed to Banner
79
78
  */
80
- export { default as Alert } from "./Banner/index.flow";
81
-
82
- /**
83
- * Should this be exported? @deprecated?
84
- */
85
- export { DataVizRotation } from "./dataviz/index.flow";
79
+ export { default as Alert } from "./Banner/index.flow";
package/lib/index.js CHANGED
@@ -15,6 +15,7 @@ export { default as ThemeProvider } from "./ThemeProvider";
15
15
  export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
16
16
  export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
17
17
  export { useInteractiveColor } from "./utils/useInteractiveColor";
18
+ export { useMeasure } from "./utils/use-measure";
18
19
 
19
20
  /* Components */
20
21
  export * from "./Avatar";
@@ -47,7 +48,6 @@ export * from "./Menu";
47
48
  export * from "./Message";
48
49
  export * from "./Modal";
49
50
  export * from "./Numeral";
50
- export * from "./OverflowList";
51
51
  export * from "./PartnerLogo";
52
52
  export * from "./Popout";
53
53
  export * from "./Radio";
@@ -74,9 +74,4 @@ export * from "./VisuallyHidden";
74
74
  /**
75
75
  * @deprecated Alert has been renamed to Banner
76
76
  */
77
- export { Banner as Alert } from "./Banner";
78
-
79
- /**
80
- * Should this be exported? @deprecated?
81
- */
82
- export * from "./dataviz";
77
+ export { Banner as Alert } from "./Banner";
package/lib/react.d.js ADDED
File without changes
@@ -286,6 +286,34 @@ export var typography = {
286
286
  1100: TYPOGRAPHY.TYPOGRAPHY_SIZE_1100,
287
287
  1200: TYPOGRAPHY.TYPOGRAPHY_SIZE_1200
288
288
  };
289
+ export var fontSizes = {
290
+ 100: TYPOGRAPHY.TYPOGRAPHY_SIZE_100.fontSize,
291
+ 200: TYPOGRAPHY.TYPOGRAPHY_SIZE_200.fontSize,
292
+ 300: TYPOGRAPHY.TYPOGRAPHY_SIZE_300.fontSize,
293
+ 400: TYPOGRAPHY.TYPOGRAPHY_SIZE_400.fontSize,
294
+ 500: TYPOGRAPHY.TYPOGRAPHY_SIZE_500.fontSize,
295
+ 600: TYPOGRAPHY.TYPOGRAPHY_SIZE_600.fontSize,
296
+ 700: TYPOGRAPHY.TYPOGRAPHY_SIZE_700.fontSize,
297
+ 800: TYPOGRAPHY.TYPOGRAPHY_SIZE_800.fontSize,
298
+ 900: TYPOGRAPHY.TYPOGRAPHY_SIZE_900.fontSize,
299
+ 1000: TYPOGRAPHY.TYPOGRAPHY_SIZE_1000.fontSize,
300
+ 1100: TYPOGRAPHY.TYPOGRAPHY_SIZE_1100.fontSize,
301
+ 1200: TYPOGRAPHY.TYPOGRAPHY_SIZE_1200.fontSize
302
+ };
303
+ export var lineHeights = {
304
+ 100: TYPOGRAPHY.TYPOGRAPHY_SIZE_100.lineHeight,
305
+ 200: TYPOGRAPHY.TYPOGRAPHY_SIZE_200.lineHeight,
306
+ 300: TYPOGRAPHY.TYPOGRAPHY_SIZE_300.lineHeight,
307
+ 400: TYPOGRAPHY.TYPOGRAPHY_SIZE_400.lineHeight,
308
+ 500: TYPOGRAPHY.TYPOGRAPHY_SIZE_500.lineHeight,
309
+ 600: TYPOGRAPHY.TYPOGRAPHY_SIZE_600.lineHeight,
310
+ 700: TYPOGRAPHY.TYPOGRAPHY_SIZE_700.lineHeight,
311
+ 800: TYPOGRAPHY.TYPOGRAPHY_SIZE_800.lineHeight,
312
+ 900: TYPOGRAPHY.TYPOGRAPHY_SIZE_900.lineHeight,
313
+ 1000: TYPOGRAPHY.TYPOGRAPHY_SIZE_1000.lineHeight,
314
+ 1100: TYPOGRAPHY.TYPOGRAPHY_SIZE_1100.lineHeight,
315
+ 1200: TYPOGRAPHY.TYPOGRAPHY_SIZE_1200.lineHeight
316
+ };
289
317
  export var fontFamily = TYPOGRAPHY.TYPOGRAPHY_FAMILY;
290
318
  export var fontWeights = {
291
319
  normal: TYPOGRAPHY.TYPOGRAPHY_WEIGHT_NORMAL,
@@ -340,6 +368,8 @@ var theme = {
340
368
  typography: _objectSpread(_objectSpread({}, typography), {}, {
341
369
  typography: typography
342
370
  }),
371
+ fontSizes: fontSizes,
372
+ lineHeights: lineHeights,
343
373
  fontFamily: fontFamily,
344
374
  fontWeights: fontWeights,
345
375
  space: _objectSpread(_objectSpread({}, space), {}, {
@@ -0,0 +1,59 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useState, useLayoutEffect } from 'react';
8
+ var initialBounds = Object.freeze({
9
+ x: 0,
10
+ y: 0,
11
+ width: 0,
12
+ height: 0,
13
+ top: 0,
14
+ right: 0,
15
+ bottom: 0,
16
+ left: 0
17
+ });
18
+ export function useMeasure(ref) {
19
+ var _useState = useState(initialBounds),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ bounds = _useState2[0],
22
+ setContentRect = _useState2[1];
23
+ useLayoutEffect(function () {
24
+ var element = ref.current;
25
+ if (!element ||
26
+ // in non-browser environments (e.g. Jest tests) ResizeObserver is not defined
27
+ !('ResizeObserver' in window)) {
28
+ return;
29
+ }
30
+ var resizeObserver = new ResizeObserver(function (_ref) {
31
+ var _ref2 = _slicedToArray(_ref, 1),
32
+ entry = _ref2[0];
33
+ var _entry$contentRect = entry.contentRect,
34
+ x = _entry$contentRect.x,
35
+ y = _entry$contentRect.y,
36
+ width = _entry$contentRect.width,
37
+ height = _entry$contentRect.height,
38
+ top = _entry$contentRect.top,
39
+ right = _entry$contentRect.right,
40
+ bottom = _entry$contentRect.bottom,
41
+ left = _entry$contentRect.left;
42
+ setContentRect({
43
+ x: x,
44
+ y: y,
45
+ width: width,
46
+ height: height,
47
+ top: top,
48
+ right: right,
49
+ bottom: bottom,
50
+ left: left
51
+ });
52
+ });
53
+ resizeObserver.observe(ref.current);
54
+ return function () {
55
+ resizeObserver.disconnect();
56
+ };
57
+ }, [ref]);
58
+ return bounds;
59
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "18.0.0",
3
+ "version": "19.0.1",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",
@@ -61,8 +61,8 @@
61
61
  "**/*": [
62
62
  "prettier --write"
63
63
  ],
64
- "**/*.js": [
65
- "eslint --fix"
64
+ "**/*.{ts,tsx,js}": [
65
+ "eslint --max-warnings=0 --fix --ext .ts,.tsx,.js"
66
66
  ],
67
67
  "*.scss": [
68
68
  "stylelint --fix"
@@ -82,21 +82,19 @@
82
82
  "polished": "^3.4.1",
83
83
  "raw-loader": "^3.0.0",
84
84
  "react-focus-lock": "^2.0.3",
85
- "react-modal": "^3.8.1",
86
- "react-popper": "^1.3.3",
85
+ "react-modal": "^3.16.1",
86
+ "react-popper": "^1.3.11",
87
87
  "react-spring": "^8.0.25",
88
88
  "react-toastify": "^6.0.5",
89
- "react-virtualized": "9.18.5",
90
89
  "scroll-into-view-if-needed": "1.1.0",
91
- "styled-system": "^5.1.5",
92
- "use-measure": "^0.2.2"
90
+ "styled-system": "^5.1.5"
93
91
  },
94
92
  "devDependencies": {
95
93
  "@babel/cli": "^7.5.5",
96
94
  "@babel/core": "^7.20.2",
97
- "@babel/eslint-parser": "^7.19.1",
98
- "@babel/plugin-syntax-flow": "^7.18.6",
99
- "@babel/plugin-syntax-jsx": "^7.18.6",
95
+ "@babel/eslint-parser": "^7.22.10",
96
+ "@babel/plugin-syntax-flow": "^7.22.5",
97
+ "@babel/plugin-syntax-jsx": "^7.22.5",
100
98
  "@babel/preset-env": "^7.20.2",
101
99
  "@babel/preset-flow": "^7.0.0",
102
100
  "@babel/preset-react": "^7.0.0",
@@ -125,15 +123,14 @@
125
123
  "@types/jest": "^27.0.0",
126
124
  "@types/jest-axe": "^3.5.5",
127
125
  "@types/node": "^16.15.0",
128
- "@types/react": "^16.0.0",
126
+ "@types/react": "^17.0.0",
129
127
  "@types/react-dates": "^21.8.3",
130
- "@types/react-dom": "^16.0.0",
131
- "@types/react-modal": "^3.13.1",
132
- "@types/react-virtualized": "9.18.*",
128
+ "@types/react-dom": "^17.0.0",
129
+ "@types/react-modal": "^3.16.0",
133
130
  "@types/styled-components": "^5.1.26",
134
131
  "@types/styled-system": "^5.1.15",
135
- "@typescript-eslint/eslint-plugin": "^5.43.0",
136
- "@typescript-eslint/parser": "^5.43.0",
132
+ "@typescript-eslint/eslint-plugin": "^6.3.0",
133
+ "@typescript-eslint/parser": "^6.3.0",
137
134
  "babel-eslint": "^10.1.0",
138
135
  "babel-jest": "29.x.x",
139
136
  "babel-loader": "8.2.3",
@@ -146,21 +143,21 @@
146
143
  "chalk": "^2.3.2",
147
144
  "chokidar": "^3.0.2",
148
145
  "csstype": "^3.1.1",
149
- "eslint": "7.27.0",
150
- "eslint-config-prettier": "^6.11.0",
151
- "eslint-config-react-app": "^5.2.1",
146
+ "eslint": "^8.46.0",
147
+ "eslint-config-prettier": "^9.0.0",
148
+ "eslint-config-react-app": "^7.0.1",
152
149
  "eslint-import-resolver-babel-module": "^5.3.1",
153
- "eslint-import-resolver-typescript": "^3.5.2",
150
+ "eslint-import-resolver-typescript": "^3.6.0",
154
151
  "eslint-plugin-babel": "^5.3.1",
155
- "eslint-plugin-flowtype": "^5.7.2",
156
- "eslint-plugin-import": "^2.26.0",
157
- "eslint-plugin-jest": "^27.1.5",
158
- "eslint-plugin-jest-dom": "^4.0.3",
152
+ "eslint-plugin-flowtype": "^8.0.3",
153
+ "eslint-plugin-import": "^2.28.0",
154
+ "eslint-plugin-jest": "^27.2.3",
155
+ "eslint-plugin-jest-dom": "^5.0.2",
159
156
  "eslint-plugin-jsx-a11y": "^6.3.1",
160
- "eslint-plugin-prettier": "^3.1.4",
161
- "eslint-plugin-react": "^7.31.10",
157
+ "eslint-plugin-prettier": "^5.0.0",
158
+ "eslint-plugin-react": "^7.33.1",
162
159
  "eslint-plugin-react-hooks": "^4.6.0",
163
- "eslint-plugin-testing-library": "^5.9.1",
160
+ "eslint-plugin-testing-library": "^5.11.1",
164
161
  "flow-bin": "0.131.0",
165
162
  "flowgen": "^1.21.0",
166
163
  "glob": "^7.1.6",
@@ -180,9 +177,9 @@
180
177
  "pify": "^4.0.1",
181
178
  "prettier": "^2.7.1",
182
179
  "prop-types": "^15.6.1",
183
- "react": "^16.12.0",
180
+ "react": "^17.0.2",
184
181
  "react-dates": "^21.8.0",
185
- "react-dom": "^16.12.0",
182
+ "react-dom": "^17.0.2",
186
183
  "rimraf": "^2.6.3",
187
184
  "storybook-dark-mode": "^1.0.9",
188
185
  "styled-components": "^5.2.3",
@@ -207,15 +204,12 @@
207
204
  "@sproutsocial/seeds-typography": ">=2.0.0",
208
205
  "moment": "^2.29.4",
209
206
  "prop-types": "^15.0.0",
210
- "react": ">=16.8.0",
207
+ "react": "^16.8.0 || ^17.0.0",
211
208
  "react-dates": "^21.8.0",
212
- "react-virtualized": "9.18.5",
213
- "styled-components": "^5.2.3",
214
- "react-dom": "^16.12.0"
209
+ "react-dom": "^16.8.0 || ^17.0.0",
210
+ "styled-components": "^5.2.3"
215
211
  },
216
212
  "resolutions": {
217
- "@types/react": "^16.0.0",
218
- "@types/react-dom": "^16.0.0",
219
213
  "lodash": "^4.17.21",
220
214
  "react-popper/create-react-context": "^0.3.0",
221
215
  "glob-parent": "^5.1.2",
@@ -1,22 +0,0 @@
1
- // @flow
2
- import * as React from 'react';
3
- import type { TypeContainerProps } from "../Box/index.flow";
4
- export type TypeVirtualizedListProps = {|
5
- items: Array<*>,
6
- ItemComponent: React.ComponentType<*>,
7
- getItemProps: (*) => *,
8
- itemWrapperProps?: TypeContainerProps,
9
- containerProps?: TypeContainerProps,
10
- |};
11
- export type TypeOverflowListProps = {|
12
- height: string,
13
- width: string,
14
- items?: Array<*>,
15
- children?: React.Node,
16
- ItemComponent?: React.ComponentType<*>,
17
- getItemProps?: (*) => *,
18
- itemWrapperProps?: TypeContainerProps,
19
- containerProps?: TypeContainerProps,
20
- |};
21
- declare var OverflowList: React.StatelessFunctionalComponent<TypeOverflowListProps>;
22
- declare export default typeof OverflowList;
@@ -1,2 +0,0 @@
1
- // @flow
2
- export * from "./OverflowList.flow";
@@ -1,12 +0,0 @@
1
- // @flow
2
- import * as React from 'react';
3
- import type { TypeSproutTheme } from "../types/theme.flow";
4
- export type TypeDataVizRotationProps = {
5
- theme: TypeSproutTheme,
6
- ...
7
- };
8
- declare export var DataVizRotation: React.AbstractComponent<
9
- // Component props minus theme prop which is handled by withTheme
10
- $Diff<TypeDataVizRotationProps, {|
11
- theme: TypeSproutTheme
12
- |}>, void>;
@@ -1,2 +0,0 @@
1
- // @flow
2
- export * from "./DataVizRotation.flow";
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
- var React = _interopRequireWildcard(require("react"));
5
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
6
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -1,115 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _reactVirtualized = require("react-virtualized");
10
- var _Box = _interopRequireDefault(require("../Box"));
11
- var _styles = _interopRequireDefault(require("./styles"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
- var VirtualizedList = function VirtualizedList(_ref) {
17
- var items = _ref.items,
18
- ItemComponent = _ref.ItemComponent,
19
- getItemProps = _ref.getItemProps,
20
- itemWrapperProps = _ref.itemWrapperProps,
21
- containerProps = _ref.containerProps;
22
- var cache = (0, _react.useMemo)(function () {
23
- return new _reactVirtualized.CellMeasurerCache({
24
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
25
- // @ts-ignore this should be able to accept a string but only accepts a number
26
- defaultWidth: '100%',
27
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
28
- // @ts-ignore this should be able to accept a string but only accepts a number
29
- defaultHeight: '20px',
30
- fixedWidth: true
31
- });
32
- }, []);
33
- var rowRenderer = (0, _react.useCallback)(function (_ref2) {
34
- var index = _ref2.index,
35
- key = _ref2.key,
36
- style = _ref2.style,
37
- parent = _ref2.parent;
38
- return /*#__PURE__*/_react.default.createElement(_reactVirtualized.CellMeasurer, {
39
- columnIndex: 0,
40
- rowIndex: index,
41
- key: "CellMeasurer-".concat(key),
42
- cache: cache,
43
- parent: parent
44
- }, function (_ref3) {
45
- var measure = _ref3.measure,
46
- registerChild = _ref3.registerChild;
47
- return /*#__PURE__*/_react.default.createElement(_Box.default, _extends({
48
- ref: registerChild
49
- }, itemWrapperProps, {
50
- style: style
51
- }), /*#__PURE__*/_react.default.createElement(ItemComponent, getItemProps({
52
- key: key,
53
- measure: measure,
54
- item: items[index]
55
- })));
56
- });
57
- },
58
- // eslint-disable-next-line react-hooks/exhaustive-deps
59
- [items, getItemProps, cache, itemWrapperProps]);
60
- return /*#__PURE__*/_react.default.createElement(_reactVirtualized.AutoSizer, null, function (_ref4) {
61
- var height = _ref4.height,
62
- width = _ref4.width;
63
- return /*#__PURE__*/_react.default.createElement(_styles.default, _extends({
64
- height: height,
65
- width: width,
66
- rowHeight: cache.rowHeight,
67
- rowRenderer: rowRenderer,
68
- rowCount: items.length
69
- }, containerProps));
70
- });
71
- };
72
- var ListItem = function ListItem(_ref5) {
73
- var children = _ref5.children;
74
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
75
- };
76
- var propGetter = function propGetter(_ref6) {
77
- var item = _ref6.item,
78
- key = _ref6.key;
79
- return {
80
- children: /*#__PURE__*/_react.default.cloneElement(item),
81
- key: key
82
- };
83
- };
84
- var defaultProp = {};
85
- var OverflowList = function OverflowList(_ref7) {
86
- var height = _ref7.height,
87
- width = _ref7.width,
88
- items = _ref7.items,
89
- children = _ref7.children,
90
- _ref7$ItemComponent = _ref7.ItemComponent,
91
- ItemComponent = _ref7$ItemComponent === void 0 ? ListItem : _ref7$ItemComponent,
92
- _ref7$getItemProps = _ref7.getItemProps,
93
- getItemProps = _ref7$getItemProps === void 0 ? propGetter : _ref7$getItemProps,
94
- _ref7$WrapperComponen = _ref7.WrapperComponent,
95
- WrapperComponent = _ref7$WrapperComponen === void 0 ? _Box.default : _ref7$WrapperComponen,
96
- _ref7$itemWrapperProp = _ref7.itemWrapperProps,
97
- itemWrapperProps = _ref7$itemWrapperProp === void 0 ? defaultProp : _ref7$itemWrapperProp,
98
- _ref7$containerProps = _ref7.containerProps,
99
- containerProps = _ref7$containerProps === void 0 ? defaultProp : _ref7$containerProps;
100
- var itemsArray = (0, _react.useMemo)(function () {
101
- return items ? items : _react.default.Children.toArray(children);
102
- }, [children, items]);
103
- return /*#__PURE__*/_react.default.createElement(WrapperComponent, {
104
- height: height,
105
- width: width
106
- }, /*#__PURE__*/_react.default.createElement(VirtualizedList, {
107
- items: itemsArray,
108
- ItemComponent: ItemComponent,
109
- getItemProps: getItemProps,
110
- itemWrapperProps: itemWrapperProps,
111
- containerProps: containerProps
112
- }));
113
- };
114
- var _default = OverflowList;
115
- exports.default = _default;
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _OverflowList = require("./OverflowList.flow");
7
- Object.keys(_OverflowList).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _OverflowList[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function get() {
13
- return _OverflowList[key];
14
- }
15
- });
16
- });
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- OverflowList: true
8
- };
9
- Object.defineProperty(exports, "OverflowList", {
10
- enumerable: true,
11
- get: function get() {
12
- return _OverflowList.default;
13
- }
14
- });
15
- exports.default = void 0;
16
- var _OverflowList = _interopRequireDefault(require("./OverflowList"));
17
- var _OverflowListTypes = require("./OverflowListTypes");
18
- Object.keys(_OverflowListTypes).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
21
- if (key in exports && exports[key] === _OverflowListTypes[key]) return;
22
- Object.defineProperty(exports, key, {
23
- enumerable: true,
24
- get: function get() {
25
- return _OverflowListTypes[key];
26
- }
27
- });
28
- });
29
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
- var _default = _OverflowList.default;
31
- exports.default = _default;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var React = _interopRequireWildcard(require("react"));
9
- var _reactVirtualized = require("react-virtualized");
10
- var _styledComponents = _interopRequireDefault(require("styled-components"));
11
- var _systemProps = require("../utils/system-props");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- var Container = (0, _styledComponents.default)(function (props) {
16
- return /*#__PURE__*/React.createElement(_reactVirtualized.List, props);
17
- }).withConfig({
18
- displayName: "styles__Container",
19
- componentId: "sc-8pkawp-0"
20
- })(["box-sizing:border-box;font-family:", ";", " ", " ", " ", " ", " ", ""], function (_ref) {
21
- var theme = _ref.theme;
22
- return theme.fontFamily;
23
- }, _systemProps.COMMON, _systemProps.BORDER, _systemProps.LAYOUT, _systemProps.POSITION, _systemProps.FLEXBOX, _systemProps.GRID);
24
- var _default = Container;
25
- exports.default = _default;
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
- var React = _interopRequireWildcard(require("react"));
5
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
6
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DataVizRotation = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _styledComponents = require("styled-components");
9
- var _Box = _interopRequireDefault(require("../Box"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- var DataVizRotation = (0, _styledComponents.withTheme)(function (p) {
12
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, p.theme.colors.DATAVIZ_COLORS_LIST.map(function (color, i) {
13
- return /*#__PURE__*/_react.default.createElement(_Box.default, {
14
- key: color,
15
- py: 300,
16
- px: 400,
17
- bg: color
18
- }, i + 1);
19
- }));
20
- });
21
- exports.DataVizRotation = DataVizRotation;
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _DataVizRotation = require("./DataVizRotation.flow");
7
- Object.keys(_DataVizRotation).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _DataVizRotation[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function get() {
13
- return _DataVizRotation[key];
14
- }
15
- });
16
- });
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _DataVizRotation = require("./DataVizRotation");
7
- Object.keys(_DataVizRotation).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _DataVizRotation[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function get() {
13
- return _DataVizRotation[key];
14
- }
15
- });
16
- });
17
- var _DataVizRotationTypes = require("./DataVizRotationTypes");
18
- Object.keys(_DataVizRotationTypes).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _DataVizRotationTypes[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function get() {
24
- return _DataVizRotationTypes[key];
25
- }
26
- });
27
- });
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import type { TypeOverflowListProps } from './OverflowListTypes';
3
- declare const OverflowList: ({ height, width, items, children, ItemComponent, getItemProps, WrapperComponent, itemWrapperProps, containerProps, }: TypeOverflowListProps) => React.JSX.Element;
4
- export default OverflowList;
5
- //# sourceMappingURL=OverflowList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OverflowList.d.ts","sourceRoot":"","sources":["../../../src/OverflowList/OverflowList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAIlD,OAAO,KAAK,EAEV,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAmF7B,QAAA,MAAM,YAAY,yHAUf,qBAAqB,sBAiBvB,CAAC;AAEF,eAAe,YAAY,CAAC"}