@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.
- package/CHANGELOG.md +34 -0
- package/__flow__/index.flow.js +1 -8
- package/commonjs/Card/subComponents.js +6 -0
- package/commonjs/Collapsible/Collapsible.js +2 -2
- package/commonjs/TableHeaderCell/TableHeaderCell.js +3 -1
- package/commonjs/Toast/styles.js +2 -4
- package/commonjs/index.flow.js +48 -64
- package/commonjs/index.js +8 -24
- package/commonjs/react.d.js +1 -0
- package/commonjs/themes/light/theme.js +33 -1
- package/commonjs/utils/use-measure.js +65 -0
- package/dist/themes/dark/theme.scss +28 -0
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +28 -0
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +28 -0
- package/dist/themes/light/theme.scss +56 -0
- package/dist/types/Box/Box.d.ts +1 -1
- package/dist/types/Box/Box.d.ts.map +1 -1
- package/dist/types/Card/Card.d.ts.map +1 -1
- package/dist/types/Card/subComponents.d.ts.map +1 -1
- package/dist/types/Card/utils.d.ts +1 -0
- package/dist/types/Card/utils.d.ts.map +1 -1
- package/dist/types/Checkbox/styles.d.ts +1 -1
- package/dist/types/Checkbox/styles.d.ts.map +1 -1
- package/dist/types/Collapsible/styles.d.ts +1 -1
- package/dist/types/DatePicker/styles.d.ts +1 -1
- package/dist/types/Drawer/styles.d.ts +1 -1
- package/dist/types/Drawer/styles.d.ts.map +1 -1
- package/dist/types/Fieldset/styles.d.ts +1 -1
- package/dist/types/Fieldset/styles.d.ts.map +1 -1
- package/dist/types/Menu/styles.d.ts +2 -2
- package/dist/types/Menu/styles.d.ts.map +1 -1
- package/dist/types/Menu/utils/hooks.d.ts +1 -0
- package/dist/types/Menu/utils/hooks.d.ts.map +1 -1
- package/dist/types/Message/styles.d.ts +6 -5
- package/dist/types/Message/styles.d.ts.map +1 -1
- package/dist/types/Modal/Modal.d.ts +1 -1
- package/dist/types/Modal/styles.d.ts +4 -4
- package/dist/types/Modal/styles.d.ts.map +1 -1
- package/dist/types/SegmentedControl/styles.d.ts +2 -2
- package/dist/types/SegmentedControl/styles.d.ts.map +1 -1
- package/dist/types/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/types/StatefulStory.d.ts +1 -0
- package/dist/types/StatefulStory.d.ts.map +1 -1
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts.map +1 -1
- package/dist/types/Toast/styles.d.ts +2 -1
- package/dist/types/Toast/styles.d.ts.map +1 -1
- package/dist/types/Tooltip/styles.d.ts +1 -1
- package/dist/types/Tooltip/styles.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/themes/dark/theme.d.ts +28 -0
- package/dist/types/themes/dark/theme.d.ts.map +1 -1
- package/dist/types/themes/light/theme.d.ts +56 -0
- package/dist/types/themes/light/theme.d.ts.map +1 -1
- package/dist/types/utils/use-measure.d.ts +14 -0
- package/dist/types/utils/use-measure.d.ts.map +1 -0
- package/lib/Card/subComponents.js +6 -0
- package/lib/Collapsible/Collapsible.js +1 -1
- package/lib/TableHeaderCell/TableHeaderCell.js +3 -1
- package/lib/Toast/styles.js +2 -3
- package/lib/index.flow.js +1 -7
- package/lib/index.js +2 -7
- package/lib/react.d.js +0 -0
- package/lib/themes/light/theme.js +30 -0
- package/lib/utils/use-measure.js +59 -0
- package/package.json +30 -36
- package/__flow__/OverflowList/OverflowList.flow.js +0 -22
- package/__flow__/OverflowList/index.flow.js +0 -2
- package/__flow__/dataviz/DataVizRotation.flow.js +0 -12
- package/__flow__/dataviz/index.flow.js +0 -2
- package/commonjs/OverflowList/OverflowList.flow.js +0 -6
- package/commonjs/OverflowList/OverflowList.js +0 -115
- package/commonjs/OverflowList/OverflowListTypes.js +0 -5
- package/commonjs/OverflowList/index.flow.js +0 -16
- package/commonjs/OverflowList/index.js +0 -31
- package/commonjs/OverflowList/styles.js +0 -25
- package/commonjs/dataviz/DataVizRotation.flow.js +0 -6
- package/commonjs/dataviz/DataVizRotation.js +0 -21
- package/commonjs/dataviz/DataVizRotationTypes.js +0 -5
- package/commonjs/dataviz/index.flow.js +0 -16
- package/commonjs/dataviz/index.js +0 -27
- package/dist/types/OverflowList/OverflowList.d.ts +0 -5
- package/dist/types/OverflowList/OverflowList.d.ts.map +0 -1
- package/dist/types/OverflowList/OverflowListTypes.d.ts +0 -16
- package/dist/types/OverflowList/OverflowListTypes.d.ts.map +0 -1
- package/dist/types/OverflowList/index.d.ts +0 -5
- package/dist/types/OverflowList/index.d.ts.map +0 -1
- package/dist/types/OverflowList/styles.d.ts +0 -4
- package/dist/types/OverflowList/styles.d.ts.map +0 -1
- package/dist/types/dataviz/DataVizRotation.d.ts +0 -5
- package/dist/types/dataviz/DataVizRotation.d.ts.map +0 -1
- package/dist/types/dataviz/DataVizRotationTypes.d.ts +0 -5
- package/dist/types/dataviz/DataVizRotationTypes.d.ts.map +0 -1
- package/dist/types/dataviz/index.d.ts +0 -3
- package/dist/types/dataviz/index.d.ts.map +0 -1
- package/lib/OverflowList/OverflowList.flow.js +0 -1
- package/lib/OverflowList/OverflowList.js +0 -104
- package/lib/OverflowList/OverflowListTypes.js +0 -1
- package/lib/OverflowList/index.flow.js +0 -1
- package/lib/OverflowList/index.js +0 -4
- package/lib/OverflowList/styles.js +0 -14
- package/lib/dataviz/DataVizRotation.flow.js +0 -1
- package/lib/dataviz/DataVizRotation.js +0 -13
- package/lib/dataviz/DataVizRotationTypes.js +0 -1
- package/lib/dataviz/index.flow.js +0 -1
- package/lib/dataviz/index.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 19.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 52e76ee2: Overriding the type for `React.HTMLAttributes` so that it included `data-*` attributes
|
|
8
|
+
- This fixes a bug which did not allow passing data attributes on `Input.inputProps`
|
|
9
|
+
- Also updates `React.ComponentProps` since it consumed `React.HTMLAttributes`
|
|
10
|
+
- d9df9d52: Fixing a bug in CardLink component that opened two tabs when clicked
|
|
11
|
+
|
|
12
|
+
## 19.0.0
|
|
13
|
+
|
|
14
|
+
### Major Changes
|
|
15
|
+
|
|
16
|
+
- 7c096210: 🚧 Breaking Changes 🚧
|
|
17
|
+
|
|
18
|
+
- Remove deprecated `OverflowList` component (and `react-virtualized` dependency)
|
|
19
|
+
- Remove deprecated example dataviz color rotation exports
|
|
20
|
+
|
|
21
|
+
🛠️ Non-breaking Changes 🛠️
|
|
22
|
+
|
|
23
|
+
- Add support for `react` and `react-dom` v17
|
|
24
|
+
- Upgrade dependencies
|
|
25
|
+
- `react-modal`
|
|
26
|
+
- `react-popper`
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- 0aea6f0d: Add `fontSizes` and `lineHeights` objects to the theme. These objects fix a bug on the Card component and set us up to use the default system props behavior in future refactors.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- 7b871fe7: Clickable children of non-sortable `TableHeaderCell` components will now fire their onClicks properly.
|
|
35
|
+
- e6cc9ab1: Remove webpack specific raw css import from the toast component.
|
|
36
|
+
|
|
3
37
|
## 18.0.0
|
|
4
38
|
|
|
5
39
|
### Major Changes
|
package/__flow__/index.flow.js
CHANGED
|
@@ -49,7 +49,6 @@ export { default as Menu, MenuButton, MenuButtonContext, MenuItemContainer } fro
|
|
|
49
49
|
export { default as Message } from "./Message/index.flow";
|
|
50
50
|
export { default as Modal } from "./Modal/index.flow";
|
|
51
51
|
export { default as Numeral } from "./Numeral/index.flow";
|
|
52
|
-
export { default as OverflowList } from "./OverflowList/index.flow";
|
|
53
52
|
export { default as PartnerLogo } from "./PartnerLogo/index.flow";
|
|
54
53
|
export { default as Popout } from "./Popout/index.flow";
|
|
55
54
|
export { default as Radio } from "./Radio/index.flow";
|
|
@@ -104,7 +103,6 @@ export type { TypeMenuButtonContext, TypeMenuButtonProps, TypeMenuContext, TypeM
|
|
|
104
103
|
export type { EnumDensities, TypeMessageProps } from "./Message/index.flow";
|
|
105
104
|
export type { TypeModalProps, TypeModalContentProps, TypeModalFooterProps, TypeModalHeaderProps } from "./Modal/index.flow";
|
|
106
105
|
export type { TypeNumeralProps } from "./Numeral/index.flow";
|
|
107
|
-
export type { TypeOverflowListProps, TypeVirtualizedListProps } from "./OverflowList/index.flow";
|
|
108
106
|
export type { TypePartnerLogoProps, TypePartnerNames } from "./PartnerLogo/index.flow";
|
|
109
107
|
export type { EnumPlacements, TypePopoutProps } from "./Popout/index.flow";
|
|
110
108
|
export type { TypeRadioProps } from "./Radio/index.flow";
|
|
@@ -136,9 +134,4 @@ export { legacyBadgeColors } from "./Badge/index.flow";
|
|
|
136
134
|
/**
|
|
137
135
|
* @deprecated Alert has been renamed to Banner
|
|
138
136
|
*/
|
|
139
|
-
export { default as Alert } from "./Banner/index.flow";
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Should this be exported? @deprecated?
|
|
143
|
-
*/
|
|
144
|
-
export { DataVizRotation } from "./dataviz/index.flow";
|
|
137
|
+
export { default as Alert } from "./Banner/index.flow";
|
|
@@ -72,10 +72,16 @@ var CardLink = function CardLink(_ref6) {
|
|
|
72
72
|
var _useContext = (0, _react.useContext)(_utils.SubComponentContext),
|
|
73
73
|
href = _useContext.href,
|
|
74
74
|
linkRef = _useContext.linkRef;
|
|
75
|
+
|
|
76
|
+
// Because we are hijacking Card click event to directly click this link, we need to stop propagation to avoid a double click event.
|
|
77
|
+
var handleClick = function handleClick(e) {
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
};
|
|
75
80
|
return /*#__PURE__*/_react.default.createElement(_styles.StyledCardLink, _extends({}, rest, {
|
|
76
81
|
target: external ? '_blank' : undefined,
|
|
77
82
|
rel: external ? 'noreferrer' : undefined,
|
|
78
83
|
href: href,
|
|
84
|
+
onClick: handleClick,
|
|
79
85
|
ref: linkRef
|
|
80
86
|
// TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.
|
|
81
87
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _useMeasure =
|
|
9
|
+
var _useMeasure = require("../utils/use-measure");
|
|
10
10
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
11
11
|
var _styles = require("./styles");
|
|
12
12
|
var _excluded = ["children"],
|
|
@@ -86,7 +86,7 @@ var Panel = function Panel(_ref3) {
|
|
|
86
86
|
collapsedHeight = _useContext2.collapsedHeight,
|
|
87
87
|
openHeight = _useContext2.openHeight;
|
|
88
88
|
var ref = (0, React.useRef)(null);
|
|
89
|
-
var measurement = (0, _useMeasure.
|
|
89
|
+
var measurement = (0, _useMeasure.useMeasure)(ref);
|
|
90
90
|
var _useState3 = (0, React.useState)(undefined),
|
|
91
91
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
92
92
|
isHidden = _useState4[0],
|
|
@@ -54,12 +54,14 @@ var TableHeaderCell = /*#__PURE__*/function (_React$Component) {
|
|
|
54
54
|
}));
|
|
55
55
|
});
|
|
56
56
|
_defineProperty(_assertThisInitialized(_this), "handleClick", function (e) {
|
|
57
|
-
e.preventDefault();
|
|
58
57
|
var _this$props = _this.props,
|
|
59
58
|
onClick = _this$props.onClick,
|
|
60
59
|
onSort = _this$props.onSort,
|
|
61
60
|
isSortable = _this$props.isSortable,
|
|
62
61
|
id = _this$props.id;
|
|
62
|
+
if (onClick || isSortable) {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
}
|
|
63
65
|
if (onClick) {
|
|
64
66
|
// @ts-note: Right now the `onClick` is incorrectly set to consume an HTMLButtonElement event
|
|
65
67
|
onClick(e);
|
package/commonjs/Toast/styles.js
CHANGED
|
@@ -6,16 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.GlobalToastStyles = exports.CustomIcon = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
|
|
9
|
+
require("react-toastify/dist/ReactToastify.css");
|
|
10
10
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
11
11
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
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
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
|
-
// TODO: this is something ugly that needs to be fixed
|
|
16
15
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17
16
|
// @ts-ignore
|
|
18
|
-
// eslint-disable-line import/no-unresolved
|
|
19
17
|
|
|
20
18
|
var Container = (0, _styledComponents.default)(_Box.default).withConfig({
|
|
21
19
|
displayName: "styles__Container",
|
|
@@ -38,7 +36,7 @@ var CustomIcon = (0, _styledComponents.default)(_Icon.default).withConfig({
|
|
|
38
36
|
return p.customColor ? undefined : p.theme.colors.icon[p.type];
|
|
39
37
|
});
|
|
40
38
|
exports.CustomIcon = CustomIcon;
|
|
41
|
-
var GlobalToastStyles = (0, _styledComponents.createGlobalStyle)(["
|
|
39
|
+
var GlobalToastStyles = (0, _styledComponents.createGlobalStyle)([".Toastify__toast{box-shadow:", " !important;background:transparent !important;}.Toastify__toast:last-of-type{margin-bottom:0 !important;}.Toastify-container-overrides{padding:0 !important;width:360px !important;}.Toastify-toast-overrides{padding:0 !important;min-height:0 !important;border-radius:2px !important;}.Toastify__toast-container--bottom-right{bottom:", " !important;right:", " !important;}@media only screen and (max-width:480px){.Toastify-container-overrides{min-width:initial !important;}}"], function (p) {
|
|
42
40
|
return p.theme.shadows.low;
|
|
43
41
|
}, function (p) {
|
|
44
42
|
return p.theme.space[400];
|
package/commonjs/index.flow.js
CHANGED
|
@@ -54,7 +54,6 @@ var _exportNames = {
|
|
|
54
54
|
Message: true,
|
|
55
55
|
Modal: true,
|
|
56
56
|
Numeral: true,
|
|
57
|
-
OverflowList: true,
|
|
58
57
|
PartnerLogo: true,
|
|
59
58
|
Popout: true,
|
|
60
59
|
Radio: true,
|
|
@@ -76,8 +75,7 @@ var _exportNames = {
|
|
|
76
75
|
Token: true,
|
|
77
76
|
TokenInput: true,
|
|
78
77
|
Tooltip: true,
|
|
79
|
-
VisuallyHidden: true
|
|
80
|
-
DataVizRotation: true
|
|
78
|
+
VisuallyHidden: true
|
|
81
79
|
};
|
|
82
80
|
Object.defineProperty(exports, "Alert", {
|
|
83
81
|
enumerable: true,
|
|
@@ -151,12 +149,6 @@ Object.defineProperty(exports, "Collapsible", {
|
|
|
151
149
|
return _index14.default;
|
|
152
150
|
}
|
|
153
151
|
});
|
|
154
|
-
Object.defineProperty(exports, "DataVizRotation", {
|
|
155
|
-
enumerable: true,
|
|
156
|
-
get: function get() {
|
|
157
|
-
return _index57.DataVizRotation;
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
152
|
Object.defineProperty(exports, "DateRangePicker", {
|
|
161
153
|
enumerable: true,
|
|
162
154
|
get: function get() {
|
|
@@ -295,40 +287,34 @@ Object.defineProperty(exports, "Numeral", {
|
|
|
295
287
|
return _index33.default;
|
|
296
288
|
}
|
|
297
289
|
});
|
|
298
|
-
Object.defineProperty(exports, "OverflowList", {
|
|
299
|
-
enumerable: true,
|
|
300
|
-
get: function get() {
|
|
301
|
-
return _index34.default;
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
290
|
Object.defineProperty(exports, "PartnerLogo", {
|
|
305
291
|
enumerable: true,
|
|
306
292
|
get: function get() {
|
|
307
|
-
return
|
|
293
|
+
return _index34.default;
|
|
308
294
|
}
|
|
309
295
|
});
|
|
310
296
|
Object.defineProperty(exports, "Popout", {
|
|
311
297
|
enumerable: true,
|
|
312
298
|
get: function get() {
|
|
313
|
-
return
|
|
299
|
+
return _index35.default;
|
|
314
300
|
}
|
|
315
301
|
});
|
|
316
302
|
Object.defineProperty(exports, "Radio", {
|
|
317
303
|
enumerable: true,
|
|
318
304
|
get: function get() {
|
|
319
|
-
return
|
|
305
|
+
return _index36.default;
|
|
320
306
|
}
|
|
321
307
|
});
|
|
322
308
|
Object.defineProperty(exports, "SegmentedControl", {
|
|
323
309
|
enumerable: true,
|
|
324
310
|
get: function get() {
|
|
325
|
-
return
|
|
311
|
+
return _index37.default;
|
|
326
312
|
}
|
|
327
313
|
});
|
|
328
314
|
Object.defineProperty(exports, "Select", {
|
|
329
315
|
enumerable: true,
|
|
330
316
|
get: function get() {
|
|
331
|
-
return
|
|
317
|
+
return _index38.default;
|
|
332
318
|
}
|
|
333
319
|
});
|
|
334
320
|
Object.defineProperty(exports, "SingleDatePicker", {
|
|
@@ -340,61 +326,61 @@ Object.defineProperty(exports, "SingleDatePicker", {
|
|
|
340
326
|
Object.defineProperty(exports, "Skeleton", {
|
|
341
327
|
enumerable: true,
|
|
342
328
|
get: function get() {
|
|
343
|
-
return
|
|
329
|
+
return _index39.default;
|
|
344
330
|
}
|
|
345
331
|
});
|
|
346
332
|
Object.defineProperty(exports, "SpotIllustration", {
|
|
347
333
|
enumerable: true,
|
|
348
334
|
get: function get() {
|
|
349
|
-
return
|
|
335
|
+
return _index40.default;
|
|
350
336
|
}
|
|
351
337
|
});
|
|
352
338
|
Object.defineProperty(exports, "Stack", {
|
|
353
339
|
enumerable: true,
|
|
354
340
|
get: function get() {
|
|
355
|
-
return
|
|
341
|
+
return _index41.default;
|
|
356
342
|
}
|
|
357
343
|
});
|
|
358
344
|
Object.defineProperty(exports, "Table", {
|
|
359
345
|
enumerable: true,
|
|
360
346
|
get: function get() {
|
|
361
|
-
return
|
|
347
|
+
return _index43.default;
|
|
362
348
|
}
|
|
363
349
|
});
|
|
364
350
|
Object.defineProperty(exports, "TableCell", {
|
|
365
351
|
enumerable: true,
|
|
366
352
|
get: function get() {
|
|
367
|
-
return
|
|
353
|
+
return _index44.default;
|
|
368
354
|
}
|
|
369
355
|
});
|
|
370
356
|
Object.defineProperty(exports, "TableHeaderCell", {
|
|
371
357
|
enumerable: true,
|
|
372
358
|
get: function get() {
|
|
373
|
-
return
|
|
359
|
+
return _index45.default;
|
|
374
360
|
}
|
|
375
361
|
});
|
|
376
362
|
Object.defineProperty(exports, "TableRowAccordion", {
|
|
377
363
|
enumerable: true,
|
|
378
364
|
get: function get() {
|
|
379
|
-
return
|
|
365
|
+
return _index46.default;
|
|
380
366
|
}
|
|
381
367
|
});
|
|
382
368
|
Object.defineProperty(exports, "Tabs", {
|
|
383
369
|
enumerable: true,
|
|
384
370
|
get: function get() {
|
|
385
|
-
return
|
|
371
|
+
return _index47.default;
|
|
386
372
|
}
|
|
387
373
|
});
|
|
388
374
|
Object.defineProperty(exports, "Text", {
|
|
389
375
|
enumerable: true,
|
|
390
376
|
get: function get() {
|
|
391
|
-
return
|
|
377
|
+
return _index48.default;
|
|
392
378
|
}
|
|
393
379
|
});
|
|
394
380
|
Object.defineProperty(exports, "Textarea", {
|
|
395
381
|
enumerable: true,
|
|
396
382
|
get: function get() {
|
|
397
|
-
return
|
|
383
|
+
return _index49.default;
|
|
398
384
|
}
|
|
399
385
|
});
|
|
400
386
|
Object.defineProperty(exports, "ThemeProvider", {
|
|
@@ -406,37 +392,37 @@ Object.defineProperty(exports, "ThemeProvider", {
|
|
|
406
392
|
Object.defineProperty(exports, "ToastContainer", {
|
|
407
393
|
enumerable: true,
|
|
408
394
|
get: function get() {
|
|
409
|
-
return
|
|
395
|
+
return _index50.default;
|
|
410
396
|
}
|
|
411
397
|
});
|
|
412
398
|
Object.defineProperty(exports, "ToggleHint", {
|
|
413
399
|
enumerable: true,
|
|
414
400
|
get: function get() {
|
|
415
|
-
return
|
|
401
|
+
return _index51.default;
|
|
416
402
|
}
|
|
417
403
|
});
|
|
418
404
|
Object.defineProperty(exports, "Token", {
|
|
419
405
|
enumerable: true,
|
|
420
406
|
get: function get() {
|
|
421
|
-
return
|
|
407
|
+
return _index52.default;
|
|
422
408
|
}
|
|
423
409
|
});
|
|
424
410
|
Object.defineProperty(exports, "TokenInput", {
|
|
425
411
|
enumerable: true,
|
|
426
412
|
get: function get() {
|
|
427
|
-
return
|
|
413
|
+
return _index53.default;
|
|
428
414
|
}
|
|
429
415
|
});
|
|
430
416
|
Object.defineProperty(exports, "Tooltip", {
|
|
431
417
|
enumerable: true,
|
|
432
418
|
get: function get() {
|
|
433
|
-
return
|
|
419
|
+
return _index54.default;
|
|
434
420
|
}
|
|
435
421
|
});
|
|
436
422
|
Object.defineProperty(exports, "VisuallyHidden", {
|
|
437
423
|
enumerable: true,
|
|
438
424
|
get: function get() {
|
|
439
|
-
return
|
|
425
|
+
return _index55.VisuallyHidden;
|
|
440
426
|
}
|
|
441
427
|
});
|
|
442
428
|
Object.defineProperty(exports, "darkTheme", {
|
|
@@ -484,7 +470,7 @@ Object.defineProperty(exports, "theme", {
|
|
|
484
470
|
Object.defineProperty(exports, "toast", {
|
|
485
471
|
enumerable: true,
|
|
486
472
|
get: function get() {
|
|
487
|
-
return
|
|
473
|
+
return _index50.toast;
|
|
488
474
|
}
|
|
489
475
|
});
|
|
490
476
|
Object.defineProperty(exports, "useInteractiveColor", {
|
|
@@ -566,41 +552,39 @@ var _index30 = _interopRequireWildcard(require("./Menu/index.flow"));
|
|
|
566
552
|
var _index31 = _interopRequireDefault(require("./Message/index.flow"));
|
|
567
553
|
var _index32 = _interopRequireDefault(require("./Modal/index.flow"));
|
|
568
554
|
var _index33 = _interopRequireDefault(require("./Numeral/index.flow"));
|
|
569
|
-
var _index34 = _interopRequireDefault(require("./
|
|
570
|
-
var _index35 = _interopRequireDefault(require("./
|
|
571
|
-
var _index36 = _interopRequireDefault(require("./
|
|
572
|
-
var _index37 = _interopRequireDefault(require("./
|
|
573
|
-
var _index38 = _interopRequireDefault(require("./
|
|
574
|
-
var _index39 = _interopRequireDefault(require("./
|
|
575
|
-
var _index40 = _interopRequireDefault(require("./
|
|
576
|
-
var _index41 = _interopRequireDefault(require("./
|
|
577
|
-
var _index42 =
|
|
578
|
-
|
|
579
|
-
Object.keys(_index43).forEach(function (key) {
|
|
555
|
+
var _index34 = _interopRequireDefault(require("./PartnerLogo/index.flow"));
|
|
556
|
+
var _index35 = _interopRequireDefault(require("./Popout/index.flow"));
|
|
557
|
+
var _index36 = _interopRequireDefault(require("./Radio/index.flow"));
|
|
558
|
+
var _index37 = _interopRequireDefault(require("./SegmentedControl/index.flow"));
|
|
559
|
+
var _index38 = _interopRequireDefault(require("./Select/index.flow"));
|
|
560
|
+
var _index39 = _interopRequireDefault(require("./Skeleton/index.flow"));
|
|
561
|
+
var _index40 = _interopRequireDefault(require("./SpotIllustration/index.flow"));
|
|
562
|
+
var _index41 = _interopRequireDefault(require("./Stack/index.flow"));
|
|
563
|
+
var _index42 = require("./Switch/index.flow");
|
|
564
|
+
Object.keys(_index42).forEach(function (key) {
|
|
580
565
|
if (key === "default" || key === "__esModule") return;
|
|
581
566
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
582
|
-
if (key in exports && exports[key] ===
|
|
567
|
+
if (key in exports && exports[key] === _index42[key]) return;
|
|
583
568
|
Object.defineProperty(exports, key, {
|
|
584
569
|
enumerable: true,
|
|
585
570
|
get: function get() {
|
|
586
|
-
return
|
|
571
|
+
return _index42[key];
|
|
587
572
|
}
|
|
588
573
|
});
|
|
589
574
|
});
|
|
590
|
-
var
|
|
591
|
-
var
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
var
|
|
595
|
-
var
|
|
596
|
-
var
|
|
597
|
-
var
|
|
598
|
-
var
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
var _index57 = require("./dataviz/index.flow");
|
|
575
|
+
var _index43 = _interopRequireDefault(require("./Table/index.flow"));
|
|
576
|
+
var _index44 = _interopRequireDefault(require("./TableCell/index.flow"));
|
|
577
|
+
var _index45 = _interopRequireDefault(require("./TableHeaderCell/index.flow"));
|
|
578
|
+
var _index46 = _interopRequireDefault(require("./TableRowAccordion/index.flow"));
|
|
579
|
+
var _index47 = _interopRequireDefault(require("./Tabs/index.flow"));
|
|
580
|
+
var _index48 = _interopRequireDefault(require("./Text/index.flow"));
|
|
581
|
+
var _index49 = _interopRequireDefault(require("./Textarea/index.flow"));
|
|
582
|
+
var _index50 = _interopRequireWildcard(require("./Toast/index.flow"));
|
|
583
|
+
var _index51 = _interopRequireDefault(require("./ToggleHint/index.flow"));
|
|
584
|
+
var _index52 = _interopRequireDefault(require("./Token/index.flow"));
|
|
585
|
+
var _index53 = _interopRequireDefault(require("./TokenInput/index.flow"));
|
|
586
|
+
var _index54 = _interopRequireDefault(require("./Tooltip/index.flow"));
|
|
587
|
+
var _index55 = require("./VisuallyHidden/index.flow");
|
|
604
588
|
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); }
|
|
605
589
|
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; }
|
|
606
590
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/commonjs/index.js
CHANGED
|
@@ -19,6 +19,7 @@ var _exportNames = {
|
|
|
19
19
|
focusRing: true,
|
|
20
20
|
disabled: true,
|
|
21
21
|
useInteractiveColor: true,
|
|
22
|
+
useMeasure: true,
|
|
22
23
|
Alert: true
|
|
23
24
|
};
|
|
24
25
|
Object.defineProperty(exports, "Alert", {
|
|
@@ -93,6 +94,12 @@ Object.defineProperty(exports, "useInteractiveColor", {
|
|
|
93
94
|
return _useInteractiveColor.useInteractiveColor;
|
|
94
95
|
}
|
|
95
96
|
});
|
|
97
|
+
Object.defineProperty(exports, "useMeasure", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function get() {
|
|
100
|
+
return _useMeasure.useMeasure;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
96
103
|
Object.defineProperty(exports, "useMultiselect", {
|
|
97
104
|
enumerable: true,
|
|
98
105
|
get: function get() {
|
|
@@ -139,6 +146,7 @@ var _ThemeProvider = _interopRequireDefault(require("./ThemeProvider"));
|
|
|
139
146
|
var _hooks = require("./utils/hooks");
|
|
140
147
|
var _mixins = require("./utils/mixins");
|
|
141
148
|
var _useInteractiveColor = require("./utils/useInteractiveColor");
|
|
149
|
+
var _useMeasure = require("./utils/use-measure");
|
|
142
150
|
var _Avatar = require("./Avatar");
|
|
143
151
|
Object.keys(_Avatar).forEach(function (key) {
|
|
144
152
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -499,18 +507,6 @@ Object.keys(_Numeral).forEach(function (key) {
|
|
|
499
507
|
}
|
|
500
508
|
});
|
|
501
509
|
});
|
|
502
|
-
var _OverflowList = require("./OverflowList");
|
|
503
|
-
Object.keys(_OverflowList).forEach(function (key) {
|
|
504
|
-
if (key === "default" || key === "__esModule") return;
|
|
505
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
506
|
-
if (key in exports && exports[key] === _OverflowList[key]) return;
|
|
507
|
-
Object.defineProperty(exports, key, {
|
|
508
|
-
enumerable: true,
|
|
509
|
-
get: function get() {
|
|
510
|
-
return _OverflowList[key];
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
});
|
|
514
510
|
var _PartnerLogo = require("./PartnerLogo");
|
|
515
511
|
Object.keys(_PartnerLogo).forEach(function (key) {
|
|
516
512
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -775,16 +771,4 @@ Object.keys(_VisuallyHidden).forEach(function (key) {
|
|
|
775
771
|
}
|
|
776
772
|
});
|
|
777
773
|
});
|
|
778
|
-
var _dataviz = require("./dataviz");
|
|
779
|
-
Object.keys(_dataviz).forEach(function (key) {
|
|
780
|
-
if (key === "default" || key === "__esModule") return;
|
|
781
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
782
|
-
if (key in exports && exports[key] === _dataviz[key]) return;
|
|
783
|
-
Object.defineProperty(exports, key, {
|
|
784
|
-
enumerable: true,
|
|
785
|
-
get: function get() {
|
|
786
|
-
return _dataviz[key];
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
});
|
|
790
774
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.typography = exports.space = exports.shadows = exports.radii = exports.fontWeights = exports.fontFamily = exports.easing = exports.duration = exports.default = exports.breakpoints = exports.borders = exports.borderWidths = void 0;
|
|
6
|
+
exports.typography = exports.space = exports.shadows = exports.radii = exports.lineHeights = exports.fontWeights = exports.fontSizes = exports.fontFamily = exports.easing = exports.duration = exports.default = exports.breakpoints = exports.borders = exports.borderWidths = void 0;
|
|
7
7
|
var _polished = require("polished");
|
|
8
8
|
var _seedsColor = _interopRequireDefault(require("@sproutsocial/seeds-color"));
|
|
9
9
|
var _seedsNetworkcolor = _interopRequireDefault(require("@sproutsocial/seeds-networkcolor"));
|
|
@@ -292,6 +292,36 @@ var typography = {
|
|
|
292
292
|
1200: TYPOGRAPHY.TYPOGRAPHY_SIZE_1200
|
|
293
293
|
};
|
|
294
294
|
exports.typography = typography;
|
|
295
|
+
var fontSizes = {
|
|
296
|
+
100: TYPOGRAPHY.TYPOGRAPHY_SIZE_100.fontSize,
|
|
297
|
+
200: TYPOGRAPHY.TYPOGRAPHY_SIZE_200.fontSize,
|
|
298
|
+
300: TYPOGRAPHY.TYPOGRAPHY_SIZE_300.fontSize,
|
|
299
|
+
400: TYPOGRAPHY.TYPOGRAPHY_SIZE_400.fontSize,
|
|
300
|
+
500: TYPOGRAPHY.TYPOGRAPHY_SIZE_500.fontSize,
|
|
301
|
+
600: TYPOGRAPHY.TYPOGRAPHY_SIZE_600.fontSize,
|
|
302
|
+
700: TYPOGRAPHY.TYPOGRAPHY_SIZE_700.fontSize,
|
|
303
|
+
800: TYPOGRAPHY.TYPOGRAPHY_SIZE_800.fontSize,
|
|
304
|
+
900: TYPOGRAPHY.TYPOGRAPHY_SIZE_900.fontSize,
|
|
305
|
+
1000: TYPOGRAPHY.TYPOGRAPHY_SIZE_1000.fontSize,
|
|
306
|
+
1100: TYPOGRAPHY.TYPOGRAPHY_SIZE_1100.fontSize,
|
|
307
|
+
1200: TYPOGRAPHY.TYPOGRAPHY_SIZE_1200.fontSize
|
|
308
|
+
};
|
|
309
|
+
exports.fontSizes = fontSizes;
|
|
310
|
+
var lineHeights = {
|
|
311
|
+
100: TYPOGRAPHY.TYPOGRAPHY_SIZE_100.lineHeight,
|
|
312
|
+
200: TYPOGRAPHY.TYPOGRAPHY_SIZE_200.lineHeight,
|
|
313
|
+
300: TYPOGRAPHY.TYPOGRAPHY_SIZE_300.lineHeight,
|
|
314
|
+
400: TYPOGRAPHY.TYPOGRAPHY_SIZE_400.lineHeight,
|
|
315
|
+
500: TYPOGRAPHY.TYPOGRAPHY_SIZE_500.lineHeight,
|
|
316
|
+
600: TYPOGRAPHY.TYPOGRAPHY_SIZE_600.lineHeight,
|
|
317
|
+
700: TYPOGRAPHY.TYPOGRAPHY_SIZE_700.lineHeight,
|
|
318
|
+
800: TYPOGRAPHY.TYPOGRAPHY_SIZE_800.lineHeight,
|
|
319
|
+
900: TYPOGRAPHY.TYPOGRAPHY_SIZE_900.lineHeight,
|
|
320
|
+
1000: TYPOGRAPHY.TYPOGRAPHY_SIZE_1000.lineHeight,
|
|
321
|
+
1100: TYPOGRAPHY.TYPOGRAPHY_SIZE_1100.lineHeight,
|
|
322
|
+
1200: TYPOGRAPHY.TYPOGRAPHY_SIZE_1200.lineHeight
|
|
323
|
+
};
|
|
324
|
+
exports.lineHeights = lineHeights;
|
|
295
325
|
var fontFamily = TYPOGRAPHY.TYPOGRAPHY_FAMILY;
|
|
296
326
|
exports.fontFamily = fontFamily;
|
|
297
327
|
var fontWeights = {
|
|
@@ -355,6 +385,8 @@ var theme = {
|
|
|
355
385
|
typography: _objectSpread(_objectSpread({}, typography), {}, {
|
|
356
386
|
typography: typography
|
|
357
387
|
}),
|
|
388
|
+
fontSizes: fontSizes,
|
|
389
|
+
lineHeights: lineHeights,
|
|
358
390
|
fontFamily: fontFamily,
|
|
359
391
|
fontWeights: fontWeights,
|
|
360
392
|
space: _objectSpread(_objectSpread({}, space), {}, {
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useMeasure = useMeasure;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
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."); }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
var initialBounds = Object.freeze({
|
|
15
|
+
x: 0,
|
|
16
|
+
y: 0,
|
|
17
|
+
width: 0,
|
|
18
|
+
height: 0,
|
|
19
|
+
top: 0,
|
|
20
|
+
right: 0,
|
|
21
|
+
bottom: 0,
|
|
22
|
+
left: 0
|
|
23
|
+
});
|
|
24
|
+
function useMeasure(ref) {
|
|
25
|
+
var _useState = (0, _react.useState)(initialBounds),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
bounds = _useState2[0],
|
|
28
|
+
setContentRect = _useState2[1];
|
|
29
|
+
(0, _react.useLayoutEffect)(function () {
|
|
30
|
+
var element = ref.current;
|
|
31
|
+
if (!element ||
|
|
32
|
+
// in non-browser environments (e.g. Jest tests) ResizeObserver is not defined
|
|
33
|
+
!('ResizeObserver' in window)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
var resizeObserver = new ResizeObserver(function (_ref) {
|
|
37
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
38
|
+
entry = _ref2[0];
|
|
39
|
+
var _entry$contentRect = entry.contentRect,
|
|
40
|
+
x = _entry$contentRect.x,
|
|
41
|
+
y = _entry$contentRect.y,
|
|
42
|
+
width = _entry$contentRect.width,
|
|
43
|
+
height = _entry$contentRect.height,
|
|
44
|
+
top = _entry$contentRect.top,
|
|
45
|
+
right = _entry$contentRect.right,
|
|
46
|
+
bottom = _entry$contentRect.bottom,
|
|
47
|
+
left = _entry$contentRect.left;
|
|
48
|
+
setContentRect({
|
|
49
|
+
x: x,
|
|
50
|
+
y: y,
|
|
51
|
+
width: width,
|
|
52
|
+
height: height,
|
|
53
|
+
top: top,
|
|
54
|
+
right: right,
|
|
55
|
+
bottom: bottom,
|
|
56
|
+
left: left
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
resizeObserver.observe(ref.current);
|
|
60
|
+
return function () {
|
|
61
|
+
resizeObserver.disconnect();
|
|
62
|
+
};
|
|
63
|
+
}, [ref]);
|
|
64
|
+
return bounds;
|
|
65
|
+
}
|
|
@@ -544,6 +544,34 @@ $theme: (
|
|
|
544
544
|
)
|
|
545
545
|
)
|
|
546
546
|
),
|
|
547
|
+
"fontSizes": (
|
|
548
|
+
"100": 11px,
|
|
549
|
+
"200": 13px,
|
|
550
|
+
"300": 16px,
|
|
551
|
+
"400": 18px,
|
|
552
|
+
"500": 21px,
|
|
553
|
+
"600": 24px,
|
|
554
|
+
"700": 32px,
|
|
555
|
+
"800": 43px,
|
|
556
|
+
"900": 57px,
|
|
557
|
+
"1000": 76px,
|
|
558
|
+
"1100": 101px,
|
|
559
|
+
"1200": 135px
|
|
560
|
+
),
|
|
561
|
+
"lineHeights": (
|
|
562
|
+
"100": 18.666666666666668px,
|
|
563
|
+
"200": 21.333333333333332px,
|
|
564
|
+
"300": 24px,
|
|
565
|
+
"400": 26.666666666666668px,
|
|
566
|
+
"500": 29.333333333333332px,
|
|
567
|
+
"600": 32px,
|
|
568
|
+
"700": 40px,
|
|
569
|
+
"800": 50.666666666666664px,
|
|
570
|
+
"900": 64px,
|
|
571
|
+
"1000": 80px,
|
|
572
|
+
"1100": 101.33333333333333px,
|
|
573
|
+
"1200": 125.33333333333333px
|
|
574
|
+
),
|
|
547
575
|
"fontFamily": "system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif",
|
|
548
576
|
"fontWeights": (
|
|
549
577
|
"normal": 400,
|