@draftbit/core 46.12.1-62afc7.2 → 46.12.1
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.
- package/lib/commonjs/components/SwipeableView/SwipeableView.js +5 -3
- package/lib/commonjs/components/SwipeableView/SwipeableView.js.map +1 -1
- package/lib/commonjs/mappings/FlatList.js +0 -3
- package/lib/commonjs/mappings/FlatList.js.map +1 -1
- package/lib/commonjs/mappings/SwipeableView.js +2 -2
- package/lib/commonjs/utilities.js +1 -1
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js +23 -4
- package/lib/module/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/AvatarEdit.js +15 -4
- package/lib/module/components/AvatarEdit.js.map +1 -1
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/Checkbox/context.js.map +1 -1
- package/lib/module/components/CircularProgress.js +27 -8
- package/lib/module/components/CircularProgress.js.map +1 -1
- package/lib/module/components/DeckSwiper/index.js.map +1 -1
- package/lib/module/components/Divider.js +1 -17
- package/lib/module/components/Elevation.js +15 -2
- package/lib/module/components/Elevation.js.map +1 -1
- package/lib/module/components/NumberInput.js +12 -3
- package/lib/module/components/NumberInput.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
- package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -1
- package/lib/module/components/Picker/PickerTypes.js.map +1 -1
- package/lib/module/components/Pressable.js +15 -2
- package/lib/module/components/Pressable.js.map +1 -1
- package/lib/module/components/ProgressCircle.js.map +1 -1
- package/lib/module/components/StepIndicator.js +59 -18
- package/lib/module/components/StepIndicator.js.map +1 -1
- package/lib/module/components/SwipeableView/SwipeableView.js +5 -3
- package/lib/module/components/SwipeableView/SwipeableView.js.map +1 -1
- package/lib/module/mappings/FlatList.js +0 -3
- package/lib/module/mappings/FlatList.js.map +1 -1
- package/lib/module/mappings/SwipeableView.js +2 -2
- package/lib/module/mappings/YoutubePlayer.js.map +1 -1
- package/lib/module/utilities.js +1 -1
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts.map +1 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts +1 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts.map +1 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts +1 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +0 -3
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/utilities.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/SwipeableView/SwipeableView.js +7 -3
- package/src/components/SwipeableView/SwipeableView.tsx +8 -3
- package/src/components/SwipeableView/SwipeableViewButton.tsx +1 -1
- package/src/components/SwipeableView/SwipeableViewSwipeHandler.tsx +1 -1
- package/src/mappings/FlatList.js +0 -3
- package/src/mappings/FlatList.ts +0 -3
- package/src/mappings/SwipeableView.js +2 -2
- package/src/mappings/SwipeableView.ts +2 -2
- package/src/utilities.js +1 -1
- package/src/utilities.ts +1 -1
|
@@ -77,18 +77,23 @@ const SwipeableView: React.FC<React.PropsWithChildren<SwipeableViewProps>> = ({
|
|
|
77
77
|
const { borderStyles, marginStyles } =
|
|
78
78
|
extractBorderAndMarginStyles(viewStyles);
|
|
79
79
|
|
|
80
|
+
const sizeStyles = extractSizeStyles(viewStyles);
|
|
81
|
+
|
|
80
82
|
const parentContainerStyles = StyleSheet.flatten([
|
|
81
83
|
borderStyles,
|
|
82
84
|
marginStyles,
|
|
83
85
|
extractFlexItemStyles(viewStyles),
|
|
84
86
|
extractPositionStyles(viewStyles),
|
|
85
87
|
extractEffectStyles(viewStyles),
|
|
86
|
-
|
|
88
|
+
sizeStyles,
|
|
87
89
|
]);
|
|
88
90
|
|
|
89
91
|
//Remove styles already consumed from viewStyles
|
|
90
92
|
Object.keys(parentContainerStyles).forEach((key) => delete viewStyles[key]);
|
|
91
|
-
const surfaceContainerStyles =
|
|
93
|
+
const surfaceContainerStyles = StyleSheet.flatten([
|
|
94
|
+
viewStyles,
|
|
95
|
+
sizeStyles /* Size styles needs to be readded to surface container due to inconsistencies on web */,
|
|
96
|
+
]);
|
|
92
97
|
|
|
93
98
|
const [componentWidth, setComponentWidth] = React.useState<number | null>(
|
|
94
99
|
null
|
|
@@ -289,7 +294,7 @@ const styles = StyleSheet.create({
|
|
|
289
294
|
surfaceContainer: {
|
|
290
295
|
flexDirection: "row",
|
|
291
296
|
width: "100%",
|
|
292
|
-
|
|
297
|
+
minHeight: 50,
|
|
293
298
|
padding: 10,
|
|
294
299
|
alignItems: "center",
|
|
295
300
|
overflow: "hidden",
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
export interface SwipeableViewButtonProps {
|
|
4
4
|
title: string;
|
|
5
5
|
side: "left" | "right";
|
|
6
|
-
onPress
|
|
6
|
+
onPress?: () => void;
|
|
7
7
|
icon?: string;
|
|
8
8
|
iconSize?: number;
|
|
9
9
|
backgroundColor?: string;
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
export interface SwipeableViewSwipeHandlerProps {
|
|
4
4
|
title: string;
|
|
5
5
|
side: "left" | "right";
|
|
6
|
-
onSwipe
|
|
6
|
+
onSwipe?: () => void;
|
|
7
7
|
icon?: string;
|
|
8
8
|
iconSize?: number;
|
|
9
9
|
backgroundColor?: string;
|
package/src/mappings/FlatList.js
CHANGED
|
@@ -5,9 +5,6 @@ export const SEED_DATA = {
|
|
|
5
5
|
description: "A basic List component",
|
|
6
6
|
category: COMPONENT_TYPES.data,
|
|
7
7
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
|
-
layout: {
|
|
9
|
-
flex: 1,
|
|
10
|
-
},
|
|
11
8
|
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
12
9
|
props: {
|
|
13
10
|
onRefresh: createActionProp(),
|
package/src/mappings/FlatList.ts
CHANGED
|
@@ -15,9 +15,6 @@ export const SEED_DATA = {
|
|
|
15
15
|
description: "A basic List component",
|
|
16
16
|
category: COMPONENT_TYPES.data,
|
|
17
17
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
18
|
-
layout: {
|
|
19
|
-
flex: 1,
|
|
20
|
-
},
|
|
21
18
|
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
22
19
|
props: {
|
|
23
20
|
onRefresh: createActionProp(),
|
|
@@ -67,12 +67,12 @@ export const SEED_DATA = [
|
|
|
67
67
|
disableLeftSwipe: createBoolProp({
|
|
68
68
|
label: "Disable left swipe",
|
|
69
69
|
description: "Whether left swipe is enabled or not",
|
|
70
|
-
defaultValue:
|
|
70
|
+
defaultValue: false,
|
|
71
71
|
}),
|
|
72
72
|
disableRightSwipe: createBoolProp({
|
|
73
73
|
label: "Disable right swipe",
|
|
74
74
|
description: "Whether right swipe is enabled or not",
|
|
75
|
-
defaultValue:
|
|
75
|
+
defaultValue: false,
|
|
76
76
|
}),
|
|
77
77
|
leftOpenValue: createStaticNumberProp({
|
|
78
78
|
label: "Left open value",
|
|
@@ -86,12 +86,12 @@ export const SEED_DATA = [
|
|
|
86
86
|
disableLeftSwipe: createBoolProp({
|
|
87
87
|
label: "Disable left swipe",
|
|
88
88
|
description: "Whether left swipe is enabled or not",
|
|
89
|
-
defaultValue:
|
|
89
|
+
defaultValue: false,
|
|
90
90
|
}),
|
|
91
91
|
disableRightSwipe: createBoolProp({
|
|
92
92
|
label: "Disable right swipe",
|
|
93
93
|
description: "Whether right swipe is enabled or not",
|
|
94
|
-
defaultValue:
|
|
94
|
+
defaultValue: false,
|
|
95
95
|
}),
|
|
96
96
|
leftOpenValue: createStaticNumberProp({
|
|
97
97
|
label: "Left open value",
|
package/src/utilities.js
CHANGED
|
@@ -106,7 +106,7 @@ export function extractEffectStyles(style, additionalEffectStyles) {
|
|
|
106
106
|
]), identity);
|
|
107
107
|
return effectStyles;
|
|
108
108
|
}
|
|
109
|
-
export const sizeStyleNames = ["width", "height"];
|
|
109
|
+
export const sizeStyleNames = ["width", "height", "minWidth", "minHeight"];
|
|
110
110
|
export function extractSizeStyles(style, additionalSizeStyles) {
|
|
111
111
|
const flatStyle = StyleSheet.flatten(style || {});
|
|
112
112
|
const sizeStyles = pickBy(pick(flatStyle, [
|
package/src/utilities.ts
CHANGED
|
@@ -169,7 +169,7 @@ export function extractEffectStyles(
|
|
|
169
169
|
return effectStyles;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
export const sizeStyleNames = ["width", "height"];
|
|
172
|
+
export const sizeStyleNames = ["width", "height", "minWidth", "minHeight"];
|
|
173
173
|
|
|
174
174
|
export function extractSizeStyles(
|
|
175
175
|
style: StyleProp<any>,
|