@draftbit/core 42.4.6-75ef33.0 → 42.4.6-7e6a42.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.
Files changed (32) hide show
  1. package/lib/commonjs/components/Checkbox/Checkbox.js +6 -27
  2. package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
  3. package/lib/commonjs/components/Checkbox/CheckboxRow.js +7 -13
  4. package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
  5. package/lib/commonjs/components/Switch.js +2 -1
  6. package/lib/commonjs/components/Switch.js.map +1 -1
  7. package/lib/commonjs/mappings/Checkbox.js +0 -11
  8. package/lib/commonjs/mappings/Checkbox.js.map +1 -1
  9. package/lib/commonjs/mappings/TextInput.js +1 -4
  10. package/lib/commonjs/mappings/TextInput.js.map +1 -1
  11. package/lib/module/components/Checkbox/Checkbox.js +5 -24
  12. package/lib/module/components/Checkbox/Checkbox.js.map +1 -1
  13. package/lib/module/components/Checkbox/CheckboxRow.js +7 -13
  14. package/lib/module/components/Checkbox/CheckboxRow.js.map +1 -1
  15. package/lib/module/components/Switch.js +2 -1
  16. package/lib/module/components/Switch.js.map +1 -1
  17. package/lib/module/mappings/Checkbox.js +0 -11
  18. package/lib/module/mappings/Checkbox.js.map +1 -1
  19. package/lib/module/mappings/TextInput.js +1 -4
  20. package/lib/module/mappings/TextInput.js.map +1 -1
  21. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -9
  22. package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts +1 -12
  23. package/lib/typescript/src/components/Switch.d.ts +1 -1
  24. package/package.json +2 -2
  25. package/src/components/Checkbox/Checkbox.js +8 -24
  26. package/src/components/Checkbox/Checkbox.tsx +10 -34
  27. package/src/components/Checkbox/CheckboxRow.js +7 -13
  28. package/src/components/Checkbox/CheckboxRow.tsx +8 -19
  29. package/src/components/Switch.js +2 -2
  30. package/src/components/Switch.tsx +2 -1
  31. package/src/mappings/Checkbox.js +0 -11
  32. package/src/mappings/TextInput.js +0 -4
@@ -107,6 +107,7 @@ function Row({
107
107
  direction = RowDirection.Row,
108
108
  style,
109
109
  value,
110
+ defaultValue,
110
111
  disabled,
111
112
  onValueChange,
112
113
  activeTrackColor,
@@ -116,7 +117,7 @@ function Row({
116
117
  theme,
117
118
  ...rest
118
119
  }: Props & RowProps) {
119
- const [checked, setChecked] = React.useState(value);
120
+ const [checked, setChecked] = React.useState(value || defaultValue);
120
121
 
121
122
  React.useEffect(() => {
122
123
  if (value !== checked) {
@@ -32,12 +32,6 @@ export const SEED_DATA = {
32
32
  description: "Color for the button when the checkbox is unchecked",
33
33
  defaultValue: null,
34
34
  }),
35
- indeterminateColor: createColorProp({
36
- group: GROUPS.basic,
37
- label: "Indeterminate Color",
38
- description: "Color for the button when the checkbox is indeterminate",
39
- defaultValue: null,
40
- }),
41
35
  disabled: createBoolProp({
42
36
  label: "Disabled",
43
37
  description: "Whether the checkbox is disabled",
@@ -57,10 +51,5 @@ export const SEED_DATA = {
57
51
  description: 'Icon to show when the checkbox status is "unchecked"',
58
52
  defaultValue: null,
59
53
  }),
60
- indeterminateIcon: createIconProp({
61
- label: "Indeterminate Icon",
62
- description: 'Icon to show when the checkbox status is "indeterminate"',
63
- defaultValue: null,
64
- }),
65
54
  },
66
55
  };
@@ -221,10 +221,6 @@ export const SEED_DATA = [
221
221
  props: {
222
222
  ...NUMBER_INPUT_PROPS,
223
223
  ...SEED_DATA_PROPS,
224
- placeholder: {
225
- ...NUMBER_INPUT_PROPS.placeholder,
226
- defaultValue: "Input a number… ",
227
- },
228
224
  },
229
225
  },
230
226
  ];