@spark-web/button 5.3.1 → 5.3.2
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 +9 -0
- package/dist/declarations/src/button-link.d.ts +1 -1
- package/dist/declarations/src/use-button-styles.d.ts +1 -1
- package/dist/spark-web-button.cjs.dev.js +2 -1
- package/dist/spark-web-button.cjs.prod.js +2 -1
- package/dist/spark-web-button.esm.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @spark-web/button
|
|
2
2
|
|
|
3
|
+
## 5.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#594](https://github.com/brighte-labs/spark-web/pull/594)
|
|
8
|
+
[`ecf32cb`](https://github.com/brighte-labs/spark-web/commit/ecf32cba87b2fd55426ccff1b6dae31f26147757)
|
|
9
|
+
Thanks [@peterp-brighte](https://github.com/peterp-brighte)! - accessibility
|
|
10
|
+
improvements to button focus ring and alert component
|
|
11
|
+
|
|
3
12
|
## 5.3.1
|
|
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" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "
|
|
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;
|
|
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: "
|
|
96
|
+
readonly fontWeight: "medium" | "light" | "bold" | "thin" | "extralight" | "regular" | "semibold" | "extrabold" | "black" | 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. */
|
|
@@ -326,7 +326,8 @@ function useButtonStyles(_ref) {
|
|
|
326
326
|
tone = _ref.tone;
|
|
327
327
|
var theme$1 = theme.useTheme();
|
|
328
328
|
var focusRingStyles = a11y.useFocusRing({
|
|
329
|
-
tone: tone
|
|
329
|
+
tone: tone,
|
|
330
|
+
always: true
|
|
330
331
|
});
|
|
331
332
|
var disabledFocusRingStyles = a11y.useFocusRing({
|
|
332
333
|
tone: 'disabled'
|
|
@@ -326,7 +326,8 @@ function useButtonStyles(_ref) {
|
|
|
326
326
|
tone = _ref.tone;
|
|
327
327
|
var theme$1 = theme.useTheme();
|
|
328
328
|
var focusRingStyles = a11y.useFocusRing({
|
|
329
|
-
tone: tone
|
|
329
|
+
tone: tone,
|
|
330
|
+
always: true
|
|
330
331
|
});
|
|
331
332
|
var disabledFocusRingStyles = a11y.useFocusRing({
|
|
332
333
|
tone: 'disabled'
|