braid-design-system 33.11.2 → 33.11.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,13 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 33.11.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Button, ButtonLink:** Ensure focus ring supports `bleed` layout ([#1866](https://github.com/seek-oss/braid-design-system/pull/1866))
|
|
8
|
+
|
|
9
|
+
Fixes the focus ring layout when combined with the `bleed` prop to ensure the outline wraps the visual boundary of the button.
|
|
10
|
+
|
|
3
11
|
## 33.11.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -321,6 +321,7 @@ const useButtonStyles = ({
|
|
|
321
321
|
width: "full",
|
|
322
322
|
borderRadius: radius,
|
|
323
323
|
cursor: !loading ? "pointer" : void 0,
|
|
324
|
+
outline: "none",
|
|
324
325
|
className: [lib_components_Button_Button_css_cjs.root, size === "small" ? lib_components_private_touchable_virtualTouchable_css_cjs.virtualTouchable : void 0]
|
|
325
326
|
},
|
|
326
327
|
content: {
|
|
@@ -336,6 +337,7 @@ const useButtonStyles = ({
|
|
|
336
337
|
userSelect: "none",
|
|
337
338
|
background: stylesForVariant.background && typeof stylesForVariant.background !== "string" ? colorContrast(stylesForVariant.background) : stylesForVariant.background,
|
|
338
339
|
className: [
|
|
340
|
+
lib_components_Button_Button_css_cjs.focusRing,
|
|
339
341
|
variant === "soft" && lightness.lightMode === "dark" ? lib_components_Button_Button_css_cjs.invertedBackgroundsLightMode.soft : null,
|
|
340
342
|
variant === "soft" && lightness.darkMode === "dark" ? lib_components_Button_Button_css_cjs.invertedBackgroundsDarkMode.soft : null,
|
|
341
343
|
lib_components_Button_Button_css_cjs.activeAnimation,
|
|
@@ -4,6 +4,7 @@ const css = require("@vanilla-extract/css");
|
|
|
4
4
|
const cssUtils = require("@vanilla-extract/css-utils");
|
|
5
5
|
const polished = require("polished");
|
|
6
6
|
const lib_css_colorModeStyle_cjs = require("../../css/colorModeStyle.cjs");
|
|
7
|
+
const lib_css_outlineStyle_cjs = require("../../css/outlineStyle.cjs");
|
|
7
8
|
const lib_css_responsiveStyle_cjs = require("../../css/responsiveStyle.cjs");
|
|
8
9
|
const lib_themes_vars_css_cjs = require("../../themes/vars.css.cjs");
|
|
9
10
|
fileScope.setFileScope("src/lib/components/Button/Button.css.ts", "braid-design-system");
|
|
@@ -36,6 +37,7 @@ const hoverOverlay = css.style({
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
}, "hoverOverlay");
|
|
40
|
+
const focusRing = css.style(lib_css_outlineStyle_cjs.outlineStyle(`${root}:focus-visible > &`), "focusRing");
|
|
39
41
|
const minHeightValueForSize = {
|
|
40
42
|
standard: lib_themes_vars_css_cjs.vars.touchableSize,
|
|
41
43
|
small: cssUtils.calc.multiply(lib_themes_vars_css_cjs.vars.touchableSize, 0.8)
|
|
@@ -140,6 +142,7 @@ fileScope.endFileScope();
|
|
|
140
142
|
exports.activeAnimation = activeAnimation;
|
|
141
143
|
exports.activeOverlay = activeOverlay;
|
|
142
144
|
exports.bleedVerticallyToCapHeight = bleedVerticallyToCapHeight;
|
|
145
|
+
exports.focusRing = focusRing;
|
|
143
146
|
exports.forceActive = forceActive;
|
|
144
147
|
exports.hoverOverlay = hoverOverlay;
|
|
145
148
|
exports.invertedBackgroundsDarkMode = invertedBackgroundsDarkMode;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { style, styleVariants, createVar, keyframes } from "@vanilla-extract/css";
|
|
3
3
|
import { calc } from "@vanilla-extract/css-utils";
|
|
4
4
|
import { rgba } from "polished";
|
|
5
5
|
import { colorModeStyle } from "../../css/colorModeStyle.mjs";
|
|
6
|
+
import { outlineStyle } from "../../css/outlineStyle.mjs";
|
|
6
7
|
import { responsiveStyle } from "../../css/responsiveStyle.mjs";
|
|
7
8
|
import { vars } from "../../themes/vars.css.mjs";
|
|
8
9
|
setFileScope("src/lib/components/Button/Button.css.ts", "braid-design-system");
|
|
@@ -35,6 +36,7 @@ const hoverOverlay = style({
|
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
}, "hoverOverlay");
|
|
39
|
+
const focusRing = style(outlineStyle(`${root}:focus-visible > &`), "focusRing");
|
|
38
40
|
const minHeightValueForSize = {
|
|
39
41
|
standard: vars.touchableSize,
|
|
40
42
|
small: calc.multiply(vars.touchableSize, 0.8)
|
|
@@ -140,6 +142,7 @@ export {
|
|
|
140
142
|
activeAnimation,
|
|
141
143
|
activeOverlay,
|
|
142
144
|
bleedVerticallyToCapHeight,
|
|
145
|
+
focusRing,
|
|
143
146
|
forceActive,
|
|
144
147
|
hoverOverlay,
|
|
145
148
|
invertedBackgroundsDarkMode,
|
|
@@ -11,7 +11,7 @@ import { Text } from "../Text/Text.mjs";
|
|
|
11
11
|
import { AvoidWidowIcon } from "../private/AvoidWidowIcon/AvoidWidowIcon.mjs";
|
|
12
12
|
import { FieldOverlay } from "../private/FieldOverlay/FieldOverlay.mjs";
|
|
13
13
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
14
|
-
import { invertedBackgroundsLightMode, invertedBackgroundsDarkMode, activeAnimation, standard, small, bleedVerticallyToCapHeight, root, hoverOverlay, forceActive, activeOverlay, padToMinHeight, loadingDot } from "./Button.css.mjs";
|
|
14
|
+
import { focusRing, invertedBackgroundsLightMode, invertedBackgroundsDarkMode, activeAnimation, standard, small, bleedVerticallyToCapHeight, root, hoverOverlay, forceActive, activeOverlay, padToMinHeight, loadingDot } from "./Button.css.mjs";
|
|
15
15
|
import { virtualTouchable } from "../private/touchable/virtualTouchable.css.mjs";
|
|
16
16
|
const buttonVariants = [
|
|
17
17
|
"solid",
|
|
@@ -318,6 +318,7 @@ const useButtonStyles = ({
|
|
|
318
318
|
width: "full",
|
|
319
319
|
borderRadius: radius,
|
|
320
320
|
cursor: !loading ? "pointer" : void 0,
|
|
321
|
+
outline: "none",
|
|
321
322
|
className: [root, size === "small" ? virtualTouchable : void 0]
|
|
322
323
|
},
|
|
323
324
|
content: {
|
|
@@ -333,6 +334,7 @@ const useButtonStyles = ({
|
|
|
333
334
|
userSelect: "none",
|
|
334
335
|
background: stylesForVariant.background && typeof stylesForVariant.background !== "string" ? colorContrast(stylesForVariant.background) : stylesForVariant.background,
|
|
335
336
|
className: [
|
|
337
|
+
focusRing,
|
|
336
338
|
variant === "soft" && lightness.lightMode === "dark" ? invertedBackgroundsLightMode.soft : null,
|
|
337
339
|
variant === "soft" && lightness.darkMode === "dark" ? invertedBackgroundsDarkMode.soft : null,
|
|
338
340
|
activeAnimation,
|