@veracity/vui 2.25.2 → 2.25.3-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "2.25.2",
3
+ "version": "2.25.3-beta.0",
4
4
  "description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
5
5
  "module": "./dist/esm/index.js",
6
6
  "main": "./dist/cjs/index.js",
@@ -130,7 +130,6 @@ export const Checkbox = vui<'span', CheckboxProps>((props, ref) => {
130
130
  {...{ checked, defaultChecked, disabled, id, name, required, value }}
131
131
  {...inputProps}
132
132
  />
133
-
134
133
  <Icon className="vui-checkboxIcon" h="100%" name={icon} w="100%" />
135
134
  </CheckboxControl>
136
135
 
@@ -102,9 +102,9 @@ export const Radio = vui<'span', RadioProps>((props, ref) => {
102
102
  else if (checked !== undefined) setIsChecked(checked)
103
103
  }, [checked, groupIsChecked])
104
104
 
105
- function handleOnChange(e: ChangeEvent) {
105
+ function handleOnChange(e: React.MouseEvent<HTMLInputElement>) {
106
106
  groupOnChange?.(e)
107
- onChange?.(e)
107
+ onChange?.(e as unknown as ChangeEvent)
108
108
  }
109
109
 
110
110
  const aliasedProps = filterUndefined({
@@ -128,28 +128,14 @@ export const Radio = vui<'span', RadioProps>((props, ref) => {
128
128
  mr={controlMr}
129
129
  {...controlStyles}
130
130
  >
131
- {checked !== undefined && (
132
- <RadioInput
133
- className="vui-radioInput"
134
- onChange={handleOnChange}
135
- ref={inputRef}
136
- type="radio"
137
- {...{ checked, disabled, id, name, required, value }}
138
- {...inputProps}
139
- />
140
- )}
141
-
142
- {checked === undefined && (
143
- <RadioInput
144
- className="vui-radioInput"
145
- onChange={handleOnChange}
146
- ref={inputRef}
147
- type="radio"
148
- {...{ defaultChecked, disabled, id, name, required, value }}
149
- {...inputProps}
150
- />
151
- )}
152
-
131
+ <RadioInput
132
+ className="vui-radioInput"
133
+ onClick={handleOnChange}
134
+ ref={inputRef}
135
+ type="radio"
136
+ {...{ defaultChecked: checked, disabled, id, name, required, value }}
137
+ {...inputProps}
138
+ />
153
139
  <Icon className="vui-radioIcon" h="100%" name={icon} w="100%" />
154
140
  </RadioControl>
155
141