@ornikar/kitt-universal 11.2.0 → 13.0.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 (150) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/babel-plugin-csf-to-jest.js +15 -1
  3. package/dist/definitions/BottomSheet/BottomSheet.d.ts +1 -1
  4. package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts +15 -0
  5. package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts.map +1 -0
  6. package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts +4 -0
  7. package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts.map +1 -0
  8. package/dist/definitions/Choices/ChoiceItem.d.ts +2 -3
  9. package/dist/definitions/Choices/ChoiceItem.d.ts.map +1 -1
  10. package/dist/definitions/Choices/ChoiceItemContainer.d.ts +5 -5
  11. package/dist/definitions/Choices/ChoiceItemContainer.d.ts.map +1 -1
  12. package/dist/definitions/Choices/utils/getBackgroundColor.d.ts +9 -0
  13. package/dist/definitions/Choices/utils/getBackgroundColor.d.ts.map +1 -0
  14. package/dist/definitions/Choices/utils/getBorderRadius.d.ts +3 -0
  15. package/dist/definitions/Choices/utils/getBorderRadius.d.ts.map +1 -0
  16. package/dist/definitions/Choices/utils/getCurrentTextColor.d.ts +10 -0
  17. package/dist/definitions/Choices/utils/getCurrentTextColor.d.ts.map +1 -0
  18. package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +1 -1
  19. package/dist/definitions/ListItem/ListItem.d.ts.map +1 -1
  20. package/dist/definitions/ListItem/ListItemContent.d.ts.map +1 -1
  21. package/dist/definitions/ListItem/ListItemSideContent.d.ts.map +1 -1
  22. package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
  23. package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -1
  24. package/dist/definitions/PageLoader/PageLoader.web.d.ts.map +1 -1
  25. package/dist/definitions/Picker/Picker.d.ts.map +1 -1
  26. package/dist/definitions/Picker/PickerItem.d.ts.map +1 -1
  27. package/dist/definitions/Skeleton/SkeletonContent.d.ts.map +1 -1
  28. package/dist/definitions/Skeleton/SkeletonContent.web.d.ts.map +1 -1
  29. package/dist/definitions/Tag/Tag.d.ts.map +1 -1
  30. package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts +7 -3
  31. package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts.map +1 -1
  32. package/dist/definitions/TimePicker/TimePicker.d.ts +19 -8
  33. package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -1
  34. package/dist/definitions/TimePicker/TimePicker.web.d.ts +2 -1
  35. package/dist/definitions/TimePicker/TimePicker.web.d.ts.map +1 -1
  36. package/dist/definitions/TimePicker/TimePickerPressable.d.ts +20 -0
  37. package/dist/definitions/TimePicker/TimePickerPressable.d.ts.map +1 -0
  38. package/dist/definitions/TimePicker/utils/formatDateToTimeString.d.ts +2 -0
  39. package/dist/definitions/TimePicker/utils/formatDateToTimeString.d.ts.map +1 -0
  40. package/dist/definitions/TimePicker/utils/getCurrentInternalForcedState.d.ts +10 -0
  41. package/dist/definitions/TimePicker/utils/getCurrentInternalForcedState.d.ts.map +1 -0
  42. package/dist/definitions/VerticalSteps/Step.d.ts +16 -0
  43. package/dist/definitions/VerticalSteps/Step.d.ts.map +1 -0
  44. package/dist/definitions/VerticalSteps/StepIcon.d.ts +13 -0
  45. package/dist/definitions/VerticalSteps/StepIcon.d.ts.map +1 -0
  46. package/dist/definitions/VerticalSteps/VerticalSteps.d.ts +12 -0
  47. package/dist/definitions/VerticalSteps/VerticalSteps.d.ts.map +1 -0
  48. package/dist/definitions/VerticalSteps/utils/getStepState.d.ts +3 -0
  49. package/dist/definitions/VerticalSteps/utils/getStepState.d.ts.map +1 -0
  50. package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -1
  51. package/dist/definitions/forms/InputTag/InputTag.d.ts.map +1 -1
  52. package/dist/definitions/forms/InputText/InputTextContainer.d.ts +2 -4
  53. package/dist/definitions/forms/InputText/InputTextContainer.d.ts.map +1 -1
  54. package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +2 -9
  55. package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts.map +1 -1
  56. package/dist/definitions/forms/RadioButtonGroup/AnimatedContainer/AnimatedContainer.d.ts +1 -1
  57. package/dist/definitions/forms/RadioButtonGroup/AnimatedContainer/AnimatedContainer.d.ts.map +1 -1
  58. package/dist/definitions/index.d.ts +1 -6
  59. package/dist/definitions/index.d.ts.map +1 -1
  60. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +190 -0
  61. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  62. package/dist/definitions/story-components/Flex.d.ts +6 -4
  63. package/dist/definitions/story-components/Flex.d.ts.map +1 -1
  64. package/dist/definitions/themes/default.d.ts +2 -0
  65. package/dist/definitions/themes/default.d.ts.map +1 -1
  66. package/dist/definitions/themes/late-ocean/choices.d.ts +2 -0
  67. package/dist/definitions/themes/late-ocean/choices.d.ts.map +1 -1
  68. package/dist/definitions/themes/late-ocean/forms.d.ts +1 -0
  69. package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
  70. package/dist/definitions/themes/late-ocean/input.d.ts +3 -0
  71. package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
  72. package/dist/definitions/themes/late-ocean/listItem.d.ts +3 -0
  73. package/dist/definitions/themes/late-ocean/listItem.d.ts.map +1 -1
  74. package/dist/definitions/themes/late-ocean/pageLoader.d.ts +7 -0
  75. package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -1
  76. package/dist/definitions/themes/late-ocean/picker.d.ts +3 -0
  77. package/dist/definitions/themes/late-ocean/picker.d.ts.map +1 -1
  78. package/dist/definitions/themes/late-ocean/skeleton.d.ts +2 -0
  79. package/dist/definitions/themes/late-ocean/skeleton.d.ts.map +1 -1
  80. package/dist/definitions/themes/late-ocean/tag.d.ts +3 -0
  81. package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -1
  82. package/dist/definitions/themes/late-ocean/timePicker.d.ts +5 -0
  83. package/dist/definitions/themes/late-ocean/timePicker.d.ts.map +1 -0
  84. package/dist/definitions/themes/late-ocean/verticalSteps.d.ts +14 -0
  85. package/dist/definitions/themes/late-ocean/verticalSteps.d.ts.map +1 -0
  86. package/dist/definitions/typography/TypographyLink.d.ts.map +1 -1
  87. package/dist/definitions/typography/TypographyLinkWebWrapper.d.ts +7 -0
  88. package/dist/definitions/typography/TypographyLinkWebWrapper.d.ts.map +1 -0
  89. package/dist/definitions/typography/TypographyLinkWebWrapper.web.d.ts +4 -0
  90. package/dist/definitions/typography/TypographyLinkWebWrapper.web.d.ts.map +1 -0
  91. package/dist/definitions/useKittTheme.d.ts +0 -3
  92. package/dist/definitions/useKittTheme.d.ts.map +1 -1
  93. package/dist/definitions/utils/StyleWebWrapper.d.ts +3 -0
  94. package/dist/definitions/utils/StyleWebWrapper.d.ts.map +1 -1
  95. package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts +0 -5
  96. package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -1
  97. package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts +4 -1
  98. package/dist/definitions/utils/windowSize/useMatchWindowSize.d.ts.map +1 -1
  99. package/dist/index-browser-all.es.android.js +1278 -1181
  100. package/dist/index-browser-all.es.android.js.map +1 -1
  101. package/dist/index-browser-all.es.ios.js +1278 -1181
  102. package/dist/index-browser-all.es.ios.js.map +1 -1
  103. package/dist/index-browser-all.es.js +1285 -1209
  104. package/dist/index-browser-all.es.js.map +1 -1
  105. package/dist/index-browser-all.es.web.js +819 -791
  106. package/dist/index-browser-all.es.web.js.map +1 -1
  107. package/dist/index-node-14.17.cjs.js +1143 -1041
  108. package/dist/index-node-14.17.cjs.js.map +1 -1
  109. package/dist/index-node-14.17.cjs.web.css +7 -5
  110. package/dist/index-node-14.17.cjs.web.js +693 -619
  111. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  112. package/dist/linaria-themes-browser-all.es.android.js +59 -14
  113. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  114. package/dist/linaria-themes-browser-all.es.ios.js +59 -14
  115. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  116. package/dist/linaria-themes-browser-all.es.js +59 -14
  117. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  118. package/dist/linaria-themes-browser-all.es.web.js +59 -14
  119. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  120. package/dist/linaria-themes-node-14.17.cjs.js +59 -14
  121. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  122. package/dist/linaria-themes-node-14.17.cjs.web.js +59 -14
  123. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  124. package/dist/styles.css +7 -5
  125. package/dist/tsbuildinfo +1 -1
  126. package/package.json +7 -11
  127. package/typings/react-native-web.d.ts +2 -0
  128. package/.stylelintrc +0 -3
  129. package/dist/definitions/Modal/Body.d.ts +0 -6
  130. package/dist/definitions/Modal/Body.d.ts.map +0 -1
  131. package/dist/definitions/Modal/Footer.d.ts +0 -6
  132. package/dist/definitions/Modal/Footer.d.ts.map +0 -1
  133. package/dist/definitions/Modal/Header.d.ts +0 -8
  134. package/dist/definitions/Modal/Header.d.ts.map +0 -1
  135. package/dist/definitions/Modal/Modal.d.ts +0 -21
  136. package/dist/definitions/Modal/Modal.d.ts.map +0 -1
  137. package/dist/definitions/Modal/OnCloseContext.d.ts +0 -3
  138. package/dist/definitions/Modal/OnCloseContext.d.ts.map +0 -1
  139. package/dist/definitions/TimePicker/useTimePicker.d.ts +0 -14
  140. package/dist/definitions/TimePicker/useTimePicker.d.ts.map +0 -1
  141. package/dist/definitions/forms/styledTextInputMixin.d.ts +0 -8
  142. package/dist/definitions/forms/styledTextInputMixin.d.ts.map +0 -1
  143. package/dist/definitions/utils/tests/styled-component-typing-test.d.ts +0 -19
  144. package/dist/definitions/utils/tests/styled-component-typing-test.d.ts.map +0 -1
  145. package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts +0 -50
  146. package/dist/definitions/utils/windowSize/createWindowSizeHelper.d.ts.map +0 -1
  147. package/dist/definitions/utils/withTheme.d.ts +0 -7
  148. package/dist/definitions/utils/withTheme.d.ts.map +0 -1
  149. package/dist/index-browser-all.es.css +0 -1
  150. package/dist/index-node-14.17.cjs.css +0 -1
@@ -1,4 +1,4 @@
1
- import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState, useMemo, Children, useReducer, Fragment as Fragment$1, useCallback } from 'react';
1
+ import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState, useMemo, Children, useReducer, Fragment as Fragment$1, useCallback, createElement } from 'react';
2
2
  import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useSx, Text, Input, NativeBaseProvider, extendTheme, useBreakpointValue, useMediaQuery } from 'native-base';
3
3
  export { useBreakpointValue, useClipboard, useMediaQuery, useSx, useToken } from 'native-base';
4
4
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
@@ -8,15 +8,14 @@ import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructurin
8
8
  import _extends from '@babel/runtime/helpers/extends';
9
9
  import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
10
10
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
11
- import { Platform, Animated as Animated$1, Easing, useWindowDimensions, Pressable as Pressable$2, StyleSheet, Modal as Modal$1, View as View$2, ScrollView as ScrollView$2, Linking, Text as Text$1, PixelRatio } from 'react-native';
11
+ import { Platform, Animated as Animated$1, Easing, useWindowDimensions, StyleSheet, Modal, ScrollView as ScrollView$2, View as View$2, Linking, Text as Text$1, Pressable as Pressable$2, PixelRatio } from 'react-native';
12
12
  export { useWindowDimensions as useWindowSize } from 'react-native';
13
13
  import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
14
14
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
15
- import { ArcIcon, UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, RotateCCWIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
15
+ import { ArcIcon, UserIcon, CheckboxMark, EyeOffIcon, EyeIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, RotateCCWIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
16
16
  export * from '@ornikar/kitt-icons';
17
17
  import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
18
18
  import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
19
- import styled, { css, ThemeProvider } from 'styled-components/native';
20
19
  import { parse } from 'twemoji-parser';
21
20
  import * as WebBrowser from 'expo-web-browser';
22
21
  import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
@@ -27,7 +26,6 @@ import { Picker as Picker$1 } from '@react-native-picker/picker';
27
26
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
28
27
  import { LinearGradient } from 'expo-linear-gradient';
29
28
  import { useFloating, offset, autoPlacement } from '@floating-ui/react-native';
30
- import { styled as styled$1 } from '@linaria/react';
31
29
  import { makeDecorator } from '@storybook/addons';
32
30
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
33
31
 
@@ -924,6 +922,9 @@ var inputStatesStyle = {
924
922
  color: colors.black
925
923
  }
926
924
  };
925
+ var webAnimationDuration = '200ms';
926
+ var webAnimationTimingFunction = 'ease-in-out';
927
+ var webAnimationProperty = 'border-color';
927
928
  var input = {
928
929
  minHeight: 40,
929
930
  color: {
@@ -943,9 +944,9 @@ var input = {
943
944
  vertical: 5
944
945
  },
945
946
  transition: {
946
- property: 'border-color',
947
- duration: '200ms',
948
- timingFunction: 'ease-in-out'
947
+ property: webAnimationProperty,
948
+ duration: webAnimationDuration,
949
+ timingFunction: webAnimationTimingFunction
949
950
  },
950
951
  states: inputStatesStyle
951
952
  };
@@ -1044,6 +1045,10 @@ var textArea = {
1044
1045
  minHeight: 120
1045
1046
  };
1046
1047
 
1048
+ var timePicker = {
1049
+ minWidth: 100
1050
+ };
1051
+
1047
1052
  var forms = {
1048
1053
  datePicker: datePicker,
1049
1054
  input: input,
@@ -1052,7 +1057,8 @@ var forms = {
1052
1057
  textArea: textArea,
1053
1058
  checkbox: checkbox,
1054
1059
  inputTag: inputTag,
1055
- radioButtonGroup: radioButtonGroup
1060
+ radioButtonGroup: radioButtonGroup,
1061
+ timePicker: timePicker
1056
1062
  };
1057
1063
 
1058
1064
  var webAnimationContentDuration = 600;
@@ -1142,25 +1148,34 @@ var iconButton = {
1142
1148
 
1143
1149
  var listItem = {
1144
1150
  padding: '12px 16px',
1151
+ verticalPadding: 12,
1152
+ horizontalPadding: 16,
1145
1153
  borderColor: colors.separator,
1146
1154
  borderWidth: 1,
1147
1155
  innerMargin: 8
1148
1156
  };
1149
1157
 
1158
+ var pageLoaderSize = 60;
1159
+ var pageLoaderStrokeWidth = 3;
1160
+ var webAnimationDelay = 500;
1161
+ var webAnimationCircleBackgroundFillDuration = 1000;
1162
+ var webAnimationFilledCircleFillDuration = 1800;
1163
+ var webAnimationFilledCircleRotationDuration = 2160;
1164
+ var fillEasingFunction = [0.39, 0.575, 0.565, 1];
1150
1165
  var pageLoader = {
1151
- size: 60,
1152
- strokeWidth: 3,
1166
+ size: pageLoaderSize,
1167
+ strokeWidth: pageLoaderStrokeWidth,
1153
1168
  colors: {
1154
1169
  base: colors.separator,
1155
1170
  fill: colors.primary
1156
1171
  },
1157
1172
  animation: {
1158
- delay: 500,
1159
- circleBackgroundFillDuration: 1000,
1160
- filledCircleFillDuration: 1800,
1173
+ delay: webAnimationDelay,
1174
+ circleBackgroundFillDuration: webAnimationCircleBackgroundFillDuration,
1175
+ filledCircleFillDuration: webAnimationFilledCircleFillDuration,
1161
1176
  groupFilledCircleRotationDuration: 1800,
1162
- filledCircleRotationDuration: 2160,
1163
- fillEasingFunction: [0.39, 0.575, 0.565, 1]
1177
+ filledCircleRotationDuration: webAnimationFilledCircleRotationDuration,
1178
+ fillEasingFunction: fillEasingFunction
1164
1179
  }
1165
1180
  };
1166
1181
 
@@ -1183,6 +1198,8 @@ var picker = {
1183
1198
  },
1184
1199
  android: {
1185
1200
  padding: '12px 24px',
1201
+ verticalPadding: 12,
1202
+ horizontalPadding: 24,
1186
1203
  "default": {
1187
1204
  backgroundColor: colors.transparent
1188
1205
  },
@@ -1258,9 +1275,11 @@ var shadows = {
1258
1275
  }
1259
1276
  };
1260
1277
 
1278
+ var skeletonBackgroundColor = lateOceanColorPalette.black100;
1279
+ var skeletonFlareColor = lateOceanColorPalette.black200;
1261
1280
  var skeleton = {
1262
- backgroundColor: lateOceanColorPalette.black100,
1263
- flareColor: lateOceanColorPalette.black200,
1281
+ backgroundColor: skeletonBackgroundColor,
1282
+ flareColor: skeletonFlareColor,
1264
1283
  animationDuration: 1000,
1265
1284
  shape: {
1266
1285
  bar: {
@@ -1281,6 +1300,8 @@ var skeleton = {
1281
1300
  var tag = {
1282
1301
  borderRadius: 10,
1283
1302
  padding: '2px 12px',
1303
+ verticalPadding: 2,
1304
+ horizontalPadding: 12,
1284
1305
  primary: {
1285
1306
  fill: {
1286
1307
  backgroundColor: lateOceanColorPalette.moonPurpleLight1,
@@ -1357,6 +1378,27 @@ var tooltip = {
1357
1378
  }
1358
1379
  };
1359
1380
 
1381
+ var verticalSteps = {
1382
+ active: {
1383
+ icon: {
1384
+ backgroundColor: colors.primary,
1385
+ textColor: colors.white
1386
+ }
1387
+ },
1388
+ done: {
1389
+ icon: {
1390
+ backgroundColor: lateOceanColorPalette.moonPurple,
1391
+ textColor: colors.primary
1392
+ }
1393
+ },
1394
+ "default": {
1395
+ icon: {
1396
+ backgroundColor: colors.disabled,
1397
+ textColor: colors.blackDisabled
1398
+ }
1399
+ }
1400
+ };
1401
+
1360
1402
  var breakpoints = {
1361
1403
  values: {
1362
1404
  base: 0,
@@ -1408,7 +1450,8 @@ var theme = {
1408
1450
  tooltip: tooltip,
1409
1451
  typography: typography,
1410
1452
  fullscreenModal: fullscreenModal,
1411
- actionCard: actionCard
1453
+ actionCard: actionCard,
1454
+ verticalSteps: verticalSteps
1412
1455
  };
1413
1456
 
1414
1457
  var KittThemeContext = /*#__PURE__*/createContext({
@@ -1713,7 +1756,7 @@ var isTypographyHeader = function (type, isHeaderTypographyInContext) {
1713
1756
  throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
1714
1757
  };
1715
1758
 
1716
- var _excluded$E = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
1759
+ var _excluded$H = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
1717
1760
  var IsHeaderTypographyContext = /*#__PURE__*/createContext(undefined);
1718
1761
  var TypographyColorContext = /*#__PURE__*/createContext('black');
1719
1762
  function useTypographyColor() {
@@ -1763,7 +1806,7 @@ function Typography(_ref) {
1763
1806
  } : _ref$type,
1764
1807
  variant = _ref.variant,
1765
1808
  color = _ref.color,
1766
- otherProps = _objectWithoutProperties(_ref, _excluded$E);
1809
+ otherProps = _objectWithoutProperties(_ref, _excluded$H);
1767
1810
  var sx = useSx();
1768
1811
  var isHeaderTypographyInContext = useContext(IsHeaderTypographyContext);
1769
1812
  var defaultColor = useTypographyDefaultColor();
@@ -1868,11 +1911,11 @@ function Icon(_ref) {
1868
1911
  });
1869
1912
  }
1870
1913
 
1871
- var _excluded$D = ["color"],
1914
+ var _excluded$G = ["color"],
1872
1915
  _excluded2$5 = ["color"];
1873
1916
  function TypographyIconSpecifiedColor(_ref) {
1874
1917
  var color = _ref.color,
1875
- props = _objectWithoutProperties(_ref, _excluded$D);
1918
+ props = _objectWithoutProperties(_ref, _excluded$G);
1876
1919
  var sx = useSx();
1877
1920
  var colorStyle = sx({
1878
1921
  color: getTypographyColorValue(color)
@@ -1916,7 +1959,7 @@ var getTextColorByType = function (type, variant, isHovered, isPressed) {
1916
1959
  }
1917
1960
  };
1918
1961
 
1919
- var _excluded$C = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
1962
+ var _excluded$F = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
1920
1963
  function ButtonIcon(_ref) {
1921
1964
  var icon = _ref.icon,
1922
1965
  color = _ref.color,
@@ -1991,7 +2034,7 @@ function ButtonContent(_ref3) {
1991
2034
  isHovered = _ref3.isHovered,
1992
2035
  isPressed = _ref3.isPressed;
1993
2036
  _ref3.isFocused;
1994
- var props = _objectWithoutProperties(_ref3, _excluded$C);
2037
+ var props = _objectWithoutProperties(_ref3, _excluded$F);
1995
2038
  var color = isDisabled ? 'black-light' : getTextColorByType(type, variant, isHovered, isPressed);
1996
2039
  return /*#__PURE__*/jsx(View, {
1997
2040
  _web: {
@@ -2040,7 +2083,7 @@ function ButtonPadding(_ref2) {
2040
2083
  });
2041
2084
  }
2042
2085
 
2043
- function DisabledBorder$1() {
2086
+ function DisabledBorder() {
2044
2087
  return /*#__PURE__*/jsx(View, {
2045
2088
  position: "absolute",
2046
2089
  top: 0,
@@ -2237,7 +2280,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
2237
2280
  isPressed: isPressed,
2238
2281
  isFocused: isFocused,
2239
2282
  children: _children
2240
- }), disabled ? /*#__PURE__*/jsx(DisabledBorder$1, {}) : null, /*#__PURE__*/jsx(FocusBorder, {
2283
+ }), disabled ? /*#__PURE__*/jsx(DisabledBorder, {}) : null, /*#__PURE__*/jsx(FocusBorder, {
2241
2284
  type: type,
2242
2285
  variant: variant,
2243
2286
  isFocused: isFocused || isFocusedInternal,
@@ -2324,7 +2367,7 @@ function useMatchWindowSize(options) {
2324
2367
  }, options);
2325
2368
  }
2326
2369
 
2327
- var _excluded$B = ["as", "onPress", "disabled", "icon", "stretch"];
2370
+ var _excluded$E = ["as", "onPress", "disabled", "icon", "stretch"];
2328
2371
  function getCurrentStretchValue(isStretch, isMedium) {
2329
2372
  // Stretch will follow the value passed from the component occurence if defined
2330
2373
  if (isStretch) return isStretch;
@@ -2339,7 +2382,7 @@ function ActionsItem(_ref) {
2339
2382
  disabled = _ref.disabled,
2340
2383
  icon = _ref.icon,
2341
2384
  stretch = _ref.stretch,
2342
- props = _objectWithoutProperties(_ref, _excluded$B);
2385
+ props = _objectWithoutProperties(_ref, _excluded$E);
2343
2386
  var isMedium = useMatchWindowSize({
2344
2387
  minWidth: KittBreakpoints.MEDIUM
2345
2388
  });
@@ -2414,7 +2457,7 @@ function ActionsButton(_ref) {
2414
2457
  }, props));
2415
2458
  }
2416
2459
 
2417
- var _excluded$A = ["children", "layout"];
2460
+ var _excluded$D = ["children", "layout"];
2418
2461
  function getCurrentLayout(layout) {
2419
2462
  if (!layout) return {
2420
2463
  base: 'stretch',
@@ -2434,7 +2477,7 @@ function getCurrentDirection(layout) {
2434
2477
  function Actions(_ref) {
2435
2478
  var children = _ref.children,
2436
2479
  layout = _ref.layout,
2437
- props = _objectWithoutProperties(_ref, _excluded$A);
2480
+ props = _objectWithoutProperties(_ref, _excluded$D);
2438
2481
  var currentAlignItems = getCurrentLayout(layout);
2439
2482
  var currentDirection = getCurrentDirection(layout);
2440
2483
  return /*#__PURE__*/jsx(Stack, _objectSpread(_objectSpread({
@@ -2480,7 +2523,7 @@ function getInitials(firstname, lastname) {
2480
2523
  return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
2481
2524
  }
2482
2525
 
2483
- var _excluded$z = ["size", "round", "light", "sizeVariant"];
2526
+ var _excluded$C = ["size", "round", "light", "sizeVariant"];
2484
2527
  function AvatarContent(_ref) {
2485
2528
  var size = _ref.size,
2486
2529
  src = _ref.src,
@@ -2519,7 +2562,7 @@ function Avatar(_ref2) {
2519
2562
  round = _ref2.round,
2520
2563
  light = _ref2.light,
2521
2564
  sizeVariant = _ref2.sizeVariant,
2522
- props = _objectWithoutProperties(_ref2, _excluded$z);
2565
+ props = _objectWithoutProperties(_ref2, _excluded$C);
2523
2566
  var currentSize = getCurrentSize({
2524
2567
  size: size,
2525
2568
  sizeVariant: sizeVariant
@@ -2639,17 +2682,17 @@ function ModalBehaviourPortal(_ref) {
2639
2682
  });
2640
2683
  }
2641
2684
 
2642
- var OnCloseContext$1 = /*#__PURE__*/createContext(function () {});
2685
+ var OnCloseContext = /*#__PURE__*/createContext(function () {});
2643
2686
  function OnCloseProvider(_ref) {
2644
2687
  var children = _ref.children,
2645
2688
  onClose = _ref.onClose;
2646
- return /*#__PURE__*/jsx(OnCloseContext$1.Provider, {
2689
+ return /*#__PURE__*/jsx(OnCloseContext.Provider, {
2647
2690
  value: onClose,
2648
2691
  children: children
2649
2692
  });
2650
2693
  }
2651
2694
  function useOnCloseModalBehaviour() {
2652
- var onClose = useContext(OnCloseContext$1);
2695
+ var onClose = useContext(OnCloseContext);
2653
2696
  return onClose;
2654
2697
  }
2655
2698
 
@@ -2687,19 +2730,16 @@ function ModalBehaviour(_ref2) {
2687
2730
  }
2688
2731
  ModalBehaviour.CloseButton = CloseButton;
2689
2732
 
2690
- // Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
2691
- var OverlayPressable = /*#__PURE__*/styled(Pressable$2).withConfig({
2692
- displayName: "Overlay__OverlayPressable"
2693
- })(function (_ref) {
2694
- var theme = _ref.theme;
2695
- return _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {
2696
- backgroundColor: theme.kitt.colors.overlay.dark
2697
- });
2698
- });
2699
- function Overlay(_ref2) {
2700
- var onPress = _ref2.onPress;
2701
- return /*#__PURE__*/jsx(OverlayPressable, {
2733
+ function Overlay(_ref) {
2734
+ var onPress = _ref.onPress;
2735
+ return /*#__PURE__*/jsx(Pressable, {
2702
2736
  accessibilityRole: "none",
2737
+ position: "absolute",
2738
+ top: "0",
2739
+ left: "0",
2740
+ right: "0",
2741
+ bottom: "0",
2742
+ backgroundColor: "kitt.overlay.dark",
2703
2743
  onPress: onPress
2704
2744
  });
2705
2745
  }
@@ -2899,7 +2939,7 @@ function CardModalAnimation(_ref) {
2899
2939
  if (onExit) onExit();
2900
2940
  setIsContentVisible(false);
2901
2941
  }, [visible, isContentVisible, onExit]);
2902
- return /*#__PURE__*/jsx(Modal$1, {
2942
+ return /*#__PURE__*/jsx(Modal, {
2903
2943
  transparent: true,
2904
2944
  supportedOrientations: ['landscape', 'portrait'],
2905
2945
  visible: isModalVisible,
@@ -2939,11 +2979,11 @@ function CardModalAnimation(_ref) {
2939
2979
  });
2940
2980
  }
2941
2981
 
2942
- var _excluded$y = ["children"],
2982
+ var _excluded$B = ["children"],
2943
2983
  _excluded2$4 = ["children", "visible", "onClose", "onExited"];
2944
2984
  function CardModalScrollContainer(_ref) {
2945
2985
  var children = _ref.children,
2946
- props = _objectWithoutProperties(_ref, _excluded$y);
2986
+ props = _objectWithoutProperties(_ref, _excluded$B);
2947
2987
  if (Platform.OS !== 'web') {
2948
2988
  return /*#__PURE__*/jsx(View, {
2949
2989
  children: children
@@ -2989,7 +3029,7 @@ function CardModalBehaviour(_ref2) {
2989
3029
  });
2990
3030
  }
2991
3031
 
2992
- var _excluded$x = ["children", "paddingX", "paddingY"];
3032
+ var _excluded$A = ["children", "paddingX", "paddingY"];
2993
3033
  function CardModalBody(_ref) {
2994
3034
  var children = _ref.children,
2995
3035
  _ref$paddingX = _ref.paddingX,
@@ -2999,7 +3039,7 @@ function CardModalBody(_ref) {
2999
3039
  } : _ref$paddingX,
3000
3040
  _ref$paddingY = _ref.paddingY,
3001
3041
  paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
3002
- props = _objectWithoutProperties(_ref, _excluded$x);
3042
+ props = _objectWithoutProperties(_ref, _excluded$A);
3003
3043
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
3004
3044
  paddingX: paddingX,
3005
3045
  paddingY: paddingY
@@ -3008,7 +3048,7 @@ function CardModalBody(_ref) {
3008
3048
  }));
3009
3049
  }
3010
3050
 
3011
- var _excluded$w = ["children", "padding", "hasSeparator"];
3051
+ var _excluded$z = ["children", "padding", "hasSeparator"];
3012
3052
  function CardModalFooter(_ref) {
3013
3053
  var children = _ref.children,
3014
3054
  _ref$padding = _ref.padding,
@@ -3018,7 +3058,7 @@ function CardModalFooter(_ref) {
3018
3058
  } : _ref$padding,
3019
3059
  _ref$hasSeparator = _ref.hasSeparator,
3020
3060
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
3021
- props = _objectWithoutProperties(_ref, _excluded$w);
3061
+ props = _objectWithoutProperties(_ref, _excluded$z);
3022
3062
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
3023
3063
  marginTop: "kitt.2",
3024
3064
  padding: padding,
@@ -3032,7 +3072,7 @@ function CardModalFooter(_ref) {
3032
3072
  }));
3033
3073
  }
3034
3074
 
3035
- var _excluded$v = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
3075
+ var _excluded$y = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
3036
3076
  function CardModalHeader(_ref) {
3037
3077
  var children = _ref.children,
3038
3078
  title = _ref.title,
@@ -3045,7 +3085,7 @@ function CardModalHeader(_ref) {
3045
3085
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
3046
3086
  right = _ref.right,
3047
3087
  left = _ref.left,
3048
- props = _objectWithoutProperties(_ref, _excluded$v);
3088
+ props = _objectWithoutProperties(_ref, _excluded$y);
3049
3089
  var defaultContainerPadding = {
3050
3090
  base: 'kitt.4',
3051
3091
  medium: 'kitt.6'
@@ -3083,7 +3123,7 @@ function CardModalHeader(_ref) {
3083
3123
  }));
3084
3124
  }
3085
3125
 
3086
- var _excluded$u = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
3126
+ var _excluded$x = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
3087
3127
  function CardModal(_ref) {
3088
3128
  var _ref$backgroundColor = _ref.backgroundColor,
3089
3129
  backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
@@ -3094,7 +3134,7 @@ function CardModal(_ref) {
3094
3134
  header = _ref.header,
3095
3135
  body = _ref.body,
3096
3136
  footer = _ref.footer,
3097
- props = _objectWithoutProperties(_ref, _excluded$u);
3137
+ props = _objectWithoutProperties(_ref, _excluded$x);
3098
3138
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
3099
3139
  overflow: "hidden",
3100
3140
  backgroundColor: backgroundColor,
@@ -3112,6 +3152,59 @@ CardModal.Header = CardModalHeader;
3112
3152
  CardModal.Footer = CardModalFooter;
3113
3153
  CardModal.ModalBehaviour = CardModalBehaviour;
3114
3154
 
3155
+ function getBackgroundColor$3(_ref) {
3156
+ var isDisabled = _ref.isDisabled,
3157
+ isSelected = _ref.isSelected,
3158
+ isHovered = _ref.isHovered,
3159
+ isPressed = _ref.isPressed;
3160
+ if (isDisabled) return 'kitt.choices.item.disabled.backgroundColor';
3161
+ if (isSelected && isHovered) return 'kitt.choices.item.hoverWhenSelected.backgroundColor';
3162
+ if (isPressed) return 'kitt.choices.item.pressed.backgroundColor';
3163
+ if (isHovered) return 'kitt.choices.item.hover.backgroundColor';
3164
+ if (isSelected) return 'kitt.choices.item.selected.backgroundColor';
3165
+ return 'kitt.choices.item.default.backgroundColor';
3166
+ }
3167
+
3168
+ function getBorderRadius(variant) {
3169
+ // The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
3170
+ // We don't control over the height of the rendered children we just go with a arbitrary really high value
3171
+ return variant === 'rounded' ? Number.MAX_SAFE_INTEGER : 'kitt.choices.item.borderRadius';
3172
+ }
3173
+
3174
+ function AnimatedChoiceItemView(_ref) {
3175
+ var children = _ref.children,
3176
+ variant = _ref.variant,
3177
+ size = _ref.size,
3178
+ isHovered = _ref.isHovered,
3179
+ isPressed = _ref.isPressed,
3180
+ isDisabled = _ref.isDisabled,
3181
+ isSelected = _ref.isSelected,
3182
+ animatedStyles = _ref.animatedStyles;
3183
+ var sx = useSx();
3184
+ var style = sx({
3185
+ position: 'relative',
3186
+ borderRadius: getBorderRadius(variant),
3187
+ backgroundColor: getBackgroundColor$3({
3188
+ isDisabled: isDisabled,
3189
+ isSelected: isSelected,
3190
+ isHovered: isHovered,
3191
+ isPressed: isPressed
3192
+ }),
3193
+ paddingX: size === 'small' ? 'kitt.4' : {
3194
+ base: 'kitt.4',
3195
+ small: 'kitt.6'
3196
+ },
3197
+ paddingY: size === 'small' ? 'kitt.2' : {
3198
+ base: 'kitt.4',
3199
+ small: 'kitt.6'
3200
+ }
3201
+ });
3202
+ return /*#__PURE__*/jsx(Animated.View, {
3203
+ style: [style, animatedStyles],
3204
+ children: children
3205
+ });
3206
+ }
3207
+
3115
3208
  var useNativeAnimation$2 = function (_ref) {
3116
3209
  var selected = _ref.selected,
3117
3210
  disabled = _ref.disabled,
@@ -3202,87 +3295,22 @@ function getCurrentTextColor$1(_ref) {
3202
3295
  if (isSelected || isPressed) return 'white';
3203
3296
  return 'black';
3204
3297
  }
3205
- function getBorderRadius(defaultRadius, variant) {
3206
- // The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
3207
- // We don't control over the height of the rendered children we just go with a arbitrary really high value
3208
3298
 
3209
- if (variant === 'rounded') return 800;
3210
- return defaultRadius;
3211
- }
3212
- var DisabledBorder = /*#__PURE__*/styled(View$2).withConfig({
3213
- displayName: "ChoiceItem__DisabledBorder"
3214
- })(["border-radius:", "px;", ";"], function (_ref2) {
3215
- var theme = _ref2.theme,
3216
- $variant = _ref2.$variant;
3217
- return getBorderRadius(theme.kitt.choices.item.borderRadius, $variant);
3218
- }, function (_ref3) {
3219
- var theme = _ref3.theme;
3220
- var _theme$kitt$choices$i = theme.kitt.choices.item.disabled.border,
3221
- width = _theme$kitt$choices$i.width,
3222
- color = _theme$kitt$choices$i.color;
3223
- return css(["border:", "px solid ", ";"], width, color);
3224
- });
3225
- var ChoiceItemView = /*#__PURE__*/styled(Platform.OS === 'web' ? View$2 : Animated.View).withConfig({
3226
- displayName: "ChoiceItem__ChoiceItemView"
3227
- })(["position:relative;border-radius:", "px;background-color:", ";", ";", ""], function (_ref4) {
3228
- var theme = _ref4.theme,
3229
- $variant = _ref4.$variant;
3230
- return getBorderRadius(theme.kitt.choices.item.borderRadius, $variant);
3231
- }, function (_ref5) {
3232
- var theme = _ref5.theme,
3233
- $isHovered = _ref5.$isHovered,
3234
- $isPressed = _ref5.$isPressed,
3235
- $isDisabled = _ref5.$isDisabled,
3236
- $isSelected = _ref5.$isSelected;
3237
- var _theme$kitt$choices$i2 = theme.kitt.choices.item.backgroundColor,
3238
- hoverWhenSelected = _theme$kitt$choices$i2.hoverWhenSelected,
3239
- hover = _theme$kitt$choices$i2.hover,
3240
- disabled = _theme$kitt$choices$i2.disabled,
3241
- selected = _theme$kitt$choices$i2.selected,
3242
- pressed = _theme$kitt$choices$i2.pressed,
3243
- defaultBackground = _theme$kitt$choices$i2["default"];
3244
- if ($isDisabled) return disabled;
3245
- if ($isSelected && $isHovered) return hoverWhenSelected;
3246
- if ($isPressed) return pressed;
3247
- if ($isHovered) return hover;
3248
- if ($isSelected) return selected;
3249
- return defaultBackground;
3250
- }, function (_ref6) {
3251
- var theme = _ref6.theme,
3252
- $size = _ref6.$size;
3253
- var _theme$kitt$choices$i3 = theme.kitt.choices.item.padding,
3254
- base = _theme$kitt$choices$i3.base,
3255
- small = _theme$kitt$choices$i3.small;
3256
- if ($size === 'small') {
3257
- return css(["padding:", "px ", "px;"], base / 2, base);
3258
- }
3259
- return theme.responsive.ifWindowSizeMatches({
3260
- minWidth: KittBreakpoints.SMALL
3261
- }, css(["padding:", "px;"], small), css(["padding:", "px;"], base));
3262
- }, function (_ref7) {
3263
- var theme = _ref7.theme;
3264
- if (Platform.OS !== 'web') return undefined;
3265
- var _theme$kitt$choices$i4 = theme.kitt.choices.item.transition,
3266
- property = _theme$kitt$choices$i4.property,
3267
- duration = _theme$kitt$choices$i4.duration,
3268
- timingFunction = _theme$kitt$choices$i4.timingFunction;
3269
- return css(["transition:", " ", "ms ", ";"], property, duration, timingFunction);
3270
- });
3271
- function ChoiceItem(_ref8) {
3272
- var _ref8$type = _ref8.type,
3273
- type = _ref8$type === void 0 ? 'button' : _ref8$type,
3274
- value = _ref8.value,
3275
- selected = _ref8.selected,
3276
- disabled = _ref8.disabled,
3277
- variant = _ref8.variant,
3278
- _children = _ref8.children,
3279
- isPressedInternal = _ref8.isPressedInternal,
3280
- isHoveredInternal = _ref8.isHoveredInternal,
3281
- onPress = _ref8.onPress,
3282
- onChange = _ref8.onChange,
3283
- onBlur = _ref8.onBlur,
3284
- onFocus = _ref8.onFocus,
3285
- size = _ref8.size;
3299
+ function ChoiceItem(_ref) {
3300
+ var _ref$type = _ref.type,
3301
+ type = _ref$type === void 0 ? 'button' : _ref$type,
3302
+ value = _ref.value,
3303
+ selected = _ref.selected,
3304
+ disabled = _ref.disabled,
3305
+ variant = _ref.variant,
3306
+ _children = _ref.children,
3307
+ isPressedInternal = _ref.isPressedInternal,
3308
+ isHoveredInternal = _ref.isHoveredInternal,
3309
+ onPress = _ref.onPress,
3310
+ onChange = _ref.onChange,
3311
+ onBlur = _ref.onBlur,
3312
+ onFocus = _ref.onFocus,
3313
+ size = _ref.size;
3286
3314
  var _useNativeAnimation = useNativeAnimation$2({
3287
3315
  selected: selected,
3288
3316
  disabled: disabled,
@@ -3317,17 +3345,17 @@ function ChoiceItem(_ref8) {
3317
3345
  },
3318
3346
  onPressIn: onPressIn,
3319
3347
  onPressOut: onPressOut,
3320
- children: function children(_ref9) {
3321
- var isHovered = _ref9.isHovered,
3322
- isPressed = _ref9.isPressed;
3323
- return /*#__PURE__*/jsxs(ChoiceItemView, {
3324
- style: Platform.OS !== 'web' ? [backgroundStyles] : undefined,
3325
- $isHovered: isHovered || isHoveredInternal,
3326
- $isDisabled: disabled,
3327
- $isSelected: selected,
3328
- $isPressed: isPressed || isPressedInternal,
3329
- $variant: variant,
3330
- $size: size,
3348
+ children: function children(_ref2) {
3349
+ var isHovered = _ref2.isHovered,
3350
+ isPressed = _ref2.isPressed;
3351
+ return /*#__PURE__*/jsxs(AnimatedChoiceItemView, {
3352
+ animatedStyles: backgroundStyles,
3353
+ isHovered: isHovered || isHoveredInternal,
3354
+ isDisabled: disabled,
3355
+ isSelected: selected,
3356
+ isPressed: isPressed || isPressedInternal,
3357
+ variant: variant,
3358
+ size: size,
3331
3359
  children: [/*#__PURE__*/jsx(Typography.SetDefaultColor, {
3332
3360
  value: getCurrentTextColor$1({
3333
3361
  isDisabled: disabled,
@@ -3336,34 +3364,37 @@ function ChoiceItem(_ref8) {
3336
3364
  isHovered: isHovered || isHoveredInternal
3337
3365
  }),
3338
3366
  children: _children
3339
- }), disabled ? /*#__PURE__*/jsx(DisabledBorder, {
3340
- $variant: variant,
3341
- style: StyleSheet.absoluteFillObject
3367
+ }), disabled ? /*#__PURE__*/jsx(View, {
3368
+ borderRadius: getBorderRadius(variant),
3369
+ borderWidth: "kitt.choices.item.disabled.borderWidth",
3370
+ borderColor: "kitt.choices.item.disabled.borderColor",
3371
+ position: "absolute",
3372
+ top: "0",
3373
+ right: "0",
3374
+ left: "0",
3375
+ bottom: "0"
3342
3376
  }) : null]
3343
3377
  });
3344
3378
  }
3345
3379
  });
3346
3380
  }
3347
3381
 
3348
- var ChoiceItemContainer = /*#__PURE__*/styled(View$2).withConfig({
3349
- displayName: "ChoiceItemContainer"
3350
- })(["", ""], function (_ref) {
3351
- var theme = _ref.theme,
3352
- $isLast = _ref.$isLast,
3353
- $direction = _ref.$direction;
3354
- var _theme$kitt$choices$s = theme.kitt.choices.spacing,
3355
- row = _theme$kitt$choices$s.row,
3356
- column = _theme$kitt$choices$s.column;
3357
- if ($direction === 'row') {
3358
- return css(["margin-right:", "px;"], $isLast ? 0 : row);
3359
- }
3360
- return css(["margin-bottom:", "px;"], $isLast ? 0 : column);
3361
- });
3382
+ function ChoiceItemContainer(_ref) {
3383
+ var children = _ref.children,
3384
+ direction = _ref.direction,
3385
+ isLast = _ref.isLast;
3386
+ var currentItemMarginValue = isLast ? undefined : 'kitt.3';
3387
+ return /*#__PURE__*/jsx(View, {
3388
+ marginRight: direction === 'row' ? currentItemMarginValue : undefined,
3389
+ marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
3390
+ children: children
3391
+ });
3392
+ }
3362
3393
 
3363
- var _excluded$t = ["direction"];
3394
+ var _excluded$w = ["direction"];
3364
3395
  function ChoicesContainer(_ref) {
3365
3396
  var direction = _ref.direction,
3366
- props = _objectWithoutProperties(_ref, _excluded$t);
3397
+ props = _objectWithoutProperties(_ref, _excluded$w);
3367
3398
  if (direction === 'row') {
3368
3399
  return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
3369
3400
  horizontal: true
@@ -3417,8 +3448,8 @@ function Choices(_ref2) {
3417
3448
  selected: isForm ? child.props.value === currentValue : undefined
3418
3449
  }, sharedProps));
3419
3450
  return /*#__PURE__*/jsx(ChoiceItemContainer, {
3420
- $direction: direction,
3421
- $isLast: index === childrenArray.length - 1,
3451
+ direction: direction,
3452
+ isLast: index === childrenArray.length - 1,
3422
3453
  children: element
3423
3454
  }, child.key);
3424
3455
  })
@@ -3621,7 +3652,7 @@ function DialogModalAnimation(_ref) {
3621
3652
  if (onExit) onExit();
3622
3653
  setIsContentVisible(false);
3623
3654
  }, [visible, isContentVisible, onExit]);
3624
- return /*#__PURE__*/jsx(Modal$1, {
3655
+ return /*#__PURE__*/jsx(Modal, {
3625
3656
  transparent: true,
3626
3657
  supportedOrientations: ['landscape', 'portrait'],
3627
3658
  visible: isModalVisible,
@@ -3657,13 +3688,13 @@ function DialogModalAnimation(_ref) {
3657
3688
  });
3658
3689
  }
3659
3690
 
3660
- var _excluded$s = ["children", "visible", "onClose", "onExited"];
3691
+ var _excluded$v = ["children", "visible", "onClose", "onExited"];
3661
3692
  function DialogModalBehaviour(_ref) {
3662
3693
  var children = _ref.children,
3663
3694
  visible = _ref.visible,
3664
3695
  onClose = _ref.onClose,
3665
3696
  onExited = _ref.onExited,
3666
- props = _objectWithoutProperties(_ref, _excluded$s);
3697
+ props = _objectWithoutProperties(_ref, _excluded$v);
3667
3698
  var _useState = useState(visible),
3668
3699
  _useState2 = _slicedToArray(_useState, 2),
3669
3700
  isModalBehaviourVisible = _useState2[0],
@@ -3694,7 +3725,7 @@ function DialogModalBehaviour(_ref) {
3694
3725
  });
3695
3726
  }
3696
3727
 
3697
- var _excluded$r = ["stretch"];
3728
+ var _excluded$u = ["stretch"];
3698
3729
  function DialogModal(_ref) {
3699
3730
  var illustration = _ref.illustration,
3700
3731
  title = _ref.title,
@@ -3735,7 +3766,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
3735
3766
  function DialogModalButton(_ref2) {
3736
3767
  var _ref2$stretch = _ref2.stretch,
3737
3768
  stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
3738
- props = _objectWithoutProperties(_ref2, _excluded$r);
3769
+ props = _objectWithoutProperties(_ref2, _excluded$u);
3739
3770
  return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
3740
3771
  stretch: stretch
3741
3772
  }, props));
@@ -3772,7 +3803,7 @@ function Emoji(_ref) {
3772
3803
  });
3773
3804
  }
3774
3805
 
3775
- var _excluded$q = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
3806
+ var _excluded$t = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
3776
3807
  _excluded2$3 = ["phoneNumber", "children"],
3777
3808
  _excluded3$2 = ["phoneNumber", "children"],
3778
3809
  _excluded4$1 = ["emailAddress", "children"];
@@ -3782,7 +3813,7 @@ function ExternalAppLink(_ref) {
3782
3813
  appValue = _ref.appValue,
3783
3814
  onPress = _ref.onPress,
3784
3815
  onOpenAppError = _ref.onOpenAppError,
3785
- rest = _objectWithoutProperties(_ref, _excluded$q);
3816
+ rest = _objectWithoutProperties(_ref, _excluded$t);
3786
3817
  var href = "".concat(appScheme, ":").concat(appValue);
3787
3818
  var handleOnPress = /*#__PURE__*/function () {
3788
3819
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
@@ -3877,14 +3908,14 @@ var defaultOpenLinkBehavior = {
3877
3908
  web: 'targetBlank'
3878
3909
  };
3879
3910
 
3880
- var _excluded$p = ["as", "href", "openLinkBehavior", "onPress"];
3911
+ var _excluded$s = ["as", "href", "openLinkBehavior", "onPress"];
3881
3912
  function ExternalLink(_ref) {
3882
3913
  var Component = _ref.as,
3883
3914
  href = _ref.href,
3884
3915
  _ref$openLinkBehavior = _ref.openLinkBehavior,
3885
3916
  openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
3886
3917
  onPress = _ref.onPress,
3887
- rest = _objectWithoutProperties(_ref, _excluded$p);
3918
+ rest = _objectWithoutProperties(_ref, _excluded$s);
3888
3919
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
3889
3920
  onPress: function handleOnPress(e) {
3890
3921
  if (onPress) {
@@ -4211,11 +4242,15 @@ function stringToNumber(text) {
4211
4242
  return parseInt(text, 10);
4212
4243
  }
4213
4244
 
4214
- var InputTextContainer = /*#__PURE__*/styled.View.withConfig({
4215
- displayName: "InputTextContainer"
4216
- })(["position:relative;"]);
4245
+ function InputTextContainer(_ref) {
4246
+ var children = _ref.children;
4247
+ return /*#__PURE__*/jsx(View, {
4248
+ position: "relative",
4249
+ children: children
4250
+ });
4251
+ }
4217
4252
 
4218
- var _excluded$o = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing"];
4253
+ var _excluded$r = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "keyboardType", "multiline", "onSubmitEditing"];
4219
4254
  var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
4220
4255
  var id = _ref.id,
4221
4256
  right = _ref.right;
@@ -4235,14 +4270,13 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
4235
4270
  keyboardType = _ref$keyboardType === void 0 ? 'default' : _ref$keyboardType,
4236
4271
  multiline = _ref.multiline,
4237
4272
  onSubmitEditing = _ref.onSubmitEditing,
4238
- props = _objectWithoutProperties(_ref, _excluded$o);
4273
+ props = _objectWithoutProperties(_ref, _excluded$r);
4239
4274
  var theme = useTheme();
4240
4275
  var fontSizeForNativeBase = createNativeBaseFontSize({
4241
4276
  base: 'body'
4242
4277
  });
4243
4278
  var shouldHandleSingleLineOnIOS = Platform.OS === 'ios' && !multiline;
4244
4279
  return /*#__PURE__*/jsxs(InputTextContainer, {
4245
- $isDisabled: disabled,
4246
4280
  children: [/*#__PURE__*/jsx(Input, _objectSpread(_objectSpread({
4247
4281
  ref: ref,
4248
4282
  multiline: multiline,
@@ -4279,7 +4313,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
4279
4313
  });
4280
4314
  });
4281
4315
 
4282
- function getCurrentInternalForcedState(_ref) {
4316
+ function getCurrentInternalForcedState$1(_ref) {
4283
4317
  var isDisabled = _ref.isDisabled,
4284
4318
  isHoveredInternal = _ref.isHoveredInternal,
4285
4319
  isFocusedInternal = _ref.isFocusedInternal,
@@ -4303,7 +4337,7 @@ var InputPart = /*#__PURE__*/forwardRef(function (_ref2, ref) {
4303
4337
  onSubmitEditing = _ref2.onSubmitEditing;
4304
4338
  return /*#__PURE__*/jsx(InputText, {
4305
4339
  ref: ref,
4306
- internalForceState: getCurrentInternalForcedState({
4340
+ internalForceState: getCurrentInternalForcedState$1({
4307
4341
  isDisabled: disabled,
4308
4342
  isHoveredInternal: isHoveredInternal,
4309
4343
  isFocusedInternal: isFocusedInternal,
@@ -4333,7 +4367,7 @@ function PartContainer(_ref) {
4333
4367
  });
4334
4368
  }
4335
4369
 
4336
- var _excluded$n = ["value", "testID", "id", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "returnKeyType", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
4370
+ var _excluded$q = ["value", "testID", "id", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "returnKeyType", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
4337
4371
  var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
4338
4372
  var value = _ref.value,
4339
4373
  testID = _ref.testID,
@@ -4351,7 +4385,7 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
4351
4385
  onBlur = _ref.onBlur,
4352
4386
  onFocus = _ref.onFocus,
4353
4387
  onSubmitEditing = _ref.onSubmitEditing;
4354
- _objectWithoutProperties(_ref, _excluded$n);
4388
+ _objectWithoutProperties(_ref, _excluded$q);
4355
4389
  var monthRef = useRef(null);
4356
4390
  var yearRef = useRef(null);
4357
4391
  var defaultValue = value;
@@ -4558,7 +4592,7 @@ var PressableDateInputs = /*#__PURE__*/forwardRef(function (_ref, ref) {
4558
4592
  });
4559
4593
  });
4560
4594
 
4561
- var _excluded$m = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
4595
+ var _excluded$p = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
4562
4596
  var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
4563
4597
  var onBlur = _ref.onBlur,
4564
4598
  onFocus = _ref.onFocus,
@@ -4567,7 +4601,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
4567
4601
  isDefaultVisible = _ref.isDefaultVisible,
4568
4602
  value = _ref.value,
4569
4603
  _onChange = _ref.onChange,
4570
- props = _objectWithoutProperties(_ref, _excluded$m);
4604
+ props = _objectWithoutProperties(_ref, _excluded$p);
4571
4605
  var _useState = useState(false),
4572
4606
  _useState2 = _slicedToArray(_useState, 2),
4573
4607
  isFocused = _useState2[0],
@@ -4610,448 +4644,104 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
4610
4644
  }, props));
4611
4645
  });
4612
4646
 
4613
- var BodyView = /*#__PURE__*/styled.View.withConfig({
4614
- displayName: "Body__BodyView"
4615
- })(["padding:", "px ", "px;"], function (_ref) {
4616
- var theme = _ref.theme;
4617
- return theme.kitt.spacing * 6;
4618
- }, function (_ref2) {
4619
- var theme = _ref2.theme;
4620
- return theme.kitt.spacing * 4;
4621
- });
4622
- function ModalBody(_ref3) {
4623
- var children = _ref3.children;
4624
- return /*#__PURE__*/jsx(ScrollView$2, {
4625
- children: /*#__PURE__*/jsx(BodyView, {
4626
- children: children
4627
- })
4628
- });
4629
- }
4630
-
4631
- var FooterView = /*#__PURE__*/styled.View.withConfig({
4632
- displayName: "Footer__FooterView"
4633
- })(["flex:0 0 auto;padding:", "px;border-top-width:1px;border-top-color:", ";"], function (_ref) {
4634
- var theme = _ref.theme;
4635
- return theme.kitt.spacing * 4;
4636
- }, function (_ref2) {
4637
- var theme = _ref2.theme;
4638
- return theme.kitt.colors.separator;
4639
- });
4640
- function ModalFooter(_ref3) {
4641
- var children = _ref3.children;
4642
- return /*#__PURE__*/jsx(FooterView, {
4643
- children: children
4644
- });
4645
- }
4646
-
4647
- var _excluded$l = ["color", "isDisabled"];
4648
- function getBackgroundColor$1(color, isDisabled) {
4649
- if (isDisabled) {
4650
- return 'kitt.iconButton.disabled.backgroundColor';
4651
- }
4652
- switch (color) {
4653
- case 'primary':
4654
- return 'kitt.iconButton.primary.pressed.backgroundColor';
4655
- case 'white':
4656
- return 'kitt.iconButton.white.pressed.backgroundColor';
4657
- case 'black':
4658
- default:
4659
- return 'kitt.iconButton.black.pressed.backgroundColor';
4660
- }
4647
+ function getDatePickerDisplayMode() {
4648
+ if (Platform.OS === 'android') return 'calendar';
4649
+ if (Platform.OS === 'ios') return 'spinner';
4650
+ return 'default';
4661
4651
  }
4662
- function Background(_ref) {
4663
- var color = _ref.color,
4664
- isDisabled = _ref.isDisabled,
4665
- props = _objectWithoutProperties(_ref, _excluded$l);
4666
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
4667
- width: "100%",
4668
- height: "100%",
4669
- borderRadius: "kitt.iconButton.borderRadius",
4670
- backgroundColor: getBackgroundColor$1(color, isDisabled)
4652
+ function PlatformDateTimePicker(_ref) {
4653
+ var value = _ref.value,
4654
+ _ref$defaultDate = _ref.defaultDate,
4655
+ defaultDate = _ref$defaultDate === void 0 ? new Date() : _ref$defaultDate,
4656
+ maximumDate = _ref.maximumDate,
4657
+ minimuDate = _ref.minimuDate,
4658
+ testID = _ref.testID,
4659
+ _onChange = _ref.onChange;
4660
+ var theme = useTheme();
4661
+ var displayMode = getDatePickerDisplayMode();
4662
+ var iosProps = Platform.OS === 'ios' ? {
4663
+ textColor: theme.kitt.colors.primary
4664
+ } : {};
4665
+ return /*#__PURE__*/jsx(DateTimePicker, _objectSpread(_objectSpread({
4666
+ is24Hour: true,
4667
+ testID: testID,
4668
+ value: value || defaultDate,
4669
+ mode: "date",
4670
+ maximumDate: maximumDate,
4671
+ minimumDate: minimuDate,
4672
+ display: displayMode
4673
+ }, iosProps), {}, {
4674
+ onChange: function onChange(_event, date) {
4675
+ return _onChange(date);
4676
+ }
4671
4677
  }));
4672
4678
  }
4673
4679
 
4674
- function AnimatedBackground(_ref) {
4675
- var color = _ref.color,
4676
- isDisabled = _ref.isDisabled,
4677
- opacityStyles = _ref.opacityStyles;
4678
- var sx = useSx();
4679
- var currentOpacityStyles = isDisabled ? {
4680
- opacity: 1
4681
- } : opacityStyles;
4682
- var styles = sx({
4683
- position: 'absolute',
4684
- top: 0,
4685
- left: 0,
4686
- width: '100%',
4687
- height: '100%'
4688
- });
4689
- return /*#__PURE__*/jsx(Animated.View, {
4690
- style: [styles, currentOpacityStyles],
4691
- children: /*#__PURE__*/jsx(Background, {
4692
- color: color,
4693
- isDisabled: isDisabled
4680
+ var _excluded$o = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
4681
+ function ModalTitle(_ref) {
4682
+ var children = _ref.children;
4683
+ return /*#__PURE__*/jsx(CardModal.Header, {
4684
+ children: /*#__PURE__*/jsx(Typography.Text, {
4685
+ base: "body",
4686
+ variant: "bold",
4687
+ children: children
4694
4688
  })
4695
4689
  });
4696
4690
  }
4691
+ function ModalPlatformDateTimePicker(_ref2) {
4692
+ var title = _ref2.title,
4693
+ isVisible = _ref2.isVisible,
4694
+ value = _ref2.value,
4695
+ validateButtonLabel = _ref2.validateButtonLabel,
4696
+ onClose = _ref2.onClose,
4697
+ onChange = _ref2.onChange,
4698
+ props = _objectWithoutProperties(_ref2, _excluded$o);
4699
+ var _useState = useState(value),
4700
+ _useState2 = _slicedToArray(_useState, 2),
4701
+ currentValue = _useState2[0],
4702
+ setCurrentValue = _useState2[1];
4697
4703
 
4698
- function AnimatedScale(_ref) {
4699
- var isDisabled = _ref.isDisabled,
4700
- scaleStyles = _ref.scaleStyles,
4701
- children = _ref.children;
4702
- var sx = useSx();
4703
- var currentOpacityStyles = isDisabled ? {
4704
- transform: [{
4705
- scale: 1
4706
- }]
4707
- } : scaleStyles;
4708
- var styles = sx({
4709
- position: 'relative',
4710
- alignItems: 'center',
4711
- justifyContent: 'center',
4712
- width: '100%',
4713
- height: '100%'
4714
- });
4715
- return /*#__PURE__*/jsx(Animated.View, {
4716
- style: [styles, currentOpacityStyles],
4717
- children: children
4704
+ // Prevent unsynced value between the modal and its parent state
4705
+
4706
+ return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
4707
+ visible: Boolean(isVisible),
4708
+ onClose: function handleClose() {
4709
+ setCurrentValue(value);
4710
+ onClose();
4711
+ },
4712
+ children: /*#__PURE__*/jsx(CardModal, {
4713
+ children: isVisible ? /*#__PURE__*/jsxs(Fragment, {
4714
+ children: [title ? /*#__PURE__*/jsx(ModalTitle, {
4715
+ children: title
4716
+ }) : null, /*#__PURE__*/jsx(CardModal.Body, {
4717
+ children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
4718
+ value: currentValue,
4719
+ onChange: function handleChange(newDate) {
4720
+ setCurrentValue(function (prev) {
4721
+ return newDate || prev;
4722
+ });
4723
+ }
4724
+ }))
4725
+ }), /*#__PURE__*/jsx(CardModal.Footer, {
4726
+ children: /*#__PURE__*/jsx(Button, {
4727
+ stretch: true,
4728
+ type: "primary",
4729
+ onPress: function handleSubmit() {
4730
+ onChange(currentValue);
4731
+ },
4732
+ children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
4733
+ children: validateButtonLabel
4734
+ }) : /*#__PURE__*/jsx(FormattedMessage, {
4735
+ id: "kitt-universal.ModalPlatformDateTimePicker.confirm"
4736
+ })
4737
+ })
4738
+ })]
4739
+ }) : null
4740
+ })
4718
4741
  });
4719
4742
  }
4720
4743
 
4721
- function useNativeAnimation$1(_ref) {
4722
- var isPressed = _ref.isPressed;
4723
- var theme = useTheme();
4724
- var pressed = useSharedValue(!!isPressed);
4725
- var opacityStyles = useAnimatedStyle(function () {
4726
- var _f = function () {
4727
- return {
4728
- opacity: withSpring(pressed.value ? 1 : 0)
4729
- };
4730
- };
4731
- _f._closure = {
4732
- withSpring: withSpring,
4733
- pressed: pressed
4734
- };
4735
- _f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
4736
- _f.__workletHash = 10645190329247;
4737
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/hooks/useNativeAnimation.ts (24:41)";
4738
- _f.__optimalization = 2;
4739
- return _f;
4740
- }());
4741
- var scaleStyles = useAnimatedStyle(function () {
4742
- var _f = function () {
4743
- return {
4744
- transform: [{
4745
- scale: withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base["default"])
4746
- }]
4747
- };
4748
- };
4749
- _f._closure = {
4750
- withSpring: withSpring,
4751
- pressed: pressed,
4752
- theme: {
4753
- kitt: {
4754
- iconButton: {
4755
- scale: {
4756
- base: {
4757
- active: theme.kitt.iconButton.scale.base.active,
4758
- "default": theme.kitt.iconButton.scale.base["default"]
4759
- }
4760
- }
4761
- }
4762
- }
4763
- }
4764
- };
4765
- _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)}]};}}";
4766
- _f.__workletHash = 13861998831411;
4767
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/hooks/useNativeAnimation.ts (30:39)";
4768
- _f.__optimalization = 2;
4769
- return _f;
4770
- }());
4771
- return {
4772
- opacityStyles: opacityStyles,
4773
- scaleStyles: scaleStyles,
4774
- onPressIn: function handlePressIn() {
4775
- pressed.value = true;
4776
- },
4777
- onPressOut: function handlePressOut() {
4778
- pressed.value = false;
4779
- }
4780
- };
4781
- }
4782
-
4783
- function IconButton(_ref) {
4784
- var icon = _ref.icon,
4785
- _ref$color = _ref.color,
4786
- color = _ref$color === void 0 ? 'black' : _ref$color,
4787
- disabled = _ref.disabled,
4788
- testID = _ref.testID,
4789
- accessibilityLabel = _ref.accessibilityLabel,
4790
- _ref$accessibilityRol = _ref.accessibilityRole,
4791
- accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
4792
- isHoveredInternal = _ref.isHoveredInternal,
4793
- isPressedInternal = _ref.isPressedInternal,
4794
- isFocusedInternal = _ref.isFocusedInternal,
4795
- onPress = _ref.onPress;
4796
- var _useNativeAnimation = useNativeAnimation$1({
4797
- isDisabled: disabled,
4798
- isPressed: isPressedInternal
4799
- }),
4800
- onPressIn = _useNativeAnimation.onPressIn,
4801
- onPressOut = _useNativeAnimation.onPressOut,
4802
- opacityStyles = _useNativeAnimation.opacityStyles,
4803
- scaleStyles = _useNativeAnimation.scaleStyles;
4804
- return /*#__PURE__*/jsx(Pressable, {
4805
- testID: testID,
4806
- disabled: disabled,
4807
- width: "kitt.iconButton.width",
4808
- height: "kitt.iconButton.height",
4809
- accessibilityLabel: accessibilityLabel,
4810
- accessibilityRole: accessibilityRole,
4811
- _web: {
4812
- style: {
4813
- backfaceVisibility: 'hidden',
4814
- transform: [{
4815
- translate3d: '0'
4816
- }]
4817
- }
4818
- },
4819
- borderRadius: "kitt.iconButton.borderRadius",
4820
- borderColor: disabled ? 'kitt.iconButton.disabled.borderColor' : 'kitt.iconButton.borderColor',
4821
- borderWidth: disabled ? 'kitt.iconButton.borderWidth' : 0,
4822
- onPress: onPress,
4823
- onPressIn: onPressIn,
4824
- onPressOut: onPressOut,
4825
- children: function children(_ref2) {
4826
- var isHovered = _ref2.isHovered,
4827
- isPressed = _ref2.isPressed,
4828
- isFocused = _ref2.isFocused;
4829
- var isCurrentHovered = isHovered || isHoveredInternal;
4830
- var isCurrentPressed = isPressed || isPressedInternal;
4831
- return /*#__PURE__*/jsxs(AnimatedScale, {
4832
- isDisabled: disabled,
4833
- isHovered: isCurrentHovered,
4834
- isPressed: isCurrentPressed,
4835
- scaleStyles: scaleStyles,
4836
- children: [/*#__PURE__*/jsx(AnimatedBackground, {
4837
- color: color,
4838
- isDisabled: disabled,
4839
- isHovered: isCurrentHovered,
4840
- isPressed: isCurrentPressed,
4841
- isFocused: isFocused || isFocusedInternal,
4842
- opacityStyles: opacityStyles
4843
- }), /*#__PURE__*/jsx(View, {
4844
- alignItems: "center",
4845
- justifyContent: "center",
4846
- children: /*#__PURE__*/jsx(TypographyIcon, {
4847
- color: disabled ? 'black-light' : color,
4848
- icon: icon
4849
- })
4850
- })]
4851
- });
4852
- }
4853
- });
4854
- }
4855
-
4856
- var OnCloseContext = /*#__PURE__*/createContext(function () {});
4857
-
4858
- var HeaderView = /*#__PURE__*/styled.View.withConfig({
4859
- displayName: "Header__HeaderView"
4860
- })(["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) {
4861
- var theme = _ref.theme;
4862
- return theme.kitt.spacing * 2;
4863
- }, function (_ref2) {
4864
- var theme = _ref2.theme;
4865
- return theme.kitt.colors.separator;
4866
- });
4867
- var LeftIconView = /*#__PURE__*/styled.View.withConfig({
4868
- displayName: "Header__LeftIconView"
4869
- })(["align-self:flex-start;margin-right:", "px;"], function (_ref3) {
4870
- var theme = _ref3.theme;
4871
- return theme.kitt.spacing * 2;
4872
- });
4873
- var RightIconView = /*#__PURE__*/styled.View.withConfig({
4874
- displayName: "Header__RightIconView"
4875
- })(["align-self:flex-start;margin-left:", "px;"], function (_ref4) {
4876
- var theme = _ref4.theme;
4877
- return theme.kitt.spacing * 2;
4878
- });
4879
- var TitleView = /*#__PURE__*/styled.View.withConfig({
4880
- displayName: "Header__TitleView"
4881
- })(["padding-left:", "px;flex-shrink:1;"], function (_ref5) {
4882
- var theme = _ref5.theme,
4883
- isIconLeft = _ref5.isIconLeft;
4884
- return isIconLeft ? 0 : theme.kitt.spacing * 2;
4885
- });
4886
- function ModalHeader(_ref6) {
4887
- var left = _ref6.left,
4888
- right = _ref6.right,
4889
- children = _ref6.children;
4890
- var onClose = useContext(OnCloseContext);
4891
- var isIconLeft = !!left;
4892
- return /*#__PURE__*/jsxs(HeaderView, {
4893
- children: [isIconLeft && /*#__PURE__*/jsx(LeftIconView, {
4894
- children: left
4895
- }), /*#__PURE__*/jsx(TitleView, {
4896
- isIconLeft: isIconLeft,
4897
- children: children
4898
- }), right !== undefined ? right : /*#__PURE__*/jsx(RightIconView, {
4899
- children: /*#__PURE__*/jsx(IconButton, {
4900
- icon: /*#__PURE__*/jsx(XIcon, {}),
4901
- onPress: onClose
4902
- })
4903
- })]
4904
- });
4905
- }
4906
-
4907
- var ModalView = /*#__PURE__*/styled.View.withConfig({
4908
- displayName: "Modal__ModalView"
4909
- })(["top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:", "px ", "px;"], function (_ref) {
4910
- var theme = _ref.theme;
4911
- return theme.kitt.spacing * 20;
4912
- }, function (_ref2) {
4913
- var theme = _ref2.theme;
4914
- return theme.kitt.spacing * 4;
4915
- });
4916
- var ContentView$1 = /*#__PURE__*/styled.View.withConfig({
4917
- displayName: "Modal__ContentView"
4918
- })(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], function (_ref3) {
4919
- var theme = _ref3.theme;
4920
- return theme.kitt.card.borderRadius;
4921
- }, function (_ref4) {
4922
- var theme = _ref4.theme;
4923
- return theme.kitt.colors.uiBackgroundLight;
4924
- });
4925
-
4926
- /**
4927
- * @deprecated This component will be deleted in a later Kitt Universal version. Use CardModal instead
4928
- */
4929
- function Modal(_ref5) {
4930
- var visible = _ref5.visible,
4931
- children = _ref5.children,
4932
- onClose = _ref5.onClose,
4933
- onEntered = _ref5.onEntered,
4934
- onExited = _ref5.onExited;
4935
- return /*#__PURE__*/jsx(OnCloseContext.Provider, {
4936
- value: onClose,
4937
- children: /*#__PURE__*/jsx(Modal$1, {
4938
- transparent: true,
4939
- animationType: "fade",
4940
- supportedOrientations: ['landscape', 'portrait'],
4941
- visible: visible,
4942
- onShow: onEntered,
4943
- onDismiss: onExited,
4944
- onRequestClose: onClose,
4945
- children: /*#__PURE__*/jsxs(ModalView, {
4946
- children: [/*#__PURE__*/jsx(Overlay, {
4947
- onPress: onClose
4948
- }), /*#__PURE__*/jsx(ContentView$1, {
4949
- children: children
4950
- })]
4951
- })
4952
- })
4953
- });
4954
- }
4955
- Modal.Header = ModalHeader;
4956
- Modal.Body = ModalBody;
4957
- Modal.Footer = ModalFooter;
4958
-
4959
- function getDatePickerDisplayMode() {
4960
- if (Platform.OS === 'android') return 'calendar';
4961
- if (Platform.OS === 'ios') return 'spinner';
4962
- return 'default';
4963
- }
4964
- function PlatformDateTimePicker(_ref) {
4965
- var value = _ref.value,
4966
- _ref$defaultDate = _ref.defaultDate,
4967
- defaultDate = _ref$defaultDate === void 0 ? new Date() : _ref$defaultDate,
4968
- maximumDate = _ref.maximumDate,
4969
- minimuDate = _ref.minimuDate,
4970
- testID = _ref.testID,
4971
- _onChange = _ref.onChange;
4972
- var theme = useTheme();
4973
- var displayMode = getDatePickerDisplayMode();
4974
- var iosProps = Platform.OS === 'ios' ? {
4975
- textColor: theme.kitt.colors.primary
4976
- } : {};
4977
- return /*#__PURE__*/jsx(DateTimePicker, _objectSpread(_objectSpread({
4978
- is24Hour: true,
4979
- testID: testID,
4980
- value: value || defaultDate,
4981
- mode: "date",
4982
- maximumDate: maximumDate,
4983
- minimumDate: minimuDate,
4984
- display: displayMode
4985
- }, iosProps), {}, {
4986
- onChange: function onChange(_event, date) {
4987
- return _onChange(date);
4988
- }
4989
- }));
4990
- }
4991
-
4992
- var _excluded$k = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
4993
- function ModalTitle(_ref) {
4994
- var children = _ref.children;
4995
- return /*#__PURE__*/jsx(Modal.Header, {
4996
- children: /*#__PURE__*/jsx(Typography.Text, {
4997
- base: "body",
4998
- variant: "bold",
4999
- children: children
5000
- })
5001
- });
5002
- }
5003
- function ModalPlatformDateTimePicker(_ref2) {
5004
- var title = _ref2.title,
5005
- isVisible = _ref2.isVisible,
5006
- value = _ref2.value,
5007
- validateButtonLabel = _ref2.validateButtonLabel,
5008
- onClose = _ref2.onClose,
5009
- onChange = _ref2.onChange,
5010
- props = _objectWithoutProperties(_ref2, _excluded$k);
5011
- var _useState = useState(value),
5012
- _useState2 = _slicedToArray(_useState, 2),
5013
- currentValue = _useState2[0],
5014
- setCurrentValue = _useState2[1];
5015
-
5016
- // Prevent unsynced value between the modal and its parent state
5017
-
5018
- return /*#__PURE__*/jsx(Modal, {
5019
- visible: Boolean(isVisible),
5020
- onClose: function handleClose() {
5021
- setCurrentValue(value);
5022
- onClose();
5023
- },
5024
- children: isVisible ? /*#__PURE__*/jsxs(Fragment, {
5025
- children: [title ? /*#__PURE__*/jsx(ModalTitle, {
5026
- children: title
5027
- }) : null, /*#__PURE__*/jsx(Modal.Body, {
5028
- children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
5029
- value: currentValue,
5030
- onChange: function handleChange(newDate) {
5031
- setCurrentValue(function (prev) {
5032
- return newDate || prev;
5033
- });
5034
- }
5035
- }))
5036
- }), /*#__PURE__*/jsx(Modal.Footer, {
5037
- children: /*#__PURE__*/jsx(Button, {
5038
- stretch: true,
5039
- type: "primary",
5040
- onPress: function handleSubmit() {
5041
- onChange(currentValue);
5042
- },
5043
- children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
5044
- children: validateButtonLabel
5045
- }) : /*#__PURE__*/jsx(FormattedMessage, {
5046
- id: "kitt-universal.ModalPlatformDateTimePicker.confirm"
5047
- })
5048
- })
5049
- })]
5050
- }) : null
5051
- });
5052
- }
5053
-
5054
- var _excluded$j = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
4744
+ var _excluded$n = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
5055
4745
  var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5056
4746
  var value = _ref.value,
5057
4747
  pickerUITestID = _ref.pickerUITestID,
@@ -5065,7 +4755,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5065
4755
  onChange = _ref.onChange,
5066
4756
  onFocus = _ref.onFocus,
5067
4757
  onBlur = _ref.onBlur,
5068
- props = _objectWithoutProperties(_ref, _excluded$j);
4758
+ props = _objectWithoutProperties(_ref, _excluded$n);
5069
4759
  var _useState = useState(isDefaultVisible),
5070
4760
  _useState2 = _slicedToArray(_useState, 2),
5071
4761
  isPickerUIVisible = _useState2[0],
@@ -5112,7 +4802,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5112
4802
  });
5113
4803
  });
5114
4804
 
5115
- var _excluded$i = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
4805
+ var _excluded$m = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
5116
4806
  var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5117
4807
  var value = _ref.value,
5118
4808
  pickerUITestID = _ref.pickerUITestID,
@@ -5120,7 +4810,7 @@ var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5120
4810
  pickerDefaultDate = _ref.pickerDefaultDate,
5121
4811
  onChange = _ref.onChange,
5122
4812
  onBlur = _ref.onBlur,
5123
- props = _objectWithoutProperties(_ref, _excluded$i);
4813
+ props = _objectWithoutProperties(_ref, _excluded$m);
5124
4814
  if (Platform.OS === 'android') {
5125
4815
  return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
5126
4816
  ref: ref,
@@ -5142,14 +4832,14 @@ var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5142
4832
  }, props));
5143
4833
  });
5144
4834
 
5145
- var _excluded$h = ["fillMode", "returnKeyType", "value", "onSubmitEditing"];
4835
+ var _excluded$l = ["fillMode", "returnKeyType", "value", "onSubmitEditing"];
5146
4836
  var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5147
4837
  var _ref$fillMode = _ref.fillMode,
5148
4838
  fillMode = _ref$fillMode === void 0 ? 'native' : _ref$fillMode,
5149
4839
  returnKeyType = _ref.returnKeyType,
5150
4840
  value = _ref.value,
5151
4841
  onSubmitEditing = _ref.onSubmitEditing,
5152
- props = _objectWithoutProperties(_ref, _excluded$h);
4842
+ props = _objectWithoutProperties(_ref, _excluded$l);
5153
4843
  // in apps, final-form can give a string value that will break the component
5154
4844
  var currentValue = value || undefined;
5155
4845
  if (fillMode === 'keyboard') {
@@ -5252,11 +4942,11 @@ function InputPressable(_ref) {
5252
4942
  return /*#__PURE__*/jsx(Pressable$2, _objectSpread({}, props));
5253
4943
  }
5254
4944
 
5255
- var _excluded$g = ["isPasswordDefaultVisible", "right"];
4945
+ var _excluded$k = ["isPasswordDefaultVisible", "right"];
5256
4946
  var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
5257
4947
  var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
5258
4948
  right = _ref.right,
5259
- props = _objectWithoutProperties(_ref, _excluded$g);
4949
+ props = _objectWithoutProperties(_ref, _excluded$k);
5260
4950
  var _useState = useState(Boolean(isPasswordDefaultVisible)),
5261
4951
  _useState2 = _slicedToArray(_useState, 2),
5262
4952
  isVisible = _useState2[0],
@@ -5284,7 +4974,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
5284
4974
  }));
5285
4975
  });
5286
4976
 
5287
- var _excluded$f = ["returnKeyType", "autoComplete", "phoneNumberLength", "value", "onChange"];
4977
+ var _excluded$j = ["returnKeyType", "autoComplete", "phoneNumberLength", "value", "onChange"];
5288
4978
  function isPhoneNumberValid(number) {
5289
4979
  return isValidNumber(number);
5290
4980
  }
@@ -5299,7 +4989,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
5299
4989
  phoneNumberLength = _ref$phoneNumberLengt === void 0 ? 10 : _ref$phoneNumberLengt,
5300
4990
  value = _ref.value,
5301
4991
  onChange = _ref.onChange,
5302
- props = _objectWithoutProperties(_ref, _excluded$f);
4992
+ props = _objectWithoutProperties(_ref, _excluded$j);
5303
4993
  var _useState = useState(value),
5304
4994
  _useState2 = _slicedToArray(_useState, 2),
5305
4995
  currentValue = _useState2[0],
@@ -5347,46 +5037,29 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
5347
5037
  var getTypographyColor = function (type) {
5348
5038
  return type ? 'white' : 'black';
5349
5039
  };
5350
- var InputTagContainer = /*#__PURE__*/styled(View$2).withConfig({
5351
- displayName: "InputTag__InputTagContainer"
5352
- })(["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) {
5353
- var theme = _ref.theme;
5354
- return theme.kitt.spacing * 2;
5355
- }, function (_ref2) {
5356
- var theme = _ref2.theme,
5357
- type = _ref2.type;
5358
- if (type === 'success') {
5359
- return theme.kitt.forms.inputTag.success.backgroundColor;
5360
- }
5361
- if (type === 'danger') {
5362
- return theme.kitt.forms.inputTag.danger.backgroundColor;
5363
- }
5364
- return theme.kitt.forms.inputTag["default"].backgroundColor;
5365
- }, function (_ref3) {
5366
- var theme = _ref3.theme;
5367
- return theme.kitt.forms.inputTag.borderRadius;
5368
- });
5369
- var IconContainer = /*#__PURE__*/styled(View$2).withConfig({
5370
- displayName: "InputTag__IconContainer"
5371
- })(["margin-right:", "px;"], function (_ref4) {
5372
- var theme = _ref4.theme;
5373
- return theme.kitt.spacing;
5374
- });
5375
- function InputTag(_ref5) {
5376
- var children = _ref5.children,
5377
- type = _ref5.type,
5378
- icon = _ref5.icon;
5040
+ function InputTag(_ref) {
5041
+ var children = _ref.children,
5042
+ type = _ref.type,
5043
+ icon = _ref.icon;
5379
5044
  var typographyColor = getTypographyColor(type);
5380
5045
  var theme = useTheme();
5381
- return /*#__PURE__*/jsxs(InputTagContainer, {
5382
- type: type,
5383
- children: [icon && /*#__PURE__*/jsx(IconContainer, {
5046
+ return /*#__PURE__*/jsxs(View, {
5047
+ alignItems: "center",
5048
+ justifyContent: "center",
5049
+ flexDirection: "row",
5050
+ alignSelf: "flex-start",
5051
+ overflow: "hidden",
5052
+ paddingX: "kitt.2",
5053
+ backgroundColor: "kitt.forms.inputTag.".concat(type || 'default', ".backgroundColor"),
5054
+ borderRadius: "kitt.forms.inputTag.borderRadius",
5055
+ children: [icon ? /*#__PURE__*/jsx(View, {
5056
+ marginRight: "kitt.1",
5384
5057
  children: /*#__PURE__*/jsx(TypographyIcon, {
5385
5058
  icon: icon,
5386
5059
  size: theme.kitt.forms.inputTag.iconSize,
5387
5060
  color: typographyColor
5388
5061
  })
5389
- }), /*#__PURE__*/jsx(Typography.Text, {
5062
+ }) : null, /*#__PURE__*/jsx(Typography.Text, {
5390
5063
  base: "body-small",
5391
5064
  color: typographyColor,
5392
5065
  children: children
@@ -5438,7 +5111,7 @@ function InnerCircle(_ref) {
5438
5111
  });
5439
5112
  }
5440
5113
 
5441
- function getBackgroundColor(_ref) {
5114
+ function getBackgroundColor$1(_ref) {
5442
5115
  var isDisabled = _ref.isDisabled,
5443
5116
  isPressed = _ref.isPressed,
5444
5117
  isHovered = _ref.isHovered,
@@ -5481,7 +5154,7 @@ function OuterCircle(_ref) {
5481
5154
  width: "kitt.forms.radio.size",
5482
5155
  height: "kitt.forms.radio.size",
5483
5156
  borderRadius: "kitt.forms.radio.borderRadius",
5484
- backgroundColor: getBackgroundColor({
5157
+ backgroundColor: getBackgroundColor$1({
5485
5158
  isChecked: isChecked,
5486
5159
  isDisabled: isDisabled,
5487
5160
  isFocused: isFocused,
@@ -5561,49 +5234,22 @@ var Radio = /*#__PURE__*/forwardRef(function (_ref, ref) {
5561
5234
  });
5562
5235
  });
5563
5236
 
5564
- var StyledAnimatedView = /*#__PURE__*/styled(Animated.View).withConfig({
5565
- displayName: "AnimatedContainer__StyledAnimatedView"
5566
- })(["border-width:", "px;border-top-left-radius:", "px;border-bottom-left-radius:", "px;border-top-right-radius:", "px;border-bottom-right-radius:", "px;border-left-width:", "px;"], function (_ref) {
5567
- var theme = _ref.theme;
5568
- return theme.kitt.forms.radioButtonGroup.item.borderWidth;
5569
- }, function (_ref2) {
5570
- var theme = _ref2.theme,
5571
- $isFirst = _ref2.$isFirst;
5572
- return $isFirst ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0;
5573
- }, function (_ref3) {
5574
- var theme = _ref3.theme,
5575
- $isFirst = _ref3.$isFirst;
5576
- return $isFirst ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0;
5577
- }, function (_ref4) {
5578
- var theme = _ref4.theme,
5579
- $isLast = _ref4.$isLast;
5580
- return $isLast ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0;
5581
- }, function (_ref5) {
5582
- var theme = _ref5.theme,
5583
- $isLast = _ref5.$isLast;
5584
- return $isLast ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0;
5585
- }, function (_ref6) {
5586
- var theme = _ref6.theme,
5587
- $isFirst = _ref6.$isFirst;
5588
- return $isFirst ? theme.kitt.forms.radioButtonGroup.item.borderWidth : 0;
5589
- });
5590
- function AnimatedContainer(_ref7) {
5591
- var children = _ref7.children,
5592
- isFocused = _ref7.isFocused,
5593
- isPressed = _ref7.isPressed,
5594
- isSelected = _ref7.isSelected,
5595
- isDisabled = _ref7.isDisabled,
5596
- isFirst = _ref7.isFirst,
5597
- isLast = _ref7.isLast,
5598
- animatedStyles = _ref7.animatedStyles;
5599
- return /*#__PURE__*/jsx(StyledAnimatedView, {
5600
- style: [animatedStyles],
5601
- $isFocused: isFocused,
5602
- $isPressed: isPressed,
5603
- $isSelected: isSelected,
5604
- $isDisabled: isDisabled,
5605
- $isFirst: isFirst,
5606
- $isLast: isLast,
5237
+ function AnimatedContainer(_ref) {
5238
+ var children = _ref.children,
5239
+ isFirst = _ref.isFirst,
5240
+ isLast = _ref.isLast,
5241
+ animatedStyles = _ref.animatedStyles;
5242
+ var sx = useSx();
5243
+ var styles = sx({
5244
+ borderWidth: 'kitt.forms.radioButtonGroup.item.borderWidth',
5245
+ borderTopLeftRadius: isFirst ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
5246
+ borderBottomLeftRadius: isFirst ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
5247
+ borderTopRightRadius: isLast ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
5248
+ borderBottomRightRadius: isLast ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
5249
+ borderLeftWidth: isFirst ? 'kitt.forms.radioButtonGroup.item.borderWidth' : 0
5250
+ });
5251
+ return /*#__PURE__*/jsx(Animated.View, {
5252
+ style: [styles, animatedStyles],
5607
5253
  children: children
5608
5254
  });
5609
5255
  }
@@ -5641,7 +5287,7 @@ function HoverBorder(_ref) {
5641
5287
  });
5642
5288
  }
5643
5289
 
5644
- var useNativeAnimation = function (_ref) {
5290
+ var useNativeAnimation$1 = function (_ref) {
5645
5291
  var isDisabled = _ref.isDisabled,
5646
5292
  isSelected = _ref.isSelected,
5647
5293
  isPressedInternal = _ref.isPressedInternal;
@@ -5745,7 +5391,7 @@ function RadioButton(_ref) {
5745
5391
  onChange = _ref.onChange,
5746
5392
  onFocus = _ref.onFocus,
5747
5393
  onBlur = _ref.onBlur;
5748
- var _useNativeAnimation = useNativeAnimation({
5394
+ var _useNativeAnimation = useNativeAnimation$1({
5749
5395
  isDisabled: disabled,
5750
5396
  isSelected: selected,
5751
5397
  isPressedInternal: isPressedInternal
@@ -5808,7 +5454,7 @@ function RadioButton(_ref) {
5808
5454
  });
5809
5455
  }
5810
5456
 
5811
- var _excluded$e = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
5457
+ var _excluded$i = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
5812
5458
  function RadioButtonGroupItem(_ref) {
5813
5459
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
5814
5460
  return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
@@ -5821,7 +5467,7 @@ function RadioButtonGroup(_ref2) {
5821
5467
  onFocus = _ref2.onFocus,
5822
5468
  onBlur = _ref2.onBlur,
5823
5469
  onChange = _ref2.onChange,
5824
- props = _objectWithoutProperties(_ref2, _excluded$e);
5470
+ props = _objectWithoutProperties(_ref2, _excluded$i);
5825
5471
  var _useState = useState(value),
5826
5472
  _useState2 = _slicedToArray(_useState, 2),
5827
5473
  currentValue = _useState2[0],
@@ -5863,13 +5509,13 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
5863
5509
  }, props));
5864
5510
  });
5865
5511
 
5866
- var _excluded$d = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
5512
+ var _excluded$h = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
5867
5513
  function FullscreenModalBody(_ref) {
5868
5514
  var children = _ref.children,
5869
5515
  shouldHandleBottomNotch = _ref.shouldHandleBottomNotch,
5870
5516
  style = _ref.style,
5871
5517
  shouldHandleTopNotch = _ref.shouldHandleTopNotch,
5872
- props = _objectWithoutProperties(_ref, _excluded$d);
5518
+ props = _objectWithoutProperties(_ref, _excluded$h);
5873
5519
  var _useSafeAreaInsets = useSafeAreaInsets(),
5874
5520
  bottom = _useSafeAreaInsets.bottom,
5875
5521
  top = _useSafeAreaInsets.top;
@@ -5886,14 +5532,14 @@ function FullscreenModalBody(_ref) {
5886
5532
  }));
5887
5533
  }
5888
5534
 
5889
- var _excluded$c = ["shouldHandleBottomNotch", "hasSeparator", "children"];
5535
+ var _excluded$g = ["shouldHandleBottomNotch", "hasSeparator", "children"];
5890
5536
  function FullscreenModalFooter(_ref) {
5891
5537
  var _ref$shouldHandleBott = _ref.shouldHandleBottomNotch,
5892
5538
  shouldHandleBottomNotch = _ref$shouldHandleBott === void 0 ? true : _ref$shouldHandleBott,
5893
5539
  _ref$hasSeparator = _ref.hasSeparator,
5894
5540
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
5895
5541
  children = _ref.children,
5896
- props = _objectWithoutProperties(_ref, _excluded$c);
5542
+ props = _objectWithoutProperties(_ref, _excluded$g);
5897
5543
  var _useSafeAreaInsets = useSafeAreaInsets(),
5898
5544
  bottom = _useSafeAreaInsets.bottom;
5899
5545
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
@@ -6075,7 +5721,7 @@ function FullscreenModalAnimation(_ref) {
6075
5721
  if (onExit) onExit();
6076
5722
  setIsContentVisible(false);
6077
5723
  }, [visible, isContentVisible, onExit]);
6078
- return /*#__PURE__*/jsx(Modal$1, {
5724
+ return /*#__PURE__*/jsx(Modal, {
6079
5725
  transparent: true,
6080
5726
  supportedOrientations: ['landscape', 'portrait'],
6081
5727
  visible: isModalVisible,
@@ -6109,13 +5755,13 @@ function FullscreenModalAnimation(_ref) {
6109
5755
  });
6110
5756
  }
6111
5757
 
6112
- var _excluded$b = ["children", "visible", "onClose", "onExited"];
5758
+ var _excluded$f = ["children", "visible", "onClose", "onExited"];
6113
5759
  function FullscreenModalBehaviour(_ref) {
6114
5760
  var children = _ref.children,
6115
5761
  visible = _ref.visible,
6116
5762
  onClose = _ref.onClose,
6117
5763
  onExited = _ref.onExited,
6118
- props = _objectWithoutProperties(_ref, _excluded$b);
5764
+ props = _objectWithoutProperties(_ref, _excluded$f);
6119
5765
  var _useState = useState(visible),
6120
5766
  _useState2 = _slicedToArray(_useState, 2),
6121
5767
  isModalBehaviourVisible = _useState2[0],
@@ -6159,7 +5805,7 @@ function FullscreenModalContainer(_ref) {
6159
5805
  });
6160
5806
  }
6161
5807
 
6162
- var _excluded$a = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
5808
+ var _excluded$e = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
6163
5809
  function FullscreenModalHeader(_ref) {
6164
5810
  var _ref$hasSeparator = _ref.hasSeparator,
6165
5811
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
@@ -6170,7 +5816,7 @@ function FullscreenModalHeader(_ref) {
6170
5816
  left = _ref.left,
6171
5817
  _ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
6172
5818
  shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
6173
- props = _objectWithoutProperties(_ref, _excluded$a);
5819
+ props = _objectWithoutProperties(_ref, _excluded$e);
6174
5820
  var _useSafeAreaInsets = useSafeAreaInsets(),
6175
5821
  top = _useSafeAreaInsets.top;
6176
5822
  var hasRight = Boolean(right);
@@ -6241,20 +5887,229 @@ function FullscreenModal(_ref) {
6241
5887
  })]
6242
5888
  });
6243
5889
  }
6244
- FullscreenModal.Header = FullscreenModalHeader;
6245
- FullscreenModal.Footer = FullscreenModalFooter;
6246
- FullscreenModal.Body = FullscreenModalBody;
6247
- FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
5890
+ FullscreenModal.Header = FullscreenModalHeader;
5891
+ FullscreenModal.Footer = FullscreenModalFooter;
5892
+ FullscreenModal.Body = FullscreenModalBody;
5893
+ FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
5894
+
5895
+ function Highlight(_ref) {
5896
+ var _ref$variant = _ref.variant,
5897
+ variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
5898
+ children = _ref.children;
5899
+ return /*#__PURE__*/jsx(View, {
5900
+ borderRadius: "kitt.highlight.borderRadius",
5901
+ padding: "kitt.highlight.padding",
5902
+ backgroundColor: "kitt.highlight.".concat(variant, ".backgroundColor"),
5903
+ children: children
5904
+ });
5905
+ }
5906
+
5907
+ var _excluded$d = ["color", "isDisabled"];
5908
+ function getBackgroundColor(color, isDisabled) {
5909
+ if (isDisabled) {
5910
+ return 'kitt.iconButton.disabled.backgroundColor';
5911
+ }
5912
+ switch (color) {
5913
+ case 'primary':
5914
+ return 'kitt.iconButton.primary.pressed.backgroundColor';
5915
+ case 'white':
5916
+ return 'kitt.iconButton.white.pressed.backgroundColor';
5917
+ case 'black':
5918
+ default:
5919
+ return 'kitt.iconButton.black.pressed.backgroundColor';
5920
+ }
5921
+ }
5922
+ function Background(_ref) {
5923
+ var color = _ref.color,
5924
+ isDisabled = _ref.isDisabled,
5925
+ props = _objectWithoutProperties(_ref, _excluded$d);
5926
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
5927
+ width: "100%",
5928
+ height: "100%",
5929
+ borderRadius: "kitt.iconButton.borderRadius",
5930
+ backgroundColor: getBackgroundColor(color, isDisabled)
5931
+ }));
5932
+ }
5933
+
5934
+ function AnimatedBackground(_ref) {
5935
+ var color = _ref.color,
5936
+ isDisabled = _ref.isDisabled,
5937
+ opacityStyles = _ref.opacityStyles;
5938
+ var sx = useSx();
5939
+ var currentOpacityStyles = isDisabled ? {
5940
+ opacity: 1
5941
+ } : opacityStyles;
5942
+ var styles = sx({
5943
+ position: 'absolute',
5944
+ top: 0,
5945
+ left: 0,
5946
+ width: '100%',
5947
+ height: '100%'
5948
+ });
5949
+ return /*#__PURE__*/jsx(Animated.View, {
5950
+ style: [styles, currentOpacityStyles],
5951
+ children: /*#__PURE__*/jsx(Background, {
5952
+ color: color,
5953
+ isDisabled: isDisabled
5954
+ })
5955
+ });
5956
+ }
5957
+
5958
+ function AnimatedScale(_ref) {
5959
+ var isDisabled = _ref.isDisabled,
5960
+ scaleStyles = _ref.scaleStyles,
5961
+ children = _ref.children;
5962
+ var sx = useSx();
5963
+ var currentOpacityStyles = isDisabled ? {
5964
+ transform: [{
5965
+ scale: 1
5966
+ }]
5967
+ } : scaleStyles;
5968
+ var styles = sx({
5969
+ position: 'relative',
5970
+ alignItems: 'center',
5971
+ justifyContent: 'center',
5972
+ width: '100%',
5973
+ height: '100%'
5974
+ });
5975
+ return /*#__PURE__*/jsx(Animated.View, {
5976
+ style: [styles, currentOpacityStyles],
5977
+ children: children
5978
+ });
5979
+ }
5980
+
5981
+ function useNativeAnimation(_ref) {
5982
+ var isPressed = _ref.isPressed;
5983
+ var theme = useTheme();
5984
+ var pressed = useSharedValue(!!isPressed);
5985
+ var opacityStyles = useAnimatedStyle(function () {
5986
+ var _f = function () {
5987
+ return {
5988
+ opacity: withSpring(pressed.value ? 1 : 0)
5989
+ };
5990
+ };
5991
+ _f._closure = {
5992
+ withSpring: withSpring,
5993
+ pressed: pressed
5994
+ };
5995
+ _f.asString = "function _f(){const{withSpring,pressed}=jsThis._closure;{return{opacity:withSpring(pressed.value?1:0)};}}";
5996
+ _f.__workletHash = 10645190329247;
5997
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/hooks/useNativeAnimation.ts (24:41)";
5998
+ _f.__optimalization = 2;
5999
+ return _f;
6000
+ }());
6001
+ var scaleStyles = useAnimatedStyle(function () {
6002
+ var _f = function () {
6003
+ return {
6004
+ transform: [{
6005
+ scale: withSpring(pressed.value ? theme.kitt.iconButton.scale.base.active : theme.kitt.iconButton.scale.base["default"])
6006
+ }]
6007
+ };
6008
+ };
6009
+ _f._closure = {
6010
+ withSpring: withSpring,
6011
+ pressed: pressed,
6012
+ theme: {
6013
+ kitt: {
6014
+ iconButton: {
6015
+ scale: {
6016
+ base: {
6017
+ active: theme.kitt.iconButton.scale.base.active,
6018
+ "default": theme.kitt.iconButton.scale.base["default"]
6019
+ }
6020
+ }
6021
+ }
6022
+ }
6023
+ }
6024
+ };
6025
+ _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)}]};}}";
6026
+ _f.__workletHash = 13861998831411;
6027
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/IconButton/hooks/useNativeAnimation.ts (30:39)";
6028
+ _f.__optimalization = 2;
6029
+ return _f;
6030
+ }());
6031
+ return {
6032
+ opacityStyles: opacityStyles,
6033
+ scaleStyles: scaleStyles,
6034
+ onPressIn: function handlePressIn() {
6035
+ pressed.value = true;
6036
+ },
6037
+ onPressOut: function handlePressOut() {
6038
+ pressed.value = false;
6039
+ }
6040
+ };
6041
+ }
6248
6042
 
6249
- function Highlight(_ref) {
6250
- var _ref$variant = _ref.variant,
6251
- variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
6252
- children = _ref.children;
6253
- return /*#__PURE__*/jsx(View, {
6254
- borderRadius: "kitt.highlight.borderRadius",
6255
- padding: "kitt.highlight.padding",
6256
- backgroundColor: "kitt.highlight.".concat(variant, ".backgroundColor"),
6257
- children: children
6043
+ function IconButton(_ref) {
6044
+ var icon = _ref.icon,
6045
+ _ref$color = _ref.color,
6046
+ color = _ref$color === void 0 ? 'black' : _ref$color,
6047
+ disabled = _ref.disabled,
6048
+ testID = _ref.testID,
6049
+ accessibilityLabel = _ref.accessibilityLabel,
6050
+ _ref$accessibilityRol = _ref.accessibilityRole,
6051
+ accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
6052
+ isHoveredInternal = _ref.isHoveredInternal,
6053
+ isPressedInternal = _ref.isPressedInternal,
6054
+ isFocusedInternal = _ref.isFocusedInternal,
6055
+ onPress = _ref.onPress;
6056
+ var _useNativeAnimation = useNativeAnimation({
6057
+ isDisabled: disabled,
6058
+ isPressed: isPressedInternal
6059
+ }),
6060
+ onPressIn = _useNativeAnimation.onPressIn,
6061
+ onPressOut = _useNativeAnimation.onPressOut,
6062
+ opacityStyles = _useNativeAnimation.opacityStyles,
6063
+ scaleStyles = _useNativeAnimation.scaleStyles;
6064
+ return /*#__PURE__*/jsx(Pressable, {
6065
+ testID: testID,
6066
+ disabled: disabled,
6067
+ width: "kitt.iconButton.width",
6068
+ height: "kitt.iconButton.height",
6069
+ accessibilityLabel: accessibilityLabel,
6070
+ accessibilityRole: accessibilityRole,
6071
+ _web: {
6072
+ style: {
6073
+ backfaceVisibility: 'hidden',
6074
+ transform: [{
6075
+ translate3d: '0'
6076
+ }]
6077
+ }
6078
+ },
6079
+ borderRadius: "kitt.iconButton.borderRadius",
6080
+ borderColor: disabled ? 'kitt.iconButton.disabled.borderColor' : 'kitt.iconButton.borderColor',
6081
+ borderWidth: disabled ? 'kitt.iconButton.borderWidth' : 0,
6082
+ onPress: onPress,
6083
+ onPressIn: onPressIn,
6084
+ onPressOut: onPressOut,
6085
+ children: function children(_ref2) {
6086
+ var isHovered = _ref2.isHovered,
6087
+ isPressed = _ref2.isPressed,
6088
+ isFocused = _ref2.isFocused;
6089
+ var isCurrentHovered = isHovered || isHoveredInternal;
6090
+ var isCurrentPressed = isPressed || isPressedInternal;
6091
+ return /*#__PURE__*/jsxs(AnimatedScale, {
6092
+ isDisabled: disabled,
6093
+ isHovered: isCurrentHovered,
6094
+ isPressed: isCurrentPressed,
6095
+ scaleStyles: scaleStyles,
6096
+ children: [/*#__PURE__*/jsx(AnimatedBackground, {
6097
+ color: color,
6098
+ isDisabled: disabled,
6099
+ isHovered: isCurrentHovered,
6100
+ isPressed: isCurrentPressed,
6101
+ isFocused: isFocused || isFocusedInternal,
6102
+ opacityStyles: opacityStyles
6103
+ }), /*#__PURE__*/jsx(View, {
6104
+ alignItems: "center",
6105
+ justifyContent: "center",
6106
+ children: /*#__PURE__*/jsx(TypographyIcon, {
6107
+ color: disabled ? 'black-light' : color,
6108
+ icon: icon
6109
+ })
6110
+ })]
6111
+ });
6112
+ }
6258
6113
  });
6259
6114
  }
6260
6115
 
@@ -6283,98 +6138,57 @@ function useKittMapConfig() {
6283
6138
  return context;
6284
6139
  }
6285
6140
 
6286
- var _excluded$9 = ["children"];
6287
- var ContentView = /*#__PURE__*/styled.View.withConfig({
6288
- displayName: "ListItemContent__ContentView"
6289
- })(["flex:1 0 0%;align-self:center;"]);
6141
+ var _excluded$c = ["children"];
6290
6142
  function ListItemContent(_ref) {
6291
6143
  var children = _ref.children,
6292
- rest = _objectWithoutProperties(_ref, _excluded$9);
6293
- return /*#__PURE__*/jsx(ContentView, _objectSpread(_objectSpread({}, rest), {}, {
6144
+ rest = _objectWithoutProperties(_ref, _excluded$c);
6145
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
6146
+ alignSelf: "center",
6147
+ flexBasis: "0%",
6148
+ flexGrow: 1,
6149
+ flexShrink: 0
6150
+ }, rest), {}, {
6294
6151
  children: children
6295
6152
  }));
6296
6153
  }
6297
6154
 
6298
- var _excluded$8 = ["children", "side"],
6155
+ var _excluded$b = ["children", "side"],
6299
6156
  _excluded2$2 = ["children", "align"];
6300
- var SideContainerView = /*#__PURE__*/styled.View.withConfig({
6301
- displayName: "ListItemSideContent__SideContainerView"
6302
- })(["flex-direction:row;margin-left:", ";margin-right:", ";"], function (_ref) {
6303
- var theme = _ref.theme,
6304
- side = _ref.side;
6305
- return side === 'right' ? "".concat(theme.kitt.listItem.innerMargin, "px") : 0;
6306
- }, function (_ref2) {
6307
- var theme = _ref2.theme,
6308
- side = _ref2.side;
6309
- return side === 'left' ? "".concat(theme.kitt.listItem.innerMargin, "px") : 0;
6310
- });
6311
-
6312
6157
  // Handles the vertical alignment of the side elements of the list item
6313
- function ListItemSideContainer(_ref3) {
6314
- var children = _ref3.children,
6315
- _ref3$side = _ref3.side,
6316
- side = _ref3$side === void 0 ? 'left' : _ref3$side,
6317
- rest = _objectWithoutProperties(_ref3, _excluded$8);
6318
- return /*#__PURE__*/jsx(SideContainerView, _objectSpread(_objectSpread({
6319
- side: side
6158
+ function ListItemSideContainer(_ref) {
6159
+ var children = _ref.children,
6160
+ _ref$side = _ref.side,
6161
+ side = _ref$side === void 0 ? 'left' : _ref$side,
6162
+ rest = _objectWithoutProperties(_ref, _excluded$b);
6163
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
6164
+ flexDirection: "row",
6165
+ marginLeft: side === 'right' ? 'kitt.2' : undefined,
6166
+ marginRight: side === 'left' ? 'kitt.2' : undefined
6320
6167
  }, rest), {}, {
6321
6168
  children: children
6322
6169
  }));
6323
6170
  }
6324
- var SideContentView = /*#__PURE__*/styled.View.withConfig({
6325
- displayName: "ListItemSideContent__SideContentView"
6326
- })(["align-self:", ";"], function (_ref4) {
6327
- var align = _ref4.align;
6328
- return align;
6329
- });
6330
- function ListItemSideContent(_ref5) {
6331
- var children = _ref5.children,
6332
- _ref5$align = _ref5.align,
6333
- align = _ref5$align === void 0 ? 'auto' : _ref5$align,
6334
- rest = _objectWithoutProperties(_ref5, _excluded2$2);
6335
- return /*#__PURE__*/jsx(SideContentView, _objectSpread(_objectSpread({
6336
- align: align
6171
+ function ListItemSideContent(_ref2) {
6172
+ var children = _ref2.children,
6173
+ _ref2$align = _ref2.align,
6174
+ align = _ref2$align === void 0 ? 'auto' : _ref2$align,
6175
+ rest = _objectWithoutProperties(_ref2, _excluded2$2);
6176
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
6177
+ alignSelf: align
6337
6178
  }, rest), {}, {
6338
6179
  children: children
6339
6180
  }));
6340
6181
  }
6341
6182
 
6342
- var _excluded$7 = ["children", "withPadding", "borders", "left", "right", "onPress"];
6343
- var ContainerView = /*#__PURE__*/styled.View.withConfig({
6344
- displayName: "ListItem__ContainerView"
6345
- })(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], function (_ref) {
6346
- var withPadding = _ref.withPadding,
6347
- theme = _ref.theme;
6348
- return withPadding ? theme.kitt.listItem.padding : 0;
6349
- }, function (_ref2) {
6350
- var theme = _ref2.theme,
6351
- borders = _ref2.borders;
6352
- var borderWidth = theme.kitt.listItem.borderWidth;
6353
- if (borders === 'top') {
6354
- return "border-top-width: ".concat(borderWidth, "px");
6355
- }
6356
- if (borders === 'bottom') {
6357
- return "border-bottom-width: ".concat(borderWidth, "px");
6358
- }
6359
- if (borders === 'both') {
6360
- return css(["border-top-width:", "px;border-bottom-width:", "px;"], borderWidth, borderWidth);
6361
- }
6362
- return 'border: none';
6363
- }, function (_ref3) {
6364
- var theme = _ref3.theme;
6365
- return theme.kitt.listItem.borderColor;
6366
- }, function (_ref4) {
6367
- var theme = _ref4.theme;
6368
- return theme.kitt.colors.uiBackgroundLight;
6369
- });
6370
- function ListItem(_ref5) {
6371
- var children = _ref5.children,
6372
- withPadding = _ref5.withPadding,
6373
- borders = _ref5.borders,
6374
- left = _ref5.left,
6375
- right = _ref5.right,
6376
- onPress = _ref5.onPress,
6377
- rest = _objectWithoutProperties(_ref5, _excluded$7);
6183
+ var _excluded$a = ["children", "withPadding", "borders", "left", "right", "onPress"];
6184
+ function ListItem(_ref) {
6185
+ var children = _ref.children,
6186
+ withPadding = _ref.withPadding,
6187
+ borders = _ref.borders,
6188
+ left = _ref.left,
6189
+ right = _ref.right,
6190
+ onPress = _ref.onPress,
6191
+ rest = _objectWithoutProperties(_ref, _excluded$a);
6378
6192
  var Wrapper = onPress ? Pressable$2 : Fragment$1;
6379
6193
  var wrapperProps = onPress ? _objectSpread({
6380
6194
  accessibilityRole: 'button',
@@ -6382,9 +6196,14 @@ function ListItem(_ref5) {
6382
6196
  }, rest) : undefined;
6383
6197
  var containerProps = onPress ? undefined : rest;
6384
6198
  return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
6385
- children: /*#__PURE__*/jsxs(ContainerView, _objectSpread(_objectSpread({
6386
- withPadding: withPadding,
6387
- borders: borders
6199
+ children: /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
6200
+ flexDirection: "row",
6201
+ paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
6202
+ paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
6203
+ borderColor: "kitt.listItem.borderColor",
6204
+ backgroundColor: "kitt.uiBackgroundLight",
6205
+ borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
6206
+ borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined
6388
6207
  }, containerProps), {}, {
6389
6208
  children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
6390
6209
  side: "left",
@@ -6912,6 +6731,71 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
6912
6731
  'subtle-dark': theme.button['subtle-dark'],
6913
6732
  disabled: theme.button.disabled
6914
6733
  },
6734
+ choices: {
6735
+ item: {
6736
+ "default": {
6737
+ backgroundColor: theme.choices.item.backgroundColor["default"]
6738
+ },
6739
+ disabled: {
6740
+ backgroundColor: theme.choices.item.backgroundColor.disabled,
6741
+ borderColor: theme.choices.item.disabled.border.color
6742
+ },
6743
+ selected: {
6744
+ backgroundColor: theme.choices.item.backgroundColor.selected
6745
+ },
6746
+ pressed: {
6747
+ backgroundColor: theme.choices.item.backgroundColor.pressed
6748
+ },
6749
+ hover: {
6750
+ backgroundColor: theme.choices.item.backgroundColor.hover
6751
+ },
6752
+ hoverWhenSelected: {
6753
+ backgroundColor: theme.choices.item.backgroundColor.hoverWhenSelected
6754
+ }
6755
+ }
6756
+ },
6757
+ tag: {
6758
+ primary: {
6759
+ fill: {
6760
+ backgroundColor: theme.tag.primary.fill.backgroundColor,
6761
+ borderColor: theme.tag.primary.fill.borderColor
6762
+ },
6763
+ outline: {
6764
+ backgroundColor: theme.tag.primary.outline.backgroundColor,
6765
+ borderColor: theme.tag.primary.outline.borderColor
6766
+ }
6767
+ },
6768
+ "default": {
6769
+ fill: {
6770
+ backgroundColor: theme.tag["default"].fill.backgroundColor,
6771
+ borderColor: theme.tag["default"].fill.borderColor
6772
+ },
6773
+ outline: {
6774
+ backgroundColor: theme.tag["default"].outline.backgroundColor,
6775
+ borderColor: theme.tag["default"].outline.borderColor
6776
+ }
6777
+ },
6778
+ danger: {
6779
+ fill: {
6780
+ backgroundColor: theme.tag.danger.fill.backgroundColor,
6781
+ borderColor: theme.tag.danger.fill.borderColor
6782
+ },
6783
+ outline: {
6784
+ backgroundColor: theme.tag.danger.outline.backgroundColor,
6785
+ borderColor: theme.tag.danger.outline.borderColor
6786
+ }
6787
+ },
6788
+ warn: {
6789
+ fill: {
6790
+ backgroundColor: theme.tag.warn.fill.backgroundColor,
6791
+ borderColor: theme.tag.warn.fill.borderColor
6792
+ },
6793
+ outline: {
6794
+ backgroundColor: theme.tag.warn.outline.backgroundColor,
6795
+ borderColor: theme.tag.warn.outline.borderColor
6796
+ }
6797
+ }
6798
+ },
6915
6799
  tooltip: {
6916
6800
  backgroundColor: theme.tooltip.backgroundColor
6917
6801
  },
@@ -6935,6 +6819,17 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
6935
6819
  input: {
6936
6820
  states: theme.forms.input.states
6937
6821
  },
6822
+ inputTag: {
6823
+ danger: {
6824
+ backgroundColor: theme.forms.inputTag.danger.backgroundColor
6825
+ },
6826
+ "default": {
6827
+ backgroundColor: theme.forms.inputTag["default"].backgroundColor
6828
+ },
6829
+ success: {
6830
+ backgroundColor: theme.forms.inputTag.success.backgroundColor
6831
+ }
6832
+ },
6938
6833
  radioButtonGroup: {
6939
6834
  item: {
6940
6835
  borderColor: theme.forms.radioButtonGroup.item.borderColor,
@@ -7033,6 +6928,49 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7033
6928
  dark: {
7034
6929
  backgroundColor: theme.highlight.dark.backgroundColor
7035
6930
  }
6931
+ },
6932
+ verticalSteps: {
6933
+ active: {
6934
+ icon: {
6935
+ backgroundColor: theme.verticalSteps.active.icon.backgroundColor,
6936
+ textColor: theme.verticalSteps.active.icon.textColor
6937
+ }
6938
+ },
6939
+ done: {
6940
+ icon: {
6941
+ backgroundColor: theme.verticalSteps.done.icon.backgroundColor,
6942
+ textColor: theme.verticalSteps.done.icon.textColor
6943
+ }
6944
+ },
6945
+ "default": {
6946
+ icon: {
6947
+ backgroundColor: theme.verticalSteps["default"].icon.backgroundColor,
6948
+ textColor: theme.verticalSteps["default"].icon.textColor
6949
+ }
6950
+ }
6951
+ },
6952
+ listItem: {
6953
+ borderColor: theme.listItem.borderColor
6954
+ },
6955
+ picker: {
6956
+ ios: {
6957
+ item: {
6958
+ selected: {
6959
+ color: theme.picker.ios.selected.color
6960
+ }
6961
+ }
6962
+ },
6963
+ android: {
6964
+ item: {
6965
+ "default": {
6966
+ backgroundColor: theme.picker.android["default"].backgroundColor
6967
+ },
6968
+ selected: {
6969
+ color: theme.picker.android.selected.color,
6970
+ backgroundColor: theme.picker.android.selected.backgroundColor
6971
+ }
6972
+ }
6973
+ }
7036
6974
  }
7037
6975
  }),
7038
6976
  app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.colors
@@ -7067,6 +7005,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7067
7005
  cardModal: {
7068
7006
  borderRadius: theme.cardModal.borderRadius
7069
7007
  },
7008
+ choices: {
7009
+ item: {
7010
+ borderRadius: theme.choices.item.borderRadius
7011
+ }
7012
+ },
7070
7013
  dialogModal: {
7071
7014
  borderRadius: theme.dialogModal.borderRadius
7072
7015
  },
@@ -7074,6 +7017,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7074
7017
  input: {
7075
7018
  borderRadius: theme.forms.input.borderRadius
7076
7019
  },
7020
+ inputTag: {
7021
+ borderRadius: theme.forms.inputTag.borderRadius
7022
+ },
7077
7023
  radioButtonGroup: {
7078
7024
  item: {
7079
7025
  borderRadius: theme.forms.radioButtonGroup.item.borderRadius
@@ -7095,6 +7041,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7095
7041
  iconButton: {
7096
7042
  borderRadius: theme.iconButton.borderRadius
7097
7043
  },
7044
+ tag: {
7045
+ borderRadius: theme.tag.borderRadius
7046
+ },
7098
7047
  tooltip: {
7099
7048
  borderRadius: theme.tooltip.borderRadius
7100
7049
  },
@@ -7206,6 +7155,13 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7206
7155
  button: {
7207
7156
  borderWidth: theme.button.borderWidth
7208
7157
  },
7158
+ choices: {
7159
+ item: {
7160
+ disabled: {
7161
+ borderWidth: theme.choices.item.disabled.border.width
7162
+ }
7163
+ }
7164
+ },
7209
7165
  iconButton: {
7210
7166
  borderWidth: theme.iconButton.borderWidth
7211
7167
  },
@@ -7232,6 +7188,43 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7232
7188
  footer: {
7233
7189
  borderWidth: theme.cardModal.footer.borderWidth
7234
7190
  }
7191
+ },
7192
+ listItem: {
7193
+ borderWidth: theme.listItem.borderWidth
7194
+ },
7195
+ tag: {
7196
+ primary: {
7197
+ fill: {
7198
+ borderWidth: theme.tag.primary.fill.borderWidth
7199
+ },
7200
+ outline: {
7201
+ borderWidth: theme.tag.primary.outline.borderWidth
7202
+ }
7203
+ },
7204
+ "default": {
7205
+ fill: {
7206
+ borderWidth: theme.tag["default"].fill.borderWidth
7207
+ },
7208
+ outline: {
7209
+ borderWidth: theme.tag["default"].outline.borderWidth
7210
+ }
7211
+ },
7212
+ danger: {
7213
+ fill: {
7214
+ borderWidth: theme.tag.danger.fill.borderWidth
7215
+ },
7216
+ outline: {
7217
+ borderWidth: theme.tag.danger.outline.borderWidth
7218
+ }
7219
+ },
7220
+ warn: {
7221
+ fill: {
7222
+ borderWidth: theme.tag.warn.fill.borderWidth
7223
+ },
7224
+ outline: {
7225
+ borderWidth: theme.tag.warn.outline.borderWidth
7226
+ }
7227
+ }
7235
7228
  }
7236
7229
  },
7237
7230
  app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.borderWidths
@@ -7303,6 +7296,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7303
7296
  },
7304
7297
  textArea: {
7305
7298
  minHeight: theme.forms.textArea.minHeight
7299
+ },
7300
+ timePicker: {
7301
+ minWidth: theme.forms.timePicker.minWidth
7306
7302
  }
7307
7303
  },
7308
7304
  iconButton: {
@@ -7315,6 +7311,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7315
7311
  height: theme.fullscreenModal.header.height
7316
7312
  }
7317
7313
  },
7314
+ pageLoader: {
7315
+ size: theme.pageLoader.size
7316
+ },
7318
7317
  tooltip: {
7319
7318
  maxWidth: theme.tooltip.maxWidth,
7320
7319
  arrow: {
@@ -7334,6 +7333,16 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7334
7333
  size: theme.skeleton.shape.square.size
7335
7334
  }
7336
7335
  }
7336
+ },
7337
+ picker: {
7338
+ ios: {
7339
+ "default": {
7340
+ height: theme.picker.ios["default"].height
7341
+ },
7342
+ landscape: {
7343
+ height: theme.picker.ios.landscape.height
7344
+ }
7345
+ }
7337
7346
  }
7338
7347
  },
7339
7348
  app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.sizes
@@ -7379,10 +7388,26 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7379
7388
  highlight: {
7380
7389
  padding: theme.highlight.padding
7381
7390
  },
7391
+ listItem: {
7392
+ verticalPadding: theme.listItem.verticalPadding,
7393
+ horizontalPadding: theme.listItem.horizontalPadding
7394
+ },
7395
+ tag: {
7396
+ verticalPadding: theme.tag.verticalPadding,
7397
+ horizontalPadding: theme.tag.horizontalPadding
7398
+ },
7382
7399
  tooltip: {
7383
7400
  horizontalPadding: theme.tooltip.horizontalPadding,
7384
7401
  verticalPadding: theme.tooltip.verticalPadding,
7385
7402
  floatingPadding: theme.tooltip.floatingPadding
7403
+ },
7404
+ picker: {
7405
+ android: {
7406
+ item: {
7407
+ verticalPadding: theme.picker.android.verticalPadding,
7408
+ horizontalPadding: theme.picker.android.horizontalPadding
7409
+ }
7410
+ }
7386
7411
  }
7387
7412
  },
7388
7413
  app: appTheme === null || appTheme === void 0 ? void 0 : appTheme.space
@@ -7952,7 +7977,7 @@ function KittNativeBaseProvider(_ref) {
7952
7977
  });
7953
7978
  }
7954
7979
 
7955
- var _excluded$6 = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
7980
+ var _excluded$9 = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
7956
7981
  function SimpleContainer(_ref) {
7957
7982
  var children = _ref.children;
7958
7983
  return children;
@@ -7966,7 +7991,7 @@ function NavigationModalBehaviour(_ref2) {
7966
7991
  onEnter = _ref2.onEnter,
7967
7992
  onExit = _ref2.onExit,
7968
7993
  onClose = _ref2.onClose,
7969
- props = _objectWithoutProperties(_ref2, _excluded$6);
7994
+ props = _objectWithoutProperties(_ref2, _excluded$9);
7970
7995
  var AnimationComponent = useBreakpointValue({
7971
7996
  base: FullscreenModalAnimation,
7972
7997
  small: CardModalAnimation
@@ -8234,47 +8259,46 @@ function AnimatedFilledCircle() {
8234
8259
  });
8235
8260
  }
8236
8261
 
8237
- var PageLoaderContainer = /*#__PURE__*/styled.View.withConfig({
8238
- displayName: "PageLoader__PageLoaderContainer"
8239
- })(["transform:scale(-1) rotate(90deg);position:relative;width:", "px;height:", "px;"], function (_ref) {
8240
- var theme = _ref.theme;
8241
- return theme.kitt.pageLoader.size;
8242
- }, function (_ref2) {
8243
- var theme = _ref2.theme;
8244
- return theme.kitt.pageLoader.size;
8245
- });
8246
8262
  function PageLoader() {
8247
- return /*#__PURE__*/jsxs(PageLoaderContainer, {
8263
+ var sharedTransformStyle = {
8264
+ style: {
8265
+ /* Needed to make the animation starting from the top of the circles */
8266
+ transform: [{
8267
+ rotate: '90deg'
8268
+ }, {
8269
+ scale: -1
8270
+ }]
8271
+ }
8272
+ };
8273
+ return /*#__PURE__*/jsxs(View, {
8274
+ position: "relative",
8275
+ height: "kitt.pageLoader.size",
8276
+ width: "kitt.pageLoader.size",
8277
+ _ios: sharedTransformStyle,
8278
+ _android: sharedTransformStyle,
8248
8279
  children: [/*#__PURE__*/jsx(AnimatedBackgroundCircle, {}), /*#__PURE__*/jsx(AnimatedFilledCircle, {})]
8249
8280
  });
8250
8281
  }
8251
8282
 
8252
- var ContainerPressable = /*#__PURE__*/styled.Pressable.withConfig({
8253
- displayName: "PickerItem__ContainerPressable"
8254
- })(["padding:", ";background-color:", ";"], function (_ref) {
8255
- var theme = _ref.theme;
8256
- return theme.kitt.picker.android.padding;
8257
- }, function (_ref2) {
8258
- var theme = _ref2.theme,
8259
- $isSelected = _ref2.$isSelected;
8260
- return $isSelected ? theme.kitt.picker.android.selected.backgroundColor : theme.kitt.picker.android["default"].backgroundColor;
8261
- });
8262
-
8263
8283
  // This item is for Android only, iOS uses its own implementation and web is not supported yet
8264
- function PickerItem(_ref3) {
8265
- var label = _ref3.label,
8266
- value = _ref3.value,
8267
- isSelected = _ref3.isSelected,
8268
- onPress = _ref3.onPress;
8269
- return /*#__PURE__*/jsx(ContainerPressable, {
8284
+ function PickerItem(_ref) {
8285
+ var label = _ref.label,
8286
+ value = _ref.value,
8287
+ isSelected = _ref.isSelected,
8288
+ onPress = _ref.onPress;
8289
+ return /*#__PURE__*/jsx(Pressable, {
8270
8290
  accessibilityRole: "button",
8271
8291
  accessibilityState: {
8272
8292
  selected: isSelected
8273
8293
  },
8274
- $isSelected: isSelected,
8275
- onPress: onPress ? function () {
8276
- return onPress(value);
8277
- } : undefined,
8294
+ backgroundColor: isSelected ? 'kitt.picker.android.item.selected.backgroundColor' : 'kitt.picker.android.item.default.backgroundColor',
8295
+ paddingX: "kitt.picker.android.horizontalPadding",
8296
+ paddingY: "kitt.picker.android.verticalPadding",
8297
+ onPress: function handelPress() {
8298
+ if (onPress) {
8299
+ onPress(value);
8300
+ }
8301
+ },
8278
8302
  children: /*#__PURE__*/jsx(Typography.Text, {
8279
8303
  base: "body",
8280
8304
  color: isSelected ? 'white' : undefined,
@@ -8292,69 +8316,86 @@ function Picker(_ref) {
8292
8316
  testID = _ref.testID,
8293
8317
  onValueSelected = _ref.onValueSelected,
8294
8318
  onClose = _ref.onClose;
8319
+ var sx = useSx();
8320
+
8295
8321
  // Max height is based on base Modal sizes (which are not themified): padding (4*20*2) + footer (58) + header (58) + default iOS picker height (216)
8296
8322
  var _useMediaQuery = useMediaQuery({
8297
8323
  maxHeight: 492
8298
8324
  }),
8299
8325
  _useMediaQuery2 = _slicedToArray(_useMediaQuery, 1),
8300
8326
  isMatchingMaxHeight = _useMediaQuery2[0];
8327
+ var iosItemStyle = sx({
8328
+ fontSize: 'baseAndSmall.body',
8329
+ lineHeight: 'baseAndSmall.body',
8330
+ fontFamily: 'bodies.regular',
8331
+ color: 'kitt.typography.black-light',
8332
+ // As it is displayed in a modal, we must hard code an height to ensure that the picker doesn't bleed out of it
8333
+ // We can't set a percentage as it will be computed based on the page height
8334
+ height: isMatchingMaxHeight ? 'kitt.picker.ios.landscape.height' : 'kitt.picker.ios.default.height'
8335
+ });
8336
+ var getIosTextStyle = function (isSelected) {
8337
+ return sx({
8338
+ color: isSelected ? 'kitt.picker.ios.selected.color' : undefined
8339
+ });
8340
+ };
8301
8341
  var _useState = useState(initialValue),
8302
8342
  _useState2 = _slicedToArray(_useState, 2),
8303
8343
  value = _useState2[0],
8304
8344
  setValue = _useState2[1];
8305
- return /*#__PURE__*/jsxs(Modal, {
8345
+ return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
8306
8346
  visible: isVisible,
8307
8347
  onClose: onClose,
8308
- children: [/*#__PURE__*/jsx(Modal.Header, {
8309
- children: /*#__PURE__*/jsx(Typography.Text, {
8310
- base: "body",
8311
- variant: "bold",
8312
- children: title
8313
- })
8314
- }), Platform.OS === 'ios' ? /*#__PURE__*/jsx(Picker$1, {
8315
- testID: testID,
8316
- selectedValue: value
8317
- // As it is displayed in a modal, we must hard code an height to ensure that the picker doesn't bleed out of it
8318
- // We can't set a percentage as it will be computed based on the page height
8319
- ,
8320
- itemStyle: _objectSpread(_objectSpread({}, theme.picker.ios["default"]), {}, {
8321
- height: isMatchingMaxHeight ? theme.picker.ios.landscape.height : theme.picker.ios["default"].height
8322
- }),
8323
- onValueChange: function onValueChange(itemValue) {
8324
- return setValue(itemValue);
8325
- },
8326
- children: React.Children.map(children, function (child) {
8327
- var item = child;
8348
+ children: /*#__PURE__*/jsxs(CardModal, {
8349
+ children: [/*#__PURE__*/jsx(CardModal.Header, {
8350
+ right: /*#__PURE__*/jsx(IconButton, {
8351
+ icon: /*#__PURE__*/jsx(XIcon, {}),
8352
+ onPress: onClose
8353
+ }),
8354
+ children: /*#__PURE__*/jsx(Typography.Text, {
8355
+ base: "body",
8356
+ variant: "bold",
8357
+ children: title
8358
+ })
8359
+ }), Platform.OS === 'ios' ? /*#__PURE__*/jsx(Picker$1, {
8360
+ testID: testID,
8361
+ selectedValue: value,
8362
+ itemStyle: iosItemStyle,
8363
+ onValueChange: function onValueChange(itemValue) {
8364
+ return setValue(itemValue);
8365
+ },
8366
+ children: React.Children.map(children, function (child) {
8367
+ var item = child;
8328
8368
 
8329
- // iOS Picker doesn't support a custom Item component, we need to override its props manually for the selected one
8330
- return /*#__PURE__*/cloneElement(item, {
8331
- color: item.props.value === value ? theme.picker.ios.selected.color : undefined
8332
- });
8333
- })
8334
- }) : /*#__PURE__*/jsx(ScrollView$2, {
8335
- testID: testID,
8336
- children: React.Children.map(children, function (child) {
8337
- var item = child;
8338
- return /*#__PURE__*/cloneElement(item, {
8339
- onPress: function onPress(newValue) {
8340
- return setValue(newValue);
8369
+ // iOS Picker doesn't support a custom Item component, we need to override its props manually for the selected one
8370
+ return /*#__PURE__*/cloneElement(item, {
8371
+ color: getIosTextStyle(item.props.value === value).color
8372
+ });
8373
+ })
8374
+ }) : /*#__PURE__*/jsx(ScrollView$2, {
8375
+ testID: testID,
8376
+ children: React.Children.map(children, function (child) {
8377
+ var item = child;
8378
+ return /*#__PURE__*/cloneElement(item, {
8379
+ onPress: function onPress(newValue) {
8380
+ return setValue(newValue);
8381
+ },
8382
+ isSelected: item.props.value === value
8383
+ });
8384
+ })
8385
+ }), /*#__PURE__*/jsx(CardModal.Footer, {
8386
+ children: /*#__PURE__*/jsx(Button, {
8387
+ stretch: true,
8388
+ type: "primary",
8389
+ onPress: function handleValueSelected() {
8390
+ onValueSelected(value);
8391
+ onClose();
8341
8392
  },
8342
- isSelected: item.props.value === value
8343
- });
8344
- })
8345
- }), /*#__PURE__*/jsx(Modal.Footer, {
8346
- children: /*#__PURE__*/jsx(Button, {
8347
- stretch: true,
8348
- type: "primary",
8349
- onPress: function handleValueSelected() {
8350
- onValueSelected(value);
8351
- onClose();
8352
- },
8353
- children: validateButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
8354
- id: "kitt-universal.Picker.validate"
8393
+ children: validateButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
8394
+ id: "kitt-universal.Picker.validate"
8395
+ })
8355
8396
  })
8356
- })
8357
- })]
8397
+ })]
8398
+ })
8358
8399
  });
8359
8400
  }
8360
8401
  Picker.Item = PickerItem;
@@ -8412,19 +8453,10 @@ function SegmentedProgressBar(_ref) {
8412
8453
  });
8413
8454
  }
8414
8455
 
8415
- var Container$2 = /*#__PURE__*/styled.View.withConfig({
8416
- displayName: "SkeletonContent__Container"
8417
- })(["background-color:", ";border-color:", ";height:100%;width:100%;"], function (_ref) {
8418
- var theme = _ref.theme;
8419
- return theme.kitt.skeleton.backgroundColor;
8420
- }, function (_ref2) {
8421
- var theme = _ref2.theme;
8422
- return theme.kitt.skeleton.flareColor;
8423
- });
8424
8456
  var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
8425
- function SkeletonContent(_ref3) {
8426
- var isLoading = _ref3.isLoading,
8427
- width = _ref3.width;
8457
+ function SkeletonContent(_ref) {
8458
+ var isLoading = _ref.isLoading,
8459
+ width = _ref.width;
8428
8460
  var theme = useTheme();
8429
8461
  var sharedX = useSharedValue(0);
8430
8462
  useEffect(function () {
@@ -8450,11 +8482,15 @@ function SkeletonContent(_ref3) {
8450
8482
  };
8451
8483
  _f.asString = "function _f(){const{interpolate,sharedX,width}=jsThis._closure;{return{transform:[{translateX:interpolate(sharedX.value,[0,1],[-width,width])}]};}}";
8452
8484
  _f.__workletHash = 1670955855244;
8453
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (42:47)";
8485
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (36:47)";
8454
8486
  _f.__optimalization = 3;
8455
8487
  return _f;
8456
8488
  }());
8457
- return /*#__PURE__*/jsx(Container$2, {
8489
+ return /*#__PURE__*/jsx(View, {
8490
+ height: "100%",
8491
+ width: "100%",
8492
+ backgroundColor: "kitt.skeleton.backgroundColor",
8493
+ borderColor: "kitt.skeleton.flareColor",
8458
8494
  children: /*#__PURE__*/jsx(AnimatedLinearGradient, {
8459
8495
  colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
8460
8496
  locations: [0.1, 0.5, 0.9],
@@ -8471,7 +8507,7 @@ function SkeletonContent(_ref3) {
8471
8507
  });
8472
8508
  }
8473
8509
 
8474
- var _excluded$5 = ["isLoading", "style"],
8510
+ var _excluded$8 = ["isLoading", "style"],
8475
8511
  _excluded2$1 = ["size"],
8476
8512
  _excluded3$1 = ["size"],
8477
8513
  _excluded4 = ["size"];
@@ -8479,7 +8515,7 @@ function Skeleton(_ref) {
8479
8515
  var _ref$isLoading = _ref.isLoading,
8480
8516
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
8481
8517
  style = _ref.style,
8482
- props = _objectWithoutProperties(_ref, _excluded$5);
8518
+ props = _objectWithoutProperties(_ref, _excluded$8);
8483
8519
  var _useState = useState(0),
8484
8520
  _useState2 = _slicedToArray(_useState, 2),
8485
8521
  width = _useState2[0],
@@ -8674,7 +8710,7 @@ function getShouldDisplay2x() {
8674
8710
  return currentDevicePixelRatio > 1;
8675
8711
  }
8676
8712
 
8677
- var _excluded$4 = ["width", "height", "alt", "apiToken", "mapId", "marker", "center", "onLoaded", "onError"];
8713
+ var _excluded$7 = ["width", "height", "alt", "apiToken", "mapId", "marker", "center", "onLoaded", "onError"];
8678
8714
  var mapBoxMaxPictureWidth = 1280;
8679
8715
 
8680
8716
  // Mapbox requestable width for image is between 1 - 1280px
@@ -8692,7 +8728,7 @@ function StaticMap(_ref) {
8692
8728
  center = _ref.center,
8693
8729
  onLoaded = _ref.onLoaded,
8694
8730
  onError = _ref.onError,
8695
- props = _objectWithoutProperties(_ref, _excluded$4);
8731
+ props = _objectWithoutProperties(_ref, _excluded$7);
8696
8732
  var _useState = useState(getPictureWidth(width)),
8697
8733
  _useState2 = _slicedToArray(_useState, 2),
8698
8734
  currentWidth = _useState2[0],
@@ -8782,21 +8818,17 @@ StaticMap.Loader = StaticMapLoader;
8782
8818
  StaticMap.Error = StaticMapError;
8783
8819
  StaticMap.Marker = StaticMapMarker;
8784
8820
 
8785
- var Flex = /*#__PURE__*/styled.View.withConfig({
8786
- shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
8787
- return !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop);
8788
- }
8789
- }).withConfig({
8790
- displayName: "Flex"
8791
- })(["display:flex;flex-direction:", ";flex-wrap:wrap;padding:", "px;"], function (_ref) {
8792
- var direction = _ref.direction;
8793
- return direction;
8794
- }, function (_ref2) {
8795
- var theme = _ref2.theme,
8796
- _ref2$padding = _ref2.padding,
8797
- padding = _ref2$padding === void 0 ? 0 : _ref2$padding;
8798
- return padding * theme.kitt.spacing;
8799
- });
8821
+ var _excluded$6 = ["direction", "wrap"];
8822
+ function Flex(_ref) {
8823
+ var direction = _ref.direction,
8824
+ _ref$wrap = _ref.wrap,
8825
+ wrap = _ref$wrap === void 0 ? 'wrap' : _ref$wrap,
8826
+ props = _objectWithoutProperties(_ref, _excluded$6);
8827
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
8828
+ flexDirection: direction,
8829
+ flexWrap: wrap
8830
+ }));
8831
+ }
8800
8832
 
8801
8833
  var storyPadding = 'kitt.4';
8802
8834
 
@@ -8931,14 +8963,14 @@ function Story(_ref) {
8931
8963
  });
8932
8964
  }
8933
8965
 
8934
- var _excluded$3 = ["title", "children", "internalIsDemoSection"],
8966
+ var _excluded$5 = ["title", "children", "internalIsDemoSection"],
8935
8967
  _excluded2 = ["title", "children"],
8936
8968
  _excluded3 = ["title", "children"];
8937
8969
  function StorySection(_ref) {
8938
8970
  var title = _ref.title,
8939
8971
  children = _ref.children,
8940
8972
  internalIsDemoSection = _ref.internalIsDemoSection,
8941
- props = _objectWithoutProperties(_ref, _excluded$3);
8973
+ props = _objectWithoutProperties(_ref, _excluded$5);
8942
8974
  if (title === 'Demo' && !internalIsDemoSection) throw new Error('Use StorySection.Demo instead');
8943
8975
  return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
8944
8976
  marginBottom: "kitt.8"
@@ -9066,30 +9098,6 @@ var StoryGrid = {
9066
9098
  Col: StoryGridCol
9067
9099
  };
9068
9100
 
9069
- var Container$1 = /*#__PURE__*/styled.View.withConfig({
9070
- displayName: "Tag__Container"
9071
- })(["background-color:", ";border-width:", "px;border-color:", ";padding:", ";border-radius:", "px;align-self:flex-start;"], function (_ref) {
9072
- var theme = _ref.theme,
9073
- type = _ref.type,
9074
- variant = _ref.variant;
9075
- return theme.kitt.tag[type][variant].backgroundColor;
9076
- }, function (_ref2) {
9077
- var theme = _ref2.theme,
9078
- type = _ref2.type,
9079
- variant = _ref2.variant;
9080
- return theme.kitt.tag[type][variant].borderWidth;
9081
- }, function (_ref3) {
9082
- var theme = _ref3.theme,
9083
- type = _ref3.type,
9084
- variant = _ref3.variant;
9085
- return theme.kitt.tag[type][variant].borderColor;
9086
- }, function (_ref4) {
9087
- var theme = _ref4.theme;
9088
- return theme.kitt.tag.padding;
9089
- }, function (_ref5) {
9090
- var theme = _ref5.theme;
9091
- return theme.kitt.tag.borderRadius;
9092
- });
9093
9101
  var getLabelColor = function (type, variant) {
9094
9102
  switch (type) {
9095
9103
  case 'danger':
@@ -9114,15 +9122,20 @@ var getLabelColor = function (type, variant) {
9114
9122
  }
9115
9123
  }
9116
9124
  };
9117
- function Tag(_ref6) {
9118
- var label = _ref6.label,
9119
- _ref6$type = _ref6.type,
9120
- type = _ref6$type === void 0 ? 'default' : _ref6$type,
9121
- _ref6$variant = _ref6.variant,
9122
- variant = _ref6$variant === void 0 ? 'fill' : _ref6$variant;
9123
- return /*#__PURE__*/jsx(Container$1, {
9124
- type: type,
9125
- variant: variant,
9125
+ function Tag(_ref) {
9126
+ var label = _ref.label,
9127
+ _ref$type = _ref.type,
9128
+ type = _ref$type === void 0 ? 'default' : _ref$type,
9129
+ _ref$variant = _ref.variant,
9130
+ variant = _ref$variant === void 0 ? 'fill' : _ref$variant;
9131
+ return /*#__PURE__*/jsx(View, {
9132
+ alignSelf: "flex-start",
9133
+ borderRadius: "kitt.tag.borderRadius",
9134
+ paddingX: "kitt.tag.horizontalPadding",
9135
+ paddingY: "kitt.tag.verticalPadding",
9136
+ backgroundColor: "kitt.tag.".concat(type, ".").concat(variant, ".backgroundColor"),
9137
+ borderColor: "kitt.tag.".concat(type, ".").concat(variant, ".borderColor"),
9138
+ borderWidth: "kitt.tag.".concat(type, ".").concat(variant, ".borderWidth"),
9126
9139
  children: /*#__PURE__*/jsx(Typography.Text, {
9127
9140
  base: "body-xsmall",
9128
9141
  color: getLabelColor(type, variant),
@@ -9131,194 +9144,200 @@ function Tag(_ref6) {
9131
9144
  });
9132
9145
  }
9133
9146
 
9134
- /** @deprecated use native-base instead for SSR compatibility */
9135
- var getTypographyTypeConfigKey = function (theme) {
9136
- var isMediumOrAbove = theme.responsive.matchWindowSize({
9137
- minWidth: KittBreakpoints.MEDIUM
9138
- });
9139
- return isMediumOrAbove ? 'mediumAndWide' : 'baseAndSmall';
9140
- };
9141
- /** @deprecated this mixin is not SSR compatible */
9142
- var styledTextInputMixin = /*#__PURE__*/css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], function (_ref) {
9143
- var theme = _ref.theme,
9144
- $state = _ref.$state;
9145
- return $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states["default"].backgroundColor;
9146
- }, function (_ref2) {
9147
- var theme = _ref2.theme;
9148
- return theme.kitt.forms.input.borderWidth;
9149
- }, function (_ref3) {
9150
- var theme = _ref3.theme;
9151
- return theme.kitt.forms.input.borderRadius;
9152
- }, function (_ref4) {
9153
- var theme = _ref4.theme,
9154
- $state = _ref4.$state;
9155
- return theme.kitt.forms.input.states[$state].borderColor;
9156
- }, function (_ref5) {
9157
- var theme = _ref5.theme;
9158
- var typeConfigKey = getTypographyTypeConfigKey(theme);
9159
- return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize, "px");
9160
- }, function (_ref6) {
9161
- var theme = _ref6.theme,
9162
- $state = _ref6.$state;
9163
- return theme.kitt.forms.input.states[$state].color || theme.kitt.forms.input.states["default"].color;
9164
- }, function (_ref7) {
9165
- var theme = _ref7.theme;
9166
- return Platform.OS === 'web' ? theme.kitt.typography.types.bodies.fontFamily.web.regular : theme.kitt.typography.types.bodies.fontFamily["native"].regular;
9167
- });
9168
-
9169
- function Title(_ref) {
9170
- var children = _ref.children;
9171
- return /*#__PURE__*/jsx(Modal.Header, {
9172
- children: /*#__PURE__*/jsx(Typography.Text, {
9173
- base: "body",
9174
- variant: "bold",
9175
- children: children
9176
- })
9177
- });
9178
- }
9179
- function ModalDateTimePicker(_ref2) {
9180
- var title = _ref2.title,
9181
- visible = _ref2.visible,
9182
- value = _ref2.value,
9183
- validateButtonLabel = _ref2.validateButtonLabel,
9184
- onChange = _ref2.onChange,
9185
- onClose = _ref2.onClose;
9147
+ function ModalDateTimePicker(_ref) {
9148
+ var title = _ref.title,
9149
+ visible = _ref.visible,
9150
+ value = _ref.value,
9151
+ validateButtonLabel = _ref.validateButtonLabel,
9152
+ testID = _ref.testID,
9153
+ pickerTestID = _ref.pickerTestID,
9154
+ onChange = _ref.onChange,
9155
+ onClose = _ref.onClose;
9186
9156
  var _useState = useState(value),
9187
9157
  _useState2 = _slicedToArray(_useState, 2),
9188
9158
  currentValue = _useState2[0],
9189
9159
  setCurrentValue = _useState2[1];
9190
9160
 
9191
9161
  // Prevent unsynced value between the modal and its parent state
9192
-
9193
- return /*#__PURE__*/jsx(Modal, {
9162
+ var handleClose = function () {
9163
+ setCurrentValue(value);
9164
+ onClose();
9165
+ };
9166
+ var handleChange = function (nextDate) {
9167
+ if (nextDate) setCurrentValue(nextDate);
9168
+ };
9169
+ var buttonContent = validateButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
9170
+ id: "kitt-universal.ModalDateTimePicker.confirm"
9171
+ });
9172
+ return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
9194
9173
  visible: Boolean(visible),
9195
- onClose: function handleClose() {
9196
- setCurrentValue(value);
9197
- onClose();
9198
- },
9199
- children: visible ? /*#__PURE__*/jsxs(Fragment, {
9200
- children: [title ? /*#__PURE__*/jsx(Title, {
9201
- children: title
9202
- }) : null, /*#__PURE__*/jsx(Modal.Body, {
9174
+ onClose: handleClose,
9175
+ children: /*#__PURE__*/jsxs(CardModal, {
9176
+ testID: testID,
9177
+ children: [title ? /*#__PURE__*/jsx(CardModal.Header, {
9178
+ title: title,
9179
+ right: /*#__PURE__*/jsx(IconButton, {
9180
+ testID: "timePicker.ModalDateTimePicker.closeButton",
9181
+ icon: /*#__PURE__*/jsx(XIcon, {}),
9182
+ onPress: handleClose
9183
+ })
9184
+ }) : null, /*#__PURE__*/jsx(CardModal.Body, {
9203
9185
  children: /*#__PURE__*/jsx(DateTimePicker, {
9204
9186
  is24Hour: true,
9205
- testID: "timePicker.ModalDateTimePicker.dateTimeNativePicker",
9187
+ testID: pickerTestID,
9206
9188
  value: currentValue,
9207
9189
  mode: "time",
9208
9190
  display: Platform.OS === 'ios' ? 'spinner' : 'default',
9209
- onChange: function (_event, date) {
9210
- return setCurrentValue(function (prev) {
9211
- return date || prev;
9212
- });
9191
+ onChange: function (event, date) {
9192
+ return handleChange(date);
9213
9193
  }
9214
9194
  })
9215
- }), /*#__PURE__*/jsx(Modal.Footer, {
9195
+ }), /*#__PURE__*/jsx(CardModal.Footer, {
9216
9196
  children: /*#__PURE__*/jsx(Button, {
9217
9197
  stretch: true,
9198
+ testID: "timePicker.ModalDateTimePicker.submitButton",
9218
9199
  type: "primary",
9219
9200
  onPress: function handleSubmit() {
9220
9201
  onChange(currentValue);
9221
9202
  },
9222
- children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
9223
- children: validateButtonLabel
9224
- }) : /*#__PURE__*/jsx(FormattedMessage, {
9225
- id: "kitt-universal.ModalDateTimePicker.confirm"
9226
- })
9203
+ children: buttonContent
9227
9204
  })
9228
9205
  })]
9229
- }) : null
9206
+ })
9230
9207
  });
9231
9208
  }
9232
9209
 
9233
- var timePickerPlaceholder = '--:--';
9234
- var formatNumberToTimeString = function (time) {
9210
+ function formatNumberToTimeString(time) {
9235
9211
  return "".concat(String(time).padStart(2, '0'));
9236
- };
9237
- var formatDateToTimeString = function (date) {
9212
+ }
9213
+ function formatDateToTimeString(date) {
9238
9214
  return "".concat(formatNumberToTimeString(date.getHours()), ":").concat(formatNumberToTimeString(date.getMinutes()));
9239
- };
9240
- var useTimePicker = function (value, onChange, onBlur, disabled, defaultValue, isDefaultVisible) {
9241
- var _useState = useState(Boolean(isDefaultVisible)),
9242
- _useState2 = _slicedToArray(_useState, 2),
9243
- isTimePickerModalVisible = _useState2[0],
9244
- setIsTimePickerModalVisible = _useState2[1];
9245
- var todayAtNoon = useMemo(function () {
9246
- var now = new Date(2000, 0, 1, 12);
9247
- return new Date(now.getFullYear(), now.getMonth(), now.getDay(), 12);
9248
- }, []);
9249
- var defaultDate = defaultValue || todayAtNoon;
9250
- var dateTimePickerValue = value || defaultDate;
9251
- var displayedValue = value === null ? timePickerPlaceholder : formatDateToTimeString(dateTimePickerValue);
9252
- var timePickerState = isTimePickerModalVisible ? 'focus' : 'default';
9253
- return {
9254
- dateTimePickerValue: dateTimePickerValue,
9255
- displayedValue: displayedValue,
9256
- timePickerState: timePickerState,
9257
- isTimePickerModalVisible: isTimePickerModalVisible,
9258
- handleInputPress: function handleInputPress() {
9259
- if (disabled) {
9260
- return;
9261
- }
9262
- setIsTimePickerModalVisible(true);
9263
- },
9264
- handleTimeChange: function handleTimeChange(date) {
9265
- setIsTimePickerModalVisible(false);
9266
- onChange(date || defaultDate);
9267
- onBlur();
9268
- },
9269
- handleModalClose: function handleModalClose() {
9270
- return setIsTimePickerModalVisible(false);
9215
+ }
9216
+
9217
+ function getCurrentInternalForcedState(_ref) {
9218
+ var isDisabled = _ref.isDisabled,
9219
+ isHoveredInternal = _ref.isHoveredInternal,
9220
+ isFocusedInternal = _ref.isFocusedInternal,
9221
+ isPressedInternal = _ref.isPressedInternal;
9222
+ if (isDisabled) return 'disabled';
9223
+ if (isHoveredInternal) return 'hover';
9224
+ if (isFocusedInternal) return 'focus';
9225
+ if (isPressedInternal) return 'hover';
9226
+ return 'default';
9227
+ }
9228
+
9229
+ function TimePickerPressable(_ref) {
9230
+ var testID = _ref.testID,
9231
+ disabled = _ref.disabled,
9232
+ stretch = _ref.stretch,
9233
+ value = _ref.value,
9234
+ placeholder = _ref.placeholder,
9235
+ isHoveredInternal = _ref.isHoveredInternal,
9236
+ isFocusedInternal = _ref.isFocusedInternal,
9237
+ isPressedInternal = _ref.isPressedInternal,
9238
+ onPress = _ref.onPress;
9239
+ return /*#__PURE__*/jsx(Pressable, {
9240
+ testID: testID,
9241
+ disabled: disabled,
9242
+ accessibilityRole: "button",
9243
+ width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
9244
+ onPress: onPress,
9245
+ children: function children(_ref2) {
9246
+ var isHovered = _ref2.isHovered,
9247
+ isFocused = _ref2.isFocused,
9248
+ isPressed = _ref2.isPressed;
9249
+ return /*#__PURE__*/jsxs(View, {
9250
+ position: "relative",
9251
+ children: [/*#__PURE__*/jsx(InputText, {
9252
+ internalForceState: getCurrentInternalForcedState({
9253
+ isDisabled: disabled,
9254
+ isHoveredInternal: isHovered || isHoveredInternal,
9255
+ isFocusedInternal: isFocused || isFocusedInternal,
9256
+ isPressedInternal: isPressed || isPressedInternal
9257
+ }),
9258
+ value: value ? formatDateToTimeString(value) : undefined,
9259
+ placeholder: placeholder,
9260
+ disabled: disabled,
9261
+ textAlign: "center"
9262
+ }), /*#__PURE__*/jsx(View, {
9263
+ position: "absolute",
9264
+ top: "0",
9265
+ left: "0",
9266
+ height: "100%",
9267
+ width: "100%"
9268
+ })]
9269
+ });
9271
9270
  }
9272
- };
9273
- };
9271
+ });
9272
+ }
9274
9273
 
9275
- var Container = /*#__PURE__*/styled.Pressable.withConfig({
9276
- displayName: "TimePicker__Container"
9277
- })(["", " width:100px;height:40px;justify-content:center;align-items:center;"], styledTextInputMixin);
9278
9274
  function TimePicker(_ref) {
9279
9275
  var title = _ref.title,
9280
- _ref$state = _ref.state,
9281
- state = _ref$state === void 0 ? 'default' : _ref$state,
9282
9276
  _ref$disabled = _ref.disabled,
9283
9277
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
9284
- forceDefaultValue = _ref.forceDefaultValue,
9278
+ stretch = _ref.stretch,
9285
9279
  value = _ref.value,
9286
9280
  validateButtonLabel = _ref.validateButtonLabel,
9287
9281
  isDefaultVisible = _ref.isDefaultVisible,
9282
+ _ref$placeholder = _ref.placeholder,
9283
+ placeholder = _ref$placeholder === void 0 ? '--:--' : _ref$placeholder,
9284
+ testID = _ref.testID,
9285
+ modalTestID = _ref.modalTestID,
9286
+ _ref$pickerTestID = _ref.pickerTestID,
9287
+ pickerTestID = _ref$pickerTestID === void 0 ? 'timePicker.ModalDateTimePicker.dateTimeNativePicker' : _ref$pickerTestID,
9288
+ isHoveredInternal = _ref.isHoveredInternal,
9289
+ isFocusedInternal = _ref.isFocusedInternal,
9290
+ isPressedInternal = _ref.isPressedInternal,
9288
9291
  onChange = _ref.onChange,
9289
9292
  onBlur = _ref.onBlur;
9290
- var _useTimePicker = useTimePicker(value || null, onChange, onBlur, disabled, forceDefaultValue, isDefaultVisible),
9291
- dateTimePickerValue = _useTimePicker.dateTimePickerValue,
9292
- displayedValue = _useTimePicker.displayedValue,
9293
- timePickerState = _useTimePicker.timePickerState,
9294
- handleInputPress = _useTimePicker.handleInputPress,
9295
- handleModalClose = _useTimePicker.handleModalClose,
9296
- handleTimeChange = _useTimePicker.handleTimeChange,
9297
- isTimePickerModalVisible = _useTimePicker.isTimePickerModalVisible;
9298
- return /*#__PURE__*/jsxs(Container, {
9299
- $state: timePickerState === 'default' ? state : timePickerState,
9300
- accessibilityRole: "button",
9301
- onPress: handleInputPress,
9302
- children: [/*#__PURE__*/jsx(Typography.Text, {
9303
- base: "body",
9304
- color: displayedValue === timePickerPlaceholder ? 'black-light' : 'black',
9305
- children: displayedValue
9306
- }), Platform.OS === 'android' && isTimePickerModalVisible ? /*#__PURE__*/jsx(DateTimePicker, {
9293
+ var _useState = useState(value),
9294
+ _useState2 = _slicedToArray(_useState, 2),
9295
+ currentValue = _useState2[0],
9296
+ setCurrentValue = _useState2[1];
9297
+ var _useState3 = useState(isDefaultVisible),
9298
+ _useState4 = _slicedToArray(_useState3, 2),
9299
+ isPickerVisible = _useState4[0],
9300
+ setIsPickerVisible = _useState4[1];
9301
+ var handleChange = function (nextDate) {
9302
+ setCurrentValue(nextDate);
9303
+ setIsPickerVisible(false);
9304
+ if (onChange) onChange(nextDate);
9305
+ if (onBlur) onBlur();
9306
+ };
9307
+ var pickerValue = currentValue || new Date();
9308
+ return /*#__PURE__*/jsxs(Fragment, {
9309
+ children: [/*#__PURE__*/jsx(TimePickerPressable, {
9310
+ testID: testID,
9311
+ disabled: disabled,
9312
+ stretch: stretch,
9313
+ value: currentValue,
9314
+ placeholder: placeholder,
9315
+ isHoveredInternal: isHoveredInternal,
9316
+ isFocusedInternal: isFocusedInternal,
9317
+ isPressedInternal: isPressedInternal,
9318
+ onPress: function handlePress() {
9319
+ setIsPickerVisible(true);
9320
+ }
9321
+ }), Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsx(DateTimePicker, {
9307
9322
  is24Hour: true,
9308
- testID: "timePicker.TimePicker.dateTimeNativePicker",
9309
- value: dateTimePickerValue,
9323
+ testID: pickerTestID,
9324
+ value: pickerValue,
9310
9325
  mode: "time",
9311
9326
  display: "default",
9312
- onChange: function (_event, date) {
9313
- return handleTimeChange(date);
9327
+ onChange: function (event, date) {
9328
+ return handleChange(date);
9314
9329
  }
9315
9330
  }) : null, Platform.OS !== 'android' ? /*#__PURE__*/jsx(ModalDateTimePicker, {
9331
+ visible: isPickerVisible,
9316
9332
  title: title,
9317
- visible: isTimePickerModalVisible,
9318
- value: dateTimePickerValue,
9333
+ testID: modalTestID,
9334
+ pickerTestID: pickerTestID,
9335
+ value: pickerValue,
9319
9336
  validateButtonLabel: validateButtonLabel,
9320
- onChange: handleTimeChange,
9321
- onClose: handleModalClose
9337
+ onChange: handleChange,
9338
+ onClose: function handleClose() {
9339
+ setIsPickerVisible(false);
9340
+ }
9322
9341
  }) : null]
9323
9342
  });
9324
9343
  }
@@ -9652,52 +9671,24 @@ function TypographyEmoji(_ref3) {
9652
9671
  });
9653
9672
  }
9654
9673
 
9655
- var _excluded$2 = ["as", "children"];
9656
- function StyleWebWrapper(_ref) {
9657
- var as = _ref.as,
9658
- children = _ref.children,
9659
- props = _objectWithoutProperties(_ref, _excluded$2);
9660
- if (Platform.OS !== 'web') return children;
9661
- // as or default to div. If as is undefined, T is div but typescript is not sure
9662
- return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
9663
- children: children
9664
- }));
9674
+ var _excluded$4 = ["children"];
9675
+ function TypographyLinkWebWrapper(_ref) {
9676
+ var children = _ref.children;
9677
+ _objectWithoutProperties(_ref, _excluded$4);
9678
+ return children;
9665
9679
  }
9666
9680
 
9667
- var _excluded$1 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
9668
- // overrides :global(a) in Link styles.module.css
9669
- var _exp = function () {
9670
- return function (_ref) {
9671
- var $hasNoUnderline = _ref.$hasNoUnderline;
9672
- return $hasNoUnderline ? 'none' : 'underline';
9673
- };
9674
- };
9675
- var _exp2 = function () {
9676
- return function (_ref2) {
9677
- var $hasNoUnderline = _ref2.$hasNoUnderline;
9678
- return $hasNoUnderline ? 'underline' : 'none';
9679
- };
9680
- };
9681
- var TypographyLinkWebWrapper = /*#__PURE__*/styled$1('span')({
9682
- name: "TypographyLinkWebWrapper",
9683
- "class": "kitt-u_TypographyLinkWebWrapper_tcwz3nt",
9684
- propsAsIs: false,
9685
- vars: {
9686
- "tcwz3nt-0": [_exp()],
9687
- "tcwz3nt-1": [_exp2()]
9688
- }
9689
- });
9690
- function TypographyLink(_ref3) {
9691
- var children = _ref3.children,
9692
- disabled = _ref3.disabled,
9693
- noUnderline = _ref3.noUnderline,
9694
- href = _ref3.href,
9695
- hrefAttrs = _ref3.hrefAttrs,
9696
- onPress = _ref3.onPress,
9697
- otherProps = _objectWithoutProperties(_ref3, _excluded$1);
9698
- return /*#__PURE__*/jsx(StyleWebWrapper, {
9699
- as: TypographyLinkWebWrapper,
9700
- $hasNoUnderline: noUnderline,
9681
+ var _excluded$3 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
9682
+ function TypographyLink(_ref) {
9683
+ var children = _ref.children,
9684
+ disabled = _ref.disabled,
9685
+ noUnderline = _ref.noUnderline,
9686
+ href = _ref.href,
9687
+ hrefAttrs = _ref.hrefAttrs,
9688
+ onPress = _ref.onPress,
9689
+ otherProps = _objectWithoutProperties(_ref, _excluded$3);
9690
+ return /*#__PURE__*/jsx(TypographyLinkWebWrapper, {
9691
+ hasNoUnderline: noUnderline,
9701
9692
  children: /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({
9702
9693
  underline: !noUnderline,
9703
9694
  color: disabled ? 'black-disabled' : undefined,
@@ -9729,51 +9720,12 @@ function TypographyLink(_ref3) {
9729
9720
  });
9730
9721
  }
9731
9722
 
9732
- /** @deprecated use native-base responsive props or `useBreakpointValue` or `useMatchWindowSize` instead */
9733
- function createWindowSizeHelper(dimensions) {
9734
- return {
9735
- matchWindowSize: function matchWindowSize$1(options) {
9736
- return matchWindowSize(dimensions, options);
9737
- },
9738
- ifWindowSizeMatches: function ifWindowSizeMatches(options, valueIfTrue, valueIfFalse) {
9739
- return matchWindowSize(dimensions, options) ? valueIfTrue : valueIfFalse;
9740
- },
9741
- mapWindowWidth: function mapWindowWidth() {
9742
- for (var _len = arguments.length, widthList = new Array(_len), _key = 0; _key < _len; _key++) {
9743
- widthList[_key] = arguments[_key];
9744
- }
9745
- if ((process.env.NODE_ENV !== "production")) {
9746
- widthList.slice(1).forEach(function (_ref, index) {
9747
- var _ref2 = _slicedToArray(_ref, 1),
9748
- minWidth = _ref2[0];
9749
- var previousMinWidth = widthList[index][0];
9750
- if (previousMinWidth > minWidth) {
9751
- throw new Error("mapWindowWidth: sort your values to be mobile first. ".concat(minWidth, " is < ").concat(previousMinWidth, ", so ").concat(minWidth, " should be before ").concat(previousMinWidth, "."));
9752
- }
9753
- });
9754
- }
9755
- var found = widthList.find(function (_ref3) {
9756
- var _ref4 = _slicedToArray(_ref3, 2),
9757
- minWidth = _ref4[0];
9758
- _ref4[1];
9759
- return matchWindowSize(dimensions, {
9760
- minWidth: Number(minWidth)
9761
- });
9762
- });
9763
- if (!found) return null;
9764
- return found[1];
9765
- }
9766
- };
9767
- }
9768
-
9769
9723
  function useKittTheme() {
9770
- var dimensions = useWindowDimensions();
9771
9724
  return useMemo(function () {
9772
9725
  return {
9773
- kitt: theme,
9774
- responsive: createWindowSizeHelper(dimensions)
9726
+ kitt: theme
9775
9727
  };
9776
- }, [dimensions]);
9728
+ }, []);
9777
9729
  }
9778
9730
 
9779
9731
  function KittThemeProvider(_ref) {
@@ -9781,14 +9733,11 @@ function KittThemeProvider(_ref) {
9781
9733
  children = _ref.children,
9782
9734
  appTheme = _ref.appTheme;
9783
9735
  var theme = useKittTheme();
9784
- return /*#__PURE__*/jsx(ThemeProvider, {
9736
+ return /*#__PURE__*/jsx(KittNativeBaseProvider, {
9785
9737
  theme: theme,
9786
- children: /*#__PURE__*/jsx(KittNativeBaseProvider, {
9787
- theme: theme,
9788
- isSSR: isSSR,
9789
- appTheme: appTheme,
9790
- children: children
9791
- })
9738
+ isSSR: isSSR,
9739
+ appTheme: appTheme,
9740
+ children: children
9792
9741
  });
9793
9742
  }
9794
9743
  var KittThemeDecorator = makeDecorator({
@@ -9807,7 +9756,22 @@ var KittThemeDecorator = makeDecorator({
9807
9756
  }
9808
9757
  });
9809
9758
 
9810
- var _excluded = ["children"];
9759
+ var _excluded$2 = ["as", "children"];
9760
+ /**
9761
+ * @deprecated Use react-native Platform instead
9762
+ */
9763
+ function StyleWebWrapper(_ref) {
9764
+ var as = _ref.as,
9765
+ children = _ref.children,
9766
+ props = _objectWithoutProperties(_ref, _excluded$2);
9767
+ if (Platform.OS !== 'web') return children;
9768
+ // as or default to div. If as is undefined, T is div but typescript is not sure
9769
+ return /*#__PURE__*/jsx(as || 'div', _objectSpread(_objectSpread({}, props), {}, {
9770
+ children: children
9771
+ }));
9772
+ }
9773
+
9774
+ var _excluded$1 = ["children"];
9811
9775
  /**
9812
9776
  * Display children if match window size options
9813
9777
  *
@@ -9815,7 +9779,7 @@ var _excluded = ["children"];
9815
9779
  */
9816
9780
  function MatchWindowSize(_ref) {
9817
9781
  var children = _ref.children,
9818
- matchWindowSizeOptions = _objectWithoutProperties(_ref, _excluded);
9782
+ matchWindowSizeOptions = _objectWithoutProperties(_ref, _excluded$1);
9819
9783
  var match = useMatchWindowSize(matchWindowSizeOptions);
9820
9784
  if (!match) return null;
9821
9785
  return children;
@@ -9831,16 +9795,128 @@ function useCurrentBreakpointName() {
9831
9795
  });
9832
9796
  }
9833
9797
 
9834
- function withTheme(WrappedComponent) {
9835
- // eslint-disable-next-line prefer-arrow-callback
9836
- return /*#__PURE__*/forwardRef(function (props, ref) {
9837
- var theme = useTheme();
9838
- return /*#__PURE__*/jsx(WrappedComponent, _objectSpread({
9839
- ref: ref,
9840
- theme: theme
9841
- }, props));
9798
+ var backgroundColors = {
9799
+ done: 'kitt.verticalSteps.done.icon.backgroundColor',
9800
+ active: 'kitt.verticalSteps.active.icon.backgroundColor',
9801
+ "default": 'kitt.verticalSteps.default.icon.backgroundColor'
9802
+ };
9803
+ function IconStatus(_ref) {
9804
+ var state = _ref.state,
9805
+ index = _ref.index;
9806
+ if (state === 'done') {
9807
+ return /*#__PURE__*/jsx(TypographyIcon, {
9808
+ icon: /*#__PURE__*/jsx(CheckIcon, {}),
9809
+ color: "kitt.verticalSteps.done.icon.textColor"
9810
+ });
9811
+ }
9812
+ if (state === 'active') {
9813
+ return /*#__PURE__*/jsx(Typography.Text, {
9814
+ textAlign: "center",
9815
+ variant: "bold",
9816
+ color: "kitt.verticalSteps.active.icon.textColor",
9817
+ children: index + 1
9818
+ });
9819
+ }
9820
+ return /*#__PURE__*/jsx(Typography.Text, {
9821
+ textAlign: "center",
9822
+ variant: "bold",
9823
+ color: "kitt.verticalSteps.default.icon.textColor",
9824
+ children: index + 1
9825
+ });
9826
+ }
9827
+ function StepIcon(_ref2) {
9828
+ var index = _ref2.index,
9829
+ _ref2$state = _ref2.state,
9830
+ state = _ref2$state === void 0 ? 'default' : _ref2$state;
9831
+ return /*#__PURE__*/jsx(View, {
9832
+ justifyContent: "center",
9833
+ alignItems: "center",
9834
+ width: 30,
9835
+ height: 30,
9836
+ borderRadius: 15,
9837
+ backgroundColor: backgroundColors[state],
9838
+ children: /*#__PURE__*/jsx(IconStatus, {
9839
+ state: state,
9840
+ index: index
9841
+ })
9842
+ });
9843
+ }
9844
+
9845
+ function ExternalStep() {
9846
+ return null;
9847
+ }
9848
+ function Step(_ref) {
9849
+ var _ref$index = _ref.index,
9850
+ index = _ref$index === void 0 ? 0 : _ref$index,
9851
+ children = _ref.children,
9852
+ _ref$state = _ref.state,
9853
+ state = _ref$state === void 0 ? 'default' : _ref$state,
9854
+ _ref$isLast = _ref.isLast,
9855
+ isLast = _ref$isLast === void 0 ? false : _ref$isLast,
9856
+ _ref$shouldDisableNex = _ref.shouldDisableNextLink,
9857
+ shouldDisableNextLink = _ref$shouldDisableNex === void 0 ? false : _ref$shouldDisableNex;
9858
+ return /*#__PURE__*/jsxs(HStack$1, {
9859
+ space: "kitt.2",
9860
+ flexGrow: 1,
9861
+ children: [/*#__PURE__*/jsxs(View, {
9862
+ marginTop: "kitt.2",
9863
+ paddingY: "kitt.2",
9864
+ backgroundColor: "kitt.white",
9865
+ children: [/*#__PURE__*/jsx(StepIcon, {
9866
+ state: state,
9867
+ index: index
9868
+ }), !isLast ? /*#__PURE__*/jsx(View, {
9869
+ backgroundColor: shouldDisableNextLink ? 'kitt.palettes.lateOcean.black100' : 'kitt.palettes.lateOcean.moonPurple',
9870
+ width: 1,
9871
+ position: "absolute",
9872
+ top: 46,
9873
+ left: 15,
9874
+ zIndex: -1,
9875
+ height: "100%"
9876
+ }) : null]
9877
+ }), /*#__PURE__*/jsx(View, {
9878
+ flexGrow: 1,
9879
+ children: /*#__PURE__*/jsx(ActionCard, {
9880
+ variant: "primary",
9881
+ children: children
9882
+ })
9883
+ })]
9842
9884
  });
9843
9885
  }
9844
9886
 
9845
- export { ActionCard, Actions, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, DatePicker, DialogModal, Emoji, ExternalAppLink, ExternalLink, FlatList, Flex, FullscreenModal, HStack, Highlight, Icon, IconButton, Image, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarkerLarge, MapMarkerPosition, MapMarkerSimple, MatchWindowSize, Message, Modal, ModalBehaviour, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, View, createChoicesComponent, createResponsiveStyleFromProp, createWindowSizeHelper, getStaticMapImageUrl, hex2rgba, matchWindowSize, theme, useBottomSheet, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useStaticBottomSheet, useStoryBlockColor, useTheme, withTheme };
9887
+ function getStepState(index, activeIndex) {
9888
+ if (index === activeIndex) {
9889
+ return 'active';
9890
+ }
9891
+ if (index < activeIndex) {
9892
+ return 'done';
9893
+ }
9894
+ return 'default';
9895
+ }
9896
+
9897
+ var _excluded = ["children", "activeIndex"];
9898
+ function VerticalSteps(_ref) {
9899
+ var children = _ref.children,
9900
+ activeIndex = _ref.activeIndex,
9901
+ props = _objectWithoutProperties(_ref, _excluded);
9902
+ return /*#__PURE__*/jsx(VStack$1, _objectSpread(_objectSpread({
9903
+ space: "kitt.4",
9904
+ width: "100%"
9905
+ }, props), {}, {
9906
+ children: Children.map(children, function (child, index) {
9907
+ if ((process.env.NODE_ENV !== "production") && child.type !== ExternalStep) {
9908
+ throw new Error('VerticalSteps only accepts VerticalSteps.Step as children');
9909
+ }
9910
+ var isLast = index === Children.count(children) - 1;
9911
+ return /*#__PURE__*/createElement(Step, _objectSpread(_objectSpread({}, child.props), {}, {
9912
+ index: index,
9913
+ isLast: isLast,
9914
+ state: getStepState(index, activeIndex)
9915
+ }), child.props.children);
9916
+ })
9917
+ }));
9918
+ }
9919
+ VerticalSteps.Step = ExternalStep;
9920
+
9921
+ export { ActionCard, Actions, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, DatePicker, DialogModal, Emoji, ExternalAppLink, ExternalLink, FlatList, Flex, FullscreenModal, HStack, Highlight, Icon, IconButton, Image, InputEmail, InputFeedback, InputField, InputIcon, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarkerLarge, MapMarkerPosition, MapMarkerSimple, MatchWindowSize, Message, ModalBehaviour, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, hex2rgba, matchWindowSize, theme, useBottomSheet, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useStaticBottomSheet, useStoryBlockColor, useTheme };
9846
9922
  //# sourceMappingURL=index-browser-all.es.js.map