@sproutsocial/racine 12.4.1 → 12.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +34 -12
  3. package/__flow__/Checkbox/index.js +7 -1
  4. package/__flow__/Checkbox/styles.js +75 -75
  5. package/__flow__/Collapsible/index.js +3 -2
  6. package/__flow__/EnumIllustrationNames.js +1 -1
  7. package/__flow__/IllustrationViewBoxes.js +1 -1
  8. package/__flow__/Image/index.js +10 -2
  9. package/__flow__/PartnerLogo/index.js +41 -4
  10. package/__flow__/PartnerLogo/index.stories.js +17 -0
  11. package/__flow__/SegmentedControl/index.js +3 -2
  12. package/__flow__/SpotIllustration/illustrationNames.js +2 -0
  13. package/__flow__/SpotIllustration/index.stories.js +10 -0
  14. package/__flow__/SpotIllustration/spotIllustrations/global-trend.svg +5 -0
  15. package/__flow__/SpotIllustration/spotIllustrations/tag.svg +5 -0
  16. package/__flow__/TableCell/index.js +9 -2
  17. package/__flow__/ToggleHint/index.js +9 -2
  18. package/__flow__/systemProps/color.js +1 -2
  19. package/__flow__/themes/dark/decorative-palettes.js +1 -1
  20. package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +6 -1
  21. package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +6 -1
  22. package/__flow__/types/theme.colors.flow.js +1 -0
  23. package/__flow__/utils/responsiveProps/index.test.js +10 -2
  24. package/commonjs/Checkbox/index.js +4 -3
  25. package/commonjs/PartnerLogo/index.js +31 -5
  26. package/commonjs/SpotIllustration/illustrationNames.js +1 -1
  27. package/commonjs/themes/dark/decorative-palettes.js +1 -1
  28. package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +6 -1
  29. package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +6 -1
  30. package/dist/illustration.svg +1 -1
  31. package/dist/illustrationList.js +1 -1
  32. package/dist/themes/dark/theme.scss +1 -1
  33. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +13 -3
  34. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +12 -2
  35. package/lib/Checkbox/index.js +4 -3
  36. package/lib/IllustrationViewBoxes.js +2 -0
  37. package/lib/PartnerLogo/index.js +25 -4
  38. package/lib/SpotIllustration/illustrationNames.js +1 -1
  39. package/lib/themes/dark/decorative-palettes.js +1 -1
  40. package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +6 -1
  41. package/lib/themes/extendedThemes/sproutTheme/light/theme.js +6 -1
  42. package/package.json +5 -2
  43. package/commonjs/EnumIconNames.js +0 -1
  44. package/commonjs/EnumIllustrationNames.js +0 -1
  45. package/commonjs/EnumLogoNames.js +0 -1
  46. package/commonjs/IconViewBoxes.js +0 -365
  47. package/commonjs/IllustrationViewBoxes.js +0 -103
  48. package/commonjs/LogoViewBoxes.js +0 -66
@@ -14,10 +14,15 @@ export const navigation = {
14
14
  background: {
15
15
  base: baseLightTheme.colors.neutral[800],
16
16
  },
17
+ widget: {
18
+ background: {
19
+ base: baseLightTheme.colors.neutral[1000],
20
+ },
21
+ },
17
22
  },
18
23
  settings: {
19
24
  listItem: {
20
- backgound: {
25
+ background: {
21
26
  base: "transparent",
22
27
  hover: baseLightTheme.colors.neutral[200],
23
28
  selected: baseLightTheme.colors.neutral[0],
@@ -271,6 +271,7 @@ type TypeNetworkColors = {|
271
271
  microsoft_dynamics: string,
272
272
  yelp: string,
273
273
  whatsapp: string,
274
+ tiktok: string,
274
275
  },
275
276
  |};
276
277
 
@@ -19,13 +19,21 @@ describe("normalizeResponsiveProp", () => {
19
19
 
20
20
  it("should handle arrays with 4 values", () => {
21
21
  expect(normalizeResponsiveProp([0, 1, 2, 3])).toMatchObject([
22
- 0, 1, 2, 3, 3,
22
+ 0,
23
+ 1,
24
+ 2,
25
+ 3,
26
+ 3,
23
27
  ]);
24
28
  });
25
29
 
26
30
  it("should handle arrays with 5 values", () => {
27
31
  expect(normalizeResponsiveProp([0, 1, 2, 3, 4])).toMatchObject([
28
- 0, 1, 2, 3, 4,
32
+ 0,
33
+ 1,
34
+ 2,
35
+ 3,
36
+ 4,
29
37
  ]);
30
38
  });
31
39
  });
@@ -7,7 +7,7 @@ var React = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _styles = _interopRequireWildcard(require("./styles"));
9
9
 
10
- var _excluded = ["id", "value", "name", "label", "checked", "disabled", "indeterminate", "onChange", "ariaLabel", "appearance", "qa", "tabIndex", "inputProps"];
10
+ var _excluded = ["id", "value", "name", "label", "labelProps", "checked", "disabled", "indeterminate", "onChange", "ariaLabel", "appearance", "qa", "tabIndex", "inputProps"];
11
11
 
12
12
  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); }
13
13
 
@@ -63,6 +63,7 @@ var Checkbox = /*#__PURE__*/function (_React$Component) {
63
63
  value = _this$props.value,
64
64
  name = _this$props.name,
65
65
  label = _this$props.label,
66
+ labelProps = _this$props.labelProps,
66
67
  checked = _this$props.checked,
67
68
  disabled = _this$props.disabled,
68
69
  indeterminate = _this$props.indeterminate,
@@ -102,9 +103,9 @@ var Checkbox = /*#__PURE__*/function (_React$Component) {
102
103
  "data-qa-checkbox-ischecked": indeterminate ? "indeterminate" : checked === true,
103
104
  "data-qa-checkbox-isdisabled": disabled === true,
104
105
  tabIndex: tabIndex
105
- }, qa, inputProps)), label && /*#__PURE__*/React.createElement(_styles.LabelText, {
106
+ }, qa, inputProps)), label && /*#__PURE__*/React.createElement(_styles.LabelText, _extends({}, labelProps, {
106
107
  disabled: disabled
107
- }, label));
108
+ }), label));
108
109
  }
109
110
 
110
111
  return (
@@ -7,13 +7,33 @@ var _react = _interopRequireDefault(require("react"));
7
7
 
8
8
  var _LogoViewBoxes = _interopRequireDefault(require("../LogoViewBoxes"));
9
9
 
10
- var _styledComponents = require("styled-components");
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+
12
+ var _systemProps = require("../utils/system-props");
13
+
14
+ var _excluded = ["partnerName", "backgroundType", "height", "width"];
15
+
16
+ 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); }
17
+
18
+ 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; }
11
19
 
12
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
21
 
22
+ function _extends() { _extends = Object.assign || 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); }
23
+
24
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
+
26
+ var StyledSVG = _styledComponents.default.svg.withConfig({
27
+ displayName: "PartnerLogo__StyledSVG",
28
+ componentId: "sc-ivi11w-0"
29
+ })(["", ";", ""], _systemProps.FLEXBOX, _systemProps.COMMON);
30
+
14
31
  var PartnerLogo = function PartnerLogo(_ref) {
15
32
  var partnerName = _ref.partnerName,
16
- backgroundType = _ref.backgroundType;
33
+ backgroundType = _ref.backgroundType,
34
+ height = _ref.height,
35
+ width = _ref.width,
36
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
17
37
 
18
38
  var _useTheme = (0, _styledComponents.useTheme)(),
19
39
  mode = _useTheme.mode;
@@ -32,10 +52,16 @@ var PartnerLogo = function PartnerLogo(_ref) {
32
52
 
33
53
  var logoViewBox = _LogoViewBoxes.default[whichLogo(backgroundType)];
34
54
 
35
- return /*#__PURE__*/_react.default.createElement("svg", {
55
+ var viewBoxCoordinates = (logoViewBox == null ? void 0 : logoViewBox.split(" ")) || [];
56
+ var defaultWidth = viewBoxCoordinates[2];
57
+ var defaultHeight = viewBoxCoordinates[3];
58
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, _extends({
59
+ width: width ? width : defaultWidth,
60
+ height: height ? height : defaultHeight,
36
61
  viewBox: logoViewBox,
37
- focusable: false
38
- }, /*#__PURE__*/_react.default.createElement("use", {
62
+ focusable: false // $FlowIssue - upgrade v0.112.0
63
+
64
+ }, rest), /*#__PURE__*/_react.default.createElement("use", {
39
65
  xmlnsXlink: "http://www.w3.org/1999/xlink",
40
66
  xlinkHref: "#sslogosvg-" + whichLogo(backgroundType)
41
67
  }));
@@ -2,5 +2,5 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.illustrationNames = void 0;
5
- var illustrationNames = ["abacus", "analytics-offering", "astronaut", "brand-keyword", "business", "calendar-event", "calendar-reporting", "cat-error", "cat-no-access", "cat", "checkbox-alert", "coffee-cup", "compose-window", "compose", "computer-error", "connect", "contact", "conversation", "custom-branding", "customer-service", "dashboard", "exclamation-mark", "face-happy", "find-bookmark", "flask", "general-topic", "global-features", "hands-raised", "headset", "heartbeat-connection", "invoice", "jewel", "keyword-tracking", "lightbulb-alt", "lightbulb", "like-conversation", "link-broken", "link-messages", "link-sections", "link-upload", "listening-pendo", "listening-tour", "loading", "mailbox-empty", "mailbox-full", "network-data", "no-messages-found", "no-notifications", "notification", "notifications-onboarding", "organize-message", "outbox-queue", "outbox-reviews", "pdf", "podium", "pointer", "publish-assets", "publish-links", "puzzle-piece", "question-mark", "reporting-folder", "reporting", "review-location", "review", "robot-assembly", "robot-error", "robot-happy", "rocket", "schedule-date", "schedule-messages", "search-keywords", "search-success", "search-trends", "search", "security", "sentiment", "shopping-bag", "spark-line", "stamp", "storefront", "success", "tag-message", "team-roles", "team", "telescope", "tha-mel", "thumbs-up", "toggle-switch", "toolset-strength", "tracking-time", "twitter-messages", "twitter-profiles", "unsubscribe", "upward-trend", "user-task", "view-connections", "vip-list", "warning", "wifi"];
5
+ var illustrationNames = ["abacus", "analytics-offering", "astronaut", "brand-keyword", "business", "calendar-event", "calendar-reporting", "cat-error", "cat-no-access", "cat", "checkbox-alert", "coffee-cup", "compose-window", "compose", "computer-error", "connect", "contact", "conversation", "custom-branding", "customer-service", "dashboard", "exclamation-mark", "face-happy", "find-bookmark", "flask", "general-topic", "global-features", "global-trend", "hands-raised", "headset", "heartbeat-connection", "invoice", "jewel", "keyword-tracking", "lightbulb-alt", "lightbulb", "like-conversation", "link-broken", "link-messages", "link-sections", "link-upload", "listening-pendo", "listening-tour", "loading", "mailbox-empty", "mailbox-full", "network-data", "no-messages-found", "no-notifications", "notification", "notifications-onboarding", "organize-message", "outbox-queue", "outbox-reviews", "pdf", "podium", "pointer", "publish-assets", "publish-links", "puzzle-piece", "question-mark", "reporting-folder", "reporting", "review-location", "review", "robot-assembly", "robot-error", "robot-happy", "rocket", "schedule-date", "schedule-messages", "search-keywords", "search-success", "search-trends", "search", "security", "sentiment", "shopping-bag", "spark-line", "stamp", "storefront", "success", "tag-message", "tag", "team-roles", "team", "telescope", "tha-mel", "thumbs-up", "toggle-switch", "toolset-strength", "tracking-time", "twitter-messages", "twitter-profiles", "unsubscribe", "upward-trend", "user-task", "view-connections", "vip-list", "warning", "wifi"];
6
6
  exports.illustrationNames = illustrationNames;
@@ -44,7 +44,7 @@ var red = {
44
44
  };
45
45
  exports.red = red;
46
46
  var neutral = {
47
- background: _seedsColor.default.COLOR_NEUTRAL_900,
47
+ background: _seedsColor.default.COLOR_NEUTRAL_1000,
48
48
  highlight: _seedsColor.default.COLOR_NEUTRAL_500,
49
49
  foreground: _seedsColor.default.COLOR_NEUTRAL_100
50
50
  };
@@ -21,11 +21,16 @@ var navigation = {
21
21
  secondary: {
22
22
  background: {
23
23
  base: _theme.default.colors.neutral[900]
24
+ },
25
+ widget: {
26
+ background: {
27
+ base: _theme.default.colors.neutral[800]
28
+ }
24
29
  }
25
30
  },
26
31
  settings: {
27
32
  listItem: {
28
- backgound: {
33
+ background: {
29
34
  base: "transparent",
30
35
  hover: _theme.default.colors.neutral[1100],
31
36
  selected: _theme.default.colors.neutral[800]
@@ -21,11 +21,16 @@ var navigation = {
21
21
  secondary: {
22
22
  background: {
23
23
  base: _theme.default.colors.neutral[800]
24
+ },
25
+ widget: {
26
+ background: {
27
+ base: _theme.default.colors.neutral[1000]
28
+ }
24
29
  }
25
30
  },
26
31
  settings: {
27
32
  listItem: {
28
- backgound: {
33
+ background: {
29
34
  base: "transparent",
30
35
  hover: _theme.default.colors.neutral[200],
31
36
  selected: _theme.default.colors.neutral[0]