@box/blueprint-web 9.14.2 → 9.15.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.
@@ -60,6 +60,7 @@ const RootInner = ({
60
60
  displayValue,
61
61
  displayAvatar,
62
62
  displayTooltip,
63
+ hideOnEscape,
63
64
  renderOption,
64
65
  options,
65
66
  filterFn,
@@ -357,6 +358,7 @@ const RootInner = ({
357
358
  className: styles.popover,
358
359
  fitViewport: true,
359
360
  gutter: 8,
361
+ hideOnEscape: hideOnEscape,
360
362
  portal: true,
361
363
  portalElement: portalElement,
362
364
  render: render,
@@ -1,3 +1,4 @@
1
+ import { type ComboboxPopoverProps } from '@ariakit/react';
1
2
  import { type SelectItemProps } from '@ariakit/react-core/select/select-item';
2
3
  import { type SelectRendererProps } from '@ariakit/react-core/select/select-renderer';
3
4
  import { type TextAreaProps } from '../text-area/types';
@@ -201,6 +202,16 @@ export interface ComboboxBaseProps<Multiple extends boolean, FreeInput extends b
201
202
  * `idForLabel` is used in the Combobox Group to define the id of the subcomponent associated with the Combobox Group label.
202
203
  */
203
204
  idForLabel?: string;
205
+ /**
206
+ * Determines if the combobox options list will hide when the user presses the Escape key.
207
+ *
208
+ * This prop can be either a boolean or a function that accepts an event as an argument and returns a boolean. The
209
+ * event object represents the keydown event that initiated the hide action, which could be either a native keyboard
210
+ * event or a React synthetic event.
211
+ *
212
+ * @default true
213
+ */
214
+ hideOnEscape?: ComboboxPopoverProps['hideOnEscape'];
204
215
  }
205
216
  export type ComboboxTextArea = Pick<TextAreaProps, 'maxRows' | 'minRows' | 'maxLength' | 'aria-describedby'> & {
206
217
  as: 'textarea';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "9.14.2",
3
+ "version": "9.15.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -62,7 +62,7 @@
62
62
  "react-stately": "^3.31.1",
63
63
  "tsx": "^4.16.5"
64
64
  },
65
- "gitHead": "e9d6e1eb579ae22609ab068369df8a02119f0e0c",
65
+ "gitHead": "9454e982a868f848ada755c5d712169d9cbe7a86",
66
66
  "module": "lib-esm/index.js",
67
67
  "main": "lib-esm/index.js",
68
68
  "exports": {