@westpac/ui 0.38.0 → 0.39.0

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,11 @@
1
1
  # @westpac/ui
2
2
 
3
+ ## 0.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - faea8ea: fixes #1003
8
+
3
9
  ## 0.38.0
4
10
 
5
11
  ### Minor Changes
@@ -36,6 +36,9 @@ function BaseSelectorCheckboxGroupOption({ className , children , value , withBo
36
36
  checkIcon
37
37
  });
38
38
  const FinalIcon = checkIcon === 'checkbox' ? TickIcon : ArrowRightIcon;
39
+ const onItemClick = ()=>{
40
+ state.toggleValue(value);
41
+ };
39
42
  return React.createElement(FlexiCell, {
40
43
  after: React.createElement("div", {
41
44
  className: "flex gap-2"
@@ -46,8 +49,8 @@ function BaseSelectorCheckboxGroupOption({ className , children , value , withBo
46
49
  before: before,
47
50
  withBorder: withBorder,
48
51
  withArrow: withArrow,
49
- tag: "label",
50
52
  ref: ref,
53
+ onClick: onItemClick,
51
54
  className: styles.base({})
52
55
  }, React.createElement(VisuallyHidden, null, React.createElement("input", _extends({}, mergeProps(inputProps, focusProps), {
53
56
  ref: localRef
@@ -36,6 +36,9 @@ function BaseSelectorRadioGroupOption({ className , children , value , withBorde
36
36
  checkIcon
37
37
  });
38
38
  const FinalIcon = checkIcon === 'checkbox' ? TickIcon : ArrowRightIcon;
39
+ const onItemClick = ()=>{
40
+ state.setSelectedValue(value);
41
+ };
39
42
  return React.createElement(FlexiCell, {
40
43
  after: React.createElement("div", {
41
44
  className: "flex gap-2"
@@ -46,8 +49,8 @@ function BaseSelectorRadioGroupOption({ className , children , value , withBorde
46
49
  before: before,
47
50
  withBorder: withBorder,
48
51
  withArrow: withArrow,
49
- tag: "label",
50
52
  ref: ref,
53
+ onClick: onItemClick,
51
54
  className: styles.base({})
52
55
  }, React.createElement(VisuallyHidden, null, React.createElement("input", _extends({}, mergeProps(inputProps, focusProps), {
53
56
  ref: localRef
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@westpac/ui",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -38,6 +38,10 @@ function BaseSelectorCheckboxGroupOption(
38
38
 
39
39
  const FinalIcon = checkIcon === 'checkbox' ? TickIcon : ArrowRightIcon;
40
40
 
41
+ const onItemClick = () => {
42
+ state.toggleValue(value);
43
+ };
44
+
41
45
  return (
42
46
  <FlexiCell
43
47
  after={
@@ -49,8 +53,8 @@ function BaseSelectorCheckboxGroupOption(
49
53
  before={before}
50
54
  withBorder={withBorder}
51
55
  withArrow={withArrow}
52
- tag="label"
53
56
  ref={ref}
57
+ onClick={onItemClick}
54
58
  className={styles.base({})}
55
59
  >
56
60
  <VisuallyHidden>
@@ -32,6 +32,10 @@ function BaseSelectorRadioGroupOption(
32
32
 
33
33
  const FinalIcon = checkIcon === 'checkbox' ? TickIcon : ArrowRightIcon;
34
34
 
35
+ const onItemClick = () => {
36
+ state.setSelectedValue(value);
37
+ };
38
+
35
39
  return (
36
40
  <FlexiCell
37
41
  after={
@@ -43,8 +47,8 @@ function BaseSelectorRadioGroupOption(
43
47
  before={before}
44
48
  withBorder={withBorder}
45
49
  withArrow={withArrow}
46
- tag="label"
47
50
  ref={ref}
51
+ onClick={onItemClick}
48
52
  className={styles.base({})}
49
53
  >
50
54
  <VisuallyHidden>