baseui 10.0.0 → 10.3.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 (162) hide show
  1. package/app-nav-bar/index.d.ts +24 -0
  2. package/app-nav-bar/mobile-menu.js +5 -3
  3. package/app-nav-bar/mobile-menu.js.flow +3 -2
  4. package/app-nav-bar/user-menu.js +5 -3
  5. package/app-nav-bar/user-menu.js.flow +3 -2
  6. package/block/index.d.ts +7 -0
  7. package/combobox/combobox.js +4 -9
  8. package/combobox/combobox.js.flow +4 -3
  9. package/combobox/index.d.ts +1 -1
  10. package/data-table/filter-menu.js +5 -3
  11. package/data-table/filter-menu.js.flow +3 -2
  12. package/data-table/header-cell.js +1 -1
  13. package/data-table/header-cell.js.flow +1 -1
  14. package/datepicker/calendar.js +6 -1
  15. package/datepicker/calendar.js.flow +4 -0
  16. package/datepicker/datepicker.js +1 -1
  17. package/datepicker/datepicker.js.flow +5 -2
  18. package/datepicker/index.d.ts +9 -1
  19. package/datepicker/month.js +2 -1
  20. package/datepicker/month.js.flow +8 -1
  21. package/datepicker/types.js.flow +13 -6
  22. package/es/app-nav-bar/mobile-menu.js +5 -5
  23. package/es/app-nav-bar/user-menu.js +5 -5
  24. package/es/combobox/combobox.js +4 -3
  25. package/es/data-table/filter-menu.js +3 -2
  26. package/es/data-table/header-cell.js +1 -1
  27. package/es/datepicker/calendar.js +6 -1
  28. package/es/datepicker/datepicker.js +1 -1
  29. package/es/datepicker/month.js +2 -1
  30. package/es/form-control/form-control.js +6 -14
  31. package/es/helper/helper.js +10 -6
  32. package/es/helpers/base-provider.js +4 -1
  33. package/es/input/input.js +9 -5
  34. package/es/layer/layer.js +5 -1
  35. package/es/layout-grid/grid.js +16 -10
  36. package/es/layout-grid/styled-components.js +24 -12
  37. package/es/list/index.js +1 -0
  38. package/es/list/list-heading.js +77 -0
  39. package/es/list/list-item.js +1 -1
  40. package/es/list/menu-adapter.js +4 -2
  41. package/es/list/styled-components.js +101 -4
  42. package/es/menu/stateful-container.js +41 -27
  43. package/es/phone-input/base-country-picker.js +2 -0
  44. package/es/popover/popover.js +21 -10
  45. package/es/select/select-component.js +34 -22
  46. package/es/table-semantic/styled-components.js +8 -10
  47. package/es/table-semantic/table-builder.js +3 -2
  48. package/es/table-semantic/table.js +1 -0
  49. package/es/tag/index.js +1 -1
  50. package/es/tag/styled-components.js +2 -4
  51. package/es/tag/tag.js +16 -16
  52. package/es/textarea/textarea.js +1 -2
  53. package/es/themes/dark-theme/color-semantic-tokens.js +18 -8
  54. package/es/themes/light-theme/color-semantic-tokens.js +14 -4
  55. package/es/tokens/colors.js +3 -3
  56. package/es/tree-view/tree-view.js +0 -2
  57. package/esm/app-nav-bar/mobile-menu.js +5 -3
  58. package/esm/app-nav-bar/user-menu.js +5 -3
  59. package/esm/combobox/combobox.js +4 -7
  60. package/esm/data-table/filter-menu.js +4 -3
  61. package/esm/data-table/header-cell.js +1 -1
  62. package/esm/datepicker/calendar.js +6 -1
  63. package/esm/datepicker/datepicker.js +1 -1
  64. package/esm/datepicker/month.js +2 -1
  65. package/esm/form-control/form-control.js +21 -33
  66. package/esm/helper/helper.js +10 -6
  67. package/esm/helpers/base-provider.js +4 -1
  68. package/esm/input/input.js +9 -5
  69. package/esm/layer/layer.js +5 -1
  70. package/esm/layout-grid/grid.js +20 -10
  71. package/esm/layout-grid/styled-components.js +52 -35
  72. package/esm/list/index.js +1 -0
  73. package/esm/list/list-heading.js +116 -0
  74. package/esm/list/list-item.js +1 -1
  75. package/esm/list/menu-adapter.js +4 -2
  76. package/esm/list/styled-components.js +99 -3
  77. package/esm/menu/stateful-container.js +56 -40
  78. package/esm/phone-input/base-country-picker.js +2 -0
  79. package/esm/popover/popover.js +25 -16
  80. package/esm/select/select-component.js +87 -79
  81. package/esm/table-semantic/styled-components.js +8 -10
  82. package/esm/table-semantic/table-builder.js +3 -2
  83. package/esm/table-semantic/table.js +1 -0
  84. package/esm/tag/index.js +1 -1
  85. package/esm/tag/styled-components.js +2 -4
  86. package/esm/tag/tag.js +18 -16
  87. package/esm/textarea/textarea.js +1 -2
  88. package/esm/themes/dark-theme/color-semantic-tokens.js +18 -8
  89. package/esm/themes/light-theme/color-semantic-tokens.js +14 -4
  90. package/esm/tokens/colors.js +3 -3
  91. package/esm/tree-view/tree-view.js +0 -2
  92. package/form-control/form-control.js +21 -35
  93. package/form-control/form-control.js.flow +37 -35
  94. package/helper/helper.js +10 -6
  95. package/helper/helper.js.flow +1 -0
  96. package/helpers/base-provider.js +5 -1
  97. package/helpers/base-provider.js.flow +4 -1
  98. package/index.d.ts +1 -0
  99. package/input/input.js +9 -5
  100. package/input/input.js.flow +9 -5
  101. package/layer/layer.js +5 -1
  102. package/layer/layer.js.flow +3 -1
  103. package/layer/types.js.flow +4 -0
  104. package/layout-grid/grid.js +19 -9
  105. package/layout-grid/grid.js.flow +52 -26
  106. package/layout-grid/index.d.ts +1 -0
  107. package/layout-grid/styled-components.js +54 -36
  108. package/layout-grid/styled-components.js.flow +48 -24
  109. package/layout-grid/types.js.flow +12 -0
  110. package/list/index.js +9 -0
  111. package/list/index.js.flow +1 -0
  112. package/list/list-heading.js +124 -0
  113. package/list/list-heading.js.flow +138 -0
  114. package/list/list-item.js +1 -1
  115. package/list/list-item.js.flow +1 -1
  116. package/list/menu-adapter.js +5 -2
  117. package/list/menu-adapter.js.flow +21 -11
  118. package/list/styled-components.js +108 -5
  119. package/list/styled-components.js.flow +103 -2
  120. package/list/types.js.flow +22 -0
  121. package/menu/stateful-container.js +57 -42
  122. package/menu/stateful-container.js.flow +38 -26
  123. package/package.json +1 -1
  124. package/phone-input/base-country-picker.js +2 -0
  125. package/phone-input/base-country-picker.js.flow +2 -0
  126. package/popover/popover.js +26 -17
  127. package/popover/popover.js.flow +19 -7
  128. package/select/select-component.js +87 -79
  129. package/select/select-component.js.flow +119 -103
  130. package/snackbar/index.d.ts +3 -3
  131. package/snackbar/types.js.flow +1 -1
  132. package/table-semantic/index.d.ts +1 -0
  133. package/table-semantic/styled-components.js +8 -10
  134. package/table-semantic/styled-components.js.flow +20 -20
  135. package/table-semantic/table-builder.js +3 -2
  136. package/table-semantic/table-builder.js.flow +3 -2
  137. package/table-semantic/table.js +1 -0
  138. package/table-semantic/table.js.flow +1 -0
  139. package/tag/index.d.ts +0 -1
  140. package/tag/index.js +0 -6
  141. package/tag/index.js.flow +0 -1
  142. package/tag/styled-components.js +3 -6
  143. package/tag/styled-components.js.flow +0 -2
  144. package/tag/tag.js +19 -14
  145. package/tag/tag.js.flow +13 -19
  146. package/textarea/textarea.js +1 -2
  147. package/textarea/textarea.js.flow +0 -1
  148. package/theme.ts +12 -0
  149. package/themes/dark-theme/color-semantic-tokens.js +18 -8
  150. package/themes/dark-theme/color-semantic-tokens.js.flow +18 -7
  151. package/themes/light-theme/color-semantic-tokens.js +14 -4
  152. package/themes/light-theme/color-semantic-tokens.js.flow +14 -3
  153. package/themes/types.js.flow +11 -0
  154. package/toast/index.d.ts +1 -0
  155. package/tokens/colors.js +3 -3
  156. package/tokens/colors.js.flow +3 -3
  157. package/tree-view/tree-view.js +0 -2
  158. package/tree-view/tree-view.js.flow +0 -1
  159. package/es/utils/get-bui-id.js +0 -33
  160. package/esm/utils/get-bui-id.js +0 -33
  161. package/utils/get-bui-id.js +0 -41
  162. package/utils/get-bui-id.js.flow +0 -39
@@ -18,7 +18,7 @@ import SearchIconComponent from '../icon/search.js';
18
18
  import { LocaleContext } from '../locale/index.js';
19
19
  import { Popover, PLACEMENT } from '../popover/index.js';
20
20
  import { Spinner } from '../spinner/index.js';
21
- import getBuiId from '../utils/get-bui-id.js';
21
+ import { UIDConsumer } from 'react-uid';
22
22
  import AutosizeInput from './autosize-input.js';
23
23
  import { TYPE, STATE_CHANGE_TYPE } from './constants.js';
24
24
  import defaultProps from './default-props.js';
@@ -78,7 +78,6 @@ class Select extends React.Component {
78
78
  // the select components can accept an array of options or an object where properties are optgroups
79
79
  // and values are arrays of options. this class property is constructed and updated in a normalized
80
80
  // shape where optgroup titles are stored on the option in the __optgroup field.
81
- // id generated for the listbox. used by screenreaders to associate the input with the menu it controls
82
81
  constructor(props) {
83
82
  super(props);
84
83
 
@@ -98,8 +97,6 @@ class Select extends React.Component {
98
97
 
99
98
  _defineProperty(this, "options", []);
100
99
 
101
- _defineProperty(this, "listboxId", getBuiId());
102
-
103
100
  _defineProperty(this, "state", {
104
101
  activeDescendant: null,
105
102
  inputValue: '',
@@ -148,16 +145,17 @@ class Select extends React.Component {
148
145
  if (!this.state.isFocused) {
149
146
  this.openAfterFocus = this.props.openOnClick;
150
147
  this.focus();
151
- return;
152
148
  }
153
149
 
154
150
  if (!this.state.isOpen) {
155
151
  this.setState({
156
152
  isOpen: true,
153
+ isFocused: true,
157
154
  isPseudoFocused: false
158
155
  });
159
- return;
160
156
  }
157
+
158
+ return;
161
159
  } // Ensures that interactive elements within the Select component do not trigger the outer click
162
160
  // handler. For example, after an option is selected clicks on the 'clear' icon call here. We
163
161
  // should ignore those events. This comes after case where click is on input element, so that
@@ -172,9 +170,19 @@ class Select extends React.Component {
172
170
 
173
171
  if (!this.props.searchable) {
174
172
  this.focus();
175
- this.setState(prev => ({
176
- isOpen: !prev.isOpen
177
- }));
173
+
174
+ if (this.state.isOpen) {
175
+ this.setState({
176
+ isOpen: false,
177
+ isFocused: false
178
+ });
179
+ } else {
180
+ this.setState({
181
+ isOpen: true,
182
+ isFocused: true
183
+ });
184
+ }
185
+
178
186
  return;
179
187
  } // Cases below only apply to searchable Select component.
180
188
 
@@ -693,7 +701,7 @@ class Select extends React.Component {
693
701
  }
694
702
  }
695
703
 
696
- renderInput() {
704
+ renderInput(listboxId) {
697
705
  const {
698
706
  overrides = {}
699
707
  } = this.props;
@@ -714,25 +722,29 @@ class Select extends React.Component {
714
722
  "aria-disabled": this.props.disabled,
715
723
  "aria-label": label,
716
724
  "aria-labelledby": this.props['aria-labelledby'],
717
- "aria-owns": this.state.isOpen ? this.listboxId : null,
725
+ "aria-owns": this.state.isOpen ? listboxId : null,
718
726
  "aria-required": this.props.required || null,
719
727
  onFocus: this.handleInputFocus,
720
- ref: this.handleInputRef,
721
728
  tabIndex: 0
722
729
  }, sharedProps, inputContainerProps), /*#__PURE__*/React.createElement("input", {
723
- "aria-hidden": "true",
730
+ "aria-hidden": true,
724
731
  id: this.props.id || null,
725
- onFocus: this.handleInputFocus,
732
+ ref: this.handleInputRef,
726
733
  style: {
727
- display: 'none'
728
- }
734
+ opacity: 0,
735
+ width: 0,
736
+ overflow: 'hidden',
737
+ border: 'none',
738
+ padding: 0
739
+ },
740
+ tabIndex: -1
729
741
  }));
730
742
  }
731
743
 
732
744
  return /*#__PURE__*/React.createElement(InputContainer, _extends({}, sharedProps, inputContainerProps), /*#__PURE__*/React.createElement(AutosizeInput, _extends({
733
745
  "aria-activedescendant": this.state.activeDescendant,
734
746
  "aria-autocomplete": "list",
735
- "aria-controls": this.state.isOpen ? this.listboxId : null,
747
+ "aria-controls": this.state.isOpen ? listboxId : null,
736
748
  "aria-describedby": this.props['aria-describedby'],
737
749
  "aria-errormessage": this.props['aria-errormessage'],
738
750
  "aria-disabled": this.props.disabled || null,
@@ -833,7 +845,7 @@ class Select extends React.Component {
833
845
  }
834
846
 
835
847
  filterOptions(excludeOptions) {
836
- const filterValue = this.state.inputValue; // apply filter function
848
+ const filterValue = this.state.inputValue.trim(); // apply filter function
837
849
 
838
850
  if (this.props.filterOptions) {
839
851
  this.options = this.props.filterOptions(this.options, filterValue, excludeOptions, {
@@ -934,13 +946,13 @@ class Select extends React.Component {
934
946
  }
935
947
  }
936
948
 
937
- return /*#__PURE__*/React.createElement(LocaleContext.Consumer, null, locale => /*#__PURE__*/React.createElement(PopoverOverride // Popover does not provide ability to forward refs through, and if we were to simply
949
+ return /*#__PURE__*/React.createElement(UIDConsumer, null, listboxId => /*#__PURE__*/React.createElement(LocaleContext.Consumer, null, locale => /*#__PURE__*/React.createElement(PopoverOverride // Popover does not provide ability to forward refs through, and if we were to simply
938
950
  // apply the ref to the Root component below it would be overwritten before the popover
939
951
  // renders it. Using this strategy, we will get a ref to the popover, then reuse its
940
952
  // anchorRef so we can check if clicks are on the select component or not.
941
953
  // eslint-disable-next-line flowtype/no-weak-types
942
954
  , _extends({
943
- ref: ref => {
955
+ innerRef: ref => {
944
956
  if (!ref) return;
945
957
  this.anchor = ref.anchorRef;
946
958
  },
@@ -954,7 +966,7 @@ class Select extends React.Component {
954
966
  error: this.props.error,
955
967
  positive: this.props.positive,
956
968
  getOptionLabel: this.props.getOptionLabel || this.getOptionLabel.bind(this, locale),
957
- id: this.listboxId,
969
+ id: listboxId,
958
970
  isLoading: this.props.isLoading,
959
971
  labelKey: this.props.labelKey,
960
972
  maxDropdownHeight: this.props.maxDropdownHeight,
@@ -987,7 +999,7 @@ class Select extends React.Component {
987
999
  onTouchEnd: this.handleTouchEnd,
988
1000
  onTouchMove: this.handleTouchMove,
989
1001
  onTouchStart: this.handleTouchStart
990
- }, sharedProps, controlContainerProps), type === TYPE.search ? this.renderSearch() : null, /*#__PURE__*/React.createElement(ValueContainer, _extends({}, sharedProps, valueContainerProps), this.renderValue(valueArray, isOpen, locale), this.renderInput(), this.shouldShowPlaceholder() ? /*#__PURE__*/React.createElement(Placeholder, _extends({}, sharedProps, placeholderProps), typeof this.props.placeholder !== 'undefined' ? this.props.placeholder : locale.select.placeholder) : null), /*#__PURE__*/React.createElement(IconsContainer, _extends({}, sharedProps, iconsContainerProps), this.renderLoading(), this.renderClear(), type === TYPE.select ? this.renderArrow() : null)))));
1002
+ }, sharedProps, controlContainerProps), type === TYPE.search ? this.renderSearch() : null, /*#__PURE__*/React.createElement(ValueContainer, _extends({}, sharedProps, valueContainerProps), this.renderValue(valueArray, isOpen, locale), this.renderInput(listboxId), this.shouldShowPlaceholder() ? /*#__PURE__*/React.createElement(Placeholder, _extends({}, sharedProps, placeholderProps), typeof this.props.placeholder !== 'undefined' ? this.props.placeholder : locale.select.placeholder) : null), /*#__PURE__*/React.createElement(IconsContainer, _extends({}, sharedProps, iconsContainerProps), this.renderLoading(), this.renderClear(), type === TYPE.select ? this.renderArrow() : null))))));
991
1003
  }
992
1004
 
993
1005
  }
@@ -45,7 +45,7 @@ export const StyledTable = styled('table', ({
45
45
  $width
46
46
  }) => {
47
47
  return {
48
- borderCollapse: 'collapse',
48
+ borderSpacing: '0',
49
49
  boxSizing: 'border-box',
50
50
  minWidth: '100%',
51
51
  width: $width || null
@@ -156,16 +156,9 @@ export const StyledTableBody = styled('tbody', ({
156
156
  });
157
157
  StyledTableBody.displayName = "StyledTableBody";
158
158
  export const StyledTableBodyRow = styled('tr', ({
159
- $theme,
160
- $divider
159
+ $theme
161
160
  }) => {
162
- const borderHorizontal = $divider === undefined || $divider === DIVIDER.horizontal || $divider === DIVIDER.grid;
163
161
  return {
164
- ':not(:last-child)': {
165
- borderBottomColor: borderHorizontal ? $theme.borders.border300.borderColor : null,
166
- borderBottomStyle: borderHorizontal ? $theme.borders.border300.borderStyle : null,
167
- borderBottomWidth: borderHorizontal ? $theme.borders.border300.borderWidth : null
168
- },
169
162
  ':hover': {
170
163
  backgroundColor: $theme.colors.tableStripedBackground
171
164
  }
@@ -176,10 +169,12 @@ export const StyledTableBodyCell = styled('td', ({
176
169
  $theme,
177
170
  $size,
178
171
  $divider,
179
- $isNumeric
172
+ $isNumeric,
173
+ $isLastRow
180
174
  }) => {
181
175
  const borderDir = $theme.direction === 'rtl' ? 'Left' : 'Right';
182
176
  const borderVertical = $divider === DIVIDER.vertical || $divider === DIVIDER.grid;
177
+ const borderHorizontal = $divider === undefined || $divider === DIVIDER.horizontal || $divider === DIVIDER.grid;
183
178
  const padding = sizeToCellPadding($theme, $size);
184
179
  return { ...$theme.typography.font200,
185
180
  paddingTop: padding,
@@ -189,6 +184,9 @@ export const StyledTableBodyCell = styled('td', ({
189
184
  color: $theme.colors.contentPrimary,
190
185
  textAlign: $isNumeric ? 'right' : null,
191
186
  verticalAlign: 'top',
187
+ borderBottomColor: !$isLastRow && borderHorizontal ? $theme.borders.border300.borderColor : null,
188
+ borderBottomStyle: !$isLastRow && borderHorizontal ? $theme.borders.border300.borderStyle : null,
189
+ borderBottomWidth: !$isLastRow && borderHorizontal ? $theme.borders.border300.borderWidth : null,
192
190
  ':not(:last-child)': {
193
191
  [`border${borderDir}Color`]: borderVertical ? $theme.borders.border300.borderColor : null,
194
192
  [`border${borderDir}Style`]: borderVertical ? $theme.borders.border300.borderStyle : null,
@@ -131,7 +131,7 @@ export default class TableBuilder extends React.Component {
131
131
  }, tableHeadCellSortableProps, colTableHeadCellSortableProps), col.header, sortIcon);
132
132
  }
133
133
 
134
- function renderCell(col, colIndex, row, rowIndex) {
134
+ function renderCell(col, colIndex, row, rowIndex, lastRowindex) {
135
135
  const colOverrides = col.overrides || {};
136
136
  const [ColTableBodyCell, colTableBodyCellProps] = getOverrides(colOverrides.TableBodyCell, TableBodyCell);
137
137
  return /*#__PURE__*/React.createElement(ColTableBodyCell, _extends({
@@ -142,6 +142,7 @@ export default class TableBuilder extends React.Component {
142
142
  $row: row,
143
143
  $rowIndex: rowIndex,
144
144
  $isNumeric: col.numeric,
145
+ $isLastRow: rowIndex === lastRowindex,
145
146
  $size: size
146
147
  }, tableBodyCellProps, colTableBodyCellProps), col.children(row, rowIndex));
147
148
  }
@@ -165,7 +166,7 @@ export default class TableBuilder extends React.Component {
165
166
  $divider: divider,
166
167
  $row: row,
167
168
  $rowIndex: rowIndex
168
- }, tableBodyRowProps), columns.map((col, colIndex) => renderCell(col, colIndex, row, rowIndex)))))));
169
+ }, tableBodyRowProps), columns.map((col, colIndex) => renderCell(col, colIndex, row, rowIndex, data.length - 1)))))));
169
170
  }
170
171
 
171
172
  }
@@ -64,6 +64,7 @@ export default class Table extends React.Component {
64
64
  $divider: divider,
65
65
  $row: row,
66
66
  $rowIndex: rowIndex,
67
+ $isLastRow: rowIndex === data.length - 1,
67
68
  $size: size
68
69
  }, tableBodyCellProps), row[colIndex])))))));
69
70
  }
package/es/tag/index.js CHANGED
@@ -6,5 +6,5 @@ LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { default as Tag } from './tag.js'; // Styled elements
8
8
 
9
- export { Root as StyledRoot, Action as StyledAction, ActionIcon as StyledActionIcon, Text as StyledText } from './styled-components.js';
9
+ export { Root as StyledRoot, Action as StyledAction, Text as StyledText } from './styled-components.js';
10
10
  export { KIND, VARIANT, SIZE } from './constants.js';
@@ -276,11 +276,9 @@ export const Action = styled('span', props => {
276
276
  transitionDuration: 'background-color',
277
277
  transitionTimingFunction: $theme.animation.easeOutCurve
278
278
  };
279
- });
280
- Action.displayName = "Action";
281
- export const ActionIcon = styled('svg', {}); // $FlowFixMe https://github.com/facebook/flow/issues/7745
279
+ }); // $FlowFixMe https://github.com/facebook/flow/issues/7745
282
280
 
283
- ActionIcon.displayName = "ActionIcon";
281
+ Action.displayName = "Action";
284
282
  export const StartEnhancerContainer = styled('div', ({
285
283
  $theme,
286
284
  $size = SIZE.small
package/es/tag/tag.js CHANGED
@@ -8,10 +8,17 @@ LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import * as React from 'react';
10
10
  import { getOverrides } from '../helpers/overrides.js';
11
- import { Action as StyledAction, Root as StyledRoot, ActionIcon as StyledActionIcon, StartEnhancerContainer as StyledStartEnhancerContainer, Text as StyledText } from './styled-components.js';
11
+ import { Action as StyledAction, Root as StyledRoot, StartEnhancerContainer as StyledStartEnhancerContainer, Text as StyledText } from './styled-components.js';
12
12
  import { KIND, VARIANT, SIZE } from './constants.js';
13
13
  import { getTextFromChildren } from './utils.js';
14
- import { isFocusVisible, forkFocus, forkBlur } from '../utils/focusVisible.js';
14
+ import DeleteIcon from '../icon/delete.js';
15
+ import { isFocusVisible, forkFocus, forkBlur } from '../utils/focusVisible.js'; // Previously, Tag used a hardcoded SVG as its 'close' icon. Replacing it with
16
+ // Delete requires modifying Delete's viewbox to prevent visual regressions.
17
+
18
+ const ModifiedViewBoxDeleteIcon = props => /*#__PURE__*/React.createElement(DeleteIcon, _extends({
19
+ viewBox: "5 5 13.186 13.186"
20
+ }, props));
21
+
15
22
  const Tag = /*#__PURE__*/React.forwardRef((props, ref) => {
16
23
  const {
17
24
  children,
@@ -68,7 +75,7 @@ const Tag = /*#__PURE__*/React.forwardRef((props, ref) => {
68
75
 
69
76
  const [Root, rootProps] = getOverrides(overrides.Root, StyledRoot);
70
77
  const [Action, actionProps] = getOverrides(overrides.Action, StyledAction);
71
- const [ActionIcon, actionIconProps] = getOverrides(overrides.ActionIcon, StyledActionIcon);
78
+ const [ActionIcon, actionIconProps] = getOverrides(overrides.ActionIcon, ModifiedViewBoxDeleteIcon);
72
79
  const [StartEnhancerContainer, startEnhancerContainerProps] = getOverrides(overrides.StartEnhancerContainer, StyledStartEnhancerContainer);
73
80
  const [Text, textProps] = getOverrides(overrides.Text, StyledText);
74
81
  const clickable = typeof onClick === 'function';
@@ -98,9 +105,9 @@ const Tag = /*#__PURE__*/React.forwardRef((props, ref) => {
98
105
  const titleText = title || getTextFromChildren(children);
99
106
  const isButton = (clickable || closeable) && !disabled;
100
107
  const actionSize = {
101
- [SIZE.small]: '12',
102
- [SIZE.medium]: '16',
103
- [SIZE.large]: '20'
108
+ [SIZE.small]: 12,
109
+ [SIZE.medium]: 16,
110
+ [SIZE.large]: 20
104
111
  }[size]; // Capitalize for JSX
105
112
 
106
113
  const StartEnhancer = startEnhancer;
@@ -115,21 +122,14 @@ const Tag = /*#__PURE__*/React.forwardRef((props, ref) => {
115
122
  }, rootHandlers, sharedProps, rootProps, {
116
123
  onFocus: forkFocus(rootProps, handleFocus),
117
124
  onBlur: forkBlur(rootProps, handleBlur)
118
- }), StartEnhancer && /*#__PURE__*/React.createElement(StartEnhancerContainer, startEnhancerContainerProps, /*#__PURE__*/React.createElement(StartEnhancer, null)), /*#__PURE__*/React.createElement(Text, _extends({
125
+ }), StartEnhancer && StartEnhancer !== 0 && /*#__PURE__*/React.createElement(StartEnhancerContainer, startEnhancerContainerProps, /*#__PURE__*/React.createElement(StartEnhancer, null)), /*#__PURE__*/React.createElement(Text, _extends({
119
126
  title: titleText
120
127
  }, textProps), children), closeable ? /*#__PURE__*/React.createElement(Action, _extends({
121
128
  "aria-hidden": true,
122
129
  role: "presentation"
123
130
  }, actionHandlers, sharedProps, actionProps), /*#__PURE__*/React.createElement(ActionIcon, _extends({
124
- width: actionSize,
125
- height: actionSize,
126
- viewBox: "0 0 24 24",
127
- fill: "none",
128
- xmlns: "http://www.w3.org/2000/svg"
129
- }, actionIconProps), /*#__PURE__*/React.createElement("path", {
130
- fill: "currentColor",
131
- d: "M21.0999 5.09998L18.8999 2.90002L11.9999 9.90002L5.09985 2.90002L2.8999 5.09998L9.8999 12L2.8999 18.9L5.09985 21.1L11.9999 14.1L18.8999 21.1L21.0999 18.9L14.0999 12L21.0999 5.09998Z"
132
- }))) : null);
131
+ size: actionSize
132
+ }, actionIconProps))) : null);
133
133
  });
134
134
  Tag.displayName = 'Tag';
135
135
  export default Tag;
@@ -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;
@@ -17,12 +17,12 @@ foundation = colorTokens) => {
17
17
  backgroundInversePrimary: foundation.primaryA,
18
18
  backgroundInverseSecondary: colors.gray300,
19
19
  // Content
20
- contentPrimary: foundation.primaryA,
21
- contentSecondary: colors.gray400,
22
- contentTertiary: colors.gray500,
23
- contentInversePrimary: foundation.primaryB,
24
- contentInverseSecondary: colors.gray600,
25
- contentInverseTertiary: colors.gray500,
20
+ contentPrimary: colors.white,
21
+ contentSecondary: colors.gray300,
22
+ contentTertiary: colors.gray400,
23
+ contentInversePrimary: colors.black,
24
+ contentInverseSecondary: colors.gray700,
25
+ contentInverseTertiary: colors.gray600,
26
26
  // Border
27
27
  borderOpaque: colors.gray700,
28
28
  borderTransparent: hexToRgba(foundation.primaryA, '0.08'),
@@ -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,17 @@ 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,
73
+ membership: colors.yellow600
64
74
  };
65
75
  return { ...core,
66
76
  ...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,
@@ -52,15 +52,25 @@ foundation = colorTokens) => {
52
52
  contentOnColor: colors.white,
53
53
  contentOnColorInverse: colors.black,
54
54
  contentNegative: foundation.negative,
55
- contentWarning: colors.yellow700,
56
- contentPositive: foundation.positive,
55
+ contentWarning: colors.yellow600,
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,
73
+ membership: colors.yellow600
64
74
  };
65
75
  return { ...core,
66
76
  ...coreExtensions
@@ -11,7 +11,7 @@ const colors = {
11
11
  gray200: '#E2E2E2',
12
12
  gray300: '#CBCBCB',
13
13
  gray400: '#AFAFAF',
14
- gray500: '#757575',
14
+ gray500: '#6B6B6B',
15
15
  gray600: '#545454',
16
16
  gray700: '#333333',
17
17
  gray800: '#1F1F1F',
@@ -48,13 +48,13 @@ const colors = {
48
48
  yellow300: '#FFCF70',
49
49
  yellow400: '#FFC043',
50
50
  yellow500: '#BC8B2C',
51
- yellow600: '#997328',
51
+ yellow600: '#996F00',
52
52
  yellow700: '#674D1B',
53
53
  green50: '#E6F2ED',
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',
@@ -107,8 +107,6 @@ export default function TreeView(props) {
107
107
  break;
108
108
 
109
109
  default:
110
- e.preventDefault();
111
-
112
110
  if (timeOutRef.current !== null) {
113
111
  clearTimeout(timeOutRef.current);
114
112
  }
@@ -179,12 +179,14 @@ export default function MobileMenu(props) {
179
179
  boxShadow: 'none'
180
180
  }
181
181
  },
182
- ListItem: function ListItem(listItemProps) {
183
- return /*#__PURE__*/React.createElement(MobileNavMenuItem, _extends({}, listItemProps, {
182
+ ListItem: /*#__PURE__*/React.forwardRef(function (listItemProps, ref) {
183
+ return /*#__PURE__*/React.createElement(MobileNavMenuItem, _extends({
184
+ ref: ref
185
+ }, listItemProps, {
184
186
  mapItemToNode: mapItemToNode,
185
187
  overrides: overrides
186
188
  }));
187
- }
189
+ })
188
190
  }, // $FlowFixMe
189
191
  menuProps.overrides);
190
192
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SideMenuButton, _extends({
@@ -111,11 +111,13 @@ export default function UserMenuComponent(props) {
111
111
  width: MENU_ITEM_WIDTH
112
112
  }
113
113
  },
114
- ListItem: function ListItem(listItemProps) {
115
- return /*#__PURE__*/React.createElement(UserMenuListItem, _extends({}, listItemProps, {
114
+ ListItem: /*#__PURE__*/React.forwardRef(function (listItemProps, ref) {
115
+ return /*#__PURE__*/React.createElement(UserMenuListItem, _extends({
116
+ ref: ref
117
+ }, listItemProps, {
116
118
  mapItemToNode: props.mapItemToNode
117
119
  }));
118
- }
120
+ })
119
121
  }, // $FlowFixMe
120
122
  userMenuProps.overrides);
121
123
  return /*#__PURE__*/React.createElement(StatefulPopover, {
@@ -27,7 +27,7 @@ import { Input, SIZE } from '../input/index.js';
27
27
  import { scrollItemIntoView } from '../menu/utils.js';
28
28
  import { getOverrides } from '../helpers/overrides.js';
29
29
  import { Popover, PLACEMENT } from '../popover/index.js';
30
- import getBuiId from '../utils/get-bui-id.js';
30
+ import { useUIDSeed } from 'react-uid';
31
31
  import { StyledRoot, StyledInputContainer, StyledListBox, StyledListItem } from './styled-components.js';
32
32
  var ENTER = 13;
33
33
  var ESCAPE = 27;
@@ -79,12 +79,9 @@ function Combobox(props) {
79
79
  var inputRef = React.useRef(null);
80
80
  var listboxRef = React.useRef(null);
81
81
  var selectedOptionRef = React.useRef(null);
82
- var activeDescendantId = React.useMemo(function () {
83
- return getBuiId();
84
- }, []);
85
- var listboxId = React.useMemo(function () {
86
- return getBuiId();
87
- }, []); // Handles case where an application wants to update the value in the input element
82
+ var seed = useUIDSeed();
83
+ var activeDescendantId = seed('descendant');
84
+ var listboxId = seed('listbox'); // Handles case where an application wants to update the value in the input element
88
85
  // from outside of the combobox component.
89
86
 
90
87
  React.useEffect(function () {
@@ -28,7 +28,7 @@ import { Filter as FilterIcon } from '../icon/index.js';
28
28
  import { Input, SIZE as INPUT_SIZE } from '../input/index.js';
29
29
  import { Popover, PLACEMENT } from '../popover/index.js';
30
30
  import { useStyletron } from '../styles/index.js';
31
- import getBuiId from '../utils/get-bui-id.js';
31
+ import { useUIDSeed } from 'react-uid';
32
32
  import { COLUMNS } from './constants.js';
33
33
  import { matchesQuery } from './text-search.js';
34
34
  import { LocaleContext } from '../locale/index.js';
@@ -73,8 +73,9 @@ function Options(props) {
73
73
  focusVisible = _React$useState2[0],
74
74
  setFocusVisible = _React$useState2[1];
75
75
 
76
- var buiRef = React.useRef(props.columns.map(function (_, index) {
77
- return getBuiId();
76
+ var seed = useUIDSeed();
77
+ var buiRef = React.useRef(props.columns.map(function (col) {
78
+ return seed(col);
78
79
  }));
79
80
 
80
81
  var handleFocus = function handleFocus(event) {
@@ -59,7 +59,7 @@ var HeaderCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
59
59
  ref: ref,
60
60
  role: "button",
61
61
  tabIndex: "0",
62
- className: css(_objectSpread(_objectSpread({}, theme.typography.font150), {}, {
62
+ className: css(_objectSpread(_objectSpread({}, theme.typography.font350), {}, {
63
63
  alignItems: 'center',
64
64
  backgroundColor: backgroundColor,
65
65
  boxSizing: 'border-box',
@@ -430,7 +430,8 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
430
430
  onChange: _this.handleDateChange,
431
431
  overrides: overrides,
432
432
  value: _this.props.value,
433
- peekNextMonth: _this.props.peekNextMonth
433
+ peekNextMonth: _this.props.peekNextMonth,
434
+ fixedHeight: _this.props.fixedHeight
434
435
  })));
435
436
  monthList.push( /*#__PURE__*/React.createElement("div", {
436
437
  key: "month-component-".concat(i)
@@ -534,6 +535,10 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
534
535
  }
535
536
  }
536
537
  }
538
+
539
+ if (_this.props.onQuickSelectChange) {
540
+ _this.props.onQuickSelectChange(params.option);
541
+ }
537
542
  },
538
543
  options: _this.props.quickSelectOptions || [{
539
544
  id: locale.datepicker.pastWeek,
@@ -492,7 +492,7 @@ var Datepicker = /*#__PURE__*/function (_React$Component) {
492
492
  InputWrapper = _getOverrides6[0],
493
493
  inputWrapperProps = _getOverrides6[1];
494
494
 
495
- var placeholder = this.props.placeholder || (this.props.range ? 'YYYY/MM/DD – YYYY/MM/DD' : 'YYYY/MM/DD');
495
+ var placeholder = this.props.placeholder || this.props.placeholder === '' ? this.props.placeholder : this.props.range ? 'YYYY/MM/DD – YYYY/MM/DD' : 'YYYY/MM/DD';
496
496
  return /*#__PURE__*/React.createElement(LocaleContext.Consumer, null, function (locale) {
497
497
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PopoverComponent, _extends({
498
498
  focusLock: false,
@@ -66,6 +66,7 @@ var defaultProps = {
66
66
  peekNextMonth: false,
67
67
  value: null
68
68
  };
69
+ var CALENDAR_MAX_ROWS = 6;
69
70
 
70
71
  var CalendarMonth = /*#__PURE__*/function (_React$Component) {
71
72
  _inherits(CalendarMonth, _React$Component);
@@ -101,7 +102,7 @@ var CalendarMonth = /*#__PURE__*/function (_React$Component) {
101
102
  var i = 0;
102
103
  var isWithinMonth = true;
103
104
 
104
- while (isWithinMonth) {
105
+ while (isWithinMonth || _this.props.fixedHeight && _this.props.peekNextMonth && i < CALENDAR_MAX_ROWS) {
105
106
  weeks.push( /*#__PURE__*/React.createElement(Week, {
106
107
  adapter: _this.props.adapter,
107
108
  date: currentWeekStart,