braid-design-system 33.11.4 → 33.11.6-test-20251007010150

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/lib/components/Accordion/AccordionItem.cjs +3 -3
  3. package/dist/lib/components/Accordion/AccordionItem.mjs +3 -3
  4. package/dist/lib/components/Autosuggest/Autosuggest.cjs +1 -1
  5. package/dist/lib/components/Autosuggest/Autosuggest.mjs +1 -1
  6. package/dist/lib/components/Autosuggest/Autosuggest.playroom.cjs +1 -1
  7. package/dist/lib/components/Autosuggest/Autosuggest.playroom.mjs +1 -1
  8. package/dist/lib/components/BraidTestProvider/BraidTestProvider.cjs +11 -19
  9. package/dist/lib/components/BraidTestProvider/BraidTestProvider.mjs +11 -19
  10. package/dist/lib/components/Button/Button.cjs +2 -3
  11. package/dist/lib/components/Button/Button.css.cjs +1 -1
  12. package/dist/lib/components/Button/Button.css.mjs +1 -1
  13. package/dist/lib/components/Button/Button.mjs +2 -3
  14. package/dist/lib/components/Disclosure/Disclosure.cjs +1 -1
  15. package/dist/lib/components/Disclosure/Disclosure.mjs +1 -1
  16. package/dist/lib/components/Link/Link.playroom.cjs +1 -1
  17. package/dist/lib/components/Link/Link.playroom.mjs +1 -1
  18. package/dist/lib/components/MenuItem/useMenuItem.cjs +2 -4
  19. package/dist/lib/components/MenuItem/useMenuItem.mjs +2 -4
  20. package/dist/lib/components/TextLink/TextLink.cjs +1 -1
  21. package/dist/lib/components/TextLink/TextLink.mjs +1 -1
  22. package/dist/lib/components/TextLinkButton/TextLinkButton.cjs +1 -2
  23. package/dist/lib/components/TextLinkButton/TextLinkButton.mjs +1 -2
  24. package/dist/lib/components/private/Popover/Popover.cjs +6 -10
  25. package/dist/lib/components/private/Popover/Popover.mjs +6 -10
  26. package/dist/lib/hooks/useIcon/index.cjs +2 -2
  27. package/dist/lib/hooks/useIcon/index.mjs +2 -2
  28. package/dist/lib/hooks/useIsomorphicLayoutEffect.cjs +1 -2
  29. package/dist/lib/hooks/useIsomorphicLayoutEffect.mjs +1 -2
  30. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # braid-design-system
2
2
 
3
+ ## 33.11.6-test-20251007010150
4
+
5
+ ### Patch Changes
6
+
7
+ - test (354a279dec86922b4f73a611552c2cbe3a128824)
8
+
9
+ ## 33.11.5
10
+
11
+ ### Patch Changes
12
+
13
+ - **Button, ButtonIcon, ButtonLink:** Remove use of deprecated `outline` atoms value, in favour of CSS property ([#1871](https://github.com/seek-oss/braid-design-system/pull/1871))
14
+
3
15
  ## 33.11.4
4
16
 
5
17
  ### Patch Changes
@@ -63,9 +63,9 @@ const AccordionItem = ({
63
63
  !icon || icon.props.size === void 0 && icon.props.tone === void 0,
64
64
  "Icons cannot set the 'size' or 'tone' prop when passed to an AccordionItem component"
65
65
  );
66
- const size = (accordionContext == null ? void 0 : accordionContext.size) ?? sizeProp ?? lib_components_Accordion_Accordion_cjs.defaultSize;
67
- const tone = (accordionContext == null ? void 0 : accordionContext.tone) ?? toneProp ?? "neutral";
68
- const weight = (accordionContext == null ? void 0 : accordionContext.weight) ?? weightProp ?? "medium";
66
+ const size = accordionContext?.size ?? sizeProp ?? lib_components_Accordion_Accordion_cjs.defaultSize;
67
+ const tone = accordionContext?.tone ?? toneProp ?? "neutral";
68
+ const weight = accordionContext?.weight ?? weightProp ?? "medium";
69
69
  const itemSpace = itemSpaceForSize[size] ?? "none";
70
70
  assert__default.default(
71
71
  typeof label === "undefined" || typeof label === "string",
@@ -60,9 +60,9 @@ const AccordionItem = ({
60
60
  !icon || icon.props.size === void 0 && icon.props.tone === void 0,
61
61
  "Icons cannot set the 'size' or 'tone' prop when passed to an AccordionItem component"
62
62
  );
63
- const size = (accordionContext == null ? void 0 : accordionContext.size) ?? sizeProp ?? defaultSize;
64
- const tone = (accordionContext == null ? void 0 : accordionContext.tone) ?? toneProp ?? "neutral";
65
- const weight = (accordionContext == null ? void 0 : accordionContext.weight) ?? weightProp ?? "medium";
63
+ const size = accordionContext?.size ?? sizeProp ?? defaultSize;
64
+ const tone = accordionContext?.tone ?? toneProp ?? "neutral";
65
+ const weight = accordionContext?.weight ?? weightProp ?? "medium";
66
66
  const itemSpace = itemSpaceForSize[size] ?? "none";
67
67
  assert(
68
68
  typeof label === "undefined" || typeof label === "string",
@@ -351,7 +351,7 @@ const Autosuggest = react.forwardRef(function({
351
351
  });
352
352
  const isOpen = showSuggestionsIfAvailable && hasItems;
353
353
  const highlightedItem = typeof highlightedIndex === "number" ? document.getElementById(lib_components_Autosuggest_createAccessibilityProps_cjs.getItemId(resolvedId, highlightedIndex)) : null;
354
- highlightedItem == null ? void 0 : highlightedItem.scrollIntoView({ block: "nearest" });
354
+ highlightedItem?.scrollIntoView({ block: "nearest" });
355
355
  react.useEffect(() => {
356
356
  dispatch({
357
357
  type: HAS_SUGGESTIONS_CHANGED
@@ -346,7 +346,7 @@ const Autosuggest = forwardRef(function({
346
346
  });
347
347
  const isOpen = showSuggestionsIfAvailable && hasItems;
348
348
  const highlightedItem = typeof highlightedIndex === "number" ? document.getElementById(getItemId(resolvedId, highlightedIndex)) : null;
349
- highlightedItem == null ? void 0 : highlightedItem.scrollIntoView({ block: "nearest" });
349
+ highlightedItem?.scrollIntoView({ block: "nearest" });
350
350
  useEffect(() => {
351
351
  dispatch({
352
352
  type: HAS_SUGGESTIONS_CHANGED
@@ -25,7 +25,7 @@ function Autosuggest({
25
25
  onChange: handleChange,
26
26
  onClear: () => {
27
27
  handleChange(blankValue);
28
- onClear == null ? void 0 : onClear();
28
+ onClear?.();
29
29
  },
30
30
  tabIndex: lib_components_private_validateTabIndex_cjs.validTabIndexes.includes(tabIndex) ? tabIndex : void 0,
31
31
  ...restProps
@@ -24,7 +24,7 @@ function Autosuggest({
24
24
  onChange: handleChange,
25
25
  onClear: () => {
26
26
  handleChange(blankValue);
27
- onClear == null ? void 0 : onClear();
27
+ onClear?.();
28
28
  },
29
29
  tabIndex: validTabIndexes.includes(tabIndex) ? tabIndex : void 0,
30
30
  ...restProps
@@ -1,8 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- var _a;
6
2
  const jsxRuntime = require("react/jsx-runtime");
7
3
  const lib_themes_index_cjs = require("../../themes/index.cjs");
8
4
  const lib_components_BraidProvider_BraidProvider_cjs = require("../BraidProvider/BraidProvider.cjs");
@@ -10,27 +6,23 @@ const lib_components_BraidProvider_BreakpointContext_cjs = require("../BraidProv
10
6
  const lib_components_BraidTestProvider_BraidTestProviderContext_cjs = require("./BraidTestProviderContext.cjs");
11
7
  const noop = () => {
12
8
  };
13
- if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("jsdom"))) {
9
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("jsdom")) {
14
10
  window.HTMLElement.prototype.scrollIntoView = window.HTMLElement.prototype.scrollIntoView || (() => {
15
11
  });
16
12
  class MockResizeObserver {
17
- constructor() {
18
- __publicField(this, "observe", noop);
19
- __publicField(this, "unobserve", noop);
20
- __publicField(this, "disconnect", noop);
21
- }
13
+ observe = noop;
14
+ unobserve = noop;
15
+ disconnect = noop;
22
16
  }
23
17
  window.ResizeObserver = MockResizeObserver;
24
18
  class MockIntersectionObserver {
25
- constructor() {
26
- __publicField(this, "root", null);
27
- __publicField(this, "rootMargin", "");
28
- __publicField(this, "thresholds", []);
29
- __publicField(this, "observe", noop);
30
- __publicField(this, "unobserve", noop);
31
- __publicField(this, "disconnect", noop);
32
- __publicField(this, "takeRecords", () => []);
33
- }
19
+ root = null;
20
+ rootMargin = "";
21
+ thresholds = [];
22
+ observe = noop;
23
+ unobserve = noop;
24
+ disconnect = noop;
25
+ takeRecords = () => [];
34
26
  }
35
27
  window.IntersectionObserver = MockIntersectionObserver;
36
28
  }
@@ -1,7 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- var _a;
5
1
  import { jsx } from "react/jsx-runtime";
6
2
  import { themes } from "../../themes/index.mjs";
7
3
  import { BraidProvider } from "../BraidProvider/BraidProvider.mjs";
@@ -9,27 +5,23 @@ import { breakpointContext } from "../BraidProvider/BreakpointContext.mjs";
9
5
  import { BraidTestProviderContext } from "./BraidTestProviderContext.mjs";
10
6
  const noop = () => {
11
7
  };
12
- if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("jsdom"))) {
8
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("jsdom")) {
13
9
  window.HTMLElement.prototype.scrollIntoView = window.HTMLElement.prototype.scrollIntoView || (() => {
14
10
  });
15
11
  class MockResizeObserver {
16
- constructor() {
17
- __publicField(this, "observe", noop);
18
- __publicField(this, "unobserve", noop);
19
- __publicField(this, "disconnect", noop);
20
- }
12
+ observe = noop;
13
+ unobserve = noop;
14
+ disconnect = noop;
21
15
  }
22
16
  window.ResizeObserver = MockResizeObserver;
23
17
  class MockIntersectionObserver {
24
- constructor() {
25
- __publicField(this, "root", null);
26
- __publicField(this, "rootMargin", "");
27
- __publicField(this, "thresholds", []);
28
- __publicField(this, "observe", noop);
29
- __publicField(this, "unobserve", noop);
30
- __publicField(this, "disconnect", noop);
31
- __publicField(this, "takeRecords", () => []);
32
- }
18
+ root = null;
19
+ rootMargin = "";
20
+ thresholds = [];
21
+ observe = noop;
22
+ unobserve = noop;
23
+ disconnect = noop;
24
+ takeRecords = () => [];
33
25
  }
34
26
  window.IntersectionObserver = MockIntersectionObserver;
35
27
  }
@@ -239,7 +239,7 @@ const ButtonText = ({
239
239
  const lightness = lib_components_Box_BackgroundContext_cjs.useBackgroundLightness();
240
240
  const actionsContext = react.useContext(lib_components_Actions_ActionsContext_cjs.ActionsContext);
241
241
  const isLegacyTheme = lib_components_BraidProvider_BraidThemeContext_cjs.useBraidTheme().legacy;
242
- const size = sizeProp ?? (actionsContext == null ? void 0 : actionsContext.size) ?? "standard";
242
+ const size = sizeProp ?? actionsContext?.size ?? "standard";
243
243
  const stylesForVariant = variants[variant][tone];
244
244
  const shouldReducePaddingX = size === "small" || variant === "transparent";
245
245
  const labelPaddingXForTheme = isLegacyTheme ? "medium" : "gutter";
@@ -311,7 +311,7 @@ const useButtonStyles = ({
311
311
  legacy: lib_components_BraidProvider_BraidThemeContext_cjs.useBraidTheme().legacy
312
312
  });
313
313
  const actionsContext = react.useContext(lib_components_Actions_ActionsContext_cjs.ActionsContext);
314
- const size = sizeProp ?? (actionsContext == null ? void 0 : actionsContext.size) ?? "standard";
314
+ const size = sizeProp ?? actionsContext?.size ?? "standard";
315
315
  const stylesForVariant = variants[variant][tone];
316
316
  const colorContrast = lib_components_Box_BackgroundContext_cjs.useColorContrast();
317
317
  const lightness = lib_components_Box_BackgroundContext_cjs.useBackgroundLightness();
@@ -321,7 +321,6 @@ const useButtonStyles = ({
321
321
  width: "full",
322
322
  borderRadius: radius,
323
323
  cursor: !loading ? "pointer" : void 0,
324
- outline: "none",
325
324
  className: [lib_components_Button_Button_css_cjs.root, size === "small" ? lib_components_private_touchable_virtualTouchable_css_cjs.virtualTouchable : void 0]
326
325
  },
327
326
  content: {
@@ -13,7 +13,7 @@ const root = css.style({
13
13
  // Necessary to overwrite Safari's default value for 'align-items' in 'button' elements (which is 'flex-start')
14
14
  alignItems: "stretch",
15
15
  // Necessary to overwrite browser default for 'a' elements (which is '1px'), keeping Button & ButtonLink uniform.
16
- outlineOffset: 0
16
+ outline: "none"
17
17
  }, "root");
18
18
  const forceActive = css.style({}, "forceActive");
19
19
  const activeAnimation = css.style({
@@ -12,7 +12,7 @@ const root = style({
12
12
  // Necessary to overwrite Safari's default value for 'align-items' in 'button' elements (which is 'flex-start')
13
13
  alignItems: "stretch",
14
14
  // Necessary to overwrite browser default for 'a' elements (which is '1px'), keeping Button & ButtonLink uniform.
15
- outlineOffset: 0
15
+ outline: "none"
16
16
  }, "root");
17
17
  const forceActive = style({}, "forceActive");
18
18
  const activeAnimation = style({
@@ -236,7 +236,7 @@ const ButtonText = ({
236
236
  const lightness = useBackgroundLightness();
237
237
  const actionsContext = useContext(ActionsContext);
238
238
  const isLegacyTheme = useBraidTheme().legacy;
239
- const size = sizeProp ?? (actionsContext == null ? void 0 : actionsContext.size) ?? "standard";
239
+ const size = sizeProp ?? actionsContext?.size ?? "standard";
240
240
  const stylesForVariant = variants[variant][tone];
241
241
  const shouldReducePaddingX = size === "small" || variant === "transparent";
242
242
  const labelPaddingXForTheme = isLegacyTheme ? "medium" : "gutter";
@@ -308,7 +308,7 @@ const useButtonStyles = ({
308
308
  legacy: useBraidTheme().legacy
309
309
  });
310
310
  const actionsContext = useContext(ActionsContext);
311
- const size = sizeProp ?? (actionsContext == null ? void 0 : actionsContext.size) ?? "standard";
311
+ const size = sizeProp ?? actionsContext?.size ?? "standard";
312
312
  const stylesForVariant = variants[variant][tone];
313
313
  const colorContrast = useColorContrast();
314
314
  const lightness = useBackgroundLightness();
@@ -318,7 +318,6 @@ const useButtonStyles = ({
318
318
  width: "full",
319
319
  borderRadius: radius,
320
320
  cursor: !loading ? "pointer" : void 0,
321
- outline: "none",
322
321
  className: [root, size === "small" ? virtualTouchable : void 0]
323
322
  },
324
323
  content: {
@@ -55,7 +55,7 @@ const Disclosure = ({
55
55
  onToggle: restProps.onToggle
56
56
  }
57
57
  });
58
- const size = sizeProp ?? (textContext == null ? void 0 : textContext.size) ?? "standard";
58
+ const size = sizeProp ?? textContext?.size ?? "standard";
59
59
  const defaultSpace = isInline ? (
60
60
  /*
61
61
  * If inline, only use `xxsmall` space between the trigger and the content
@@ -52,7 +52,7 @@ const Disclosure = ({
52
52
  onToggle: restProps.onToggle
53
53
  }
54
54
  });
55
- const size = sizeProp ?? (textContext == null ? void 0 : textContext.size) ?? "standard";
55
+ const size = sizeProp ?? textContext?.size ?? "standard";
56
56
  const defaultSpace = isInline ? (
57
57
  /*
58
58
  * If inline, only use `xxsmall` space between the trigger and the content
@@ -8,7 +8,7 @@ const Link = react.forwardRef(
8
8
  {
9
9
  ref,
10
10
  href: href ?? "",
11
- onClick: onClick ? onClick : (event) => event == null ? void 0 : event.preventDefault(),
11
+ onClick: onClick ? onClick : (event) => event?.preventDefault(),
12
12
  ...restProps
13
13
  }
14
14
  )
@@ -7,7 +7,7 @@ const Link = forwardRef(
7
7
  {
8
8
  ref,
9
9
  href: href ?? "",
10
- onClick: onClick ? onClick : (event) => event == null ? void 0 : event.preventDefault(),
10
+ onClick: onClick ? onClick : (event) => event?.preventDefault(),
11
11
  ...restProps
12
12
  }
13
13
  )
@@ -48,13 +48,11 @@ function useMenuItem({
48
48
  const { isHighlighted, index, dispatch, focusTrigger } = menuRendererItemContext;
49
49
  const menuItemRef = react.useRef(null);
50
50
  react.useEffect(() => {
51
- var _a;
52
51
  if (isHighlighted) {
53
- (_a = menuItemRef.current) == null ? void 0 : _a.focus();
52
+ menuItemRef.current?.focus();
54
53
  }
55
54
  }, [isHighlighted]);
56
55
  const onKeyDown = (event) => {
57
- var _a;
58
56
  const targetKey = lib_components_private_normalizeKey_cjs.normalizeKey(event);
59
57
  const closeActionKeys = ["Enter", " "];
60
58
  const isArrowPress = targetKey.indexOf("Arrow") === 0;
@@ -72,7 +70,7 @@ function useMenuItem({
72
70
  dispatch(action[targetKey]);
73
71
  }
74
72
  if (targetKey === "Enter" || targetKey === " ") {
75
- (_a = menuItemRef.current) == null ? void 0 : _a.click();
73
+ menuItemRef.current?.click();
76
74
  }
77
75
  if (!formElement && closeActionKeys.indexOf(targetKey) > -1) {
78
76
  focusTrigger();
@@ -45,13 +45,11 @@ function useMenuItem({
45
45
  const { isHighlighted, index, dispatch, focusTrigger } = menuRendererItemContext;
46
46
  const menuItemRef = useRef(null);
47
47
  useEffect(() => {
48
- var _a;
49
48
  if (isHighlighted) {
50
- (_a = menuItemRef.current) == null ? void 0 : _a.focus();
49
+ menuItemRef.current?.focus();
51
50
  }
52
51
  }, [isHighlighted]);
53
52
  const onKeyDown = (event) => {
54
- var _a;
55
53
  const targetKey = normalizeKey(event);
56
54
  const closeActionKeys = ["Enter", " "];
57
55
  const isArrowPress = targetKey.indexOf("Arrow") === 0;
@@ -69,7 +67,7 @@ function useMenuItem({
69
67
  dispatch(action[targetKey]);
70
68
  }
71
69
  if (targetKey === "Enter" || targetKey === " ") {
72
- (_a = menuItemRef.current) == null ? void 0 : _a.click();
70
+ menuItemRef.current?.click();
73
71
  }
74
72
  if (!formElement && closeActionKeys.indexOf(targetKey) > -1) {
75
73
  focusTrigger();
@@ -25,7 +25,7 @@ const useLinkStyles = ({
25
25
  const backgroundContext = lib_components_Box_BackgroundContext_cjs.useBackground();
26
26
  const textContext = react.useContext(lib_components_Text_TextContext_cjs.TextContext);
27
27
  const headingContext = react.useContext(lib_components_Heading_HeadingContext_cjs.HeadingContext);
28
- const isWeakDueToTextTone = !headingContext && (textContext == null ? void 0 : textContext.tone) !== "neutral";
28
+ const isWeakDueToTextTone = !headingContext && textContext?.tone !== "neutral";
29
29
  const linkStyles = weight === "weak" || isWeakDueToTextTone ? lib_components_TextLink_TextLink_css_cjs.weakLink : [
30
30
  isPlainBackground(backgroundContext.lightMode, "light") || weight === "regular" ? lib_components_TextLink_TextLink_css_cjs.regularLinkLightMode[backgroundLightness.lightMode] : lib_components_TextLink_TextLink_css_cjs.weakLink,
31
31
  isPlainBackground(backgroundContext.darkMode, "dark") || weight === "regular" ? lib_components_TextLink_TextLink_css_cjs.regularLinkDarkMode[backgroundLightness.darkMode] : lib_components_TextLink_TextLink_css_cjs.weakLink
@@ -22,7 +22,7 @@ const useLinkStyles = ({
22
22
  const backgroundContext = useBackground();
23
23
  const textContext = useContext(TextContext);
24
24
  const headingContext = useContext(HeadingContext);
25
- const isWeakDueToTextTone = !headingContext && (textContext == null ? void 0 : textContext.tone) !== "neutral";
25
+ const isWeakDueToTextTone = !headingContext && textContext?.tone !== "neutral";
26
26
  const linkStyles = weight === "weak" || isWeakDueToTextTone ? weakLink : [
27
27
  isPlainBackground(backgroundContext.lightMode, "light") || weight === "regular" ? regularLinkLightMode[backgroundLightness.lightMode] : weakLink,
28
28
  isPlainBackground(backgroundContext.darkMode, "dark") || weight === "regular" ? regularLinkDarkMode[backgroundLightness.darkMode] : weakLink
@@ -30,10 +30,9 @@ const TextLinkButton = ({
30
30
  });
31
31
  const handleKeyboard = react.useCallback(
32
32
  (event) => {
33
- var _a;
34
33
  if (event.key === "Enter" || event.key === " ") {
35
34
  event.preventDefault();
36
- (_a = buttonRef.current) == null ? void 0 : _a.click();
35
+ buttonRef.current?.click();
37
36
  }
38
37
  },
39
38
  [buttonRef]
@@ -29,10 +29,9 @@ const TextLinkButton = ({
29
29
  });
30
30
  const handleKeyboard = useCallback(
31
31
  (event) => {
32
- var _a;
33
32
  if (event.key === "Enter" || event.key === " ") {
34
33
  event.preventDefault();
35
- (_a = buttonRef.current) == null ? void 0 : _a.click();
34
+ buttonRef.current?.click();
36
35
  }
37
36
  },
38
37
  [buttonRef]
@@ -59,9 +59,8 @@ const PopoverContent = react.forwardRef(
59
59
  const alignmentAnchor = align === "center" ? "left" : align;
60
60
  react.useEffect(() => {
61
61
  const handleKeydown = (event) => {
62
- var _a;
63
62
  if (event.key === "Escape" || event.key === "Tab") {
64
- (_a = triggerRef.current) == null ? void 0 : _a.focus();
63
+ triggerRef.current?.focus();
65
64
  if (process.env.NODE_ENV !== "production") {
66
65
  if (!triggerRef.current) {
67
66
  console.error(
@@ -87,11 +86,10 @@ const PopoverContent = react.forwardRef(
87
86
  }, [triggerRef]);
88
87
  react.useEffect(() => {
89
88
  setTimeout(() => {
90
- var _a;
91
89
  if (!enterFocusRef) {
92
90
  return;
93
91
  }
94
- (_a = enterFocusRef.current) == null ? void 0 : _a.focus();
92
+ enterFocusRef.current?.focus();
95
93
  if (process.env.NODE_ENV !== "production") {
96
94
  if (!enterFocusRef.current) {
97
95
  console.error(
@@ -117,8 +115,7 @@ const PopoverContent = react.forwardRef(
117
115
  };
118
116
  }, [triggerRef]);
119
117
  const handlePlacement = () => {
120
- var _a;
121
- const popoverBoundingRect = (_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.getBoundingClientRect();
118
+ const popoverBoundingRect = ref?.current?.getBoundingClientRect();
122
119
  if (!popoverBoundingRect) {
123
120
  return;
124
121
  }
@@ -131,11 +128,10 @@ const PopoverContent = react.forwardRef(
131
128
  }
132
129
  };
133
130
  const handleHorizontalShift = () => {
134
- var _a;
135
131
  if (!triggerPosition) {
136
132
  return;
137
133
  }
138
- const popoverBoundingRect = (_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.getBoundingClientRect();
134
+ const popoverBoundingRect = ref?.current?.getBoundingClientRect();
139
135
  if (!popoverBoundingRect) {
140
136
  return;
141
137
  }
@@ -178,8 +174,8 @@ const PopoverContent = react.forwardRef(
178
174
  // Vertical positioning
179
175
  [lib_components_private_Popover_Popover_css_cjs.triggerVars[actualPlacement]]: `${triggerPosition[actualPlacement]}`,
180
176
  // Horizontal positioning
181
- [lib_components_private_Popover_Popover_css_cjs.triggerVars.left]: width === "full" || alignmentAnchor === "left" ? `${triggerPosition == null ? void 0 : triggerPosition.left}` : void 0,
182
- [lib_components_private_Popover_Popover_css_cjs.triggerVars.right]: width === "full" || alignmentAnchor === "right" ? `${triggerPosition == null ? void 0 : triggerPosition.right}` : void 0,
177
+ [lib_components_private_Popover_Popover_css_cjs.triggerVars.left]: width === "full" || alignmentAnchor === "left" ? `${triggerPosition?.left}` : void 0,
178
+ [lib_components_private_Popover_Popover_css_cjs.triggerVars.right]: width === "full" || alignmentAnchor === "right" ? `${triggerPosition?.right}` : void 0,
183
179
  // Horizontal scroll offset
184
180
  [lib_components_private_Popover_Popover_css_cjs.horizontalOffset]: width !== "full" ? `${horizontalOffset}` : "0"
185
181
  };
@@ -56,9 +56,8 @@ const PopoverContent = forwardRef(
56
56
  const alignmentAnchor = align === "center" ? "left" : align;
57
57
  useEffect(() => {
58
58
  const handleKeydown = (event) => {
59
- var _a;
60
59
  if (event.key === "Escape" || event.key === "Tab") {
61
- (_a = triggerRef.current) == null ? void 0 : _a.focus();
60
+ triggerRef.current?.focus();
62
61
  if (process.env.NODE_ENV !== "production") {
63
62
  if (!triggerRef.current) {
64
63
  console.error(
@@ -84,11 +83,10 @@ const PopoverContent = forwardRef(
84
83
  }, [triggerRef]);
85
84
  useEffect(() => {
86
85
  setTimeout(() => {
87
- var _a;
88
86
  if (!enterFocusRef) {
89
87
  return;
90
88
  }
91
- (_a = enterFocusRef.current) == null ? void 0 : _a.focus();
89
+ enterFocusRef.current?.focus();
92
90
  if (process.env.NODE_ENV !== "production") {
93
91
  if (!enterFocusRef.current) {
94
92
  console.error(
@@ -114,8 +112,7 @@ const PopoverContent = forwardRef(
114
112
  };
115
113
  }, [triggerRef]);
116
114
  const handlePlacement = () => {
117
- var _a;
118
- const popoverBoundingRect = (_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.getBoundingClientRect();
115
+ const popoverBoundingRect = ref?.current?.getBoundingClientRect();
119
116
  if (!popoverBoundingRect) {
120
117
  return;
121
118
  }
@@ -128,11 +125,10 @@ const PopoverContent = forwardRef(
128
125
  }
129
126
  };
130
127
  const handleHorizontalShift = () => {
131
- var _a;
132
128
  if (!triggerPosition) {
133
129
  return;
134
130
  }
135
- const popoverBoundingRect = (_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.getBoundingClientRect();
131
+ const popoverBoundingRect = ref?.current?.getBoundingClientRect();
136
132
  if (!popoverBoundingRect) {
137
133
  return;
138
134
  }
@@ -175,8 +171,8 @@ const PopoverContent = forwardRef(
175
171
  // Vertical positioning
176
172
  [triggerVars[actualPlacement]]: `${triggerPosition[actualPlacement]}`,
177
173
  // Horizontal positioning
178
- [triggerVars.left]: width === "full" || alignmentAnchor === "left" ? `${triggerPosition == null ? void 0 : triggerPosition.left}` : void 0,
179
- [triggerVars.right]: width === "full" || alignmentAnchor === "right" ? `${triggerPosition == null ? void 0 : triggerPosition.right}` : void 0,
174
+ [triggerVars.left]: width === "full" || alignmentAnchor === "left" ? `${triggerPosition?.left}` : void 0,
175
+ [triggerVars.right]: width === "full" || alignmentAnchor === "right" ? `${triggerPosition?.right}` : void 0,
180
176
  // Horizontal scroll offset
181
177
  [horizontalOffset]: width !== "full" ? `${horizontalOffset$1}` : "0"
182
178
  };
@@ -27,8 +27,8 @@ const defaultVerticalCorrection = {
27
27
  const useIcon = ({ size, tone, alignY, data, title, titleId, ...restProps }, { verticalCorrection = defaultVerticalCorrection } = {}) => {
28
28
  const textContext = react.useContext(lib_components_Text_TextContext_cjs.TextContext);
29
29
  const headingContext = react.useContext(lib_components_Heading_HeadingContext_cjs.HeadingContext);
30
- const resolvedTone = lib_css_typography_css_cjs.tone[tone || (textContext == null ? void 0 : textContext.tone) || "neutral"];
31
- const toneClass = tone || !headingContext && !(textContext == null ? void 0 : textContext.tone) ? resolvedTone : void 0;
30
+ const resolvedTone = lib_css_typography_css_cjs.tone[tone || textContext?.tone || "neutral"];
31
+ const toneClass = tone || !headingContext && !textContext?.tone ? resolvedTone : void 0;
32
32
  const isInline = Boolean(textContext || headingContext);
33
33
  const a11yProps = title ? { title, titleId, role: "img" } : { "aria-hidden": true };
34
34
  assert__default.default(
@@ -23,8 +23,8 @@ const defaultVerticalCorrection = {
23
23
  const useIcon = ({ size: size2, tone: tone$1, alignY, data, title, titleId, ...restProps }, { verticalCorrection = defaultVerticalCorrection } = {}) => {
24
24
  const textContext = useContext(TextContext);
25
25
  const headingContext = useContext(HeadingContext);
26
- const resolvedTone = tone[tone$1 || (textContext == null ? void 0 : textContext.tone) || "neutral"];
27
- const toneClass = tone$1 || !headingContext && !(textContext == null ? void 0 : textContext.tone) ? resolvedTone : void 0;
26
+ const resolvedTone = tone[tone$1 || textContext?.tone || "neutral"];
27
+ const toneClass = tone$1 || !headingContext && !textContext?.tone ? resolvedTone : void 0;
28
28
  const isInline = Boolean(textContext || headingContext);
29
29
  const a11yProps = title ? { title, titleId, role: "img" } : { "aria-hidden": true };
30
30
  assert(
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
- var _a;
3
2
  const react = require("react");
4
- const isJSDom = typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("jsdom"));
3
+ const isJSDom = typeof navigator !== "undefined" && navigator?.userAgent?.includes("jsdom");
5
4
  const useIsomorphicLayoutEffect = typeof document !== "undefined" && !isJSDom ? react.useLayoutEffect : react.useEffect;
6
5
  exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
@@ -1,6 +1,5 @@
1
- var _a;
2
1
  import { useLayoutEffect, useEffect } from "react";
3
- const isJSDom = typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("jsdom"));
2
+ const isJSDom = typeof navigator !== "undefined" && navigator?.userAgent?.includes("jsdom");
4
3
  const useIsomorphicLayoutEffect = typeof document !== "undefined" && !isJSDom ? useLayoutEffect : useEffect;
5
4
  export {
6
5
  useIsomorphicLayoutEffect
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-design-system",
3
- "version": "33.11.4",
3
+ "version": "33.11.6-test-20251007010150",
4
4
  "description": "Themeable design system for the SEEK Group",
5
5
  "homepage": "https://seek-oss.github.io/braid-design-system/",
6
6
  "bugs": {
@@ -217,11 +217,11 @@
217
217
  "react-dom": "^19.1.0",
218
218
  "react-router": "^7.6.3",
219
219
  "sanitize-html": "^2.12.1",
220
- "sku": "14.8.0",
220
+ "sku": "14.13.0",
221
221
  "storybook": "9.0.15",
222
222
  "svgo": "^2.8.0",
223
223
  "title-case": "^3.0.3",
224
- "@braid-design-system/source.macro": "1.0.0"
224
+ "@braid-design-system/source.macro": "1.0.1-test-20251007010150"
225
225
  },
226
226
  "peerDependencies": {
227
227
  "react": "^18 || ^19",