braid-design-system 33.11.1 → 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,22 @@
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
+
11
+ ## 33.11.2
12
+
13
+ ### Patch Changes
14
+
15
+ - **ButtonIcon:** Better match `Tooltip` text size with `size` prop ([#1864](https://github.com/seek-oss/braid-design-system/pull/1864))
16
+
17
+ When using a `small` `ButtonIcon`, the `Tooltip` text size is now set to `small`.
18
+ For other sizes, the text remains at the default `standard` size.
19
+
3
20
  ## 33.11.1
4
21
 
5
22
  ### 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 { styleVariants, style, createVar, keyframes } from "@vanilla-extract/css";
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,
@@ -105,18 +105,19 @@ const ButtonIconContent = react.forwardRef(
105
105
  }
106
106
  );
107
107
  const ButtonIcon = react.forwardRef(
108
- ({ id, label, tooltipPlacement, ...restProps }, forwardedRef) => {
108
+ ({ id, label, tooltipPlacement, size, ...restProps }, forwardedRef) => {
109
109
  const resolvedId = lib_hooks_useFallbackId_cjs.useFallbackId(id);
110
110
  return /* @__PURE__ */ jsxRuntime.jsx(
111
111
  lib_components_TooltipRenderer_TooltipRenderer_cjs.TooltipRenderer,
112
112
  {
113
- tooltip: /* @__PURE__ */ jsxRuntime.jsx(lib_components_Text_Text_cjs.Text, { children: label }),
113
+ tooltip: /* @__PURE__ */ jsxRuntime.jsx(lib_components_Text_Text_cjs.Text, { size: size === "small" ? "small" : "standard", children: label }),
114
114
  placement: tooltipPlacement,
115
115
  children: ({ triggerProps: { ref: triggerRef, tabIndex } }) => /* @__PURE__ */ jsxRuntime.jsx(
116
116
  ButtonIconContent,
117
117
  {
118
118
  id: resolvedId,
119
119
  label,
120
+ size,
120
121
  ref: (node) => {
121
122
  if (typeof forwardedRef === "function") {
122
123
  forwardedRef(node);
@@ -102,18 +102,19 @@ const ButtonIconContent = forwardRef(
102
102
  }
103
103
  );
104
104
  const ButtonIcon = forwardRef(
105
- ({ id, label, tooltipPlacement, ...restProps }, forwardedRef) => {
105
+ ({ id, label, tooltipPlacement, size, ...restProps }, forwardedRef) => {
106
106
  const resolvedId = useFallbackId(id);
107
107
  return /* @__PURE__ */ jsx(
108
108
  TooltipRenderer,
109
109
  {
110
- tooltip: /* @__PURE__ */ jsx(Text, { children: label }),
110
+ tooltip: /* @__PURE__ */ jsx(Text, { size: size === "small" ? "small" : "standard", children: label }),
111
111
  placement: tooltipPlacement,
112
112
  children: ({ triggerProps: { ref: triggerRef, tabIndex } }) => /* @__PURE__ */ jsx(
113
113
  ButtonIconContent,
114
114
  {
115
115
  id: resolvedId,
116
116
  label,
117
+ size,
117
118
  ref: (node) => {
118
119
  if (typeof forwardedRef === "function") {
119
120
  forwardedRef(node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-design-system",
3
- "version": "33.11.1",
3
+ "version": "33.11.3",
4
4
  "description": "Themeable design system for the SEEK Group",
5
5
  "homepage": "https://seek-oss.github.io/braid-design-system/",
6
6
  "bugs": {
@@ -211,7 +211,7 @@
211
211
  "fast-glob": "^3.3.2",
212
212
  "fs-extra": "^10.1.0",
213
213
  "html-validate": "^9.7.1",
214
- "playroom": "0.44.2",
214
+ "playroom": "0.44.3",
215
215
  "prettier": "^3.4.1",
216
216
  "react": "^19.1.0",
217
217
  "react-dom": "^19.1.0",