@draftbit/core 46.11.5-d0abaf.2 → 46.11.6-74496c.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 (54) hide show
  1. package/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -1
  2. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -22
  3. package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
  4. package/lib/commonjs/components/AnimatedCircularProgress.js +2 -11
  5. package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
  6. package/lib/commonjs/components/AvatarEdit.js +4 -15
  7. package/lib/commonjs/components/AvatarEdit.js.map +1 -1
  8. package/lib/commonjs/components/BottomSheet/BottomSheet.js +18 -3
  9. package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +1 -1
  10. package/lib/commonjs/components/Button.js +10 -32
  11. package/lib/commonjs/components/Button.js.map +1 -1
  12. package/lib/commonjs/components/DeckSwiper/index.js.map +1 -1
  13. package/lib/commonjs/components/Markdown.js.map +1 -1
  14. package/lib/commonjs/components/NumberInput.js +3 -11
  15. package/lib/commonjs/components/NumberInput.js.map +1 -1
  16. package/lib/commonjs/components/Picker/PickerComponent.web.js +4 -21
  17. package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -1
  18. package/lib/commonjs/components/Table/TableCommon.js.map +1 -1
  19. package/lib/commonjs/components/Text.js +4 -50
  20. package/lib/commonjs/components/Text.js.map +1 -1
  21. package/lib/commonjs/constants.js +1 -1
  22. package/lib/commonjs/mappings/BottomSheet.js +37 -9
  23. package/lib/commonjs/mappings/BottomSheet.js.map +1 -1
  24. package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -1
  25. package/lib/commonjs/mappings/MapCallout.js.map +1 -1
  26. package/lib/commonjs/mappings/Picker.js.map +1 -1
  27. package/lib/commonjs/mappings/Shadow.js.map +1 -1
  28. package/lib/commonjs/mappings/TabView.js.map +1 -1
  29. package/lib/commonjs/mappings/ToggleButton.js.map +1 -1
  30. package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -1
  31. package/lib/module/components/ActionSheet/index.js.map +1 -1
  32. package/lib/module/components/BottomSheet/BottomSheet.js +18 -3
  33. package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
  34. package/lib/module/components/BottomSheet/index.js.map +1 -1
  35. package/lib/module/components/DatePicker/DatePicker.js +27 -13
  36. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  37. package/lib/module/components/Divider.js +17 -1
  38. package/lib/module/components/Divider.js.map +1 -1
  39. package/lib/module/components/Touchable.js +2 -15
  40. package/lib/module/components/Touchable.js.map +1 -1
  41. package/lib/module/mappings/BottomSheet.js +38 -10
  42. package/lib/module/mappings/BottomSheet.js.map +1 -1
  43. package/lib/module/mappings/IconButton.js.map +1 -1
  44. package/lib/module/mappings/SafeAreaView.js.map +1 -1
  45. package/lib/module/theming.js.map +1 -1
  46. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +6 -1
  47. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  48. package/lib/typescript/src/mappings/BottomSheet.d.ts +48 -4
  49. package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -1
  50. package/package.json +3 -3
  51. package/src/components/BottomSheet/BottomSheet.js +17 -2
  52. package/src/components/BottomSheet/BottomSheet.tsx +32 -4
  53. package/src/mappings/BottomSheet.js +37 -9
  54. package/src/mappings/BottomSheet.ts +43 -8
@@ -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","snapPoints","defaultValue","initialSnapIndex","required","showHandle","handleColor","topBorderRadius","borderWidth","borderColor","showsVerticalScrollIndicator","bounces"],"sourceRoot":"../../../src","sources":["mappings/BottomSheet.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EAAErB,sBAAsB,CAAC;MAClCa,KAAK,EAAE,cAAc;MACrBR,WAAW,EAAE,+BAA+B;MAC5CU,YAAY,EAAE,CAAC;MACfE,QAAQ,EAAE;IACZ,CAAC,CAAC;IACFK,WAAW,EAAEvB,eAAe,CAAC;MAC3Bc,KAAK,EAAE,cAAc;MACrBR,WAAW,EAAE,+BAA+B;MAC5CU,YAAY,EAAE;IAChB,CAAC,CAAC;IACFQ,4BAA4B,EAAE5B,oBAAoB,CAAC;MACjDkB,KAAK,EAAE,gCAAgC;MACvCR,WAAW,EACT,0EAA0E;MAC5EU,YAAY,EAAE;IAChB,CAAC,CAAC;IACFS,OAAO,EAAE7B,oBAAoB,CAAC;MAC5BkB,KAAK,EAAE,QAAQ;MACfR,WAAW,EACT,iKAAiK;MACnKU,YAAY,EAAE;IAChB,CAAC;EACH;AACF,CAAC"}
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,E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yBAAyB;MACtCU,YAAY,EAAE;IAChB,CAAC,CAAC;IACFU,eAAe,EAAE5B,sBAAsB,CAAC;MACtCgB,KAAK,EAAE,mBAAmB;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"}
@@ -1 +1 @@
1
- {"version":3,"names":["COMPONENT_TYPES","GROUPS","createIconProp","createColorProp","createNumberProp","createActionProp","Triggers","StylesPanelSections","createDisabledProp","SEED_DATA","name","tag","category","button","layout","triggers","OnPress","OnLongPress","stylesPanelSections","Margins","Effects","Position","props","onPress","onLongPress","disabled","icon","color","label","group","basic","size","description","defaultValue","min","max","step","precision"],"sourceRoot":"../../../src","sources":["mappings/IconButton.ts"],"mappings":"AAAA,SACEA,eAAe,EACfC,MAAM,EACNC,cAAc,EACdC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,QAAQ,EACRC,mBAAmB,EACnBC,kBAAkB,QACb,iBAAiB;AAExB,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,aAAa;EACnBC,GAAG,EAAE,YAAY;EACjBC,QAAQ,EAAEZ,eAAe,CAACa,MAAM;EAChCC,MAAM,EAAE,CAAC,CAAC;EACVC,QAAQ,EAAE,CAACT,QAAQ,CAACU,OAAO,EAAEV,QAAQ,CAACW,WAAW,CAAC;EAClDC,mBAAmB,EAAE,CACnBX,mBAAmB,CAACY,OAAO,EAC3BZ,mBAAmB,CAACa,OAAO,EAC3Bb,mBAAmB,CAACc,QAAQ,CAC7B;EACDC,KAAK,EAAE;IACLC,OAAO,EAAElB,gBAAgB,EAAE;IAC3BmB,WAAW,EAAEnB,gBAAgB,EAAE;IAC/BoB,QAAQ,EAAEjB,kBAAkB,EAAE;IAC9BkB,IAAI,EAAExB,cAAc,EAAE;IACtByB,KAAK,EAAExB,eAAe,CAAC;MACrByB,KAAK,EAAE,OAAO;MACdC,KAAK,EAAE5B,MAAM,CAAC6B;IAChB,CAAC,CAAC;IACFC,IAAI,EAAE3B,gBAAgB,CAAC;MACrByB,KAAK,EAAE5B,MAAM,CAAC6B,KAAK;MACnBF,KAAK,EAAE,MAAM;MACbI,WAAW,EAAE,+BAA+B;MAC5CC,YAAY,EAAE,EAAE;MAChBC,GAAG,EAAE,EAAE;MACPC,GAAG,EAAE,GAAG;MACRC,IAAI,EAAE,CAAC;MACPC,SAAS,EAAE;IACb,CAAC;EACH;AACF,CAAC"}
1
+ {"version":3,"names":["COMPONENT_TYPES","GROUPS","createIconProp","createColorProp","createNumberProp","createActionProp","Triggers","StylesPanelSections","createDisabledProp","SEED_DATA","name","tag","category","button","layout","triggers","OnPress","OnLongPress","stylesPanelSections","Margins","Effects","Position","props","onPress","onLongPress","disabled","icon","color","label","group","basic","size","description","defaultValue","min","max","step","precision"],"sourceRoot":"../../../src","sources":["mappings/IconButton.js"],"mappings":"AAAA,SAASA,eAAe,EAAEC,MAAM,EAAEC,cAAc,EAAEC,eAAe,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,QAAQ,EAAEC,mBAAmB,EAAEC,kBAAkB,QAAS,iBAAiB;AAClL,OAAO,MAAMC,SAAS,GAAG;EACrBC,IAAI,EAAE,aAAa;EACnBC,GAAG,EAAE,YAAY;EACjBC,QAAQ,EAAEZ,eAAe,CAACa,MAAM;EAChCC,MAAM,EAAE,CAAC,CAAC;EACVC,QAAQ,EAAE,CAACT,QAAQ,CAACU,OAAO,EAAEV,QAAQ,CAACW,WAAW,CAAC;EAClDC,mBAAmB,EAAE,CACjBX,mBAAmB,CAACY,OAAO,EAC3BZ,mBAAmB,CAACa,OAAO,EAC3Bb,mBAAmB,CAACc,QAAQ,CAC/B;EACDC,KAAK,EAAE;IACHC,OAAO,EAAElB,gBAAgB,EAAE;IAC3BmB,WAAW,EAAEnB,gBAAgB,EAAE;IAC/BoB,QAAQ,EAAEjB,kBAAkB,EAAE;IAC9BkB,IAAI,EAAExB,cAAc,EAAE;IACtByB,KAAK,EAAExB,eAAe,CAAC;MACnByB,KAAK,EAAE,OAAO;MACdC,KAAK,EAAE5B,MAAM,CAAC6B;IAClB,CAAC,CAAC;IACFC,IAAI,EAAE3B,gBAAgB,CAAC;MACnByB,KAAK,EAAE5B,MAAM,CAAC6B,KAAK;MACnBF,KAAK,EAAE,MAAM;MACbI,WAAW,EAAE,+BAA+B;MAC5CC,YAAY,EAAE,EAAE;MAChBC,GAAG,EAAE,EAAE;MACPC,GAAG,EAAE,GAAG;MACRC,IAAI,EAAE,CAAC;MACPC,SAAS,EAAE;IACf,CAAC;EACL;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["GROUPS","COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","description","category","deprecated","props","edges","group","basic","label","editable","required","formType","flatArray","propType","STRING","options","defaultValue","mode"],"sourceRoot":"../../../src","sources":["mappings/SafeAreaView.ts"],"mappings":"AAAA,SACEA,MAAM,EACNC,eAAe,EACfC,UAAU,EACVC,UAAU,QACL,iBAAiB;AAExB,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,cAAc;EACpBC,GAAG,EAAE,cAAc;EACnBC,WAAW,EAAE,qCAAqC;EAClDC,QAAQ,EAAEP,eAAe,CAACQ,UAAU;EACpCC,KAAK,EAAE;IACLC,KAAK,EAAE;MACLC,KAAK,EAAEZ,MAAM,CAACa,KAAK;MACnBR,IAAI,EAAE,OAAO;MACbS,KAAK,EAAE,OAAO;MACdP,WAAW,EAAE,6CAA6C;MAC1DQ,QAAQ,EAAE,IAAI;MACdC,QAAQ,EAAE,KAAK;MACfC,QAAQ,EAAEf,UAAU,CAACgB,SAAS;MAC9BC,QAAQ,EAAEhB,UAAU,CAACiB,MAAM;MAC3BC,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC;MAC3CC,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK;IACjD,CAAC;IACDC,IAAI,EAAE;MACJX,KAAK,EAAEZ,MAAM,CAACa,KAAK;MACnBR,IAAI,EAAE,MAAM;MACZS,KAAK,EAAE,MAAM;MACbP,WAAW,EAAE,6BAA6B;MAC1CQ,QAAQ,EAAE,IAAI;MACdC,QAAQ,EAAE,KAAK;MACfK,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;MAC9BJ,QAAQ,EAAEf,UAAU,CAACgB,SAAS;MAC9BC,QAAQ,EAAEhB,UAAU,CAACiB,MAAM;MAC3BE,YAAY,EAAE;IAChB;EACF;AACF,CAAC"}
1
+ {"version":3,"names":["GROUPS","COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","description","category","deprecated","props","edges","group","basic","label","editable","required","formType","flatArray","propType","STRING","options","defaultValue","mode"],"sourceRoot":"../../../src","sources":["mappings/SafeAreaView.js"],"mappings":"AAAA,SAASA,MAAM,EAAEC,eAAe,EAAEC,UAAU,EAAEC,UAAU,QAAS,iBAAiB;AAClF,OAAO,MAAMC,SAAS,GAAG;EACrBC,IAAI,EAAE,cAAc;EACpBC,GAAG,EAAE,cAAc;EACnBC,WAAW,EAAE,qCAAqC;EAClDC,QAAQ,EAAEP,eAAe,CAACQ,UAAU;EACpCC,KAAK,EAAE;IACHC,KAAK,EAAE;MACHC,KAAK,EAAEZ,MAAM,CAACa,KAAK;MACnBR,IAAI,EAAE,OAAO;MACbS,KAAK,EAAE,OAAO;MACdP,WAAW,EAAE,6CAA6C;MAC1DQ,QAAQ,EAAE,IAAI;MACdC,QAAQ,EAAE,KAAK;MACfC,QAAQ,EAAEf,UAAU,CAACgB,SAAS;MAC9BC,QAAQ,EAAEhB,UAAU,CAACiB,MAAM;MAC3BC,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC;MAC3CC,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK;IACnD,CAAC;IACDC,IAAI,EAAE;MACFX,KAAK,EAAEZ,MAAM,CAACa,KAAK;MACnBR,IAAI,EAAE,MAAM;MACZS,KAAK,EAAE,MAAM;MACbP,WAAW,EAAE,6BAA6B;MAC1CQ,QAAQ,EAAE,IAAI;MACdC,QAAQ,EAAE,KAAK;MACfK,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;MAC9BJ,QAAQ,EAAEf,UAAU,CAACgB,SAAS;MAC9BC,QAAQ,EAAEhB,UAAU,CAACiB,MAAM;MAC3BE,YAAY,EAAE;IAClB;EACJ;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["createTheming","DefaultTheme","ThemeProvider","withTheme","useTheme"],"sourceRoot":"../../src","sources":["theming.tsx"],"mappings":"AAAA,SAASA,aAAa,QAAQ,gCAAgC;AAC9D,OAAOC,YAAY,MAAM,uBAAuB;AAGhD,OAAO,MAAM;EAAEC,aAAa;EAAEC,SAAS;EAAEC;AAAS,CAAC,GACjDJ,aAAa,CAAQC,YAAY,CAAC"}
1
+ {"version":3,"names":["createTheming","DefaultTheme","ThemeProvider","withTheme","useTheme"],"sourceRoot":"../../src","sources":["theming.js"],"mappings":"AAAA,SAASA,aAAa,QAAQ,gCAAgC;AAC9D,OAAOC,YAAY,MAAM,uBAAuB;AAChD,OAAO,MAAM;EAAEC,aAAa;EAAEC,SAAS;EAAEC;AAAS,CAAC,GAAGJ,aAAa,CAACC,YAAY,CAAC"}
@@ -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
- snapPoints?: (string | number)[];
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,gBAA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C;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"}
@@ -16,18 +16,29 @@ export declare const SEED_DATA: {
16
16
  defaultValue: null;
17
17
  group: string;
18
18
  };
19
- snapPoints: {
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
- options: never[];
35
+ group: string;
28
36
  defaultValue: null;
37
+ editable: boolean;
38
+ required: boolean;
39
+ step: number;
29
40
  };
30
- initialSnapIndex: {
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":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiErB,CAAC"}
1
+ {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/mappings/BottomSheet.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.11.5-d0abaf.2+d0abaf3",
3
+ "version": "46.11.6-74496c.2+74496ce",
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-d0abaf.2+d0abaf3",
44
+ "@draftbit/types": "^46.11.6-74496c.2+74496ce",
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",
@@ -93,5 +93,5 @@
93
93
  "node_modules/",
94
94
  "lib/"
95
95
  ],
96
- "gitHead": "d0abaf35fdb82d72e043fbe8f5f2c634d26c6a81"
96
+ "gitHead": "74496ce7f63ca59fddea06aaf2ee2f19734f0de0"
97
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 = ["10%", "50%", "80%"], initialSnapIndex = 0, showHandle = true, handleColor = theme.colors.divider, topBorderRadius = 20, borderWidth = 1, borderColor = theme.colors.divider, onSettle, style, children, ...rest }) => {
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
- snapPoints?: (string | number)[];
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 = ["10%", "50%", "80%"],
30
- initialSnapIndex = 0,
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={initialSnapIndex}
75
+ initialSnapIndex={
76
+ initialSnapIndex ?? getSnapIndexFromPosition(initialSnapPosition)
77
+ }
50
78
  renderHandle={() => (
51
79
  <>
52
80
  {showHandle && (
@@ -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
- snapPoints: createArrayProp({
15
- label: "Snap points",
16
- description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
17
- defaultValue: ["10%", "50%", "80%"],
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
- initialSnapIndex: createStaticNumberProp({
20
- label: "Initial snap index",
21
- description: "Index of the snap point to be used as the initial point",
22
- defaultValue: 0,
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
- snapPoints: createArrayProp({
26
- label: "Snap points",
28
+ topSnapPosition: createStaticNumberProp({
29
+ label: "Top snap position",
27
30
  description:
28
- "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
29
- defaultValue: ["10%", "50%", "80%"],
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
- initialSnapIndex: createStaticNumberProp({
32
- label: "Initial snap index",
33
- description: "Index of the snap point to be used as the initial point",
34
- defaultValue: 0,
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
  };