@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 +6 -0
- package/dist/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.js +4 -1
- package/dist/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.js +4 -1
- package/package.json +1 -1
- package/src/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.tsx +5 -1
- package/src/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.tsx +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -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
|
@@ -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>
|