@draftbit/core 46.11.1-c64d65.2 → 46.11.1-ca634b.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 (119) 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/CheckboxGroup.js +16 -3
  8. package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
  9. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +22 -5
  10. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
  11. package/lib/commonjs/components/Checkbox/context.js +1 -1
  12. package/lib/commonjs/components/Checkbox/context.js.map +1 -1
  13. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  14. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +1 -1
  15. package/lib/commonjs/components/DeckSwiper/DeckSwiper.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 +10 -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/DeckSwiper.js +2 -2
  26. package/lib/commonjs/mappings/DeckSwiper.js.map +1 -1
  27. package/lib/commonjs/mappings/Shadow.js +2 -2
  28. package/lib/commonjs/mappings/Shadow.js.map +1 -1
  29. package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
  30. package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  31. package/lib/module/components/Banner.js +4 -23
  32. package/lib/module/components/Banner.js.map +1 -1
  33. package/lib/module/components/BottomSheet/BottomSheet.js +81 -0
  34. package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -0
  35. package/lib/module/components/BottomSheet/BottomSheetComponent.js +430 -0
  36. package/lib/module/components/BottomSheet/BottomSheetComponent.js.map +1 -0
  37. package/{src/components/BottomSheet/index.ts.tmp → lib/module/components/BottomSheet/index.js} +1 -0
  38. package/lib/module/components/BottomSheet/index.js.map +1 -0
  39. package/lib/module/components/Card.js.map +1 -1
  40. package/lib/module/components/CircleImage.js +1 -15
  41. package/lib/module/components/CircleImage.js.map +1 -1
  42. package/lib/module/components/Container.js +4 -16
  43. package/lib/module/components/Container.js.map +1 -1
  44. package/lib/module/components/DatePicker/DatePicker.js +13 -9
  45. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  46. package/lib/module/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  47. package/lib/module/components/DeckSwiper/DeckSwiper.js +1 -1
  48. package/lib/module/components/DeckSwiper/DeckSwiper.js.map +1 -1
  49. package/lib/module/components/Picker/Picker.js +13 -4
  50. package/lib/module/components/Picker/Picker.js.map +1 -1
  51. package/lib/module/components/Picker/PickerComponent.android.js +3 -21
  52. package/lib/module/components/Picker/PickerComponent.android.js.map +1 -1
  53. package/lib/module/components/Portal/PortalHost.js +14 -44
  54. package/lib/module/components/Portal/PortalHost.js.map +1 -1
  55. package/lib/module/components/ProgressCircle.js.map +1 -1
  56. package/lib/module/components/RadioButton/RadioButtonRow.js +5 -23
  57. package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
  58. package/lib/module/components/RadioButton/index.js.map +1 -1
  59. package/lib/module/components/Row.js.map +1 -1
  60. package/lib/module/components/RowBodyIcon.js.map +1 -1
  61. package/lib/module/components/Shadow.js +10 -2
  62. package/lib/module/components/Shadow.js.map +1 -1
  63. package/lib/module/components/Swiper/SwiperItem.js.map +1 -1
  64. package/lib/module/components/TabView/TabView.js +1 -1
  65. package/lib/module/components/TabView/TabView.js.map +1 -1
  66. package/lib/module/components/Touchable.web.js.map +1 -1
  67. package/lib/module/components/YoutubePlayer/YoutubePlayerProps.js.map +1 -1
  68. package/lib/module/index.js +1 -0
  69. package/lib/module/index.js.map +1 -1
  70. package/lib/module/mappings/AccordionItem.js.map +1 -1
  71. package/lib/module/mappings/AudioPlayer.js.map +1 -1
  72. package/lib/module/mappings/CardInline.js.map +1 -1
  73. package/lib/module/mappings/DeckSwiper.js +3 -3
  74. package/lib/module/mappings/DeckSwiper.js.map +1 -1
  75. package/lib/module/mappings/Divider.js.map +1 -1
  76. package/lib/module/mappings/FlashList.js.map +1 -1
  77. package/lib/module/mappings/ProgressIndicator.js.map +1 -1
  78. package/lib/module/mappings/RadioButtonGroup.js.map +1 -1
  79. package/lib/module/mappings/Shadow.js +3 -3
  80. package/lib/module/mappings/Shadow.js.map +1 -1
  81. package/lib/module/styles/shadow.js.map +1 -1
  82. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +20 -0
  83. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  84. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +170 -0
  85. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +1 -0
  86. package/lib/typescript/src/components/BottomSheet/index.d.ts +2 -0
  87. package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
  88. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  89. package/lib/typescript/src/components/Shadow.d.ts.map +1 -1
  90. package/lib/typescript/src/index.d.ts +1 -0
  91. package/lib/typescript/src/index.d.ts.map +1 -1
  92. package/lib/typescript/src/mappings/DeckSwiper.d.ts +1 -1
  93. package/lib/typescript/src/mappings/DeckSwiper.d.ts.map +1 -1
  94. package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -1
  95. package/package.json +5 -3
  96. package/src/components/BottomSheet/BottomSheet.js +56 -0
  97. package/src/components/BottomSheet/BottomSheetComponent.js +437 -0
  98. package/src/components/DeckSwiper/DeckSwiper.js +1 -1
  99. package/src/components/DeckSwiper/DeckSwiper.tsx +1 -1
  100. package/src/components/Picker/Picker.js +16 -4
  101. package/src/components/Picker/Picker.tsx +25 -5
  102. package/src/components/Shadow.js +7 -2
  103. package/src/components/Shadow.tsx +10 -3
  104. package/src/components/TabView/TabView.js +1 -1
  105. package/src/components/TabView/TabView.tsx +1 -1
  106. package/src/index.js +1 -0
  107. package/src/index.tsx +2 -0
  108. package/src/mappings/DeckSwiper.js +7 -3
  109. package/src/mappings/DeckSwiper.ts +7 -3
  110. package/src/mappings/Shadow.js +10 -3
  111. package/src/mappings/Shadow.ts +10 -3
  112. package/lib/module/components/BottomSheet/BottomSheet.tsx.tmp +0 -120
  113. package/lib/module/components/BottomSheet/BottomSheetComponent.tsx.tmp +0 -895
  114. package/src/components/BottomSheet/BottomSheet.tsx.tmp +0 -120
  115. package/src/components/BottomSheet/BottomSheetComponent.tsx.tmp +0 -895
  116. /package/{lib/commonjs/components/BottomSheet/BottomSheet.tsx.tmp → src/components/BottomSheet/BottomSheet.tsx} +0 -0
  117. /package/{lib/commonjs/components/BottomSheet/BottomSheetComponent.tsx.tmp → src/components/BottomSheet/BottomSheetComponent.tsx} +0 -0
  118. /package/{lib/commonjs/components/BottomSheet/index.ts.tmp → src/components/BottomSheet/index.js} +0 -0
  119. /package/{lib/module/components/BottomSheet/index.ts.tmp → src/components/BottomSheet/index.ts} +0 -0
@@ -1,12 +1,16 @@
1
- import { COMPONENT_TYPES, Triggers, createActionProp, createStaticNumberProp, createStaticBoolProp, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, Triggers, createActionProp, createStaticNumberProp, createStaticBoolProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Deck Swiper",
4
4
  tag: "DeckSwiper",
5
5
  description: "Deck swiper container",
6
6
  category: COMPONENT_TYPES.swiper,
7
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Size,
9
+ StylesPanelSections.Margins,
10
+ StylesPanelSections.Effects,
11
+ ],
8
12
  layout: {
9
- width: "100%",
13
+ flex: 1,
10
14
  },
11
15
  triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
12
16
  props: {
@@ -4,7 +4,7 @@ import {
4
4
  createActionProp,
5
5
  createStaticNumberProp,
6
6
  createStaticBoolProp,
7
- BLOCK_STYLES_SECTIONS,
7
+ StylesPanelSections,
8
8
  } from "@draftbit/types";
9
9
 
10
10
  export const SEED_DATA = {
@@ -12,9 +12,13 @@ export const SEED_DATA = {
12
12
  tag: "DeckSwiper",
13
13
  description: "Deck swiper container",
14
14
  category: COMPONENT_TYPES.swiper,
15
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
15
+ stylesPanelSections: [
16
+ StylesPanelSections.Size,
17
+ StylesPanelSections.Margins,
18
+ StylesPanelSections.Effects,
19
+ ],
16
20
  layout: {
17
- width: "100%",
21
+ flex: 1,
18
22
  },
19
23
  triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
20
24
  props: {
@@ -1,10 +1,17 @@
1
- import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, GROUPS, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Shadow",
4
4
  tag: "Shadow",
5
5
  description: "A cross-platform, universal shadow.",
6
6
  category: COMPONENT_TYPES.view,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
7
+ stylesPanelSections: [
8
+ StylesPanelSections.LayoutSelectedItem,
9
+ StylesPanelSections.Size,
10
+ StylesPanelSections.Margins,
11
+ StylesPanelSections.Position,
12
+ StylesPanelSections.Borders,
13
+ StylesPanelSections.Effects,
14
+ ],
8
15
  props: {
9
16
  disabled: createDisabledProp({
10
17
  description: "Disables the shadow.",
@@ -26,7 +33,7 @@ export const SEED_DATA = {
26
33
  paintInside: createStaticBoolProp({
27
34
  label: "Paint Inside",
28
35
  description: "Apply the shadow below/inside the content.",
29
- defaultValue: false,
36
+ defaultValue: true,
30
37
  }),
31
38
  stretch: createStaticBoolProp({
32
39
  label: "Stretch",
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  COMPONENT_TYPES,
3
- CONTAINER_COMPONENT_STYLES_SECTIONS,
4
3
  createColorProp,
5
4
  createStaticNumberProp,
6
5
  createStaticBoolProp,
7
6
  createDisabledProp,
8
7
  GROUPS,
8
+ StylesPanelSections,
9
9
  } from "@draftbit/types";
10
10
 
11
11
  export const SEED_DATA = {
@@ -13,7 +13,14 @@ export const SEED_DATA = {
13
13
  tag: "Shadow",
14
14
  description: "A cross-platform, universal shadow.",
15
15
  category: COMPONENT_TYPES.view,
16
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
16
+ stylesPanelSections: [
17
+ StylesPanelSections.LayoutSelectedItem,
18
+ StylesPanelSections.Size,
19
+ StylesPanelSections.Margins,
20
+ StylesPanelSections.Position,
21
+ StylesPanelSections.Borders,
22
+ StylesPanelSections.Effects,
23
+ ],
17
24
  props: {
18
25
  disabled: createDisabledProp({
19
26
  description: "Disables the shadow.",
@@ -35,7 +42,7 @@ export const SEED_DATA = {
35
42
  paintInside: createStaticBoolProp({
36
43
  label: "Paint Inside",
37
44
  description: "Apply the shadow below/inside the content.",
38
- defaultValue: false,
45
+ defaultValue: true,
39
46
  }),
40
47
  stretch: createStaticBoolProp({
41
48
  label: "Stretch",
@@ -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);