@draftbit/core 46.11.1-c64d65.2 → 46.11.1-ca4afb.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 (159) hide show
  1. package/lib/commonjs/components/BottomSheet/BottomSheet.js +89 -0
  2. package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +1 -0
  3. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +424 -0
  4. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js.map +1 -0
  5. package/lib/commonjs/components/BottomSheet/index.js +14 -0
  6. package/lib/commonjs/components/BottomSheet/index.js.map +1 -0
  7. package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
  8. package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
  9. package/lib/commonjs/components/Checkbox/context.js +1 -1
  10. package/lib/commonjs/components/Checkbox/context.js.map +1 -1
  11. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  12. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +1 -1
  13. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js.map +1 -1
  14. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +0 -1
  15. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  16. package/lib/commonjs/components/Picker/Picker.js +13 -4
  17. package/lib/commonjs/components/Picker/Picker.js.map +1 -1
  18. package/lib/commonjs/components/Shadow.js +11 -2
  19. package/lib/commonjs/components/Shadow.js.map +1 -1
  20. package/lib/commonjs/components/StepIndicator.js +18 -57
  21. package/lib/commonjs/components/TabView/TabView.js +8 -15
  22. package/lib/commonjs/components/TabView/TabView.js.map +1 -1
  23. package/lib/commonjs/index.js +7 -0
  24. package/lib/commonjs/index.js.map +1 -1
  25. package/lib/commonjs/mappings/AccordionItem.js.map +1 -1
  26. package/lib/commonjs/mappings/DeckSwiper.js +2 -2
  27. package/lib/commonjs/mappings/DeckSwiper.js.map +1 -1
  28. package/lib/commonjs/mappings/DeckSwiperCard.js +1 -2
  29. package/lib/commonjs/mappings/DeckSwiperCard.js.map +1 -1
  30. package/lib/commonjs/mappings/Layout.js +4 -4
  31. package/lib/commonjs/mappings/Layout.js.map +1 -1
  32. package/lib/commonjs/mappings/Picker.js.map +1 -1
  33. package/lib/commonjs/mappings/Shadow.js +2 -2
  34. package/lib/commonjs/mappings/Shadow.js.map +1 -1
  35. package/lib/commonjs/utilities.js +9 -1
  36. package/lib/commonjs/utilities.js.map +1 -1
  37. package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  38. package/lib/module/components/Banner.js +4 -23
  39. package/lib/module/components/Banner.js.map +1 -1
  40. package/lib/module/components/BottomSheet/BottomSheet.js +81 -0
  41. package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -0
  42. package/lib/module/components/BottomSheet/BottomSheetComponent.js +430 -0
  43. package/lib/module/components/BottomSheet/BottomSheetComponent.js.map +1 -0
  44. package/{src/components/BottomSheet/index.ts.tmp → lib/module/components/BottomSheet/index.js} +1 -0
  45. package/lib/module/components/BottomSheet/index.js.map +1 -0
  46. package/lib/module/components/Card.js.map +1 -1
  47. package/lib/module/components/CircleImage.js +1 -15
  48. package/lib/module/components/CircleImage.js.map +1 -1
  49. package/lib/module/components/Container.js +4 -16
  50. package/lib/module/components/Container.js.map +1 -1
  51. package/lib/module/components/DatePicker/DatePicker.js +13 -9
  52. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  53. package/lib/module/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  54. package/lib/module/components/DeckSwiper/DeckSwiper.js +1 -1
  55. package/lib/module/components/DeckSwiper/DeckSwiper.js.map +1 -1
  56. package/lib/module/components/DeckSwiper/DeckSwiperCard.js +0 -1
  57. package/lib/module/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  58. package/lib/module/components/Markdown.js.map +1 -1
  59. package/lib/module/components/Picker/Picker.js +13 -4
  60. package/lib/module/components/Picker/Picker.js.map +1 -1
  61. package/lib/module/components/Picker/PickerComponent.android.js +3 -21
  62. package/lib/module/components/Picker/PickerComponent.android.js.map +1 -1
  63. package/lib/module/components/Portal/PortalConsumer.js +1 -2
  64. package/lib/module/components/Portal/PortalConsumer.js.map +1 -1
  65. package/lib/module/components/Portal/PortalHost.js +14 -44
  66. package/lib/module/components/Portal/PortalHost.js.map +1 -1
  67. package/lib/module/components/ProgressCircle.js.map +1 -1
  68. package/lib/module/components/RadioButton/RadioButtonRow.js +5 -23
  69. package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
  70. package/lib/module/components/RadioButton/index.js.map +1 -1
  71. package/lib/module/components/Row.js.map +1 -1
  72. package/lib/module/components/RowBodyIcon.js.map +1 -1
  73. package/lib/module/components/Shadow.js +11 -2
  74. package/lib/module/components/Shadow.js.map +1 -1
  75. package/lib/module/components/Swiper/SwiperItem.js.map +1 -1
  76. package/lib/module/components/TabView/TabView.js +1 -1
  77. package/lib/module/components/TabView/TabView.js.map +1 -1
  78. package/lib/module/components/Touchable.web.js.map +1 -1
  79. package/lib/module/components/YoutubePlayer/YoutubePlayerProps.js.map +1 -1
  80. package/lib/module/index.js +1 -0
  81. package/lib/module/index.js.map +1 -1
  82. package/lib/module/mappings/AccordionItem.js.map +1 -1
  83. package/lib/module/mappings/AudioPlayer.js.map +1 -1
  84. package/lib/module/mappings/CardInline.js.map +1 -1
  85. package/lib/module/mappings/DeckSwiper.js +3 -3
  86. package/lib/module/mappings/DeckSwiper.js.map +1 -1
  87. package/lib/module/mappings/DeckSwiperCard.js +2 -3
  88. package/lib/module/mappings/DeckSwiperCard.js.map +1 -1
  89. package/lib/module/mappings/Divider.js.map +1 -1
  90. package/lib/module/mappings/FlashList.js.map +1 -1
  91. package/lib/module/mappings/Layout.js +4 -4
  92. package/lib/module/mappings/Layout.js.map +1 -1
  93. package/lib/module/mappings/ProgressIndicator.js.map +1 -1
  94. package/lib/module/mappings/RadioButtonGroup.js.map +1 -1
  95. package/lib/module/mappings/RowHeadlineImageCaption.js.map +1 -1
  96. package/lib/module/mappings/Shadow.js +3 -3
  97. package/lib/module/mappings/Shadow.js.map +1 -1
  98. package/lib/module/styles/shadow.js.map +1 -1
  99. package/lib/module/utilities.js +6 -0
  100. package/lib/module/utilities.js.map +1 -1
  101. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +20 -0
  102. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  103. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +170 -0
  104. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +1 -0
  105. package/lib/typescript/src/components/BottomSheet/index.d.ts +2 -0
  106. package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
  107. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts.map +1 -1
  108. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  109. package/lib/typescript/src/components/Shadow.d.ts.map +1 -1
  110. package/lib/typescript/src/index.d.ts +1 -0
  111. package/lib/typescript/src/index.d.ts.map +1 -1
  112. package/lib/typescript/src/mappings/DeckSwiper.d.ts +1 -1
  113. package/lib/typescript/src/mappings/DeckSwiper.d.ts.map +1 -1
  114. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts +0 -1
  115. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts.map +1 -1
  116. package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -1
  117. package/lib/typescript/src/utilities.d.ts +2 -0
  118. package/lib/typescript/src/utilities.d.ts.map +1 -1
  119. package/package.json +5 -3
  120. package/src/components/BottomSheet/BottomSheet.js +56 -0
  121. package/src/components/BottomSheet/BottomSheetComponent.js +437 -0
  122. package/src/components/DeckSwiper/DeckSwiper.js +1 -1
  123. package/src/components/DeckSwiper/DeckSwiper.tsx +1 -1
  124. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -1
  125. package/src/components/DeckSwiper/DeckSwiperCard.tsx +0 -1
  126. package/src/components/Picker/Picker.js +16 -4
  127. package/src/components/Picker/Picker.tsx +25 -5
  128. package/src/components/Shadow.js +11 -2
  129. package/src/components/Shadow.tsx +15 -3
  130. package/src/components/TabView/TabView.js +1 -1
  131. package/src/components/TabView/TabView.tsx +1 -1
  132. package/src/index.js +1 -0
  133. package/src/index.tsx +2 -0
  134. package/src/mappings/DeckSwiper.js +7 -3
  135. package/src/mappings/DeckSwiper.ts +7 -3
  136. package/src/mappings/DeckSwiperCard.js +10 -3
  137. package/src/mappings/DeckSwiperCard.ts +10 -6
  138. package/src/mappings/Layout.js +4 -4
  139. package/src/mappings/Layout.ts +4 -4
  140. package/src/mappings/Shadow.js +9 -3
  141. package/src/mappings/Shadow.ts +9 -3
  142. package/src/utilities.js +9 -0
  143. package/src/utilities.ts +19 -0
  144. package/lib/commonjs/mappings/NativeBase/Layout.js +0 -97
  145. package/lib/commonjs/mappings/NativeBase/Layout.js.map +0 -1
  146. package/lib/module/components/BottomSheet/BottomSheet.tsx.tmp +0 -120
  147. package/lib/module/components/BottomSheet/BottomSheetComponent.tsx.tmp +0 -895
  148. package/lib/module/mappings/NativeBase/Layout.js +0 -90
  149. package/lib/module/mappings/NativeBase/Layout.js.map +0 -1
  150. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -107
  151. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +0 -1
  152. package/src/components/BottomSheet/BottomSheet.tsx.tmp +0 -120
  153. package/src/components/BottomSheet/BottomSheetComponent.tsx.tmp +0 -895
  154. package/src/mappings/NativeBase/Layout.js +0 -111
  155. package/src/mappings/NativeBase/Layout.ts +0 -130
  156. /package/{lib/commonjs/components/BottomSheet/BottomSheet.tsx.tmp → src/components/BottomSheet/BottomSheet.tsx} +0 -0
  157. /package/{lib/commonjs/components/BottomSheet/BottomSheetComponent.tsx.tmp → src/components/BottomSheet/BottomSheetComponent.tsx} +0 -0
  158. /package/{lib/commonjs/components/BottomSheet/index.ts.tmp → src/components/BottomSheet/index.js} +0 -0
  159. /package/{lib/module/components/BottomSheet/index.ts.tmp → src/components/BottomSheet/index.ts} +0 -0
@@ -1,90 +0,0 @@
1
- import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections } from "@draftbit/types";
2
- const SHARED_SEED_DATA = {
3
- category: COMPONENT_TYPES.testing /*.layout*/,
4
- packageName: "native-base",
5
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS
6
- };
7
- const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== StylesPanelSections.LayoutFlexItems && item !== StylesPanelSections.LayoutContent);
8
- export const SEED_DATA = [{
9
- name: "Aspect Ratio",
10
- tag: "AspectRatio",
11
- description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
12
- ...SHARED_SEED_DATA,
13
- props: {
14
- ratio: createStaticNumberProp({
15
- label: "Ratio",
16
- description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
17
- defaultValue: 1.33
18
- })
19
- },
20
- stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects]
21
- }, {
22
- name: "Box",
23
- tag: "Box",
24
- description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
25
- ...SHARED_SEED_DATA
26
- }, {
27
- name: "Center",
28
- tag: "Center",
29
- description: "Center aligns its contents to the center within itself",
30
- ...SHARED_SEED_DATA,
31
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
32
- }, {
33
- name: "Circle",
34
- tag: "Circle",
35
- description: "Center aligns its contents to the center within itself with a round border radius",
36
- ...SHARED_SEED_DATA,
37
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
38
- }, {
39
- name: "Column",
40
- tag: "Column",
41
- description: "Column aligns items vertically",
42
- layout: {
43
- flexDirection: "column"
44
- },
45
- ...SHARED_SEED_DATA
46
- }, {
47
- name: "Row",
48
- tag: "Row",
49
- description: "Column aligns items horizontally",
50
- layout: {
51
- flexDirection: "row"
52
- },
53
- ...SHARED_SEED_DATA
54
- }, {
55
- name: "Spacer",
56
- tag: "Spacer",
57
- description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
58
- layout: {
59
- flex: 1
60
- },
61
- ...SHARED_SEED_DATA,
62
- stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Margins]
63
- }, {
64
- name: "Stack",
65
- tag: "Stack",
66
- description: "Stack aligns items vertically or horizontally based on the direction prop",
67
- ...SHARED_SEED_DATA,
68
- props: {
69
- isDisabled: createBoolProp({
70
- label: "Disabled",
71
- description: "If true, the Stack will be disabled"
72
- }),
73
- isInvalid: createBoolProp({
74
- label: "Invalid",
75
- description: "If true, the Stack will be invalid"
76
- })
77
- }
78
- }, {
79
- name: "ZStack",
80
- tag: "ZStack",
81
- description: "ZStack aligns items to the z-axis",
82
- ...SHARED_SEED_DATA,
83
- props: {
84
- reversed: createBoolProp({
85
- label: "Reversed",
86
- description: "Determines whether to reverse the direction of items"
87
- })
88
- }
89
- }];
90
- //# sourceMappingURL=Layout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["COMPONENT_TYPES","createBoolProp","CONTAINER_COMPONENT_STYLES_SECTIONS","createStaticNumberProp","StylesPanelSections","SHARED_SEED_DATA","category","testing","packageName","stylesPanelSections","CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX","filter","item","LayoutFlexItems","LayoutContent","SEED_DATA","name","tag","description","props","ratio","label","defaultValue","Background","Size","Margins","Position","Borders","Effects","layout","flexDirection","flex","LayoutSelectedItem","isDisabled","isInvalid","reversed"],"sourceRoot":"../../../../src","sources":["mappings/NativeBase/Layout.ts"],"mappings":"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"}
@@ -1,107 +0,0 @@
1
- export declare const SEED_DATA: ({
2
- props: {
3
- ratio: {
4
- label: string;
5
- description: string;
6
- formType: string;
7
- propType: string;
8
- group: string;
9
- defaultValue: null;
10
- editable: boolean;
11
- required: boolean;
12
- step: number;
13
- };
14
- isDisabled?: undefined;
15
- isInvalid?: undefined;
16
- reversed?: undefined;
17
- };
18
- stylesPanelSections: string[];
19
- category: string;
20
- packageName: string;
21
- name: string;
22
- tag: string;
23
- description: string;
24
- } | {
25
- category: string;
26
- packageName: string;
27
- stylesPanelSections: string[];
28
- name: string;
29
- tag: string;
30
- description: string;
31
- } | {
32
- category: string;
33
- packageName: string;
34
- stylesPanelSections: string[];
35
- name: string;
36
- tag: string;
37
- description: string;
38
- layout: {
39
- flexDirection: string;
40
- flex?: undefined;
41
- };
42
- } | {
43
- stylesPanelSections: string[];
44
- category: string;
45
- packageName: string;
46
- name: string;
47
- tag: string;
48
- description: string;
49
- layout: {
50
- flex: number;
51
- flexDirection?: undefined;
52
- };
53
- } | {
54
- props: {
55
- isDisabled: {
56
- label: string;
57
- description: string;
58
- formType: string;
59
- propType: string;
60
- defaultValue: boolean;
61
- editable: boolean;
62
- required: boolean;
63
- group: string;
64
- };
65
- isInvalid: {
66
- label: string;
67
- description: string;
68
- formType: string;
69
- propType: string;
70
- defaultValue: boolean;
71
- editable: boolean;
72
- required: boolean;
73
- group: string;
74
- };
75
- ratio?: undefined;
76
- reversed?: undefined;
77
- };
78
- category: string;
79
- packageName: string;
80
- stylesPanelSections: string[];
81
- name: string;
82
- tag: string;
83
- description: string;
84
- } | {
85
- props: {
86
- reversed: {
87
- label: string;
88
- description: string;
89
- formType: string;
90
- propType: string;
91
- defaultValue: boolean;
92
- editable: boolean;
93
- required: boolean;
94
- group: string;
95
- };
96
- ratio?: undefined;
97
- isDisabled?: undefined;
98
- isInvalid?: undefined;
99
- };
100
- category: string;
101
- packageName: string;
102
- stylesPanelSections: string[];
103
- name: string;
104
- tag: string;
105
- description: string;
106
- })[];
107
- //# sourceMappingURL=Layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4GrB,CAAC"}
@@ -1,120 +0,0 @@
1
- import React from "react";
2
- import {
3
- StyleSheet,
4
- View,
5
- StyleProp,
6
- ViewStyle,
7
- ScrollViewProps,
8
- } from "react-native";
9
-
10
- import BottomSheetComponent from "./BottomSheetComponent";
11
- import type { Theme } from "../../styles/DefaultTheme";
12
- import { withTheme } from "../../theming";
13
-
14
- export interface BottomSheetProps extends ScrollViewProps {
15
- snapPoints?: (string | number)[];
16
- initialSnapIndex?: number;
17
- showHandle?: boolean;
18
- handleColor?: string;
19
- topBorderRadius?: number;
20
- borderWidth?: number;
21
- borderColor?: string;
22
- onSettle?: (index: number) => void;
23
- style?: StyleProp<ViewStyle>;
24
- theme: Theme;
25
- }
26
-
27
- const BottomSheet: React.FC<React.PropsWithChildren<BottomSheetProps>> = ({
28
- theme,
29
- snapPoints = ["10%", "50%", "80%"],
30
- initialSnapIndex = 0,
31
- showHandle = true,
32
- handleColor = theme.colors.divider,
33
- topBorderRadius = 20,
34
- borderWidth = 1,
35
- borderColor = theme.colors.divider,
36
- onSettle,
37
- style,
38
- children,
39
- ...rest
40
- }) => {
41
- const backgroundColor =
42
- (style as ViewStyle)?.backgroundColor || theme.colors.background;
43
-
44
- return (
45
- <View style={styles.parentContainer} pointerEvents="box-none">
46
- <BottomSheetComponent
47
- componentType="ScrollView"
48
- snapPoints={snapPoints}
49
- initialSnapIndex={initialSnapIndex}
50
- renderHandle={() => (
51
- <>
52
- {showHandle && (
53
- <View
54
- style={[
55
- styles.handleContainer,
56
- {
57
- backgroundColor,
58
- borderTopLeftRadius: topBorderRadius,
59
- borderTopRightRadius: topBorderRadius,
60
- },
61
- ]}
62
- >
63
- <View
64
- style={[styles.handle, { backgroundColor: handleColor }]}
65
- />
66
- </View>
67
- )}
68
- </>
69
- )}
70
- contentContainerStyle={[styles.contentContainerStyle, style]}
71
- containerStyle={StyleSheet.flatten([
72
- styles.containerStyle,
73
- {
74
- backgroundColor,
75
- borderTopLeftRadius: topBorderRadius,
76
- borderTopRightRadius: topBorderRadius,
77
- borderWidth,
78
- borderColor,
79
- },
80
- ])}
81
- onSettle={onSettle}
82
- {...rest}
83
- >
84
- {children}
85
- </BottomSheetComponent>
86
- </View>
87
- );
88
- };
89
-
90
- const styles = StyleSheet.create({
91
- //Render on top of everything
92
- parentContainer: {
93
- position: "absolute",
94
- left: 0,
95
- right: 0,
96
- top: 0,
97
- bottom: 0,
98
- zIndex: 10,
99
- overflow: "hidden",
100
- },
101
- contentContainerStyle: {
102
- paddingHorizontal: 16,
103
- paddingVertical: 10,
104
- },
105
- containerStyle: {
106
- flex: 1,
107
- overflow: "hidden",
108
- },
109
- handleContainer: {
110
- alignItems: "center",
111
- paddingVertical: 20,
112
- },
113
- handle: {
114
- width: 40,
115
- height: 2,
116
- borderRadius: 4,
117
- },
118
- });
119
-
120
- export default withTheme(BottomSheet);