@ornikar/kitt-universal 7.0.2 → 7.1.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.
@@ -2,7 +2,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
3
  import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, ArcIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
4
4
  export * from '@ornikar/kitt-icons';
5
- import { useWindowDimensions, Image, Platform, Linking, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, View, Animated as Animated$1, Easing, ActivityIndicator } from 'react-native';
5
+ import { useWindowDimensions, Platform, Image, Linking, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, View, Animated as Animated$1, Easing, ActivityIndicator } from 'react-native';
6
6
  export { useWindowDimensions as useWindowSize } from 'react-native';
7
7
  import styled, { useTheme, css, ThemeProvider } from 'styled-components/native';
8
8
  import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, useRef, useEffect, Fragment as Fragment$1, Children } from 'react';
@@ -221,8 +221,9 @@ function TypographyText(props) {
221
221
  }
222
222
 
223
223
  function TypographyParagraph(props) {
224
+ // role 'paragraph' does not exist in native, it's a web feature only.
224
225
  return /*#__PURE__*/jsx(Typography, _objectSpread({
225
- accessibilityRole: "paragraph"
226
+ accessibilityRole: Platform.OS === 'web' ? 'paragraph' : null
226
227
  }, props));
227
228
  }
228
229
 
@@ -316,7 +317,7 @@ function AvatarContent(_ref5) {
316
317
 
317
318
  if (firstname && lastname) {
318
319
  return /*#__PURE__*/jsx(Typography.Text, {
319
- base: sizeVariant === 'large' ? 'body-large' : 'body',
320
+ base: sizeVariant === 'large' ? 'body-large' : 'body-small',
320
321
  variant: sizeVariant === 'large' ? 'bold' : 'regular',
321
322
  color: isLight ? 'black' : 'white',
322
323
  children: getInitials(firstname, lastname)
@@ -2379,7 +2380,7 @@ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
2379
2380
  displayName: "InputTextContainer"
2380
2381
  })(["position:relative;"]);
2381
2382
 
2382
- var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
2383
+ var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "multiline", "onSubmitEditing", "onFocus", "onBlur"];
2383
2384
  var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
2384
2385
  displayName: "InputText__StyledTextInput"
2385
2386
  })(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
@@ -2421,6 +2422,8 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
2421
2422
  autoCompleteType = _ref4$autoCompleteTyp === void 0 ? 'off' : _ref4$autoCompleteTyp,
2422
2423
  _ref4$keyboardType = _ref4.keyboardType,
2423
2424
  keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
2425
+ multiline = _ref4.multiline,
2426
+ onSubmitEditing = _ref4.onSubmitEditing,
2424
2427
  _onFocus = _ref4.onFocus,
2425
2428
  _onBlur = _ref4.onBlur,
2426
2429
  props = _objectWithoutProperties(_ref4, _excluded$7);
@@ -2441,6 +2444,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
2441
2444
  $isDisabled: disabled,
2442
2445
  children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread(_objectSpread({
2443
2446
  ref: ref,
2447
+ multiline: multiline,
2444
2448
  nativeID: id,
2445
2449
  editable: !disabled,
2446
2450
  keyboardType: keyboardType,
@@ -2459,7 +2463,10 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
2459
2463
  onBlur: function onBlur(e) {
2460
2464
  setIsFocused(false);
2461
2465
  if (_onBlur) _onBlur(e);
2462
- }
2466
+ },
2467
+ onSubmitEditing: multiline ? function () {
2468
+ return null;
2469
+ } : onSubmitEditing
2463
2470
  })), right ? /*#__PURE__*/jsx(RightInputContainer, {
2464
2471
  children: right
2465
2472
  }) : null]