braid-design-system 33.11.2 → 33.11.4
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,19 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 33.11.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Button, ButtonIcon, ButtonLink:** Ensure active transition is correctly applied ([#1868](https://github.com/seek-oss/braid-design-system/pull/1868))
|
|
8
|
+
|
|
9
|
+
## 33.11.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- **Button, ButtonLink:** Ensure focus ring supports `bleed` layout ([#1866](https://github.com/seek-oss/braid-design-system/pull/1866))
|
|
14
|
+
|
|
15
|
+
Fixes the focus ring layout when combined with the `bleed` prop to ensure the outline wraps the visual boundary of the button.
|
|
16
|
+
|
|
3
17
|
## 33.11.2
|
|
4
18
|
|
|
5
19
|
### 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: {
|
|
@@ -331,11 +332,11 @@ const useButtonStyles = ({
|
|
|
331
332
|
display: "flex",
|
|
332
333
|
alignItems: "center",
|
|
333
334
|
justifyContent: "center",
|
|
334
|
-
transition: "touchable",
|
|
335
335
|
textAlign: "center",
|
|
336
336
|
userSelect: "none",
|
|
337
337
|
background: stylesForVariant.background && typeof stylesForVariant.background !== "string" ? colorContrast(stylesForVariant.background) : stylesForVariant.background,
|
|
338
338
|
className: [
|
|
339
|
+
lib_components_Button_Button_css_cjs.focusRing,
|
|
339
340
|
variant === "soft" && lightness.lightMode === "dark" ? lib_components_Button_Button_css_cjs.invertedBackgroundsLightMode.soft : null,
|
|
340
341
|
variant === "soft" && lightness.darkMode === "dark" ? lib_components_Button_Button_css_cjs.invertedBackgroundsDarkMode.soft : null,
|
|
341
342
|
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,13 @@ const hoverOverlay = css.style({
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
}, "hoverOverlay");
|
|
40
|
+
const {
|
|
41
|
+
transition: outlineTransition,
|
|
42
|
+
...restOutlineStyles
|
|
43
|
+
} = lib_css_outlineStyle_cjs.outlineStyle(`${root}:focus-visible > &`);
|
|
44
|
+
const focusRing = css.style([{
|
|
45
|
+
transition: [lib_themes_vars_css_cjs.vars.transition.touchable, outlineTransition].join(", ")
|
|
46
|
+
}, restOutlineStyles], "focusRing");
|
|
39
47
|
const minHeightValueForSize = {
|
|
40
48
|
standard: lib_themes_vars_css_cjs.vars.touchableSize,
|
|
41
49
|
small: cssUtils.calc.multiply(lib_themes_vars_css_cjs.vars.touchableSize, 0.8)
|
|
@@ -140,6 +148,7 @@ fileScope.endFileScope();
|
|
|
140
148
|
exports.activeAnimation = activeAnimation;
|
|
141
149
|
exports.activeOverlay = activeOverlay;
|
|
142
150
|
exports.bleedVerticallyToCapHeight = bleedVerticallyToCapHeight;
|
|
151
|
+
exports.focusRing = focusRing;
|
|
143
152
|
exports.forceActive = forceActive;
|
|
144
153
|
exports.hoverOverlay = hoverOverlay;
|
|
145
154
|
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,13 @@ const hoverOverlay = style({
|
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
}, "hoverOverlay");
|
|
39
|
+
const {
|
|
40
|
+
transition: outlineTransition,
|
|
41
|
+
...restOutlineStyles
|
|
42
|
+
} = outlineStyle(`${root}:focus-visible > &`);
|
|
43
|
+
const focusRing = style([{
|
|
44
|
+
transition: [vars.transition.touchable, outlineTransition].join(", ")
|
|
45
|
+
}, restOutlineStyles], "focusRing");
|
|
38
46
|
const minHeightValueForSize = {
|
|
39
47
|
standard: vars.touchableSize,
|
|
40
48
|
small: calc.multiply(vars.touchableSize, 0.8)
|
|
@@ -140,6 +148,7 @@ export {
|
|
|
140
148
|
activeAnimation,
|
|
141
149
|
activeOverlay,
|
|
142
150
|
bleedVerticallyToCapHeight,
|
|
151
|
+
focusRing,
|
|
143
152
|
forceActive,
|
|
144
153
|
hoverOverlay,
|
|
145
154
|
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: {
|
|
@@ -328,11 +329,11 @@ const useButtonStyles = ({
|
|
|
328
329
|
display: "flex",
|
|
329
330
|
alignItems: "center",
|
|
330
331
|
justifyContent: "center",
|
|
331
|
-
transition: "touchable",
|
|
332
332
|
textAlign: "center",
|
|
333
333
|
userSelect: "none",
|
|
334
334
|
background: stylesForVariant.background && typeof stylesForVariant.background !== "string" ? colorContrast(stylesForVariant.background) : stylesForVariant.background,
|
|
335
335
|
className: [
|
|
336
|
+
focusRing,
|
|
336
337
|
variant === "soft" && lightness.lightMode === "dark" ? invertedBackgroundsLightMode.soft : null,
|
|
337
338
|
variant === "soft" && lightness.darkMode === "dark" ? invertedBackgroundsDarkMode.soft : null,
|
|
338
339
|
activeAnimation,
|