@sproutsocial/racine 14.0.0 → 14.1.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 (94) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/__flow__/Banner/Banner.flow.js +4 -0
  3. package/__flow__/systemProps/flexbox.js +4 -1
  4. package/__flow__/types/system-props.flow.js +3 -0
  5. package/__flow__/types/theme.flow.js +27 -0
  6. package/commonjs/Banner/Banner.js +45 -30
  7. package/commonjs/Banner/styles.js +10 -3
  8. package/commonjs/CharacterCounter/CharacterCounter.js +1 -0
  9. package/commonjs/DatePicker/DateRangePicker/DateRangePicker.js +2 -2
  10. package/commonjs/Input/styles.js +13 -2
  11. package/commonjs/Label/Label.js +13 -10
  12. package/commonjs/PartnerLogo/PartnerLogo.js +1 -2
  13. package/commonjs/Select/styles.js +13 -2
  14. package/commonjs/StatefulStory.js +32 -0
  15. package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +20 -0
  16. package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +20 -0
  17. package/commonjs/utils/system-props/gap.js +22 -0
  18. package/commonjs/utils/system-props/index.js +16 -0
  19. package/commonjs/utils/{system-props.js → system-props/system-props.js} +2 -1
  20. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +40 -0
  21. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +40 -0
  22. package/dist/types/Badge/BadgeTypes.d.ts +1 -1
  23. package/dist/types/Badge/BadgeTypes.d.ts.map +1 -1
  24. package/dist/types/Banner/Banner.d.ts +1 -1
  25. package/dist/types/Banner/Banner.d.ts.map +1 -1
  26. package/dist/types/Banner/BannerTypes.d.ts +4 -0
  27. package/dist/types/Banner/BannerTypes.d.ts.map +1 -1
  28. package/dist/types/Banner/styles.d.ts +7 -0
  29. package/dist/types/Banner/styles.d.ts.map +1 -1
  30. package/dist/types/Box/Box.d.ts +1 -1
  31. package/dist/types/Box/Box.d.ts.map +1 -1
  32. package/dist/types/Card/styles.d.ts +1 -1
  33. package/dist/types/Card/styles.d.ts.map +1 -1
  34. package/dist/types/CharacterCounter/CharacterCounter.d.ts.map +1 -1
  35. package/dist/types/Checkbox/styles.d.ts +1 -1
  36. package/dist/types/Checkbox/styles.d.ts.map +1 -1
  37. package/dist/types/Collapsible/styles.d.ts +1 -1
  38. package/dist/types/DatePicker/styles.d.ts +1 -1
  39. package/dist/types/Drawer/Drawer.d.ts +3 -2
  40. package/dist/types/Drawer/Drawer.d.ts.map +1 -1
  41. package/dist/types/Drawer/DrawerTypes.d.ts +2 -1
  42. package/dist/types/Drawer/DrawerTypes.d.ts.map +1 -1
  43. package/dist/types/Drawer/styles.d.ts +1 -1
  44. package/dist/types/Drawer/styles.d.ts.map +1 -1
  45. package/dist/types/Fieldset/styles.d.ts +1 -1
  46. package/dist/types/Fieldset/styles.d.ts.map +1 -1
  47. package/dist/types/Input/styles.d.ts.map +1 -1
  48. package/dist/types/Label/Label.d.ts.map +1 -1
  49. package/dist/types/Menu/styles.d.ts +2 -2
  50. package/dist/types/Menu/styles.d.ts.map +1 -1
  51. package/dist/types/Message/styles.d.ts +5 -5
  52. package/dist/types/Message/styles.d.ts.map +1 -1
  53. package/dist/types/Modal/Modal.d.ts +1 -1
  54. package/dist/types/Modal/styles.d.ts +4 -4
  55. package/dist/types/Modal/styles.d.ts.map +1 -1
  56. package/dist/types/SegmentedControl/styles.d.ts +2 -2
  57. package/dist/types/SegmentedControl/styles.d.ts.map +1 -1
  58. package/dist/types/Select/styles.d.ts.map +1 -1
  59. package/dist/types/Skeleton/Skeleton.d.ts +1 -1
  60. package/dist/types/Skeleton/Skeleton.d.ts.map +1 -1
  61. package/dist/types/StatefulStory.d.ts +22 -0
  62. package/dist/types/StatefulStory.d.ts.map +1 -0
  63. package/dist/types/Toast/styles.d.ts +1 -1
  64. package/dist/types/Toast/styles.d.ts.map +1 -1
  65. package/dist/types/Tooltip/styles.d.ts +1 -1
  66. package/dist/types/Tooltip/styles.d.ts.map +1 -1
  67. package/dist/types/themes/extendedThemes/sproutTheme/dark/theme.d.ts +20 -0
  68. package/dist/types/themes/extendedThemes/sproutTheme/dark/theme.d.ts.map +1 -1
  69. package/dist/types/themes/extendedThemes/sproutTheme/light/theme.d.ts +20 -0
  70. package/dist/types/themes/extendedThemes/sproutTheme/light/theme.d.ts.map +1 -1
  71. package/dist/types/types/system-props.d.ts +24 -2
  72. package/dist/types/types/system-props.d.ts.map +1 -1
  73. package/dist/types/utils/system-props/gap.d.ts +2 -0
  74. package/dist/types/utils/system-props/gap.d.ts.map +1 -0
  75. package/dist/types/utils/system-props/index.d.ts +2 -0
  76. package/dist/types/utils/system-props/index.d.ts.map +1 -0
  77. package/dist/types/utils/system-props/system-props.d.ts.map +1 -0
  78. package/lib/Banner/Banner.js +45 -30
  79. package/lib/Banner/styles.js +7 -2
  80. package/lib/CharacterCounter/CharacterCounter.js +1 -0
  81. package/lib/DatePicker/DateRangePicker/DateRangePicker.js +2 -2
  82. package/lib/Input/styles.js +13 -2
  83. package/lib/Label/Label.js +13 -10
  84. package/lib/PartnerLogo/PartnerLogo.js +1 -2
  85. package/lib/Select/styles.js +13 -2
  86. package/lib/StatefulStory.js +33 -0
  87. package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +20 -0
  88. package/lib/themes/extendedThemes/sproutTheme/light/theme.js +20 -0
  89. package/lib/utils/system-props/gap.js +15 -0
  90. package/lib/utils/system-props/index.js +1 -0
  91. package/lib/utils/{system-props.js → system-props/system-props.js} +2 -1
  92. package/package.json +1 -2
  93. package/dist/types/utils/system-props.d.ts.map +0 -1
  94. /package/dist/types/utils/{system-props.d.ts → system-props/system-props.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Change Log
2
2
 
3
+ ## 14.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 09dc15ad: Add Alert Indicator colors to the Listening extended theme
8
+ - 5f685503: Support flexbox gap via system props on the Box component
9
+ - dee44d6f: Extend the available badge color options to reflect what is available in the Racine decorative palette
10
+
11
+ ### Patch Changes
12
+
13
+ - 07a24e81: Remove dependency [reach/component-component](https://www.npmjs.com/package/@reach/component-component) in order to support React 17
14
+ - 5cf19670: Add a new onClose prop to the Banner component
15
+ - 2e9efed3: `CharacterCounter` component will now include `role="status"` attribute to provide a better experience to screen reader users
16
+ - 0b9719ac: Adjust sizes on large Input and Select to match Figma UI Kit
17
+
18
+ ## 14.0.1
19
+
20
+ ### Patch Changes
21
+
22
+ - 32d0513a: Revert default set on `PartnerLogo.size` (should have no default)
23
+ - 32d0513a: Revert a markup and styled component change on `Label` that broke the font family and styles used
24
+ - 32d0513a: Fix `TypeDrawerCloseButtonProps` for `Drawer.CloseButton` to correctly extend `TypeButtonProps`
25
+
3
26
  ## 14.0.0
4
27
 
5
28
  ### Major Changes
@@ -5,6 +5,10 @@ export type TypeBannerProps = {
5
5
  text: React.Node,
6
6
  /** Type of banner. */
7
7
  type?: EnumBannerType,
8
+ /** Show the close icon in the banner with an action when clicked */
9
+ onClose?: () => void,
10
+ /** Close icon aria label */
11
+ closeButtonLabel?: string,
8
12
  ...
9
13
  };
10
14
  declare var Banner: React.StatelessFunctionalComponent<TypeBannerProps>;
@@ -1,7 +1,7 @@
1
1
  // @flow strict-local
2
2
 
3
3
  import { flexbox } from 'styled-system';
4
- import type { Property$AlignItems, Property$AlignContent, Property$JustifyContent, Property$JustifyItems, Property$FlexWrap, Property$FlexDirection, Property$Flex, Property$FlexBasis, Property$JustifySelf, Property$AlignSelf, Globals } from 'csstype';
4
+ import type { Property$AlignItems, Property$AlignContent, Property$JustifyContent, Property$JustifyItems, Property$FlexWrap, Property$FlexDirection, Property$Flex, Property$FlexBasis, Property$JustifySelf, Property$AlignSelf, Property$Gap, Property$ColumnGap, Property$RowGap, Globals } from 'csstype';
5
5
  import type { StyledSystemStyleFn, TypeResponsiveBaseSystemProp } from "./types.flow.js";
6
6
 
7
7
  // https://styled-system.com/table#flexbox
@@ -21,5 +21,8 @@ export type TypeFlexboxSystemProps = $ReadOnly<{|
21
21
  justifySelf?: TypeResponsiveBaseSystemProp<Property$JustifySelf>,
22
22
  alignSelf?: TypeResponsiveBaseSystemProp<Property$AlignSelf>,
23
23
  order?: TypeResponsiveBaseSystemProp<TypeGlobalsNumber>,
24
+ gap?: TypeResponsiveBaseSystemProp<Property$Gap<string | number>>,
25
+ columnGap?: TypeResponsiveBaseSystemProp<Property$ColumnGap<string | number>>,
26
+ rowGap?: TypeResponsiveBaseSystemProp<Property$RowGap<string | number>>,
24
27
  |}>;
25
28
  export const flexboxSystemProps: StyledSystemStyleFn = flexbox;
@@ -116,6 +116,9 @@ export type TypeSystemFlexboxProps = $ReadOnly<{|
116
116
  justifySelf?: TypeResponsiveString<>,
117
117
  alignSelf?: TypeResponsiveString<>,
118
118
  order?: TypeResponsiveBase<>,
119
+ gap?: TypeResponsiveBase<>,
120
+ rowGap?: TypeResponsiveBase<>,
121
+ columnGap?: TypeResponsiveBase<>,
119
122
  |}>;
120
123
  export type TypeSystemGridProps = $ReadOnly<{|
121
124
  gridArea?: TypeResponsiveBase<>,
@@ -96,6 +96,33 @@ export type TypeAnalyticsTheme = {|
96
96
  },
97
97
  |};
98
98
  export type TypeListeningTheme = {|
99
+ chart: {
100
+ indicator: {
101
+ default: {
102
+ primary: string,
103
+ secondary: string,
104
+ ...
105
+ },
106
+ hover: {
107
+ primary: string,
108
+ secondary: string,
109
+ ...
110
+ },
111
+ ...
112
+ },
113
+ spike: {
114
+ background: {
115
+ base: string,
116
+ ...
117
+ },
118
+ icon: {
119
+ base: string,
120
+ ...
121
+ },
122
+ ...
123
+ },
124
+ ...
125
+ },
99
126
  topicTypes: {
100
127
  customTopic: string,
101
128
  brandHealth: string,
@@ -7,49 +7,44 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var React = _interopRequireWildcard(require("react"));
9
9
  var _Box = _interopRequireDefault(require("../Box"));
10
+ var _Button = _interopRequireDefault(require("../Button"));
10
11
  var _Icon = _interopRequireDefault(require("../Icon"));
11
- var _styles = _interopRequireDefault(require("./styles"));
12
- var _excluded = ["type", "text"];
12
+ var _styles = _interopRequireWildcard(require("./styles"));
13
+ var _excluded = ["type", "text", "onClose", "closeButtonLabel"];
13
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
15
  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); }
15
16
  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; }
16
17
  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); }
17
18
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
18
19
  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; }
19
- var getBannerIcon = function getBannerIcon(type) {
20
+ var getBannerIconName = function getBannerIconName(type) {
20
21
  switch (type) {
21
22
  case 'success':
22
- return /*#__PURE__*/React.createElement(_Icon.default, {
23
- name: "circle-check-no-fill",
24
- className: "Icon",
25
- fixedWidth: true
26
- });
23
+ return 'circle-check-no-fill';
24
+ case 'error':
25
+ return 'triangle';
26
+ case 'warning':
27
+ return 'triangle';
28
+ case 'opportunity':
29
+ return 'sparkles';
27
30
  case 'info':
28
- return /*#__PURE__*/React.createElement(_Icon.default, {
29
- name: "info-white",
30
- className: "Icon",
31
- fixedWidth: true
32
- });
31
+ default:
32
+ return 'info-white';
33
+ }
34
+ };
35
+ var getBannerIconColor = function getBannerIconColor(type) {
36
+ switch (type) {
37
+ case 'success':
38
+ return 'icon.success';
33
39
  case 'error':
34
- return /*#__PURE__*/React.createElement(_Icon.default, {
35
- name: "triangle",
36
- className: "Icon",
37
- fixedWidth: true
38
- });
40
+ return 'icon.error';
39
41
  case 'warning':
40
- return /*#__PURE__*/React.createElement(_Icon.default, {
41
- name: "triangle",
42
- className: "Icon",
43
- fixedWidth: true
44
- });
42
+ return 'icon.warning';
45
43
  case 'opportunity':
46
- return /*#__PURE__*/React.createElement(_Icon.default, {
47
- name: "sparkles",
48
- className: "Icon",
49
- fixedWidth: true
50
- });
44
+ return 'icon.opportunity';
45
+ case 'info':
51
46
  default:
52
- return;
47
+ return 'icon.info';
53
48
  }
54
49
  };
55
50
 
@@ -58,6 +53,9 @@ var Banner = function Banner(_ref) {
58
53
  var _ref$type = _ref.type,
59
54
  type = _ref$type === void 0 ? 'info' : _ref$type,
60
55
  text = _ref.text,
56
+ onClose = _ref.onClose,
57
+ _ref$closeButtonLabel = _ref.closeButtonLabel,
58
+ closeButtonLabel = _ref$closeButtonLabel === void 0 ? 'Close' : _ref$closeButtonLabel,
61
59
  rest = _objectWithoutProperties(_ref, _excluded);
62
60
  return /*#__PURE__*/React.createElement(_styles.default, _extends({
63
61
  type: type,
@@ -68,7 +66,24 @@ var Banner = function Banner(_ref) {
68
66
  display: "flex",
69
67
  alignItems: "center",
70
68
  width: 1
71
- }, getBannerIcon(type), text));
69
+ }, /*#__PURE__*/React.createElement(_styles.StyledBannerIcon, {
70
+ name: getBannerIconName(type),
71
+ color: getBannerIconColor(type),
72
+ className: "Icon",
73
+ fixedWidth: true,
74
+ mt: "3px",
75
+ mr: 400
76
+ }), text, onClose && /*#__PURE__*/React.createElement(_Box.default, {
77
+ ml: "auto",
78
+ pl: 400,
79
+ alignSelf: "flex-start"
80
+ }, /*#__PURE__*/React.createElement(_Button.default, {
81
+ p: 0,
82
+ onClick: onClose,
83
+ ariaLabel: closeButtonLabel
84
+ }, /*#__PURE__*/React.createElement(_Icon.default, {
85
+ name: "x"
86
+ })))));
72
87
  };
73
88
  var _default = Banner;
74
89
  exports.default = _default;
@@ -4,16 +4,23 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports.default = exports.StyledBannerIcon = void 0;
8
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
  var _systemProps = require("../utils/system-props");
10
+ var _Icon = _interopRequireDefault(require("../Icon"));
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
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); }
11
13
  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; }
12
14
  var Container = _styledComponents.default.div.withConfig({
13
15
  displayName: "styles__Container",
14
16
  componentId: "sc-r8d7e5-0"
15
17
  })(function (props) {
16
- return (0, _styledComponents.css)(["display:flex;overflow:hidden;align-items:center;justify-content:space-between;color:", ";border-radius:", ";font-family:", ";", " padding:", ";border:1px solid ", ";background-color:", ";.Icon{align-self:flex-start;margin-top:3px;margin-right:", ";min-width:16px;color:", ";}a,button{font-weight:", ";color:", ";font-size:inherit;&:hover{color:", ";text-decoration:underline;}}> span:not(.Icon){display:block;}", " ", ""], props.theme.colors.text.body, props.theme.radii.outer, props.theme.fontFamily, props.theme.typography[200], props.theme.space[300], props.theme.colors.container.border[props.type], props.theme.colors.container.background[props.type], props.theme.space[400], props.theme.colors.icon[props.type], props.theme.fontWeights.semibold, props.theme.colors.text.body, props.theme.colors.text.body, _systemProps.COMMON, _systemProps.LAYOUT);
18
+ return (0, _styledComponents.css)(["display:flex;overflow:hidden;align-items:center;justify-content:space-between;color:", ";border-radius:", ";font-family:", ";", " padding:", ";border:1px solid ", ";background-color:", ";a,button{font-weight:", ";color:", ";font-size:inherit;&:hover{color:", ";text-decoration:underline;}}> span:not(.Icon){display:block;}", " ", ""], props.theme.colors.text.body, props.theme.radii.outer, props.theme.fontFamily, props.theme.typography[200], props.theme.space[300], props.theme.colors.container.border[props.type], props.theme.colors.container.background[props.type], props.theme.fontWeights.semibold, props.theme.colors.text.body, props.theme.colors.text.body, _systemProps.COMMON, _systemProps.LAYOUT);
17
19
  });
18
20
  var _default = Container;
19
- exports.default = _default;
21
+ exports.default = _default;
22
+ var StyledBannerIcon = (0, _styledComponents.default)(_Icon.default).withConfig({
23
+ displayName: "styles__StyledBannerIcon",
24
+ componentId: "sc-r8d7e5-1"
25
+ })(["align-self:flex-start;min-width:16px;"]);
26
+ exports.StyledBannerIcon = StyledBannerIcon;
@@ -42,6 +42,7 @@ var CharacterCounter = /*#__PURE__*/function (_React$Component) {
42
42
  rest = _objectWithoutProperties(_this$props, _excluded);
43
43
  var remaining = this.props.maxValue - this.props.currentValue;
44
44
  return /*#__PURE__*/React.createElement(_styles.default, _extends({
45
+ role: "status",
45
46
  mini: size === 'mini',
46
47
  overlimit: remaining <= 0
47
48
  }, rest), remaining);
@@ -23,13 +23,13 @@ var DateRangePicker = function DateRangePicker(_ref) {
23
23
  endDate = _ref$endDate === void 0 ? null : _ref$endDate,
24
24
  onDatesChange = _ref.onDatesChange,
25
25
  rest = _objectWithoutProperties(_ref, _excluded);
26
- return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ReactDatesCssOverrides, null), /*#__PURE__*/_react.default.createElement(_DayPickerRangeController.default, _extends({}, _common.commonDatePickerProps, {
26
+ return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ReactDatesCssOverrides, null), /*#__PURE__*/_react.default.createElement(_DayPickerRangeController.default, _extends({
27
27
  startDate: startDate,
28
28
  endDate: endDate,
29
29
  onDatesChange: onDatesChange,
30
30
  numberOfMonths: 2,
31
31
  initialVisibleMonth: null
32
- }, rest)));
32
+ }, _common.commonDatePickerProps, rest)));
33
33
  };
34
34
  var _default = DateRangePicker;
35
35
  exports.default = _default;
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
13
13
  var Container = _styledComponents.default.div.withConfig({
14
14
  displayName: "styles__Container",
15
15
  componentId: "sc-4stdun-0"
16
- })(["box-sizing:border-box;position:relative;input{box-sizing:border-box;width:100%;border:1px solid transparent;border-radius:", ";background-color:", ";color:", ";outline:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";font-weight:", ";appearance:none;line-height:16px;margin:0;padding:", ";font-size:", ";&::-ms-clear{display:none;}&::-webkit-search-cancel-button{appearance:none;}&:focus{", "}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}&::placeholder{color:", ";}", " ", "}", " ", " ", " ", " ", ""], function (props) {
16
+ })(["box-sizing:border-box;position:relative;input{box-sizing:border-box;width:100%;border:1px solid transparent;border-radius:", ";background-color:", ";color:", ";outline:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";font-weight:", ";appearance:none;margin:0;padding:", ";font-size:", ";line-height:", ";&::-ms-clear{display:none;}&::-webkit-search-cancel-button{appearance:none;}&:focus{", "}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}&::placeholder{color:", ";}", " ", "}", " ", " ", " ", " ", ""], function (props) {
17
17
  return props.theme.radii[500];
18
18
  }, function (props) {
19
19
  return props.theme.colors.form.background.base;
@@ -34,7 +34,7 @@ var Container = _styledComponents.default.div.withConfig({
34
34
  }, function (props) {
35
35
  switch (props.size) {
36
36
  case 'large':
37
- return props.theme.space[400];
37
+ return "".concat(props.theme.space[350], " ").concat(props.theme.space[400]);
38
38
  case 'small':
39
39
  return props.theme.space[200];
40
40
  case 'default':
@@ -50,6 +50,17 @@ var Container = _styledComponents.default.div.withConfig({
50
50
  default:
51
51
  return props.theme.typography[200].fontSize;
52
52
  }
53
+ }, function (props) {
54
+ switch (props.size) {
55
+ case 'large':
56
+ return props.theme.typography[300].lineHeight;
57
+
58
+ /* 16px was the value prior to this change to 'large'. Leaving as-is but it is a non-Seeds typography line-height. It may have a big impact though */
59
+ case 'small':
60
+ case 'default':
61
+ default:
62
+ return '16px';
63
+ }
53
64
  }, _mixins.focusRing, function (props) {
54
65
  return props.theme.colors.form.placeholder.base;
55
66
  }, function (props) {
@@ -12,9 +12,6 @@ var _excluded = ["as"];
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
- 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
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
17
- 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; }
18
15
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
16
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
20
17
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -27,7 +24,18 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
27
24
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
25
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
29
26
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
30
- var StyledLabel = (0, _styledComponents.default)(_Text.default).withConfig({
27
+ 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); }
28
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
29
+ 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; }
30
+ var LabelBase = function LabelBase(_ref) {
31
+ var _ref$as = _ref.as,
32
+ as = _ref$as === void 0 ? 'label' : _ref$as,
33
+ rest = _objectWithoutProperties(_ref, _excluded);
34
+ return /*#__PURE__*/React.createElement(_Text.default, _extends({}, rest, {
35
+ as: as
36
+ }));
37
+ };
38
+ var StyledLabel = (0, _styledComponents.default)(LabelBase).withConfig({
31
39
  displayName: "Label__StyledLabel",
32
40
  componentId: "sc-dh0olx-0"
33
41
  })(["display:flex;align-items:center;"]);
@@ -41,17 +49,12 @@ var Label = /*#__PURE__*/function (_React$Component) {
41
49
  _createClass(Label, [{
42
50
  key: "render",
43
51
  value: function render() {
44
- var _this$props = this.props,
45
- _this$props$as = _this$props.as,
46
- as = _this$props$as === void 0 ? 'label' : _this$props$as,
47
- rest = _objectWithoutProperties(_this$props, _excluded);
48
52
  return /*#__PURE__*/React.createElement(StyledLabel, _extends({
49
- as: as,
50
53
  fontSize: 200,
51
54
  fontWeight: "semibold",
52
55
  color: "text.headline",
53
56
  "data-qa-label": this.props.htmlFor
54
- }, rest));
57
+ }, this.props));
55
58
  }
56
59
  }]);
57
60
  return Label;
@@ -22,8 +22,7 @@ var PartnerLogo = function PartnerLogo(_ref) {
22
22
  logoType = _ref.logoType,
23
23
  height = _ref.height,
24
24
  width = _ref.width,
25
- _ref$size = _ref.size,
26
- size = _ref$size === void 0 ? 'medium' : _ref$size,
25
+ size = _ref.size,
27
26
  color = _ref.color,
28
27
  rest = _objectWithoutProperties(_ref, _excluded);
29
28
  var _useTheme = (0, _styledComponents.useTheme)(),
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
13
13
  var Container = _styledComponents.default.div.withConfig({
14
14
  displayName: "styles__Container",
15
15
  componentId: "sc-egruk2-0"
16
- })(["position:relative;box-sizing:border-box;select{box-sizing:border-box;width:100%;border:1px solid ", ";border-radius:", ";background-color:", ";color:", ";cursor:", ";outline:none;appearance:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";font-weight:", ";margin:0;visibility:visible;padding:", ";font-size:", ";&::-ms-expand{display:none;}&:focus{", "}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}}@-moz-document url-prefix(){select{line-height:14px;}}", " ", " ", ""], function (props) {
16
+ })(["position:relative;box-sizing:border-box;select{box-sizing:border-box;width:100%;border:1px solid ", ";border-radius:", ";background-color:", ";color:", ";cursor:", ";outline:none;appearance:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";font-weight:", ";margin:0;visibility:visible;padding:", ";font-size:", ";line-height:", ";&::-ms-expand{display:none;}&:focus{", "}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}}", " ", " ", ""], function (props) {
17
17
  return props.theme.colors.form.border.base;
18
18
  }, function (props) {
19
19
  return props.theme.radii[500];
@@ -38,7 +38,7 @@ var Container = _styledComponents.default.div.withConfig({
38
38
  }, function (props) {
39
39
  switch (props.size) {
40
40
  case 'large':
41
- return "".concat(props.theme.space[400], " ").concat(props.theme.space[600], " ").concat(props.theme.space[400], " ").concat(props.theme.space[400]);
41
+ return "".concat(props.theme.space[350], " ").concat(props.theme.space[600], " ").concat(props.theme.space[350], " ").concat(props.theme.space[400]);
42
42
  case 'small':
43
43
  return "".concat(props.theme.space[200], " ").concat(props.theme.space[500], " ").concat(props.theme.space[200], " ").concat(props.theme.space[200]);
44
44
  case 'default':
@@ -54,6 +54,17 @@ var Container = _styledComponents.default.div.withConfig({
54
54
  default:
55
55
  return props.theme.typography[200].fontSize;
56
56
  }
57
+ }, function (props) {
58
+ switch (props.size) {
59
+ case 'large':
60
+ return props.theme.typography[300].lineHeight;
61
+
62
+ /* hardcoded to 'normal' so the large change doesn't impact small/default */
63
+ case 'small':
64
+ case 'default':
65
+ default:
66
+ return 'normal';
67
+ }
57
68
  }, _mixins.focusRing, function (props) {
58
69
  return props.disabled && (0, _styledComponents.css)(["opacity:0.4;"]);
59
70
  }, function (props) {
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StatefulStory = StatefulStory;
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
+ /**
15
+ * A wrapper component that allows you to pass in an initial state.
16
+ *
17
+ * This is useful for adding state inline for stories. Story functions are not intepretted as React components,
18
+ * so you can't use hooks in them. This component allows you to useState in a story without having to create a
19
+ * custom component for every story.
20
+ */
21
+ function StatefulStory(_ref) {
22
+ var children = _ref.children,
23
+ initialState = _ref.initialState;
24
+ var _useState = (0, _react.useState)(initialState),
25
+ _useState2 = _slicedToArray(_useState, 2),
26
+ state = _useState2[0],
27
+ setState = _useState2[1];
28
+ return children({
29
+ state: state,
30
+ setState: setState
31
+ });
32
+ }
@@ -92,6 +92,26 @@ var analytics = {
92
92
  };
93
93
  exports.analytics = analytics;
94
94
  var listening = {
95
+ chart: {
96
+ indicator: {
97
+ default: {
98
+ primary: _theme.default.colors.neutral[100],
99
+ secondary: _theme.default.colors.neutral[900]
100
+ },
101
+ hover: {
102
+ primary: _theme.default.colors.neutral[300],
103
+ secondary: _theme.default.colors.neutral[0]
104
+ }
105
+ },
106
+ spike: {
107
+ background: {
108
+ base: _theme.default.colors.teal[500]
109
+ },
110
+ icon: {
111
+ base: _theme.default.colors.neutral[0]
112
+ }
113
+ }
114
+ },
95
115
  topicTypes: {
96
116
  customTopic: _theme.default.colors.teal[400],
97
117
  brandHealth: _theme.default.colors.red[400],
@@ -89,6 +89,26 @@ var analytics = {
89
89
  };
90
90
  exports.analytics = analytics;
91
91
  var listening = {
92
+ chart: {
93
+ indicator: {
94
+ default: {
95
+ primary: _theme.default.colors.neutral[400],
96
+ secondary: _theme.default.colors.neutral[0]
97
+ },
98
+ hover: {
99
+ primary: _theme.default.colors.neutral[1000],
100
+ secondary: _theme.default.colors.neutral[0]
101
+ }
102
+ },
103
+ spike: {
104
+ background: {
105
+ base: _theme.default.colors.teal[500]
106
+ },
107
+ icon: {
108
+ base: _theme.default.colors.neutral[0]
109
+ }
110
+ }
111
+ },
92
112
  topicTypes: {
93
113
  customTopic: _theme.default.colors.blue[400],
94
114
  brandHealth: _theme.default.colors.red[400],
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.gap = void 0;
7
+ var _styledSystem = require("styled-system");
8
+ var gap = (0, _styledSystem.system)({
9
+ gap: {
10
+ property: 'gap',
11
+ scale: 'space'
12
+ },
13
+ rowGap: {
14
+ property: 'rowGap',
15
+ scale: 'space'
16
+ },
17
+ columnGap: {
18
+ property: 'columnGap',
19
+ scale: 'space'
20
+ }
21
+ });
22
+ exports.gap = gap;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _systemProps = require("./system-props");
7
+ Object.keys(_systemProps).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _systemProps[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _systemProps[key];
14
+ }
15
+ });
16
+ });
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.TYPOGRAPHY = exports.POSITION = exports.LAYOUT = exports.GRID = exports.FLEXBOX = exports.COMMON = exports.BORDER = void 0;
8
8
  var styles = _interopRequireWildcard(require("styled-system"));
9
+ var _gap = require("./gap");
9
10
  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); }
10
11
  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
12
  // eslint-disable-next-line no-restricted-syntax
@@ -33,7 +34,7 @@ var LAYOUT = styles.compose(styles.display, styles.size, styles.width, styles.he
33
34
  exports.LAYOUT = LAYOUT;
34
35
  var POSITION = styles.compose(styles.position, styles.zIndex, styles.top, styles.right, styles.bottom, styles.left);
35
36
  exports.POSITION = POSITION;
36
- var FLEXBOX = styles.compose(styles.flexBasis, styles.flexDirection, styles.flexWrap, styles.alignContent, styles.alignItems, styles.justifyContent, styles.justifyItems, styles.order, styles.flex, styles.flexShrink, styles.flexGrow, styles.justifySelf, styles.alignSelf);
37
+ var FLEXBOX = styles.compose(styles.flexBasis, styles.flexDirection, styles.flexWrap, styles.alignContent, styles.alignItems, styles.justifyContent, styles.justifyItems, styles.order, styles.flex, styles.flexShrink, styles.flexGrow, styles.justifySelf, styles.alignSelf, _gap.gap);
37
38
  exports.FLEXBOX = FLEXBOX;
38
39
  var GRID = styles.grid;
39
40
  exports.GRID = GRID;
@@ -548,6 +548,26 @@ $theme: (
548
548
  )
549
549
  ),
550
550
  "listening": (
551
+ "chart": (
552
+ "indicator": (
553
+ "default": (
554
+ "primary": #f3f4f4,
555
+ "secondary": #273333
556
+ ),
557
+ "hover": (
558
+ "primary": #c8cccc,
559
+ "secondary": #FFFFFF
560
+ )
561
+ ),
562
+ "spike": (
563
+ "background": (
564
+ "base": #08c4b2
565
+ ),
566
+ "icon": (
567
+ "base": #FFFFFF
568
+ )
569
+ )
570
+ ),
551
571
  "topicTypes": (
552
572
  "customTopic": #24e0c5,
553
573
  "brandHealth": #ff7f6e,
@@ -920,6 +940,26 @@ $theme: (
920
940
  )
921
941
  ),
922
942
  "listening": (
943
+ "chart": (
944
+ "indicator": (
945
+ "default": (
946
+ "primary": #f3f4f4,
947
+ "secondary": #273333
948
+ ),
949
+ "hover": (
950
+ "primary": #c8cccc,
951
+ "secondary": #FFFFFF
952
+ )
953
+ ),
954
+ "spike": (
955
+ "background": (
956
+ "base": #08c4b2
957
+ ),
958
+ "icon": (
959
+ "base": #FFFFFF
960
+ )
961
+ )
962
+ ),
923
963
  "topicTypes": (
924
964
  "customTopic": #24e0c5,
925
965
  "brandHealth": #ff7f6e,