@draftbit/core 46.4.4-8a6164.2 → 46.4.4-970ba7.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.
@@ -21,8 +21,6 @@ var _Touchable = _interopRequireDefault(require("../Touchable"));
21
21
 
22
22
  var _DatePickerComponent = _interopRequireDefault(require("./DatePickerComponent"));
23
23
 
24
- var _utilities = require("../../utilities");
25
-
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
25
 
28
26
  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); }
@@ -273,12 +271,9 @@ const DatePicker = _ref => {
273
271
  })
274
272
  }]
275
273
  };
276
- const {
277
- textStyles
278
- } = (0, _utilities.extractStyles)(style);
279
274
  const inputStyles = [styles.input, inputStyle, type === "solid" ? {
280
275
  marginHorizontal: 12
281
- } : {}, textStyles]; // const render = (props) => <NativeTextInput {...props} />;
276
+ } : {}]; // const render = (props) => <NativeTextInput {...props} />;
282
277
 
283
278
  return /*#__PURE__*/React.createElement(_reactNative.View, {
284
279
  style: [styles.container, style]
@@ -3,6 +3,76 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _exportNames = {
7
+ injectIcon: true,
8
+ withTheme: true,
9
+ ThemeProvider: true,
10
+ Provider: true,
11
+ DefaultTheme: true,
12
+ Link: true,
13
+ Banner: true,
14
+ Button: true,
15
+ ButtonSolid: true,
16
+ ButtonOutline: true,
17
+ Avatar: true,
18
+ CircleImage: true,
19
+ AvatarEdit: true,
20
+ Card: true,
21
+ Carousel: true,
22
+ Checkbox: true,
23
+ CheckboxGroup: true,
24
+ CheckboxRow: true,
25
+ Container: true,
26
+ Divider: true,
27
+ FAB: true,
28
+ FieldSearchBarFull: true,
29
+ IconButton: true,
30
+ Image: true,
31
+ SVG: true,
32
+ NumberInput: true,
33
+ ScreenContainer: true,
34
+ StarRating: true,
35
+ Surface: true,
36
+ Switch: true,
37
+ SwitchRow: true,
38
+ TextField: true,
39
+ ToggleButton: true,
40
+ Touchable: true,
41
+ AccordionGroup: true,
42
+ AccordionItem: true,
43
+ ActionSheet: true,
44
+ ActionSheetItem: true,
45
+ ActionSheetCancel: true,
46
+ Swiper: true,
47
+ SwiperItem: true,
48
+ Center: true,
49
+ Circle: true,
50
+ Square: true,
51
+ Row: true,
52
+ Stack: true,
53
+ Spacer: true,
54
+ RadioButton: true,
55
+ RadioButtonGroup: true,
56
+ RadioButtonRow: true,
57
+ RadioButtonFieldGroup: true,
58
+ CardBlock: true,
59
+ CardContainer: true,
60
+ CardContainerRating: true,
61
+ CardInline: true,
62
+ DatePicker: true,
63
+ HeaderLarge: true,
64
+ HeaderMedium: true,
65
+ HeaderOverline: true,
66
+ Picker: true,
67
+ ProgressBar: true,
68
+ ProgressCircle: true,
69
+ RowBodyIcon: true,
70
+ RowHeadlineImageCaption: true,
71
+ RowHeadlineImageIcon: true,
72
+ Slider: true,
73
+ Stepper: true,
74
+ useAuthState: true
75
+ };
6
76
  Object.defineProperty(exports, "AccordionGroup", {
7
77
  enumerable: true,
8
78
  get: function () {
@@ -476,6 +546,20 @@ var _Layout = require("./components/Layout");
476
546
 
477
547
  var _index = require("./components/RadioButton/index");
478
548
 
549
+ var _htmlElements = require("@expo/html-elements");
550
+
551
+ Object.keys(_htmlElements).forEach(function (key) {
552
+ if (key === "default" || key === "__esModule") return;
553
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
554
+ if (key in exports && exports[key] === _htmlElements[key]) return;
555
+ Object.defineProperty(exports, key, {
556
+ enumerable: true,
557
+ get: function () {
558
+ return _htmlElements[key];
559
+ }
560
+ });
561
+ });
562
+
479
563
  var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
480
564
 
481
565
  var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));
@@ -0,0 +1,125 @@
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_TRIGGERS = [_types.Triggers.OnValueChange];
11
+ const ELEMENT_PROPS = {
12
+ category: _types.COMPONENT_TYPES.element,
13
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
14
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
15
+ stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Effects],
16
+ layout: {
17
+ margin: 0
18
+ },
19
+ triggers: SEED_DATA_TRIGGERS
20
+ };
21
+ const HEADING_PROPS = { ...ELEMENT_PROPS
22
+ };
23
+ const SEED_DATA = [{
24
+ name: "H1",
25
+ tag: "H1",
26
+ ...HEADING_PROPS
27
+ }, {
28
+ name: "H2",
29
+ tag: "H2",
30
+ ...HEADING_PROPS
31
+ }, {
32
+ name: "H3",
33
+ tag: "H3",
34
+ ...HEADING_PROPS
35
+ }, {
36
+ name: "H4",
37
+ tag: "H4",
38
+ ...HEADING_PROPS
39
+ }, {
40
+ name: "H5",
41
+ tag: "H5",
42
+ ...HEADING_PROPS
43
+ }, {
44
+ name: "H6",
45
+ tag: "H6",
46
+ ...HEADING_PROPS
47
+ }, {
48
+ name: "Anchor",
49
+ tag: "A",
50
+ ...ELEMENT_PROPS,
51
+ props: {
52
+ href: (0, _types.createTextProp)({
53
+ label: "href",
54
+ description: "Specify the URL",
55
+ defaultValue: ""
56
+ }),
57
+ target: {
58
+ group: _types.GROUPS.basic,
59
+ label: "target",
60
+ description: "decide where link should open",
61
+ formType: _types.FORM_TYPES.flatArray,
62
+ defaultValue: "_blank",
63
+ options: ["_blank", "_self", "_parent", "_top"]
64
+ }
65
+ }
66
+ }, {
67
+ name: "Paragraph",
68
+ tag: "P",
69
+ ...ELEMENT_PROPS,
70
+ props: {// NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
71
+ // strong: createBoolProp({
72
+ // label: "Strong",
73
+ // description: "Strong",
74
+ // }),
75
+ // strike: createBoolProp({
76
+ // label: "Strike",
77
+ // description: "Strike through",
78
+ // }),
79
+ // italic: createBoolProp({
80
+ // label: "Italic",
81
+ // description: "Italic Fonts",
82
+ // }),
83
+ // bold: createBoolProp({
84
+ // label: "Bold",
85
+ // description: "Bold",
86
+ // }),
87
+ }
88
+ }, {
89
+ name: "Code",
90
+ tag: "Code",
91
+ ...ELEMENT_PROPS
92
+ }, {
93
+ name: "Pre",
94
+ tag: "Pre",
95
+ ...ELEMENT_PROPS
96
+ }, {
97
+ name: "Mark",
98
+ tag: "Mark",
99
+ ...ELEMENT_PROPS
100
+ }, {
101
+ name: "BR",
102
+ tag: "BR",
103
+ ...ELEMENT_PROPS
104
+ }, {
105
+ name: "BlockQuote",
106
+ tag: "BlockQuote",
107
+ ...ELEMENT_PROPS
108
+ }, {
109
+ name: "Time",
110
+ tag: "Time",
111
+ ...ELEMENT_PROPS
112
+ }, {
113
+ name: "UL",
114
+ tag: "UL",
115
+ ...ELEMENT_PROPS
116
+ }, {
117
+ name: "LI",
118
+ tag: "LI",
119
+ ...ELEMENT_PROPS
120
+ }, {
121
+ name: "HR",
122
+ tag: "HR",
123
+ ...ELEMENT_PROPS
124
+ }];
125
+ exports.SEED_DATA = SEED_DATA;
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : 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
1
  import * as React from "react";
4
2
  import { Pressable, StyleSheet, View } from "react-native";
5
3
  import Text from "../Text";
@@ -20,9 +18,10 @@ const AccordionItem = _ref => {
20
18
  textStyles,
21
19
  viewStyles
22
20
  } = extractStyles(style);
23
- return /*#__PURE__*/React.createElement(Pressable, _extends({
24
- style: [styles.container, viewStyles]
25
- }, rest), /*#__PURE__*/React.createElement(View, {
21
+ return /*#__PURE__*/React.createElement(Pressable, {
22
+ style: [styles.container, viewStyles],
23
+ ...rest
24
+ }, /*#__PURE__*/React.createElement(View, {
26
25
  style: styles.row
27
26
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
28
27
  name: icon,
@@ -36,6 +35,28 @@ const AccordionItem = _ref => {
36
35
  }, label))));
37
36
  };
38
37
 
38
+ const styles = StyleSheet.create({
39
+ container: {
40
+ padding: 8
41
+ },
42
+ row: {
43
+ flexDirection: "row",
44
+ alignItems: "center",
45
+ paddingLeft: 8
46
+ },
47
+ item: {
48
+ marginVertical: 6,
49
+ paddingLeft: 8
50
+ },
51
+ content: {
52
+ flex: 1,
53
+ justifyContent: "center"
54
+ }
55
+ });
56
+ export default withTheme(AccordionItem);xtStyles
57
+ }, label))));
58
+ };
59
+
39
60
  const styles = StyleSheet.create({
40
61
  container: {
41
62
  padding: 8
@@ -8,7 +8,6 @@ import { withTheme } from "../../theming";
8
8
  import Portal from "../Portal/Portal";
9
9
  import Touchable from "../Touchable";
10
10
  import DateTimePicker from "./DatePickerComponent";
11
- import { extractStyles } from "../../utilities";
12
11
  const AnimatedText = Animated.createAnimatedComponent(Text);
13
12
  const FOCUS_ANIMATION_DURATION = 150;
14
13
  const BLUR_ANIMATION_DURATION = 180;
@@ -250,12 +249,9 @@ const DatePicker = _ref => {
250
249
  })
251
250
  }]
252
251
  };
253
- const {
254
- textStyles
255
- } = extractStyles(style);
256
252
  const inputStyles = [styles.input, inputStyle, type === "solid" ? {
257
253
  marginHorizontal: 12
258
- } : {}, textStyles]; // const render = (props) => <NativeTextInput {...props} />;
254
+ } : {}]; // const render = (props) => <NativeTextInput {...props} />;
259
255
 
260
256
  return /*#__PURE__*/React.createElement(View, {
261
257
  style: [styles.container, style]
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : 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
1
  import * as React from "react";
4
2
  import { View, StyleSheet } from "react-native";
5
3
  import { Picker as NativePicker } from "@react-native-picker/picker";
@@ -10,8 +8,6 @@ import TextField from "../TextField";
10
8
  import Touchable from "../Touchable";
11
9
 
12
10
  const Picker = _ref => {
13
- var _options$find$label, _options$find;
14
-
15
11
  let {
16
12
  style,
17
13
  options,
@@ -21,6 +17,9 @@ const Picker = _ref => {
21
17
  onValueChange: onValueChangeOverride = () => {},
22
18
  ...props
23
19
  } = _ref;
20
+
21
+ var _a, _b;
22
+
24
23
  const {
25
24
  viewStyles: {
26
25
  borderRadius,
@@ -67,7 +66,7 @@ const Picker = _ref => {
67
66
  };
68
67
 
69
68
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
70
- const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
69
+ const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
71
70
  return /*#__PURE__*/React.createElement(Touchable, {
72
71
  disabled: disabled,
73
72
  onPress: toggleFocus,
@@ -90,6 +89,25 @@ const Picker = _ref => {
90
89
  label: o.label,
91
90
  value: o.value,
92
91
  key: o.value
92
+ }))), /*#__PURE__*/React.createElement(View, {
93
+ pointerEvents: "none"
94
+ }, /*#__PURE__*/React.createElement(TextField, { ...props,
95
+ value: selectedLabel,
96
+ placeholder: placeholder,
97
+ // @ts-ignore
98
+ ref: textField,
99
+ disabled: disabled,
100
+ // @ts-expect-error
101
+ style: stylesWithoutMargin
102
+ }))));
103
+ };
104
+
105
+ const styles = StyleSheet.create({
106
+ container: {
107
+ alignSelf: "stretch"
108
+ }
109
+ });
110
+ export default withTheme(Picker); key: o.value
93
111
  }))), /*#__PURE__*/React.createElement(View, {
94
112
  pointerEvents: "none"
95
113
  }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
@@ -31,6 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/Ac
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
34
+ export * from "@expo/html-elements";
34
35
  /* Deprecated: Fix or Delete! */
35
36
 
36
37
  export { default as CardBlock } from "./components/CardBlock";
@@ -0,0 +1,116 @@
1
+ import { COMPONENT_TYPES, createTextProp, FORM_TYPES, GROUPS, StylesPanelSections, Triggers } from "@draftbit/types";
2
+ const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
3
+ const ELEMENT_PROPS = {
4
+ category: COMPONENT_TYPES.element,
5
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
6
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
7
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Effects],
8
+ layout: {
9
+ margin: 0
10
+ },
11
+ triggers: SEED_DATA_TRIGGERS
12
+ };
13
+ const HEADING_PROPS = { ...ELEMENT_PROPS
14
+ };
15
+ export const SEED_DATA = [{
16
+ name: "H1",
17
+ tag: "H1",
18
+ ...HEADING_PROPS
19
+ }, {
20
+ name: "H2",
21
+ tag: "H2",
22
+ ...HEADING_PROPS
23
+ }, {
24
+ name: "H3",
25
+ tag: "H3",
26
+ ...HEADING_PROPS
27
+ }, {
28
+ name: "H4",
29
+ tag: "H4",
30
+ ...HEADING_PROPS
31
+ }, {
32
+ name: "H5",
33
+ tag: "H5",
34
+ ...HEADING_PROPS
35
+ }, {
36
+ name: "H6",
37
+ tag: "H6",
38
+ ...HEADING_PROPS
39
+ }, {
40
+ name: "Anchor",
41
+ tag: "A",
42
+ ...ELEMENT_PROPS,
43
+ props: {
44
+ href: createTextProp({
45
+ label: "href",
46
+ description: "Specify the URL",
47
+ defaultValue: ""
48
+ }),
49
+ target: {
50
+ group: GROUPS.basic,
51
+ label: "target",
52
+ description: "decide where link should open",
53
+ formType: FORM_TYPES.flatArray,
54
+ defaultValue: "_blank",
55
+ options: ["_blank", "_self", "_parent", "_top"]
56
+ }
57
+ }
58
+ }, {
59
+ name: "Paragraph",
60
+ tag: "P",
61
+ ...ELEMENT_PROPS,
62
+ props: {// NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
63
+ // strong: createBoolProp({
64
+ // label: "Strong",
65
+ // description: "Strong",
66
+ // }),
67
+ // strike: createBoolProp({
68
+ // label: "Strike",
69
+ // description: "Strike through",
70
+ // }),
71
+ // italic: createBoolProp({
72
+ // label: "Italic",
73
+ // description: "Italic Fonts",
74
+ // }),
75
+ // bold: createBoolProp({
76
+ // label: "Bold",
77
+ // description: "Bold",
78
+ // }),
79
+ }
80
+ }, {
81
+ name: "Code",
82
+ tag: "Code",
83
+ ...ELEMENT_PROPS
84
+ }, {
85
+ name: "Pre",
86
+ tag: "Pre",
87
+ ...ELEMENT_PROPS
88
+ }, {
89
+ name: "Mark",
90
+ tag: "Mark",
91
+ ...ELEMENT_PROPS
92
+ }, {
93
+ name: "BR",
94
+ tag: "BR",
95
+ ...ELEMENT_PROPS
96
+ }, {
97
+ name: "BlockQuote",
98
+ tag: "BlockQuote",
99
+ ...ELEMENT_PROPS
100
+ }, {
101
+ name: "Time",
102
+ tag: "Time",
103
+ ...ELEMENT_PROPS
104
+ }, {
105
+ name: "UL",
106
+ tag: "UL",
107
+ ...ELEMENT_PROPS
108
+ }, {
109
+ name: "LI",
110
+ tag: "LI",
111
+ ...ELEMENT_PROPS
112
+ }, {
113
+ name: "HR",
114
+ tag: "HR",
115
+ ...ELEMENT_PROPS
116
+ }];
@@ -31,6 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
+ export * from "@expo/html-elements";
34
35
  export { default as CardBlock } from "./components/CardBlock";
35
36
  export { default as CardContainer } from "./components/CardContainer";
36
37
  export { default as CardContainerRating } from "./components/CardContainerRating";
@@ -0,0 +1,49 @@
1
+ export declare const SEED_DATA: ({
2
+ category: string;
3
+ doc_link: string;
4
+ code_link: string;
5
+ stylesPanelSections: string[];
6
+ layout: {
7
+ margin: number;
8
+ };
9
+ triggers: string[];
10
+ name: string;
11
+ tag: string;
12
+ } | {
13
+ props: {
14
+ href: any;
15
+ target: {
16
+ group: string;
17
+ label: string;
18
+ description: string;
19
+ formType: string;
20
+ defaultValue: string;
21
+ options: string[];
22
+ };
23
+ };
24
+ category: string;
25
+ doc_link: string;
26
+ code_link: string;
27
+ stylesPanelSections: string[];
28
+ layout: {
29
+ margin: number;
30
+ };
31
+ triggers: string[];
32
+ name: string;
33
+ tag: string;
34
+ } | {
35
+ props: {
36
+ href?: undefined;
37
+ target?: undefined;
38
+ };
39
+ category: string;
40
+ doc_link: string;
41
+ code_link: string;
42
+ stylesPanelSections: string[];
43
+ layout: {
44
+ margin: number;
45
+ };
46
+ triggers: string[];
47
+ name: string;
48
+ tag: string;
49
+ })[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-8a6164.2+8a6164b",
3
+ "version": "46.4.4-970ba7.2+970ba75",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,8 @@
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.4.4-8a6164.2+8a6164b",
44
+ "@draftbit/types": "^46.4.4-970ba7.2+970ba75",
45
+ "@expo/html-elements": "^0.2.0",
45
46
  "@material-ui/core": "^4.11.0",
46
47
  "@material-ui/pickers": "^3.2.10",
47
48
  "@react-native-community/slider": "4.2.3",
@@ -81,5 +82,5 @@
81
82
  ]
82
83
  ]
83
84
  },
84
- "gitHead": "8a6164bfd3a26b44bab4df0b80268c1c95dab090"
85
+ "gitHead": "970ba755854683bedbdd39b0de3b6b64cc2f496f"
85
86
  }
@@ -6,7 +6,6 @@ import { withTheme } from "../../theming";
6
6
  import Portal from "../Portal/Portal";
7
7
  import Touchable from "../Touchable";
8
8
  import DateTimePicker from "./DatePickerComponent";
9
- import { extractStyles } from "../../utilities";
10
9
  const AnimatedText = Animated.createAnimatedComponent(Text);
11
10
  const FOCUS_ANIMATION_DURATION = 150;
12
11
  const BLUR_ANIMATION_DURATION = 180;
@@ -242,12 +241,10 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
242
241
  },
243
242
  ],
244
243
  };
245
- const { textStyles } = extractStyles(style);
246
244
  const inputStyles = [
247
245
  styles.input,
248
246
  inputStyle,
249
247
  type === "solid" ? { marginHorizontal: 12 } : {},
250
- textStyles,
251
248
  ];
252
249
  // const render = (props) => <NativeTextInput {...props} />;
253
250
  return (React.createElement(View, { style: [styles.container, style] },
@@ -23,7 +23,6 @@ import DateTimePicker from "./DatePickerComponent";
23
23
 
24
24
  import type { Theme } from "../../styles/DefaultTheme";
25
25
  import type { IconSlot } from "../../interfaces/Icon";
26
- import { extractStyles } from "../../utilities";
27
26
 
28
27
  const AnimatedText = Animated.createAnimatedComponent(Text);
29
28
 
@@ -348,13 +347,10 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
348
347
  ],
349
348
  };
350
349
 
351
- const { textStyles } = extractStyles(style);
352
-
353
350
  const inputStyles = [
354
351
  styles.input,
355
352
  inputStyle,
356
353
  type === "solid" ? { marginHorizontal: 12 } : {},
357
- textStyles,
358
354
  ];
359
355
 
360
356
  // const render = (props) => <NativeTextInput {...props} />;
package/src/index.js CHANGED
@@ -31,6 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
+ export * from "@expo/html-elements";
34
35
  /* Deprecated: Fix or Delete! */
35
36
  export { default as CardBlock } from "./components/CardBlock";
36
37
  export { default as CardContainer } from "./components/CardContainer";
package/src/index.tsx CHANGED
@@ -51,6 +51,8 @@ export {
51
51
  RadioButtonFieldGroup,
52
52
  } from "./components/RadioButton/index";
53
53
 
54
+ export * from "@expo/html-elements";
55
+
54
56
  /* Deprecated: Fix or Delete! */
55
57
  export { default as CardBlock } from "./components/CardBlock";
56
58
  export { default as CardContainer } from "./components/CardContainer";
@@ -0,0 +1,141 @@
1
+ import { COMPONENT_TYPES, createTextProp, FORM_TYPES, GROUPS, StylesPanelSections, Triggers, } from "@draftbit/types";
2
+ const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
3
+ const ELEMENT_PROPS = {
4
+ category: COMPONENT_TYPES.element,
5
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
6
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
7
+ stylesPanelSections: [
8
+ StylesPanelSections.Typography,
9
+ StylesPanelSections.LayoutSelectedItem,
10
+ StylesPanelSections.MarginsAndPaddings,
11
+ StylesPanelSections.Effects,
12
+ ],
13
+ layout: {
14
+ margin: 0,
15
+ },
16
+ triggers: SEED_DATA_TRIGGERS,
17
+ };
18
+ const HEADING_PROPS = {
19
+ ...ELEMENT_PROPS,
20
+ };
21
+ export const SEED_DATA = [
22
+ {
23
+ name: "H1",
24
+ tag: "H1",
25
+ ...HEADING_PROPS,
26
+ },
27
+ {
28
+ name: "H2",
29
+ tag: "H2",
30
+ ...HEADING_PROPS,
31
+ },
32
+ {
33
+ name: "H3",
34
+ tag: "H3",
35
+ ...HEADING_PROPS,
36
+ },
37
+ {
38
+ name: "H4",
39
+ tag: "H4",
40
+ ...HEADING_PROPS,
41
+ },
42
+ {
43
+ name: "H5",
44
+ tag: "H5",
45
+ ...HEADING_PROPS,
46
+ },
47
+ {
48
+ name: "H6",
49
+ tag: "H6",
50
+ ...HEADING_PROPS,
51
+ },
52
+ {
53
+ name: "Anchor",
54
+ tag: "A",
55
+ ...ELEMENT_PROPS,
56
+ props: {
57
+ href: createTextProp({
58
+ label: "href",
59
+ description: "Specify the URL",
60
+ defaultValue: "",
61
+ }),
62
+ target: {
63
+ group: GROUPS.basic,
64
+ label: "target",
65
+ description: "decide where link should open",
66
+ formType: FORM_TYPES.flatArray,
67
+ defaultValue: "_blank",
68
+ options: ["_blank", "_self", "_parent", "_top"],
69
+ },
70
+ },
71
+ },
72
+ {
73
+ name: "Paragraph",
74
+ tag: "P",
75
+ ...ELEMENT_PROPS,
76
+ props: {
77
+ // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
78
+ // strong: createBoolProp({
79
+ // label: "Strong",
80
+ // description: "Strong",
81
+ // }),
82
+ // strike: createBoolProp({
83
+ // label: "Strike",
84
+ // description: "Strike through",
85
+ // }),
86
+ // italic: createBoolProp({
87
+ // label: "Italic",
88
+ // description: "Italic Fonts",
89
+ // }),
90
+ // bold: createBoolProp({
91
+ // label: "Bold",
92
+ // description: "Bold",
93
+ // }),
94
+ },
95
+ },
96
+ {
97
+ name: "Code",
98
+ tag: "Code",
99
+ ...ELEMENT_PROPS,
100
+ },
101
+ {
102
+ name: "Pre",
103
+ tag: "Pre",
104
+ ...ELEMENT_PROPS,
105
+ },
106
+ {
107
+ name: "Mark",
108
+ tag: "Mark",
109
+ ...ELEMENT_PROPS,
110
+ },
111
+ {
112
+ name: "BR",
113
+ tag: "BR",
114
+ ...ELEMENT_PROPS,
115
+ },
116
+ {
117
+ name: "BlockQuote",
118
+ tag: "BlockQuote",
119
+ ...ELEMENT_PROPS,
120
+ },
121
+ {
122
+ name: "Time",
123
+ tag: "Time",
124
+ ...ELEMENT_PROPS,
125
+ },
126
+ {
127
+ name: "UL",
128
+ tag: "UL",
129
+ ...ELEMENT_PROPS,
130
+ },
131
+ {
132
+ name: "LI",
133
+ tag: "LI",
134
+ ...ELEMENT_PROPS,
135
+ },
136
+ {
137
+ name: "HR",
138
+ tag: "HR",
139
+ ...ELEMENT_PROPS,
140
+ },
141
+ ];
@@ -0,0 +1,151 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createTextProp,
4
+ FORM_TYPES,
5
+ GROUPS,
6
+ StylesPanelSections,
7
+ Triggers,
8
+ } from "@draftbit/types";
9
+ const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
10
+
11
+ const ELEMENT_PROPS = {
12
+ category: COMPONENT_TYPES.element,
13
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
14
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
15
+ stylesPanelSections: [
16
+ StylesPanelSections.Typography,
17
+ StylesPanelSections.LayoutSelectedItem,
18
+ StylesPanelSections.MarginsAndPaddings,
19
+ StylesPanelSections.Effects,
20
+ ],
21
+ layout: {
22
+ margin: 0,
23
+ },
24
+ triggers: SEED_DATA_TRIGGERS,
25
+ };
26
+
27
+ const HEADING_PROPS = {
28
+ ...ELEMENT_PROPS,
29
+ };
30
+
31
+ export const SEED_DATA = [
32
+ {
33
+ name: "H1",
34
+ tag: "H1",
35
+ ...HEADING_PROPS,
36
+ },
37
+ {
38
+ name: "H2",
39
+ tag: "H2",
40
+ ...HEADING_PROPS,
41
+ },
42
+ {
43
+ name: "H3",
44
+ tag: "H3",
45
+ ...HEADING_PROPS,
46
+ },
47
+ {
48
+ name: "H4",
49
+ tag: "H4",
50
+ ...HEADING_PROPS,
51
+ },
52
+ {
53
+ name: "H5",
54
+ tag: "H5",
55
+ ...HEADING_PROPS,
56
+ },
57
+ {
58
+ name: "H6",
59
+ tag: "H6",
60
+ ...HEADING_PROPS,
61
+ },
62
+ {
63
+ name: "Anchor",
64
+ tag: "A",
65
+ ...ELEMENT_PROPS,
66
+ props: {
67
+ href: createTextProp({
68
+ label: "href",
69
+ description: "Specify the URL",
70
+ defaultValue: "",
71
+ }),
72
+ target: {
73
+ group: GROUPS.basic,
74
+ label: "target",
75
+ description: "decide where link should open",
76
+ formType: FORM_TYPES.flatArray,
77
+ defaultValue: "_blank",
78
+ options: ["_blank", "_self", "_parent", "_top"],
79
+ },
80
+ },
81
+ },
82
+ {
83
+ name: "Paragraph",
84
+ tag: "P",
85
+ ...ELEMENT_PROPS,
86
+ props: {
87
+ // NOTE - Keeping the props commented until we figure out a way to use this props from draftbit side.
88
+ // strong: createBoolProp({
89
+ // label: "Strong",
90
+ // description: "Strong",
91
+ // }),
92
+ // strike: createBoolProp({
93
+ // label: "Strike",
94
+ // description: "Strike through",
95
+ // }),
96
+ // italic: createBoolProp({
97
+ // label: "Italic",
98
+ // description: "Italic Fonts",
99
+ // }),
100
+ // bold: createBoolProp({
101
+ // label: "Bold",
102
+ // description: "Bold",
103
+ // }),
104
+ },
105
+ },
106
+ {
107
+ name: "Code",
108
+ tag: "Code",
109
+ ...ELEMENT_PROPS,
110
+ },
111
+ {
112
+ name: "Pre",
113
+ tag: "Pre",
114
+ ...ELEMENT_PROPS,
115
+ },
116
+ {
117
+ name: "Mark",
118
+ tag: "Mark",
119
+ ...ELEMENT_PROPS,
120
+ },
121
+ {
122
+ name: "BR",
123
+ tag: "BR",
124
+ ...ELEMENT_PROPS,
125
+ },
126
+ {
127
+ name: "BlockQuote",
128
+ tag: "BlockQuote",
129
+ ...ELEMENT_PROPS,
130
+ },
131
+ {
132
+ name: "Time",
133
+ tag: "Time",
134
+ ...ELEMENT_PROPS,
135
+ },
136
+ {
137
+ name: "UL",
138
+ tag: "UL",
139
+ ...ELEMENT_PROPS,
140
+ },
141
+ {
142
+ name: "LI",
143
+ tag: "LI",
144
+ ...ELEMENT_PROPS,
145
+ },
146
+ {
147
+ name: "HR",
148
+ tag: "HR",
149
+ ...ELEMENT_PROPS,
150
+ },
151
+ ];