app-studio 0.0.7 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -79,9 +79,10 @@ function Example() {
79
79
  }
80
80
  ```
81
81
 
82
- ### Responsive
83
82
 
83
+ You can Use View is use <div> tag you can use Div, Span, Form, Input, Image components if you need another tag.
84
84
 
85
+ ### Responsive
85
86
 
86
87
  ```jsx
87
88
  import React from 'react';
@@ -89,6 +90,8 @@ import { ResponsiveProvider } from 'app-studio';
89
90
 
90
91
  const Example = () => {
91
92
  const { screen, on } = useResponsive();
93
+ // "screen" provide you the screen size corresponding to you breakpoints
94
+ // "on" tell you is screen size is included corresponding to you devices
92
95
  const responsive = {
93
96
  xs: {
94
97
  backgroundColor: 'red',
@@ -168,7 +171,8 @@ const theme = {
168
171
  }
169
172
 
170
173
  };
171
-
174
+ // color will be replaced by the value form the theme
175
+ // all the colors props like backgroundColor will have the color from the theme
172
176
  function Example() {
173
177
  return (
174
178
  <ThemeProvider theme={theme}>
@@ -8,6 +8,7 @@ var React = require('react');
8
8
  var React__default = _interopDefault(React);
9
9
  var Color = _interopDefault(require('color-convert'));
10
10
  var styled = _interopDefault(require('styled-components'));
11
+ var unitlessKeys = _interopDefault(require('@emotion/unitless'));
11
12
 
12
13
  function _inheritsLoose(subClass, superClass) {
13
14
  subClass.prototype = Object.create(superClass.prototype);
@@ -492,26 +493,51 @@ var shadows = {
492
493
  }
493
494
  };
494
495
 
495
- var TransformStyleProps = ['transform', 'transformMatrix', 'rotation', 'scaleX', 'scaleY', 'translateX', 'translateY', // 'perspective',
496
- // 'rotate',
497
- // 'rotateX',
498
- // 'rotateY',
499
- // 'rotateZ',
500
- // 'scale',
501
- // 'skewX',
502
- // 'skewY',
503
- 'testID', 'decomposedMatrix'];
504
- var ImageStyleProps = ['borderTopRightRadius', 'backfaceVisibility', 'borderBottomLeftRadius', 'borderBottomRightRadius', 'borderColor', 'borderRadius', 'borderTopLeftRadius', 'backgroundColor', 'borderWidth', 'opacity', 'overflow', 'overflowX', 'overflowY', 'resizeMode', 'tintColor', 'overlayColor'];
505
- var LayoutStyleProps = ['alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'borderBottomWidth', 'borderEndWidth', 'borderLeftWidth', 'borderRightWidth', 'borderStartWidth', 'borderTopWidth', 'borderWidth', 'bottom', 'direction', 'display', 'end', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'height', 'justifyContent', 'left', 'margin', 'marginBottom', 'marginEnd', 'marginHorizontal', 'marginLeft', 'marginRight', 'marginStart', 'marginTop', 'marginVertical', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'overflow', 'overflowX', 'overflowY', 'padding', 'paddingBottom', 'paddingEnd', 'paddingHorizontal', 'paddingLeft', 'paddingRight', 'paddingStart', 'paddingTop', 'paddingVertical', 'position', 'right', 'start', 'top', 'width', 'zIndex'];
506
- var ShadowStyleProps = ['shadowColor', 'shadowOffset', 'shadowOpacity', 'shadowRadius'];
507
- var TextStyleProps = ['textShadowOffset', 'color', 'fontSize', 'fontStyle', 'fontWeight', 'lineHeight', 'textAlign', 'textDecorationLine', 'textShadowColor', 'fontFamily', 'textShadowRadius', 'includeFontPadding', 'textAlignVertical', 'fontVariant', 'letterSpacing', 'textDecorationColor', 'textDecorationStyle', 'textTransform', 'writingDirection'];
508
- var ViewStyleProps = ['borderRightColor', 'backfaceVisibility', 'borderBottomColor', 'borderBottomEndRadius', 'borderBottomLeftRadius', 'borderBottomRightRadius', 'borderBottomStartRadius', 'borderBottomWidth', 'borderColor', 'borderEndColor', 'borderLeftColor', 'borderLeftWidth', 'borderRadius', 'backgroundColor', 'borderRightWidth', 'borderStartColor', 'borderStyle', 'borderTopColor', 'borderTopEndRadius', 'borderTopLeftRadius', 'borderTopRightRadius', 'borderTopStartRadius', 'borderTopWidth', 'borderWidth', 'border', 'opacity', 'elevation', 'size'];
509
- var ScrollViewStyleProps = ['alwaysBounceHorizontal', 'alwaysBounceVertical', 'automaticallyAdjustContentInsets', 'bounces', 'bouncesZoom', 'canCancelContentTouches', 'centerContent', 'contentLayoutStyle', 'contentInset', 'contentInsetAdjustmentBehavior', 'contentOffset', 'decelerationRate', 'directionalLockEnabled', 'disableIntervalMomentum', 'disableScrollViewPanResponder', 'endFillColor', 'fadingEdgeLength', 'horizontal', 'indicatorStyle', 'invertStickyHeaders', 'keyboardDismissMode', 'keyboardShouldPersistTaps', 'maintainVisibleContentPosition', 'maximumZoomScale', 'minimumZoomScale', 'nestedScrollEnabled', 'onContentSizeChange', 'onMomentumScrollBegin', 'onMomentumScrollEnd', 'onScroll', 'onScrollBeginDrag', 'onScrollEndDrag', 'onScrollToTop', 'overScrollMode', 'pagingEnabled', 'persistentScrollbar', 'pinchGestureEnabled', 'refreshControl', 'removeClippedSubviews', 'scrollBarThumbImage', 'scrollEnabled', 'scrollEventThrottle', 'scrollIndicatorInsets', 'scrollPerfTag', 'scrollToOverflowEnabled', 'scrollsToTop', 'DEPRECATED_sendUpdatedChildFrames', 'showsHorizontalScrollIndicator', 'showsVerticalScrollIndicator', 'snapToAlignment', 'snapToEnd', 'snapToInterval', 'snapToOffsets', 'snapToStart', 'stickyHeaderIndices', 'zoomScale'];
510
- var allStyleProps = /*#__PURE__*/LayoutStyleProps.concat(ShadowStyleProps, TransformStyleProps, ViewStyleProps, ScrollViewStyleProps, TextStyleProps, ImageStyleProps);
496
+ var unitlessStyleProps = /*#__PURE__*/Object.keys(unitlessKeys);
497
+ var validStyleProps = ['alignContent', 'alignItems', 'alignSelf', 'alignmentBaseline', 'all', 'animation', 'animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction', 'appearance', 'backdropFilter', 'backfaceVisibility', 'background', 'backgroundAttachment', 'backgroundBlendMode', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPosition', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundRepeatX', 'backgroundRepeatY', 'backgroundSize', 'baselineShift', 'blockSize', 'border', 'borderBlockEnd', 'borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth', 'borderBlockStart', 'borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth', 'borderBottom', 'borderBottomColor', 'borderBottomLeftRadius', 'borderBottomRightRadius', 'borderBottomStyle', 'borderBottomWidth', 'borderCollapse', 'borderColor', 'borderImage', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderInlineEnd', 'borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth', 'borderInlineStart', 'borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth', 'borderLeft', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRadius', 'borderRight', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderSpacing', 'borderStyle', 'borderTop', 'borderTopColor', 'borderTopLeftRadius', 'borderTopRightRadius', 'borderTopStyle', 'borderTopWidth', 'borderWidth', 'bottom', 'boxShadow', 'boxSizing', 'breakAfter', 'breakBefore', 'breakInside', 'bufferedRendering', 'captionSide', 'caretColor', 'clear', 'clip', 'clipPath', 'clipRule', 'color', 'colorInterpolation', 'colorInterpolationFilters', 'colorRendering', 'columnCount', 'columnFill', 'columnGap', 'columnRule', 'columnRuleColor', 'columnRuleStyle', 'columnRuleWidth', 'columnSpan', 'columnWidth', 'columns', 'contain', 'content', 'counterIncrement', 'counterReset', 'cursor', 'cx', 'cy', 'd', 'direction', 'display', 'dominantBaseline', 'emptyCells', 'fill', 'fillOpacity', 'fillRule', 'filter', 'flex', 'flexBasis', 'flexDirection', 'flexFlow', 'flexGrow', 'flexShrink', 'flexWrap', 'float', 'floodColor', 'floodOpacity', 'font', 'fontDisplay', 'fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontSize', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariationSettings', 'fontWeight', 'gap', 'grid', 'gridArea', 'gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridColumn', 'gridColumnEnd', 'gridColumnGap', 'gridColumnStart', 'gridGap', 'gridRow', 'gridRowEnd', 'gridRowGap', 'gridRowStart', 'gridTemplate', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows', 'height', 'hyphens', 'imageRendering', 'inlineSize', 'isolation', 'justifyContent', 'justifyItems', 'justifySelf', 'left', 'letterSpacing', 'lightingColor', 'lineBreak', 'lineHeight', 'listStyle', 'listStyleImage', 'listStylePosition', 'listStyleType', 'margin', 'marginBlockEnd', 'marginBlockStart', 'marginBottom', 'marginInlineEnd', 'marginInlineStart', 'marginLeft', 'marginRight', 'marginTop', 'marker', 'markerEnd', 'markerMid', 'markerStart', 'mask', 'maskType', 'maxBlockSize', 'maxHeight', 'maxInlineSize', 'maxWidth', 'maxZoom', 'minBlockSize', 'minHeight', 'minInlineSize', 'minWidth', 'minZoom', 'mixBlendMode', 'objectFit', 'objectPosition', 'offset', 'offsetDistance', 'offsetPath', 'offsetRotate', 'opacity', 'order', 'orientation', 'orphans', 'outline', 'outlineColor', 'outlineOffset', 'outlineStyle', 'outlineWidth', 'overflow', 'overflowAnchor', 'overflowWrap', 'overflowX', 'overflowY', 'overscrollBehavior', 'overscrollBehaviorBlock', 'overscrollBehaviorInline', 'overscrollBehaviorX', 'overscrollBehaviorY', 'padding', 'paddingBlockEnd', 'paddingBlockStart', 'paddingBottom', 'paddingInlineEnd', 'paddingInlineStart', 'paddingLeft', 'paddingRight', 'paddingTop', 'page', 'pageBreakAfter', 'pageBreakBefore', 'pageBreakInside', 'paintOrder', 'perspective', 'perspectiveOrigin', 'placeContent', 'placeItems', 'placeSelf', 'pointerEvents', 'position', 'quotes', 'r', 'resize', 'right', 'rowGap', 'rx', 'ry', 'scrollBehavior', 'scrollMargin', 'scrollMarginBlock', 'scrollMarginBlockEnd', 'scrollMarginBlockStart', 'scrollMarginBottom', 'scrollMarginInline', 'scrollMarginInlineEnd', 'scrollMarginInlineStart', 'scrollMarginLeft', 'scrollMarginRight', 'scrollMarginTop', 'scrollPadding', 'scrollPaddingBlock', 'scrollPaddingBlockEnd', 'scrollPaddingBlockStart', 'scrollPaddingBottom', 'scrollPaddingInline', 'scrollPaddingInlineEnd', 'scrollPaddingInlineStart', 'scrollPaddingLeft', 'scrollPaddingRight', 'scrollPaddingTop', 'scrollSnapAlign', 'scrollSnapStop', 'scrollSnapType', 'shapeImageThreshold', 'shapeMargin', 'shapeOutside', 'shapeRendering', 'size', 'speak', 'src', 'stopColor', 'stopOpacity', 'stroke', 'strokeDasharray', 'strokeDashoffset', 'strokeLinecap', 'strokeLinejoin', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'tableLayout', 'textAlign', 'textAlignLast', 'textAnchor', 'textCombineUpright', 'textDecoration', 'textDecorationColor', 'textDecorationLine', 'textDecorationSkipInk', 'textDecorationStyle', 'textIndent', 'textOrientation', 'textOverflow', 'textRendering', 'textShadow', 'textSizeAdjust', 'textTransform', 'textUnderlinePosition', 'top', 'touchAction', 'transform', 'transformBox', 'transformOrigin', 'transformStyle', 'transition', 'transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction', 'unicodeBidi', 'unicodeRange', 'userSelect', 'userZoom', 'vectorEffect', 'verticalAlign', 'visibility', 'whiteSpace', 'widows', 'width', 'willChange', 'wordBreak', 'wordSpacing', 'wordWrap', 'writingMode', 'x', 'y', 'zIndex', 'zoom', 'alwaysBounceHorizontal', 'alwaysBounceVertical', 'automaticallyAdjustContentInsets', 'bounces', 'bouncesZoom', 'canCancelContentTouches', 'centerContent', 'contentLayoutStyle', 'contentInset', 'contentInsetAdjustmentBehavior', 'contentOffset', 'decelerationRate', 'directionalLockEnabled', 'disableIntervalMomentum', 'disableScrollViewPanResponder', 'endFillColor', 'fadingEdgeLength', 'horizontal', 'indicatorStyle', 'invertStickyHeaders', 'keyboardDismissMode', 'keyboardShouldPersistTaps', 'maintainVisibleContentPosition', 'maximumZoomScale', 'minimumZoomScale', 'nestedScrollEnabled', 'onContentSizeChange', 'onMomentumScrollBegin', 'onMomentumScrollEnd', 'onScroll', 'onScrollBeginDrag', 'onScrollEndDrag', 'onScrollToTop', 'overScrollMode', 'pagingEnabled', 'persistentScrollbar', 'pinchGestureEnabled', 'refreshControl', 'removeClippedSubviews', 'scrollBarThumbImage', 'scrollEnabled', 'scrollEventThrottle', 'scrollIndicatorInsets', 'scrollPerfTag', 'scrollToOverflowEnabled', 'scrollsToTop', 'DEPRECATED_sendUpdatedChildFrames', 'showsHorizontalScrollIndicator', 'showsVerticalScrollIndicator', 'snapToAlignment', 'snapToEnd', 'snapToInterval', 'snapToOffsets', 'snapToStart', 'stickyHeaderIndices', 'zoomScale', 'borderRightColor', 'backfaceVisibility', 'borderBottomColor', 'borderBottomEndRadius', 'borderBottomLeftRadius', 'borderBottomRightRadius', 'borderBottomStartRadius', 'borderBottomWidth', 'borderColor', 'borderEndColor', 'borderLeftColor', 'borderLeftWidth', 'borderRadius', 'backgroundColor', 'borderRightWidth', 'borderStartColor', 'borderStyle', 'borderTopColor', 'borderTopEndRadius', 'borderTopLeftRadius', 'borderTopRightRadius', 'borderTopStartRadius', 'borderTopWidth', 'borderWidth', 'border', 'opacity', 'elevation', 'shadowColor', 'shadowOffset', 'shadowOpacity', 'shadowRadius', 'alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'borderBottomWidth', 'borderEndWidth', 'borderLeftWidth', 'borderRightWidth', 'borderStartWidth', 'borderTopWidth', 'borderWidth', 'bottom', 'direction', 'display', 'end', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'height', 'justifyContent', 'left', 'margin', 'marginBottom', 'marginEnd', 'marginHorizontal', 'marginLeft', 'marginRight', 'marginStart', 'marginTop', 'marginVertical', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'overflow', 'overflowX', 'overflowY', 'padding', 'paddingBottom', 'paddingEnd', 'paddingHorizontal', 'paddingLeft', 'paddingRight', 'paddingStart', 'paddingTop', 'paddingVertical', 'position', 'right', 'start', 'top', 'width', 'zIndex', 'borderTopRightRadius', 'backfaceVisibility', 'borderBottomLeftRadius', 'borderBottomRightRadius', 'borderColor', 'borderRadius', 'borderTopLeftRadius', 'backgroundColor', 'borderWidth', 'opacity', 'overflow', 'overflowX', 'overflowY', 'resizeMode', 'tintColor', 'overlayColor', 'transform', 'transformMatrix', 'rotation', 'scaleX', 'scaleY', 'translateX', 'translateY', 'perspective', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'skewX', 'skewY', 'testID', 'decomposedMatrix'];
498
+ /**
499
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
500
+ * @param {string} key style name, eg: transitionDuration
501
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
502
+ * WebkitTransitionDuration
503
+ */
504
+
505
+ function prefixKey(prefix, key) {
506
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
507
+ }
508
+ /**
509
+ * Support style names that may come passed in prefixed by adding permutations
510
+ * of vendor prefixes.
511
+ */
512
+
513
+
514
+ var prefixes = ['webkit', 'ms', 'moz'];
515
+ /**
516
+ * Add vendor prefixing to unitless style keys.
517
+ */
518
+
519
+ unitlessStyleProps.forEach(function (prop) {
520
+ prefixes.forEach(function (prefix) {
521
+ unitlessStyleProps.push(prefixKey(prefix, prop));
522
+ });
523
+ });
524
+ /**
525
+ * Add all unitless style keys to valid style keys.
526
+ */
527
+
528
+ unitlessStyleProps.forEach(function (prop) {
529
+ if (validStyleProps.includes(prop)) {
530
+ validStyleProps.push(prop);
531
+ }
532
+ });
511
533
  var StyleProps = {};
512
- allStyleProps.map(function (property) {
534
+ validStyleProps.map(function (property) {
513
535
  StyleProps[property] = true;
514
536
  });
537
+ var isStyleProp = function isStyleProp(property) {
538
+ return StyleProps[property] !== undefined;
539
+ };
540
+
515
541
  var NumberPropsStyle = {};
516
542
  var NumberProps = ['numberOfLines', 'fontWeight', 'timeStamp', 'flex', 'flexGrow', 'flexShrink', 'order', 'zIndex', 'aspectRatio', 'shadowOpacity', 'shadowRadius', 'scale', 'opacity', 'min', 'max', 'now'];
517
543
  NumberProps.map(function (property) {
@@ -526,7 +552,7 @@ var applyStyle = function applyStyle(props) {
526
552
 
527
553
  var newProps = {};
528
554
 
529
- if (props.onClick) {
555
+ if (props.onClick && newProps.cursor == undefined) {
530
556
  newProps.cursor = 'pointer';
531
557
  }
532
558
 
@@ -572,7 +598,7 @@ var applyStyle = function applyStyle(props) {
572
598
  }
573
599
 
574
600
  Object.keys(props).map(function (property) {
575
- if (StyleProps[property] !== undefined || property == 'on') {
601
+ if (isStyleProp(property) || property == 'on') {
576
602
  if (typeof props[property] === 'number' && NumberPropsStyle[property] === undefined) {
577
603
  newProps[property] = props[property] + 'px';
578
604
  } else if (property.toLowerCase().indexOf('color') !== -1) {
@@ -641,6 +667,15 @@ var StyledView = /*#__PURE__*/styled.div(function (props) {
641
667
  var StyledImage = /*#__PURE__*/styled.img(function (props) {
642
668
  return applyStyle(props);
643
669
  });
670
+ var StyledSpan = /*#__PURE__*/styled.span(function (props) {
671
+ return applyStyle(props);
672
+ });
673
+ var StyledInput = /*#__PURE__*/styled.input(function (props) {
674
+ return applyStyle(props);
675
+ });
676
+ var StyledForm = /*#__PURE__*/styled.form(function (props) {
677
+ return applyStyle(props);
678
+ });
644
679
  var ViewElement = /*#__PURE__*/function (_React$PureComponent) {
645
680
  _inheritsLoose(ViewElement, _React$PureComponent);
646
681
 
@@ -688,122 +723,134 @@ var ImageElement = /*#__PURE__*/function (_React$PureComponent2) {
688
723
 
689
724
  return ImageElement;
690
725
  }(React__default.PureComponent);
726
+ var SpanElement = /*#__PURE__*/function (_React$PureComponent3) {
727
+ _inheritsLoose(SpanElement, _React$PureComponent3);
691
728
 
692
- var View = function View(props) {
693
- return React__default.createElement(ViewElement, Object.assign({}, props));
694
- };
695
- var SafeArea = View;
696
- var Scroll = function Scroll(props) {
697
- return React__default.createElement(View, Object.assign({
698
- overflow: 'auto'
699
- }, props));
700
- };
729
+ function SpanElement() {
730
+ return _React$PureComponent3.apply(this, arguments) || this;
731
+ }
701
732
 
702
- var _excluded = ["src", "onClick", "onPress"],
703
- _excluded2 = ["size", "src"],
704
- _excluded3 = ["size", "src"];
705
- var ImageBackground = /*#__PURE__*/function (_React$PureComponent) {
706
- _inheritsLoose(ImageBackground, _React$PureComponent);
733
+ var _proto3 = SpanElement.prototype;
707
734
 
708
- function ImageBackground() {
709
- return _React$PureComponent.apply(this, arguments) || this;
710
- }
735
+ _proto3.render = function render() {
736
+ var onClick = this.props.onClick;
711
737
 
712
- var _proto = ImageBackground.prototype;
738
+ if (this.props.onPress !== undefined) {
739
+ onClick = this.props.onPress;
740
+ }
713
741
 
714
- _proto.render = function render() {
715
- var _this$props = this.props,
716
- src = _this$props.src,
717
- onClick = _this$props.onClick,
718
- onPress = _this$props.onPress,
719
- props = _objectWithoutPropertiesLoose(_this$props, _excluded);
720
-
721
- return React__default.createElement(View, Object.assign({
722
- style: {
723
- backgroundSize: 'contain',
724
- backgroundImage: "url(\"" + src + "\")",
725
- backgroundPosition: 'center center',
726
- backgroundRepeat: 'no-repeat'
727
- },
728
- onClick: onClick ? onClick : onPress
729
- }, props));
742
+ return React__default.createElement(StyledSpan, Object.assign({}, this.props, {
743
+ onClick: onClick
744
+ }));
730
745
  };
731
746
 
732
- return ImageBackground;
747
+ return SpanElement;
733
748
  }(React__default.PureComponent);
734
- var Image = function Image(props) {
735
- return React__default.createElement(ImageElement, Object.assign({}, props));
736
- };
737
- var RoundedImage = function RoundedImage(_ref) {
738
- var size = _ref.size,
739
- src = _ref.src,
740
- props = _objectWithoutPropertiesLoose(_ref, _excluded2);
741
-
742
- return React__default.createElement(ImageBackground, Object.assign({
743
- borderRadius: size / 2,
744
- size: size,
745
- src: src
746
- }, props));
747
- };
748
- var SquaredImage = function SquaredImage(_ref2) {
749
- var size = _ref2.size,
750
- src = _ref2.src,
751
- props = _objectWithoutPropertiesLoose(_ref2, _excluded3);
752
-
753
- return React__default.createElement(ImageBackground, Object.assign({}, props, {
754
- size: size,
755
- src: src
756
- }));
757
- };
758
-
759
- var _excluded$1 = ["toUpperCase", "children", "toFormat"];
760
- var TextSpan = /*#__PURE__*/styled.div(function (props) {
761
- props.display = 'inherit';
762
- props.flexDirection = 'column';
763
- return applyStyle(props);
764
- });
765
- var Text = /*#__PURE__*/function (_React$PureComponent) {
766
- _inheritsLoose(Text, _React$PureComponent);
749
+ var InputElement = /*#__PURE__*/function (_React$PureComponent4) {
750
+ _inheritsLoose(InputElement, _React$PureComponent4);
767
751
 
768
- function Text() {
769
- return _React$PureComponent.apply(this, arguments) || this;
752
+ function InputElement() {
753
+ return _React$PureComponent4.apply(this, arguments) || this;
770
754
  }
771
755
 
772
- var _proto = Text.prototype;
756
+ var _proto4 = InputElement.prototype;
773
757
 
774
- _proto.render = function render() {
775
- var _this$props = this.props,
776
- _this$props$toUpperCa = _this$props.toUpperCase,
777
- toUpperCase = _this$props$toUpperCa === void 0 ? false : _this$props$toUpperCa,
778
- children = _this$props.children,
779
- _this$props$toFormat = _this$props.toFormat,
780
- toFormat = _this$props$toFormat === void 0 ? false : _this$props$toFormat,
781
- props = _objectWithoutPropertiesLoose(_this$props, _excluded$1);
782
-
783
- var content = children;
784
-
785
- if (children && typeof children === 'string') {
786
- content = children.toString().trim();
787
- }
758
+ _proto4.render = function render() {
759
+ var onClick = this.props.onClick;
788
760
 
789
- if (typeof content === 'string' && toUpperCase) {
790
- content = content.toUpperCase();
761
+ if (this.props.onPress !== undefined) {
762
+ onClick = this.props.onPress;
791
763
  }
792
764
 
793
- if (typeof content === 'string' && toFormat) {
794
- content = content.split('\n').map(function (item, key) {
795
- return React__default.createElement("span", {
796
- key: key.toString()
797
- }, item, React__default.createElement("br", null));
798
- });
765
+ return React__default.createElement(StyledInput, Object.assign({}, this.props, {
766
+ onClick: onClick
767
+ }));
768
+ };
769
+
770
+ return InputElement;
771
+ }(React__default.PureComponent);
772
+ var FormElement = /*#__PURE__*/function (_React$PureComponent5) {
773
+ _inheritsLoose(FormElement, _React$PureComponent5);
774
+
775
+ function FormElement() {
776
+ return _React$PureComponent5.apply(this, arguments) || this;
777
+ }
778
+
779
+ var _proto5 = FormElement.prototype;
780
+
781
+ _proto5.render = function render() {
782
+ var onClick = this.props.onClick;
783
+
784
+ if (this.props.onPress !== undefined) {
785
+ onClick = this.props.onPress;
799
786
  }
800
787
 
801
- return React__default.createElement(TextSpan, Object.assign({}, props), content);
788
+ return React__default.createElement(StyledForm, Object.assign({}, this.props, {
789
+ onClick: onClick
790
+ }));
802
791
  };
803
792
 
804
- return Text;
793
+ return FormElement;
805
794
  }(React__default.PureComponent);
806
795
 
796
+ var View = function View(props) {
797
+ return React__default.createElement(ViewElement, Object.assign({}, props));
798
+ };
799
+ var Div = View;
800
+ var SafeArea = View;
801
+ var Scroll = function Scroll(props) {
802
+ return React__default.createElement(View, Object.assign({
803
+ overflow: 'auto'
804
+ }, props));
805
+ };
806
+ var Span = function Span(props) {
807
+ return React__default.createElement(SpanElement, Object.assign({}, props));
808
+ };
809
+
810
+ var Image = function Image(props) {
811
+ return React__default.createElement(ImageElement, Object.assign({}, props));
812
+ };
813
+
814
+ var _excluded = ["toUpperCase", "children"];
815
+ var TextSpan = /*#__PURE__*/styled.span(function (props) {
816
+ return applyStyle(props);
817
+ });
818
+ var Text = function Text(props) {
819
+ var _props$toUpperCase = props.toUpperCase,
820
+ toUpperCase = _props$toUpperCase === void 0 ? false : _props$toUpperCase,
821
+ children = props.children,
822
+ textPops = _objectWithoutPropertiesLoose(props, _excluded);
823
+
824
+ var content = children;
825
+
826
+ if (typeof content === 'string' && toUpperCase) {
827
+ content = content.toUpperCase();
828
+ } // if (typeof content === 'string' && toFormat) {
829
+ // const newtext: any = content
830
+ // .split('\n')
831
+ // .map((item: any, key: number): any => {
832
+ // return (
833
+ // <span key={key.toString()}>
834
+ // {item}
835
+ // <br />
836
+ // </span>
837
+ // );
838
+ // });
839
+ // }
840
+
841
+
842
+ return React__default.createElement(TextSpan, Object.assign({}, textPops, {
843
+ children: content
844
+ }));
845
+ };
846
+
847
+ var Form = function Form(props) {
848
+ return React__default.createElement(FormElement, Object.assign({}, props));
849
+ };
850
+ var Input = function Input(props) {
851
+ return React__default.createElement(InputElement, Object.assign({}, props));
852
+ };
853
+
807
854
  var useMount = function useMount(callback) {
808
855
  React.useEffect(function () {
809
856
  callback();
@@ -917,14 +964,15 @@ var useResponsive = function useResponsive() {
917
964
  };
918
965
  };
919
966
 
967
+ exports.Div = Div;
968
+ exports.Form = Form;
920
969
  exports.Image = Image;
921
- exports.ImageBackground = ImageBackground;
970
+ exports.Input = Input;
922
971
  exports.ResponsiveContext = ResponsiveContext;
923
972
  exports.ResponsiveProvider = ResponsiveProvider;
924
- exports.RoundedImage = RoundedImage;
925
973
  exports.SafeArea = SafeArea;
926
974
  exports.Scroll = Scroll;
927
- exports.SquaredImage = SquaredImage;
975
+ exports.Span = Span;
928
976
  exports.Text = Text;
929
977
  exports.TextSpan = TextSpan;
930
978
  exports.ThemeContext = ThemeContext;