@westpac/ui 0.57.2 → 0.57.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.
@@ -70,6 +70,8 @@ export function ButtonGroup({ className, buttons, label, look = 'hero', size = '
70
70
  const state = useRadioGroupState({
71
71
  ...props,
72
72
  label,
73
+ value: props.value === '' ? null : props.value,
74
+ defaultValue: props.defaultValue === '' ? null : props.defaultValue,
73
75
  orientation: 'horizontal'
74
76
  });
75
77
  const { radioGroupProps, labelProps, errorMessageProps, descriptionProps } = useRadioGroup({
@@ -1,4 +1,5 @@
1
1
  'use client';
2
+ import { mergeProps } from '@react-aria/utils';
2
3
  import React, { useContext, useRef } from 'react';
3
4
  import { VisuallyHidden, useFocusRing, useRadio } from 'react-aria';
4
5
  import { Button as GELButton } from '../../../button/index.js';
@@ -22,8 +23,7 @@ export function ButtonGroupButton({ className, label, ...props }) {
22
23
  className
23
24
  })
24
25
  }, React.createElement(VisuallyHidden, null, React.createElement("input", {
25
- ...inputProps,
26
- ...focusProps,
26
+ ...mergeProps(inputProps, focusProps),
27
27
  ref: ref
28
28
  })), React.createElement(GELButton, {
29
29
  tag: "div",
@@ -104,7 +104,7 @@
104
104
  --tw-contain-paint: ;
105
105
  --tw-contain-style: ;
106
106
  } /*
107
- ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
107
+ ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
108
108
  */ /*
109
109
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
110
110
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
@@ -2881,9 +2881,7 @@ body {
2881
2881
  vertical-align: middle;
2882
2882
  --tw-text-opacity: 1;
2883
2883
  color: rgba(var(--colors-text), var(--tw-text-opacity, 1));
2884
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
2885
2884
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
2886
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
2887
2885
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2888
2886
  transition-duration: 150ms;
2889
2887
  }
@@ -2984,9 +2982,7 @@ body {
2984
2982
  --tw-shadow: 0 0 #0000;
2985
2983
  --tw-shadow-colored: 0 0 #0000;
2986
2984
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
2987
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
2988
2985
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
2989
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
2990
2986
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2991
2987
  transition-duration: 150ms;
2992
2988
  }
@@ -6534,9 +6530,7 @@ body {
6534
6530
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
6535
6531
  }
6536
6532
  .transition {
6537
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
6538
6533
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
6539
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
6540
6534
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
6541
6535
  transition-duration: 150ms;
6542
6536
  }
@@ -104,7 +104,7 @@
104
104
  --tw-contain-paint: ;
105
105
  --tw-contain-style: ;
106
106
  } /*
107
- ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
107
+ ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
108
108
  */ /*
109
109
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
110
110
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
@@ -2881,9 +2881,7 @@ body {
2881
2881
  vertical-align: middle;
2882
2882
  --tw-text-opacity: 1;
2883
2883
  color: rgba(var(--colors-text), var(--tw-text-opacity, 1));
2884
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
2885
2884
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
2886
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
2887
2885
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2888
2886
  transition-duration: 150ms;
2889
2887
  }
@@ -2984,9 +2982,7 @@ body {
2984
2982
  --tw-shadow: 0 0 #0000;
2985
2983
  --tw-shadow-colored: 0 0 #0000;
2986
2984
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
2987
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
2988
2985
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
2989
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
2990
2986
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2991
2987
  transition-duration: 150ms;
2992
2988
  }
@@ -6534,9 +6530,7 @@ body {
6534
6530
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
6535
6531
  }
6536
6532
  .transition {
6537
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
6538
6533
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
6539
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
6540
6534
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
6541
6535
  transition-duration: 150ms;
6542
6536
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@westpac/ui",
3
- "version": "0.57.2",
3
+ "version": "0.57.4",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -212,12 +212,12 @@
212
212
  "@react-types/combobox": "~3.13.6",
213
213
  "@react-types/shared": "~3.30.0",
214
214
  "@react-types/tabs": "~3.3.16",
215
- "@storybook/addon-a11y": "10.1.4",
216
- "@storybook/addon-docs": "10.1.4",
217
- "@storybook/addon-links": "10.1.4",
218
- "@storybook/addon-mcp": "~0.1.6",
219
- "@storybook/addon-themes": "~10.1.4",
220
- "@storybook/react-vite": "10.1.4",
215
+ "@storybook/addon-a11y": "10.2.3",
216
+ "@storybook/addon-docs": "10.2.3",
217
+ "@storybook/addon-links": "10.2.3",
218
+ "@storybook/addon-mcp": "~0.2.2",
219
+ "@storybook/addon-themes": "~10.2.3",
220
+ "@storybook/react-vite": "10.2.3",
221
221
  "@swc/cli": "^0.1.62",
222
222
  "@swc/core": "^1.3.35",
223
223
  "@testing-library/jest-dom": "^5.16.5",
@@ -239,7 +239,7 @@
239
239
  "eslint-plugin-storybook": "~10.1.4",
240
240
  "glob": "~10.5.0",
241
241
  "jsdom": "^22.1.0",
242
- "plop": "~3.1.2",
242
+ "plop": "~4.0.5",
243
243
  "postcss": "~8.4.31",
244
244
  "postcss-cli": "~10.1.0",
245
245
  "prettier": "^3.2.5",
@@ -248,9 +248,9 @@
248
248
  "react-docgen-typescript": "~2.2.2",
249
249
  "react-dom": "^18.2.0",
250
250
  "shx": "^0.3.4",
251
- "storybook": "10.1.4",
251
+ "storybook": "10.2.3",
252
252
  "tailwind-variants": "~0.2.1",
253
- "tailwindcss": "~3.4.15",
253
+ "tailwindcss": "~3.4.19",
254
254
  "tailwindcss-themer": "~3.1.0",
255
255
  "ts-node": "~10.9.1",
256
256
  "typescript": "^5.5.4",
@@ -283,7 +283,7 @@
283
283
  "@duetds/date-picker": "~1.4.0",
284
284
  "react": ">=18.2.0",
285
285
  "tailwind-variants": "~0.2.1",
286
- "tailwindcss": "~3.4.15",
286
+ "tailwindcss": "~3.4.19",
287
287
  "tailwindcss-themer": "~3.1.0"
288
288
  },
289
289
  "repository": {
@@ -84,7 +84,15 @@ export function ButtonGroup({
84
84
  hintMessage,
85
85
  ...props
86
86
  }: ButtonGroupProps) {
87
- const state = useRadioGroupState({ ...props, label, orientation: 'horizontal' });
87
+ const state = useRadioGroupState({
88
+ ...props,
89
+ label,
90
+ // React Aria seems to not handle empty string values as expected, so we convert empty string to null to ensure accessibility focus behaves as expected
91
+ value: props.value === '' ? null : props.value,
92
+ defaultValue: props.defaultValue === '' ? null : props.defaultValue,
93
+ orientation: 'horizontal',
94
+ });
95
+
88
96
  const { radioGroupProps, labelProps, errorMessageProps, descriptionProps } = useRadioGroup(
89
97
  {
90
98
  ...props,
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
 
3
+ import { mergeProps } from '@react-aria/utils';
3
4
  import React, { useContext, useRef } from 'react';
4
5
  import { VisuallyHidden, useFocusRing, useRadio } from 'react-aria';
5
6
 
@@ -19,7 +20,7 @@ export function ButtonGroupButton({ className, label, ...props }: ButtonGroupBut
19
20
  return (
20
21
  <label className={styles.base({ className })}>
21
22
  <VisuallyHidden>
22
- <input {...inputProps} {...focusProps} ref={ref} />
23
+ <input {...mergeProps(inputProps, focusProps)} ref={ref} />
23
24
  </VisuallyHidden>
24
25
  <GELButton
25
26
  tag="div"