baseui 0.0.0-next-1805760 → 0.0.0-next-1788bcc

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 (40) hide show
  1. package/es/list/index.js +1 -0
  2. package/es/list/list-heading.js +77 -0
  3. package/es/list/menu-adapter.js +4 -2
  4. package/es/list/styled-components.js +99 -4
  5. package/es/select/select-component.js +1 -1
  6. package/es/textarea/textarea.js +1 -2
  7. package/es/themes/dark-theme/color-semantic-tokens.js +11 -2
  8. package/es/themes/light-theme/color-semantic-tokens.js +12 -3
  9. package/es/tokens/colors.js +1 -1
  10. package/esm/list/index.js +1 -0
  11. package/esm/list/list-heading.js +116 -0
  12. package/esm/list/menu-adapter.js +4 -2
  13. package/esm/list/styled-components.js +98 -4
  14. package/esm/select/select-component.js +1 -1
  15. package/esm/textarea/textarea.js +1 -2
  16. package/esm/themes/dark-theme/color-semantic-tokens.js +11 -2
  17. package/esm/themes/light-theme/color-semantic-tokens.js +12 -3
  18. package/esm/tokens/colors.js +1 -1
  19. package/list/index.js +9 -0
  20. package/list/index.js.flow +1 -0
  21. package/list/list-heading.js +124 -0
  22. package/list/list-heading.js.flow +138 -0
  23. package/list/menu-adapter.js +5 -2
  24. package/list/menu-adapter.js.flow +21 -11
  25. package/list/styled-components.js +106 -5
  26. package/list/styled-components.js.flow +102 -3
  27. package/list/types.js.flow +22 -0
  28. package/package.json +1 -1
  29. package/select/select-component.js +1 -1
  30. package/select/select-component.js.flow +1 -1
  31. package/textarea/textarea.js +1 -2
  32. package/textarea/textarea.js.flow +0 -1
  33. package/theme.ts +10 -0
  34. package/themes/dark-theme/color-semantic-tokens.js +11 -2
  35. package/themes/dark-theme/color-semantic-tokens.js.flow +11 -1
  36. package/themes/light-theme/color-semantic-tokens.js +12 -3
  37. package/themes/light-theme/color-semantic-tokens.js.flow +12 -2
  38. package/themes/types.js.flow +10 -0
  39. package/tokens/colors.js +1 -1
  40. package/tokens/colors.js.flow +1 -1
package/es/list/index.js CHANGED
@@ -6,6 +6,7 @@ LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { default as ListItem } from './list-item.js';
8
8
  export { default as ListItemLabel } from './list-item-label.js';
9
+ export { default as ListHeading } from './list-heading.js';
9
10
  export { default as MenuAdapter } from './menu-adapter.js';
10
11
  export { ARTWORK_SIZES, SHAPE } from './constants.js';
11
12
  export * from './styled-components.js';
@@ -0,0 +1,77 @@
1
+ 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); }
2
+
3
+ /*
4
+ Copyright (c) Uber Technologies, Inc.
5
+
6
+ This source code is licensed under the MIT license found in the
7
+ LICENSE file in the root directory of this source tree.
8
+ */
9
+ import React from 'react';
10
+ import ReactIs from 'react-is';
11
+ import { getOverrides } from '../helpers/overrides.js';
12
+ import { StyledHeadingRoot, StyledHeadingContent, StyledHeadingContentRow, StyledHeadingEndEnhancerContainer, StyledHeadingEndEnhancerDescriptionContainer, StyledHeadingMainHeading, StyledHeadingSubHeading } from './styled-components.js';
13
+
14
+ function RenderNode(props) {
15
+ const {
16
+ component,
17
+ ...restProps
18
+ } = props;
19
+ const Component = component;
20
+
21
+ if (!Component) {
22
+ return null;
23
+ }
24
+
25
+ if (typeof Component === 'string') {
26
+ return Component;
27
+ }
28
+
29
+ if (ReactIs.isValidElementType(Component)) {
30
+ // $FlowFixMe
31
+ return /*#__PURE__*/React.createElement(Component, restProps);
32
+ } // $FlowFixMe
33
+
34
+
35
+ return Component;
36
+ }
37
+
38
+ const ListHeading = /*#__PURE__*/React.forwardRef((props, ref) => {
39
+ const {
40
+ overrides = {}
41
+ } = props;
42
+ const EndEnhancer = props.endEnhancer;
43
+ const EndEnhancerDescription = props.endEnhancerDescription;
44
+ const SubHeading = props.subHeading;
45
+ const [Root, rootProps] = getOverrides(overrides.Root, StyledHeadingRoot);
46
+ const [Content, contentProps] = getOverrides(overrides.Content, StyledHeadingContent);
47
+ const [HeadingContainer, headingContainerProps] = getOverrides(overrides.HeadingContainer, StyledHeadingMainHeading);
48
+ const [SubHeadingContainer, subHeadingContainerProps] = getOverrides(overrides.SubHeadingContainer, StyledHeadingSubHeading);
49
+ const [EndEnhancerContainer, endEnhancerContainerProps] = getOverrides(overrides.EndEnhancerContainer, StyledHeadingEndEnhancerContainer);
50
+ const [EndEnhancerDescriptionContainer, endEnhancerDescriptionContainerProps] = getOverrides(overrides.EndEnhancerDescriptionContainer, StyledHeadingEndEnhancerDescriptionContainer);
51
+ const isEndEnhancerString = typeof EndEnhancer === 'string';
52
+
53
+ if (isEndEnhancerString && EndEnhancerDescription) {
54
+ console.warn('endEnhancerDescription will not be rendered if endEnhancer is not a string');
55
+ }
56
+
57
+ return /*#__PURE__*/React.createElement(Root // eslint-disable-next-line flowtype/no-weak-types
58
+ , _extends({
59
+ ref: ref
60
+ }, rootProps), /*#__PURE__*/React.createElement(Content, contentProps, /*#__PURE__*/React.createElement(StyledHeadingContentRow, null, /*#__PURE__*/React.createElement(HeadingContainer, _extends({
61
+ $maxLines: props.maxLines
62
+ }, headingContainerProps), /*#__PURE__*/React.createElement(RenderNode, {
63
+ component: props.heading
64
+ })), EndEnhancer && /*#__PURE__*/React.createElement(EndEnhancerContainer, _extends({
65
+ $isText: isEndEnhancerString
66
+ }, endEnhancerContainerProps), /*#__PURE__*/React.createElement(RenderNode, {
67
+ component: EndEnhancer
68
+ }))), (SubHeading || EndEnhancerDescription) && /*#__PURE__*/React.createElement(StyledHeadingContentRow, null, /*#__PURE__*/React.createElement(SubHeadingContainer, _extends({
69
+ $maxLines: props.maxLines
70
+ }, subHeadingContainerProps), /*#__PURE__*/React.createElement(RenderNode, {
71
+ component: SubHeading
72
+ })), EndEnhancerDescription && isEndEnhancerString && /*#__PURE__*/React.createElement(EndEnhancerDescriptionContainer, endEnhancerDescriptionContainerProps, /*#__PURE__*/React.createElement(RenderNode, {
73
+ component: EndEnhancerDescription
74
+ })))));
75
+ });
76
+ ListHeading.displayName = 'ListHeading';
77
+ export default ListHeading;
@@ -6,6 +6,7 @@ LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import * as React from 'react';
8
8
  import ListItem from './list-item.js';
9
+ import { mergeOverrides } from '../helpers/overrides.js';
9
10
  const MenuAdapter = /*#__PURE__*/React.forwardRef((props, ref) => {
10
11
  return /*#__PURE__*/React.createElement(ListItem, {
11
12
  ref: ref,
@@ -13,7 +14,8 @@ const MenuAdapter = /*#__PURE__*/React.forwardRef((props, ref) => {
13
14
  artwork: props.artwork,
14
15
  artworkSize: props.artworkSize,
15
16
  endEnhancer: props.endEnhancer,
16
- overrides: {
17
+ overrides: // $FlowFixMe
18
+ mergeOverrides({
17
19
  Root: {
18
20
  props: {
19
21
  onMouseEnter: props.onMouseEnter,
@@ -26,7 +28,7 @@ const MenuAdapter = /*#__PURE__*/React.forwardRef((props, ref) => {
26
28
  cursor: props.$disabled ? 'not-allowed' : 'pointer'
27
29
  })
28
30
  }
29
- }
31
+ }, props.overrides)
30
32
  }, props.children);
31
33
  });
32
34
  MenuAdapter.displayName = 'MenuAdapter';
@@ -37,7 +37,7 @@ export const StyledContent = styled('div', ({
37
37
  borderLeftStyle: 'none',
38
38
  display: 'flex',
39
39
  flexGrow: 1,
40
- minHeight: $sublist ? 'initial' : '64px',
40
+ minHeight: $sublist ? 'initial' : $theme.sizing.scale1600,
41
41
  justifyContent: 'space-between',
42
42
  ...($theme.direction === 'rtl' ? {
43
43
  paddingLeft: $theme.sizing.scale600,
@@ -103,8 +103,103 @@ export const StyledLabelSublistContent = styled('p', ({
103
103
  }) => {
104
104
  return { ...$theme.typography.LabelMedium,
105
105
  color: $theme.colors.contentPrimary,
106
- marginTop: '12px',
107
- marginBottom: '12px'
106
+ marginTop: $theme.sizing.scale500,
107
+ marginBottom: $theme.sizing.scale500
108
108
  };
109
109
  });
110
- StyledLabelSublistContent.displayName = "StyledLabelSublistContent";
110
+ StyledLabelSublistContent.displayName = "StyledLabelSublistContent";
111
+ export const StyledHeadingRoot = styled('div', ({
112
+ $theme
113
+ }) => {
114
+ return {
115
+ display: 'flex',
116
+ alignItems: 'center',
117
+ width: '100%',
118
+ backgroundColor: $theme.colors.backgroundPrimary,
119
+ overflow: 'hidden',
120
+ minHeight: $theme.sizing.scale1600
121
+ };
122
+ });
123
+ StyledHeadingRoot.displayName = "StyledHeadingRoot";
124
+ export const StyledHeadingContent = styled('div', ({
125
+ $theme
126
+ }) => {
127
+ return {
128
+ flexGrow: 1,
129
+ width: '100%',
130
+ minWidth: 0,
131
+ paddingTop: $theme.sizing.scale600,
132
+ paddingBottom: $theme.sizing.scale300,
133
+ ...($theme.direction === 'rtl' ? {
134
+ paddingLeft: $theme.sizing.scale600,
135
+ marginRight: $theme.sizing.scale600
136
+ } : {
137
+ paddingRight: $theme.sizing.scale600,
138
+ marginLeft: $theme.sizing.scale600
139
+ })
140
+ };
141
+ });
142
+ StyledHeadingContent.displayName = "StyledHeadingContent";
143
+ export const StyledHeadingContentRow = styled('div', {
144
+ display: 'flex',
145
+ justifyContent: 'space-between',
146
+ width: '100%'
147
+ });
148
+ StyledHeadingContentRow.displayName = "StyledHeadingContentRow";
149
+ export const StyledHeadingMainHeading = styled('p', // $FlowFixMe - suppressing due to webkit properties
150
+ ({
151
+ $maxLines = 1,
152
+ $theme
153
+ }) => {
154
+ return { ...$theme.typography.HeadingSmall,
155
+ color: $theme.colors.contentPrimary,
156
+ marginTop: 0,
157
+ marginBottom: 0,
158
+ marginRight: $theme.sizing.scale600,
159
+ display: '-webkit-box',
160
+ '-webkit-line-clamp': $maxLines,
161
+ '-webkit-box-orient': 'vertical',
162
+ overflow: 'hidden'
163
+ };
164
+ });
165
+ StyledHeadingMainHeading.displayName = "StyledHeadingMainHeading";
166
+ export const StyledHeadingSubHeading = styled('p', // $FlowFixMe - suppressing due to webkit properties
167
+ ({
168
+ $maxLines = 1,
169
+ $theme
170
+ }) => {
171
+ return { ...$theme.typography.ParagraphLarge,
172
+ color: $theme.colors.contentPrimary,
173
+ marginTop: 0,
174
+ marginBottom: 0,
175
+ marginRight: $theme.sizing.scale600,
176
+ display: '-webkit-box',
177
+ '-webkit-line-clamp': $maxLines,
178
+ '-webkit-box-orient': 'vertical',
179
+ overflow: 'hidden'
180
+ };
181
+ });
182
+ StyledHeadingSubHeading.displayName = "StyledHeadingSubHeading";
183
+ export const StyledHeadingEndEnhancerContainer = styled('div', ({
184
+ $isText,
185
+ $theme
186
+ }) => ({ ...$theme.typography.LabelMedium,
187
+ display: 'flex',
188
+ alignItems: $isText ? 'flex-end' : 'center',
189
+ whiteSpace: 'nowrap',
190
+ overflow: 'hidden',
191
+ textOverflow: 'ellipsis'
192
+ }));
193
+ StyledHeadingEndEnhancerContainer.displayName = "StyledHeadingEndEnhancerContainer";
194
+ export const StyledHeadingEndEnhancerDescriptionContainer = styled('p', ({
195
+ $theme
196
+ }) => ({ ...$theme.typography.ParagraphMedium,
197
+ marginTop: 0,
198
+ marginBottom: 0,
199
+ display: 'flex',
200
+ alignItems: 'flex-start',
201
+ whiteSpace: 'nowrap',
202
+ overflow: 'hidden',
203
+ textOverflow: 'ellipsis'
204
+ }));
205
+ StyledHeadingEndEnhancerDescriptionContainer.displayName = "StyledHeadingEndEnhancerDescriptionContainer";
@@ -845,7 +845,7 @@ class Select extends React.Component {
845
845
  }
846
846
 
847
847
  filterOptions(excludeOptions) {
848
- const filterValue = this.state.inputValue; // apply filter function
848
+ const filterValue = this.state.inputValue.trim(); // apply filter function
849
849
 
850
850
  if (this.props.filterOptions) {
851
851
  this.options = this.props.filterOptions(this.options, filterValue, excludeOptions, {
@@ -81,8 +81,7 @@ _defineProperty(Textarea, "defaultProps", {
81
81
  placeholder: '',
82
82
  required: false,
83
83
  rows: 3,
84
- size: SIZE.default,
85
- value: ''
84
+ size: SIZE.default
86
85
  });
87
86
 
88
87
  export default Textarea;
@@ -39,7 +39,7 @@ foundation = colorTokens) => {
39
39
  backgroundAccent: foundation.accent,
40
40
  backgroundNegative: foundation.negative,
41
41
  backgroundWarning: foundation.warning,
42
- backgroundPositive: foundation.positive,
42
+ backgroundPositive: colors.green500,
43
43
  backgroundLightAccent: colors.blue700,
44
44
  backgroundLightPositive: colors.green700,
45
45
  backgroundLightNegative: colors.red700,
@@ -60,7 +60,16 @@ foundation = colorTokens) => {
60
60
  borderAccentLight: colors.blue500,
61
61
  borderNegative: colors.red500,
62
62
  borderWarning: colors.yellow500,
63
- borderPositive: colors.green500
63
+ borderPositive: colors.green500,
64
+ // Programs
65
+ safety: colors.blue400,
66
+ eatsGreen400: colors.green400,
67
+ freightBlue400: colors.cobalt400,
68
+ jumpRed400: colors.red400,
69
+ rewardsTier1: colors.blue400,
70
+ rewardsTier2: colors.yellow400,
71
+ rewardsTier3: colors.platinum400,
72
+ rewardsTier4: colors.gray200
64
73
  };
65
74
  return { ...core,
66
75
  ...coreExtensions
@@ -39,7 +39,7 @@ foundation = colorTokens) => {
39
39
  backgroundAccent: foundation.accent,
40
40
  backgroundNegative: foundation.negative,
41
41
  backgroundWarning: foundation.warning,
42
- backgroundPositive: foundation.positive,
42
+ backgroundPositive: colors.green400,
43
43
  backgroundLightAccent: colors.blue50,
44
44
  backgroundLightNegative: colors.red50,
45
45
  backgroundLightWarning: colors.yellow50,
@@ -53,14 +53,23 @@ foundation = colorTokens) => {
53
53
  contentOnColorInverse: colors.black,
54
54
  contentNegative: foundation.negative,
55
55
  contentWarning: colors.yellow700,
56
- contentPositive: foundation.positive,
56
+ contentPositive: colors.green400,
57
57
  // Border
58
58
  borderStateDisabled: colors.gray50,
59
59
  borderAccent: colors.blue400,
60
60
  borderAccentLight: colors.blue200,
61
61
  borderNegative: colors.red200,
62
62
  borderWarning: colors.yellow200,
63
- borderPositive: colors.green200
63
+ borderPositive: colors.green200,
64
+ // Programs
65
+ safety: colors.blue400,
66
+ eatsGreen400: colors.green400,
67
+ freightBlue400: colors.cobalt400,
68
+ jumpRed400: colors.red400,
69
+ rewardsTier1: colors.blue400,
70
+ rewardsTier2: colors.yellow400,
71
+ rewardsTier3: colors.platinum400,
72
+ rewardsTier4: colors.black
64
73
  };
65
74
  return { ...core,
66
75
  ...coreExtensions
@@ -54,7 +54,7 @@ const colors = {
54
54
  green100: '#ADDEC9',
55
55
  green200: '#66D19E',
56
56
  green300: '#06C167',
57
- green400: '#05944F',
57
+ green400: '#048848',
58
58
  green500: '#03703C',
59
59
  green600: '#03582F',
60
60
  green700: '#10462D',
package/esm/list/index.js CHANGED
@@ -6,6 +6,7 @@ LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { default as ListItem } from './list-item.js';
8
8
  export { default as ListItemLabel } from './list-item-label.js';
9
+ export { default as ListHeading } from './list-heading.js';
9
10
  export { default as MenuAdapter } from './menu-adapter.js';
10
11
  export { ARTWORK_SIZES, SHAPE } from './constants.js';
11
12
  export * from './styled-components.js';
@@ -0,0 +1,116 @@
1
+ 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); }
2
+
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+
5
+ 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."); }
6
+
7
+ 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); }
8
+
9
+ 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; }
10
+
11
+ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
12
+
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+
15
+ 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; }
16
+
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
+
19
+ /*
20
+ Copyright (c) Uber Technologies, Inc.
21
+
22
+ This source code is licensed under the MIT license found in the
23
+ LICENSE file in the root directory of this source tree.
24
+ */
25
+ import React from 'react';
26
+ import ReactIs from 'react-is';
27
+ import { getOverrides } from '../helpers/overrides.js';
28
+ import { StyledHeadingRoot, StyledHeadingContent, StyledHeadingContentRow, StyledHeadingEndEnhancerContainer, StyledHeadingEndEnhancerDescriptionContainer, StyledHeadingMainHeading, StyledHeadingSubHeading } from './styled-components.js';
29
+
30
+ function RenderNode(props) {
31
+ var component = props.component,
32
+ restProps = _objectWithoutProperties(props, ["component"]);
33
+
34
+ var Component = component;
35
+
36
+ if (!Component) {
37
+ return null;
38
+ }
39
+
40
+ if (typeof Component === 'string') {
41
+ return Component;
42
+ }
43
+
44
+ if (ReactIs.isValidElementType(Component)) {
45
+ // $FlowFixMe
46
+ return /*#__PURE__*/React.createElement(Component, restProps);
47
+ } // $FlowFixMe
48
+
49
+
50
+ return Component;
51
+ }
52
+
53
+ var ListHeading = /*#__PURE__*/React.forwardRef(function (props, ref) {
54
+ var _props$overrides = props.overrides,
55
+ overrides = _props$overrides === void 0 ? {} : _props$overrides;
56
+ var EndEnhancer = props.endEnhancer;
57
+ var EndEnhancerDescription = props.endEnhancerDescription;
58
+ var SubHeading = props.subHeading;
59
+
60
+ var _getOverrides = getOverrides(overrides.Root, StyledHeadingRoot),
61
+ _getOverrides2 = _slicedToArray(_getOverrides, 2),
62
+ Root = _getOverrides2[0],
63
+ rootProps = _getOverrides2[1];
64
+
65
+ var _getOverrides3 = getOverrides(overrides.Content, StyledHeadingContent),
66
+ _getOverrides4 = _slicedToArray(_getOverrides3, 2),
67
+ Content = _getOverrides4[0],
68
+ contentProps = _getOverrides4[1];
69
+
70
+ var _getOverrides5 = getOverrides(overrides.HeadingContainer, StyledHeadingMainHeading),
71
+ _getOverrides6 = _slicedToArray(_getOverrides5, 2),
72
+ HeadingContainer = _getOverrides6[0],
73
+ headingContainerProps = _getOverrides6[1];
74
+
75
+ var _getOverrides7 = getOverrides(overrides.SubHeadingContainer, StyledHeadingSubHeading),
76
+ _getOverrides8 = _slicedToArray(_getOverrides7, 2),
77
+ SubHeadingContainer = _getOverrides8[0],
78
+ subHeadingContainerProps = _getOverrides8[1];
79
+
80
+ var _getOverrides9 = getOverrides(overrides.EndEnhancerContainer, StyledHeadingEndEnhancerContainer),
81
+ _getOverrides10 = _slicedToArray(_getOverrides9, 2),
82
+ EndEnhancerContainer = _getOverrides10[0],
83
+ endEnhancerContainerProps = _getOverrides10[1];
84
+
85
+ var _getOverrides11 = getOverrides(overrides.EndEnhancerDescriptionContainer, StyledHeadingEndEnhancerDescriptionContainer),
86
+ _getOverrides12 = _slicedToArray(_getOverrides11, 2),
87
+ EndEnhancerDescriptionContainer = _getOverrides12[0],
88
+ endEnhancerDescriptionContainerProps = _getOverrides12[1];
89
+
90
+ var isEndEnhancerString = typeof EndEnhancer === 'string';
91
+
92
+ if (isEndEnhancerString && EndEnhancerDescription) {
93
+ console.warn('endEnhancerDescription will not be rendered if endEnhancer is not a string');
94
+ }
95
+
96
+ return /*#__PURE__*/React.createElement(Root // eslint-disable-next-line flowtype/no-weak-types
97
+ , _extends({
98
+ ref: ref
99
+ }, rootProps), /*#__PURE__*/React.createElement(Content, contentProps, /*#__PURE__*/React.createElement(StyledHeadingContentRow, null, /*#__PURE__*/React.createElement(HeadingContainer, _extends({
100
+ $maxLines: props.maxLines
101
+ }, headingContainerProps), /*#__PURE__*/React.createElement(RenderNode, {
102
+ component: props.heading
103
+ })), EndEnhancer && /*#__PURE__*/React.createElement(EndEnhancerContainer, _extends({
104
+ $isText: isEndEnhancerString
105
+ }, endEnhancerContainerProps), /*#__PURE__*/React.createElement(RenderNode, {
106
+ component: EndEnhancer
107
+ }))), (SubHeading || EndEnhancerDescription) && /*#__PURE__*/React.createElement(StyledHeadingContentRow, null, /*#__PURE__*/React.createElement(SubHeadingContainer, _extends({
108
+ $maxLines: props.maxLines
109
+ }, subHeadingContainerProps), /*#__PURE__*/React.createElement(RenderNode, {
110
+ component: SubHeading
111
+ })), EndEnhancerDescription && isEndEnhancerString && /*#__PURE__*/React.createElement(EndEnhancerDescriptionContainer, endEnhancerDescriptionContainerProps, /*#__PURE__*/React.createElement(RenderNode, {
112
+ component: EndEnhancerDescription
113
+ })))));
114
+ });
115
+ ListHeading.displayName = 'ListHeading';
116
+ export default ListHeading;
@@ -6,6 +6,7 @@ LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import * as React from 'react';
8
8
  import ListItem from './list-item.js';
9
+ import { mergeOverrides } from '../helpers/overrides.js';
9
10
  var MenuAdapter = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
11
  return /*#__PURE__*/React.createElement(ListItem, {
11
12
  ref: ref,
@@ -13,7 +14,8 @@ var MenuAdapter = /*#__PURE__*/React.forwardRef(function (props, ref) {
13
14
  artwork: props.artwork,
14
15
  artworkSize: props.artworkSize,
15
16
  endEnhancer: props.endEnhancer,
16
- overrides: {
17
+ overrides: // $FlowFixMe
18
+ mergeOverrides({
17
19
  Root: {
18
20
  props: {
19
21
  onMouseEnter: props.onMouseEnter,
@@ -27,7 +29,7 @@ var MenuAdapter = /*#__PURE__*/React.forwardRef(function (props, ref) {
27
29
  };
28
30
  }
29
31
  }
30
- }
32
+ }, props.overrides)
31
33
  }, props.children);
32
34
  });
33
35
  MenuAdapter.displayName = 'MenuAdapter';
@@ -41,7 +41,7 @@ export var StyledContent = styled('div', function (_ref2) {
41
41
  borderLeftStyle: 'none',
42
42
  display: 'flex',
43
43
  flexGrow: 1,
44
- minHeight: $sublist ? 'initial' : '64px',
44
+ minHeight: $sublist ? 'initial' : $theme.sizing.scale1600,
45
45
  justifyContent: 'space-between'
46
46
  }, $theme.direction === 'rtl' ? {
47
47
  paddingLeft: $theme.sizing.scale600,
@@ -102,8 +102,102 @@ export var StyledLabelSublistContent = styled('p', function (_ref6) {
102
102
  var $theme = _ref6.$theme;
103
103
  return _objectSpread(_objectSpread({}, $theme.typography.LabelMedium), {}, {
104
104
  color: $theme.colors.contentPrimary,
105
- marginTop: '12px',
106
- marginBottom: '12px'
105
+ marginTop: $theme.sizing.scale500,
106
+ marginBottom: $theme.sizing.scale500
107
107
  });
108
108
  });
109
- StyledLabelSublistContent.displayName = "StyledLabelSublistContent";
109
+ StyledLabelSublistContent.displayName = "StyledLabelSublistContent";
110
+ export var StyledHeadingRoot = styled('div', function (_ref7) {
111
+ var $theme = _ref7.$theme;
112
+ return {
113
+ display: 'flex',
114
+ alignItems: 'center',
115
+ width: '100%',
116
+ backgroundColor: $theme.colors.backgroundPrimary,
117
+ overflow: 'hidden',
118
+ minHeight: $theme.sizing.scale1600
119
+ };
120
+ });
121
+ StyledHeadingRoot.displayName = "StyledHeadingRoot";
122
+ export var StyledHeadingContent = styled('div', function (_ref8) {
123
+ var $theme = _ref8.$theme;
124
+ return _objectSpread({
125
+ flexGrow: 1,
126
+ width: '100%',
127
+ minWidth: 0,
128
+ paddingTop: $theme.sizing.scale600,
129
+ paddingBottom: $theme.sizing.scale300
130
+ }, $theme.direction === 'rtl' ? {
131
+ paddingLeft: $theme.sizing.scale600,
132
+ marginRight: $theme.sizing.scale600
133
+ } : {
134
+ paddingRight: $theme.sizing.scale600,
135
+ marginLeft: $theme.sizing.scale600
136
+ });
137
+ });
138
+ StyledHeadingContent.displayName = "StyledHeadingContent";
139
+ export var StyledHeadingContentRow = styled('div', {
140
+ display: 'flex',
141
+ justifyContent: 'space-between',
142
+ width: '100%'
143
+ });
144
+ StyledHeadingContentRow.displayName = "StyledHeadingContentRow";
145
+ export var StyledHeadingMainHeading = styled('p', // $FlowFixMe - suppressing due to webkit properties
146
+ function (_ref9) {
147
+ var _ref9$$maxLines = _ref9.$maxLines,
148
+ $maxLines = _ref9$$maxLines === void 0 ? 1 : _ref9$$maxLines,
149
+ $theme = _ref9.$theme;
150
+ return _objectSpread(_objectSpread({}, $theme.typography.HeadingSmall), {}, {
151
+ color: $theme.colors.contentPrimary,
152
+ marginTop: 0,
153
+ marginBottom: 0,
154
+ marginRight: $theme.sizing.scale600,
155
+ display: '-webkit-box',
156
+ '-webkit-line-clamp': $maxLines,
157
+ '-webkit-box-orient': 'vertical',
158
+ overflow: 'hidden'
159
+ });
160
+ });
161
+ StyledHeadingMainHeading.displayName = "StyledHeadingMainHeading";
162
+ export var StyledHeadingSubHeading = styled('p', // $FlowFixMe - suppressing due to webkit properties
163
+ function (_ref10) {
164
+ var _ref10$$maxLines = _ref10.$maxLines,
165
+ $maxLines = _ref10$$maxLines === void 0 ? 1 : _ref10$$maxLines,
166
+ $theme = _ref10.$theme;
167
+ return _objectSpread(_objectSpread({}, $theme.typography.ParagraphLarge), {}, {
168
+ color: $theme.colors.contentPrimary,
169
+ marginTop: 0,
170
+ marginBottom: 0,
171
+ marginRight: $theme.sizing.scale600,
172
+ display: '-webkit-box',
173
+ '-webkit-line-clamp': $maxLines,
174
+ '-webkit-box-orient': 'vertical',
175
+ overflow: 'hidden'
176
+ });
177
+ });
178
+ StyledHeadingSubHeading.displayName = "StyledHeadingSubHeading";
179
+ export var StyledHeadingEndEnhancerContainer = styled('div', function (_ref11) {
180
+ var $isText = _ref11.$isText,
181
+ $theme = _ref11.$theme;
182
+ return _objectSpread(_objectSpread({}, $theme.typography.LabelMedium), {}, {
183
+ display: 'flex',
184
+ alignItems: $isText ? 'flex-end' : 'center',
185
+ whiteSpace: 'nowrap',
186
+ overflow: 'hidden',
187
+ textOverflow: 'ellipsis'
188
+ });
189
+ });
190
+ StyledHeadingEndEnhancerContainer.displayName = "StyledHeadingEndEnhancerContainer";
191
+ export var StyledHeadingEndEnhancerDescriptionContainer = styled('p', function (_ref12) {
192
+ var $theme = _ref12.$theme;
193
+ return _objectSpread(_objectSpread({}, $theme.typography.ParagraphMedium), {}, {
194
+ marginTop: 0,
195
+ marginBottom: 0,
196
+ display: 'flex',
197
+ alignItems: 'flex-start',
198
+ whiteSpace: 'nowrap',
199
+ overflow: 'hidden',
200
+ textOverflow: 'ellipsis'
201
+ });
202
+ });
203
+ StyledHeadingEndEnhancerDescriptionContainer.displayName = "StyledHeadingEndEnhancerDescriptionContainer";
@@ -992,7 +992,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
992
992
  value: function filterOptions(excludeOptions) {
993
993
  var _this5 = this;
994
994
 
995
- var filterValue = this.state.inputValue; // apply filter function
995
+ var filterValue = this.state.inputValue.trim(); // apply filter function
996
996
 
997
997
  if (this.props.filterOptions) {
998
998
  this.options = this.props.filterOptions(this.options, filterValue, excludeOptions, {
@@ -139,8 +139,7 @@ _defineProperty(Textarea, "defaultProps", {
139
139
  placeholder: '',
140
140
  required: false,
141
141
  rows: 3,
142
- size: SIZE.default,
143
- value: ''
142
+ size: SIZE.default
144
143
  });
145
144
 
146
145
  export default Textarea;
@@ -45,7 +45,7 @@ export default (function () {
45
45
  backgroundAccent: foundation.accent,
46
46
  backgroundNegative: foundation.negative,
47
47
  backgroundWarning: foundation.warning,
48
- backgroundPositive: foundation.positive,
48
+ backgroundPositive: colors.green500,
49
49
  backgroundLightAccent: colors.blue700,
50
50
  backgroundLightPositive: colors.green700,
51
51
  backgroundLightNegative: colors.red700,
@@ -66,7 +66,16 @@ export default (function () {
66
66
  borderAccentLight: colors.blue500,
67
67
  borderNegative: colors.red500,
68
68
  borderWarning: colors.yellow500,
69
- borderPositive: colors.green500
69
+ borderPositive: colors.green500,
70
+ // Programs
71
+ safety: colors.blue400,
72
+ eatsGreen400: colors.green400,
73
+ freightBlue400: colors.cobalt400,
74
+ jumpRed400: colors.red400,
75
+ rewardsTier1: colors.blue400,
76
+ rewardsTier2: colors.yellow400,
77
+ rewardsTier3: colors.platinum400,
78
+ rewardsTier4: colors.gray200
70
79
  };
71
80
  return _objectSpread(_objectSpread({}, core), coreExtensions);
72
81
  });