@draftbit/core 47.0.1-cc5ccc.2 → 47.0.1-df014a.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 (88) hide show
  1. package/lib/commonjs/components/Button.js +15 -27
  2. package/lib/commonjs/components/Checkbox/Checkbox.js +3 -1
  3. package/lib/commonjs/components/DeprecatedButton.js +151 -0
  4. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -2
  5. package/lib/commonjs/components/DeprecatedFAB.js +2 -1
  6. package/lib/commonjs/components/Picker/Picker.js +4 -3
  7. package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
  8. package/lib/commonjs/components/Touchable.js +11 -27
  9. package/lib/commonjs/components/Touchable.web.js +9 -0
  10. package/lib/commonjs/mappings/Button.js +10 -13
  11. package/lib/commonjs/mappings/DatePickerModal.js +74 -0
  12. package/lib/commonjs/mappings/Touchable.js +20 -0
  13. package/lib/module/components/AvatarEdit.js +15 -4
  14. package/lib/module/components/Button.js +9 -21
  15. package/lib/module/components/CardBlock.js +14 -4
  16. package/lib/module/components/Checkbox/Checkbox.js +3 -2
  17. package/lib/module/components/CircleImage.js +16 -1
  18. package/lib/module/components/DeprecatedButton.js +141 -0
  19. package/lib/module/components/DeprecatedCardWrapper.js +20 -3
  20. package/lib/module/components/DeprecatedFAB.js +3 -2
  21. package/lib/module/components/FAB.js +22 -4
  22. package/lib/module/components/Picker/Picker.js +4 -3
  23. package/lib/module/components/Picker/PickerComponent.ios.js +37 -12
  24. package/lib/module/components/Picker/PickerComponent.web.js +21 -3
  25. package/lib/module/components/Switch.js +21 -10
  26. package/lib/module/components/TextField.js +78 -28
  27. package/lib/module/components/Touchable.js +28 -26
  28. package/lib/module/components/Touchable.web.js +2 -0
  29. package/lib/module/mappings/Button.js +11 -14
  30. package/lib/module/mappings/DatePickerModal.js +65 -0
  31. package/lib/module/mappings/Touchable.js +13 -0
  32. package/lib/typescript/src/components/Button.d.ts +0 -2
  33. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  34. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  35. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  36. package/lib/typescript/src/components/DeprecatedButton.d.ts +54 -0
  37. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -0
  38. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -1
  39. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  40. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  41. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  42. package/lib/typescript/src/components/Touchable.d.ts +2 -9
  43. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  44. package/lib/typescript/src/components/Touchable.web.d.ts +3 -0
  45. package/lib/typescript/src/components/Touchable.web.d.ts.map +1 -0
  46. package/lib/typescript/src/mappings/Button.d.ts +4 -113
  47. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  48. package/lib/typescript/src/mappings/DatePickerModal.d.ts +153 -0
  49. package/lib/typescript/src/mappings/DatePickerModal.d.ts.map +1 -0
  50. package/lib/typescript/src/mappings/Touchable.d.ts +22 -0
  51. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -0
  52. package/package.json +3 -3
  53. package/src/components/Button.js +11 -18
  54. package/src/components/Button.tsx +11 -45
  55. package/src/components/Checkbox/Checkbox.js +3 -2
  56. package/src/components/Checkbox/Checkbox.tsx +7 -5
  57. package/src/components/DeprecatedButton.js +95 -0
  58. package/src/components/DeprecatedButton.tsx +214 -0
  59. package/src/components/DeprecatedCardWrapper.js +2 -2
  60. package/src/components/DeprecatedCardWrapper.tsx +4 -3
  61. package/src/components/DeprecatedFAB.js +3 -2
  62. package/src/components/DeprecatedFAB.tsx +5 -5
  63. package/src/components/Picker/Picker.js +4 -3
  64. package/src/components/Picker/Picker.tsx +4 -4
  65. package/src/components/Picker/PickerComponent.ios.js +1 -1
  66. package/src/components/Picker/PickerComponent.ios.tsx +1 -1
  67. package/src/components/Touchable.js +11 -16
  68. package/src/components/Touchable.tsx +11 -42
  69. package/src/components/Touchable.web.js +2 -0
  70. package/src/components/Touchable.web.tsx +3 -0
  71. package/src/mappings/Button.js +10 -13
  72. package/src/mappings/Button.ts +10 -13
  73. package/src/mappings/DatePickerModal.js +73 -0
  74. package/src/mappings/DatePickerModal.ts +91 -0
  75. package/src/mappings/Touchable.js +17 -0
  76. package/src/mappings/Touchable.ts +23 -0
  77. package/lib/commonjs/components/Pressable.js +0 -48
  78. package/lib/commonjs/mappings/Pressable.js +0 -52
  79. package/lib/module/components/Pressable.js +0 -40
  80. package/lib/module/mappings/Pressable.js +0 -45
  81. package/lib/typescript/src/components/Pressable.d.ts +0 -18
  82. package/lib/typescript/src/components/Pressable.d.ts.map +0 -1
  83. package/lib/typescript/src/mappings/Pressable.d.ts +0 -76
  84. package/lib/typescript/src/mappings/Pressable.d.ts.map +0 -1
  85. package/src/components/Pressable.js +0 -17
  86. package/src/components/Pressable.tsx +0 -67
  87. package/src/mappings/Pressable.js +0 -52
  88. package/src/mappings/Pressable.ts +0 -63
@@ -1,63 +0,0 @@
1
- import {
2
- COMPONENT_TYPES,
3
- createActionProp,
4
- Triggers,
5
- createNumberProp,
6
- StylesPanelSections,
7
- GROUPS,
8
- } from "@draftbit/types";
9
-
10
- const SEED_DATA_PROPS = {
11
- stylesPanelSections: [
12
- StylesPanelSections.Size,
13
- StylesPanelSections.Margins,
14
- StylesPanelSections.Borders,
15
- ],
16
- layout: {},
17
- triggers: [Triggers.OnPress, Triggers.OnLongPress],
18
- props: {
19
- onPress: createActionProp(),
20
- onLongPress: createActionProp(),
21
- activeOpacity: createNumberProp({
22
- label: "Active Opacity",
23
- description: "The opacity when the button is pressed.",
24
- defaultValue: 0.8,
25
- group: GROUPS.basic,
26
- }),
27
- disabledOpacity: createNumberProp({
28
- label: "Disabled Opacity",
29
- description: "The opacity when the button is disabled.",
30
- defaultValue: 0.8,
31
- group: GROUPS.basic,
32
- }),
33
- delayLongPress: createNumberProp({
34
- label: "Delay Long Press",
35
- description:
36
- "Duration (in milliseconds) from onPressIn before onLongPress is called.",
37
- group: GROUPS.basic,
38
- }),
39
- hitSlop: createNumberProp({
40
- label: "Hit Slop",
41
- description:
42
- "Sets additional distance outside of element in which a press can be detected.",
43
- group: GROUPS.basic,
44
- }),
45
- },
46
- };
47
-
48
- export const SEED_DATA = [
49
- {
50
- name: "Touchable",
51
- tag: "Touchable",
52
- description: "An interactive view with no styles",
53
- category: COMPONENT_TYPES.button,
54
- ...SEED_DATA_PROPS,
55
- },
56
- {
57
- name: "Pressable",
58
- tag: "Pressable",
59
- description: "An interactive view with no styles",
60
- category: COMPONENT_TYPES.deprecated,
61
- ...SEED_DATA_PROPS,
62
- },
63
- ];