@draftbit/core 43.2.5-e5eabd.3 → 43.2.6-de1703.0

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 (80) hide show
  1. package/lib/commonjs/components/Accordion/index.js.map +1 -1
  2. package/lib/commonjs/components/Checkbox/Checkbox.js +13 -2
  3. package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
  4. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
  5. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
  6. package/lib/commonjs/components/DeprecatedFAB.js +4 -20
  7. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  8. package/lib/commonjs/components/Divider.js +13 -3
  9. package/lib/commonjs/components/Divider.js.map +1 -1
  10. package/lib/commonjs/components/Elevation.js +14 -3
  11. package/lib/commonjs/components/Elevation.js.map +1 -1
  12. package/lib/commonjs/components/Text.js +1 -1
  13. package/lib/commonjs/components/Text.js.map +1 -1
  14. package/lib/commonjs/index.js +0 -16
  15. package/lib/commonjs/index.js.map +1 -1
  16. package/lib/commonjs/mappings/AvatarEdit.js.map +1 -1
  17. package/lib/commonjs/mappings/Card.js +1 -2
  18. package/lib/commonjs/mappings/Card.js.map +1 -1
  19. package/lib/commonjs/mappings/CardInline.js.map +1 -1
  20. package/lib/commonjs/mappings/Checkbox.js +1 -1
  21. package/lib/commonjs/mappings/Checkbox.js.map +1 -1
  22. package/lib/commonjs/mappings/CustomCode.js.map +1 -1
  23. package/lib/commonjs/mappings/FlatList.js.map +1 -1
  24. package/lib/commonjs/mappings/RadioButton.js.map +1 -1
  25. package/lib/commonjs/mappings/SwiperItem.js.map +1 -1
  26. package/lib/module/components/CardInline.js.map +1 -1
  27. package/lib/module/components/Checkbox/Checkbox.js +13 -2
  28. package/lib/module/components/Checkbox/Checkbox.js.map +1 -1
  29. package/lib/module/components/Picker/PickerComponent.web.js +17 -3
  30. package/lib/module/components/Picker/PickerComponent.web.js.map +1 -1
  31. package/lib/module/components/Text.js +1 -1
  32. package/lib/module/components/Text.js.map +1 -1
  33. package/lib/module/index.js +0 -2
  34. package/lib/module/index.js.map +1 -1
  35. package/lib/module/mappings/Card.js +1 -2
  36. package/lib/module/mappings/Card.js.map +1 -1
  37. package/lib/module/mappings/Checkbox.js +1 -1
  38. package/lib/module/mappings/Checkbox.js.map +1 -1
  39. package/lib/module/mappings/Modal.js.map +1 -1
  40. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -0
  41. package/lib/typescript/src/index.d.ts +0 -2
  42. package/package.json +3 -4
  43. package/src/components/Checkbox/Checkbox.js +10 -3
  44. package/src/components/Checkbox/Checkbox.tsx +15 -2
  45. package/src/components/Text.js +1 -1
  46. package/src/components/Text.tsx +1 -1
  47. package/src/index.js +0 -2
  48. package/src/index.tsx +0 -2
  49. package/src/mappings/Card.js +1 -1
  50. package/src/mappings/Card.ts +1 -1
  51. package/src/mappings/Checkbox.js +1 -1
  52. package/src/mappings/Checkbox.ts +1 -1
  53. package/lib/commonjs/components/KeyboardAwareScrollView.js +0 -26
  54. package/lib/commonjs/components/KeyboardAwareScrollView.js.map +0 -1
  55. package/lib/commonjs/components/ToggleButton.js +0 -86
  56. package/lib/commonjs/components/ToggleButton.js.map +0 -1
  57. package/lib/commonjs/mappings/KeyboardAwareScrollView.js +0 -48
  58. package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +0 -1
  59. package/lib/commonjs/mappings/ToggleButton.js +0 -60
  60. package/lib/commonjs/mappings/ToggleButton.js.map +0 -1
  61. package/lib/module/components/KeyboardAwareScrollView.js +0 -13
  62. package/lib/module/components/KeyboardAwareScrollView.js.map +0 -1
  63. package/lib/module/components/ToggleButton.js +0 -67
  64. package/lib/module/components/ToggleButton.js.map +0 -1
  65. package/lib/module/mappings/KeyboardAwareScrollView.js +0 -39
  66. package/lib/module/mappings/KeyboardAwareScrollView.js.map +0 -1
  67. package/lib/module/mappings/ToggleButton.js +0 -51
  68. package/lib/module/mappings/ToggleButton.js.map +0 -1
  69. package/lib/typescript/src/components/KeyboardAwareScrollView.d.ts +0 -13
  70. package/lib/typescript/src/components/ToggleButton.d.ts +0 -24
  71. package/lib/typescript/src/mappings/KeyboardAwareScrollView.d.ts +0 -82
  72. package/lib/typescript/src/mappings/ToggleButton.d.ts +0 -124
  73. package/src/components/KeyboardAwareScrollView.js +0 -4
  74. package/src/components/KeyboardAwareScrollView.tsx +0 -19
  75. package/src/components/ToggleButton.js +0 -39
  76. package/src/components/ToggleButton.tsx +0 -94
  77. package/src/mappings/KeyboardAwareScrollView.js +0 -38
  78. package/src/mappings/KeyboardAwareScrollView.ts +0 -48
  79. package/src/mappings/ToggleButton.js +0 -50
  80. package/src/mappings/ToggleButton.ts +0 -62
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var React = _interopRequireWildcard(require("react"));
9
-
10
- var _reactNativeKeyboardAwareScrollView = require("react-native-keyboard-aware-scroll-view");
11
-
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
-
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
-
16
- const KeyboardAware = _ref => {
17
- let {
18
- children,
19
- ...props
20
- } = _ref;
21
- return /*#__PURE__*/React.createElement(_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView, props, children);
22
- };
23
-
24
- var _default = KeyboardAware;
25
- exports.default = _default;
26
- //# sourceMappingURL=KeyboardAwareScrollView.js.mapew.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["KeyboardAwareScrollView.tsx"],"names":["KeyboardAware","children","props"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAaA,MAAMA,aAAa,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAAD;AAAA,sBACpB,oBAAC,2DAAD,EAA6BA,KAA7B,EAAqCD,QAArC,CADoB;AAAA,CAAtB;;eAIeD,a","sourcesContent":["import * as React from \"react\";\nimport { KeyboardAwareScrollView } from \"react-native-keyboard-aware-scroll-view\";\n\ntype Props = {\n children: React.ReactNode;\n viewIsInsideTabBar: boolean;\n enableAutomaticScroll?: boolean;\n extraHeight?: number;\n extraScrollHeight?: number;\n enableResetScrollToCoords?: boolean;\n keyboardOpeningTime?: number;\n enableOnAndroid?: boolean;\n};\n\nconst KeyboardAware = ({ children, ...props }: Props) => (\n <KeyboardAwareScrollView {...props}>{children}</KeyboardAwareScrollView>\n);\n\nexport default KeyboardAware;\n"]}
@@ -1,86 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var React = _interopRequireWildcard(require("react"));
9
-
10
- var _theming = require("../theming");
11
-
12
- var _reactNative = require("react-native");
13
-
14
- var _IconButton = _interopRequireDefault(require("./IconButton"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
-
24
- const ToggleButton = _ref => {
25
- let {
26
- Icon,
27
- icon,
28
- toggled = false,
29
- onPress = () => {},
30
- defaultValue,
31
- disabled = false,
32
- color = "primary",
33
- colorSecondary = "surface",
34
- borderColor = "divider",
35
- iconSize = 25,
36
- width = 50,
37
- height = 50,
38
- theme: {
39
- colors
40
- },
41
- style,
42
- ...rest
43
- } = _ref;
44
- const [internalValue, setInternalValue] = React.useState(toggled || defaultValue || false);
45
- React.useEffect(() => {
46
- if (toggled != null) {
47
- setInternalValue(toggled);
48
- }
49
- }, [toggled]);
50
- React.useEffect(() => {
51
- if (defaultValue != null) {
52
- setInternalValue(defaultValue);
53
- }
54
- }, [defaultValue]);
55
-
56
- const handlePress = () => {
57
- setInternalValue(!internalValue);
58
- onPress(!internalValue);
59
- };
60
-
61
- return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
62
- Icon: Icon,
63
- icon: icon,
64
- size: iconSize,
65
- color: internalValue ? colors[color] : colors[colorSecondary],
66
- onPress: handlePress,
67
- disabled: disabled,
68
- style: [styles.mainContainer, {
69
- width,
70
- height,
71
- backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
72
- borderColor: colors[borderColor]
73
- }, style]
74
- }, rest));
75
- };
76
-
77
- const styles = _reactNative.StyleSheet.create({
78
- mainContainer: {
79
- borderWidth: 1
80
- }
81
- });
82
-
83
- var _default = (0, _theming.withTheme)(ToggleButton);
84
-
85
- exports.default = _default;
86
- //# sourceMappingURL=ToggleButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["ToggleButton.tsx"],"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;AAoBA,MAAMA,YAA6B,GAAG,QAgBhC;AAAA,MAhBiC;AACrCC,IAAAA,IADqC;AAErCC,IAAAA,IAFqC;AAGrCC,IAAAA,OAAO,GAAG,KAH2B;AAIrCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CAJmB;AAKrCC,IAAAA,YALqC;AAMrCC,IAAAA,QAAQ,GAAG,KAN0B;AAOrCC,IAAAA,KAAK,GAAG,SAP6B;AAQrCC,IAAAA,cAAc,GAAG,SARoB;AASrCC,IAAAA,WAAW,GAAG,SATuB;AAUrCC,IAAAA,QAAQ,GAAG,EAV0B;AAWrCC,IAAAA,KAAK,GAAG,EAX6B;AAYrCC,IAAAA,MAAM,GAAG,EAZ4B;AAarCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAb8B;AAcrCC,IAAAA,KAdqC;AAerC,OAAGC;AAfkC,GAgBjC;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CACxCjB,OAAO,IAAIE,YAAX,IAA2B,KADa,CAA1C;AAIAc,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIlB,OAAO,IAAI,IAAf,EAAqB;AACnBe,MAAAA,gBAAgB,CAACf,OAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,OAAD,CAJH;AAMAgB,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,QAAIhB,YAAY,IAAI,IAApB,EAA0B;AACxBa,MAAAA,gBAAgB,CAACb,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMiB,WAAW,GAAG,MAAM;AACxBJ,IAAAA,gBAAgB,CAAC,CAACD,aAAF,CAAhB;AACAb,IAAAA,OAAO,CAAC,CAACa,aAAF,CAAP;AACD,GAHD;;AAKA,sBACE,oBAAC,mBAAD;AACE,IAAA,IAAI,EAAEhB,IADR;AAEE,IAAA,IAAI,EAAEC,IAFR;AAGE,IAAA,IAAI,EAAEQ,QAHR;AAIE,IAAA,KAAK,EAAEO,aAAa,GAAGH,MAAM,CAACP,KAAD,CAAT,GAAmBO,MAAM,CAACN,cAAD,CAJ/C;AAKE,IAAA,OAAO,EAAEc,WALX;AAME,IAAA,QAAQ,EAAEhB,QANZ;AAOE,IAAA,KAAK,EAAE,CACLiB,MAAM,CAACC,aADF,EAEL;AACEb,MAAAA,KADF;AAEEC,MAAAA,MAFF;AAGEa,MAAAA,eAAe,EAAER,aAAa,GAC1BH,MAAM,CAACN,cAAD,CADoB,GAE1BM,MAAM,CAACP,KAAD,CALZ;AAMEE,MAAAA,WAAW,EAAEK,MAAM,CAACL,WAAD;AANrB,KAFK,EAULM,KAVK;AAPT,KAmBMC,IAnBN,EADF;AAuBD,CA7DD;;AA+DA,MAAMO,MAAM,GAAGG,wBAAWC,MAAX,CAAkB;AAC/BH,EAAAA,aAAa,EAAE;AACbI,IAAAA,WAAW,EAAE;AADA;AADgB,CAAlB,CAAf;;eAMe,wBAAU5B,YAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<Props> = ({\n Icon,\n icon,\n toggled = false,\n onPress = () => {},\n defaultValue,\n disabled = false,\n color = \"primary\",\n colorSecondary = \"surface\",\n borderColor = \"divider\",\n iconSize = 25,\n width = 50,\n height = 50,\n theme: { colors },\n style,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<boolean>(\n toggled || defaultValue || false\n );\n\n React.useEffect(() => {\n if (toggled != null) {\n setInternalValue(toggled);\n }\n }, [toggled]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handlePress = () => {\n setInternalValue(!internalValue);\n onPress(!internalValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={icon}\n size={iconSize}\n color={internalValue ? colors[color] : colors[colorSecondary]}\n onPress={handlePress}\n disabled={disabled}\n style={[\n styles.mainContainer,\n {\n width,\n height,\n backgroundColor: internalValue\n ? colors[colorSecondary]\n : colors[color],\n borderColor: colors[borderColor],\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n mainContainer: {\n borderWidth: 1,\n },\n});\n\nexport default withTheme(ToggleButton);\n"]}
@@ -1,48 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA = {
11
- name: "Keyboard Aware Scroll View",
12
- tag: "KeyboardAwareScrollView",
13
- description: "View that moves pushes the content when virtual keyboard is open.",
14
- category: _types.COMPONENT_TYPES.layout,
15
- layout: {},
16
- props: {
17
- viewIsInsideTabBar: (0, _types.createStaticBoolProp)({
18
- label: "View Is Inside TabBar",
19
- description: "Adds an extra offset that represents the TabBarIOS height."
20
- }),
21
- enableAutomaticScroll: (0, _types.createStaticBoolProp)({
22
- label: "Enable Automatic Scroll",
23
- description: "When focus in TextInput will scroll the position, default is enabled"
24
- }),
25
- extraHeight: (0, _types.createStaticNumberProp)({
26
- label: "Extra Height",
27
- description: "Adds an extra offset when focusing the TextInputs"
28
- }),
29
- extraScrollHeight: (0, _types.createStaticNumberProp)({
30
- label: "Extra Scroll Height",
31
- description: "Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard"
32
- }),
33
- enableResetScrollToCoords: (0, _types.createStaticBoolProp)({
34
- label: "Enable Reset Scroll To Coordinates",
35
- description: "Lets the user enable or disable automatic resetScrollToCoords"
36
- }),
37
- keyboardOpeningTime: (0, _types.createStaticNumberProp)({
38
- label: "Keyboard Opening Time",
39
- description: "Sets the delay time before scrolling to new position, default is 250"
40
- }),
41
- enableOnAndroid: (0, _types.createStaticBoolProp)({
42
- label: "Enable On Android",
43
- description: "Enable Android Support"
44
- })
45
- }
46
- };
47
- exports.SEED_DATA = SEED_DATA;
48
- //# sourceMappingURL=KeyboardAwareScrollView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid"],"mappings":";;;;;;;AAAA;;AAMO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,EAAAA,WAAW,EACT,mEAJqB;AAKvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MALH;AAMvBA,EAAAA,MAAM,EAAE,EANe;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAE,iCAAqB;AACvCC,MAAAA,KAAK,EAAE,uBADgC;AAEvCN,MAAAA,WAAW,EAAE;AAF0B,KAArB,CADf;AAKLO,IAAAA,qBAAqB,EAAE,iCAAqB;AAC1CD,MAAAA,KAAK,EAAE,yBADmC;AAE1CN,MAAAA,WAAW,EACT;AAHwC,KAArB,CALlB;AAULQ,IAAAA,WAAW,EAAE,mCAAuB;AAClCF,MAAAA,KAAK,EAAE,cAD2B;AAElCN,MAAAA,WAAW,EAAE;AAFqB,KAAvB,CAVR;AAcLS,IAAAA,iBAAiB,EAAE,mCAAuB;AACxCH,MAAAA,KAAK,EAAE,qBADiC;AAExCN,MAAAA,WAAW,EACT;AAHsC,KAAvB,CAdd;AAmBLU,IAAAA,yBAAyB,EAAE,iCAAqB;AAC9CJ,MAAAA,KAAK,EAAE,oCADuC;AAE9CN,MAAAA,WAAW,EACT;AAH4C,KAArB,CAnBtB;AAwBLW,IAAAA,mBAAmB,EAAE,mCAAuB;AAC1CL,MAAAA,KAAK,EAAE,uBADmC;AAE1CN,MAAAA,WAAW,EACT;AAHwC,KAAvB,CAxBhB;AA6BLY,IAAAA,eAAe,EAAE,iCAAqB;AACpCN,MAAAA,KAAK,EAAE,mBAD6B;AAEpCN,MAAAA,WAAW,EAAE;AAFuB,KAArB;AA7BZ;AAPgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticBoolProp,\n createStaticNumberProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Keyboard Aware Scroll View\",\n tag: \"KeyboardAwareScrollView\",\n description:\n \"View that moves pushes the content when virtual keyboard is open.\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n viewIsInsideTabBar: createStaticBoolProp({\n label: \"View Is Inside TabBar\",\n description: \"Adds an extra offset that represents the TabBarIOS height.\",\n }),\n enableAutomaticScroll: createStaticBoolProp({\n label: \"Enable Automatic Scroll\",\n description:\n \"When focus in TextInput will scroll the position, default is enabled\",\n }),\n extraHeight: createStaticNumberProp({\n label: \"Extra Height\",\n description: \"Adds an extra offset when focusing the TextInputs\",\n }),\n extraScrollHeight: createStaticNumberProp({\n label: \"Extra Scroll Height\",\n description:\n \"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard\",\n }),\n enableResetScrollToCoords: createStaticBoolProp({\n label: \"Enable Reset Scroll To Coordinates\",\n description:\n \"Lets the user enable or disable automatic resetScrollToCoords\",\n }),\n keyboardOpeningTime: createStaticNumberProp({\n label: \"Keyboard Opening Time\",\n description:\n \"Sets the delay time before scrolling to new position, default is 250\",\n }),\n enableOnAndroid: createStaticBoolProp({\n label: \"Enable On Android\",\n description: \"Enable Android Support\",\n }),\n },\n};\n"]}
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA = {
11
- name: "Toggle Button",
12
- tag: "ToggleButton",
13
- category: _types.COMPONENT_TYPES.button,
14
- layout: {},
15
- triggers: [_types.Triggers.OnPress],
16
- props: {
17
- onPress: (0, _types.createActionProp)(),
18
- icon: (0, _types.createIconProp)({
19
- required: true
20
- }),
21
- iconSize: (0, _types.createIconSizeProp)(),
22
- fieldName: (0, _types.createFieldNameProp)({
23
- defaultValue: false,
24
- valuePropName: "toggled"
25
- }),
26
- disabled: (0, _types.createBoolProp)({
27
- label: "Disabled",
28
- description: "Whether the button should be disabled",
29
- group: _types.GROUPS.basic
30
- }),
31
- color: (0, _types.createColorProp)({
32
- group: _types.GROUPS.basic
33
- }),
34
- colorSecondary: (0, _types.createColorProp)({
35
- label: "Secondary Color",
36
- group: _types.GROUPS.basic
37
- }),
38
- borderColor: (0, _types.createColorProp)({
39
- label: "Border Color",
40
- group: _types.GROUPS.basic
41
- }),
42
- width: (0, _types.createStaticNumberProp)({
43
- label: "Width",
44
- description: "Width",
45
- defaultValue: 50
46
- }),
47
- height: (0, _types.createStaticNumberProp)({
48
- label: "Height",
49
- description: "Height",
50
- defaultValue: 50
51
- }),
52
- toggled: (0, _types.createBoolProp)({
53
- label: "Toggled",
54
- description: "Whether the button should show the toggled state",
55
- defaultValue: false
56
- })
57
- }
58
- };
59
- exports.SEED_DATA = SEED_DATA;
60
- //# sourceMappingURL=ToggleButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["ToggleButton.ts"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","button","layout","triggers","Triggers","OnPress","props","onPress","icon","required","iconSize","fieldName","defaultValue","valuePropName","disabled","label","description","group","GROUPS","basic","color","colorSecondary","borderColor","width","height","toggled"],"mappings":";;;;;;;AAAA;;AAaO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,eADiB;AAEvBC,EAAAA,GAAG,EAAE,cAFkB;AAGvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAHH;AAIvBC,EAAAA,MAAM,EAAE,EAJe;AAKvBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CALa;AAMvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,8BADJ;AAELC,IAAAA,IAAI,EAAE,2BAAe;AACnBC,MAAAA,QAAQ,EAAE;AADS,KAAf,CAFD;AAKLC,IAAAA,QAAQ,EAAE,gCALL;AAMLC,IAAAA,SAAS,EAAE,gCAAoB;AAC7BC,MAAAA,YAAY,EAAE,KADe;AAE7BC,MAAAA,aAAa,EAAE;AAFc,KAApB,CANN;AAULC,IAAAA,QAAQ,EAAE,2BAAe;AACvBC,MAAAA,KAAK,EAAE,UADgB;AAEvBC,MAAAA,WAAW,EAAE,uCAFU;AAGvBC,MAAAA,KAAK,EAAEC,cAAOC;AAHS,KAAf,CAVL;AAeLC,IAAAA,KAAK,EAAE,4BAAgB;AACrBH,MAAAA,KAAK,EAAEC,cAAOC;AADO,KAAhB,CAfF;AAkBLE,IAAAA,cAAc,EAAE,4BAAgB;AAC9BN,MAAAA,KAAK,EAAE,iBADuB;AAE9BE,MAAAA,KAAK,EAAEC,cAAOC;AAFgB,KAAhB,CAlBX;AAsBLG,IAAAA,WAAW,EAAE,4BAAgB;AAC3BP,MAAAA,KAAK,EAAE,cADoB;AAE3BE,MAAAA,KAAK,EAAEC,cAAOC;AAFa,KAAhB,CAtBR;AA0BLI,IAAAA,KAAK,EAAE,mCAAuB;AAC5BR,MAAAA,KAAK,EAAE,OADqB;AAE5BC,MAAAA,WAAW,EAAE,OAFe;AAG5BJ,MAAAA,YAAY,EAAE;AAHc,KAAvB,CA1BF;AA+BLY,IAAAA,MAAM,EAAE,mCAAuB;AAC7BT,MAAAA,KAAK,EAAE,QADsB;AAE7BC,MAAAA,WAAW,EAAE,QAFgB;AAG7BJ,MAAAA,YAAY,EAAE;AAHe,KAAvB,CA/BH;AAoCLa,IAAAA,OAAO,EAAE,2BAAe;AACtBV,MAAAA,KAAK,EAAE,SADe;AAEtBC,MAAAA,WAAW,EAAE,kDAFS;AAGtBJ,MAAAA,YAAY,EAAE;AAHQ,KAAf;AApCJ;AANgB,CAAlB","sourcesContent":["import {\n GROUPS,\n COMPONENT_TYPES,\n createIconProp,\n createBoolProp,\n createColorProp,\n createStaticNumberProp,\n createFieldNameProp,\n createIconSizeProp,\n createActionProp,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Toggle Button\",\n tag: \"ToggleButton\",\n category: COMPONENT_TYPES.button,\n layout: {},\n triggers: [Triggers.OnPress],\n props: {\n onPress: createActionProp(),\n icon: createIconProp({\n required: true,\n }),\n iconSize: createIconSizeProp(),\n fieldName: createFieldNameProp({\n defaultValue: false,\n valuePropName: \"toggled\",\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Whether the button should be disabled\",\n group: GROUPS.basic,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n }),\n colorSecondary: createColorProp({\n label: \"Secondary Color\",\n group: GROUPS.basic,\n }),\n borderColor: createColorProp({\n label: \"Border Color\",\n group: GROUPS.basic,\n }),\n width: createStaticNumberProp({\n label: \"Width\",\n description: \"Width\",\n defaultValue: 50,\n }),\n height: createStaticNumberProp({\n label: \"Height\",\n description: \"Height\",\n defaultValue: 50,\n }),\n toggled: createBoolProp({\n label: \"Toggled\",\n description: \"Whether the button should show the toggled state\",\n defaultValue: false,\n }),\n },\n};\n"]}
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
3
-
4
- const KeyboardAware = _ref => {
5
- let {
6
- children,
7
- ...props
8
- } = _ref;
9
- return /*#__PURE__*/React.createElement(KeyboardAwareScrollView, props, children);
10
- };
11
-
12
- export default KeyboardAware;
13
- //# sourceMappingURL=KeyboardAwareScrollView.js.mapew.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["KeyboardAwareScrollView.tsx"],"names":["React","KeyboardAwareScrollView","KeyboardAware","children","props"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,uBAAT,QAAwC,yCAAxC;;AAaA,MAAMC,aAAa,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAAD;AAAA,sBACpB,oBAAC,uBAAD,EAA6BA,KAA7B,EAAqCD,QAArC,CADoB;AAAA,CAAtB;;AAIA,eAAeD,aAAf","sourcesContent":["import * as React from \"react\";\nimport { KeyboardAwareScrollView } from \"react-native-keyboard-aware-scroll-view\";\n\ntype Props = {\n children: React.ReactNode;\n viewIsInsideTabBar: boolean;\n enableAutomaticScroll?: boolean;\n extraHeight?: number;\n extraScrollHeight?: number;\n enableResetScrollToCoords?: boolean;\n keyboardOpeningTime?: number;\n enableOnAndroid?: boolean;\n};\n\nconst KeyboardAware = ({ children, ...props }: Props) => (\n <KeyboardAwareScrollView {...props}>{children}</KeyboardAwareScrollView>\n);\n\nexport default KeyboardAware;\n"]}
@@ -1,67 +0,0 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
- import * as React from "react";
4
- import { withTheme } from "../theming";
5
- import { StyleSheet } from "react-native";
6
- import IconButton from "./IconButton";
7
-
8
- const ToggleButton = _ref => {
9
- let {
10
- Icon,
11
- icon,
12
- toggled = false,
13
- onPress = () => {},
14
- defaultValue,
15
- disabled = false,
16
- color = "primary",
17
- colorSecondary = "surface",
18
- borderColor = "divider",
19
- iconSize = 25,
20
- width = 50,
21
- height = 50,
22
- theme: {
23
- colors
24
- },
25
- style,
26
- ...rest
27
- } = _ref;
28
- const [internalValue, setInternalValue] = React.useState(toggled || defaultValue || false);
29
- React.useEffect(() => {
30
- if (toggled != null) {
31
- setInternalValue(toggled);
32
- }
33
- }, [toggled]);
34
- React.useEffect(() => {
35
- if (defaultValue != null) {
36
- setInternalValue(defaultValue);
37
- }
38
- }, [defaultValue]);
39
-
40
- const handlePress = () => {
41
- setInternalValue(!internalValue);
42
- onPress(!internalValue);
43
- };
44
-
45
- return /*#__PURE__*/React.createElement(IconButton, _extends({
46
- Icon: Icon,
47
- icon: icon,
48
- size: iconSize,
49
- color: internalValue ? colors[color] : colors[colorSecondary],
50
- onPress: handlePress,
51
- disabled: disabled,
52
- style: [styles.mainContainer, {
53
- width,
54
- height,
55
- backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
56
- borderColor: colors[borderColor]
57
- }, style]
58
- }, rest));
59
- };
60
-
61
- const styles = StyleSheet.create({
62
- mainContainer: {
63
- borderWidth: 1
64
- }
65
- });
66
- export default withTheme(ToggleButton);
67
- //# sourceMappingURL=ToggleButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["ToggleButton.tsx"],"names":["React","withTheme","StyleSheet","IconButton","ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","create","borderWidth"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAEA,SAAoBC,UAApB,QAAiD,cAAjD;AACA,OAAOC,UAAP,MAAuB,cAAvB;;AAoBA,MAAMC,YAA6B,GAAG,QAgBhC;AAAA,MAhBiC;AACrCC,IAAAA,IADqC;AAErCC,IAAAA,IAFqC;AAGrCC,IAAAA,OAAO,GAAG,KAH2B;AAIrCC,IAAAA,OAAO,GAAG,MAAM,CAAE,CAJmB;AAKrCC,IAAAA,YALqC;AAMrCC,IAAAA,QAAQ,GAAG,KAN0B;AAOrCC,IAAAA,KAAK,GAAG,SAP6B;AAQrCC,IAAAA,cAAc,GAAG,SARoB;AASrCC,IAAAA,WAAW,GAAG,SATuB;AAUrCC,IAAAA,QAAQ,GAAG,EAV0B;AAWrCC,IAAAA,KAAK,GAAG,EAX6B;AAYrCC,IAAAA,MAAM,GAAG,EAZ4B;AAarCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAb8B;AAcrCC,IAAAA,KAdqC;AAerC,OAAGC;AAfkC,GAgBjC;AACJ,QAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCtB,KAAK,CAACuB,QAAN,CACxChB,OAAO,IAAIE,YAAX,IAA2B,KADa,CAA1C;AAIAT,EAAAA,KAAK,CAACwB,SAAN,CAAgB,MAAM;AACpB,QAAIjB,OAAO,IAAI,IAAf,EAAqB;AACnBe,MAAAA,gBAAgB,CAACf,OAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,OAAD,CAJH;AAMAP,EAAAA,KAAK,CAACwB,SAAN,CAAgB,MAAM;AACpB,QAAIf,YAAY,IAAI,IAApB,EAA0B;AACxBa,MAAAA,gBAAgB,CAACb,YAAD,CAAhB;AACD;AACF,GAJD,EAIG,CAACA,YAAD,CAJH;;AAMA,QAAMgB,WAAW,GAAG,MAAM;AACxBH,IAAAA,gBAAgB,CAAC,CAACD,aAAF,CAAhB;AACAb,IAAAA,OAAO,CAAC,CAACa,aAAF,CAAP;AACD,GAHD;;AAKA,sBACE,oBAAC,UAAD;AACE,IAAA,IAAI,EAAEhB,IADR;AAEE,IAAA,IAAI,EAAEC,IAFR;AAGE,IAAA,IAAI,EAAEQ,QAHR;AAIE,IAAA,KAAK,EAAEO,aAAa,GAAGH,MAAM,CAACP,KAAD,CAAT,GAAmBO,MAAM,CAACN,cAAD,CAJ/C;AAKE,IAAA,OAAO,EAAEa,WALX;AAME,IAAA,QAAQ,EAAEf,QANZ;AAOE,IAAA,KAAK,EAAE,CACLgB,MAAM,CAACC,aADF,EAEL;AACEZ,MAAAA,KADF;AAEEC,MAAAA,MAFF;AAGEY,MAAAA,eAAe,EAAEP,aAAa,GAC1BH,MAAM,CAACN,cAAD,CADoB,GAE1BM,MAAM,CAACP,KAAD,CALZ;AAMEE,MAAAA,WAAW,EAAEK,MAAM,CAACL,WAAD;AANrB,KAFK,EAULM,KAVK;AAPT,KAmBMC,IAnBN,EADF;AAuBD,CA7DD;;AA+DA,MAAMM,MAAM,GAAGxB,UAAU,CAAC2B,MAAX,CAAkB;AAC/BF,EAAAA,aAAa,EAAE;AACbG,IAAAA,WAAW,EAAE;AADA;AADgB,CAAlB,CAAf;AAMA,eAAe7B,SAAS,CAACG,YAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<Props> = ({\n Icon,\n icon,\n toggled = false,\n onPress = () => {},\n defaultValue,\n disabled = false,\n color = \"primary\",\n colorSecondary = \"surface\",\n borderColor = \"divider\",\n iconSize = 25,\n width = 50,\n height = 50,\n theme: { colors },\n style,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<boolean>(\n toggled || defaultValue || false\n );\n\n React.useEffect(() => {\n if (toggled != null) {\n setInternalValue(toggled);\n }\n }, [toggled]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handlePress = () => {\n setInternalValue(!internalValue);\n onPress(!internalValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={icon}\n size={iconSize}\n color={internalValue ? colors[color] : colors[colorSecondary]}\n onPress={handlePress}\n disabled={disabled}\n style={[\n styles.mainContainer,\n {\n width,\n height,\n backgroundColor: internalValue\n ? colors[colorSecondary]\n : colors[color],\n borderColor: colors[borderColor],\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n mainContainer: {\n borderWidth: 1,\n },\n});\n\nexport default withTheme(ToggleButton);\n"]}
@@ -1,39 +0,0 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, createStaticNumberProp } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Keyboard Aware Scroll View",
4
- tag: "KeyboardAwareScrollView",
5
- description: "View that moves pushes the content when virtual keyboard is open.",
6
- category: COMPONENT_TYPES.layout,
7
- layout: {},
8
- props: {
9
- viewIsInsideTabBar: createStaticBoolProp({
10
- label: "View Is Inside TabBar",
11
- description: "Adds an extra offset that represents the TabBarIOS height."
12
- }),
13
- enableAutomaticScroll: createStaticBoolProp({
14
- label: "Enable Automatic Scroll",
15
- description: "When focus in TextInput will scroll the position, default is enabled"
16
- }),
17
- extraHeight: createStaticNumberProp({
18
- label: "Extra Height",
19
- description: "Adds an extra offset when focusing the TextInputs"
20
- }),
21
- extraScrollHeight: createStaticNumberProp({
22
- label: "Extra Scroll Height",
23
- description: "Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard"
24
- }),
25
- enableResetScrollToCoords: createStaticBoolProp({
26
- label: "Enable Reset Scroll To Coordinates",
27
- description: "Lets the user enable or disable automatic resetScrollToCoords"
28
- }),
29
- keyboardOpeningTime: createStaticNumberProp({
30
- label: "Keyboard Opening Time",
31
- description: "Sets the delay time before scrolling to new position, default is 250"
32
- }),
33
- enableOnAndroid: createStaticBoolProp({
34
- label: "Enable On Android",
35
- description: "Enable Android Support"
36
- })
37
- }
38
- };
39
- //# sourceMappingURL=KeyboardAwareScrollView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["KeyboardAwareScrollView.ts"],"names":["COMPONENT_TYPES","createStaticBoolProp","createStaticNumberProp","SEED_DATA","name","tag","description","category","layout","props","viewIsInsideTabBar","label","enableAutomaticScroll","extraHeight","extraScrollHeight","enableResetScrollToCoords","keyboardOpeningTime","enableOnAndroid"],"mappings":"AAAA,SACEA,eADF,EAEEC,oBAFF,EAGEC,sBAHF,QAIO,iBAJP;AAMA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,4BADiB;AAEvBC,EAAAA,GAAG,EAAE,yBAFkB;AAGvBC,EAAAA,WAAW,EACT,mEAJqB;AAKvBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,MALH;AAMvBA,EAAAA,MAAM,EAAE,EANe;AAOvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,kBAAkB,EAAET,oBAAoB,CAAC;AACvCU,MAAAA,KAAK,EAAE,uBADgC;AAEvCL,MAAAA,WAAW,EAAE;AAF0B,KAAD,CADnC;AAKLM,IAAAA,qBAAqB,EAAEX,oBAAoB,CAAC;AAC1CU,MAAAA,KAAK,EAAE,yBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CALtC;AAULO,IAAAA,WAAW,EAAEX,sBAAsB,CAAC;AAClCS,MAAAA,KAAK,EAAE,cAD2B;AAElCL,MAAAA,WAAW,EAAE;AAFqB,KAAD,CAV9B;AAcLQ,IAAAA,iBAAiB,EAAEZ,sBAAsB,CAAC;AACxCS,MAAAA,KAAK,EAAE,qBADiC;AAExCL,MAAAA,WAAW,EACT;AAHsC,KAAD,CAdpC;AAmBLS,IAAAA,yBAAyB,EAAEd,oBAAoB,CAAC;AAC9CU,MAAAA,KAAK,EAAE,oCADuC;AAE9CL,MAAAA,WAAW,EACT;AAH4C,KAAD,CAnB1C;AAwBLU,IAAAA,mBAAmB,EAAEd,sBAAsB,CAAC;AAC1CS,MAAAA,KAAK,EAAE,uBADmC;AAE1CL,MAAAA,WAAW,EACT;AAHwC,KAAD,CAxBtC;AA6BLW,IAAAA,eAAe,EAAEhB,oBAAoB,CAAC;AACpCU,MAAAA,KAAK,EAAE,mBAD6B;AAEpCL,MAAAA,WAAW,EAAE;AAFuB,KAAD;AA7BhC;AAPgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createStaticBoolProp,\n createStaticNumberProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Keyboard Aware Scroll View\",\n tag: \"KeyboardAwareScrollView\",\n description:\n \"View that moves pushes the content when virtual keyboard is open.\",\n category: COMPONENT_TYPES.layout,\n layout: {},\n props: {\n viewIsInsideTabBar: createStaticBoolProp({\n label: \"View Is Inside TabBar\",\n description: \"Adds an extra offset that represents the TabBarIOS height.\",\n }),\n enableAutomaticScroll: createStaticBoolProp({\n label: \"Enable Automatic Scroll\",\n description:\n \"When focus in TextInput will scroll the position, default is enabled\",\n }),\n extraHeight: createStaticNumberProp({\n label: \"Extra Height\",\n description: \"Adds an extra offset when focusing the TextInputs\",\n }),\n extraScrollHeight: createStaticNumberProp({\n label: \"Extra Scroll Height\",\n description:\n \"Adds an extra offset to the keyboard. Useful if you want to stick elements above the keyboard\",\n }),\n enableResetScrollToCoords: createStaticBoolProp({\n label: \"Enable Reset Scroll To Coordinates\",\n description:\n \"Lets the user enable or disable automatic resetScrollToCoords\",\n }),\n keyboardOpeningTime: createStaticNumberProp({\n label: \"Keyboard Opening Time\",\n description:\n \"Sets the delay time before scrolling to new position, default is 250\",\n }),\n enableOnAndroid: createStaticBoolProp({\n label: \"Enable On Android\",\n description: \"Enable Android Support\",\n }),\n },\n};\n"]}
@@ -1,51 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, createIconProp, createBoolProp, createColorProp, createStaticNumberProp, createFieldNameProp, createIconSizeProp, createActionProp, Triggers } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Toggle Button",
4
- tag: "ToggleButton",
5
- category: COMPONENT_TYPES.button,
6
- layout: {},
7
- triggers: [Triggers.OnPress],
8
- props: {
9
- onPress: createActionProp(),
10
- icon: createIconProp({
11
- required: true
12
- }),
13
- iconSize: createIconSizeProp(),
14
- fieldName: createFieldNameProp({
15
- defaultValue: false,
16
- valuePropName: "toggled"
17
- }),
18
- disabled: createBoolProp({
19
- label: "Disabled",
20
- description: "Whether the button should be disabled",
21
- group: GROUPS.basic
22
- }),
23
- color: createColorProp({
24
- group: GROUPS.basic
25
- }),
26
- colorSecondary: createColorProp({
27
- label: "Secondary Color",
28
- group: GROUPS.basic
29
- }),
30
- borderColor: createColorProp({
31
- label: "Border Color",
32
- group: GROUPS.basic
33
- }),
34
- width: createStaticNumberProp({
35
- label: "Width",
36
- description: "Width",
37
- defaultValue: 50
38
- }),
39
- height: createStaticNumberProp({
40
- label: "Height",
41
- description: "Height",
42
- defaultValue: 50
43
- }),
44
- toggled: createBoolProp({
45
- label: "Toggled",
46
- description: "Whether the button should show the toggled state",
47
- defaultValue: false
48
- })
49
- }
50
- };
51
- //# sourceMappingURL=ToggleButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["ToggleButton.ts"],"names":["GROUPS","COMPONENT_TYPES","createIconProp","createBoolProp","createColorProp","createStaticNumberProp","createFieldNameProp","createIconSizeProp","createActionProp","Triggers","SEED_DATA","name","tag","category","button","layout","triggers","OnPress","props","onPress","icon","required","iconSize","fieldName","defaultValue","valuePropName","disabled","label","description","group","basic","color","colorSecondary","borderColor","width","height","toggled"],"mappings":"AAAA,SACEA,MADF,EAEEC,eAFF,EAGEC,cAHF,EAIEC,cAJF,EAKEC,eALF,EAMEC,sBANF,EAOEC,mBAPF,EAQEC,kBARF,EASEC,gBATF,EAUEC,QAVF,QAWO,iBAXP;AAaA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,eADiB;AAEvBC,EAAAA,GAAG,EAAE,cAFkB;AAGvBC,EAAAA,QAAQ,EAAEZ,eAAe,CAACa,MAHH;AAIvBC,EAAAA,MAAM,EAAE,EAJe;AAKvBC,EAAAA,QAAQ,EAAE,CAACP,QAAQ,CAACQ,OAAV,CALa;AAMvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAEX,gBAAgB,EADpB;AAELY,IAAAA,IAAI,EAAElB,cAAc,CAAC;AACnBmB,MAAAA,QAAQ,EAAE;AADS,KAAD,CAFf;AAKLC,IAAAA,QAAQ,EAAEf,kBAAkB,EALvB;AAMLgB,IAAAA,SAAS,EAAEjB,mBAAmB,CAAC;AAC7BkB,MAAAA,YAAY,EAAE,KADe;AAE7BC,MAAAA,aAAa,EAAE;AAFc,KAAD,CANzB;AAULC,IAAAA,QAAQ,EAAEvB,cAAc,CAAC;AACvBwB,MAAAA,KAAK,EAAE,UADgB;AAEvBC,MAAAA,WAAW,EAAE,uCAFU;AAGvBC,MAAAA,KAAK,EAAE7B,MAAM,CAAC8B;AAHS,KAAD,CAVnB;AAeLC,IAAAA,KAAK,EAAE3B,eAAe,CAAC;AACrByB,MAAAA,KAAK,EAAE7B,MAAM,CAAC8B;AADO,KAAD,CAfjB;AAkBLE,IAAAA,cAAc,EAAE5B,eAAe,CAAC;AAC9BuB,MAAAA,KAAK,EAAE,iBADuB;AAE9BE,MAAAA,KAAK,EAAE7B,MAAM,CAAC8B;AAFgB,KAAD,CAlB1B;AAsBLG,IAAAA,WAAW,EAAE7B,eAAe,CAAC;AAC3BuB,MAAAA,KAAK,EAAE,cADoB;AAE3BE,MAAAA,KAAK,EAAE7B,MAAM,CAAC8B;AAFa,KAAD,CAtBvB;AA0BLI,IAAAA,KAAK,EAAE7B,sBAAsB,CAAC;AAC5BsB,MAAAA,KAAK,EAAE,OADqB;AAE5BC,MAAAA,WAAW,EAAE,OAFe;AAG5BJ,MAAAA,YAAY,EAAE;AAHc,KAAD,CA1BxB;AA+BLW,IAAAA,MAAM,EAAE9B,sBAAsB,CAAC;AAC7BsB,MAAAA,KAAK,EAAE,QADsB;AAE7BC,MAAAA,WAAW,EAAE,QAFgB;AAG7BJ,MAAAA,YAAY,EAAE;AAHe,KAAD,CA/BzB;AAoCLY,IAAAA,OAAO,EAAEjC,cAAc,CAAC;AACtBwB,MAAAA,KAAK,EAAE,SADe;AAEtBC,MAAAA,WAAW,EAAE,kDAFS;AAGtBJ,MAAAA,YAAY,EAAE;AAHQ,KAAD;AApClB;AANgB,CAAlB","sourcesContent":["import {\n GROUPS,\n COMPONENT_TYPES,\n createIconProp,\n createBoolProp,\n createColorProp,\n createStaticNumberProp,\n createFieldNameProp,\n createIconSizeProp,\n createActionProp,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Toggle Button\",\n tag: \"ToggleButton\",\n category: COMPONENT_TYPES.button,\n layout: {},\n triggers: [Triggers.OnPress],\n props: {\n onPress: createActionProp(),\n icon: createIconProp({\n required: true,\n }),\n iconSize: createIconSizeProp(),\n fieldName: createFieldNameProp({\n defaultValue: false,\n valuePropName: \"toggled\",\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Whether the button should be disabled\",\n group: GROUPS.basic,\n }),\n color: createColorProp({\n group: GROUPS.basic,\n }),\n colorSecondary: createColorProp({\n label: \"Secondary Color\",\n group: GROUPS.basic,\n }),\n borderColor: createColorProp({\n label: \"Border Color\",\n group: GROUPS.basic,\n }),\n width: createStaticNumberProp({\n label: \"Width\",\n description: \"Width\",\n defaultValue: 50,\n }),\n height: createStaticNumberProp({\n label: \"Height\",\n description: \"Height\",\n defaultValue: 50,\n }),\n toggled: createBoolProp({\n label: \"Toggled\",\n description: \"Whether the button should show the toggled state\",\n defaultValue: false,\n }),\n },\n};\n"]}
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- declare type Props = {
3
- children: React.ReactNode;
4
- viewIsInsideTabBar: boolean;
5
- enableAutomaticScroll?: boolean;
6
- extraHeight?: number;
7
- extraScrollHeight?: number;
8
- enableResetScrollToCoords?: boolean;
9
- keyboardOpeningTime?: number;
10
- enableOnAndroid?: boolean;
11
- };
12
- declare const KeyboardAware: ({ children, ...props }: Props) => JSX.Element;
13
- export default KeyboardAware;
@@ -1,24 +0,0 @@
1
- import * as React from "react";
2
- import { colorTypes } from "@draftbit/types";
3
- import { StyleProp, ViewStyle } from "react-native";
4
- import type { Theme } from "../styles/DefaultTheme";
5
- import type { IconSlot } from "../interfaces/Icon";
6
- declare type Props = {
7
- icon: string;
8
- toggled?: boolean;
9
- onPress?: (value: boolean) => void;
10
- defaultValue?: boolean;
11
- disabled?: boolean;
12
- color?: colorTypes;
13
- colorSecondary?: colorTypes;
14
- borderColor?: colorTypes;
15
- iconSize?: number;
16
- width?: number;
17
- height?: number;
18
- style?: StyleProp<ViewStyle>;
19
- theme: Theme;
20
- } & IconSlot;
21
- declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<Props, "theme"> & {
22
- theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
23
- }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<Props> & React.FC<Props>, {}>;
24
- export default _default;
@@ -1,82 +0,0 @@
1
- export declare const SEED_DATA: {
2
- name: string;
3
- tag: string;
4
- description: string;
5
- category: string;
6
- layout: {};
7
- props: {
8
- viewIsInsideTabBar: {
9
- label: string;
10
- description: string;
11
- formType: string;
12
- propType: string;
13
- defaultValue: boolean;
14
- editable: boolean;
15
- required: boolean;
16
- group: string;
17
- };
18
- enableAutomaticScroll: {
19
- label: string;
20
- description: string;
21
- formType: string;
22
- propType: string;
23
- defaultValue: boolean;
24
- editable: boolean;
25
- required: boolean;
26
- group: string;
27
- };
28
- extraHeight: {
29
- label: string;
30
- description: string;
31
- formType: string;
32
- propType: string;
33
- group: string;
34
- defaultValue: null;
35
- editable: boolean;
36
- required: boolean;
37
- step: number;
38
- };
39
- extraScrollHeight: {
40
- label: string;
41
- description: string;
42
- formType: string;
43
- propType: string;
44
- group: string;
45
- defaultValue: null;
46
- editable: boolean;
47
- required: boolean;
48
- step: number;
49
- };
50
- enableResetScrollToCoords: {
51
- label: string;
52
- description: string;
53
- formType: string;
54
- propType: string;
55
- defaultValue: boolean;
56
- editable: boolean;
57
- required: boolean;
58
- group: string;
59
- };
60
- keyboardOpeningTime: {
61
- label: string;
62
- description: string;
63
- formType: string;
64
- propType: string;
65
- group: string;
66
- defaultValue: null;
67
- editable: boolean;
68
- required: boolean;
69
- step: number;
70
- };
71
- enableOnAndroid: {
72
- label: string;
73
- description: string;
74
- formType: string;
75
- propType: string;
76
- defaultValue: boolean;
77
- editable: boolean;
78
- required: boolean;
79
- group: string;
80
- };
81
- };
82
- };