@spark-web/button 5.3.2 → 5.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @spark-web/button
2
2
 
3
+ ## 5.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#647](https://github.com/brighte-labs/spark-web/pull/647)
8
+ [`b6825e0`](https://github.com/brighte-labs/spark-web/commit/b6825e0fdffb297cecb033fd70e15b13a65d27a7)
9
+ Thanks [@michtntbrighte](https://github.com/michtntbrighte)! - Improve low
10
+ prominence and support filled props for button
11
+
12
+ ## 5.3.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [#625](https://github.com/brighte-labs/spark-web/pull/625)
17
+ [`b844b9c`](https://github.com/brighte-labs/spark-web/commit/b844b9c2891b92fe739015add83569efd272d223)
18
+ Thanks [@michtntbrighte](https://github.com/michtntbrighte)! - Upgrade button
19
+ spinner
20
+
3
21
  ## 5.3.2
4
22
 
5
23
  ### Patch Changes
@@ -5,5 +5,5 @@ export declare type ButtonLinkProps = LinkComponentProps & CommonButtonProps;
5
5
  /** The appearance of a `Button`, with the semantics of a link. */
6
6
  export declare const ButtonLink: <Comp extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "a">(props: {
7
7
  as?: Comp | undefined;
8
- ref?: import("react").Ref<Comp extends "symbol" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
8
+ ref?: import("react").Ref<Comp extends "symbol" | "text" | "switch" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "text" | "switch" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "textPath" | "tspan" | "use" | "view">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
9
9
  } & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<Comp>>, "as"> & ButtonLinkProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -22,6 +22,8 @@ export declare type ButtonProps = CommonButtonProps & {
22
22
  size?: CommonButtonProps['size'];
23
23
  /** Provide an alternate type if the button is within a form. */
24
24
  type?: 'button' | 'submit' | 'reset';
25
+ /** When true, the button will be filled depending on the variant. */
26
+ filled?: boolean;
25
27
  };
26
28
  /**
27
29
  * Buttons are used to initialize an action, their label should express what
@@ -38,5 +38,7 @@ export declare type ButtonStyleProps = {
38
38
  size?: ButtonSize;
39
39
  /** Sets the tone of the button. */
40
40
  tone?: ButtonTone;
41
+ /** Sets the background color of the button. */
42
+ filled?: boolean;
41
43
  };
42
44
  export {};
@@ -7,7 +7,7 @@ import type { ButtonStyleProps } from "./types.js";
7
7
  * underlying `Box` component, and the second item is a CSS object that can be
8
8
  * passed to Emotion's `css` function.
9
9
  */
10
- export declare function useButtonStyles({ iconOnly, prominence, rounded, size, tone, }: UseButtonStylesProps): readonly [{
10
+ export declare function useButtonStyles({ iconOnly, prominence, rounded, size, tone, filled, }: UseButtonStylesProps): readonly [{
11
11
  readonly alignItems: "center";
12
12
  readonly background: string | number | undefined;
13
13
  readonly border: import("@spark-web/theme").ResponsiveProp<string> | undefined;
@@ -95,7 +95,7 @@ export declare function useButtonStyles({ iconOnly, prominence, rounded, size, t
95
95
  }, {
96
96
  readonly fontWeight: "medium" | "light" | "bold" | "thin" | "extralight" | "regular" | "semibold" | "extrabold" | "black" | undefined;
97
97
  }];
98
- export declare type UseButtonStylesProps = Omit<Required<ButtonStyleProps>, 'css' | 'rounded'> & Partial<Pick<ButtonStyleProps, 'rounded'>> & {
98
+ export declare type UseButtonStylesProps = Omit<Required<ButtonStyleProps>, 'css' | 'rounded' | 'filled'> & Partial<Pick<ButtonStyleProps, 'rounded' | 'filled'>> & {
99
99
  /** Whether the children of the button is a single icon or not. */
100
100
  iconOnly: boolean;
101
101
  };
@@ -4,6 +4,7 @@ import type { SparkTheme } from '@spark-web/theme';
4
4
  import type { ButtonProminence, ButtonTone } from "./types.js";
5
5
  declare type BaseButtonStyles = {
6
6
  background: BoxProps['background'];
7
+ backgroundFill?: BoxProps['background'];
7
8
  border?: BoxProps['border'];
8
9
  borderWidth?: BoxProps['borderWidth'];
9
10
  textTone?: ForegroundTone;
@@ -10,9 +10,9 @@ var react = require('react');
10
10
  var jsxRuntime = require('@emotion/react/jsx-runtime');
11
11
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
12
12
  var react$1 = require('@emotion/react');
13
- var a11y = require('@spark-web/a11y');
14
13
  var spinner = require('@spark-web/spinner');
15
14
  var text = require('@spark-web/text');
15
+ var a11y = require('@spark-web/a11y');
16
16
  var theme = require('@spark-web/theme');
17
17
  var link = require('@spark-web/link');
18
18
  var ts = require('@spark-web/utils/ts');
@@ -127,9 +127,10 @@ var variants = {
127
127
  low: {
128
128
  primary: _objectSpread({
129
129
  background: 'surface',
130
+ backgroundFill: 'primarySoft',
130
131
  border: 'primary',
131
132
  borderWidth: 'large',
132
- textTone: 'primary',
133
+ textTone: 'neutral',
133
134
  backgroundHover: 'none',
134
135
  borderHover: 'primaryHover',
135
136
  textToneHover: 'primaryHover',
@@ -317,13 +318,15 @@ function HiddenWhenLoading(_ref2) {
317
318
  * passed to Emotion's `css` function.
318
319
  */
319
320
  function useButtonStyles(_ref) {
320
- var _theme$components$but, _theme$components, _theme$components2;
321
+ var _variant$backgroundFi, _theme$components$but, _theme$components, _theme$components2;
321
322
  var iconOnly = _ref.iconOnly,
322
323
  prominence = _ref.prominence,
323
324
  _ref$rounded = _ref.rounded,
324
325
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
325
326
  size = _ref.size,
326
- tone = _ref.tone;
327
+ tone = _ref.tone,
328
+ _ref$filled = _ref.filled,
329
+ filled = _ref$filled === void 0 ? false : _ref$filled;
327
330
  var theme$1 = theme.useTheme();
328
331
  var focusRingStyles = a11y.useFocusRing({
329
332
  tone: tone,
@@ -341,7 +344,7 @@ function useButtonStyles(_ref) {
341
344
  };
342
345
  return [{
343
346
  alignItems: 'center',
344
- background: variant === null || variant === void 0 ? void 0 : variant.background,
347
+ background: filled ? (_variant$backgroundFi = variant === null || variant === void 0 ? void 0 : variant.backgroundFill) !== null && _variant$backgroundFi !== void 0 ? _variant$backgroundFi : variant === null || variant === void 0 ? void 0 : variant.background : variant === null || variant === void 0 ? void 0 : variant.background,
345
348
  border: variant === null || variant === void 0 ? void 0 : variant.border,
346
349
  borderWidth: variant === null || variant === void 0 ? void 0 : variant.borderWidth,
347
350
  borderRadius: rounded ? 'full' : isLarge ? 'medium' : 'small',
@@ -394,7 +397,7 @@ function useButtonStyles(_ref) {
394
397
  }];
395
398
  }
396
399
 
397
- var _excluded$1 = ["aria-controls", "aria-describedby", "aria-expanded", "aria-label", "data", "disabled", "id", "loading", "onClick", "css", "rounded", "prominence", "size", "tone", "type"];
400
+ var _excluded$1 = ["aria-controls", "aria-describedby", "aria-expanded", "aria-label", "data", "disabled", "id", "loading", "onClick", "css", "rounded", "prominence", "size", "tone", "type", "filled"];
398
401
  /**
399
402
  * Buttons are used to initialize an action, their label should express what
400
403
  * action will occur when the user interacts with it.
@@ -420,6 +423,8 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
420
423
  _ref$tone = _ref.tone,
421
424
  tone = _ref$tone === void 0 ? 'primary' : _ref$tone,
422
425
  type = _ref.type,
426
+ _ref$filled = _ref.filled,
427
+ filled = _ref$filled === void 0 ? false : _ref$filled,
423
428
  props = _objectWithoutProperties(_ref, _excluded$1);
424
429
  var iconOnly = Boolean(props.label);
425
430
  var _useButtonStyles = useButtonStyles({
@@ -427,7 +432,8 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
427
432
  rounded: rounded,
428
433
  size: size,
429
434
  tone: tone,
430
- prominence: prominence
435
+ prominence: prominence,
436
+ filled: filled
431
437
  }),
432
438
  _useButtonStyles2 = _slicedToArray(_useButtonStyles, 3),
433
439
  boxProps = _useButtonStyles2[0],
@@ -460,7 +466,7 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
460
466
  Button.displayName = 'Button';
461
467
  function Loading(_ref2) {
462
468
  var tone = _ref2.tone;
463
- return jsxRuntime.jsxs(box.Box, {
469
+ return jsxRuntime.jsx(box.Box, {
464
470
  as: "span",
465
471
  position: "absolute",
466
472
  top: 0,
@@ -470,12 +476,10 @@ function Loading(_ref2) {
470
476
  display: "flex",
471
477
  alignItems: "center",
472
478
  justifyContent: "center",
473
- children: [jsxRuntime.jsx(a11y.VisuallyHidden, {
474
- children: "button loading indicator"
475
- }), jsxRuntime.jsx(spinner.Spinner, {
479
+ children: jsxRuntime.jsx(spinner.Spinner, {
476
480
  size: "xsmall",
477
481
  tone: tone
478
- })]
482
+ })
479
483
  });
480
484
  }
481
485
 
@@ -10,9 +10,9 @@ var react = require('react');
10
10
  var jsxRuntime = require('@emotion/react/jsx-runtime');
11
11
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
12
12
  var react$1 = require('@emotion/react');
13
- var a11y = require('@spark-web/a11y');
14
13
  var spinner = require('@spark-web/spinner');
15
14
  var text = require('@spark-web/text');
15
+ var a11y = require('@spark-web/a11y');
16
16
  var theme = require('@spark-web/theme');
17
17
  var link = require('@spark-web/link');
18
18
  var ts = require('@spark-web/utils/ts');
@@ -127,9 +127,10 @@ var variants = {
127
127
  low: {
128
128
  primary: _objectSpread({
129
129
  background: 'surface',
130
+ backgroundFill: 'primarySoft',
130
131
  border: 'primary',
131
132
  borderWidth: 'large',
132
- textTone: 'primary',
133
+ textTone: 'neutral',
133
134
  backgroundHover: 'none',
134
135
  borderHover: 'primaryHover',
135
136
  textToneHover: 'primaryHover',
@@ -317,13 +318,15 @@ function HiddenWhenLoading(_ref2) {
317
318
  * passed to Emotion's `css` function.
318
319
  */
319
320
  function useButtonStyles(_ref) {
320
- var _theme$components$but, _theme$components, _theme$components2;
321
+ var _variant$backgroundFi, _theme$components$but, _theme$components, _theme$components2;
321
322
  var iconOnly = _ref.iconOnly,
322
323
  prominence = _ref.prominence,
323
324
  _ref$rounded = _ref.rounded,
324
325
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
325
326
  size = _ref.size,
326
- tone = _ref.tone;
327
+ tone = _ref.tone,
328
+ _ref$filled = _ref.filled,
329
+ filled = _ref$filled === void 0 ? false : _ref$filled;
327
330
  var theme$1 = theme.useTheme();
328
331
  var focusRingStyles = a11y.useFocusRing({
329
332
  tone: tone,
@@ -341,7 +344,7 @@ function useButtonStyles(_ref) {
341
344
  };
342
345
  return [{
343
346
  alignItems: 'center',
344
- background: variant === null || variant === void 0 ? void 0 : variant.background,
347
+ background: filled ? (_variant$backgroundFi = variant === null || variant === void 0 ? void 0 : variant.backgroundFill) !== null && _variant$backgroundFi !== void 0 ? _variant$backgroundFi : variant === null || variant === void 0 ? void 0 : variant.background : variant === null || variant === void 0 ? void 0 : variant.background,
345
348
  border: variant === null || variant === void 0 ? void 0 : variant.border,
346
349
  borderWidth: variant === null || variant === void 0 ? void 0 : variant.borderWidth,
347
350
  borderRadius: rounded ? 'full' : isLarge ? 'medium' : 'small',
@@ -394,7 +397,7 @@ function useButtonStyles(_ref) {
394
397
  }];
395
398
  }
396
399
 
397
- var _excluded$1 = ["aria-controls", "aria-describedby", "aria-expanded", "aria-label", "data", "disabled", "id", "loading", "onClick", "css", "rounded", "prominence", "size", "tone", "type"];
400
+ var _excluded$1 = ["aria-controls", "aria-describedby", "aria-expanded", "aria-label", "data", "disabled", "id", "loading", "onClick", "css", "rounded", "prominence", "size", "tone", "type", "filled"];
398
401
  /**
399
402
  * Buttons are used to initialize an action, their label should express what
400
403
  * action will occur when the user interacts with it.
@@ -420,6 +423,8 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
420
423
  _ref$tone = _ref.tone,
421
424
  tone = _ref$tone === void 0 ? 'primary' : _ref$tone,
422
425
  type = _ref.type,
426
+ _ref$filled = _ref.filled,
427
+ filled = _ref$filled === void 0 ? false : _ref$filled,
423
428
  props = _objectWithoutProperties(_ref, _excluded$1);
424
429
  var iconOnly = Boolean(props.label);
425
430
  var _useButtonStyles = useButtonStyles({
@@ -427,7 +432,8 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
427
432
  rounded: rounded,
428
433
  size: size,
429
434
  tone: tone,
430
- prominence: prominence
435
+ prominence: prominence,
436
+ filled: filled
431
437
  }),
432
438
  _useButtonStyles2 = _slicedToArray(_useButtonStyles, 3),
433
439
  boxProps = _useButtonStyles2[0],
@@ -460,7 +466,7 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
460
466
  Button.displayName = 'Button';
461
467
  function Loading(_ref2) {
462
468
  var tone = _ref2.tone;
463
- return jsxRuntime.jsxs(box.Box, {
469
+ return jsxRuntime.jsx(box.Box, {
464
470
  as: "span",
465
471
  position: "absolute",
466
472
  top: 0,
@@ -470,12 +476,10 @@ function Loading(_ref2) {
470
476
  display: "flex",
471
477
  alignItems: "center",
472
478
  justifyContent: "center",
473
- children: [jsxRuntime.jsx(a11y.VisuallyHidden, {
474
- children: "button loading indicator"
475
- }), jsxRuntime.jsx(spinner.Spinner, {
479
+ children: jsxRuntime.jsx(spinner.Spinner, {
476
480
  size: "xsmall",
477
481
  tone: tone
478
- })]
482
+ })
479
483
  });
480
484
  }
481
485
 
@@ -6,9 +6,9 @@ import { forwardRef, useRef, useCallback, Children, isValidElement, cloneElement
6
6
  import { jsx, jsxs } from '@emotion/react/jsx-runtime';
7
7
  import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
8
8
  import { css } from '@emotion/react';
9
- import { useFocusRing, VisuallyHidden } from '@spark-web/a11y';
10
9
  import { Spinner } from '@spark-web/spinner';
11
10
  import { Text } from '@spark-web/text';
11
+ import { useFocusRing } from '@spark-web/a11y';
12
12
  import { useTheme } from '@spark-web/theme';
13
13
  import { useLinkComponent } from '@spark-web/link';
14
14
  import { forwardRefWithAs } from '@spark-web/utils/ts';
@@ -123,9 +123,10 @@ var variants = {
123
123
  low: {
124
124
  primary: _objectSpread({
125
125
  background: 'surface',
126
+ backgroundFill: 'primarySoft',
126
127
  border: 'primary',
127
128
  borderWidth: 'large',
128
- textTone: 'primary',
129
+ textTone: 'neutral',
129
130
  backgroundHover: 'none',
130
131
  borderHover: 'primaryHover',
131
132
  textToneHover: 'primaryHover',
@@ -313,13 +314,15 @@ function HiddenWhenLoading(_ref2) {
313
314
  * passed to Emotion's `css` function.
314
315
  */
315
316
  function useButtonStyles(_ref) {
316
- var _theme$components$but, _theme$components, _theme$components2;
317
+ var _variant$backgroundFi, _theme$components$but, _theme$components, _theme$components2;
317
318
  var iconOnly = _ref.iconOnly,
318
319
  prominence = _ref.prominence,
319
320
  _ref$rounded = _ref.rounded,
320
321
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
321
322
  size = _ref.size,
322
- tone = _ref.tone;
323
+ tone = _ref.tone,
324
+ _ref$filled = _ref.filled,
325
+ filled = _ref$filled === void 0 ? false : _ref$filled;
323
326
  var theme = useTheme();
324
327
  var focusRingStyles = useFocusRing({
325
328
  tone: tone,
@@ -337,7 +340,7 @@ function useButtonStyles(_ref) {
337
340
  };
338
341
  return [{
339
342
  alignItems: 'center',
340
- background: variant === null || variant === void 0 ? void 0 : variant.background,
343
+ background: filled ? (_variant$backgroundFi = variant === null || variant === void 0 ? void 0 : variant.backgroundFill) !== null && _variant$backgroundFi !== void 0 ? _variant$backgroundFi : variant === null || variant === void 0 ? void 0 : variant.background : variant === null || variant === void 0 ? void 0 : variant.background,
341
344
  border: variant === null || variant === void 0 ? void 0 : variant.border,
342
345
  borderWidth: variant === null || variant === void 0 ? void 0 : variant.borderWidth,
343
346
  borderRadius: rounded ? 'full' : isLarge ? 'medium' : 'small',
@@ -390,7 +393,7 @@ function useButtonStyles(_ref) {
390
393
  }];
391
394
  }
392
395
 
393
- var _excluded$1 = ["aria-controls", "aria-describedby", "aria-expanded", "aria-label", "data", "disabled", "id", "loading", "onClick", "css", "rounded", "prominence", "size", "tone", "type"];
396
+ var _excluded$1 = ["aria-controls", "aria-describedby", "aria-expanded", "aria-label", "data", "disabled", "id", "loading", "onClick", "css", "rounded", "prominence", "size", "tone", "type", "filled"];
394
397
  /**
395
398
  * Buttons are used to initialize an action, their label should express what
396
399
  * action will occur when the user interacts with it.
@@ -416,6 +419,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
416
419
  _ref$tone = _ref.tone,
417
420
  tone = _ref$tone === void 0 ? 'primary' : _ref$tone,
418
421
  type = _ref.type,
422
+ _ref$filled = _ref.filled,
423
+ filled = _ref$filled === void 0 ? false : _ref$filled,
419
424
  props = _objectWithoutProperties(_ref, _excluded$1);
420
425
  var iconOnly = Boolean(props.label);
421
426
  var _useButtonStyles = useButtonStyles({
@@ -423,7 +428,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
423
428
  rounded: rounded,
424
429
  size: size,
425
430
  tone: tone,
426
- prominence: prominence
431
+ prominence: prominence,
432
+ filled: filled
427
433
  }),
428
434
  _useButtonStyles2 = _slicedToArray(_useButtonStyles, 3),
429
435
  boxProps = _useButtonStyles2[0],
@@ -456,7 +462,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
456
462
  Button.displayName = 'Button';
457
463
  function Loading(_ref2) {
458
464
  var tone = _ref2.tone;
459
- return jsxs(Box, {
465
+ return jsx(Box, {
460
466
  as: "span",
461
467
  position: "absolute",
462
468
  top: 0,
@@ -466,12 +472,10 @@ function Loading(_ref2) {
466
472
  display: "flex",
467
473
  alignItems: "center",
468
474
  justifyContent: "center",
469
- children: [jsx(VisuallyHidden, {
470
- children: "button loading indicator"
471
- }), jsx(Spinner, {
475
+ children: jsx(Spinner, {
472
476
  size: "xsmall",
473
477
  tone: tone
474
- })]
478
+ })
475
479
  });
476
480
  }
477
481
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/button",
3
- "version": "5.3.2",
3
+ "version": "5.4.0",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,9 +21,9 @@
21
21
  "@spark-web/box": "^5.0.0",
22
22
  "@spark-web/icon": "^5.0.0",
23
23
  "@spark-web/link": "^5.0.0",
24
- "@spark-web/spinner": "^5.0.0",
24
+ "@spark-web/spinner": "^5.0.1",
25
25
  "@spark-web/text": "^5.1.0",
26
- "@spark-web/theme": "^5.9.0",
26
+ "@spark-web/theme": "^5.11.0",
27
27
  "@spark-web/utils": "^5.0.0"
28
28
  },
29
29
  "devDependencies": {