@draftbit/core 46.2.4-27c60f.5 → 46.2.4-29b0f1.10

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 (71) hide show
  1. package/lib/commonjs/components/{Svg.js → SVG.js} +2 -2
  2. package/lib/commonjs/components/Table/Table.js +35 -0
  3. package/lib/commonjs/components/Table/TableCell.js +50 -0
  4. package/lib/commonjs/components/Table/TableHeader.js +41 -0
  5. package/lib/commonjs/components/Table/TablePaginator.js +17 -0
  6. package/lib/commonjs/components/Table/TableRow.js +47 -0
  7. package/lib/commonjs/components/Table/TableTitle.js +60 -0
  8. package/lib/commonjs/components/Table/index.js +55 -0
  9. package/lib/commonjs/index.js +45 -7
  10. package/lib/commonjs/mappings/{Svg.js → SVG.js} +1 -2
  11. package/lib/commonjs/mappings/Table.js +103 -0
  12. package/lib/commonjs/utilities.js +2 -2
  13. package/lib/module/components/Button.js +11 -32
  14. package/lib/module/components/Checkbox/CheckboxGroupRow.js +6 -24
  15. package/lib/module/components/Checkbox/context.js +1 -1
  16. package/lib/module/components/Picker/PickerComponent.android.js +5 -23
  17. package/lib/module/components/Portal/PortalHost.js +15 -26
  18. package/lib/module/components/ProgressBar.js +7 -23
  19. package/lib/module/components/{Svg.js → SVG.js} +2 -2
  20. package/lib/module/components/StepIndicator.js +16 -33
  21. package/lib/module/components/Table/Table.js +23 -0
  22. package/lib/module/components/Table/TableCell.js +37 -0
  23. package/lib/module/components/Table/TableHeader.js +27 -0
  24. package/lib/module/components/Table/TablePaginator.js +6 -0
  25. package/lib/module/components/Table/TableRow.js +33 -0
  26. package/lib/module/components/Table/TableTitle.js +47 -0
  27. package/lib/module/components/Table/index.js +6 -0
  28. package/lib/module/components/TextField.js +30 -62
  29. package/lib/module/components/ToggleButton.js +3 -17
  30. package/lib/module/components/Touchable.js +2 -18
  31. package/lib/module/index.js +2 -1
  32. package/lib/module/mappings/{Svg.js → SVG.js} +2 -3
  33. package/lib/module/mappings/Table.js +94 -0
  34. package/lib/module/utilities.js +3 -3
  35. package/lib/typescript/src/components/{Svg.d.ts → SVG.d.ts} +3 -3
  36. package/lib/typescript/src/components/Table/Table.d.ts +8 -0
  37. package/lib/typescript/src/components/Table/TableCell.d.ts +10 -0
  38. package/lib/typescript/src/components/Table/TableHeader.d.ts +12 -0
  39. package/lib/typescript/src/components/Table/TablePaginator.d.ts +3 -0
  40. package/lib/typescript/src/components/Table/TableRow.d.ts +12 -0
  41. package/lib/typescript/src/components/Table/TableTitle.d.ts +12 -0
  42. package/lib/typescript/src/components/Table/index.d.ts +6 -0
  43. package/lib/typescript/src/index.d.ts +2 -1
  44. package/lib/typescript/src/mappings/{Svg.d.ts → SVG.d.ts} +0 -1
  45. package/lib/typescript/src/mappings/Table.d.ts +153 -0
  46. package/lib/typescript/src/utilities.d.ts +3 -3
  47. package/package.json +4 -4
  48. package/src/components/{Svg.js → SVG.js} +2 -2
  49. package/src/components/{Svg.tsx → SVG.tsx} +3 -3
  50. package/src/components/Table/Table.js +10 -0
  51. package/src/components/Table/Table.tsx +22 -0
  52. package/src/components/Table/TableCell.js +21 -0
  53. package/src/components/Table/TableCell.tsx +44 -0
  54. package/src/components/Table/TableHeader.js +11 -0
  55. package/src/components/Table/TableHeader.tsx +28 -0
  56. package/src/components/Table/TablePaginator.js +5 -0
  57. package/src/components/Table/TablePaginator.tsx +10 -0
  58. package/src/components/Table/TableRow.js +16 -0
  59. package/src/components/Table/TableRow.tsx +31 -0
  60. package/src/components/Table/TableTitle.js +28 -0
  61. package/src/components/Table/TableTitle.tsx +58 -0
  62. package/src/components/Table/index.js +6 -0
  63. package/src/components/Table/index.tsx +6 -0
  64. package/src/index.js +2 -1
  65. package/src/index.tsx +10 -1
  66. package/src/mappings/{Svg.js → SVG.js} +2 -3
  67. package/src/mappings/{Svg.ts → SVG.ts} +2 -3
  68. package/src/mappings/Table.js +137 -0
  69. package/src/mappings/Table.ts +145 -0
  70. package/src/utilities.js +5 -2
  71. package/src/utilities.ts +13 -2
@@ -1,3 +1,7 @@
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
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+
1
5
  import * as React from "react";
2
6
  import { View, Animated, TextInput as NativeTextInput, StyleSheet, Text, I18nManager } from "react-native";
3
7
  import { withTheme } from "../theming";
@@ -10,7 +14,8 @@ const ICON_SIZE = 24;
10
14
  class TextField extends React.Component {
11
15
  constructor() {
12
16
  super(...arguments);
13
- this.state = {
17
+
18
+ _defineProperty(this, "state", {
14
19
  labeled: new Animated.Value(this.props.value || this.props.error ? 0 : 1),
15
20
  focused: false,
16
21
  placeholder: this.props.error ? this.props.placeholder : "",
@@ -18,35 +23,36 @@ class TextField extends React.Component {
18
23
  measured: false,
19
24
  width: 0
20
25
  }
21
- };
22
- this._timer = setTimeout(() => {}, 0);
26
+ });
27
+
28
+ _defineProperty(this, "_timer", setTimeout(() => {}, 0));
23
29
 
24
- this._showPlaceholder = () => {
30
+ _defineProperty(this, "_showPlaceholder", () => {
25
31
  clearTimeout(this._timer); // Set the placeholder in a delay to offset the label animation
26
32
  // If we show it immediately, they'll overlap and look ugly
27
33
 
28
34
  this._timer = setTimeout(() => this.setState({
29
35
  placeholder: this.props.placeholder
30
36
  }), 50);
31
- };
37
+ });
32
38
 
33
- this._hidePlaceholder = () => this.setState({
39
+ _defineProperty(this, "_hidePlaceholder", () => this.setState({
34
40
  placeholder: ""
35
- });
41
+ }));
36
42
 
37
- this._restoreLabel = () => Animated.timing(this.state.labeled, {
43
+ _defineProperty(this, "_restoreLabel", () => Animated.timing(this.state.labeled, {
38
44
  toValue: 1,
39
45
  duration: FOCUS_ANIMATION_DURATION,
40
46
  useNativeDriver: true
41
- }).start();
47
+ }).start());
42
48
 
43
- this._minmizeLabel = () => Animated.timing(this.state.labeled, {
49
+ _defineProperty(this, "_minmizeLabel", () => Animated.timing(this.state.labeled, {
44
50
  toValue: 0,
45
51
  duration: BLUR_ANIMATION_DURATION,
46
52
  useNativeDriver: true
47
- }).start();
53
+ }).start());
48
54
 
49
- this._handleFocus = () => {
55
+ _defineProperty(this, "_handleFocus", () => {
50
56
  if (this.props.disabled) {
51
57
  return;
52
58
  }
@@ -54,9 +60,9 @@ class TextField extends React.Component {
54
60
  this.setState({
55
61
  focused: true
56
62
  });
57
- };
63
+ });
58
64
 
59
- this._handleBlur = () => {
65
+ _defineProperty(this, "_handleBlur", () => {
60
66
  if (this.props.disabled) {
61
67
  return;
62
68
  }
@@ -64,9 +70,9 @@ class TextField extends React.Component {
64
70
  this.setState({
65
71
  focused: false
66
72
  });
67
- };
73
+ });
68
74
 
69
- this._handleChangeText = value => {
75
+ _defineProperty(this, "_handleChangeText", value => {
70
76
  if (this.props.disabled) {
71
77
  return;
72
78
  }
@@ -82,9 +88,9 @@ class TextField extends React.Component {
82
88
  });
83
89
  this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
84
90
  }
85
- };
91
+ });
86
92
 
87
- this._root = undefined;
93
+ _defineProperty(this, "_root", undefined);
88
94
  }
89
95
 
90
96
  static getDerivedStateFromProps(nextProps, prevState) {
@@ -135,11 +141,10 @@ class TextField extends React.Component {
135
141
  focused: !prevState.focused
136
142
  }));
137
143
  }
144
+
138
145
  /**
139
146
  * @internal
140
147
  */
141
-
142
-
143
148
  setNativeProps(args) {
144
149
  return this._root && this._root.setNativeProps(args);
145
150
  }
@@ -182,8 +187,7 @@ class TextField extends React.Component {
182
187
  roundness,
183
188
  disabledOpacity
184
189
  },
185
- render = props => /*#__PURE__*/React.createElement(NativeTextInput, { ...props
186
- }),
190
+ render = props => /*#__PURE__*/React.createElement(NativeTextInput, props),
187
191
  ...rest
188
192
  } = this.props;
189
193
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
@@ -335,9 +339,9 @@ class TextField extends React.Component {
335
339
  } = StyleSheet.flatten(style || {});
336
340
  return /*#__PURE__*/React.createElement(View, {
337
341
  style: [styles.container, styleProp]
338
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
342
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
339
343
  style: leftIconStyle
340
- }) : null, /*#__PURE__*/React.createElement(View, {
344
+ })) : null, /*#__PURE__*/React.createElement(View, {
341
345
  style: applyStyles([containerStyle], {
342
346
  height: style === null || style === void 0 ? void 0 : style.height,
343
347
  backgroundColor: bgColor,
@@ -404,9 +408,9 @@ class TextField extends React.Component {
404
408
  style: {
405
409
  justifyContent: type === "solid" ? "center" : undefined
406
410
  }
407
- }, /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
411
+ }, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
408
412
  style: leftIconStyle
409
- })) : null, render({
413
+ }))) : null, render({
410
414
  ref: c => {
411
415
  this._root = c;
412
416
  },
@@ -443,42 +447,6 @@ class TextField extends React.Component {
443
447
 
444
448
  }
445
449
 
446
- export default withTheme(TextField);
447
- const styles = StyleSheet.create({
448
- container: {
449
- alignSelf: "stretch"
450
- },
451
- placeholder: {
452
- position: "absolute",
453
- left: 0
454
- },
455
- underline: {
456
- position: "absolute",
457
- left: 0,
458
- right: 0,
459
- bottom: 0,
460
- height: 2
461
- },
462
- input: {
463
- flexGrow: 1,
464
- justifyContent: "center",
465
- textAlignVertical: "center",
466
- margin: 0,
467
- textAlign: I18nManager.isRTL ? "right" : "left"
468
- }
469
- }); "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16
470
- }
471
- }) : null, assistiveText ? /*#__PURE__*/React.createElement(Text, {
472
- style: [{
473
- color: error ? colors.error : colors.light,
474
- marginTop: 8,
475
- marginLeft: assistiveTextLeftMargin
476
- }]
477
- }, assistiveText) : null);
478
- }
479
-
480
- }
481
-
482
450
  export default withTheme(TextField);
483
451
  const styles = StyleSheet.create({
484
452
  container: {
@@ -1,3 +1,5 @@
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
+
1
3
  import * as React from "react";
2
4
  import { withTheme } from "../theming";
3
5
  import { StyleSheet } from "react-native";
@@ -40,29 +42,13 @@ const ToggleButton = _ref => {
40
42
  onPress(!internalValue);
41
43
  };
42
44
 
43
- return /*#__PURE__*/React.createElement(IconButton, {
45
+ return /*#__PURE__*/React.createElement(IconButton, _extends({
44
46
  Icon: Icon,
45
47
  icon: icon,
46
48
  size: iconSize,
47
49
  color: internalValue ? colors[color] : colors[colorSecondary],
48
50
  onPress: handlePress,
49
51
  disabled: disabled,
50
- style: [styles.mainContainer, {
51
- width,
52
- height,
53
- backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
54
- borderColor: colors[borderColor]
55
- }, style],
56
- ...rest
57
- });
58
- };
59
-
60
- const styles = StyleSheet.create({
61
- mainContainer: {
62
- borderWidth: 1
63
- }
64
- });
65
- export default withTheme(ToggleButton);: disabled,
66
52
  style: [styles.mainContainer, {
67
53
  width,
68
54
  height,
@@ -1,3 +1,5 @@
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
+
1
3
  import React from "react";
2
4
  import { Pressable } from "react-native";
3
5
  export default function Touchable(_ref) {
@@ -8,24 +10,6 @@ export default function Touchable(_ref) {
8
10
  style,
9
11
  ...props
10
12
  } = _ref;
11
- return /*#__PURE__*/React.createElement(Pressable, {
12
- onPress: onPress,
13
- disabled: disabled,
14
- hitSlop: 8,
15
- style: _ref2 => {
16
- let {
17
- pressed
18
- } = _ref2;
19
- return [{
20
- opacity: pressed || disabled ? 0.75 : 1
21
- }, style];
22
- },
23
- ...props
24
- }, children);
25
- }s,
26
- style,
27
- ...props
28
- } = _ref;
29
13
  return /*#__PURE__*/React.createElement(Pressable, _extends({
30
14
  onPress: onPress,
31
15
  disabled: disabled,
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
17
17
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
18
18
  export { default as IconButton } from "./components/IconButton";
19
19
  export { default as Image } from "./components/Image";
20
- export { default as Svg } from "./components/Svg";
20
+ export { default as SVG } from "./components/SVG";
21
21
  export { default as NumberInput } from "./components/NumberInput";
22
22
  export { default as ScreenContainer } from "./components/ScreenContainer";
23
23
  export { default as StarRating } from "./components/StarRating";
@@ -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 { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle } from "./components/Table";
34
35
  /* Deprecated: Fix or Delete! */
35
36
 
36
37
  export { default as Button } from "./components/DeprecatedButton";
@@ -1,9 +1,8 @@
1
- import { COMPONENT_TYPES, createSvgProp, StylesPanelSections } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
5
5
  description: "An SVG component",
6
- packageName: "@draftbit/core",
7
6
  category: COMPONENT_TYPES.media,
8
7
  layout: {
9
8
  width: 100,
@@ -11,6 +10,6 @@ export const SEED_DATA = {
11
10
  },
12
11
  stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
13
12
  props: {
14
- source: createSvgProp()
13
+ source: createSVGProp()
15
14
  }
16
15
  };
@@ -0,0 +1,94 @@
1
+ import { COMPONENT_TYPES, GROUPS, createBoolProp, createTextProp, createNumberProp, StylesPanelSections } from "@draftbit/types";
2
+ export const SEED_DATA = [{
3
+ name: "Table",
4
+ tag: "Table",
5
+ category: COMPONENT_TYPES.container,
6
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
7
+ layout: {
8
+ width: "100%"
9
+ },
10
+ props: {}
11
+ }, {
12
+ name: "Table Row",
13
+ tag: "TableRow",
14
+ category: COMPONENT_TYPES.container,
15
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
16
+ layout: {
17
+ paddingLeft: 16,
18
+ paddingRight: 16,
19
+ borderBottomWidth: 1,
20
+ borderStyle: "solid"
21
+ },
22
+ props: {}
23
+ }, {
24
+ name: "Table Cell",
25
+ tag: "TableCell",
26
+ category: COMPONENT_TYPES.container,
27
+ layout: {
28
+ paddingTop: 16,
29
+ paddingBottom: 16,
30
+ paddingLeft: 8,
31
+ paddingRight: 8
32
+ },
33
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
34
+ props: {
35
+ numeric: createBoolProp({
36
+ label: "Is Numeric Cell?",
37
+ description: "Does the cell contain a numeric value?",
38
+ group: GROUPS.data
39
+ }),
40
+ value: createTextProp({
41
+ label: "Cell Value",
42
+ description: "Table Cell Value",
43
+ group: GROUPS.data
44
+ })
45
+ }
46
+ }, {
47
+ name: "Table Header",
48
+ tag: "TableHeader",
49
+ category: COMPONENT_TYPES.container,
50
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
51
+ layout: {
52
+ paddingLeft: 16,
53
+ paddingRight: 16,
54
+ borderBottomWidth: 1,
55
+ borderStyle: "solid",
56
+ backgroundColor: "#EFEFEF"
57
+ },
58
+ props: {}
59
+ }, {
60
+ name: "Table Title",
61
+ tag: "TableTitle",
62
+ category: COMPONENT_TYPES.container,
63
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
64
+ layout: {
65
+ fontSize: 14,
66
+ fontWeight: "500",
67
+ paddingTop: 16,
68
+ paddingBottom: 16,
69
+ paddingLeft: 8,
70
+ paddingRight: 8
71
+ },
72
+ props: {
73
+ numeric: createBoolProp({
74
+ label: "Is Numeric Cell?",
75
+ description: "Does the cell contain a numeric value?",
76
+ group: GROUPS.data
77
+ }),
78
+ value: createTextProp({
79
+ label: "Cell Value",
80
+ description: "Table Cell Value",
81
+ group: GROUPS.data
82
+ }),
83
+ isAscending: createBoolProp({
84
+ label: "Is Ascending?",
85
+ description: "Does the cell contain a numeric value?",
86
+ group: GROUPS.data
87
+ }),
88
+ numberOfLines: createNumberProp({
89
+ label: "Number of Lines",
90
+ description: "Number of Lines",
91
+ group: GROUPS.basic
92
+ })
93
+ }
94
+ }];
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from "react-native";
2
- import { isString, isNumber, pick, pickBy, identity } from "lodash";
2
+ import { isString, isNumber, pick, pickBy, identity, omitBy, isNil } from "lodash";
3
3
  export function extractStyles(style) {
4
4
  const {
5
5
  color,
@@ -29,8 +29,8 @@ export function extractStyles(style) {
29
29
  textDecorationStyle
30
30
  };
31
31
  return {
32
- viewStyles,
33
- textStyles
32
+ viewStyles: omitBy(viewStyles, isNil),
33
+ textStyles: omitBy(textStyles, isNil)
34
34
  };
35
35
  }
36
36
  export const borderStyleNames = ["borderRadius", "borderBottomColor", "borderBottomEndRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderEndColor", "borderLeftColor", "borderLeftWidth", "borderRadius", "borderRightColor", "borderRightWidth", "borderStartColor", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth"];
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { StyleProp, ImageStyle } from "react-native";
3
- declare type SvgComponentProps = {
3
+ declare type SVGComponentProps = {
4
4
  source: string;
5
5
  style?: StyleProp<ImageStyle>;
6
6
  };
7
- declare const Svg: React.FC<React.PropsWithChildren<SvgComponentProps>>;
8
- export default Svg;
7
+ declare const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>>;
8
+ export default SVG;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ export interface TableProps {
4
+ children: React.ReactNode;
5
+ style?: StyleProp<ViewStyle>;
6
+ }
7
+ declare const Table: ({ children, style, ...rest }: TableProps) => JSX.Element;
8
+ export default Table;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ export interface TableCellProps {
4
+ children: React.ReactNode;
5
+ numeric?: boolean;
6
+ style?: StyleProp<ViewStyle>;
7
+ value: string;
8
+ }
9
+ declare const TableCell: ({ children, style, numeric, value, ...rest }: TableCellProps) => JSX.Element;
10
+ export default TableCell;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import { Theme } from "../../styles/DefaultTheme";
4
+ export interface TableHeaderProps {
5
+ children: React.ReactNode;
6
+ style?: StyleProp<ViewStyle>;
7
+ theme: Theme;
8
+ }
9
+ declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<TableHeaderProps, "theme"> & {
10
+ theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
11
+ }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<TableHeaderProps> & (({ children, style, theme, ...rest }: TableHeaderProps) => JSX.Element), {}>;
12
+ export default _default;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const TablePaginator: () => JSX.Element;
3
+ export default TablePaginator;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import { Theme } from "../../styles/DefaultTheme";
4
+ export interface TableRowProps {
5
+ children: React.ReactNode;
6
+ style?: StyleProp<ViewStyle>;
7
+ theme: Theme;
8
+ }
9
+ declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<TableRowProps, "theme"> & {
10
+ theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
11
+ }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<TableRowProps> & (({ children, style, theme, ...rest }: TableRowProps) => JSX.Element), {}>;
12
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ export interface TableCellProps {
4
+ children: React.ReactNode;
5
+ numeric?: boolean;
6
+ isAscending: boolean;
7
+ numberOfLines?: number;
8
+ title?: string;
9
+ style?: StyleProp<ViewStyle>;
10
+ }
11
+ declare const TableTitle: ({ children, style, numeric, isAscending, numberOfLines, title, ...rest }: TableCellProps) => JSX.Element;
12
+ export default TableTitle;
@@ -0,0 +1,6 @@
1
+ export { default as Table } from "./Table";
2
+ export { default as TableHeader } from "./TableHeader";
3
+ export { default as TablePaginator } from "./TablePaginator";
4
+ export { default as TableRow } from "./TableRow";
5
+ export { default as TableCell } from "./TableCell";
6
+ export { default as TableTitle } from "./TableTitle";
@@ -17,7 +17,7 @@ export { default as FAB } from "./components/FAB";
17
17
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
18
18
  export { default as IconButton } from "./components/IconButton";
19
19
  export { default as Image } from "./components/Image";
20
- export { default as Svg } from "./components/Svg";
20
+ export { default as SVG } from "./components/SVG";
21
21
  export { default as NumberInput } from "./components/NumberInput";
22
22
  export { default as ScreenContainer } from "./components/ScreenContainer";
23
23
  export { default as StarRating } from "./components/StarRating";
@@ -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 { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
34
35
  export { default as Button } from "./components/DeprecatedButton";
35
36
  export { default as CardBlock } from "./components/CardBlock";
36
37
  export { default as CardContainer } from "./components/CardContainer";
@@ -2,7 +2,6 @@ export declare const SEED_DATA: {
2
2
  name: string;
3
3
  tag: string;
4
4
  description: string;
5
- packageName: string;
6
5
  category: string;
7
6
  layout: {
8
7
  width: number;
@@ -0,0 +1,153 @@
1
+ export declare const SEED_DATA: ({
2
+ name: string;
3
+ tag: string;
4
+ category: string;
5
+ stylesPanelSections: string[];
6
+ layout: {
7
+ width: string;
8
+ paddingLeft?: undefined;
9
+ paddingRight?: undefined;
10
+ borderBottomWidth?: undefined;
11
+ borderStyle?: undefined;
12
+ paddingTop?: undefined;
13
+ paddingBottom?: undefined;
14
+ backgroundColor?: undefined;
15
+ fontSize?: undefined;
16
+ fontWeight?: undefined;
17
+ };
18
+ props: {
19
+ numeric?: undefined;
20
+ value?: undefined;
21
+ isAscending?: undefined;
22
+ numberOfLines?: undefined;
23
+ };
24
+ } | {
25
+ name: string;
26
+ tag: string;
27
+ category: string;
28
+ stylesPanelSections: string[];
29
+ layout: {
30
+ paddingLeft: number;
31
+ paddingRight: number;
32
+ borderBottomWidth: number;
33
+ borderStyle: string;
34
+ width?: undefined;
35
+ paddingTop?: undefined;
36
+ paddingBottom?: undefined;
37
+ backgroundColor?: undefined;
38
+ fontSize?: undefined;
39
+ fontWeight?: undefined;
40
+ };
41
+ props: {
42
+ numeric?: undefined;
43
+ value?: undefined;
44
+ isAscending?: undefined;
45
+ numberOfLines?: undefined;
46
+ };
47
+ } | {
48
+ name: string;
49
+ tag: string;
50
+ category: string;
51
+ layout: {
52
+ paddingTop: number;
53
+ paddingBottom: number;
54
+ paddingLeft: number;
55
+ paddingRight: number;
56
+ width?: undefined;
57
+ borderBottomWidth?: undefined;
58
+ borderStyle?: undefined;
59
+ backgroundColor?: undefined;
60
+ fontSize?: undefined;
61
+ fontWeight?: undefined;
62
+ };
63
+ stylesPanelSections: string[];
64
+ props: {
65
+ numeric: {
66
+ label: string;
67
+ description: string;
68
+ formType: string;
69
+ propType: string;
70
+ defaultValue: boolean;
71
+ editable: boolean;
72
+ required: boolean;
73
+ group: string;
74
+ };
75
+ value: any;
76
+ isAscending?: undefined;
77
+ numberOfLines?: undefined;
78
+ };
79
+ } | {
80
+ name: string;
81
+ tag: string;
82
+ category: string;
83
+ stylesPanelSections: string[];
84
+ layout: {
85
+ paddingLeft: number;
86
+ paddingRight: number;
87
+ borderBottomWidth: number;
88
+ borderStyle: string;
89
+ backgroundColor: string;
90
+ width?: undefined;
91
+ paddingTop?: undefined;
92
+ paddingBottom?: undefined;
93
+ fontSize?: undefined;
94
+ fontWeight?: undefined;
95
+ };
96
+ props: {
97
+ numeric?: undefined;
98
+ value?: undefined;
99
+ isAscending?: undefined;
100
+ numberOfLines?: undefined;
101
+ };
102
+ } | {
103
+ name: string;
104
+ tag: string;
105
+ category: string;
106
+ stylesPanelSections: string[];
107
+ layout: {
108
+ fontSize: number;
109
+ fontWeight: string;
110
+ paddingTop: number;
111
+ paddingBottom: number;
112
+ paddingLeft: number;
113
+ paddingRight: number;
114
+ width?: undefined;
115
+ borderBottomWidth?: undefined;
116
+ borderStyle?: undefined;
117
+ backgroundColor?: undefined;
118
+ };
119
+ props: {
120
+ numeric: {
121
+ label: string;
122
+ description: string;
123
+ formType: string;
124
+ propType: string;
125
+ defaultValue: boolean;
126
+ editable: boolean;
127
+ required: boolean;
128
+ group: string;
129
+ };
130
+ value: any;
131
+ isAscending: {
132
+ label: string;
133
+ description: string;
134
+ formType: string;
135
+ propType: string;
136
+ defaultValue: boolean;
137
+ editable: boolean;
138
+ required: boolean;
139
+ group: string;
140
+ };
141
+ numberOfLines: {
142
+ label: string;
143
+ description: string;
144
+ formType: string;
145
+ propType: string;
146
+ group: string;
147
+ defaultValue: null;
148
+ editable: boolean;
149
+ required: boolean;
150
+ step: number;
151
+ };
152
+ };
153
+ })[];