@spark-web/button 5.3.2 → 5.3.3

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,14 @@
1
1
  # @spark-web/button
2
2
 
3
+ ## 5.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#625](https://github.com/brighte-labs/spark-web/pull/625)
8
+ [`b844b9c`](https://github.com/brighte-labs/spark-web/commit/b844b9c2891b92fe739015add83569efd272d223)
9
+ Thanks [@michtntbrighte](https://github.com/michtntbrighte)! - Upgrade button
10
+ spinner
11
+
3
12
  ## 5.3.2
4
13
 
5
14
  ### 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" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "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" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "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" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "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;
9
9
  } & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<Comp>>, "as"> & ButtonLinkProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -93,7 +93,7 @@ export declare function useButtonStyles({ iconOnly, prominence, rounded, size, t
93
93
  readonly transitionTimingFunction: string;
94
94
  readonly transitionDuration: string;
95
95
  }, {
96
- readonly fontWeight: "medium" | "light" | "bold" | "thin" | "extralight" | "regular" | "semibold" | "extrabold" | "black" | undefined;
96
+ readonly fontWeight: "bold" | "medium" | "light" | "thin" | "black" | "extralight" | "regular" | "semibold" | "extrabold" | undefined;
97
97
  }];
98
98
  export declare type UseButtonStylesProps = Omit<Required<ButtonStyleProps>, 'css' | 'rounded'> & Partial<Pick<ButtonStyleProps, 'rounded'>> & {
99
99
  /** Whether the children of the button is a single icon or not. */
@@ -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');
@@ -460,7 +460,7 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
460
460
  Button.displayName = 'Button';
461
461
  function Loading(_ref2) {
462
462
  var tone = _ref2.tone;
463
- return jsxRuntime.jsxs(box.Box, {
463
+ return jsxRuntime.jsx(box.Box, {
464
464
  as: "span",
465
465
  position: "absolute",
466
466
  top: 0,
@@ -470,12 +470,10 @@ function Loading(_ref2) {
470
470
  display: "flex",
471
471
  alignItems: "center",
472
472
  justifyContent: "center",
473
- children: [jsxRuntime.jsx(a11y.VisuallyHidden, {
474
- children: "button loading indicator"
475
- }), jsxRuntime.jsx(spinner.Spinner, {
473
+ children: jsxRuntime.jsx(spinner.Spinner, {
476
474
  size: "xsmall",
477
475
  tone: tone
478
- })]
476
+ })
479
477
  });
480
478
  }
481
479
 
@@ -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');
@@ -460,7 +460,7 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
460
460
  Button.displayName = 'Button';
461
461
  function Loading(_ref2) {
462
462
  var tone = _ref2.tone;
463
- return jsxRuntime.jsxs(box.Box, {
463
+ return jsxRuntime.jsx(box.Box, {
464
464
  as: "span",
465
465
  position: "absolute",
466
466
  top: 0,
@@ -470,12 +470,10 @@ function Loading(_ref2) {
470
470
  display: "flex",
471
471
  alignItems: "center",
472
472
  justifyContent: "center",
473
- children: [jsxRuntime.jsx(a11y.VisuallyHidden, {
474
- children: "button loading indicator"
475
- }), jsxRuntime.jsx(spinner.Spinner, {
473
+ children: jsxRuntime.jsx(spinner.Spinner, {
476
474
  size: "xsmall",
477
475
  tone: tone
478
- })]
476
+ })
479
477
  });
480
478
  }
481
479
 
@@ -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';
@@ -456,7 +456,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
456
456
  Button.displayName = 'Button';
457
457
  function Loading(_ref2) {
458
458
  var tone = _ref2.tone;
459
- return jsxs(Box, {
459
+ return jsx(Box, {
460
460
  as: "span",
461
461
  position: "absolute",
462
462
  top: 0,
@@ -466,12 +466,10 @@ function Loading(_ref2) {
466
466
  display: "flex",
467
467
  alignItems: "center",
468
468
  justifyContent: "center",
469
- children: [jsx(VisuallyHidden, {
470
- children: "button loading indicator"
471
- }), jsx(Spinner, {
469
+ children: jsx(Spinner, {
472
470
  size: "xsmall",
473
471
  tone: tone
474
- })]
472
+ })
475
473
  });
476
474
  }
477
475
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/button",
3
- "version": "5.3.2",
3
+ "version": "5.3.3",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,7 @@
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
26
  "@spark-web/theme": "^5.9.0",
27
27
  "@spark-web/utils": "^5.0.0"