@ornikar/kitt-universal 1.0.1 → 1.0.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.
package/.stylelintrc ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": ["@ornikar/stylelint-config/styled-components"]
3
+ }
@@ -4,7 +4,7 @@ import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral
4
4
  import { UserIcon, EyeIcon, EyeOffIcon, XIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon } from '@ornikar/kitt-icons';
5
5
  export * from '@ornikar/kitt-icons';
6
6
  import React, { useRef, useEffect, useContext, createContext, useState, forwardRef, useMemo } from 'react';
7
- import { Animated, Easing, Image, Platform, useWindowDimensions, Pressable, ActivityIndicator, StyleSheet, View, ScrollView, Modal as Modal$1 } from 'react-native';
7
+ import { Animated, Easing, Image, useWindowDimensions, Pressable, ActivityIndicator, StyleSheet, View, ScrollView, Modal as Modal$1 } from 'react-native';
8
8
  export { useWindowDimensions as useWindowSize } from 'react-native';
9
9
  import styled, { useTheme, css } from 'styled-components/native';
10
10
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -664,11 +664,11 @@ var styledTextInputMixin = css(_templateObject$i || (_templateObject$i = _tagged
664
664
  var Input = styled.TextInput(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-bang-space-before */\n /* stylelint-disable comment-word-disallowed-list */\n\n /* FIXME: text input is not vertically centered on iOS because of bigger line-height */\n ", "\n padding: ", ";\n line-height: ", ";\n min-height: ", "px;\n"])), styledTextInputMixin, function (_ref8) {
665
665
  var theme = _ref8.theme,
666
666
  multiline = _ref8.multiline;
667
- return !multiline && Platform.OS === 'ios' ? theme.kitt.forms.input.paddingSingleLineIOS : theme.kitt.forms.input.padding;
667
+ return !multiline && "android" === 'ios' ? theme.kitt.forms.input.paddingSingleLineIOS : theme.kitt.forms.input.padding;
668
668
  }, function (_ref9) {
669
669
  var theme = _ref9.theme,
670
670
  multiline = _ref9.multiline;
671
- return !multiline && Platform.OS === 'ios' ? 0 : theme.kitt.typography.types.bodies.configs.body.baseAndSmall.lineHeight;
671
+ return !multiline && "android" === 'ios' ? 0 : theme.kitt.typography.types.bodies.configs.body.baseAndSmall.lineHeight;
672
672
  }, function (_ref10) {
673
673
  var minHeight = _ref10.minHeight;
674
674
  return minHeight;
@@ -777,13 +777,11 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref15, ref) {
777
777
  });
778
778
 
779
779
  function Label(_ref) {
780
- var htmlFor = _ref.htmlFor,
781
- children = _ref.children;
780
+ _ref.htmlFor;
781
+ var children = _ref.children;
782
782
  return /*#__PURE__*/React.createElement(Typography.Text, {
783
783
  base: "body"
784
- }, Platform.OS === 'web' ? /*#__PURE__*/React.createElement("label", {
785
- htmlFor: htmlFor
786
- }, children) : children);
784
+ }, children);
787
785
  }
788
786
 
789
787
  var _templateObject$h, _templateObject2$8, _templateObject3$5, _templateObject4$3, _templateObject5;
@@ -990,7 +988,7 @@ function FullScreenModalHeader(_ref6) {
990
988
  };
991
989
 
992
990
  return /*#__PURE__*/React.createElement(Header, {
993
- insetTop: Platform.OS === 'ios' ? undefined : top
991
+ insetTop: top
994
992
  }, left ? /*#__PURE__*/React.createElement(SideContainer, {
995
993
  onLayout: function onLayout(e) {
996
994
  return handleLayoutChange(e, 'left');
@@ -1123,8 +1121,7 @@ ListItem.SideContent = ListItemSideContent;
1123
1121
  ListItem.SideContainer = ListItemSideContainer;
1124
1122
 
1125
1123
  function getActivityIndicatorSize(size) {
1126
- if (Platform.OS === 'android') return size;
1127
- return size < 36 ? 'small' : 'large';
1124
+ return size;
1128
1125
  }
1129
1126
 
1130
1127
  function Loader(_ref) {
@@ -1834,9 +1831,9 @@ var typographyLateOceanTheme = {
1834
1831
  types: {
1835
1832
  headers: {
1836
1833
  fontFamily: {
1837
- regular: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
1838
- bold: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold',
1839
- italic: Platform.OS === 'web' ? 'Moderat' : 'Moderat-Extended-Bold'
1834
+ regular: 'Moderat-Extended-Bold',
1835
+ bold: 'Moderat-Extended-Bold',
1836
+ italic: 'Moderat-Extended-Bold'
1840
1837
  },
1841
1838
  fontWeight: 400,
1842
1839
  fontStyle: 'normal',
@@ -1855,9 +1852,9 @@ var typographyLateOceanTheme = {
1855
1852
  },
1856
1853
  bodies: {
1857
1854
  fontFamily: {
1858
- regular: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans',
1859
- bold: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Bold',
1860
- italic: Platform.OS === 'web' ? 'Noto Sans' : 'NotoSans-Italic'
1855
+ regular: 'NotoSans',
1856
+ bold: 'NotoSans-Bold',
1857
+ italic: 'NotoSans-Italic'
1861
1858
  },
1862
1859
  fontWeight: {
1863
1860
  regular: 400,
@@ -1914,8 +1911,8 @@ var StyledLink = styled(Typography).withConfig({
1914
1911
  var noUnderline = _ref.noUnderline;
1915
1912
  return noUnderline ? 'none' : 'underline';
1916
1913
  }, function (_ref2) {
1917
- var disabled = _ref2.disabled;
1918
- return Platform.OS === 'web' ? "\n text-decoration-color: inherit;\n transition: color 0.2s ease-in-out;\n cursor: ".concat(disabled ? 'not-allowed' : 'pointer', ";\n ") : null;
1914
+ _ref2.disabled;
1915
+ return null;
1919
1916
  });
1920
1917
  function TypographyLink(_ref3) {
1921
1918
  var disabled = _ref3.disabled,