@audira/carbon-react-native 1.0.0-beta.17 → 1.0.0-beta.19

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.
Files changed (27) hide show
  1. package/lib/commonjs/_internal/style-sheets/text-style-sheet.js +1 -1
  2. package/lib/commonjs/components/checkbox/Checkbox.js +5 -5
  3. package/lib/commonjs/components/checkbox/Checkbox.js.map +1 -1
  4. package/lib/commonjs/components/checkbox-input/CheckboxInput.js +2 -2
  5. package/lib/commonjs/components/checkbox-input/CheckboxInput.js.map +1 -1
  6. package/lib/module/_internal/style-sheets/text-style-sheet.js +1 -1
  7. package/lib/module/components/checkbox/Checkbox.js +5 -5
  8. package/lib/module/components/checkbox/Checkbox.js.map +1 -1
  9. package/lib/module/components/checkbox-input/CheckboxInput.js +2 -2
  10. package/lib/module/components/checkbox-input/CheckboxInput.js.map +1 -1
  11. package/lib/typescript/commonjs/_internal/style-sheets/text-style-sheet.d.ts +1 -1
  12. package/lib/typescript/commonjs/components/checkbox/_RefBase.d.ts +2 -2
  13. package/lib/typescript/commonjs/components/checkbox/_RefBase.d.ts.map +1 -1
  14. package/lib/typescript/commonjs/components/checkbox-input/_RefBase.d.ts +2 -2
  15. package/lib/typescript/commonjs/components/checkbox-input/_RefBase.d.ts.map +1 -1
  16. package/lib/typescript/module/_internal/style-sheets/text-style-sheet.d.ts +1 -1
  17. package/lib/typescript/module/components/checkbox/_RefBase.d.ts +2 -2
  18. package/lib/typescript/module/components/checkbox/_RefBase.d.ts.map +1 -1
  19. package/lib/typescript/module/components/checkbox-input/_RefBase.d.ts +2 -2
  20. package/lib/typescript/module/components/checkbox-input/_RefBase.d.ts.map +1 -1
  21. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  22. package/package.json +1 -1
  23. package/src/_internal/style-sheets/text-style-sheet.ts +1 -1
  24. package/src/components/checkbox/Checkbox.tsx +7 -7
  25. package/src/components/checkbox/_RefBase.ts +2 -2
  26. package/src/components/checkbox-input/CheckboxInput.tsx +2 -2
  27. package/src/components/checkbox-input/_RefBase.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audira/carbon-react-native",
3
- "version": "1.0.0-beta.17",
3
+ "version": "1.0.0-beta.19",
4
4
  "license": "MIT",
5
5
  "homepage": "https://rakadoank.github.io/carbon-react-native",
6
6
  "repository": "https://github.com/RakaDoank/carbon-react-native",
@@ -33,7 +33,7 @@ export const TextStyleSheet = StyleSheet.create({
33
33
  },
34
34
  normal_italic: {
35
35
  fontWeight: 400,
36
- fontFamily: "IBMPlexSans-Regular-Italic",
36
+ fontFamily: "IBMPlexSans-Italic",
37
37
  },
38
38
  medium: {
39
39
  fontWeight: 500,
@@ -95,10 +95,10 @@ export const Checkbox = forwardRef<CheckboxRef, CheckboxProps>(
95
95
  useCallback(event => {
96
96
  onPress?.(event)
97
97
  if(checkboxInputRef.current) {
98
- checkboxInputRef.current.setValue(
99
- checkboxInputRef.current.value === null
98
+ checkboxInputRef.current.setChecked(
99
+ checkboxInputRef.current.checked === null
100
100
  ? true
101
- : !checkboxInputRef.current.value,
101
+ : !checkboxInputRef.current.checked,
102
102
  )
103
103
  }
104
104
  }, [
@@ -110,11 +110,11 @@ export const Checkbox = forwardRef<CheckboxRef, CheckboxProps>(
110
110
  (viewRef.current ?? {
111
111
  }) as View,
112
112
  {
113
- get value() {
114
- return checkboxInputRef.current!.value
113
+ get checked() {
114
+ return checkboxInputRef.current!.checked
115
115
  },
116
- setValue(value_) {
117
- checkboxInputRef.current?.setValue(value_)
116
+ setChecked(value_) {
117
+ checkboxInputRef.current?.setChecked(value_)
118
118
  },
119
119
  },
120
120
  )
@@ -3,9 +3,9 @@ import type {
3
3
  } from "../checkbox-input/CheckboxInputRef"
4
4
 
5
5
  export interface RefBase {
6
- readonly value: CheckboxInputRef["value"],
6
+ readonly checked: CheckboxInputRef["checked"],
7
7
  /**
8
8
  * This method does nothing when `controlled` prop is true
9
9
  */
10
- setValue: CheckboxInputRef["setValue"],
10
+ setChecked: CheckboxInputRef["setChecked"],
11
11
  }
@@ -162,10 +162,10 @@ export const CheckboxInput = forwardRef<CheckboxInputRef, CheckboxInputProps>(
162
162
  return Object.assign<View, RefBase>(
163
163
  viewRef.current as View,
164
164
  {
165
- get value() {
165
+ get checked() {
166
166
  return checked
167
167
  },
168
- setValue(value_) {
168
+ setChecked(value_) {
169
169
  if(!controlled && interactiveState !== "read_only") {
170
170
  ref.current.onChangeEffect = true
171
171
  setCheckedSelf(self => {
@@ -3,9 +3,9 @@ import type {
3
3
  } from "./CheckboxInputState"
4
4
 
5
5
  export interface RefBase {
6
- readonly value: CheckboxInputState,
6
+ readonly checked: CheckboxInputState,
7
7
  /**
8
8
  * This method does nothing when `controlled` prop is true
9
9
  */
10
- setValue: (value: CheckboxInputState | ((value: CheckboxInputState) => CheckboxInputState)) => void,
10
+ setChecked: (value: CheckboxInputState | ((value: CheckboxInputState) => CheckboxInputState)) => void,
11
11
  }