braid-design-system 33.10.0-seek-business-to-nvl-20250630033521 → 34.0.0-seperate-codemod-20250618035833

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,59 +1,18 @@
1
1
  # braid-design-system
2
2
 
3
- ## 33.10.0-seek-business-to-nvl-20250630033521
3
+ ## 34.0.0-seperate-codemod-20250618035833
4
4
 
5
- ### Minor Changes
6
-
7
- - **Box, atoms**: Add `sticky` to `position`. ([#1806](https://github.com/seek-oss/braid-design-system/pull/1806))
8
-
9
- **EXAMPLE USAGE:**
10
-
11
- ```jsx
12
- <Box position="sticky" top={0} ... />
13
- ```
14
-
15
- - **seekBusiness:** Migrate to updated visual language ([#1819](https://github.com/seek-oss/braid-design-system/pull/1819))
16
-
17
- Migrate `seekBusiness` theme to new visual language.
18
- Adopts the `seekJobs` theme for the latest design standards, rather than the legacy `apac` theme, while retaining the `seekBusiness` brand accent colour.
19
-
20
- ## 33.9.1
21
-
22
- ### Patch Changes
23
-
24
- - **ButtonIcon, TooltipRenderer:** Remove unnecessary intermediary element around the tooltip trigger. ([#1814](https://github.com/seek-oss/braid-design-system/pull/1814))
25
-
26
- - **BraidTestProvider:** Use stubs instead of mocks to fill missing APIs in jsdom ([#1809](https://github.com/seek-oss/braid-design-system/pull/1809))
27
-
28
- This change allows the BraidTestProvider to be framework agnostic for tests and discourages testing the stubbed browser APIs directly.
29
-
30
- ## 33.9.0
31
-
32
- ### Minor Changes
5
+ ### Major Changes
33
6
 
34
7
  - @braid-design-system/codemod has been moved to its own package. ([#1801](https://github.com/seek-oss/braid-design-system/pull/1801))
35
8
 
36
- **Note: This is technically a breaking change for local migrations, but we expect minimal impact so are releasing this as a minor version change.**
37
-
38
- The `braid-upgrade` command is now no longer part of the `braid-design-system` package. Instead, `braid-upgrade` can be run via the `@braid-design-system/codemod` package.
9
+ The `braid-upgrade` command is now no longer apart of the core Braid Design System. Instead, `braid-upgrade` can be run via the `@braid-design-system/codemod` package.
39
10
 
40
11
  #### Example
41
12
 
42
13
  ```bash
43
- pnpm dlx @braid-design-system/codemod v31.11 "**/*.{ts,tsx}"
44
- ```
45
-
46
- ### Patch Changes
47
-
48
- - **BraidTestProvider:** Provide `ResizeObserver` & `IntersectionObserver` stubs to jsdom ([#1811](https://github.com/seek-oss/braid-design-system/pull/1811))
49
-
50
- Fixes an issue where rendering certain Braid components within a test environment could throw errors due to missing APIs in jsdom, causing tests to fail with the following error:
51
-
14
+ pnpm --package=@braid-design-system/codemod dlx braid-upgrade v31.11 "**/*.{ts,tsx}
52
15
  ```
53
- ReferenceError: IntersectionObserver is not defined
54
- ```
55
-
56
- ## 33.8.0
57
16
 
58
17
  ### Minor Changes
59
18
 
@@ -94,8 +53,6 @@
94
53
 
95
54
  Fixes an issue where the close button inside the `Dialog` or `Drawer` was incorrectly inside an `aria-hidden` region.
96
55
 
97
- - **useToast**: Simplify internal logic, refining how the theme is applied to Toasts ([#1797](https://github.com/seek-oss/braid-design-system/pull/1797))
98
-
99
56
  - **Autosuggest**: Ensure suggestions dropdown is visible, even when `Autosuggest` is inside a container with overflow hidden. ([#1738](https://github.com/seek-oss/braid-design-system/pull/1738))
100
57
 
101
58
  ## 33.7.0
package/dist/index.d.mts CHANGED
@@ -976,15 +976,6 @@ declare const responsiveAtomicProperties: {
976
976
  length: 4;
977
977
  };
978
978
  values: {
979
- sticky: {
980
- defaultClass: string;
981
- conditions: {
982
- mobile: string;
983
- tablet: string;
984
- desktop: string;
985
- wide: string;
986
- };
987
- };
988
979
  relative: {
989
980
  defaultClass: string;
990
981
  conditions: {
@@ -2216,12 +2207,12 @@ declare const sprinkles: ((props: {
2216
2207
  desktop?: "none" | "flex" | "block" | "inline" | "inlineBlock" | undefined;
2217
2208
  wide?: "none" | "flex" | "block" | "inline" | "inlineBlock" | undefined;
2218
2209
  } | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<2 | 1 | 4 | 3, "none" | "flex" | "block" | "inline" | "inlineBlock" | null>;
2219
- readonly position?: ("sticky" | "relative" | "absolute" | "fixed" | {
2220
- mobile?: "sticky" | "relative" | "absolute" | "fixed" | undefined;
2221
- tablet?: "sticky" | "relative" | "absolute" | "fixed" | undefined;
2222
- desktop?: "sticky" | "relative" | "absolute" | "fixed" | undefined;
2223
- wide?: "sticky" | "relative" | "absolute" | "fixed" | undefined;
2224
- } | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<2 | 1 | 4 | 3, "sticky" | "relative" | "absolute" | "fixed" | null>;
2210
+ readonly position?: ("relative" | "absolute" | "fixed" | {
2211
+ mobile?: "relative" | "absolute" | "fixed" | undefined;
2212
+ tablet?: "relative" | "absolute" | "fixed" | undefined;
2213
+ desktop?: "relative" | "absolute" | "fixed" | undefined;
2214
+ wide?: "relative" | "absolute" | "fixed" | undefined;
2215
+ } | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<2 | 1 | 4 | 3, "relative" | "absolute" | "fixed" | null>;
2225
2216
  readonly borderRadius?: ("small" | "large" | "xlarge" | "standard" | "none" | "full" | {
2226
2217
  mobile?: "small" | "large" | "xlarge" | "standard" | "none" | "full" | undefined;
2227
2218
  tablet?: "small" | "large" | "xlarge" | "standard" | "none" | "full" | undefined;
package/dist/index.d.ts CHANGED
@@ -976,15 +976,6 @@ declare const responsiveAtomicProperties: {
976
976
  length: 4;
977
977
  };
978
978
  values: {
979
- sticky: {
980
- defaultClass: string;
981
- conditions: {
982
- mobile: string;
983
- tablet: string;
984
- desktop: string;
985
- wide: string;
986
- };
987
- };
988
979
  relative: {
989
980
  defaultClass: string;
990
981
  conditions: {
@@ -2216,12 +2207,12 @@ declare const sprinkles: ((props: {
2216
2207
  desktop?: "none" | "flex" | "block" | "inline" | "inlineBlock" | undefined;
2217
2208
  wide?: "none" | "flex" | "block" | "inline" | "inlineBlock" | undefined;
2218
2209
  } | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<2 | 1 | 4 | 3, "none" | "flex" | "block" | "inline" | "inlineBlock" | null>;
2219
- readonly position?: ("sticky" | "relative" | "absolute" | "fixed" | {
2220
- mobile?: "sticky" | "relative" | "absolute" | "fixed" | undefined;
2221
- tablet?: "sticky" | "relative" | "absolute" | "fixed" | undefined;
2222
- desktop?: "sticky" | "relative" | "absolute" | "fixed" | undefined;
2223
- wide?: "sticky" | "relative" | "absolute" | "fixed" | undefined;
2224
- } | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<2 | 1 | 4 | 3, "sticky" | "relative" | "absolute" | "fixed" | null>;
2210
+ readonly position?: ("relative" | "absolute" | "fixed" | {
2211
+ mobile?: "relative" | "absolute" | "fixed" | undefined;
2212
+ tablet?: "relative" | "absolute" | "fixed" | undefined;
2213
+ desktop?: "relative" | "absolute" | "fixed" | undefined;
2214
+ wide?: "relative" | "absolute" | "fixed" | undefined;
2215
+ } | undefined) | _vanilla_extract_sprinkles.ResponsiveArray<2 | 1 | 4 | 3, "relative" | "absolute" | "fixed" | null>;
2225
2216
  readonly borderRadius?: ("small" | "large" | "xlarge" | "standard" | "none" | "full" | {
2226
2217
  mobile?: "small" | "large" | "xlarge" | "standard" | "none" | "full" | undefined;
2227
2218
  tablet?: "small" | "large" | "xlarge" | "standard" | "none" | "full" | undefined;
@@ -18,7 +18,8 @@ const palette = {
18
18
  },
19
19
  seekBlue: {
20
20
  700: "#051A49",
21
- 500: "#0D3880"
21
+ 500: "#0D3880",
22
+ 300: "#7795C2"
22
23
  },
23
24
  seekBlueLight: {
24
25
  700: "#1E47A9",
@@ -17,7 +17,8 @@ const palette = {
17
17
  },
18
18
  seekBlue: {
19
19
  700: "#051A49",
20
- 500: "#0D3880"
20
+ 500: "#0D3880",
21
+ 300: "#7795C2"
21
22
  },
22
23
  seekBlueLight: {
23
24
  700: "#1E47A9",
@@ -5,31 +5,9 @@ const lib_themes_index_cjs = require("../../themes/index.cjs");
5
5
  const lib_components_BraidProvider_BraidProvider_cjs = require("../BraidProvider/BraidProvider.cjs");
6
6
  const lib_components_BraidProvider_BreakpointContext_cjs = require("../BraidProvider/BreakpointContext.cjs");
7
7
  const lib_components_BraidTestProvider_BraidTestProviderContext_cjs = require("./BraidTestProviderContext.cjs");
8
- const noop = () => {
9
- };
10
8
  if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("jsdom"))) {
11
9
  window.HTMLElement.prototype.scrollIntoView = window.HTMLElement.prototype.scrollIntoView || (() => {
12
10
  });
13
- class MockResizeObserver {
14
- constructor() {
15
- this.observe = noop;
16
- this.unobserve = noop;
17
- this.disconnect = noop;
18
- }
19
- }
20
- window.ResizeObserver = MockResizeObserver;
21
- class MockIntersectionObserver {
22
- constructor() {
23
- this.root = null;
24
- this.rootMargin = "";
25
- this.thresholds = [];
26
- this.observe = noop;
27
- this.unobserve = noop;
28
- this.disconnect = noop;
29
- this.takeRecords = noop;
30
- }
31
- }
32
- window.IntersectionObserver = MockIntersectionObserver;
33
11
  }
34
12
  const BraidTestProvider = ({
35
13
  themeName = "wireframe",
@@ -4,31 +4,9 @@ import { themes } from "../../themes/index.mjs";
4
4
  import { BraidProvider } from "../BraidProvider/BraidProvider.mjs";
5
5
  import { breakpointContext } from "../BraidProvider/BreakpointContext.mjs";
6
6
  import { BraidTestProviderContext } from "./BraidTestProviderContext.mjs";
7
- const noop = () => {
8
- };
9
7
  if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("jsdom"))) {
10
8
  window.HTMLElement.prototype.scrollIntoView = window.HTMLElement.prototype.scrollIntoView || (() => {
11
9
  });
12
- class MockResizeObserver {
13
- constructor() {
14
- this.observe = noop;
15
- this.unobserve = noop;
16
- this.disconnect = noop;
17
- }
18
- }
19
- window.ResizeObserver = MockResizeObserver;
20
- class MockIntersectionObserver {
21
- constructor() {
22
- this.root = null;
23
- this.rootMargin = "";
24
- this.thresholds = [];
25
- this.observe = noop;
26
- this.unobserve = noop;
27
- this.disconnect = noop;
28
- this.takeRecords = noop;
29
- }
30
- }
31
- window.IntersectionObserver = MockIntersectionObserver;
32
10
  }
33
11
  const BraidTestProvider = ({
34
12
  themeName = "wireframe",
@@ -108,33 +108,6 @@ const TooltipRenderer = ({
108
108
  );
109
109
  };
110
110
  }, []);
111
- react.useEffect(() => {
112
- const toggleTooltip = () => setOpen(!open);
113
- const openTooltip = () => setOpen(true);
114
- const closeTooltip = () => setOpen(false);
115
- if (triggerRef.current) {
116
- triggerRef.current.addEventListener("blur", closeTooltip);
117
- if (isMobileDevice) {
118
- triggerRef.current.addEventListener("click", toggleTooltip);
119
- } else {
120
- triggerRef.current.addEventListener("focus", openTooltip);
121
- triggerRef.current.addEventListener("mouseenter", openTooltip);
122
- triggerRef.current.addEventListener("mouseleave", closeTooltip);
123
- }
124
- }
125
- return () => {
126
- if (triggerRef.current) {
127
- triggerRef.current.removeEventListener("blur", closeTooltip);
128
- if (isMobileDevice) {
129
- triggerRef.current.removeEventListener("click", toggleTooltip);
130
- } else {
131
- triggerRef.current.removeEventListener("focus", openTooltip);
132
- triggerRef.current.removeEventListener("mouseenter", openTooltip);
133
- triggerRef.current.removeEventListener("mouseleave", closeTooltip);
134
- }
135
- }
136
- };
137
- }, [open, isMobileDevice]);
138
111
  lib_hooks_useIsomorphicLayoutEffect_cjs.useIsomorphicLayoutEffect(() => {
139
112
  const setPositions = () => {
140
113
  var _a, _b;
@@ -156,15 +129,29 @@ const TooltipRenderer = ({
156
129
  arrowLeftOffset = tooltipLeftToTriggerLeft + triggerPosition.width / 2;
157
130
  }
158
131
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
159
- children({
160
- triggerProps: {
161
- tabIndex: 0,
162
- ref: (el) => {
163
- triggerRef.current = el;
132
+ /* @__PURE__ */ jsxRuntime.jsx(
133
+ lib_components_Box_Box_cjs.Box,
134
+ {
135
+ tabIndex: -1,
136
+ onBlur: () => setOpen(false),
137
+ ...isMobileDevice ? {
138
+ onClick: () => setOpen(!open)
139
+ } : {
140
+ onMouseEnter: () => setOpen(true),
141
+ onFocus: () => setOpen(true),
142
+ onMouseLeave: () => setOpen(false)
164
143
  },
165
- "aria-describedby": resolvedId
144
+ children: children({
145
+ triggerProps: {
146
+ tabIndex: 0,
147
+ ref: (el) => {
148
+ triggerRef.current = el;
149
+ },
150
+ "aria-describedby": resolvedId
151
+ }
152
+ })
166
153
  }
167
- }),
154
+ ),
168
155
  /* @__PURE__ */ jsxRuntime.jsx(
169
156
  lib_components_private_Popover_Popover_cjs.Popover,
170
157
  {
@@ -105,33 +105,6 @@ const TooltipRenderer = ({
105
105
  );
106
106
  };
107
107
  }, []);
108
- useEffect(() => {
109
- const toggleTooltip = () => setOpen(!open);
110
- const openTooltip = () => setOpen(true);
111
- const closeTooltip = () => setOpen(false);
112
- if (triggerRef.current) {
113
- triggerRef.current.addEventListener("blur", closeTooltip);
114
- if (isMobileDevice) {
115
- triggerRef.current.addEventListener("click", toggleTooltip);
116
- } else {
117
- triggerRef.current.addEventListener("focus", openTooltip);
118
- triggerRef.current.addEventListener("mouseenter", openTooltip);
119
- triggerRef.current.addEventListener("mouseleave", closeTooltip);
120
- }
121
- }
122
- return () => {
123
- if (triggerRef.current) {
124
- triggerRef.current.removeEventListener("blur", closeTooltip);
125
- if (isMobileDevice) {
126
- triggerRef.current.removeEventListener("click", toggleTooltip);
127
- } else {
128
- triggerRef.current.removeEventListener("focus", openTooltip);
129
- triggerRef.current.removeEventListener("mouseenter", openTooltip);
130
- triggerRef.current.removeEventListener("mouseleave", closeTooltip);
131
- }
132
- }
133
- };
134
- }, [open, isMobileDevice]);
135
108
  useIsomorphicLayoutEffect(() => {
136
109
  const setPositions = () => {
137
110
  var _a, _b;
@@ -153,15 +126,29 @@ const TooltipRenderer = ({
153
126
  arrowLeftOffset = tooltipLeftToTriggerLeft + triggerPosition.width / 2;
154
127
  }
155
128
  return /* @__PURE__ */ jsxs(Fragment, { children: [
156
- children({
157
- triggerProps: {
158
- tabIndex: 0,
159
- ref: (el) => {
160
- triggerRef.current = el;
129
+ /* @__PURE__ */ jsx(
130
+ Box,
131
+ {
132
+ tabIndex: -1,
133
+ onBlur: () => setOpen(false),
134
+ ...isMobileDevice ? {
135
+ onClick: () => setOpen(!open)
136
+ } : {
137
+ onMouseEnter: () => setOpen(true),
138
+ onFocus: () => setOpen(true),
139
+ onMouseLeave: () => setOpen(false)
161
140
  },
162
- "aria-describedby": resolvedId
141
+ children: children({
142
+ triggerProps: {
143
+ tabIndex: 0,
144
+ ref: (el) => {
145
+ triggerRef.current = el;
146
+ },
147
+ "aria-describedby": resolvedId
148
+ }
149
+ })
163
150
  }
164
- }),
151
+ ),
165
152
  /* @__PURE__ */ jsx(
166
153
  Popover,
167
154
  {
@@ -46,6 +46,7 @@ const ToastIcon = ({ tone, icon }) => {
46
46
  const Toast = react.forwardRef(
47
47
  ({
48
48
  toastKey,
49
+ vanillaTheme,
49
50
  dedupeKey,
50
51
  message,
51
52
  description,
@@ -98,6 +99,7 @@ const Toast = react.forwardRef(
98
99
  ref,
99
100
  onMouseEnter: stopTimeout,
100
101
  onMouseLeave: startTimeout,
102
+ className: vanillaTheme,
101
103
  ...lib_components_private_buildDataAttributes_cjs.buildDataAttributes({ data, validateRestProps: restProps }),
102
104
  children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_Box_Box_cjs.Box, { boxShadow: "large", borderRadius, children: /* @__PURE__ */ jsxRuntime.jsx(lib_components_ContentBlock_ContentBlock_cjs.ContentBlock, { width: "xsmall", children: /* @__PURE__ */ jsxRuntime.jsx(
103
105
  lib_components_Box_Box_cjs.Box,
@@ -43,6 +43,7 @@ const ToastIcon = ({ tone, icon }) => {
43
43
  const Toast = forwardRef(
44
44
  ({
45
45
  toastKey,
46
+ vanillaTheme,
46
47
  dedupeKey,
47
48
  message,
48
49
  description,
@@ -95,6 +96,7 @@ const Toast = forwardRef(
95
96
  ref,
96
97
  onMouseEnter: stopTimeout,
97
98
  onMouseLeave: startTimeout,
99
+ className: vanillaTheme,
98
100
  ...buildDataAttributes({ data, validateRestProps: restProps }),
99
101
  children: /* @__PURE__ */ jsx(Box, { boxShadow: "large", borderRadius, children: /* @__PURE__ */ jsx(ContentBlock, { width: "xsmall", children: /* @__PURE__ */ jsx(
100
102
  Box,
@@ -86,7 +86,7 @@ const responsiveProperties = {
86
86
  inlineBlock: "inline-block",
87
87
  flex: "flex"
88
88
  },
89
- position: ["relative", "absolute", "fixed", "sticky"],
89
+ position: ["relative", "absolute", "fixed"],
90
90
  borderRadius: {
91
91
  none: "0px",
92
92
  full: "9999px",
@@ -85,7 +85,7 @@ const responsiveProperties = {
85
85
  inlineBlock: "inline-block",
86
86
  flex: "flex"
87
87
  },
88
- position: ["relative", "absolute", "fixed", "sticky"],
88
+ position: ["relative", "absolute", "fixed"],
89
89
  borderRadius: {
90
90
  none: "0px",
91
91
  full: "9999px",
@@ -8,8 +8,6 @@ const lib_components_useToast_ToastContext_cjs = require("../components/useToast
8
8
  const lib_css_breakpoints_cjs = require("../css/breakpoints.cjs");
9
9
  function useScope() {
10
10
  const responsiveValue = lib_components_useResponsiveValue_useResponsiveValue_cjs.useResponsiveValue();
11
- const showToast = lib_components_useToast_ToastContext_cjs.useToast();
12
- const playroomState = lib_playroom_playroomState_cjs.usePlayroomStore();
13
11
  const [colorMode, setColorMode] = react.useState(
14
12
  "lightMode"
15
13
  );
@@ -52,10 +50,10 @@ function useScope() {
52
50
  vars: entries_css_cjs.vars,
53
51
  atoms: entries_css_cjs.atoms,
54
52
  breakpoints: lib_css_breakpoints_cjs.breakpoints,
55
- showToast,
53
+ showToast: lib_components_useToast_ToastContext_cjs.useToast(),
56
54
  responsiveValue: playroomResponsiveValue,
57
55
  colorModeValue: playroomColorModeValue,
58
- ...playroomState
56
+ ...lib_playroom_playroomState_cjs.usePlayroomStore()
59
57
  };
60
58
  }
61
59
  exports.useScope = useScope;
@@ -7,8 +7,6 @@ import { useToast } from "../components/useToast/ToastContext.mjs";
7
7
  import { breakpoints } from "../css/breakpoints.mjs";
8
8
  function useScope() {
9
9
  const responsiveValue = useResponsiveValue();
10
- const showToast = useToast();
11
- const playroomState = usePlayroomStore();
12
10
  const [colorMode, setColorMode] = useState(
13
11
  "lightMode"
14
12
  );
@@ -51,10 +49,10 @@ function useScope() {
51
49
  vars,
52
50
  atoms,
53
51
  breakpoints,
54
- showToast,
52
+ showToast: useToast(),
55
53
  responsiveValue: playroomResponsiveValue,
56
54
  colorModeValue: playroomColorModeValue,
57
- ...playroomState
55
+ ...usePlayroomStore()
58
56
  };
59
57
  }
60
58
  export {