@ornikar/kitt-universal 4.4.0 → 4.5.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.
Files changed (52) hide show
  1. package/dist/definitions/Button/AnimatedButtonPressable.web.d.ts +1 -1
  2. package/dist/definitions/forms/DatePicker/DatePicker.d.ts +30 -0
  3. package/dist/definitions/forms/DatePicker/DatePicker.d.ts.map +1 -0
  4. package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts +11 -0
  5. package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts.map +1 -0
  6. package/dist/definitions/forms/DatePicker/ModalPlatformDateTimePicker.d.ts +11 -0
  7. package/dist/definitions/forms/DatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -0
  8. package/dist/definitions/forms/DatePicker/PlatformDateTimePicker.d.ts +14 -0
  9. package/dist/definitions/forms/DatePicker/PlatformDateTimePicker.d.ts.map +1 -0
  10. package/dist/definitions/forms/InputTag/InputTag.d.ts +10 -0
  11. package/dist/definitions/forms/InputTag/InputTag.d.ts.map +1 -0
  12. package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
  13. package/dist/definitions/index.d.ts +4 -0
  14. package/dist/definitions/index.d.ts.map +1 -1
  15. package/dist/definitions/themes/default.d.ts +2 -0
  16. package/dist/definitions/themes/default.d.ts.map +1 -1
  17. package/dist/definitions/themes/late-ocean/datePicker.d.ts +11 -0
  18. package/dist/definitions/themes/late-ocean/datePicker.d.ts.map +1 -0
  19. package/dist/definitions/themes/late-ocean/forms.d.ts +2 -0
  20. package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
  21. package/dist/definitions/themes/late-ocean/input.d.ts +1 -0
  22. package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
  23. package/dist/definitions/themes/late-ocean/inputTag.d.ts +14 -0
  24. package/dist/definitions/themes/late-ocean/inputTag.d.ts.map +1 -0
  25. package/dist/index-browser-all.es.android.js +1135 -773
  26. package/dist/index-browser-all.es.android.js.map +1 -1
  27. package/dist/index-browser-all.es.ios.js +1135 -773
  28. package/dist/index-browser-all.es.ios.js.map +1 -1
  29. package/dist/index-browser-all.es.js +1275 -913
  30. package/dist/index-browser-all.es.js.map +1 -1
  31. package/dist/index-browser-all.es.web.js +855 -490
  32. package/dist/index-browser-all.es.web.js.map +1 -1
  33. package/dist/index-node-14.17.cjs.js +1097 -763
  34. package/dist/index-node-14.17.cjs.js.map +1 -1
  35. package/dist/index-node-14.17.cjs.web.css +1 -1
  36. package/dist/index-node-14.17.cjs.web.js +874 -543
  37. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  38. package/dist/linaria-themes-browser-all.es.android.js +33 -1
  39. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  40. package/dist/linaria-themes-browser-all.es.ios.js +33 -1
  41. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  42. package/dist/linaria-themes-browser-all.es.js +33 -1
  43. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  44. package/dist/linaria-themes-browser-all.es.web.js +33 -1
  45. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  46. package/dist/linaria-themes-node-14.17.cjs.js +33 -1
  47. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  48. package/dist/linaria-themes-node-14.17.cjs.web.js +33 -1
  49. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  50. package/dist/styles.css +1 -1
  51. package/dist/tsbuildinfo +1 -1
  52. package/package.json +2 -2
@@ -1,22 +1,22 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { UserIcon, CheckboxMark, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
3
+ import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
4
4
  export * from '@ornikar/kitt-icons';
5
- import { Animated, Easing, useWindowDimensions, Image, Platform, Linking, TextInput, Pressable, ActivityIndicator, View, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1 } from 'react-native';
5
+ import { Animated, Easing, useWindowDimensions, Image, Platform, Linking, View, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, 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
- import { useRef, useEffect, cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment, Children } from 'react';
9
- import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
8
+ import { useRef, useEffect, cloneElement, useContext, createContext, forwardRef, useMemo, useState, Fragment as Fragment$1, Children } from 'react';
9
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
10
  import Animated$1, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withRepeat, withTiming, Easing as Easing$1, interpolate } from 'react-native-reanimated';
11
11
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
12
12
  import { parse } from 'twemoji-parser';
13
13
  import { openBrowserAsync } from 'expo-web-browser';
14
+ import { FormattedMessage } from 'react-intl';
15
+ import { styled as styled$1 } from '@linaria/react';
16
+ import DateTimePicker from '@react-native-community/datetimepicker';
14
17
  import _extends from '@babel/runtime/helpers/extends';
15
18
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
16
- import { styled as styled$1 } from '@linaria/react';
17
19
  import { LinearGradient } from 'expo-linear-gradient';
18
- import DateTimePicker from '@react-native-community/datetimepicker';
19
- import { FormattedMessage } from 'react-intl';
20
20
  import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
21
21
  import { makeDecorator } from '@storybook/addons';
22
22
 
@@ -52,7 +52,7 @@ function SpinningIcon(_ref) {
52
52
  });
53
53
  }
54
54
 
55
- var IconContainer = /*#__PURE__*/styled.View.withConfig({
55
+ var IconContainer$1 = /*#__PURE__*/styled.View.withConfig({
56
56
  displayName: "Icon__IconContainer"
57
57
  })(["color:", ";width:", "px;height:", "px;align-self:", ";"], function (_ref) {
58
58
  var color = _ref.color;
@@ -78,7 +78,7 @@ function Icon(_ref5) {
78
78
  var clonedIcon = /*#__PURE__*/cloneElement(icon, {
79
79
  color: color
80
80
  });
81
- return /*#__PURE__*/jsx(IconContainer, {
81
+ return /*#__PURE__*/jsx(IconContainer$1, {
82
82
  align: align,
83
83
  size: size,
84
84
  color: color,
@@ -136,11 +136,11 @@ var KittBreakpointsMax = {
136
136
  LARGE: KittBreakpoints.WIDE - 1
137
137
  };
138
138
 
139
- var _excluded$e = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
139
+ var _excluded$f = ["accessibilityRole", "base", "small", "medium", "large", "variant", "color"];
140
140
 
141
- function ownKeys$l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
141
+ function ownKeys$o(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
142
142
 
143
- function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
143
+ function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$o(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$o(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
144
144
  var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
145
145
  var TypographyColorContext = /*#__PURE__*/createContext('black');
146
146
  function useTypographyColor() {
@@ -216,7 +216,7 @@ function Typography(_ref4) {
216
216
  large = _ref4.large,
217
217
  variant = _ref4.variant,
218
218
  color = _ref4.color,
219
- otherProps = _objectWithoutProperties(_ref4, _excluded$e);
219
+ otherProps = _objectWithoutProperties(_ref4, _excluded$f);
220
220
 
221
221
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
222
222
  var hasTypographyAncestor = isHeaderTypographyInContext !== undefined;
@@ -233,14 +233,14 @@ function Typography(_ref4) {
233
233
  var nonNullableVariant = variant !== null && variant !== void 0 ? variant : isHeader ? 'bold' : 'regular';
234
234
  var content = baseOrDefaultToBody ? /*#__PURE__*/jsx(IsHeaderTypographyContext.Provider, {
235
235
  value: isHeader,
236
- children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$l({
236
+ children: /*#__PURE__*/jsx(StyledTypography, _objectSpread$o({
237
237
  $color: colorOrDefaultToBlack,
238
238
  $isHeader: isHeader,
239
239
  $typeForCurrentWindowSize: typeForCurrentWindowSize,
240
240
  $variant: nonNullableVariant,
241
241
  accessibilityRole: accessibilityRole || undefined
242
242
  }, otherProps))
243
- }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$l({
243
+ }) : /*#__PURE__*/jsx(StyledTypography, _objectSpread$o({
244
244
  $color: colorOrDefaultToBlack,
245
245
  $isHeader: isHeader,
246
246
  $variant: nonNullableVariant,
@@ -253,13 +253,13 @@ function Typography(_ref4) {
253
253
  }
254
254
 
255
255
  function TypographyText(props) {
256
- return /*#__PURE__*/jsx(Typography, _objectSpread$l({
256
+ return /*#__PURE__*/jsx(Typography, _objectSpread$o({
257
257
  accessibilityRole: null
258
258
  }, props));
259
259
  }
260
260
 
261
261
  function TypographyParagraph(props) {
262
- return /*#__PURE__*/jsx(Typography, _objectSpread$l({
262
+ return /*#__PURE__*/jsx(Typography, _objectSpread$o({
263
263
  accessibilityRole: "paragraph"
264
264
  }, props));
265
265
  }
@@ -267,7 +267,7 @@ function TypographyParagraph(props) {
267
267
  var createHeading = function (level, defaultBase) {
268
268
  // https://github.com/necolas/react-native-web/issues/401
269
269
  function TypographyHeading(props) {
270
- return /*#__PURE__*/jsx(Typography, _objectSpread$l(_objectSpread$l({
270
+ return /*#__PURE__*/jsx(Typography, _objectSpread$o(_objectSpread$o({
271
271
  accessibilityRole: "header",
272
272
  base: defaultBase
273
273
  }, props), {}, {
@@ -303,11 +303,11 @@ Typography.h4 = createHeading(4, 'header4');
303
303
 
304
304
  Typography.h5 = createHeading(5, 'header5');
305
305
 
306
- var _excluded$d = ["size", "base", "round", "light"];
306
+ var _excluded$e = ["size", "base", "round", "light"];
307
307
 
308
- function ownKeys$k(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
308
+ function ownKeys$n(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
309
309
 
310
- function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
310
+ function _objectSpread$n(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$n(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$n(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
311
311
 
312
312
  var getInitials = function (firstname, lastname) {
313
313
  return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
@@ -378,13 +378,13 @@ function Avatar(_ref6) {
378
378
  base = _ref6$base === void 0 ? 'body-small' : _ref6$base,
379
379
  round = _ref6.round,
380
380
  light = _ref6.light,
381
- props = _objectWithoutProperties(_ref6, _excluded$d);
381
+ props = _objectWithoutProperties(_ref6, _excluded$e);
382
382
 
383
383
  return /*#__PURE__*/jsx(StyledAvatarView, {
384
384
  $size: size,
385
385
  $isRound: round,
386
386
  $isLight: light,
387
- children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$k({
387
+ children: /*#__PURE__*/jsx(AvatarContent, _objectSpread$n({
388
388
  size: size,
389
389
  base: base,
390
390
  isLight: light
@@ -526,26 +526,26 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
526
526
  return defaultPadding;
527
527
  });
528
528
 
529
- var _excluded$c = ["color"],
529
+ var _excluded$d = ["color"],
530
530
  _excluded2$2 = ["color"];
531
531
 
532
- function ownKeys$j(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
532
+ function ownKeys$m(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
533
533
 
534
- function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$j(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$j(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
534
+ function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$m(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
535
535
 
536
536
  function TypographyIconSpecifiedColor(_ref) {
537
537
  var color = _ref.color,
538
- props = _objectWithoutProperties(_ref, _excluded$c);
538
+ props = _objectWithoutProperties(_ref, _excluded$d);
539
539
 
540
540
  var theme = /*#__PURE__*/useTheme();
541
- return /*#__PURE__*/jsx(Icon, _objectSpread$j(_objectSpread$j({}, props), {}, {
541
+ return /*#__PURE__*/jsx(Icon, _objectSpread$m(_objectSpread$m({}, props), {}, {
542
542
  color: color === 'inherit' ? 'inherit' : theme.kitt.typography.colors[color]
543
543
  }));
544
544
  }
545
545
 
546
546
  function TypographyIconInheritColor(props) {
547
547
  var color = useTypographyColor();
548
- return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$j({
548
+ return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$m({
549
549
  color: color
550
550
  }, props));
551
551
  }
@@ -555,23 +555,23 @@ function TypographyIcon(_ref2) {
555
555
  props = _objectWithoutProperties(_ref2, _excluded2$2);
556
556
 
557
557
  if (color) {
558
- return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$j({
558
+ return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread$m({
559
559
  color: color
560
560
  }, props));
561
561
  }
562
562
 
563
- return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$j({}, props));
563
+ return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread$m({}, props));
564
564
  }
565
565
 
566
566
  function isSubtle(type) {
567
567
  return type.startsWith('subtle');
568
568
  }
569
569
 
570
- var _excluded$b = ["type", "isDisabled", "$isStretch", "icon", "children"];
570
+ var _excluded$c = ["type", "isDisabled", "$isStretch", "icon", "children"];
571
571
 
572
- function ownKeys$i(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
572
+ function ownKeys$l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
573
573
 
574
- function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
574
+ function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
575
575
 
576
576
  var getTextColorByType = function (type) {
577
577
  switch (type) {
@@ -677,7 +677,7 @@ function ButtonContentChildren(_ref4) {
677
677
  color: isWebSubtle ? 'inherit' : color
678
678
  };
679
679
  return /*#__PURE__*/jsxs(StyledChildrenWithIcon, {
680
- children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$i(_objectSpread$i({}, buttonIconSharedProps), {}, {
680
+ children: [icon && iconPosition === 'left' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$l(_objectSpread$l({}, buttonIconSharedProps), {}, {
681
681
  testID: "button-left-icon",
682
682
  icon: icon
683
683
  })) : null, /*#__PURE__*/jsx(StyledButtonText, {
@@ -688,7 +688,7 @@ function ButtonContentChildren(_ref4) {
688
688
  ,
689
689
  color: isWebSubtle ? undefined : color,
690
690
  children: children
691
- }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$i(_objectSpread$i({}, buttonIconSharedProps), {}, {
691
+ }), icon && iconPosition === 'right' ? /*#__PURE__*/jsx(ButtonIcon, _objectSpread$l(_objectSpread$l({}, buttonIconSharedProps), {}, {
692
692
  icon: icon
693
693
  })) : null]
694
694
  });
@@ -714,14 +714,14 @@ function ButtonContent(_ref7) {
714
714
  $isStretch = _ref7.$isStretch,
715
715
  icon = _ref7.icon,
716
716
  children = _ref7.children,
717
- props = _objectWithoutProperties(_ref7, _excluded$b);
717
+ props = _objectWithoutProperties(_ref7, _excluded$c);
718
718
 
719
719
  var color = isDisabled ? 'black-light' : getTextColorByType(type);
720
720
  return /*#__PURE__*/jsx(ButtonContentContainer, {
721
721
  $isSubtle: isSubtle(type),
722
722
  $isStretch: $isStretch,
723
723
  $isIconOnly: Boolean(!children && icon),
724
- children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$i(_objectSpread$i({
724
+ children: /*#__PURE__*/jsx(ButtonContentChildren, _objectSpread$l(_objectSpread$l({
725
725
  icon: icon,
726
726
  type: type,
727
727
  isDisabled: isDisabled,
@@ -858,20 +858,20 @@ var defaultOpenLinkBehavior = {
858
858
  web: 'targetBlank'
859
859
  };
860
860
 
861
- var _excluded$a = ["as", "href", "openLinkBehavior", "onPress"];
861
+ var _excluded$b = ["as", "href", "openLinkBehavior", "onPress"];
862
862
 
863
- function ownKeys$h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
863
+ function ownKeys$k(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
864
864
 
865
- function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
865
+ function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
866
866
  function ExternalLink(_ref) {
867
867
  var Component = _ref.as,
868
868
  href = _ref.href,
869
869
  _ref$openLinkBehavior = _ref.openLinkBehavior,
870
870
  openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
871
871
  onPress = _ref.onPress,
872
- rest = _objectWithoutProperties(_ref, _excluded$a);
872
+ rest = _objectWithoutProperties(_ref, _excluded$b);
873
873
 
874
- return /*#__PURE__*/jsx(Component, _objectSpread$h(_objectSpread$h({}, rest), {}, {
874
+ return /*#__PURE__*/jsx(Component, _objectSpread$k(_objectSpread$k({}, rest), {}, {
875
875
  onPress: function handleOnPress() {
876
876
  if (onPress) onPress();
877
877
  if (!href) return;
@@ -1076,6 +1076,18 @@ var checkbox = {
1076
1076
  markColor: colors.uiBackgroundLight
1077
1077
  };
1078
1078
 
1079
+ var datePicker = {
1080
+ day: {
1081
+ minWidth: 64
1082
+ },
1083
+ month: {
1084
+ minWidth: 64
1085
+ },
1086
+ year: {
1087
+ minWidth: 82
1088
+ }
1089
+ };
1090
+
1079
1091
  var calcLineHeight = function (fontSize, lineHeightMultiplier) {
1080
1092
  return Math.round(fontSize * lineHeightMultiplier);
1081
1093
  };
@@ -1187,6 +1199,7 @@ var inputStatesStyle = {
1187
1199
  }
1188
1200
  };
1189
1201
  var input = {
1202
+ minHeight: 40,
1190
1203
  color: {
1191
1204
  selection: colors.primary,
1192
1205
  placeholder: typography.colors['black-light']
@@ -1213,6 +1226,23 @@ var inputField = {
1213
1226
  iconMarginLeft: 6
1214
1227
  };
1215
1228
 
1229
+ var inputTag = {
1230
+ success: {
1231
+ backgroundColor: colors.success,
1232
+ labelColor: colors.uiBackgroundLight
1233
+ },
1234
+ danger: {
1235
+ backgroundColor: colors.danger,
1236
+ labelColor: colors.uiBackgroundLight
1237
+ },
1238
+ "default": {
1239
+ backgroundColor: lateOceanColorPalette.black50,
1240
+ labelColor: colors.black
1241
+ },
1242
+ borderRadius: 10,
1243
+ iconSize: 13.5
1244
+ };
1245
+
1216
1246
  var radio = {
1217
1247
  size: 18,
1218
1248
  unchecked: {
@@ -1236,11 +1266,13 @@ var textArea = {
1236
1266
  };
1237
1267
 
1238
1268
  var forms = {
1269
+ datePicker: datePicker,
1239
1270
  input: input,
1240
1271
  radio: radio,
1241
1272
  inputField: inputField,
1242
1273
  textArea: textArea,
1243
- checkbox: checkbox
1274
+ checkbox: checkbox,
1275
+ inputTag: inputTag
1244
1276
  };
1245
1277
 
1246
1278
  var fullScreenModal = {
@@ -1541,6 +1573,16 @@ function Checkbox(_ref6) {
1541
1573
  });
1542
1574
  }
1543
1575
 
1576
+ function getInputUIState(_ref) {
1577
+ var isFocused = _ref.isFocused,
1578
+ isDisabled = _ref.isDisabled,
1579
+ formState = _ref.formState;
1580
+ if (isDisabled) return 'disabled';
1581
+ if (isFocused) return 'focus';
1582
+ if (formState === 'invalid') return 'invalid';
1583
+ return 'default';
1584
+ }
1585
+
1544
1586
  var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
1545
1587
  var theme = _ref.theme,
1546
1588
  $state = _ref.$state;
@@ -1568,850 +1610,1324 @@ var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width
1568
1610
  return theme.kitt.typography.types.bodies.fontFamily.regular;
1569
1611
  });
1570
1612
 
1571
- function getInputUIState(_ref) {
1572
- var isFocused = _ref.isFocused,
1573
- isDisabled = _ref.isDisabled,
1574
- formState = _ref.formState;
1575
- if (isDisabled) return 'disabled';
1576
- if (isFocused) return 'focus';
1577
- if (formState === 'invalid') return 'invalid';
1578
- return 'default';
1579
- }
1580
-
1581
- var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
1582
- displayName: "InputTextContainer"
1583
- })(["position:relative;"]);
1584
-
1585
- var _excluded$9 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
1586
-
1587
- function ownKeys$g(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1588
-
1589
- function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1590
- var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
1591
- displayName: "InputText__StyledTextInput"
1592
- })(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
1593
- var theme = _ref.theme,
1594
- multiline = _ref.multiline;
1595
-
1596
- if (!multiline && Platform.OS === 'ios') {
1597
- return theme.kitt.forms.input.padding.iOSSingleLine;
1598
- }
1599
-
1613
+ var StyledTypographyText = /*#__PURE__*/styled(Typography.Text).withConfig({
1614
+ displayName: "DatePickerInputPart__StyledTypographyText"
1615
+ })(["text-align:center;"]);
1616
+ var ViewInput = /*#__PURE__*/styled.View.withConfig({
1617
+ displayName: "DatePickerInputPart__ViewInput"
1618
+ })(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
1619
+ var theme = _ref.theme;
1600
1620
  return theme.kitt.forms.input.padding["default"];
1601
1621
  }, function (_ref2) {
1602
- var theme = _ref2.theme,
1603
- multiline = _ref2.multiline;
1604
- if (!multiline && Platform.OS === 'ios') return 0;
1605
- var typeConfigKey = getTypographyTypeConfigKey(theme);
1606
- return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
1622
+ var theme = _ref2.theme;
1623
+ return theme.kitt.forms.input.minHeight;
1607
1624
  }, function (_ref3) {
1608
- var $minHeight = _ref3.$minHeight;
1609
- return $minHeight;
1610
- });
1611
- var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
1612
- displayName: "InputText__RightInputContainer"
1613
- })(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
1614
- var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
1615
- var id = _ref4.id,
1616
- right = _ref4.right,
1617
- _ref4$minHeight = _ref4.minHeight,
1618
- minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
1619
- formState = _ref4.state,
1620
- internalForceState = _ref4.internalForceState,
1621
- _ref4$disabled = _ref4.disabled,
1622
- disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
1623
- _ref4$autoCorrect = _ref4.autoCorrect,
1624
- autoCorrect = _ref4$autoCorrect === void 0 ? true : _ref4$autoCorrect,
1625
- _ref4$textContentType = _ref4.textContentType,
1626
- textContentType = _ref4$textContentType === void 0 ? 'none' : _ref4$textContentType,
1627
- _ref4$autoCompleteTyp = _ref4.autoCompleteType,
1628
- autoCompleteType = _ref4$autoCompleteTyp === void 0 ? 'off' : _ref4$autoCompleteTyp,
1629
- _ref4$keyboardType = _ref4.keyboardType,
1630
- keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
1631
- _onFocus = _ref4.onFocus,
1632
- _onBlur = _ref4.onBlur,
1633
- props = _objectWithoutProperties(_ref4, _excluded$9);
1634
-
1635
- var theme = /*#__PURE__*/useTheme();
1625
+ var theme = _ref3.theme,
1626
+ $partName = _ref3.$partName;
1636
1627
 
1637
- var _useState = useState(false),
1638
- _useState2 = _slicedToArray(_useState, 2),
1639
- isFocused = _useState2[0],
1640
- setIsFocused = _useState2[1];
1628
+ if (!$partName) {
1629
+ return undefined;
1630
+ }
1641
1631
 
1642
- var state = internalForceState || getInputUIState({
1643
- isFocused: isFocused,
1644
- isDisabled: disabled,
1645
- formState: formState
1646
- });
1647
- return /*#__PURE__*/jsxs(InputTextContainer, {
1648
- $isDisabled: disabled,
1649
- children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$g(_objectSpread$g({
1650
- ref: ref,
1651
- nativeID: id,
1652
- editable: !disabled,
1653
- keyboardType: keyboardType,
1654
- autoCompleteType: autoCompleteType,
1655
- autoCorrect: autoCorrect,
1656
- $minHeight: minHeight,
1657
- textContentType: textContentType,
1658
- placeholderTextColor: theme.kitt.forms.input.color.placeholder,
1659
- selectionColor: theme.kitt.forms.input.color.selection
1660
- }, props), {}, {
1661
- $state: state,
1662
- onFocus: function onFocus(e) {
1663
- setIsFocused(true);
1664
- if (_onFocus) _onFocus(e);
1665
- },
1666
- onBlur: function onBlur(e) {
1667
- setIsFocused(false);
1668
- if (_onBlur) _onBlur(e);
1669
- }
1670
- })), right ? /*#__PURE__*/jsx(RightInputContainer, {
1671
- children: right
1672
- }) : null]
1673
- });
1632
+ return "".concat(theme.kitt.forms.datePicker[$partName].minWidth, "px");
1674
1633
  });
1675
-
1676
- function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1677
-
1678
- function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1679
- function InputEmail(props) {
1680
- return /*#__PURE__*/jsx(InputText, _objectSpread$f({
1681
- autoCompleteType: "email",
1682
- keyboardType: "email-address",
1683
- textContentType: "emailAddress"
1684
- }, props));
1634
+ function DatePickerInputPart(_ref4) {
1635
+ var $state = _ref4.$state,
1636
+ placeholder = _ref4.placeholder,
1637
+ value = _ref4.value,
1638
+ partName = _ref4.partName,
1639
+ disabled = _ref4.disabled;
1640
+ return /*#__PURE__*/jsx(ViewInput, {
1641
+ $state: $state,
1642
+ $partName: partName,
1643
+ children: placeholder || value ? /*#__PURE__*/jsx(StyledTypographyText, {
1644
+ color: !value || disabled ? 'black-light' : undefined,
1645
+ children: value || placeholder
1646
+ }) : null
1647
+ });
1685
1648
  }
1686
1649
 
1687
- var getColorFromState = function (state) {
1688
- switch (state) {
1689
- case 'invalid':
1690
- return 'danger';
1691
-
1692
- case 'valid':
1693
- default:
1694
- return 'black-light';
1695
- }
1696
- };
1650
+ function ownKeys$j(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1697
1651
 
1698
- function InputFeedback(_ref) {
1699
- var state = _ref.state,
1700
- testID = _ref.testID,
1701
- children = _ref.children;
1702
- return /*#__PURE__*/jsx(Typography.Text, {
1703
- base: "body-small",
1704
- color: getColorFromState(state),
1705
- testID: testID,
1706
- children: children
1652
+ function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$j(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$j(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1653
+ // Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
1654
+ var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
1655
+ displayName: "Overlay__OverlayPressable"
1656
+ })(function (_ref) {
1657
+ var theme = _ref.theme;
1658
+ return _objectSpread$j(_objectSpread$j({}, StyleSheet.absoluteFillObject), {}, {
1659
+ backgroundColor: theme.kitt.colors.overlay.dark
1660
+ });
1661
+ });
1662
+ function Overlay(_ref2) {
1663
+ var onPress = _ref2.onPress;
1664
+ return /*#__PURE__*/jsx(OverlayPressable, {
1665
+ accessibilityRole: "none",
1666
+ onPress: onPress,
1667
+ children: /*#__PURE__*/jsx(View, {})
1707
1668
  });
1708
1669
  }
1709
1670
 
1710
- var FieldContainer = /*#__PURE__*/styled.View.withConfig({
1711
- displayName: "InputField__FieldContainer"
1712
- })(["padding:5px 0 10px;"]);
1713
- var FeedbackContainer = /*#__PURE__*/styled.View.withConfig({
1714
- displayName: "InputField__FeedbackContainer"
1715
- })(["", ";"], function (_ref) {
1671
+ var BodyView = /*#__PURE__*/styled.View.withConfig({
1672
+ displayName: "Body__BodyView"
1673
+ })(["padding:", "px ", "px;"], function (_ref) {
1716
1674
  var theme = _ref.theme;
1717
- return theme.responsive.ifWindowSizeMatches({
1718
- minWidth: KittBreakpoints.SMALL
1719
- }, 'padding-top: 10px', 'padding-top: 5px');
1720
- });
1721
- var FieldLabelContainer = /*#__PURE__*/styled.View.withConfig({
1722
- displayName: "InputField__FieldLabelContainer"
1723
- })(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
1675
+ return theme.kitt.spacing * 6;
1676
+ }, function (_ref2) {
1724
1677
  var theme = _ref2.theme;
1725
- return theme.kitt.forms.inputField.labelContainerPaddingBottom;
1678
+ return theme.kitt.spacing * 4;
1726
1679
  });
1727
- var LabelContainer = /*#__PURE__*/styled.View.withConfig({
1728
- displayName: "InputField__LabelContainer"
1729
- })(["margin-right:", "px;"], function (_ref3) {
1730
- var theme = _ref3.theme;
1731
- return theme.kitt.forms.inputField.iconMarginLeft;
1680
+ function ModalBody(_ref3) {
1681
+ var children = _ref3.children;
1682
+ return /*#__PURE__*/jsx(ScrollView, {
1683
+ children: /*#__PURE__*/jsx(BodyView, {
1684
+ children: children
1685
+ })
1686
+ });
1687
+ }
1688
+
1689
+ var FooterView = /*#__PURE__*/styled.View.withConfig({
1690
+ displayName: "Footer__FooterView"
1691
+ })(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
1692
+ var theme = _ref.theme;
1693
+ return theme.kitt.spacing * 4;
1694
+ }, function (_ref2) {
1695
+ var theme = _ref2.theme;
1696
+ return theme.kitt.colors.separator;
1732
1697
  });
1733
- function InputField(_ref4) {
1734
- var label = _ref4.label,
1735
- labelFeedback = _ref4.labelFeedback,
1736
- input = _ref4.input,
1737
- feedback = _ref4.feedback;
1738
- return /*#__PURE__*/jsxs(FieldContainer, {
1739
- children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
1740
- children: [/*#__PURE__*/jsx(LabelContainer, {
1741
- children: label
1742
- }), labelFeedback]
1743
- }) : null, input, feedback ? /*#__PURE__*/jsx(FeedbackContainer, {
1744
- children: feedback
1745
- }) : null]
1698
+ function ModalFooter(_ref3) {
1699
+ var children = _ref3.children;
1700
+ return /*#__PURE__*/jsx(FooterView, {
1701
+ children: children
1746
1702
  });
1747
1703
  }
1748
1704
 
1749
- function getIconColor(state, disabled) {
1750
- if (disabled) return 'black-light';
1705
+ var _excluded$a = ["as", "children"];
1751
1706
 
1752
- switch (state) {
1753
- case 'invalid':
1754
- return 'danger';
1755
-
1756
- case 'valid':
1757
- return 'success';
1707
+ function ownKeys$i(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1758
1708
 
1759
- default:
1760
- return undefined;
1761
- }
1762
- }
1709
+ function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1710
+ function StyleWebWrapper(_ref) {
1711
+ var as = _ref.as,
1712
+ children = _ref.children,
1713
+ props = _objectWithoutProperties(_ref, _excluded$a);
1763
1714
 
1764
- function InputIcon(_ref) {
1765
- var icon = _ref.icon,
1766
- state = _ref.state,
1767
- disabled = _ref.disabled;
1768
- var theme = /*#__PURE__*/useTheme();
1769
- var color = getIconColor(state, disabled);
1770
- return /*#__PURE__*/jsx(TypographyIcon, {
1771
- color: color,
1772
- icon: icon,
1773
- size: theme.kitt.forms.input.icon.size
1774
- });
1715
+ if (Platform.OS !== 'web') return children;
1716
+ // as or default to div. If as is undefined, T is div but typescript is not sure
1717
+ return /*#__PURE__*/jsx(as || 'div', _objectSpread$i(_objectSpread$i({}, props), {}, {
1718
+ children: children
1719
+ }));
1775
1720
  }
1776
1721
 
1777
- function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1778
-
1779
- function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1780
- function InputPressable(_ref) {
1781
- var props = _extends({}, _ref);
1722
+ function ownKeys$h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1782
1723
 
1783
- return /*#__PURE__*/jsx(Pressable, _objectSpread$e({}, props));
1724
+ function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1725
+ // type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
1726
+ // type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
1727
+ // export function withTheme<Props extends { theme: DefaultTheme }, C>(
1728
+ // WrappedComponent: ComponentType<Props> & C,
1729
+ // ): ComponentType<SetOptional<Props, 'theme'>> & hoistNonReactStatics.NonReactStatics<typeof WrappedComponent> {
1730
+ // return function ThemedComponent(props) {
1731
+ // const theme = useTheme();
1732
+ // return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
1733
+ // };
1734
+ // }
1735
+ function withTheme(WrappedComponent) {
1736
+ // eslint-disable-next-line prefer-arrow-callback
1737
+ return /*#__PURE__*/forwardRef(function (props, ref) {
1738
+ var theme = /*#__PURE__*/useTheme();
1739
+ return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$h({
1740
+ ref: ref,
1741
+ theme: theme
1742
+ }, props));
1743
+ });
1784
1744
  }
1785
1745
 
1786
- var _excluded$8 = ["isPasswordDefaultVisible", "right"];
1746
+ var _excluded$9 = ["color", "disabled"];
1787
1747
 
1788
- function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1748
+ function ownKeys$g(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1789
1749
 
1790
- function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1791
- function InputPassword(_ref) {
1792
- var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
1793
- right = _ref.right,
1794
- props = _objectWithoutProperties(_ref, _excluded$8);
1750
+ function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1751
+ var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
1752
+ name: "PressableIconButtonWebWrapper",
1753
+ "class": "p1nlccvg",
1754
+ vars: {
1755
+ "p1nlccvg-0": [function (_ref) {
1756
+ var theme = _ref.theme,
1757
+ $isDisabled = _ref.$isDisabled;
1758
+ return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover;
1759
+ }],
1760
+ "p1nlccvg-2": [function (_ref2) {
1761
+ var theme = _ref2.theme,
1762
+ $isDisabled = _ref2.$isDisabled;
1763
+ return $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover;
1764
+ }],
1765
+ "p1nlccvg-3": [function (_ref3) {
1766
+ var theme = _ref3.theme,
1767
+ $isDisabled = _ref3.$isDisabled;
1768
+ return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active;
1769
+ }],
1770
+ "p1nlccvg-4": [function (_ref4) {
1771
+ var theme = _ref4.theme,
1772
+ $isWhite = _ref4.$isWhite,
1773
+ $isDisabled = _ref4.$isDisabled;
1774
+ if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
1775
+ var _theme$kitt$iconButto = theme.kitt.iconButton,
1776
+ white = _theme$kitt$iconButto.white,
1777
+ defaultIconButton = _theme$kitt$iconButto["default"];
1778
+ if ($isWhite) return white.pressedBackgroundColor;
1779
+ return defaultIconButton.pressedBackgroundColor;
1780
+ }]
1781
+ }
1782
+ }));
1783
+ var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
1784
+ displayName: "PressableIconButton__StyledPressableIconButton"
1785
+ })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
1786
+ var theme = _ref5.theme;
1787
+ return theme.kitt.iconButton.borderRadius;
1788
+ }, function (_ref6) {
1789
+ var theme = _ref6.theme;
1790
+ return theme.kitt.iconButton.width;
1791
+ }, function (_ref7) {
1792
+ var theme = _ref7.theme;
1793
+ return theme.kitt.iconButton.height;
1794
+ }, function (_ref8) {
1795
+ var theme = _ref8.theme,
1796
+ disabled = _ref8.disabled;
1797
+ var iconButton = theme.kitt.iconButton;
1795
1798
 
1796
- var _useState = useState(Boolean(isPasswordDefaultVisible)),
1797
- _useState2 = _slicedToArray(_useState, 2),
1798
- isVisible = _useState2[0],
1799
- setIsVisible = _useState2[1];
1799
+ if (Platform.OS !== 'web') {
1800
+ return undefined;
1801
+ }
1800
1802
 
1801
- return /*#__PURE__*/jsx(InputText, _objectSpread$d(_objectSpread$d({}, props), {}, {
1802
- textContentType: "password",
1803
- autoCompleteType: "password",
1804
- autoCorrect: false,
1805
- secureTextEntry: !isVisible,
1806
- right: right || /*#__PURE__*/jsx(InputPressable, {
1807
- accessibilityRole: "button",
1808
- onPress: function onPress() {
1809
- return setIsVisible(function (prev) {
1810
- return !prev;
1811
- });
1812
- },
1813
- children: /*#__PURE__*/jsx(InputIcon, {
1814
- icon: isVisible ? /*#__PURE__*/jsx(EyeOffIcon, {}) : /*#__PURE__*/jsx(EyeIcon, {})
1815
- })
1816
- })
1817
- }));
1818
- }
1803
+ var transition = iconButton.transition;
1819
1804
 
1820
- function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1805
+ if (disabled) {
1806
+ return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
1807
+ }
1821
1808
 
1822
- function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1823
- function InputPhone(props) {
1824
- return /*#__PURE__*/jsx(InputText, _objectSpread$c(_objectSpread$c({}, props), {}, {
1825
- autoCompleteType: "tel",
1826
- keyboardType: "number-pad",
1827
- textContentType: "telephoneNumber"
1828
- }));
1829
- }
1809
+ return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
1810
+ });
1811
+ function PressableIconButton(_ref9) {
1812
+ var color = _ref9.color,
1813
+ disabled = _ref9.disabled,
1814
+ props = _objectWithoutProperties(_ref9, _excluded$9);
1830
1815
 
1831
- function Label(_ref) {
1832
- var htmlFor = _ref.htmlFor,
1833
- children = _ref.children;
1834
- return /*#__PURE__*/jsx(Typography.Text, {
1835
- base: "body",
1836
- children: Platform.OS === 'web' ? /*#__PURE__*/jsx("label", {
1837
- htmlFor: htmlFor,
1838
- children: children
1839
- }) : children
1816
+ return /*#__PURE__*/jsx(StyleWebWrapper, {
1817
+ as: PressableIconButtonWebWrapper,
1818
+ $isWhite: color === 'white',
1819
+ $isDisabled: Boolean(disabled),
1820
+ children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$g(_objectSpread$g({}, props), {}, {
1821
+ disabled: disabled
1822
+ }))
1840
1823
  });
1841
1824
  }
1842
1825
 
1843
- var OuterRadio = /*#__PURE__*/styled.View.withConfig({
1844
- displayName: "Radio__OuterRadio"
1845
- })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], function (_ref) {
1826
+ var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConfig({
1827
+ displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
1828
+ })(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
1846
1829
  var theme = _ref.theme,
1830
+ color = _ref.color,
1847
1831
  disabled = _ref.disabled;
1848
- return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].backgroundColor;
1832
+ var iconButton = theme.kitt.iconButton;
1833
+ if (disabled) return iconButton.disabled.backgroundColor;
1834
+ if (color === 'white') return iconButton.white.pressedBackgroundColor;
1835
+ return iconButton["default"].pressedBackgroundColor;
1849
1836
  }, function (_ref2) {
1850
1837
  var theme = _ref2.theme;
1851
- return theme.kitt.forms.radio.size;
1838
+ return theme.kitt.iconButton.borderRadius;
1852
1839
  }, function (_ref3) {
1853
1840
  var theme = _ref3.theme;
1854
- return theme.kitt.forms.radio.size;
1841
+ return theme.kitt.iconButton.width;
1855
1842
  }, function (_ref4) {
1856
1843
  var theme = _ref4.theme;
1857
- return theme.kitt.forms.radio.size / 2;
1858
- }, function (_ref5) {
1859
- var theme = _ref5.theme;
1860
- return theme.kitt.forms.radio.unchecked.borderWidth;
1861
- }, function (_ref6) {
1862
- var theme = _ref6.theme,
1863
- disabled = _ref6.disabled;
1864
- return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
1865
- });
1866
- var SelectedOuterRadio = /*#__PURE__*/styled.View.withConfig({
1867
- displayName: "Radio__SelectedOuterRadio"
1868
- })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
1869
- var theme = _ref7.theme;
1870
- return theme.kitt.forms.radio.checked.backgroundColor;
1871
- }, function (_ref8) {
1872
- var theme = _ref8.theme;
1873
- return theme.kitt.forms.radio.size;
1874
- }, function (_ref9) {
1875
- var theme = _ref9.theme;
1876
- return theme.kitt.forms.radio.size;
1877
- }, function (_ref10) {
1878
- var theme = _ref10.theme;
1879
- return theme.kitt.forms.radio.size / 2;
1880
- });
1881
- var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
1882
- displayName: "Radio__SelectedInnerRadio"
1883
- })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
1884
- var theme = _ref11.theme;
1885
- return theme.kitt.forms.radio.checked.innerBackgroundColor;
1886
- }, function (_ref12) {
1887
- var theme = _ref12.theme;
1888
- return theme.kitt.forms.radio.checked.innerSize;
1889
- }, function (_ref13) {
1890
- var theme = _ref13.theme;
1891
- return theme.kitt.forms.radio.checked.innerSize;
1892
- }, function (_ref14) {
1893
- var theme = _ref14.theme;
1894
- return theme.kitt.forms.radio.checked.innerSize / 2;
1895
- });
1896
- var Container$4 = /*#__PURE__*/styled.Pressable.withConfig({
1897
- displayName: "Radio__Container"
1898
- })(["flex-direction:row;align-items:center;"]);
1899
- var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
1900
- displayName: "Radio__Text"
1901
- })(["margin-left:", "px;"], function (_ref15) {
1902
- var theme = _ref15.theme;
1903
- return theme.kitt.spacing * 2;
1844
+ return theme.kitt.iconButton.height;
1904
1845
  });
1905
- function Radio(_ref16) {
1906
- var id = _ref16.id,
1907
- checked = _ref16.checked,
1908
- onChange = _ref16.onChange,
1909
- value = _ref16.value,
1910
- _ref16$disabled = _ref16.disabled,
1911
- disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
1912
- children = _ref16.children;
1913
- return /*#__PURE__*/jsxs(Container$4, {
1914
- nativeID: id,
1915
- disabled: disabled,
1916
- accessibilityRole: "radio",
1917
- "aria-checked": checked,
1918
- focusable: checked && !disabled,
1919
- onPress: function handlePress() {
1920
- onChange(value);
1921
- },
1922
- children: [checked && !disabled ? /*#__PURE__*/jsx(SelectedOuterRadio, {
1923
- children: /*#__PURE__*/jsx(SelectedInnerRadio, {})
1924
- }) : /*#__PURE__*/jsx(OuterRadio, {
1925
- disabled: disabled
1926
- }), /*#__PURE__*/jsx(Text, {
1927
- base: "body",
1928
- color: disabled ? 'black-light' : 'black',
1929
- children: children
1930
- })]
1931
- });
1932
- }
1933
-
1934
- function ownKeys$b(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1846
+ var AnimatedViewContainer = /*#__PURE__*/styled(Animated$1.View).withConfig({
1847
+ displayName: "PressableAnimatedContainer__AnimatedViewContainer"
1848
+ })(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
1849
+ function PressableAnimatedContainer(_ref5) {
1850
+ var disabled = _ref5.disabled,
1851
+ _ref5$color = _ref5.color,
1852
+ color = _ref5$color === void 0 ? 'black' : _ref5$color,
1853
+ testID = _ref5.testID,
1854
+ _ref5$accessibilityRo = _ref5.accessibilityRole,
1855
+ accessibilityRole = _ref5$accessibilityRo === void 0 ? 'button' : _ref5$accessibilityRo,
1856
+ accessibilityLabel = _ref5.accessibilityLabel,
1857
+ children = _ref5.children,
1858
+ onPress = _ref5.onPress;
1859
+ var theme = /*#__PURE__*/useTheme();
1860
+ var pressed = useSharedValue(false);
1861
+ var opacityStyles = useAnimatedStyle(function () {
1862
+ var _f = function () {
1863
+ return {
1864
+ opacity: withSpring(pressed.value ? 1 : 0)
1865
+ };
1866
+ };
1935
1867
 
1936
- function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$b(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1937
- function TextArea(_ref) {
1938
- var props = _extends({}, _ref);
1868
+ _f._closure = {
1869
+ withSpring: withSpring,
1870
+ pressed: pressed
1871
+ };
1872
+ _f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
1873
+ _f.__workletHash = 10645190329247;
1874
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (60:41)";
1875
+ _f.__optimalization = 2;
1939
1876
 
1940
- var theme = /*#__PURE__*/useTheme();
1941
- return /*#__PURE__*/jsx(InputText, _objectSpread$b({
1942
- multiline: true,
1943
- textAlignVertical: "top",
1944
- minHeight: theme.kitt.forms.textArea.minHeight
1945
- }, props));
1877
+ global.__reanimatedWorkletInit(_f);
1878
+
1879
+ return _f;
1880
+ }());
1881
+ var scaleStyles = useAnimatedStyle(function () {
1882
+ var _f = function () {
1883
+ return {
1884
+ transform: [{
1885
+ scale: withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base["default"])
1886
+ }]
1887
+ };
1888
+ };
1889
+
1890
+ _f._closure = {
1891
+ withSpring: withSpring,
1892
+ pressed: pressed,
1893
+ theme: {
1894
+ kitt: {
1895
+ iconButton: {
1896
+ scale: {
1897
+ base: {
1898
+ active: theme.kitt.iconButton.scale.base.active,
1899
+ "default": theme.kitt.iconButton.scale.base["default"]
1900
+ }
1901
+ }
1902
+ }
1903
+ }
1904
+ }
1905
+ };
1906
+ _f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
1907
+ _f.__workletHash = 13861998831411;
1908
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (66:39)";
1909
+ _f.__optimalization = 2;
1910
+
1911
+ global.__reanimatedWorkletInit(_f);
1912
+
1913
+ return _f;
1914
+ }());
1915
+ return /*#__PURE__*/jsx(PressableIconButton, {
1916
+ accessibilityRole: accessibilityRole,
1917
+ disabled: disabled,
1918
+ color: color,
1919
+ testID: testID,
1920
+ accessibilityLabel: accessibilityLabel,
1921
+ onPress: onPress,
1922
+ onPressIn: function onPressIn() {
1923
+ pressed.value = true;
1924
+ },
1925
+ onPressOut: function onPressOut() {
1926
+ pressed.value = false;
1927
+ },
1928
+ children: /*#__PURE__*/jsxs(AnimatedViewContainer, {
1929
+ style: disabled ? [{
1930
+ transform: [{
1931
+ scale: 1
1932
+ }]
1933
+ }] : [scaleStyles],
1934
+ children: [/*#__PURE__*/jsx(AnimatedIconButtonBackground, {
1935
+ disabled: disabled,
1936
+ color: color,
1937
+ style: disabled ? [{
1938
+ opacity: 1
1939
+ }] : [opacityStyles]
1940
+ }), children]
1941
+ })
1942
+ });
1946
1943
  }
1947
1944
 
1948
- var Body = /*#__PURE__*/styled.View.withConfig({
1949
- displayName: "Body"
1950
- })(["", " background-color:", ";flex:1;"], function (_ref) {
1945
+ var IconButtonContentBorder = /*#__PURE__*/styled.View.withConfig({
1946
+ displayName: "IconButton__IconButtonContentBorder"
1947
+ })(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
1951
1948
  var theme = _ref.theme;
1952
- return theme.responsive.ifWindowSizeMatches({
1953
- minWidth: KittBreakpoints.MEDIUM
1954
- }, "padding-right: ".concat(theme.kitt.spacing * 12, "px;\n padding-left: ").concat(theme.kitt.spacing * 12, "px;"), "padding-right: ".concat(theme.kitt.spacing * 6, "px;\n padding-left: ").concat(theme.kitt.spacing * 6, "px;"));
1949
+ return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
1950
+ }, function (_ref2) {
1951
+ var theme = _ref2.theme,
1952
+ disabled = _ref2.disabled;
1953
+ return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
1954
+ }, function (_ref3) {
1955
+ var theme = _ref3.theme;
1956
+ return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
1957
+ }, function (_ref4) {
1958
+ var theme = _ref4.theme;
1959
+ return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
1960
+ }, function (_ref5) {
1961
+ var theme = _ref5.theme;
1962
+ return theme.kitt.iconButton.borderRadius;
1963
+ });
1964
+
1965
+ function IconButtonContent(_ref6) {
1966
+ var disabled = _ref6.disabled,
1967
+ color = _ref6.color,
1968
+ icon = _ref6.icon;
1969
+ return /*#__PURE__*/jsx(IconButtonContentBorder, {
1970
+ disabled: disabled,
1971
+ children: /*#__PURE__*/jsx(TypographyIcon, {
1972
+ color: disabled ? 'black-light' : color,
1973
+ icon: icon
1974
+ })
1975
+ });
1976
+ }
1977
+
1978
+ function IconButton(_ref7) {
1979
+ var icon = _ref7.icon,
1980
+ color = _ref7.color,
1981
+ disabled = _ref7.disabled,
1982
+ testID = _ref7.testID,
1983
+ accessibilityLabel = _ref7.accessibilityLabel,
1984
+ accessibilityRole = _ref7.accessibilityRole,
1985
+ onPress = _ref7.onPress;
1986
+ return /*#__PURE__*/jsx(PressableAnimatedContainer, {
1987
+ color: color,
1988
+ disabled: disabled,
1989
+ testID: testID,
1990
+ accessibilityLabel: accessibilityLabel,
1991
+ accessibilityRole: accessibilityRole,
1992
+ onPress: onPress,
1993
+ children: /*#__PURE__*/jsx(IconButtonContent, {
1994
+ disabled: disabled,
1995
+ color: color,
1996
+ icon: icon
1997
+ })
1998
+ });
1999
+ }
2000
+
2001
+ var OnCloseContext = /*#__PURE__*/createContext(function () {});
2002
+
2003
+ var HeaderView = /*#__PURE__*/styled.View.withConfig({
2004
+ displayName: "Header__HeaderView"
2005
+ })(["position:relative;padding:", "px;display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;align-items:center;border-bottom-width:1px;border-bottom-color:", ";min-height:57px;"], function (_ref) {
2006
+ var theme = _ref.theme;
2007
+ return theme.kitt.spacing * 2;
1955
2008
  }, function (_ref2) {
1956
2009
  var theme = _ref2.theme;
2010
+ return theme.kitt.colors.separator;
2011
+ });
2012
+ var LeftIconView = /*#__PURE__*/styled.View.withConfig({
2013
+ displayName: "Header__LeftIconView"
2014
+ })(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
2015
+ var theme = _ref3.theme;
2016
+ return theme.kitt.spacing * 2;
2017
+ });
2018
+ var RightIconView = /*#__PURE__*/styled.View.withConfig({
2019
+ displayName: "Header__RightIconView"
2020
+ })(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
2021
+ var theme = _ref4.theme;
2022
+ return theme.kitt.spacing * 2;
2023
+ });
2024
+ var TitleView = /*#__PURE__*/styled.View.withConfig({
2025
+ displayName: "Header__TitleView"
2026
+ })(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
2027
+ var theme = _ref5.theme,
2028
+ isIconLeft = _ref5.isIconLeft;
2029
+ return isIconLeft ? 0 : theme.kitt.spacing * 2;
2030
+ });
2031
+ function ModalHeader(_ref6) {
2032
+ var left = _ref6.left,
2033
+ right = _ref6.right,
2034
+ children = _ref6.children;
2035
+ var onClose = useContext(OnCloseContext);
2036
+ var isIconLeft = !!left;
2037
+ return /*#__PURE__*/jsxs(HeaderView, {
2038
+ children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
2039
+ children: left
2040
+ }), /*#__PURE__*/jsx(TitleView, {
2041
+ isIconLeft: isIconLeft,
2042
+ children: children
2043
+ }), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
2044
+ children: /*#__PURE__*/jsx(IconButton, {
2045
+ icon: /*#__PURE__*/jsx(XIcon, {}),
2046
+ onPress: onClose
2047
+ })
2048
+ })]
2049
+ });
2050
+ }
2051
+
2052
+ var ModalView = /*#__PURE__*/styled.View.withConfig({
2053
+ displayName: "Modal__ModalView"
2054
+ })(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
2055
+ var theme = _ref.theme;
2056
+ return theme.kitt.spacing * 20;
2057
+ }, function (_ref2) {
2058
+ var theme = _ref2.theme;
2059
+ return theme.kitt.spacing * 4;
2060
+ });
2061
+ var ContentView$1 = /*#__PURE__*/styled.View.withConfig({
2062
+ displayName: "Modal__ContentView"
2063
+ })(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
2064
+ var theme = _ref3.theme;
2065
+ return theme.kitt.card.borderRadius;
2066
+ }, function (_ref4) {
2067
+ var theme = _ref4.theme;
1957
2068
  return theme.kitt.colors.uiBackgroundLight;
1958
2069
  });
1959
- function FullScreenModalBody(_ref3) {
1960
- var children = _ref3.children;
1961
- return /*#__PURE__*/jsx(Body, {
1962
- children: children
2070
+ function Modal(_ref5) {
2071
+ var visible = _ref5.visible,
2072
+ children = _ref5.children,
2073
+ onClose = _ref5.onClose,
2074
+ onEntered = _ref5.onEntered,
2075
+ onExited = _ref5.onExited;
2076
+ return /*#__PURE__*/jsx(OnCloseContext.Provider, {
2077
+ value: onClose,
2078
+ children: /*#__PURE__*/jsx(Modal$1, {
2079
+ transparent: true,
2080
+ animationType: "fade",
2081
+ visible: visible,
2082
+ onShow: onEntered,
2083
+ onDismiss: onExited,
2084
+ onRequestClose: onClose,
2085
+ children: /*#__PURE__*/jsxs(ModalView, {
2086
+ children: [/*#__PURE__*/jsx(Overlay, {
2087
+ onPress: onClose
2088
+ }), /*#__PURE__*/jsx(ContentView$1, {
2089
+ children: children
2090
+ })]
2091
+ })
2092
+ })
2093
+ });
2094
+ }
2095
+ Modal.Header = ModalHeader;
2096
+ Modal.Body = ModalBody;
2097
+ Modal.Footer = ModalFooter;
2098
+
2099
+ function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2100
+
2101
+ function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2102
+
2103
+ function getDatePickerDisplayMode() {
2104
+ if (Platform.OS === 'android') return 'calendar';
2105
+ if (Platform.OS === 'ios') return 'spinner';
2106
+ return 'default';
2107
+ }
2108
+
2109
+ function PlatformDateTimePicker(_ref) {
2110
+ var value = _ref.value,
2111
+ _ref$defaultDate = _ref.defaultDate,
2112
+ defaultDate = _ref$defaultDate === void 0 ? new Date() : _ref$defaultDate,
2113
+ maximumDate = _ref.maximumDate,
2114
+ minimuDate = _ref.minimuDate,
2115
+ testID = _ref.testID,
2116
+ _onChange = _ref.onChange;
2117
+ var theme = /*#__PURE__*/useTheme();
2118
+ var displayMode = getDatePickerDisplayMode();
2119
+ var iosProps = Platform.OS === 'ios' ? {
2120
+ textColor: theme.kitt.colors.primary
2121
+ } : {};
2122
+ return /*#__PURE__*/jsx(DateTimePicker, _objectSpread$f(_objectSpread$f({
2123
+ is24Hour: true,
2124
+ testID: testID,
2125
+ value: value || defaultDate,
2126
+ mode: "date",
2127
+ maximumDate: maximumDate,
2128
+ minimumDate: minimuDate,
2129
+ display: displayMode
2130
+ }, iosProps), {}, {
2131
+ onChange: function onChange(_event, date) {
2132
+ return _onChange(date);
2133
+ }
2134
+ }));
2135
+ }
2136
+
2137
+ var _excluded$8 = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
2138
+
2139
+ function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2140
+
2141
+ function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2142
+
2143
+ function ModalTitle(_ref) {
2144
+ var children = _ref.children;
2145
+ return /*#__PURE__*/jsx(Modal.Header, {
2146
+ children: /*#__PURE__*/jsx(Typography.Text, {
2147
+ base: "body",
2148
+ variant: "bold",
2149
+ children: children
2150
+ })
2151
+ });
2152
+ }
2153
+
2154
+ function ModalPlatformDateTimePicker(_ref2) {
2155
+ var title = _ref2.title,
2156
+ isVisible = _ref2.isVisible,
2157
+ value = _ref2.value,
2158
+ validateButtonLabel = _ref2.validateButtonLabel,
2159
+ onClose = _ref2.onClose,
2160
+ onChange = _ref2.onChange,
2161
+ props = _objectWithoutProperties(_ref2, _excluded$8);
2162
+
2163
+ var _useState = useState(value),
2164
+ _useState2 = _slicedToArray(_useState, 2),
2165
+ currentValue = _useState2[0],
2166
+ setCurrentValue = _useState2[1]; // Prevent unsynced value between the modal and its parent state
2167
+
2168
+
2169
+ return /*#__PURE__*/jsx(Modal, {
2170
+ visible: Boolean(isVisible),
2171
+ onClose: function handleClose() {
2172
+ setCurrentValue(value);
2173
+ onClose();
2174
+ },
2175
+ children: isVisible ? /*#__PURE__*/jsxs(Fragment, {
2176
+ children: [title ? /*#__PURE__*/jsx(ModalTitle, {
2177
+ children: title
2178
+ }) : null, /*#__PURE__*/jsx(Modal.Body, {
2179
+ children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread$e(_objectSpread$e({}, props), {}, {
2180
+ value: currentValue,
2181
+ onChange: function handleChange(newDate) {
2182
+ setCurrentValue(function (prev) {
2183
+ return newDate || prev;
2184
+ });
2185
+ }
2186
+ }))
2187
+ }), /*#__PURE__*/jsx(Modal.Footer, {
2188
+ children: /*#__PURE__*/jsx(Button, {
2189
+ stretch: true,
2190
+ type: "primary",
2191
+ onPress: function handleSubmit() {
2192
+ onChange(currentValue);
2193
+ },
2194
+ children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
2195
+ children: validateButtonLabel
2196
+ }) : /*#__PURE__*/jsx(FormattedMessage, {
2197
+ id: "kitt-universal.ModalDateTimePicker.confirm"
2198
+ })
2199
+ })
2200
+ })]
2201
+ }) : null
1963
2202
  });
1964
2203
  }
1965
2204
 
1966
- var SideContainer = /*#__PURE__*/styled.View.withConfig({
1967
- displayName: "Header__SideContainer"
1968
- })(["", ""], function (_ref) {
2205
+ function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2206
+
2207
+ function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2208
+
2209
+ function prefixWithZero(value) {
2210
+ return "".concat(value).padStart(2, '0');
2211
+ }
2212
+
2213
+ var PartContainer = /*#__PURE__*/styled.View.withConfig({
2214
+ displayName: "DatePicker__PartContainer"
2215
+ })(["margin-right:", ";", ";"], function (_ref) {
1969
2216
  var theme = _ref.theme,
1970
- _ref$side = _ref.side,
1971
- side = _ref$side === void 0 ? 'left' : _ref$side;
1972
- var padding = theme.kitt.spacing * 2;
2217
+ $isLast = _ref.$isLast;
2218
+ return !$isLast ? "".concat(theme.kitt.spacing * 2, "px") : 0;
2219
+ }, function (_ref2) {
2220
+ var $isStretch = _ref2.$isStretch;
2221
+ return $isStretch ? css(["flex:0.33;flex-grow:1;"]) : undefined;
2222
+ });
2223
+ var DatePickerPressable = /*#__PURE__*/styled.Pressable.withConfig({
2224
+ displayName: "DatePicker__DatePickerPressable"
2225
+ })(["display:flex;flex-direction:row;", ";"], function (_ref3) {
2226
+ var $isStretch = _ref3.$isStretch;
1973
2227
 
1974
- if (side === 'left') {
1975
- return "padding-right: ".concat(padding, "px;");
2228
+ if ($isStretch) {
2229
+ return css(["width:100%;"]);
1976
2230
  }
1977
2231
 
1978
- return "padding-left: ".concat(padding, "px;");
2232
+ return css(["align-self:baseline;"]);
1979
2233
  });
2234
+ function DatePicker(_ref4) {
2235
+ var value = _ref4.value,
2236
+ id = _ref4.id,
2237
+ disabled = _ref4.disabled,
2238
+ placeholder = _ref4.placeholder,
2239
+ state = _ref4.state,
2240
+ internalForceState = _ref4.internalForceState,
2241
+ testID = _ref4.testID,
2242
+ stretch = _ref4.stretch,
2243
+ pickerDefaultDate = _ref4.pickerDefaultDate,
2244
+ pickerUITestID = _ref4.pickerUITestID,
2245
+ pickerUITitle = _ref4.pickerUITitle,
2246
+ pickerUIValidateButtonLabel = _ref4.pickerUIValidateButtonLabel,
2247
+ onChange = _ref4.onChange,
2248
+ onFocus = _ref4.onFocus,
2249
+ onBlur = _ref4.onBlur;
1980
2250
 
1981
- function getHeaderHorizontalMediumPadding(spacing) {
1982
- return spacing * 6;
2251
+ var _useState = useState(false),
2252
+ _useState2 = _slicedToArray(_useState, 2),
2253
+ isPickerUIVisible = _useState2[0],
2254
+ setIsPickerUIVisible = _useState2[1];
2255
+
2256
+ var _useState3 = useState(false),
2257
+ _useState4 = _slicedToArray(_useState3, 2),
2258
+ isFocused = _useState4[0],
2259
+ setIsFocused = _useState4[1];
2260
+
2261
+ var _useState5 = useState(value),
2262
+ _useState6 = _slicedToArray(_useState5, 2),
2263
+ currentValue = _useState6[0],
2264
+ setCurrentValue = _useState6[1];
2265
+
2266
+ var handleModalClose = function () {
2267
+ if (onBlur) onBlur();
2268
+ setIsPickerUIVisible(false);
2269
+ setIsFocused(false);
2270
+ };
2271
+
2272
+ var handleChange = function (newDate) {
2273
+ setCurrentValue(newDate);
2274
+ onChange(newDate);
2275
+ handleModalClose();
2276
+ };
2277
+
2278
+ var currentState = internalForceState || getInputUIState({
2279
+ isFocused: isFocused,
2280
+ isDisabled: Boolean(disabled),
2281
+ formState: state
2282
+ });
2283
+ var sharedPickerProps = {
2284
+ testID: pickerUITestID,
2285
+ value: currentValue,
2286
+ onChange: handleChange
2287
+ };
2288
+ var sharedPartProps = {
2289
+ disabled: disabled,
2290
+ $state: currentState,
2291
+ defaultDate: pickerDefaultDate
2292
+ };
2293
+ return /*#__PURE__*/jsxs(Fragment, {
2294
+ children: [/*#__PURE__*/jsxs(DatePickerPressable, {
2295
+ $isStretch: stretch,
2296
+ nativeID: id,
2297
+ disabled: disabled,
2298
+ testID: testID,
2299
+ onPress: function handleModalOpen() {
2300
+ if (onFocus) onFocus();
2301
+ setIsPickerUIVisible(true);
2302
+ setIsFocused(true);
2303
+ },
2304
+ children: [/*#__PURE__*/jsx(PartContainer, {
2305
+ $isStretch: stretch,
2306
+ children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$d(_objectSpread$d({}, sharedPartProps), {}, {
2307
+ partName: "day",
2308
+ value: currentValue ? prefixWithZero(currentValue.getDate()) : undefined,
2309
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.day
2310
+ }))
2311
+ }), /*#__PURE__*/jsx(PartContainer, {
2312
+ $isStretch: stretch,
2313
+ children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$d(_objectSpread$d({}, sharedPartProps), {}, {
2314
+ partName: "month",
2315
+ value: currentValue ? prefixWithZero(currentValue.getMonth() + 1) : undefined,
2316
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.month
2317
+ }))
2318
+ }), /*#__PURE__*/jsx(PartContainer, {
2319
+ $isLast: true,
2320
+ $isStretch: stretch,
2321
+ children: /*#__PURE__*/jsx(DatePickerInputPart, _objectSpread$d(_objectSpread$d({}, sharedPartProps), {}, {
2322
+ partName: "year",
2323
+ value: currentValue === null || currentValue === void 0 ? void 0 : currentValue.getFullYear(),
2324
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder.year
2325
+ }))
2326
+ })]
2327
+ }), /*#__PURE__*/jsxs(Fragment, {
2328
+ children: [Platform.OS === 'android' && isPickerUIVisible ? /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread$d({}, sharedPickerProps)) : null, Platform.OS !== 'android' ? /*#__PURE__*/jsx(ModalPlatformDateTimePicker, _objectSpread$d(_objectSpread$d({}, sharedPickerProps), {}, {
2329
+ isVisible: isPickerUIVisible,
2330
+ title: pickerUITitle,
2331
+ validateButtonLabel: pickerUIValidateButtonLabel,
2332
+ onClose: handleModalClose,
2333
+ onChange: handleChange
2334
+ })) : null]
2335
+ })]
2336
+ });
1983
2337
  }
1984
2338
 
1985
- var Header = /*#__PURE__*/styled.View.withConfig({
1986
- displayName: "Header"
1987
- })(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
2339
+ var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
2340
+ displayName: "InputTextContainer"
2341
+ })(["position:relative;"]);
2342
+
2343
+ var _excluded$7 = ["id", "right", "minHeight", "state", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoCompleteType", "keyboardType", "onFocus", "onBlur"];
2344
+
2345
+ function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2346
+
2347
+ function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2348
+ var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
2349
+ displayName: "InputText__StyledTextInput"
2350
+ })(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
2351
+ var theme = _ref.theme,
2352
+ multiline = _ref.multiline;
2353
+
2354
+ if (!multiline && Platform.OS === 'ios') {
2355
+ return theme.kitt.forms.input.padding.iOSSingleLine;
2356
+ }
2357
+
2358
+ return theme.kitt.forms.input.padding["default"];
2359
+ }, function (_ref2) {
1988
2360
  var theme = _ref2.theme,
1989
- _ref2$insetTop = _ref2.insetTop,
1990
- insetTop = _ref2$insetTop === void 0 ? 0 : _ref2$insetTop;
1991
- var paddingTop = insetTop + theme.kitt.fullScreenModal.header.paddingVertical;
1992
- var _theme$kitt$fullScree = theme.kitt.fullScreenModal.header,
1993
- paddingVertical = _theme$kitt$fullScree.paddingVertical,
1994
- paddingHorizontal = _theme$kitt$fullScree.paddingHorizontal;
1995
- return theme.responsive.ifWindowSizeMatches({
1996
- minWidth: KittBreakpoints.MEDIUM
1997
- }, "padding: ".concat(paddingTop, "px ").concat(getHeaderHorizontalMediumPadding(theme.kitt.spacing), "px ").concat(paddingVertical, "px;"), "padding: ".concat(paddingTop, "px ").concat(paddingHorizontal, "px ").concat(paddingVertical, "px;"));
2361
+ multiline = _ref2.multiline;
2362
+ if (!multiline && Platform.OS === 'ios') return 0;
2363
+ var typeConfigKey = getTypographyTypeConfigKey(theme);
2364
+ return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
1998
2365
  }, function (_ref3) {
1999
- var theme = _ref3.theme;
2000
- return theme.kitt.fullScreenModal.header.borderColor;
2366
+ var $minHeight = _ref3.$minHeight;
2367
+ return $minHeight;
2001
2368
  });
2002
- var HeaderContent = /*#__PURE__*/styled.View.withConfig({
2003
- displayName: "Header__HeaderContent"
2004
- })(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
2005
- var theme = _ref4.theme,
2006
- leftWidth = _ref4.leftWidth,
2007
- rightWidth = _ref4.rightWidth,
2008
- windowWidth = _ref4.windowWidth;
2369
+ var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
2370
+ displayName: "InputText__RightInputContainer"
2371
+ })(["position:absolute;right:0;top:0;bottom:0;justify-content:center;padding:10px;"]);
2372
+ var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
2373
+ var id = _ref4.id,
2374
+ right = _ref4.right,
2375
+ _ref4$minHeight = _ref4.minHeight,
2376
+ minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
2377
+ formState = _ref4.state,
2378
+ internalForceState = _ref4.internalForceState,
2379
+ _ref4$disabled = _ref4.disabled,
2380
+ disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
2381
+ _ref4$autoCorrect = _ref4.autoCorrect,
2382
+ autoCorrect = _ref4$autoCorrect === void 0 ? true : _ref4$autoCorrect,
2383
+ _ref4$textContentType = _ref4.textContentType,
2384
+ textContentType = _ref4$textContentType === void 0 ? 'none' : _ref4$textContentType,
2385
+ _ref4$autoCompleteTyp = _ref4.autoCompleteType,
2386
+ autoCompleteType = _ref4$autoCompleteTyp === void 0 ? 'off' : _ref4$autoCompleteTyp,
2387
+ _ref4$keyboardType = _ref4.keyboardType,
2388
+ keyboardType = _ref4$keyboardType === void 0 ? 'default' : _ref4$keyboardType,
2389
+ _onFocus = _ref4.onFocus,
2390
+ _onBlur = _ref4.onBlur,
2391
+ props = _objectWithoutProperties(_ref4, _excluded$7);
2009
2392
 
2010
- /*
2011
- * Since we don't have controll over the rendered left and right elements,
2012
- * we must apply some logic to give the title all the available space
2013
- */
2014
- var sideElementMaxWidth = Math.max(leftWidth, rightWidth);
2015
- var parentHorizontalPadding = theme.kitt.fullScreenModal.header.paddingHorizontal * 2;
2016
- var parentHorizontalPaddingMedium = getHeaderHorizontalMediumPadding(theme.kitt.spacing) * 2;
2393
+ var theme = /*#__PURE__*/useTheme();
2017
2394
 
2018
- var computeWidth = function (breakpointPadding) {
2019
- return windowWidth - breakpointPadding - sideElementMaxWidth * 2;
2020
- };
2395
+ var _useState = useState(false),
2396
+ _useState2 = _slicedToArray(_useState, 2),
2397
+ isFocused = _useState2[0],
2398
+ setIsFocused = _useState2[1];
2021
2399
 
2022
- return theme.responsive.ifWindowSizeMatches({
2023
- minWidth: KittBreakpoints.MEDIUM
2024
- }, "width: ".concat(computeWidth(parentHorizontalPaddingMedium), "px;"), "width: ".concat(computeWidth(parentHorizontalPadding), "px;"));
2025
- }, function (_ref5) {
2026
- var leftWidth = _ref5.leftWidth,
2027
- rightWidth = _ref5.rightWidth;
2028
- // Depending of the wider element, we must add a margin to fill the diff in space between elements
2029
- var deltaMargin = Math.abs(leftWidth - rightWidth);
2400
+ var state = internalForceState || getInputUIState({
2401
+ isFocused: isFocused,
2402
+ isDisabled: disabled,
2403
+ formState: formState
2404
+ });
2405
+ return /*#__PURE__*/jsxs(InputTextContainer, {
2406
+ $isDisabled: disabled,
2407
+ children: [/*#__PURE__*/jsx(StyledTextInput, _objectSpread$c(_objectSpread$c({
2408
+ ref: ref,
2409
+ nativeID: id,
2410
+ editable: !disabled,
2411
+ keyboardType: keyboardType,
2412
+ autoCompleteType: autoCompleteType,
2413
+ autoCorrect: autoCorrect,
2414
+ $minHeight: minHeight,
2415
+ textContentType: textContentType,
2416
+ placeholderTextColor: theme.kitt.forms.input.color.placeholder,
2417
+ selectionColor: theme.kitt.forms.input.color.selection
2418
+ }, props), {}, {
2419
+ $state: state,
2420
+ onFocus: function onFocus(e) {
2421
+ setIsFocused(true);
2422
+ if (_onFocus) _onFocus(e);
2423
+ },
2424
+ onBlur: function onBlur(e) {
2425
+ setIsFocused(false);
2426
+ if (_onBlur) _onBlur(e);
2427
+ }
2428
+ })), right ? /*#__PURE__*/jsx(RightInputContainer, {
2429
+ children: right
2430
+ }) : null]
2431
+ });
2432
+ });
2030
2433
 
2031
- if (leftWidth > rightWidth) {
2032
- return "margin-right: ".concat(deltaMargin, "px;");
2033
- }
2434
+ function ownKeys$b(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2034
2435
 
2035
- return "margin-left: ".concat(deltaMargin, "px;");
2036
- });
2037
- function FullScreenModalHeader(_ref6) {
2038
- var children = _ref6.children,
2039
- right = _ref6.right,
2040
- left = _ref6.left;
2436
+ function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$b(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2437
+ function InputEmail(props) {
2438
+ return /*#__PURE__*/jsx(InputText, _objectSpread$b({
2439
+ autoCompleteType: "email",
2440
+ keyboardType: "email-address",
2441
+ textContentType: "emailAddress"
2442
+ }, props));
2443
+ }
2041
2444
 
2042
- var _useSafeAreaInsets = useSafeAreaInsets(),
2043
- top = _useSafeAreaInsets.top;
2445
+ var getColorFromState = function (state) {
2446
+ switch (state) {
2447
+ case 'invalid':
2448
+ return 'danger';
2044
2449
 
2045
- var dimensions = useWindowDimensions();
2450
+ case 'valid':
2451
+ default:
2452
+ return 'black-light';
2453
+ }
2454
+ };
2046
2455
 
2047
- var _useState = useState(0),
2048
- _useState2 = _slicedToArray(_useState, 2),
2049
- leftWidth = _useState2[0],
2050
- setLeftWidth = _useState2[1];
2456
+ function InputFeedback(_ref) {
2457
+ var state = _ref.state,
2458
+ testID = _ref.testID,
2459
+ children = _ref.children;
2460
+ return /*#__PURE__*/jsx(Typography.Text, {
2461
+ base: "body-small",
2462
+ color: getColorFromState(state),
2463
+ testID: testID,
2464
+ children: children
2465
+ });
2466
+ }
2051
2467
 
2052
- var _useState3 = useState(0),
2053
- _useState4 = _slicedToArray(_useState3, 2),
2054
- rightWidth = _useState4[0],
2055
- setRightWidth = _useState4[1];
2468
+ var FieldContainer = /*#__PURE__*/styled.View.withConfig({
2469
+ displayName: "InputField__FieldContainer"
2470
+ })(["padding:5px 0 10px;"]);
2471
+ var FeedbackContainer = /*#__PURE__*/styled.View.withConfig({
2472
+ displayName: "InputField__FeedbackContainer"
2473
+ })(["", ";"], function (_ref) {
2474
+ var theme = _ref.theme;
2475
+ return theme.responsive.ifWindowSizeMatches({
2476
+ minWidth: KittBreakpoints.SMALL
2477
+ }, 'padding-top: 10px', 'padding-top: 5px');
2478
+ });
2479
+ var FieldLabelContainer = /*#__PURE__*/styled.View.withConfig({
2480
+ displayName: "InputField__FieldLabelContainer"
2481
+ })(["flex-direction:row;align-items:center;padding-bottom:", "px;"], function (_ref2) {
2482
+ var theme = _ref2.theme;
2483
+ return theme.kitt.forms.inputField.labelContainerPaddingBottom;
2484
+ });
2485
+ var LabelContainer = /*#__PURE__*/styled.View.withConfig({
2486
+ displayName: "InputField__LabelContainer"
2487
+ })(["margin-right:", "px;"], function (_ref3) {
2488
+ var theme = _ref3.theme;
2489
+ return theme.kitt.forms.inputField.iconMarginLeft;
2490
+ });
2491
+ function InputField(_ref4) {
2492
+ var label = _ref4.label,
2493
+ labelFeedback = _ref4.labelFeedback,
2494
+ input = _ref4.input,
2495
+ feedback = _ref4.feedback;
2496
+ return /*#__PURE__*/jsxs(FieldContainer, {
2497
+ children: [label ? /*#__PURE__*/jsxs(FieldLabelContainer, {
2498
+ children: [/*#__PURE__*/jsx(LabelContainer, {
2499
+ children: label
2500
+ }), labelFeedback]
2501
+ }) : null, input, feedback ? /*#__PURE__*/jsx(FeedbackContainer, {
2502
+ children: feedback
2503
+ }) : null]
2504
+ });
2505
+ }
2056
2506
 
2057
- var handleLayoutChange = function (event, side) {
2058
- // Prevents react to nullify event on rerenders
2059
- event.persist();
2507
+ function getIconColor(state, disabled) {
2508
+ if (disabled) return 'black-light';
2060
2509
 
2061
- if (side === 'left') {
2062
- setLeftWidth(event.nativeEvent.layout.width);
2063
- return;
2064
- }
2510
+ switch (state) {
2511
+ case 'invalid':
2512
+ return 'danger';
2065
2513
 
2066
- setRightWidth(event.nativeEvent.layout.width);
2067
- };
2514
+ case 'valid':
2515
+ return 'success';
2068
2516
 
2069
- return /*#__PURE__*/jsxs(Header, {
2070
- insetTop: Platform.OS === 'ios' ? undefined : top,
2071
- children: [left ? /*#__PURE__*/jsx(SideContainer, {
2072
- onLayout: function onLayout(e) {
2073
- return handleLayoutChange(e, 'left');
2074
- },
2075
- children: left
2076
- }) : null, /*#__PURE__*/jsx(HeaderContent, {
2077
- windowWidth: dimensions.width,
2078
- leftWidth: leftWidth,
2079
- rightWidth: rightWidth,
2080
- children: children
2081
- }), right ? /*#__PURE__*/jsx(SideContainer, {
2082
- side: "right",
2083
- onLayout: function onLayout(e) {
2084
- return handleLayoutChange(e, 'right');
2085
- },
2086
- children: right
2087
- }) : null]
2088
- });
2517
+ default:
2518
+ return undefined;
2519
+ }
2089
2520
  }
2090
2521
 
2091
- var Container$3 = /*#__PURE__*/styled.View.withConfig({
2092
- displayName: "FullScreenModal__Container"
2093
- })(["flex:1;background-color:", ";"], function (_ref) {
2094
- var theme = _ref.theme;
2095
- return theme.kitt.colors.uiBackground;
2096
- });
2097
- function FullScreenModal(_ref2) {
2098
- var children = _ref2.children;
2099
- return /*#__PURE__*/jsx(Container$3, {
2100
- children: children
2522
+ function InputIcon(_ref) {
2523
+ var icon = _ref.icon,
2524
+ state = _ref.state,
2525
+ disabled = _ref.disabled;
2526
+ var theme = /*#__PURE__*/useTheme();
2527
+ var color = getIconColor(state, disabled);
2528
+ return /*#__PURE__*/jsx(TypographyIcon, {
2529
+ color: color,
2530
+ icon: icon,
2531
+ size: theme.kitt.forms.input.icon.size
2101
2532
  });
2102
2533
  }
2103
- FullScreenModal.Header = FullScreenModalHeader;
2104
- FullScreenModal.Body = FullScreenModalBody;
2105
-
2106
- var _excluded$7 = ["as", "children"];
2107
2534
 
2108
2535
  function ownKeys$a(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2109
2536
 
2110
2537
  function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$a(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2111
- function StyleWebWrapper(_ref) {
2112
- var as = _ref.as,
2113
- children = _ref.children,
2114
- props = _objectWithoutProperties(_ref, _excluded$7);
2538
+ function InputPressable(_ref) {
2539
+ var props = _extends({}, _ref);
2115
2540
 
2116
- if (Platform.OS !== 'web') return children;
2117
- // as or default to div. If as is undefined, T is div but typescript is not sure
2118
- return /*#__PURE__*/jsx(as || 'div', _objectSpread$a(_objectSpread$a({}, props), {}, {
2119
- children: children
2120
- }));
2541
+ return /*#__PURE__*/jsx(Pressable, _objectSpread$a({}, props));
2121
2542
  }
2122
2543
 
2544
+ var _excluded$6 = ["isPasswordDefaultVisible", "right"];
2545
+
2123
2546
  function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2124
2547
 
2125
2548
  function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2126
- // type $Without<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
2127
- // type $DeepPartial<T> = { [P in keyof T]?: $DeepPartial<T[P]> };
2128
- // export function withTheme<Props extends { theme: DefaultTheme }, C>(
2129
- // WrappedComponent: ComponentType<Props> & C,
2130
- // ): ComponentType<SetOptional<Props, 'theme'>> & hoistNonReactStatics.NonReactStatics<typeof WrappedComponent> {
2131
- // return function ThemedComponent(props) {
2132
- // const theme = useTheme();
2133
- // return (<WrappedComponent theme={theme} {...(props as any)} />) as any;
2134
- // };
2135
- // }
2136
- function withTheme(WrappedComponent) {
2137
- // eslint-disable-next-line prefer-arrow-callback
2138
- return /*#__PURE__*/forwardRef(function (props, ref) {
2139
- var theme = /*#__PURE__*/useTheme();
2140
- return /*#__PURE__*/jsx(WrappedComponent, _objectSpread$9({
2141
- ref: ref,
2142
- theme: theme
2143
- }, props));
2144
- });
2145
- }
2549
+ function InputPassword(_ref) {
2550
+ var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
2551
+ right = _ref.right,
2552
+ props = _objectWithoutProperties(_ref, _excluded$6);
2553
+
2554
+ var _useState = useState(Boolean(isPasswordDefaultVisible)),
2555
+ _useState2 = _slicedToArray(_useState, 2),
2556
+ isVisible = _useState2[0],
2557
+ setIsVisible = _useState2[1];
2146
2558
 
2147
- var _excluded$6 = ["color", "disabled"];
2559
+ return /*#__PURE__*/jsx(InputText, _objectSpread$9(_objectSpread$9({}, props), {}, {
2560
+ textContentType: "password",
2561
+ autoCompleteType: "password",
2562
+ autoCorrect: false,
2563
+ secureTextEntry: !isVisible,
2564
+ right: right || /*#__PURE__*/jsx(InputPressable, {
2565
+ accessibilityRole: "button",
2566
+ onPress: function onPress() {
2567
+ return setIsVisible(function (prev) {
2568
+ return !prev;
2569
+ });
2570
+ },
2571
+ children: /*#__PURE__*/jsx(InputIcon, {
2572
+ icon: isVisible ? /*#__PURE__*/jsx(EyeOffIcon, {}) : /*#__PURE__*/jsx(EyeIcon, {})
2573
+ })
2574
+ })
2575
+ }));
2576
+ }
2148
2577
 
2149
2578
  function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2150
2579
 
2151
2580
  function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2152
- var PressableIconButtonWebWrapper = withTheme( /*#__PURE__*/styled$1("div")({
2153
- name: "PressableIconButtonWebWrapper",
2154
- "class": "p1nlccvg",
2155
- vars: {
2156
- "p1nlccvg-0": [function (_ref) {
2157
- var theme = _ref.theme,
2158
- $isDisabled = _ref.$isDisabled;
2159
- return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.hover;
2160
- }],
2161
- "p1nlccvg-2": [function (_ref2) {
2162
- var theme = _ref2.theme,
2163
- $isDisabled = _ref2.$isDisabled;
2164
- return $isDisabled ? 1 : theme.kitt.iconButton.scale.medium.hover;
2165
- }],
2166
- "p1nlccvg-3": [function (_ref3) {
2167
- var theme = _ref3.theme,
2168
- $isDisabled = _ref3.$isDisabled;
2169
- return $isDisabled ? 1 : theme.kitt.iconButton.scale.base.active;
2170
- }],
2171
- "p1nlccvg-4": [function (_ref4) {
2172
- var theme = _ref4.theme,
2173
- $isWhite = _ref4.$isWhite,
2174
- $isDisabled = _ref4.$isDisabled;
2175
- if ($isDisabled) return theme.kitt.iconButton.disabled.backgroundColor;
2176
- var _theme$kitt$iconButto = theme.kitt.iconButton,
2177
- white = _theme$kitt$iconButto.white,
2178
- defaultIconButton = _theme$kitt$iconButto["default"];
2179
- if ($isWhite) return white.pressedBackgroundColor;
2180
- return defaultIconButton.pressedBackgroundColor;
2181
- }]
2581
+ function InputPhone(props) {
2582
+ return /*#__PURE__*/jsx(InputText, _objectSpread$8(_objectSpread$8({}, props), {}, {
2583
+ autoCompleteType: "tel",
2584
+ keyboardType: "number-pad",
2585
+ textContentType: "telephoneNumber"
2586
+ }));
2587
+ }
2588
+
2589
+ var getTypographyColor = function (type) {
2590
+ return type ? 'white' : 'black';
2591
+ };
2592
+
2593
+ var InputTagContainer = /*#__PURE__*/styled(View).withConfig({
2594
+ displayName: "InputTag__InputTagContainer"
2595
+ })(["align-items:center;justify-content:center;flex-direction:row;align-self:flex-start;overflow:hidden;padding-horizontal:", "px;background-color:", ";border-radius:", "px;"], function (_ref) {
2596
+ var theme = _ref.theme;
2597
+ return theme.kitt.spacing * 2;
2598
+ }, function (_ref2) {
2599
+ var theme = _ref2.theme,
2600
+ type = _ref2.type;
2601
+
2602
+ if (type === 'success') {
2603
+ return theme.kitt.forms.inputTag.success.backgroundColor;
2182
2604
  }
2183
- }));
2184
- var StyledPressableIconButton = /*#__PURE__*/styled.Pressable.withConfig({
2185
- displayName: "PressableIconButton__StyledPressableIconButton"
2186
- })(["border-radius:", "px;width:", "px;height:", "px;align-items:center;justify-content:center;position:relative;background-color:transparent;", ";"], function (_ref5) {
2187
- var theme = _ref5.theme;
2188
- return theme.kitt.iconButton.borderRadius;
2189
- }, function (_ref6) {
2190
- var theme = _ref6.theme;
2191
- return theme.kitt.iconButton.width;
2192
- }, function (_ref7) {
2193
- var theme = _ref7.theme;
2194
- return theme.kitt.iconButton.height;
2195
- }, function (_ref8) {
2196
- var theme = _ref8.theme,
2197
- disabled = _ref8.disabled;
2198
- var iconButton = theme.kitt.iconButton;
2199
2605
 
2200
- if (Platform.OS !== 'web') {
2201
- return undefined;
2606
+ if (type === 'danger') {
2607
+ return theme.kitt.forms.inputTag.danger.backgroundColor;
2202
2608
  }
2203
2609
 
2204
- var transition = iconButton.transition;
2610
+ return theme.kitt.forms.inputTag["default"].backgroundColor;
2611
+ }, function (_ref3) {
2612
+ var theme = _ref3.theme;
2613
+ return theme.kitt.forms.inputTag.borderRadius;
2614
+ });
2615
+ var IconContainer = /*#__PURE__*/styled(View).withConfig({
2616
+ displayName: "InputTag__IconContainer"
2617
+ })(["margin-right:", "px;"], function (_ref4) {
2618
+ var theme = _ref4.theme;
2619
+ return theme.kitt.spacing;
2620
+ });
2621
+ function InputTag(_ref5) {
2622
+ var children = _ref5.children,
2623
+ type = _ref5.type,
2624
+ icon = _ref5.icon;
2625
+ var typographyColor = getTypographyColor(type);
2626
+ var theme = useKittTheme();
2627
+ return /*#__PURE__*/jsxs(InputTagContainer, {
2628
+ type: type,
2629
+ children: [icon && /*#__PURE__*/jsx(IconContainer, {
2630
+ children: /*#__PURE__*/jsx(TypographyIcon, {
2631
+ icon: icon,
2632
+ size: theme.kitt.forms.inputTag.iconSize,
2633
+ color: typographyColor
2634
+ })
2635
+ }), /*#__PURE__*/jsx(Typography.Text, {
2636
+ base: "body-small",
2637
+ color: typographyColor,
2638
+ children: children
2639
+ })]
2640
+ });
2641
+ }
2205
2642
 
2206
- if (disabled) {
2207
- return "\n background-color: ".concat(iconButton.disabled.backgroundColor, ";\n ");
2208
- }
2643
+ function Label(_ref) {
2644
+ var htmlFor = _ref.htmlFor,
2645
+ children = _ref.children;
2646
+ return /*#__PURE__*/jsx(Typography.Text, {
2647
+ base: "body",
2648
+ children: Platform.OS === 'web' ? /*#__PURE__*/jsx("label", {
2649
+ htmlFor: htmlFor,
2650
+ children: children
2651
+ }) : children
2652
+ });
2653
+ }
2209
2654
 
2210
- return "\n transition: ".concat(transition.property, " ").concat(transition.duration, " ").concat(transition.timingFunction, ";\n ");
2655
+ var OuterRadio = /*#__PURE__*/styled.View.withConfig({
2656
+ displayName: "Radio__OuterRadio"
2657
+ })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;border-width:", "px;border-color:", ";"], function (_ref) {
2658
+ var theme = _ref.theme,
2659
+ disabled = _ref.disabled;
2660
+ return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].backgroundColor;
2661
+ }, function (_ref2) {
2662
+ var theme = _ref2.theme;
2663
+ return theme.kitt.forms.radio.size;
2664
+ }, function (_ref3) {
2665
+ var theme = _ref3.theme;
2666
+ return theme.kitt.forms.radio.size;
2667
+ }, function (_ref4) {
2668
+ var theme = _ref4.theme;
2669
+ return theme.kitt.forms.radio.size / 2;
2670
+ }, function (_ref5) {
2671
+ var theme = _ref5.theme;
2672
+ return theme.kitt.forms.radio.unchecked.borderWidth;
2673
+ }, function (_ref6) {
2674
+ var theme = _ref6.theme,
2675
+ disabled = _ref6.disabled;
2676
+ return theme.kitt.forms.radio[disabled ? 'disabled' : 'unchecked'].borderColor;
2677
+ });
2678
+ var SelectedOuterRadio = /*#__PURE__*/styled.View.withConfig({
2679
+ displayName: "Radio__SelectedOuterRadio"
2680
+ })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;justify-content:center;align-items:center;"], function (_ref7) {
2681
+ var theme = _ref7.theme;
2682
+ return theme.kitt.forms.radio.checked.backgroundColor;
2683
+ }, function (_ref8) {
2684
+ var theme = _ref8.theme;
2685
+ return theme.kitt.forms.radio.size;
2686
+ }, function (_ref9) {
2687
+ var theme = _ref9.theme;
2688
+ return theme.kitt.forms.radio.size;
2689
+ }, function (_ref10) {
2690
+ var theme = _ref10.theme;
2691
+ return theme.kitt.forms.radio.size / 2;
2692
+ });
2693
+ var SelectedInnerRadio = /*#__PURE__*/styled.View.withConfig({
2694
+ displayName: "Radio__SelectedInnerRadio"
2695
+ })(["background-color:", ";width:", "px;height:", "px;border-radius:", "px;"], function (_ref11) {
2696
+ var theme = _ref11.theme;
2697
+ return theme.kitt.forms.radio.checked.innerBackgroundColor;
2698
+ }, function (_ref12) {
2699
+ var theme = _ref12.theme;
2700
+ return theme.kitt.forms.radio.checked.innerSize;
2701
+ }, function (_ref13) {
2702
+ var theme = _ref13.theme;
2703
+ return theme.kitt.forms.radio.checked.innerSize;
2704
+ }, function (_ref14) {
2705
+ var theme = _ref14.theme;
2706
+ return theme.kitt.forms.radio.checked.innerSize / 2;
2211
2707
  });
2212
- function PressableIconButton(_ref9) {
2213
- var color = _ref9.color,
2214
- disabled = _ref9.disabled,
2215
- props = _objectWithoutProperties(_ref9, _excluded$6);
2216
-
2217
- return /*#__PURE__*/jsx(StyleWebWrapper, {
2218
- as: PressableIconButtonWebWrapper,
2219
- $isWhite: color === 'white',
2220
- $isDisabled: Boolean(disabled),
2221
- children: /*#__PURE__*/jsx(StyledPressableIconButton, _objectSpread$8(_objectSpread$8({}, props), {}, {
2708
+ var Container$4 = /*#__PURE__*/styled.Pressable.withConfig({
2709
+ displayName: "Radio__Container"
2710
+ })(["flex-direction:row;align-items:center;"]);
2711
+ var Text = /*#__PURE__*/styled(Typography.Text).withConfig({
2712
+ displayName: "Radio__Text"
2713
+ })(["margin-left:", "px;"], function (_ref15) {
2714
+ var theme = _ref15.theme;
2715
+ return theme.kitt.spacing * 2;
2716
+ });
2717
+ function Radio(_ref16) {
2718
+ var id = _ref16.id,
2719
+ checked = _ref16.checked,
2720
+ onChange = _ref16.onChange,
2721
+ value = _ref16.value,
2722
+ _ref16$disabled = _ref16.disabled,
2723
+ disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
2724
+ children = _ref16.children;
2725
+ return /*#__PURE__*/jsxs(Container$4, {
2726
+ nativeID: id,
2727
+ disabled: disabled,
2728
+ accessibilityRole: "radio",
2729
+ "aria-checked": checked,
2730
+ focusable: checked && !disabled,
2731
+ onPress: function handlePress() {
2732
+ onChange(value);
2733
+ },
2734
+ children: [checked && !disabled ? /*#__PURE__*/jsx(SelectedOuterRadio, {
2735
+ children: /*#__PURE__*/jsx(SelectedInnerRadio, {})
2736
+ }) : /*#__PURE__*/jsx(OuterRadio, {
2222
2737
  disabled: disabled
2223
- }))
2738
+ }), /*#__PURE__*/jsx(Text, {
2739
+ base: "body",
2740
+ color: disabled ? 'black-light' : 'black',
2741
+ children: children
2742
+ })]
2224
2743
  });
2225
2744
  }
2226
2745
 
2227
- var AnimatedIconButtonBackground = /*#__PURE__*/styled(Animated$1.View).withConfig({
2228
- displayName: "PressableAnimatedContainer__AnimatedIconButtonBackground"
2229
- })(["background-color:", ";border-radius:", "px;width:", "px;height:", "px;position:absolute;bottom:0;left:0;"], function (_ref) {
2230
- var theme = _ref.theme,
2231
- color = _ref.color,
2232
- disabled = _ref.disabled;
2233
- var iconButton = theme.kitt.iconButton;
2234
- if (disabled) return iconButton.disabled.backgroundColor;
2235
- if (color === 'white') return iconButton.white.pressedBackgroundColor;
2236
- return iconButton["default"].pressedBackgroundColor;
2746
+ function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2747
+
2748
+ function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2749
+ function TextArea(_ref) {
2750
+ var props = _extends({}, _ref);
2751
+
2752
+ var theme = /*#__PURE__*/useTheme();
2753
+ return /*#__PURE__*/jsx(InputText, _objectSpread$7({
2754
+ multiline: true,
2755
+ textAlignVertical: "top",
2756
+ minHeight: theme.kitt.forms.textArea.minHeight
2757
+ }, props));
2758
+ }
2759
+
2760
+ var Body = /*#__PURE__*/styled.View.withConfig({
2761
+ displayName: "Body"
2762
+ })(["", " background-color:", ";flex:1;"], function (_ref) {
2763
+ var theme = _ref.theme;
2764
+ return theme.responsive.ifWindowSizeMatches({
2765
+ minWidth: KittBreakpoints.MEDIUM
2766
+ }, "padding-right: ".concat(theme.kitt.spacing * 12, "px;\n padding-left: ").concat(theme.kitt.spacing * 12, "px;"), "padding-right: ".concat(theme.kitt.spacing * 6, "px;\n padding-left: ").concat(theme.kitt.spacing * 6, "px;"));
2237
2767
  }, function (_ref2) {
2238
2768
  var theme = _ref2.theme;
2239
- return theme.kitt.iconButton.borderRadius;
2240
- }, function (_ref3) {
2241
- var theme = _ref3.theme;
2242
- return theme.kitt.iconButton.width;
2243
- }, function (_ref4) {
2244
- var theme = _ref4.theme;
2245
- return theme.kitt.iconButton.height;
2769
+ return theme.kitt.colors.uiBackgroundLight;
2246
2770
  });
2247
- var AnimatedViewContainer = /*#__PURE__*/styled(Animated$1.View).withConfig({
2248
- displayName: "PressableAnimatedContainer__AnimatedViewContainer"
2249
- })(["position:relative;align-items:center;justify-content:center;width:100%;height:100%;"]);
2250
- function PressableAnimatedContainer(_ref5) {
2251
- var disabled = _ref5.disabled,
2252
- _ref5$color = _ref5.color,
2253
- color = _ref5$color === void 0 ? 'black' : _ref5$color,
2254
- testID = _ref5.testID,
2255
- _ref5$accessibilityRo = _ref5.accessibilityRole,
2256
- accessibilityRole = _ref5$accessibilityRo === void 0 ? 'button' : _ref5$accessibilityRo,
2257
- accessibilityLabel = _ref5.accessibilityLabel,
2258
- children = _ref5.children,
2259
- onPress = _ref5.onPress;
2260
- var theme = /*#__PURE__*/useTheme();
2261
- var pressed = useSharedValue(false);
2262
- var opacityStyles = useAnimatedStyle(function () {
2263
- var _f = function () {
2264
- return {
2265
- opacity: withSpring(pressed.value ? 1 : 0)
2266
- };
2267
- };
2268
-
2269
- _f._closure = {
2270
- withSpring: withSpring,
2271
- pressed: pressed
2272
- };
2273
- _f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
2274
- _f.__workletHash = 10645190329247;
2275
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (60:41)";
2276
- _f.__optimalization = 2;
2277
-
2278
- global.__reanimatedWorkletInit(_f);
2771
+ function FullScreenModalBody(_ref3) {
2772
+ var children = _ref3.children;
2773
+ return /*#__PURE__*/jsx(Body, {
2774
+ children: children
2775
+ });
2776
+ }
2279
2777
 
2280
- return _f;
2281
- }());
2282
- var scaleStyles = useAnimatedStyle(function () {
2283
- var _f = function () {
2284
- return {
2285
- transform: [{
2286
- scale: withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base["default"])
2287
- }]
2288
- };
2289
- };
2778
+ var SideContainer = /*#__PURE__*/styled.View.withConfig({
2779
+ displayName: "Header__SideContainer"
2780
+ })(["", ""], function (_ref) {
2781
+ var theme = _ref.theme,
2782
+ _ref$side = _ref.side,
2783
+ side = _ref$side === void 0 ? 'left' : _ref$side;
2784
+ var padding = theme.kitt.spacing * 2;
2290
2785
 
2291
- _f._closure = {
2292
- withSpring: withSpring,
2293
- pressed: pressed,
2294
- theme: {
2295
- kitt: {
2296
- iconButton: {
2297
- scale: {
2298
- base: {
2299
- active: theme.kitt.iconButton.scale.base.active,
2300
- "default": theme.kitt.iconButton.scale.base["default"]
2301
- }
2302
- }
2303
- }
2304
- }
2305
- }
2306
- };
2307
- _f.asString = "function _f(){const{withSpring,pressed,theme}=jsThis._closure;{return{transform:[{scale:withSpring(pressed.value?theme.kitt.iconButton.scale.base.active:theme.kitt.iconButton.scale.base.default)}]};}}";
2308
- _f.__workletHash = 13861998831411;
2309
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/PressableAnimatedContainer.tsx (66:39)";
2310
- _f.__optimalization = 2;
2786
+ if (side === 'left') {
2787
+ return "padding-right: ".concat(padding, "px;");
2788
+ }
2311
2789
 
2312
- global.__reanimatedWorkletInit(_f);
2790
+ return "padding-left: ".concat(padding, "px;");
2791
+ });
2313
2792
 
2314
- return _f;
2315
- }());
2316
- return /*#__PURE__*/jsx(PressableIconButton, {
2317
- accessibilityRole: accessibilityRole,
2318
- disabled: disabled,
2319
- color: color,
2320
- testID: testID,
2321
- accessibilityLabel: accessibilityLabel,
2322
- onPress: onPress,
2323
- onPressIn: function onPressIn() {
2324
- pressed.value = true;
2325
- },
2326
- onPressOut: function onPressOut() {
2327
- pressed.value = false;
2328
- },
2329
- children: /*#__PURE__*/jsxs(AnimatedViewContainer, {
2330
- style: disabled ? [{
2331
- transform: [{
2332
- scale: 1
2333
- }]
2334
- }] : [scaleStyles],
2335
- children: [/*#__PURE__*/jsx(AnimatedIconButtonBackground, {
2336
- disabled: disabled,
2337
- color: color,
2338
- style: disabled ? [{
2339
- opacity: 1
2340
- }] : [opacityStyles]
2341
- }), children]
2342
- })
2343
- });
2793
+ function getHeaderHorizontalMediumPadding(spacing) {
2794
+ return spacing * 6;
2344
2795
  }
2345
2796
 
2346
- var IconButtonContentBorder = /*#__PURE__*/styled.View.withConfig({
2347
- displayName: "IconButton__IconButtonContentBorder"
2348
- })(["border:", ";border-color:", ";width:", "px;height:", "px;align-items:center;justify-content:center;border-radius:", "px;"], function (_ref) {
2349
- var theme = _ref.theme;
2350
- return "".concat(theme.kitt.iconButton.borderWidth, "px solid");
2351
- }, function (_ref2) {
2797
+ var Header = /*#__PURE__*/styled.View.withConfig({
2798
+ displayName: "Header"
2799
+ })(["", ";border-bottom-color:", ";border-bottom-width:1px;flex-direction:row;align-items:center;"], function (_ref2) {
2352
2800
  var theme = _ref2.theme,
2353
- disabled = _ref2.disabled;
2354
- return disabled ? theme.kitt.iconButton.disabled.borderColor : theme.kitt.iconButton.borderColor;
2801
+ _ref2$insetTop = _ref2.insetTop,
2802
+ insetTop = _ref2$insetTop === void 0 ? 0 : _ref2$insetTop;
2803
+ var paddingTop = insetTop + theme.kitt.fullScreenModal.header.paddingVertical;
2804
+ var _theme$kitt$fullScree = theme.kitt.fullScreenModal.header,
2805
+ paddingVertical = _theme$kitt$fullScree.paddingVertical,
2806
+ paddingHorizontal = _theme$kitt$fullScree.paddingHorizontal;
2807
+ return theme.responsive.ifWindowSizeMatches({
2808
+ minWidth: KittBreakpoints.MEDIUM
2809
+ }, "padding: ".concat(paddingTop, "px ").concat(getHeaderHorizontalMediumPadding(theme.kitt.spacing), "px ").concat(paddingVertical, "px;"), "padding: ".concat(paddingTop, "px ").concat(paddingHorizontal, "px ").concat(paddingVertical, "px;"));
2355
2810
  }, function (_ref3) {
2356
2811
  var theme = _ref3.theme;
2357
- return theme.kitt.iconButton.width - theme.kitt.iconButton.borderWidth;
2358
- }, function (_ref4) {
2359
- var theme = _ref4.theme;
2360
- return theme.kitt.iconButton.height - theme.kitt.iconButton.borderWidth;
2812
+ return theme.kitt.fullScreenModal.header.borderColor;
2813
+ });
2814
+ var HeaderContent = /*#__PURE__*/styled.View.withConfig({
2815
+ displayName: "Header__HeaderContent"
2816
+ })(["", ";", ";justify-content:center;align-items:center;"], function (_ref4) {
2817
+ var theme = _ref4.theme,
2818
+ leftWidth = _ref4.leftWidth,
2819
+ rightWidth = _ref4.rightWidth,
2820
+ windowWidth = _ref4.windowWidth;
2821
+
2822
+ /*
2823
+ * Since we don't have controll over the rendered left and right elements,
2824
+ * we must apply some logic to give the title all the available space
2825
+ */
2826
+ var sideElementMaxWidth = Math.max(leftWidth, rightWidth);
2827
+ var parentHorizontalPadding = theme.kitt.fullScreenModal.header.paddingHorizontal * 2;
2828
+ var parentHorizontalPaddingMedium = getHeaderHorizontalMediumPadding(theme.kitt.spacing) * 2;
2829
+
2830
+ var computeWidth = function (breakpointPadding) {
2831
+ return windowWidth - breakpointPadding - sideElementMaxWidth * 2;
2832
+ };
2833
+
2834
+ return theme.responsive.ifWindowSizeMatches({
2835
+ minWidth: KittBreakpoints.MEDIUM
2836
+ }, "width: ".concat(computeWidth(parentHorizontalPaddingMedium), "px;"), "width: ".concat(computeWidth(parentHorizontalPadding), "px;"));
2361
2837
  }, function (_ref5) {
2362
- var theme = _ref5.theme;
2363
- return theme.kitt.iconButton.borderRadius;
2838
+ var leftWidth = _ref5.leftWidth,
2839
+ rightWidth = _ref5.rightWidth;
2840
+ // Depending of the wider element, we must add a margin to fill the diff in space between elements
2841
+ var deltaMargin = Math.abs(leftWidth - rightWidth);
2842
+
2843
+ if (leftWidth > rightWidth) {
2844
+ return "margin-right: ".concat(deltaMargin, "px;");
2845
+ }
2846
+
2847
+ return "margin-left: ".concat(deltaMargin, "px;");
2364
2848
  });
2849
+ function FullScreenModalHeader(_ref6) {
2850
+ var children = _ref6.children,
2851
+ right = _ref6.right,
2852
+ left = _ref6.left;
2365
2853
 
2366
- function IconButtonContent(_ref6) {
2367
- var disabled = _ref6.disabled,
2368
- color = _ref6.color,
2369
- icon = _ref6.icon;
2370
- return /*#__PURE__*/jsx(IconButtonContentBorder, {
2371
- disabled: disabled,
2372
- children: /*#__PURE__*/jsx(TypographyIcon, {
2373
- color: disabled ? 'black-light' : color,
2374
- icon: icon
2375
- })
2854
+ var _useSafeAreaInsets = useSafeAreaInsets(),
2855
+ top = _useSafeAreaInsets.top;
2856
+
2857
+ var dimensions = useWindowDimensions();
2858
+
2859
+ var _useState = useState(0),
2860
+ _useState2 = _slicedToArray(_useState, 2),
2861
+ leftWidth = _useState2[0],
2862
+ setLeftWidth = _useState2[1];
2863
+
2864
+ var _useState3 = useState(0),
2865
+ _useState4 = _slicedToArray(_useState3, 2),
2866
+ rightWidth = _useState4[0],
2867
+ setRightWidth = _useState4[1];
2868
+
2869
+ var handleLayoutChange = function (event, side) {
2870
+ // Prevents react to nullify event on rerenders
2871
+ event.persist();
2872
+
2873
+ if (side === 'left') {
2874
+ setLeftWidth(event.nativeEvent.layout.width);
2875
+ return;
2876
+ }
2877
+
2878
+ setRightWidth(event.nativeEvent.layout.width);
2879
+ };
2880
+
2881
+ return /*#__PURE__*/jsxs(Header, {
2882
+ insetTop: Platform.OS === 'ios' ? undefined : top,
2883
+ children: [left ? /*#__PURE__*/jsx(SideContainer, {
2884
+ onLayout: function onLayout(e) {
2885
+ return handleLayoutChange(e, 'left');
2886
+ },
2887
+ children: left
2888
+ }) : null, /*#__PURE__*/jsx(HeaderContent, {
2889
+ windowWidth: dimensions.width,
2890
+ leftWidth: leftWidth,
2891
+ rightWidth: rightWidth,
2892
+ children: children
2893
+ }), right ? /*#__PURE__*/jsx(SideContainer, {
2894
+ side: "right",
2895
+ onLayout: function onLayout(e) {
2896
+ return handleLayoutChange(e, 'right');
2897
+ },
2898
+ children: right
2899
+ }) : null]
2376
2900
  });
2377
2901
  }
2378
2902
 
2379
- function IconButton(_ref7) {
2380
- var icon = _ref7.icon,
2381
- color = _ref7.color,
2382
- disabled = _ref7.disabled,
2383
- testID = _ref7.testID,
2384
- accessibilityLabel = _ref7.accessibilityLabel,
2385
- accessibilityRole = _ref7.accessibilityRole,
2386
- onPress = _ref7.onPress;
2387
- return /*#__PURE__*/jsx(PressableAnimatedContainer, {
2388
- color: color,
2389
- disabled: disabled,
2390
- testID: testID,
2391
- accessibilityLabel: accessibilityLabel,
2392
- accessibilityRole: accessibilityRole,
2393
- onPress: onPress,
2394
- children: /*#__PURE__*/jsx(IconButtonContent, {
2395
- disabled: disabled,
2396
- color: color,
2397
- icon: icon
2398
- })
2903
+ var Container$3 = /*#__PURE__*/styled.View.withConfig({
2904
+ displayName: "FullScreenModal__Container"
2905
+ })(["flex:1;background-color:", ";"], function (_ref) {
2906
+ var theme = _ref.theme;
2907
+ return theme.kitt.colors.uiBackground;
2908
+ });
2909
+ function FullScreenModal(_ref2) {
2910
+ var children = _ref2.children;
2911
+ return /*#__PURE__*/jsx(Container$3, {
2912
+ children: children
2399
2913
  });
2400
2914
  }
2915
+ FullScreenModal.Header = FullScreenModalHeader;
2916
+ FullScreenModal.Body = FullScreenModalBody;
2401
2917
 
2402
2918
  var _excluded$5 = ["children"];
2403
2919
 
2404
- function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2920
+ function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2405
2921
 
2406
- function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2407
- var ContentView$1 = /*#__PURE__*/styled.View.withConfig({
2922
+ function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2923
+ var ContentView = /*#__PURE__*/styled.View.withConfig({
2408
2924
  displayName: "ListItemContent__ContentView"
2409
2925
  })(["flex:1 0 0%;align-self:center;"]);
2410
2926
  function ListItemContent(_ref) {
2411
2927
  var children = _ref.children,
2412
2928
  rest = _objectWithoutProperties(_ref, _excluded$5);
2413
2929
 
2414
- return /*#__PURE__*/jsx(ContentView$1, _objectSpread$7(_objectSpread$7({}, rest), {}, {
2930
+ return /*#__PURE__*/jsx(ContentView, _objectSpread$6(_objectSpread$6({}, rest), {}, {
2415
2931
  children: children
2416
2932
  }));
2417
2933
  }
@@ -2419,9 +2935,9 @@ function ListItemContent(_ref) {
2419
2935
  var _excluded$4 = ["children", "side"],
2420
2936
  _excluded2$1 = ["children", "align"];
2421
2937
 
2422
- function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2938
+ function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2423
2939
 
2424
- function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2940
+ function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2425
2941
  var SideContainerView = /*#__PURE__*/styled.View.withConfig({
2426
2942
  displayName: "ListItemSideContent__SideContainerView"
2427
2943
  })(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
@@ -2440,7 +2956,7 @@ function ListItemSideContainer(_ref3) {
2440
2956
  side = _ref3$side === void 0 ? 'left' : _ref3$side,
2441
2957
  rest = _objectWithoutProperties(_ref3, _excluded$4);
2442
2958
 
2443
- return /*#__PURE__*/jsx(SideContainerView, _objectSpread$6(_objectSpread$6({
2959
+ return /*#__PURE__*/jsx(SideContainerView, _objectSpread$5(_objectSpread$5({
2444
2960
  side: side
2445
2961
  }, rest), {}, {
2446
2962
  children: children
@@ -2458,7 +2974,7 @@ function ListItemSideContent(_ref5) {
2458
2974
  align = _ref5$align === void 0 ? 'auto' : _ref5$align,
2459
2975
  rest = _objectWithoutProperties(_ref5, _excluded2$1);
2460
2976
 
2461
- return /*#__PURE__*/jsx(SideContentView, _objectSpread$6(_objectSpread$6({
2977
+ return /*#__PURE__*/jsx(SideContentView, _objectSpread$5(_objectSpread$5({
2462
2978
  align: align
2463
2979
  }, rest), {}, {
2464
2980
  children: children
@@ -2467,9 +2983,9 @@ function ListItemSideContent(_ref5) {
2467
2983
 
2468
2984
  var _excluded$3 = ["children", "withPadding", "borders", "left", "right", "onPress"];
2469
2985
 
2470
- function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2986
+ function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2471
2987
 
2472
- function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2988
+ function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2473
2989
  var ContainerView = /*#__PURE__*/styled.View.withConfig({
2474
2990
  displayName: "ListItem__ContainerView"
2475
2991
  })(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
@@ -2510,14 +3026,14 @@ function ListItem(_ref5) {
2510
3026
  onPress = _ref5.onPress,
2511
3027
  rest = _objectWithoutProperties(_ref5, _excluded$3);
2512
3028
 
2513
- var Wrapper = onPress ? Pressable : Fragment;
2514
- var wrapperProps = onPress ? _objectSpread$5({
3029
+ var Wrapper = onPress ? Pressable : Fragment$1;
3030
+ var wrapperProps = onPress ? _objectSpread$4({
2515
3031
  accessibilityRole: 'button',
2516
3032
  onPress: onPress
2517
3033
  }, rest) : undefined;
2518
3034
  var containerProps = onPress ? undefined : rest;
2519
- return /*#__PURE__*/jsx(Wrapper, _objectSpread$5(_objectSpread$5({}, wrapperProps), {}, {
2520
- children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$5(_objectSpread$5({
3035
+ return /*#__PURE__*/jsx(Wrapper, _objectSpread$4(_objectSpread$4({}, wrapperProps), {}, {
3036
+ children: /*#__PURE__*/jsxs(ContainerView, _objectSpread$4(_objectSpread$4({
2521
3037
  withPadding: withPadding,
2522
3038
  borders: borders
2523
3039
  }, containerProps), {}, {
@@ -2716,160 +3232,6 @@ function Message(_ref) {
2716
3232
  });
2717
3233
  }
2718
3234
 
2719
- function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2720
-
2721
- function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2722
- // Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
2723
- var OverlayPressable = /*#__PURE__*/styled(Pressable).withConfig({
2724
- displayName: "Overlay__OverlayPressable"
2725
- })(function (_ref) {
2726
- var theme = _ref.theme;
2727
- return _objectSpread$4(_objectSpread$4({}, StyleSheet.absoluteFillObject), {}, {
2728
- backgroundColor: theme.kitt.colors.overlay.dark
2729
- });
2730
- });
2731
- function Overlay(_ref2) {
2732
- var onPress = _ref2.onPress;
2733
- return /*#__PURE__*/jsx(OverlayPressable, {
2734
- accessibilityRole: "none",
2735
- onPress: onPress,
2736
- children: /*#__PURE__*/jsx(View, {})
2737
- });
2738
- }
2739
-
2740
- var BodyView = /*#__PURE__*/styled.View.withConfig({
2741
- displayName: "Body__BodyView"
2742
- })(["padding:", "px ", "px;"], function (_ref) {
2743
- var theme = _ref.theme;
2744
- return theme.kitt.spacing * 6;
2745
- }, function (_ref2) {
2746
- var theme = _ref2.theme;
2747
- return theme.kitt.spacing * 4;
2748
- });
2749
- function ModalBody(_ref3) {
2750
- var children = _ref3.children;
2751
- return /*#__PURE__*/jsx(ScrollView, {
2752
- children: /*#__PURE__*/jsx(BodyView, {
2753
- children: children
2754
- })
2755
- });
2756
- }
2757
-
2758
- var FooterView = /*#__PURE__*/styled.View.withConfig({
2759
- displayName: "Footer__FooterView"
2760
- })(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
2761
- var theme = _ref.theme;
2762
- return theme.kitt.spacing * 4;
2763
- }, function (_ref2) {
2764
- var theme = _ref2.theme;
2765
- return theme.kitt.colors.separator;
2766
- });
2767
- function ModalFooter(_ref3) {
2768
- var children = _ref3.children;
2769
- return /*#__PURE__*/jsx(FooterView, {
2770
- children: children
2771
- });
2772
- }
2773
-
2774
- var OnCloseContext = /*#__PURE__*/createContext(function () {});
2775
-
2776
- var HeaderView = /*#__PURE__*/styled.View.withConfig({
2777
- displayName: "Header__HeaderView"
2778
- })(["position:relative;padding:", "px;display:flex;flex:0 0 auto;flex-direction:row;justify-content:space-between;align-items:center;border-bottom-width:1px;border-bottom-color:", ";min-height:57px;"], function (_ref) {
2779
- var theme = _ref.theme;
2780
- return theme.kitt.spacing * 2;
2781
- }, function (_ref2) {
2782
- var theme = _ref2.theme;
2783
- return theme.kitt.colors.separator;
2784
- });
2785
- var LeftIconView = /*#__PURE__*/styled.View.withConfig({
2786
- displayName: "Header__LeftIconView"
2787
- })(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
2788
- var theme = _ref3.theme;
2789
- return theme.kitt.spacing * 2;
2790
- });
2791
- var RightIconView = /*#__PURE__*/styled.View.withConfig({
2792
- displayName: "Header__RightIconView"
2793
- })(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
2794
- var theme = _ref4.theme;
2795
- return theme.kitt.spacing * 2;
2796
- });
2797
- var TitleView = /*#__PURE__*/styled.View.withConfig({
2798
- displayName: "Header__TitleView"
2799
- })(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
2800
- var theme = _ref5.theme,
2801
- isIconLeft = _ref5.isIconLeft;
2802
- return isIconLeft ? 0 : theme.kitt.spacing * 2;
2803
- });
2804
- function ModalHeader(_ref6) {
2805
- var left = _ref6.left,
2806
- right = _ref6.right,
2807
- children = _ref6.children;
2808
- var onClose = useContext(OnCloseContext);
2809
- var isIconLeft = !!left;
2810
- return /*#__PURE__*/jsxs(HeaderView, {
2811
- children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
2812
- children: left
2813
- }), /*#__PURE__*/jsx(TitleView, {
2814
- isIconLeft: isIconLeft,
2815
- children: children
2816
- }), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
2817
- children: /*#__PURE__*/jsx(Button, {
2818
- type: "subtle-dark",
2819
- icon: /*#__PURE__*/jsx(XIcon, {}),
2820
- onPress: onClose
2821
- })
2822
- })]
2823
- });
2824
- }
2825
-
2826
- var ModalView = /*#__PURE__*/styled.View.withConfig({
2827
- displayName: "Modal__ModalView"
2828
- })(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
2829
- var theme = _ref.theme;
2830
- return theme.kitt.spacing * 20;
2831
- }, function (_ref2) {
2832
- var theme = _ref2.theme;
2833
- return theme.kitt.spacing * 4;
2834
- });
2835
- var ContentView = /*#__PURE__*/styled.View.withConfig({
2836
- displayName: "Modal__ContentView"
2837
- })(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
2838
- var theme = _ref3.theme;
2839
- return theme.kitt.card.borderRadius;
2840
- }, function (_ref4) {
2841
- var theme = _ref4.theme;
2842
- return theme.kitt.colors.uiBackgroundLight;
2843
- });
2844
- function Modal(_ref5) {
2845
- var visible = _ref5.visible,
2846
- children = _ref5.children,
2847
- onClose = _ref5.onClose,
2848
- onEntered = _ref5.onEntered,
2849
- onExited = _ref5.onExited;
2850
- return /*#__PURE__*/jsx(OnCloseContext.Provider, {
2851
- value: onClose,
2852
- children: /*#__PURE__*/jsx(Modal$1, {
2853
- transparent: true,
2854
- animationType: "fade",
2855
- visible: visible,
2856
- onShow: onEntered,
2857
- onDismiss: onExited,
2858
- onRequestClose: onClose,
2859
- children: /*#__PURE__*/jsxs(ModalView, {
2860
- children: [/*#__PURE__*/jsx(Overlay, {
2861
- onPress: onClose
2862
- }), /*#__PURE__*/jsx(ContentView, {
2863
- children: children
2864
- })]
2865
- })
2866
- })
2867
- });
2868
- }
2869
- Modal.Header = ModalHeader;
2870
- Modal.Body = ModalBody;
2871
- Modal.Footer = ModalFooter;
2872
-
2873
3235
  function Notification(_ref) {
2874
3236
  var type = _ref.type,
2875
3237
  children = _ref.children,
@@ -3350,7 +3712,7 @@ function StoryGridCol(_ref2) {
3350
3712
  return null;
3351
3713
  }
3352
3714
 
3353
- return /*#__PURE__*/jsxs(Fragment$1, {
3715
+ return /*#__PURE__*/jsxs(Fragment, {
3354
3716
  children: [title ? /*#__PURE__*/jsx(StoryTitle.Level4, {
3355
3717
  numberOfLines: 1,
3356
3718
  color: titleColor,
@@ -3459,7 +3821,7 @@ function ModalDateTimePicker(_ref2) {
3459
3821
  setCurrentValue(value);
3460
3822
  onClose();
3461
3823
  },
3462
- children: visible ? /*#__PURE__*/jsxs(Fragment$1, {
3824
+ children: visible ? /*#__PURE__*/jsxs(Fragment, {
3463
3825
  children: [title ? /*#__PURE__*/jsx(Title, {
3464
3826
  children: title
3465
3827
  }) : null, /*#__PURE__*/jsx(Modal.Body, {
@@ -3877,5 +4239,5 @@ function MatchWindowSize(_ref) {
3877
4239
  return children;
3878
4240
  }
3879
4241
 
3880
- export { Avatar, Button, Card, Checkbox, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
4242
+ export { Avatar, Button, Card, Checkbox, DatePicker, Emoji, ExternalLink, Flex, FullScreenModal, Icon, IconButton, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpoints, KittBreakpointsMax, KittThemeDecorator, KittThemeProvider, Label, LargeLoader, ListItem, Loader, MatchWindowSize, Message, Modal, Notification, Radio, DeprecatedSection as Section, Skeleton, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, createWindowSizeHelper, hex2rgba, matchWindowSize, styledTextInputMixin, theme, useKittTheme, useMatchWindowSize, useStoryBlockColor, withTheme };
3881
4243
  //# sourceMappingURL=index-browser-all.es.js.map