@box/blueprint-web 5.33.0 → 6.0.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.
@@ -1,16 +1,15 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { forwardRef, useRef, useMemo, Children, isValidElement } from 'react';
3
2
  import { Button } from '@ariakit/react';
4
3
  import clsx from 'clsx';
5
- import { BaseButtonIcon } from './base-button-icon.js';
6
- import { BaseButtonContext } from './base-button-context.js';
4
+ import { forwardRef, useRef, useMemo, Children, isValidElement } from 'react';
7
5
  import { LoadingIndicator } from '../../loading-indicator/loading-indicator.js';
8
6
  import { getButtonOptions } from '../../utils/getButtonOptions.js';
9
7
  import { useForkRef } from '../../utils/useForkRef.js';
10
- import { loadingIndicatorVariantMap } from './utils.js';
8
+ import { BaseButtonContext } from './base-button-context.js';
9
+ import { BaseButtonIcon } from './base-button-icon.js';
11
10
  import styles from './base-button.module.js';
11
+ import { loadingIndicatorVariantMap } from './utils.js';
12
12
 
13
- const DEFAULT_ELEMENT = 'button';
14
13
  const BaseButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
15
14
  const {
16
15
  children,
@@ -20,7 +19,6 @@ const BaseButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
20
19
  loading,
21
20
  loadingAriaLabel,
22
21
  'aria-label': ariaLabel,
23
- as = DEFAULT_ELEMENT,
24
22
  ...rest
25
23
  } = getButtonOptions(props);
26
24
  const ref = useRef(null);
@@ -40,7 +38,6 @@ const BaseButton = /*#__PURE__*/forwardRef((props, forwardedRef) => {
40
38
  ...rest,
41
39
  ref: useForkRef(ref, forwardedRef),
42
40
  "aria-label": loading ? undefined : ariaLabel,
43
- as: as,
44
41
  className: clsx([styles.button, styles[variant], styles[size]], {
45
42
  [styles.isIconButton]: isIconButton,
46
43
  [styles.hide]: loading