@draftbit/core 46.11.5-8cf2da.2 → 46.11.5-ca2f78.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.
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +18 -3
- package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +3 -16
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -22
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
- package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/commonjs/index.js +0 -19
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/BottomSheet.js +37 -9
- package/lib/commonjs/mappings/BottomSheet.js.map +1 -1
- package/lib/commonjs/mappings/NumberInput.js.map +1 -1
- package/lib/commonjs/utilities.js +2 -27
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +18 -3
- package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/BottomSheet.js +38 -10
- package/lib/module/mappings/BottomSheet.js.map +1 -1
- package/lib/module/utilities.js +0 -18
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +6 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/BottomSheet.d.ts +48 -4
- package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/utilities.d.ts +0 -6
- package/lib/typescript/src/utilities.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/components/BottomSheet/BottomSheet.js +17 -2
- package/src/components/BottomSheet/BottomSheet.tsx +32 -4
- package/src/index.js +0 -1
- package/src/index.tsx +0 -6
- package/src/mappings/BottomSheet.js +37 -9
- package/src/mappings/BottomSheet.ts +43 -8
- package/src/utilities.js +0 -41
- package/src/utilities.ts +0 -71
- package/lib/commonjs/components/SwipeableView/SwipeableView.js +0 -155
- package/lib/commonjs/components/SwipeableView/SwipeableView.js.map +0 -1
- package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js +0 -13
- package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js.map +0 -1
- package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js +0 -13
- package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js.map +0 -1
- package/lib/commonjs/components/SwipeableView/index.js +0 -28
- package/lib/commonjs/components/SwipeableView/index.js.map +0 -1
- package/lib/commonjs/mappings/SwipeableView.js +0 -182
- package/lib/commonjs/mappings/SwipeableView.js.map +0 -1
- package/lib/module/components/SwipeableView/SwipeableView.js +0 -147
- package/lib/module/components/SwipeableView/SwipeableView.js.map +0 -1
- package/lib/module/components/SwipeableView/SwipeableViewButton.js +0 -6
- package/lib/module/components/SwipeableView/SwipeableViewButton.js.map +0 -1
- package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js +0 -6
- package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js.map +0 -1
- package/lib/module/components/SwipeableView/index.js +0 -4
- package/lib/module/components/SwipeableView/index.js.map +0 -1
- package/lib/module/mappings/SwipeableView.js +0 -175
- package/lib/module/mappings/SwipeableView.js.map +0 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts +0 -29
- package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts.map +0 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts +0 -13
- package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts.map +0 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts +0 -13
- package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts.map +0 -1
- package/lib/typescript/src/components/SwipeableView/index.d.ts +0 -4
- package/lib/typescript/src/components/SwipeableView/index.d.ts.map +0 -1
- package/lib/typescript/src/mappings/SwipeableView.d.ts +0 -371
- package/lib/typescript/src/mappings/SwipeableView.d.ts.map +0 -1
- package/src/components/SwipeableView/SwipeableView.js +0 -117
- package/src/components/SwipeableView/SwipeableView.tsx +0 -299
- package/src/components/SwipeableView/SwipeableViewButton.js +0 -5
- package/src/components/SwipeableView/SwipeableViewButton.tsx +0 -18
- package/src/components/SwipeableView/SwipeableViewSwipeHandler.js +0 -5
- package/src/components/SwipeableView/SwipeableViewSwipeHandler.tsx +0 -20
- package/src/components/SwipeableView/index.js +0 -3
- package/src/components/SwipeableView/index.tsx +0 -3
- package/src/mappings/SwipeableView.js +0 -181
- package/src/mappings/SwipeableView.ts +0 -210
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp, GROUPS, createTextEnumProp, FORM_TYPES } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Bottom Sheet",
|
|
4
4
|
tag: "BottomSheet",
|
|
@@ -11,16 +11,32 @@ export const SEED_DATA = {
|
|
|
11
11
|
label: "On settle",
|
|
12
12
|
description: "Action to execute when sheet settles on a snap point"
|
|
13
13
|
}),
|
|
14
|
-
|
|
15
|
-
label: "
|
|
16
|
-
description: "
|
|
17
|
-
defaultValue:
|
|
14
|
+
topSnapPosition: createStaticNumberProp({
|
|
15
|
+
label: "Top snap position",
|
|
16
|
+
description: "Top most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
17
|
+
defaultValue: "10%",
|
|
18
|
+
required: false,
|
|
19
|
+
formType: FORM_TYPES.numeric
|
|
18
20
|
}),
|
|
19
|
-
|
|
20
|
-
label: "
|
|
21
|
-
description: "
|
|
22
|
-
defaultValue:
|
|
23
|
-
required: false
|
|
21
|
+
middleSnapPosition: createStaticNumberProp({
|
|
22
|
+
label: "Middle snap position",
|
|
23
|
+
description: "Middle postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
24
|
+
defaultValue: "50%",
|
|
25
|
+
required: false,
|
|
26
|
+
formType: FORM_TYPES.numeric
|
|
27
|
+
}),
|
|
28
|
+
bottomSnapPosition: createStaticNumberProp({
|
|
29
|
+
label: "Bottom snap position",
|
|
30
|
+
description: "Bottom most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
31
|
+
defaultValue: "80%",
|
|
32
|
+
required: false,
|
|
33
|
+
formType: FORM_TYPES.numeric
|
|
34
|
+
}),
|
|
35
|
+
initialSnapPosition: createTextEnumProp({
|
|
36
|
+
label: "Initial snap position",
|
|
37
|
+
description: "Initial snap position that bottom sheet will snap to",
|
|
38
|
+
options: ["top", "middle", "bottom"],
|
|
39
|
+
defaultValue: "bottom"
|
|
24
40
|
}),
|
|
25
41
|
showHandle: createStaticBoolProp({
|
|
26
42
|
label: "Show handle",
|
|
@@ -58,6 +74,18 @@ export const SEED_DATA = {
|
|
|
58
74
|
label: "Bounce",
|
|
59
75
|
description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
|
|
60
76
|
defaultValue: true
|
|
77
|
+
}),
|
|
78
|
+
snapPoints: createArrayProp({
|
|
79
|
+
label: "Custom Snap points",
|
|
80
|
+
description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to. Accepts numbers and percentages (minimum 2 snap points). Overrides snap position props",
|
|
81
|
+
defaultValue: null
|
|
82
|
+
}),
|
|
83
|
+
initialSnapIndex: createStaticNumberProp({
|
|
84
|
+
label: "Initial snap index",
|
|
85
|
+
description: "Index of the snap point to be used as the initial point. Overrides initial snap position",
|
|
86
|
+
defaultValue: null,
|
|
87
|
+
required: false,
|
|
88
|
+
group: GROUPS.advanced
|
|
61
89
|
})
|
|
62
90
|
}
|
|
63
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["COMPONENT_TYPES","createStaticBoolProp","CONTAINER_COMPONENT_STYLES_SECTIONS","Triggers","createActionProp","createColorProp","createStaticNumberProp","createArrayProp","SEED_DATA","name","tag","description","category","bottomsheet","stylesPanelSections","triggers","OnSettle","props","onSettle","label","
|
|
1
|
+
{"version":3,"names":["COMPONENT_TYPES","createStaticBoolProp","CONTAINER_COMPONENT_STYLES_SECTIONS","Triggers","createActionProp","createColorProp","createStaticNumberProp","createArrayProp","GROUPS","createTextEnumProp","FORM_TYPES","SEED_DATA","name","tag","description","category","bottomsheet","stylesPanelSections","triggers","OnSettle","props","onSettle","label","topSnapPosition","defaultValue","required","formType","numeric","middleSnapPosition","bottomSnapPosition","initialSnapPosition","options","showHandle","handleColor","topBorderRadius","borderWidth","borderColor","showsVerticalScrollIndicator","bounces","snapPoints","initialSnapIndex","group","advanced"],"sourceRoot":"../../../src","sources":["mappings/BottomSheet.ts"],"mappings":"AAAA,SACEA,eAAe,EACfC,oBAAoB,EACpBC,mCAAmC,EACnCC,QAAQ,EACRC,gBAAgB,EAChBC,eAAe,EACfC,sBAAsB,EACtBC,eAAe,EACfC,MAAM,EACNC,kBAAkB,EAClBC,UAAU,QACL,iBAAiB;AAExB,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,cAAc;EACpBC,GAAG,EAAE,aAAa;EAClBC,WAAW,EACT,wFAAwF;EAC1FC,QAAQ,EAAEf,eAAe,CAACgB,WAAW;EACrCC,mBAAmB,EAAEf,mCAAmC;EACxDgB,QAAQ,EAAE,CAACf,QAAQ,CAACgB,QAA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BAAmB;MAC1BR,WAAW,EAAE,8BAA8B;MAC3CU,YAAY,EAAE,EAAE;MAChBC,QAAQ,EAAE;IACZ,CAAC,CAAC;IACFU,WAAW,EAAE7B,sBAAsB,CAAC;MAClCgB,KAAK,EAAE,cAAc;MACrBR,WAAW,EAAE,+BAA+B;MAC5CU,YAAY,EAAE,CAAC;MACfC,QAAQ,EAAE;IACZ,CAAC,CAAC;IACFW,WAAW,EAAE/B,eAAe,CAAC;MAC3BiB,KAAK,EAAE,cAAc;MACrBR,WAAW,EAAE,+BAA+B;MAC5CU,YAAY,EAAE;IAChB,CAAC,CAAC;IACFa,4BAA4B,EAAEpC,oBAAoB,CAAC;MACjDqB,KAAK,EAAE,gCAAgC;MACvCR,WAAW,EACT,0EAA0E;MAC5EU,YAAY,EAAE;IAChB,CAAC,CAAC;IACFc,OAAO,EAAErC,oBAAoB,CAAC;MAC5BqB,KAAK,EAAE,QAAQ;MACfR,WAAW,EACT,iKAAiK;MACnKU,YAAY,EAAE;IAChB,CAAC,CAAC;IACFe,UAAU,EAAEhC,eAAe,CAAC;MAC1Be,KAAK,EAAE,oBAAoB;MAC3BR,WAAW,EACT,4LAA4L;MAC9LU,YAAY,EAAE;IAChB,CAAC,CAAC;IACFgB,gBAAgB,EAAElC,sBAAsB,CAAC;MACvCgB,KAAK,EAAE,oBAAoB;MAC3BR,WAAW,EACT,0FAA0F;MAC5FU,YAAY,EAAE,IAAI;MAClBC,QAAQ,EAAE,KAAK;MACfgB,KAAK,EAAEjC,MAAM,CAACkC;IAChB,CAAC;EACH;AACF,CAAC"}
|
package/lib/module/utilities.js
CHANGED
|
@@ -44,24 +44,6 @@ export function extractBorderAndMarginStyles(style, additionalBorderStyles, addi
|
|
|
44
44
|
marginStyles
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
export const flexItemStyleNames = ["alignSelf", "flexBasis", "flexShrink", "flexGrow", "flex"];
|
|
48
|
-
export function extractFlexItemStyles(style, additionalFlexItemStyles) {
|
|
49
|
-
const flatStyle = StyleSheet.flatten(style || {});
|
|
50
|
-
const flexItemStyles = pickBy(pick(flatStyle, [...flexItemStyleNames, ...(additionalFlexItemStyles ? additionalFlexItemStyles : [])]), identity);
|
|
51
|
-
return flexItemStyles;
|
|
52
|
-
}
|
|
53
|
-
export const positionStyleNames = ["position", "left", "right", "top", "bottom", "zIndex", "overflow"];
|
|
54
|
-
export function extractPositionStyles(style, additionalPositionStyles) {
|
|
55
|
-
const flatStyle = StyleSheet.flatten(style || {});
|
|
56
|
-
const positionStyles = pickBy(pick(flatStyle, [...positionStyleNames, ...(additionalPositionStyles ? additionalPositionStyles : [])]), identity);
|
|
57
|
-
return positionStyles;
|
|
58
|
-
}
|
|
59
|
-
export const effectsStyleNames = ["opacity", "elevation"];
|
|
60
|
-
export function extractEffectStyles(style, additionalEffectStyles) {
|
|
61
|
-
const flatStyle = StyleSheet.flatten(style || {});
|
|
62
|
-
const effectStyles = pickBy(pick(flatStyle, [...effectsStyleNames, ...(additionalEffectStyles ? additionalEffectStyles : [])]), identity);
|
|
63
|
-
return effectStyles;
|
|
64
|
-
}
|
|
65
47
|
export const sizeStyleNames = ["width", "height"];
|
|
66
48
|
export function extractSizeStyles(style, additionalSizeStyles) {
|
|
67
49
|
const flatStyle = StyleSheet.flatten(style || {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","isString","isNumber","pick","pickBy","identity","extractStyles","style","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","viewStyles","flatten","textStyles","borderStyleNames","marginStyleNames","extractBorderAndMarginStyles","additionalBorderStyles","additionalMarginStyles","flatStyle","borderStyles","marginStyles","
|
|
1
|
+
{"version":3,"names":["StyleSheet","isString","isNumber","pick","pickBy","identity","extractStyles","style","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","viewStyles","flatten","textStyles","borderStyleNames","marginStyleNames","extractBorderAndMarginStyles","additionalBorderStyles","additionalMarginStyles","flatStyle","borderStyles","marginStyles","sizeStyleNames","extractSizeStyles","additionalSizeStyles","sizeStyles","applyStyles","baseStyles","stylesToApply","flattenedStyles","key","value","Object","entries","getValueForRadioButton","String","Error"],"sourceRoot":"../../src","sources":["utilities.ts"],"mappings":"AAAA,SAASA,UAAU,QAA8B,cAAc;AAC/D,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAEnE,OAAO,SAASC,aAAa,CAACC,KAAqB,EAAE;EACnD,MAAM;IACJC,KAAK;IACLC,UAAU;IACVC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC,aAAa;IACbC,aAAa;IACbC,SAAS;IACTC,kBAAkB;IAClBC,mBAAmB;IACnBC,mBAAmB;IACnB,GAAGC;EACL,CAAC,GAAGnB,UAAU,CAACoB,OAAO,CAACb,KAAK,IAAI,CAAC,CAAC,CAAC;EAEnC,MAAMc,UAAqB,GAAG;IAC5Bb,KAAK;IACLC,UAAU;IACVC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC,aAAa;IACbC,aAAa;IACbC,SAAS;IACTC,kBAAkB;IAClBC,mBAAmB;IACnBC;EACF,CAAC;EAED,OAAO;IAAEC,UAAU;IAAEE;EAAW,CAAC;AACnC;AAEA,OAAO,MAAMC,gBAAgB,GAAG,CAC9B,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,CACd;AAED,OAAO,MAA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AI,CAACA,aAAa,EAAE;IAClB;EACF;EAEA,MAAMC,eAAe,GAAGrC,UAAU,CAACoB,OAAO,CAACe,UAAU,CAAC;EAEtD,KAAK,MAAM,CAACG,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACL,aAAa,CAAC,EAAE;IACxD,IAAIG,KAAK,IAAI,IAAI,EAAE;MACjBF,eAAe,CAACC,GAAG,CAAC,GAAGC,KAAK;IAC9B;EACF;EAEA,OAAOF,eAAe;AACxB;AAEA,OAAO,SAASK,sBAAsB,CAACH,KAAsB,EAAE;EAC7D,IAAItC,QAAQ,CAACsC,KAAK,CAAC,EAAE;IACnB,OAAOA,KAAK;EACd,CAAC,MAAM,IAAIrC,QAAQ,CAACqC,KAAK,CAAC,EAAE;IAC1B,OAAOI,MAAM,CAACJ,KAAK,CAAC;EACtB,CAAC,MAAM;IACL,MAAM,IAAIK,KAAK,0BAAmBL,KAAK,EAAG;EAC5C;AACF"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyleProp, ViewStyle, ScrollViewProps } from "react-native";
|
|
3
3
|
import type { Theme } from "../../styles/DefaultTheme";
|
|
4
|
+
declare type SnapPosition = "top" | "middle" | "bottom";
|
|
4
5
|
export interface BottomSheetProps extends ScrollViewProps {
|
|
5
|
-
|
|
6
|
+
topSnapPosition?: string | number;
|
|
7
|
+
middleSnapPosition?: string | number;
|
|
8
|
+
bottomSnapPosition?: string | number;
|
|
9
|
+
snapPoints: (string | number)[];
|
|
6
10
|
initialSnapIndex?: number;
|
|
11
|
+
initialSnapPosition: SnapPosition;
|
|
7
12
|
showHandle?: boolean;
|
|
8
13
|
handleColor?: string;
|
|
9
14
|
topBorderRadius?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,SAAS,EACT,SAAS,EACT,eAAe,EAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGvD,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,SAAS,EACT,SAAS,EACT,eAAe,EAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGvD,aAAK,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAChD,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,UAAU,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,YAAY,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd;;;;AAsHD,wBAAsC"}
|
|
@@ -38,7 +38,6 @@ export { default as Markdown } from "./components/Markdown";
|
|
|
38
38
|
export { BottomSheet } from "./components/BottomSheet";
|
|
39
39
|
export { YoutubePlayer } from "./components/YoutubePlayer";
|
|
40
40
|
export { Table, TableRow, TableCell } from "./components/Table";
|
|
41
|
-
export { SwipeableView, SwipeableViewButton, SwipeableViewSwipeHandler, } from "./components/SwipeableView";
|
|
42
41
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
43
42
|
export { default as Picker } from "./components/Picker/Picker";
|
|
44
43
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,M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C;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -16,18 +16,29 @@ export declare const SEED_DATA: {
|
|
|
16
16
|
defaultValue: null;
|
|
17
17
|
group: string;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
group: string;
|
|
19
|
+
topSnapPosition: {
|
|
21
20
|
label: string;
|
|
22
21
|
description: string;
|
|
22
|
+
formType: string;
|
|
23
|
+
propType: string;
|
|
24
|
+
group: string;
|
|
25
|
+
defaultValue: null;
|
|
23
26
|
editable: boolean;
|
|
24
27
|
required: boolean;
|
|
28
|
+
step: number;
|
|
29
|
+
};
|
|
30
|
+
middleSnapPosition: {
|
|
31
|
+
label: string;
|
|
32
|
+
description: string;
|
|
25
33
|
formType: string;
|
|
26
34
|
propType: string;
|
|
27
|
-
|
|
35
|
+
group: string;
|
|
28
36
|
defaultValue: null;
|
|
37
|
+
editable: boolean;
|
|
38
|
+
required: boolean;
|
|
39
|
+
step: number;
|
|
29
40
|
};
|
|
30
|
-
|
|
41
|
+
bottomSnapPosition: {
|
|
31
42
|
label: string;
|
|
32
43
|
description: string;
|
|
33
44
|
formType: string;
|
|
@@ -38,6 +49,17 @@ export declare const SEED_DATA: {
|
|
|
38
49
|
required: boolean;
|
|
39
50
|
step: number;
|
|
40
51
|
};
|
|
52
|
+
initialSnapPosition: {
|
|
53
|
+
group: string;
|
|
54
|
+
label: string;
|
|
55
|
+
description: string;
|
|
56
|
+
editable: boolean;
|
|
57
|
+
required: boolean;
|
|
58
|
+
formType: string;
|
|
59
|
+
propType: string;
|
|
60
|
+
defaultValue: null;
|
|
61
|
+
options: never[];
|
|
62
|
+
};
|
|
41
63
|
showHandle: {
|
|
42
64
|
label: string;
|
|
43
65
|
description: string;
|
|
@@ -110,6 +132,28 @@ export declare const SEED_DATA: {
|
|
|
110
132
|
required: boolean;
|
|
111
133
|
group: string;
|
|
112
134
|
};
|
|
135
|
+
snapPoints: {
|
|
136
|
+
group: string;
|
|
137
|
+
label: string;
|
|
138
|
+
description: string;
|
|
139
|
+
editable: boolean;
|
|
140
|
+
required: boolean;
|
|
141
|
+
formType: string;
|
|
142
|
+
propType: string;
|
|
143
|
+
options: never[];
|
|
144
|
+
defaultValue: null;
|
|
145
|
+
};
|
|
146
|
+
initialSnapIndex: {
|
|
147
|
+
label: string;
|
|
148
|
+
description: string;
|
|
149
|
+
formType: string;
|
|
150
|
+
propType: string;
|
|
151
|
+
group: string;
|
|
152
|
+
defaultValue: null;
|
|
153
|
+
editable: boolean;
|
|
154
|
+
required: boolean;
|
|
155
|
+
step: number;
|
|
156
|
+
};
|
|
113
157
|
};
|
|
114
158
|
};
|
|
115
159
|
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/mappings/BottomSheet.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/mappings/BottomSheet.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGrB,CAAC"}
|
|
@@ -10,12 +10,6 @@ export declare function extractBorderAndMarginStyles(style: StyleProp<any>, addi
|
|
|
10
10
|
borderStyles: import("lodash").Dictionary<any>;
|
|
11
11
|
marginStyles: import("lodash").Dictionary<any>;
|
|
12
12
|
};
|
|
13
|
-
export declare const flexItemStyleNames: string[];
|
|
14
|
-
export declare function extractFlexItemStyles(style: StyleProp<any>, additionalFlexItemStyles?: string[]): import("lodash").Dictionary<any>;
|
|
15
|
-
export declare const positionStyleNames: string[];
|
|
16
|
-
export declare function extractPositionStyles(style: StyleProp<any>, additionalPositionStyles?: string[]): import("lodash").Dictionary<any>;
|
|
17
|
-
export declare const effectsStyleNames: string[];
|
|
18
|
-
export declare function extractEffectStyles(style: StyleProp<any>, additionalEffectStyles?: string[]): import("lodash").Dictionary<any>;
|
|
19
13
|
export declare const sizeStyleNames: string[];
|
|
20
14
|
export declare function extractSizeStyles(style: StyleProp<any>, additionalSizeStyles?: string[]): import("lodash").Dictionary<any>;
|
|
21
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../src/utilities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhE,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC;;;EA+BlD;AAED,eAAO,MAAM,gBAAgB,UAwB5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EACrB,sBAAsB,CAAC,EAAE,MAAM,EAAE,EACjC,sBAAsB,CAAC,EAAE,MAAM,EAAE;;;EAqBlC;AAED,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../src/utilities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhE,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC;;;EA+BlD;AAED,eAAO,MAAM,gBAAgB,UAwB5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EACrB,sBAAsB,CAAC,EAAE,MAAM,EAAE,EACjC,sBAAsB,CAAC,EAAE,MAAM,EAAE;;;EAqBlC;AAED,eAAO,MAAM,cAAc,UAAsB,CAAC;AAElD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EACrB,oBAAoB,CAAC,EAAE,MAAM,EAAE,oCAahC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EACjC,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS,OAe1C;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,UAQ5D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.11.5-
|
|
3
|
+
"version": "46.11.5-ca2f78.2+ca2f78c",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^46.11.5-
|
|
44
|
+
"@draftbit/types": "^46.11.5-ca2f78.2+ca2f78c",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"react-native-reanimated": "~2.9.1",
|
|
62
62
|
"react-native-shadow-2": "^7.0.6",
|
|
63
63
|
"react-native-svg": "12.3.0",
|
|
64
|
-
"react-native-swipe-list-view": "^3.2.9",
|
|
65
64
|
"react-native-tab-view": "^3.4.0",
|
|
66
65
|
"react-native-typography": "^1.4.1",
|
|
67
66
|
"react-native-web-swiper": "^2.2.3",
|
|
@@ -94,5 +93,5 @@
|
|
|
94
93
|
"node_modules/",
|
|
95
94
|
"lib/"
|
|
96
95
|
],
|
|
97
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "ca2f78c952f538e3358bbc970cd4d1d455e1147b"
|
|
98
97
|
}
|
|
@@ -2,10 +2,25 @@ import React from "react";
|
|
|
2
2
|
import { StyleSheet, View, } from "react-native";
|
|
3
3
|
import BottomSheetComponent from "./BottomSheetComponent";
|
|
4
4
|
import { withTheme } from "../../theming";
|
|
5
|
-
const BottomSheet = ({ theme, snapPoints =
|
|
5
|
+
const BottomSheet = ({ theme, snapPoints: snapPointsProp, topSnapPosition = "10%", middleSnapPosition = "50%", bottomSnapPosition = "80%", initialSnapIndex, initialSnapPosition = "bottom", showHandle = true, handleColor = theme.colors.divider, topBorderRadius = 20, borderWidth = 1, borderColor = theme.colors.divider, onSettle, style, children, ...rest }) => {
|
|
6
6
|
const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
|
|
7
|
+
const snapPoints = snapPointsProp || [
|
|
8
|
+
topSnapPosition,
|
|
9
|
+
middleSnapPosition,
|
|
10
|
+
bottomSnapPosition,
|
|
11
|
+
];
|
|
12
|
+
const getSnapIndexFromPosition = (position) => {
|
|
13
|
+
switch (position) {
|
|
14
|
+
case "top":
|
|
15
|
+
return 0;
|
|
16
|
+
case "middle":
|
|
17
|
+
return 1;
|
|
18
|
+
case "bottom":
|
|
19
|
+
return 2;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
7
22
|
return (React.createElement(View, { style: styles.parentContainer, pointerEvents: "box-none" },
|
|
8
|
-
React.createElement(BottomSheetComponent, { componentType: "ScrollView", snapPoints: snapPoints, initialSnapIndex: initialSnapIndex, renderHandle: () => (React.createElement(React.Fragment, null, showHandle && (React.createElement(View, { style: [
|
|
23
|
+
React.createElement(BottomSheetComponent, { componentType: "ScrollView", snapPoints: snapPoints, initialSnapIndex: initialSnapIndex !== null && initialSnapIndex !== void 0 ? initialSnapIndex : getSnapIndexFromPosition(initialSnapPosition), renderHandle: () => (React.createElement(React.Fragment, null, showHandle && (React.createElement(View, { style: [
|
|
9
24
|
styles.handleContainer,
|
|
10
25
|
{
|
|
11
26
|
backgroundColor,
|
|
@@ -11,9 +11,14 @@ import BottomSheetComponent from "./BottomSheetComponent";
|
|
|
11
11
|
import type { Theme } from "../../styles/DefaultTheme";
|
|
12
12
|
import { withTheme } from "../../theming";
|
|
13
13
|
|
|
14
|
+
type SnapPosition = "top" | "middle" | "bottom";
|
|
14
15
|
export interface BottomSheetProps extends ScrollViewProps {
|
|
15
|
-
|
|
16
|
+
topSnapPosition?: string | number;
|
|
17
|
+
middleSnapPosition?: string | number;
|
|
18
|
+
bottomSnapPosition?: string | number;
|
|
19
|
+
snapPoints: (string | number)[];
|
|
16
20
|
initialSnapIndex?: number;
|
|
21
|
+
initialSnapPosition: SnapPosition;
|
|
17
22
|
showHandle?: boolean;
|
|
18
23
|
handleColor?: string;
|
|
19
24
|
topBorderRadius?: number;
|
|
@@ -26,8 +31,12 @@ export interface BottomSheetProps extends ScrollViewProps {
|
|
|
26
31
|
|
|
27
32
|
const BottomSheet: React.FC<React.PropsWithChildren<BottomSheetProps>> = ({
|
|
28
33
|
theme,
|
|
29
|
-
snapPoints
|
|
30
|
-
|
|
34
|
+
snapPoints: snapPointsProp,
|
|
35
|
+
topSnapPosition = "10%",
|
|
36
|
+
middleSnapPosition = "50%",
|
|
37
|
+
bottomSnapPosition = "80%",
|
|
38
|
+
initialSnapIndex,
|
|
39
|
+
initialSnapPosition = "bottom",
|
|
31
40
|
showHandle = true,
|
|
32
41
|
handleColor = theme.colors.divider,
|
|
33
42
|
topBorderRadius = 20,
|
|
@@ -41,12 +50,31 @@ const BottomSheet: React.FC<React.PropsWithChildren<BottomSheetProps>> = ({
|
|
|
41
50
|
const backgroundColor =
|
|
42
51
|
(style as ViewStyle)?.backgroundColor || theme.colors.background;
|
|
43
52
|
|
|
53
|
+
const snapPoints = snapPointsProp || [
|
|
54
|
+
topSnapPosition,
|
|
55
|
+
middleSnapPosition,
|
|
56
|
+
bottomSnapPosition,
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const getSnapIndexFromPosition = (position: SnapPosition) => {
|
|
60
|
+
switch (position) {
|
|
61
|
+
case "top":
|
|
62
|
+
return 0;
|
|
63
|
+
case "middle":
|
|
64
|
+
return 1;
|
|
65
|
+
case "bottom":
|
|
66
|
+
return 2;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
44
70
|
return (
|
|
45
71
|
<View style={styles.parentContainer} pointerEvents="box-none">
|
|
46
72
|
<BottomSheetComponent
|
|
47
73
|
componentType="ScrollView"
|
|
48
74
|
snapPoints={snapPoints}
|
|
49
|
-
initialSnapIndex={
|
|
75
|
+
initialSnapIndex={
|
|
76
|
+
initialSnapIndex ?? getSnapIndexFromPosition(initialSnapPosition)
|
|
77
|
+
}
|
|
50
78
|
renderHandle={() => (
|
|
51
79
|
<>
|
|
52
80
|
{showHandle && (
|
package/src/index.js
CHANGED
|
@@ -38,7 +38,6 @@ export { default as Markdown } from "./components/Markdown";
|
|
|
38
38
|
export { BottomSheet } from "./components/BottomSheet";
|
|
39
39
|
export { YoutubePlayer } from "./components/YoutubePlayer";
|
|
40
40
|
export { Table, TableRow, TableCell } from "./components/Table";
|
|
41
|
-
export { SwipeableView, SwipeableViewButton, SwipeableViewSwipeHandler, } from "./components/SwipeableView";
|
|
42
41
|
/* Deprecated: Fix or Delete! */
|
|
43
42
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
44
43
|
export { default as Picker } from "./components/Picker/Picker";
|
package/src/index.tsx
CHANGED
|
@@ -64,12 +64,6 @@ export { YoutubePlayer } from "./components/YoutubePlayer";
|
|
|
64
64
|
|
|
65
65
|
export { Table, TableRow, TableCell } from "./components/Table";
|
|
66
66
|
|
|
67
|
-
export {
|
|
68
|
-
SwipeableView,
|
|
69
|
-
SwipeableViewButton,
|
|
70
|
-
SwipeableViewSwipeHandler,
|
|
71
|
-
} from "./components/SwipeableView";
|
|
72
|
-
|
|
73
67
|
/* Deprecated: Fix or Delete! */
|
|
74
68
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
75
69
|
export { default as Picker } from "./components/Picker/Picker";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp, } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp, createStaticNumberProp, createArrayProp, GROUPS, createTextEnumProp, FORM_TYPES, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Bottom Sheet",
|
|
4
4
|
tag: "BottomSheet",
|
|
@@ -11,16 +11,32 @@ export const SEED_DATA = {
|
|
|
11
11
|
label: "On settle",
|
|
12
12
|
description: "Action to execute when sheet settles on a snap point",
|
|
13
13
|
}),
|
|
14
|
-
|
|
15
|
-
label: "
|
|
16
|
-
description: "
|
|
17
|
-
defaultValue:
|
|
14
|
+
topSnapPosition: createStaticNumberProp({
|
|
15
|
+
label: "Top snap position",
|
|
16
|
+
description: "Top most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
17
|
+
defaultValue: "10%",
|
|
18
|
+
required: false,
|
|
19
|
+
formType: FORM_TYPES.numeric,
|
|
18
20
|
}),
|
|
19
|
-
|
|
20
|
-
label: "
|
|
21
|
-
description: "
|
|
22
|
-
defaultValue:
|
|
21
|
+
middleSnapPosition: createStaticNumberProp({
|
|
22
|
+
label: "Middle snap position",
|
|
23
|
+
description: "Middle postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
24
|
+
defaultValue: "50%",
|
|
23
25
|
required: false,
|
|
26
|
+
formType: FORM_TYPES.numeric,
|
|
27
|
+
}),
|
|
28
|
+
bottomSnapPosition: createStaticNumberProp({
|
|
29
|
+
label: "Bottom snap position",
|
|
30
|
+
description: "Bottom most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
31
|
+
defaultValue: "80%",
|
|
32
|
+
required: false,
|
|
33
|
+
formType: FORM_TYPES.numeric,
|
|
34
|
+
}),
|
|
35
|
+
initialSnapPosition: createTextEnumProp({
|
|
36
|
+
label: "Initial snap position",
|
|
37
|
+
description: "Initial snap position that bottom sheet will snap to",
|
|
38
|
+
options: ["top", "middle", "bottom"],
|
|
39
|
+
defaultValue: "bottom",
|
|
24
40
|
}),
|
|
25
41
|
showHandle: createStaticBoolProp({
|
|
26
42
|
label: "Show handle",
|
|
@@ -59,5 +75,17 @@ export const SEED_DATA = {
|
|
|
59
75
|
description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
|
|
60
76
|
defaultValue: true,
|
|
61
77
|
}),
|
|
78
|
+
snapPoints: createArrayProp({
|
|
79
|
+
label: "Custom Snap points",
|
|
80
|
+
description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to. Accepts numbers and percentages (minimum 2 snap points). Overrides snap position props",
|
|
81
|
+
defaultValue: null,
|
|
82
|
+
}),
|
|
83
|
+
initialSnapIndex: createStaticNumberProp({
|
|
84
|
+
label: "Initial snap index",
|
|
85
|
+
description: "Index of the snap point to be used as the initial point. Overrides initial snap position",
|
|
86
|
+
defaultValue: null,
|
|
87
|
+
required: false,
|
|
88
|
+
group: GROUPS.advanced,
|
|
89
|
+
}),
|
|
62
90
|
},
|
|
63
91
|
};
|
|
@@ -7,6 +7,9 @@ import {
|
|
|
7
7
|
createColorProp,
|
|
8
8
|
createStaticNumberProp,
|
|
9
9
|
createArrayProp,
|
|
10
|
+
GROUPS,
|
|
11
|
+
createTextEnumProp,
|
|
12
|
+
FORM_TYPES,
|
|
10
13
|
} from "@draftbit/types";
|
|
11
14
|
|
|
12
15
|
export const SEED_DATA = {
|
|
@@ -22,17 +25,35 @@ export const SEED_DATA = {
|
|
|
22
25
|
label: "On settle",
|
|
23
26
|
description: "Action to execute when sheet settles on a snap point",
|
|
24
27
|
}),
|
|
25
|
-
|
|
26
|
-
label: "
|
|
28
|
+
topSnapPosition: createStaticNumberProp({
|
|
29
|
+
label: "Top snap position",
|
|
27
30
|
description:
|
|
28
|
-
"
|
|
29
|
-
defaultValue:
|
|
31
|
+
"Top most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
32
|
+
defaultValue: "10%",
|
|
33
|
+
required: false,
|
|
34
|
+
formType: FORM_TYPES.numeric,
|
|
30
35
|
}),
|
|
31
|
-
|
|
32
|
-
label: "
|
|
33
|
-
description:
|
|
34
|
-
|
|
36
|
+
middleSnapPosition: createStaticNumberProp({
|
|
37
|
+
label: "Middle snap position",
|
|
38
|
+
description:
|
|
39
|
+
"Middle postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
40
|
+
defaultValue: "50%",
|
|
35
41
|
required: false,
|
|
42
|
+
formType: FORM_TYPES.numeric,
|
|
43
|
+
}),
|
|
44
|
+
bottomSnapPosition: createStaticNumberProp({
|
|
45
|
+
label: "Bottom snap position",
|
|
46
|
+
description:
|
|
47
|
+
"Bottom most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
48
|
+
defaultValue: "80%",
|
|
49
|
+
required: false,
|
|
50
|
+
formType: FORM_TYPES.numeric,
|
|
51
|
+
}),
|
|
52
|
+
initialSnapPosition: createTextEnumProp({
|
|
53
|
+
label: "Initial snap position",
|
|
54
|
+
description: "Initial snap position that bottom sheet will snap to",
|
|
55
|
+
options: ["top", "middle", "bottom"],
|
|
56
|
+
defaultValue: "bottom",
|
|
36
57
|
}),
|
|
37
58
|
showHandle: createStaticBoolProp({
|
|
38
59
|
label: "Show handle",
|
|
@@ -73,5 +94,19 @@ export const SEED_DATA = {
|
|
|
73
94
|
"When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
|
|
74
95
|
defaultValue: true,
|
|
75
96
|
}),
|
|
97
|
+
snapPoints: createArrayProp({
|
|
98
|
+
label: "Custom Snap points",
|
|
99
|
+
description:
|
|
100
|
+
"An array of numerical values (that represent distance from the top) where bottom sheet can snap to. Accepts numbers and percentages (minimum 2 snap points). Overrides snap position props",
|
|
101
|
+
defaultValue: null,
|
|
102
|
+
}),
|
|
103
|
+
initialSnapIndex: createStaticNumberProp({
|
|
104
|
+
label: "Initial snap index",
|
|
105
|
+
description:
|
|
106
|
+
"Index of the snap point to be used as the initial point. Overrides initial snap position",
|
|
107
|
+
defaultValue: null,
|
|
108
|
+
required: false,
|
|
109
|
+
group: GROUPS.advanced,
|
|
110
|
+
}),
|
|
76
111
|
},
|
|
77
112
|
};
|
package/src/utilities.js
CHANGED
|
@@ -65,47 +65,6 @@ export function extractBorderAndMarginStyles(style, additionalBorderStyles, addi
|
|
|
65
65
|
]), identity);
|
|
66
66
|
return { borderStyles, marginStyles };
|
|
67
67
|
}
|
|
68
|
-
export const flexItemStyleNames = [
|
|
69
|
-
"alignSelf",
|
|
70
|
-
"flexBasis",
|
|
71
|
-
"flexShrink",
|
|
72
|
-
"flexGrow",
|
|
73
|
-
"flex",
|
|
74
|
-
];
|
|
75
|
-
export function extractFlexItemStyles(style, additionalFlexItemStyles) {
|
|
76
|
-
const flatStyle = StyleSheet.flatten(style || {});
|
|
77
|
-
const flexItemStyles = pickBy(pick(flatStyle, [
|
|
78
|
-
...flexItemStyleNames,
|
|
79
|
-
...(additionalFlexItemStyles ? additionalFlexItemStyles : []),
|
|
80
|
-
]), identity);
|
|
81
|
-
return flexItemStyles;
|
|
82
|
-
}
|
|
83
|
-
export const positionStyleNames = [
|
|
84
|
-
"position",
|
|
85
|
-
"left",
|
|
86
|
-
"right",
|
|
87
|
-
"top",
|
|
88
|
-
"bottom",
|
|
89
|
-
"zIndex",
|
|
90
|
-
"overflow",
|
|
91
|
-
];
|
|
92
|
-
export function extractPositionStyles(style, additionalPositionStyles) {
|
|
93
|
-
const flatStyle = StyleSheet.flatten(style || {});
|
|
94
|
-
const positionStyles = pickBy(pick(flatStyle, [
|
|
95
|
-
...positionStyleNames,
|
|
96
|
-
...(additionalPositionStyles ? additionalPositionStyles : []),
|
|
97
|
-
]), identity);
|
|
98
|
-
return positionStyles;
|
|
99
|
-
}
|
|
100
|
-
export const effectsStyleNames = ["opacity", "elevation"];
|
|
101
|
-
export function extractEffectStyles(style, additionalEffectStyles) {
|
|
102
|
-
const flatStyle = StyleSheet.flatten(style || {});
|
|
103
|
-
const effectStyles = pickBy(pick(flatStyle, [
|
|
104
|
-
...effectsStyleNames,
|
|
105
|
-
...(additionalEffectStyles ? additionalEffectStyles : []),
|
|
106
|
-
]), identity);
|
|
107
|
-
return effectStyles;
|
|
108
|
-
}
|
|
109
68
|
export const sizeStyleNames = ["width", "height"];
|
|
110
69
|
export function extractSizeStyles(style, additionalSizeStyles) {
|
|
111
70
|
const flatStyle = StyleSheet.flatten(style || {});
|