@draftbit/core 47.0.1-cc5ccc.2 → 47.0.1-d5418f.2

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 (91) hide show
  1. package/lib/commonjs/components/Button.js +17 -29
  2. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +1 -2
  3. package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -2
  4. package/lib/commonjs/components/CircularProgress.js +26 -8
  5. package/lib/commonjs/components/DeprecatedButton.js +127 -0
  6. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -2
  7. package/lib/commonjs/components/Picker/Picker.js +4 -3
  8. package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
  9. package/lib/commonjs/components/Pressable.js +12 -23
  10. package/lib/commonjs/components/Touchable.js +13 -24
  11. package/lib/commonjs/components/Touchable.web.js +9 -0
  12. package/lib/commonjs/index.js +7 -0
  13. package/lib/commonjs/mappings/Button.js +31 -5
  14. package/lib/commonjs/mappings/FlashList.js +45 -2
  15. package/lib/commonjs/mappings/FlatList.js +12 -0
  16. package/lib/commonjs/mappings/{Pressable.js → Touchable.js} +17 -9
  17. package/lib/module/components/Button.js +11 -23
  18. package/lib/module/components/Checkbox/CheckboxGroupRow.js +2 -3
  19. package/lib/module/components/Checkbox/CheckboxRow.js +2 -3
  20. package/lib/module/components/DeprecatedButton.js +117 -0
  21. package/lib/module/components/DeprecatedCardWrapper.js +2 -2
  22. package/lib/module/components/Picker/Picker.js +4 -3
  23. package/lib/module/components/Picker/PickerComponent.ios.js +1 -1
  24. package/lib/module/components/Pressable.js +11 -21
  25. package/lib/module/components/RadioButton/RadioButtonRow.js +24 -5
  26. package/lib/module/components/Touchable.js +12 -22
  27. package/lib/module/components/Touchable.web.js +2 -0
  28. package/lib/module/index.js +1 -0
  29. package/lib/module/mappings/Button.js +32 -6
  30. package/lib/module/mappings/FlashList.js +46 -3
  31. package/lib/module/mappings/FlatList.js +13 -1
  32. package/lib/module/mappings/{Pressable.js → Touchable.js} +18 -10
  33. package/lib/typescript/src/components/Button.d.ts +0 -2
  34. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  35. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +1 -1
  36. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  37. package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +1 -1
  38. package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +1 -1
  39. package/lib/typescript/src/components/DeprecatedButton.d.ts +54 -0
  40. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -0
  41. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -1
  42. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  43. package/lib/typescript/src/components/Pressable.d.ts +3 -11
  44. package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
  45. package/lib/typescript/src/components/Touchable.d.ts +3 -11
  46. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  47. package/lib/typescript/src/components/Touchable.web.d.ts +3 -0
  48. package/lib/typescript/src/components/Touchable.web.d.ts.map +1 -0
  49. package/lib/typescript/src/index.d.ts +1 -0
  50. package/lib/typescript/src/index.d.ts.map +1 -1
  51. package/lib/typescript/src/mappings/Button.d.ts +1 -1
  52. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  53. package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
  54. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  55. package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
  56. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  57. package/lib/typescript/src/mappings/{Pressable.d.ts → Touchable.d.ts} +1 -1
  58. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -0
  59. package/package.json +3 -3
  60. package/src/components/Button.js +11 -18
  61. package/src/components/Button.tsx +12 -36
  62. package/src/components/Checkbox/Checkbox.tsx +2 -2
  63. package/src/components/Checkbox/CheckboxGroupRow.js +2 -3
  64. package/src/components/Checkbox/CheckboxGroupRow.tsx +3 -3
  65. package/src/components/Checkbox/CheckboxRow.js +2 -3
  66. package/src/components/Checkbox/CheckboxRow.tsx +3 -3
  67. package/src/components/DeprecatedButton.js +83 -0
  68. package/src/components/DeprecatedButton.tsx +190 -0
  69. package/src/components/DeprecatedCardWrapper.js +2 -2
  70. package/src/components/DeprecatedCardWrapper.tsx +4 -3
  71. package/src/components/Picker/Picker.js +4 -3
  72. package/src/components/Picker/Picker.tsx +4 -4
  73. package/src/components/Picker/PickerComponent.ios.js +1 -1
  74. package/src/components/Picker/PickerComponent.ios.tsx +1 -1
  75. package/src/components/Pressable.js +10 -15
  76. package/src/components/Pressable.tsx +11 -34
  77. package/src/components/Touchable.js +11 -16
  78. package/src/components/Touchable.tsx +13 -40
  79. package/src/components/Touchable.web.js +2 -0
  80. package/src/components/Touchable.web.tsx +3 -0
  81. package/src/index.js +1 -0
  82. package/src/index.tsx +1 -0
  83. package/src/mappings/Button.js +32 -6
  84. package/src/mappings/Button.ts +34 -6
  85. package/src/mappings/FlashList.js +77 -31
  86. package/src/mappings/FlashList.ts +82 -30
  87. package/src/mappings/FlatList.js +13 -1
  88. package/src/mappings/FlatList.ts +16 -0
  89. package/src/mappings/{Pressable.js → Touchable.js} +18 -10
  90. package/src/mappings/{Pressable.ts → Touchable.ts} +18 -11
  91. package/lib/typescript/src/mappings/Pressable.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createActionProp, Triggers, createNumberProp, StylesPanelSections, GROUPS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createActionProp, Triggers, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
2
2
  const SEED_DATA_PROPS = {
3
3
  stylesPanelSections: [
4
4
  StylesPanelSections.Size,
@@ -10,27 +10,35 @@ const SEED_DATA_PROPS = {
10
10
  props: {
11
11
  onPress: createActionProp(),
12
12
  onLongPress: createActionProp(),
13
- activeOpacity: createNumberProp({
13
+ activeOpacity: createStaticNumberProp({
14
14
  label: "Active Opacity",
15
15
  description: "The opacity when the button is pressed.",
16
16
  defaultValue: 0.8,
17
- group: GROUPS.basic,
17
+ min: 0,
18
+ max: 1,
19
+ step: 0.01,
20
+ precision: 2,
21
+ required: false,
18
22
  }),
19
- disabledOpacity: createNumberProp({
23
+ disabledOpacity: createStaticNumberProp({
20
24
  label: "Disabled Opacity",
21
25
  description: "The opacity when the button is disabled.",
22
26
  defaultValue: 0.8,
23
- group: GROUPS.basic,
27
+ min: 0,
28
+ max: 1,
29
+ step: 0.01,
30
+ precision: 2,
31
+ required: false,
24
32
  }),
25
- delayLongPress: createNumberProp({
33
+ delayLongPress: createStaticNumberProp({
26
34
  label: "Delay Long Press",
27
35
  description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
28
- group: GROUPS.basic,
36
+ required: false,
29
37
  }),
30
- hitSlop: createNumberProp({
38
+ hitSlop: createStaticNumberProp({
31
39
  label: "Hit Slop",
32
40
  description: "Sets additional distance outside of element in which a press can be detected.",
33
- group: GROUPS.basic,
41
+ required: false,
34
42
  }),
35
43
  },
36
44
  };
@@ -46,7 +54,7 @@ export const SEED_DATA = [
46
54
  name: "Pressable",
47
55
  tag: "Pressable",
48
56
  description: "An interactive view with no styles",
49
- category: COMPONENT_TYPES.deprecated,
57
+ category: COMPONENT_TYPES.button,
50
58
  ...SEED_DATA_PROPS,
51
59
  },
52
60
  ];
@@ -2,9 +2,8 @@ import {
2
2
  COMPONENT_TYPES,
3
3
  createActionProp,
4
4
  Triggers,
5
- createNumberProp,
5
+ createStaticNumberProp,
6
6
  StylesPanelSections,
7
- GROUPS,
8
7
  } from "@draftbit/types";
9
8
 
10
9
  const SEED_DATA_PROPS = {
@@ -18,29 +17,37 @@ const SEED_DATA_PROPS = {
18
17
  props: {
19
18
  onPress: createActionProp(),
20
19
  onLongPress: createActionProp(),
21
- activeOpacity: createNumberProp({
20
+ activeOpacity: createStaticNumberProp({
22
21
  label: "Active Opacity",
23
22
  description: "The opacity when the button is pressed.",
24
23
  defaultValue: 0.8,
25
- group: GROUPS.basic,
24
+ min: 0,
25
+ max: 1,
26
+ step: 0.01,
27
+ precision: 2,
28
+ required: false,
26
29
  }),
27
- disabledOpacity: createNumberProp({
30
+ disabledOpacity: createStaticNumberProp({
28
31
  label: "Disabled Opacity",
29
32
  description: "The opacity when the button is disabled.",
30
33
  defaultValue: 0.8,
31
- group: GROUPS.basic,
34
+ min: 0,
35
+ max: 1,
36
+ step: 0.01,
37
+ precision: 2,
38
+ required: false,
32
39
  }),
33
- delayLongPress: createNumberProp({
40
+ delayLongPress: createStaticNumberProp({
34
41
  label: "Delay Long Press",
35
42
  description:
36
43
  "Duration (in milliseconds) from onPressIn before onLongPress is called.",
37
- group: GROUPS.basic,
44
+ required: false,
38
45
  }),
39
- hitSlop: createNumberProp({
46
+ hitSlop: createStaticNumberProp({
40
47
  label: "Hit Slop",
41
48
  description:
42
49
  "Sets additional distance outside of element in which a press can be detected.",
43
- group: GROUPS.basic,
50
+ required: false,
44
51
  }),
45
52
  },
46
53
  };
@@ -57,7 +64,7 @@ export const SEED_DATA = [
57
64
  name: "Pressable",
58
65
  tag: "Pressable",
59
66
  description: "An interactive view with no styles",
60
- category: COMPONENT_TYPES.deprecated,
67
+ category: COMPONENT_TYPES.button,
61
68
  ...SEED_DATA_PROPS,
62
69
  },
63
70
  ];
@@ -1 +0,0 @@
1
- {"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Pressable.ts"],"names":[],"mappings":"AA+CA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAerB,CAAC"}