@ornikar/kitt-universal 11.2.0 → 12.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 (104) 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/ListItem/ListItem.d.ts.map +1 -1
  19. package/dist/definitions/ListItem/ListItemContent.d.ts.map +1 -1
  20. package/dist/definitions/ListItem/ListItemSideContent.d.ts.map +1 -1
  21. package/dist/definitions/Overlay/Overlay.d.ts.map +1 -1
  22. package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -1
  23. package/dist/definitions/Picker/Picker.d.ts.map +1 -1
  24. package/dist/definitions/Picker/PickerItem.d.ts.map +1 -1
  25. package/dist/definitions/Skeleton/SkeletonContent.d.ts.map +1 -1
  26. package/dist/definitions/Tag/Tag.d.ts.map +1 -1
  27. package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts +7 -3
  28. package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts.map +1 -1
  29. package/dist/definitions/TimePicker/TimePicker.d.ts +19 -8
  30. package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -1
  31. package/dist/definitions/TimePicker/TimePicker.web.d.ts +2 -1
  32. package/dist/definitions/TimePicker/TimePicker.web.d.ts.map +1 -1
  33. package/dist/definitions/TimePicker/TimePickerPressable.d.ts +20 -0
  34. package/dist/definitions/TimePicker/TimePickerPressable.d.ts.map +1 -0
  35. package/dist/definitions/TimePicker/utils/formatDateToTimeString.d.ts +2 -0
  36. package/dist/definitions/TimePicker/utils/formatDateToTimeString.d.ts.map +1 -0
  37. package/dist/definitions/TimePicker/utils/getCurrentInternalForcedState.d.ts +10 -0
  38. package/dist/definitions/TimePicker/utils/getCurrentInternalForcedState.d.ts.map +1 -0
  39. package/dist/definitions/VerticalSteps/Step.d.ts +16 -0
  40. package/dist/definitions/VerticalSteps/Step.d.ts.map +1 -0
  41. package/dist/definitions/VerticalSteps/StepIcon.d.ts +13 -0
  42. package/dist/definitions/VerticalSteps/StepIcon.d.ts.map +1 -0
  43. package/dist/definitions/VerticalSteps/VerticalSteps.d.ts +12 -0
  44. package/dist/definitions/VerticalSteps/VerticalSteps.d.ts.map +1 -0
  45. package/dist/definitions/VerticalSteps/utils/getStepState.d.ts +3 -0
  46. package/dist/definitions/VerticalSteps/utils/getStepState.d.ts.map +1 -0
  47. package/dist/definitions/forms/InputTag/InputTag.d.ts.map +1 -1
  48. package/dist/definitions/forms/InputText/InputTextContainer.d.ts +2 -4
  49. package/dist/definitions/forms/InputText/InputTextContainer.d.ts.map +1 -1
  50. package/dist/definitions/forms/RadioButtonGroup/AnimatedContainer/AnimatedContainer.d.ts +1 -1
  51. package/dist/definitions/forms/RadioButtonGroup/AnimatedContainer/AnimatedContainer.d.ts.map +1 -1
  52. package/dist/definitions/index.d.ts +1 -1
  53. package/dist/definitions/index.d.ts.map +1 -1
  54. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +190 -0
  55. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  56. package/dist/definitions/story-components/Flex.d.ts +6 -4
  57. package/dist/definitions/story-components/Flex.d.ts.map +1 -1
  58. package/dist/definitions/themes/default.d.ts +2 -0
  59. package/dist/definitions/themes/default.d.ts.map +1 -1
  60. package/dist/definitions/themes/late-ocean/choices.d.ts +2 -0
  61. package/dist/definitions/themes/late-ocean/choices.d.ts.map +1 -1
  62. package/dist/definitions/themes/late-ocean/forms.d.ts +1 -0
  63. package/dist/definitions/themes/late-ocean/forms.d.ts.map +1 -1
  64. package/dist/definitions/themes/late-ocean/listItem.d.ts +3 -0
  65. package/dist/definitions/themes/late-ocean/listItem.d.ts.map +1 -1
  66. package/dist/definitions/themes/late-ocean/picker.d.ts +3 -0
  67. package/dist/definitions/themes/late-ocean/picker.d.ts.map +1 -1
  68. package/dist/definitions/themes/late-ocean/tag.d.ts +3 -0
  69. package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -1
  70. package/dist/definitions/themes/late-ocean/timePicker.d.ts +5 -0
  71. package/dist/definitions/themes/late-ocean/timePicker.d.ts.map +1 -0
  72. package/dist/definitions/themes/late-ocean/verticalSteps.d.ts +14 -0
  73. package/dist/definitions/themes/late-ocean/verticalSteps.d.ts.map +1 -0
  74. package/dist/index-browser-all.es.android.js +923 -656
  75. package/dist/index-browser-all.es.android.js.map +1 -1
  76. package/dist/index-browser-all.es.ios.js +923 -656
  77. package/dist/index-browser-all.es.ios.js.map +1 -1
  78. package/dist/index-browser-all.es.js +922 -655
  79. package/dist/index-browser-all.es.js.map +1 -1
  80. package/dist/index-browser-all.es.web.js +726 -383
  81. package/dist/index-browser-all.es.web.js.map +1 -1
  82. package/dist/index-node-14.17.cjs.js +764 -486
  83. package/dist/index-node-14.17.cjs.js.map +1 -1
  84. package/dist/index-node-14.17.cjs.web.js +599 -245
  85. package/dist/index-node-14.17.cjs.web.js.map +1 -1
  86. package/dist/linaria-themes-browser-all.es.android.js +35 -2
  87. package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
  88. package/dist/linaria-themes-browser-all.es.ios.js +35 -2
  89. package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
  90. package/dist/linaria-themes-browser-all.es.js +35 -2
  91. package/dist/linaria-themes-browser-all.es.js.map +1 -1
  92. package/dist/linaria-themes-browser-all.es.web.js +35 -2
  93. package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
  94. package/dist/linaria-themes-node-14.17.cjs.js +35 -2
  95. package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
  96. package/dist/linaria-themes-node-14.17.cjs.web.js +35 -2
  97. package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
  98. package/dist/tsbuildinfo +1 -1
  99. package/package.json +5 -5
  100. package/typings/react-native-web.d.ts +2 -0
  101. package/dist/definitions/TimePicker/useTimePicker.d.ts +0 -14
  102. package/dist/definitions/TimePicker/useTimePicker.d.ts.map +0 -1
  103. package/dist/definitions/forms/styledTextInputMixin.d.ts +0 -8
  104. package/dist/definitions/forms/styledTextInputMixin.d.ts.map +0 -1
@@ -10,11 +10,11 @@ const reactNative = require('react-native');
10
10
  const kittIcons = require('@ornikar/kitt-icons');
11
11
  const bottomSheet$1 = require('@gorhom/bottom-sheet');
12
12
  const reactNativeSafeAreaContext = require('react-native-safe-area-context');
13
- const styled = require('styled-components/native');
14
13
  const twemojiParser = require('twemoji-parser');
15
14
  const WebBrowser = require('expo-web-browser');
16
15
  const DateTimePicker = require('@react-native-community/datetimepicker');
17
16
  const reactIntl = require('react-intl');
17
+ const styled = require('styled-components/native');
18
18
  const libphonenumberJs = require('libphonenumber-js');
19
19
  const Svg = require('react-native-svg');
20
20
  const picker$1 = require('@react-native-picker/picker');
@@ -39,9 +39,9 @@ function _interopNamespace(e) {
39
39
 
40
40
  const React__default = /*#__PURE__*/_interopDefaultLegacy(React);
41
41
  const Animated__default = /*#__PURE__*/_interopDefaultLegacy(Animated);
42
- const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
43
42
  const WebBrowser__namespace = /*#__PURE__*/_interopNamespace(WebBrowser);
44
43
  const DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
44
+ const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
45
45
  const Svg__default = /*#__PURE__*/_interopDefaultLegacy(Svg);
46
46
 
47
47
  const View = nativeBase.View;
@@ -1052,6 +1052,10 @@ const textArea = {
1052
1052
  minHeight: 120
1053
1053
  };
1054
1054
 
1055
+ const timePicker = {
1056
+ minWidth: 100
1057
+ };
1058
+
1055
1059
  const forms = {
1056
1060
  datePicker,
1057
1061
  input,
@@ -1060,7 +1064,8 @@ const forms = {
1060
1064
  textArea,
1061
1065
  checkbox,
1062
1066
  inputTag,
1063
- radioButtonGroup
1067
+ radioButtonGroup,
1068
+ timePicker
1064
1069
  };
1065
1070
 
1066
1071
  const webAnimationContentDuration = 600;
@@ -1150,6 +1155,8 @@ const iconButton = {
1150
1155
 
1151
1156
  const listItem = {
1152
1157
  padding: '12px 16px',
1158
+ verticalPadding: 12,
1159
+ horizontalPadding: 16,
1153
1160
  borderColor: colors.separator,
1154
1161
  borderWidth: 1,
1155
1162
  innerMargin: 8
@@ -1191,6 +1198,8 @@ const picker = {
1191
1198
  },
1192
1199
  android: {
1193
1200
  padding: '12px 24px',
1201
+ verticalPadding: 12,
1202
+ horizontalPadding: 24,
1194
1203
  default: {
1195
1204
  backgroundColor: colors.transparent
1196
1205
  },
@@ -1289,6 +1298,8 @@ const skeleton = {
1289
1298
  const tag = {
1290
1299
  borderRadius: 10,
1291
1300
  padding: '2px 12px',
1301
+ verticalPadding: 2,
1302
+ horizontalPadding: 12,
1292
1303
  primary: {
1293
1304
  fill: {
1294
1305
  backgroundColor: lateOceanColorPalette.moonPurpleLight1,
@@ -1365,6 +1376,27 @@ const tooltip = {
1365
1376
  }
1366
1377
  };
1367
1378
 
1379
+ const verticalSteps = {
1380
+ active: {
1381
+ icon: {
1382
+ backgroundColor: colors.primary,
1383
+ textColor: colors.white
1384
+ }
1385
+ },
1386
+ done: {
1387
+ icon: {
1388
+ backgroundColor: lateOceanColorPalette.moonPurple,
1389
+ textColor: colors.primary
1390
+ }
1391
+ },
1392
+ default: {
1393
+ icon: {
1394
+ backgroundColor: colors.disabled,
1395
+ textColor: colors.blackDisabled
1396
+ }
1397
+ }
1398
+ };
1399
+
1368
1400
  const breakpoints = {
1369
1401
  values: {
1370
1402
  base: 0,
@@ -1416,7 +1448,8 @@ const theme = {
1416
1448
  tooltip,
1417
1449
  typography,
1418
1450
  fullscreenModal,
1419
- actionCard
1451
+ actionCard,
1452
+ verticalSteps
1420
1453
  };
1421
1454
 
1422
1455
  const KittThemeContext = /*#__PURE__*/React.createContext({
@@ -2058,7 +2091,7 @@ function ButtonPadding({
2058
2091
  });
2059
2092
  }
2060
2093
 
2061
- function DisabledBorder$1() {
2094
+ function DisabledBorder() {
2062
2095
  return /*#__PURE__*/jsxRuntime.jsx(View, {
2063
2096
  position: "absolute",
2064
2097
  top: 0,
@@ -2262,7 +2295,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
2262
2295
  isPressed: isPressed,
2263
2296
  isFocused: isFocused,
2264
2297
  children: children
2265
- }), disabled ? /*#__PURE__*/jsxRuntime.jsx(DisabledBorder$1, {}) : null, /*#__PURE__*/jsxRuntime.jsx(FocusBorder, {
2298
+ }), disabled ? /*#__PURE__*/jsxRuntime.jsx(DisabledBorder, {}) : null, /*#__PURE__*/jsxRuntime.jsx(FocusBorder, {
2266
2299
  type: type,
2267
2300
  variant: variant,
2268
2301
  isFocused: isFocused || isFocusedInternal,
@@ -2695,21 +2728,17 @@ function ModalBehaviour({
2695
2728
  }
2696
2729
  ModalBehaviour.CloseButton = CloseButton;
2697
2730
 
2698
- // Don't use styled.Pressable here - babel-plugin-styled-components-react-native-web only supports tagged templates
2699
- const OverlayPressable = /*#__PURE__*/styled__default(reactNative.Pressable).withConfig({
2700
- displayName: "Overlay__OverlayPressable",
2701
- componentId: "kitt-universal__sc-1cz1gbr-0"
2702
- })(({
2703
- theme
2704
- }) => ({
2705
- ...reactNative.StyleSheet.absoluteFillObject,
2706
- backgroundColor: theme.kitt.colors.overlay.dark
2707
- }));
2708
2731
  function Overlay({
2709
2732
  onPress
2710
2733
  }) {
2711
- return /*#__PURE__*/jsxRuntime.jsx(OverlayPressable, {
2734
+ return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
2712
2735
  accessibilityRole: "none",
2736
+ position: "absolute",
2737
+ top: "0",
2738
+ left: "0",
2739
+ right: "0",
2740
+ bottom: "0",
2741
+ backgroundColor: "kitt.overlay.dark",
2713
2742
  onPress: onPress
2714
2743
  });
2715
2744
  }
@@ -3108,6 +3137,61 @@ CardModal.Header = CardModalHeader;
3108
3137
  CardModal.Footer = CardModalFooter;
3109
3138
  CardModal.ModalBehaviour = CardModalBehaviour;
3110
3139
 
3140
+ function getBackgroundColor$3({
3141
+ isDisabled,
3142
+ isSelected,
3143
+ isHovered,
3144
+ isPressed
3145
+ }) {
3146
+ if (isDisabled) return 'kitt.choices.item.disabled.backgroundColor';
3147
+ if (isSelected && isHovered) return 'kitt.choices.item.hoverWhenSelected.backgroundColor';
3148
+ if (isPressed) return 'kitt.choices.item.pressed.backgroundColor';
3149
+ if (isHovered) return 'kitt.choices.item.hover.backgroundColor';
3150
+ if (isSelected) return 'kitt.choices.item.selected.backgroundColor';
3151
+ return 'kitt.choices.item.default.backgroundColor';
3152
+ }
3153
+
3154
+ function getBorderRadius(variant) {
3155
+ // The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
3156
+ // We don't control over the height of the rendered children we just go with a arbitrary really high value
3157
+ return variant === 'rounded' ? Number.MAX_SAFE_INTEGER : 'kitt.choices.item.borderRadius';
3158
+ }
3159
+
3160
+ function AnimatedChoiceItemView({
3161
+ children,
3162
+ variant,
3163
+ size,
3164
+ isHovered,
3165
+ isPressed,
3166
+ isDisabled,
3167
+ isSelected,
3168
+ animatedStyles
3169
+ }) {
3170
+ const sx = nativeBase.useSx();
3171
+ const style = sx({
3172
+ position: 'relative',
3173
+ borderRadius: getBorderRadius(variant),
3174
+ backgroundColor: getBackgroundColor$3({
3175
+ isDisabled,
3176
+ isSelected,
3177
+ isHovered,
3178
+ isPressed
3179
+ }),
3180
+ paddingX: size === 'small' ? 'kitt.4' : {
3181
+ base: 'kitt.4',
3182
+ small: 'kitt.6'
3183
+ },
3184
+ paddingY: size === 'small' ? 'kitt.2' : {
3185
+ base: 'kitt.4',
3186
+ small: 'kitt.6'
3187
+ }
3188
+ });
3189
+ return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
3190
+ style: [style, animatedStyles],
3191
+ children: children
3192
+ });
3193
+ }
3194
+
3111
3195
  const useNativeAnimation$2 = ({
3112
3196
  selected,
3113
3197
  disabled,
@@ -3201,80 +3285,7 @@ function getCurrentTextColor$1({
3201
3285
  if (isSelected || isPressed) return 'white';
3202
3286
  return 'black';
3203
3287
  }
3204
- function getBorderRadius(defaultRadius, variant) {
3205
- // The clean way to have the rounded effect would have been to know the children height since radius >= height * 0.5
3206
- // We don't control over the height of the rendered children we just go with a arbitrary really high value
3207
3288
 
3208
- if (variant === 'rounded') return 800;
3209
- return defaultRadius;
3210
- }
3211
- const DisabledBorder = /*#__PURE__*/styled__default(reactNative.View).withConfig({
3212
- displayName: "ChoiceItem__DisabledBorder",
3213
- componentId: "kitt-universal__sc-wuv3y6-0"
3214
- })(["border-radius:", "px;", ";"], ({
3215
- theme,
3216
- $variant
3217
- }) => getBorderRadius(theme.kitt.choices.item.borderRadius, $variant), ({
3218
- theme
3219
- }) => {
3220
- const {
3221
- width,
3222
- color
3223
- } = theme.kitt.choices.item.disabled.border;
3224
- return styled.css(["border:", "px solid ", ";"], width, color);
3225
- });
3226
- const ChoiceItemView = /*#__PURE__*/styled__default(reactNative.Platform.OS === 'web' ? reactNative.View : Animated__default.View).withConfig({
3227
- displayName: "ChoiceItem__ChoiceItemView",
3228
- componentId: "kitt-universal__sc-wuv3y6-1"
3229
- })(["position:relative;border-radius:", "px;background-color:", ";", ";", ""], ({
3230
- theme,
3231
- $variant
3232
- }) => getBorderRadius(theme.kitt.choices.item.borderRadius, $variant), ({
3233
- theme,
3234
- $isHovered,
3235
- $isPressed,
3236
- $isDisabled,
3237
- $isSelected
3238
- }) => {
3239
- const {
3240
- hoverWhenSelected,
3241
- hover,
3242
- disabled,
3243
- selected,
3244
- pressed,
3245
- default: defaultBackground
3246
- } = theme.kitt.choices.item.backgroundColor;
3247
- if ($isDisabled) return disabled;
3248
- if ($isSelected && $isHovered) return hoverWhenSelected;
3249
- if ($isPressed) return pressed;
3250
- if ($isHovered) return hover;
3251
- if ($isSelected) return selected;
3252
- return defaultBackground;
3253
- }, ({
3254
- theme,
3255
- $size
3256
- }) => {
3257
- const {
3258
- base,
3259
- small
3260
- } = theme.kitt.choices.item.padding;
3261
- if ($size === 'small') {
3262
- return styled.css(["padding:", "px ", "px;"], base / 2, base);
3263
- }
3264
- return theme.responsive.ifWindowSizeMatches({
3265
- minWidth: KittBreakpoints.SMALL
3266
- }, styled.css(["padding:", "px;"], small), styled.css(["padding:", "px;"], base));
3267
- }, ({
3268
- theme
3269
- }) => {
3270
- if (reactNative.Platform.OS !== 'web') return undefined;
3271
- const {
3272
- property,
3273
- duration,
3274
- timingFunction
3275
- } = theme.kitt.choices.item.transition;
3276
- return styled.css(["transition:", " ", "ms ", ";"], property, duration, timingFunction);
3277
- });
3278
3289
  function ChoiceItem({
3279
3290
  type = 'button',
3280
3291
  value,
@@ -3328,14 +3339,14 @@ function ChoiceItem({
3328
3339
  children: ({
3329
3340
  isHovered,
3330
3341
  isPressed
3331
- }) => /*#__PURE__*/jsxRuntime.jsxs(ChoiceItemView, {
3332
- style: reactNative.Platform.OS !== 'web' ? [backgroundStyles] : undefined,
3333
- $isHovered: isHovered || isHoveredInternal,
3334
- $isDisabled: disabled,
3335
- $isSelected: selected,
3336
- $isPressed: isPressed || isPressedInternal,
3337
- $variant: variant,
3338
- $size: size,
3342
+ }) => /*#__PURE__*/jsxRuntime.jsxs(AnimatedChoiceItemView, {
3343
+ animatedStyles: backgroundStyles,
3344
+ isHovered: isHovered || isHoveredInternal,
3345
+ isDisabled: disabled,
3346
+ isSelected: selected,
3347
+ isPressed: isPressed || isPressedInternal,
3348
+ variant: variant,
3349
+ size: size,
3339
3350
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography.SetDefaultColor, {
3340
3351
  value: getCurrentTextColor$1({
3341
3352
  isDisabled: disabled,
@@ -3344,31 +3355,32 @@ function ChoiceItem({
3344
3355
  isHovered: isHovered || isHoveredInternal
3345
3356
  }),
3346
3357
  children: children
3347
- }), disabled ? /*#__PURE__*/jsxRuntime.jsx(DisabledBorder, {
3348
- $variant: variant,
3349
- style: reactNative.StyleSheet.absoluteFillObject
3358
+ }), disabled ? /*#__PURE__*/jsxRuntime.jsx(View, {
3359
+ borderRadius: getBorderRadius(variant),
3360
+ borderWidth: "kitt.choices.item.disabled.borderWidth",
3361
+ borderColor: "kitt.choices.item.disabled.borderColor",
3362
+ position: "absolute",
3363
+ top: "0",
3364
+ right: "0",
3365
+ left: "0",
3366
+ bottom: "0"
3350
3367
  }) : null]
3351
3368
  })
3352
3369
  });
3353
3370
  }
3354
3371
 
3355
- const ChoiceItemContainer = /*#__PURE__*/styled__default(reactNative.View).withConfig({
3356
- displayName: "ChoiceItemContainer",
3357
- componentId: "kitt-universal__sc-17uuimx-0"
3358
- })(["", ""], ({
3359
- theme,
3360
- $isLast,
3361
- $direction
3362
- }) => {
3363
- const {
3364
- row,
3365
- column
3366
- } = theme.kitt.choices.spacing;
3367
- if ($direction === 'row') {
3368
- return styled.css(["margin-right:", "px;"], $isLast ? 0 : row);
3369
- }
3370
- return styled.css(["margin-bottom:", "px;"], $isLast ? 0 : column);
3371
- });
3372
+ function ChoiceItemContainer({
3373
+ children,
3374
+ direction,
3375
+ isLast
3376
+ }) {
3377
+ const currentItemMarginValue = isLast ? undefined : 'kitt.3';
3378
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
3379
+ marginRight: direction === 'row' ? currentItemMarginValue : undefined,
3380
+ marginBottom: direction === 'column' ? currentItemMarginValue : undefined,
3381
+ children: children
3382
+ });
3383
+ }
3372
3384
 
3373
3385
  function ChoicesContainer({
3374
3386
  direction,
@@ -3428,8 +3440,8 @@ function Choices({
3428
3440
  ...sharedProps
3429
3441
  });
3430
3442
  return /*#__PURE__*/jsxRuntime.jsx(ChoiceItemContainer, {
3431
- $direction: direction,
3432
- $isLast: index === childrenArray.length - 1,
3443
+ direction: direction,
3444
+ isLast: index === childrenArray.length - 1,
3433
3445
  children: element
3434
3446
  }, child.key);
3435
3447
  })
@@ -4193,10 +4205,14 @@ function stringToNumber(text) {
4193
4205
  return parseInt(text, 10);
4194
4206
  }
4195
4207
 
4196
- const InputTextContainer = /*#__PURE__*/styled__default.View.withConfig({
4197
- displayName: "InputTextContainer",
4198
- componentId: "kitt-universal__sc-8j6fjq-0"
4199
- })(["position:relative;"]);
4208
+ function InputTextContainer({
4209
+ children
4210
+ }) {
4211
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
4212
+ position: "relative",
4213
+ children: children
4214
+ });
4215
+ }
4200
4216
 
4201
4217
  const InputText = /*#__PURE__*/React.forwardRef(({
4202
4218
  id,
@@ -4219,7 +4235,6 @@ const InputText = /*#__PURE__*/React.forwardRef(({
4219
4235
  });
4220
4236
  const shouldHandleSingleLineOnIOS = reactNative.Platform.OS === 'ios' && !multiline;
4221
4237
  return /*#__PURE__*/jsxRuntime.jsxs(InputTextContainer, {
4222
- $isDisabled: disabled,
4223
4238
  children: [/*#__PURE__*/jsxRuntime.jsx(nativeBase.Input, {
4224
4239
  ref: ref,
4225
4240
  multiline: multiline,
@@ -4254,7 +4269,7 @@ const InputText = /*#__PURE__*/React.forwardRef(({
4254
4269
  });
4255
4270
  });
4256
4271
 
4257
- function getCurrentInternalForcedState({
4272
+ function getCurrentInternalForcedState$1({
4258
4273
  isDisabled,
4259
4274
  isHoveredInternal,
4260
4275
  isFocusedInternal,
@@ -4280,7 +4295,7 @@ const InputPart = /*#__PURE__*/React.forwardRef(({
4280
4295
  }, ref) => {
4281
4296
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
4282
4297
  ref: ref,
4283
- internalForceState: getCurrentInternalForcedState({
4298
+ internalForceState: getCurrentInternalForcedState$1({
4284
4299
  isDisabled: disabled,
4285
4300
  isHoveredInternal,
4286
4301
  isFocusedInternal,
@@ -4885,7 +4900,7 @@ const ModalView = /*#__PURE__*/styled__default.View.withConfig({
4885
4900
  }) => theme.kitt.spacing * 20, ({
4886
4901
  theme
4887
4902
  }) => theme.kitt.spacing * 4);
4888
- const ContentView$1 = /*#__PURE__*/styled__default.View.withConfig({
4903
+ const ContentView = /*#__PURE__*/styled__default.View.withConfig({
4889
4904
  displayName: "Modal__ContentView",
4890
4905
  componentId: "kitt-universal__sc-1xy2w5u-1"
4891
4906
  })(["position:relative;display:flex;flex-direction:column;max-height:100%;max-width:540px;height:auto;width:100%;border-radius:", "px;background-color:", ";"], ({
@@ -4917,7 +4932,7 @@ function Modal({
4917
4932
  children: /*#__PURE__*/jsxRuntime.jsxs(ModalView, {
4918
4933
  children: [/*#__PURE__*/jsxRuntime.jsx(Overlay, {
4919
4934
  onPress: onClose
4920
- }), /*#__PURE__*/jsxRuntime.jsx(ContentView$1, {
4935
+ }), /*#__PURE__*/jsxRuntime.jsx(ContentView, {
4921
4936
  children: children
4922
4937
  })]
4923
4938
  })
@@ -5307,31 +5322,6 @@ const InputPhone = /*#__PURE__*/React.forwardRef(({
5307
5322
  });
5308
5323
 
5309
5324
  const getTypographyColor = type => type ? 'white' : 'black';
5310
- const InputTagContainer = /*#__PURE__*/styled__default(reactNative.View).withConfig({
5311
- displayName: "InputTag__InputTagContainer",
5312
- componentId: "kitt-universal__sc-1511dsf-0"
5313
- })(["align-items:center;justify-content:center;flex-direction:row;align-self:flex-start;overflow:hidden;padding-horizontal:", "px;background-color:", ";border-radius:", "px;"], ({
5314
- theme
5315
- }) => theme.kitt.spacing * 2, ({
5316
- theme,
5317
- type
5318
- }) => {
5319
- if (type === 'success') {
5320
- return theme.kitt.forms.inputTag.success.backgroundColor;
5321
- }
5322
- if (type === 'danger') {
5323
- return theme.kitt.forms.inputTag.danger.backgroundColor;
5324
- }
5325
- return theme.kitt.forms.inputTag.default.backgroundColor;
5326
- }, ({
5327
- theme
5328
- }) => theme.kitt.forms.inputTag.borderRadius);
5329
- const IconContainer = /*#__PURE__*/styled__default(reactNative.View).withConfig({
5330
- displayName: "InputTag__IconContainer",
5331
- componentId: "kitt-universal__sc-1511dsf-1"
5332
- })(["margin-right:", "px;"], ({
5333
- theme
5334
- }) => theme.kitt.spacing);
5335
5325
  function InputTag({
5336
5326
  children,
5337
5327
  type,
@@ -5339,15 +5329,23 @@ function InputTag({
5339
5329
  }) {
5340
5330
  const typographyColor = getTypographyColor(type);
5341
5331
  const theme = useTheme();
5342
- return /*#__PURE__*/jsxRuntime.jsxs(InputTagContainer, {
5343
- type: type,
5344
- children: [icon && /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
5332
+ return /*#__PURE__*/jsxRuntime.jsxs(View, {
5333
+ alignItems: "center",
5334
+ justifyContent: "center",
5335
+ flexDirection: "row",
5336
+ alignSelf: "flex-start",
5337
+ overflow: "hidden",
5338
+ paddingX: "kitt.2",
5339
+ backgroundColor: `kitt.forms.inputTag.${type || 'default'}.backgroundColor`,
5340
+ borderRadius: "kitt.forms.inputTag.borderRadius",
5341
+ children: [icon ? /*#__PURE__*/jsxRuntime.jsx(View, {
5342
+ marginRight: "kitt.1",
5345
5343
  children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
5346
5344
  icon: icon,
5347
5345
  size: theme.kitt.forms.inputTag.iconSize,
5348
5346
  color: typographyColor
5349
5347
  })
5350
- }), /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
5348
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
5351
5349
  base: "body-small",
5352
5350
  color: typographyColor,
5353
5351
  children: children
@@ -5527,45 +5525,23 @@ const Radio = /*#__PURE__*/React.forwardRef(({
5527
5525
  });
5528
5526
  });
5529
5527
 
5530
- const StyledAnimatedView = /*#__PURE__*/styled__default(Animated__default.View).withConfig({
5531
- displayName: "AnimatedContainer__StyledAnimatedView",
5532
- componentId: "kitt-universal__sc-qzh0y7-0"
5533
- })(["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;"], ({
5534
- theme
5535
- }) => theme.kitt.forms.radioButtonGroup.item.borderWidth, ({
5536
- theme,
5537
- $isFirst
5538
- }) => $isFirst ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0, ({
5539
- theme,
5540
- $isFirst
5541
- }) => $isFirst ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0, ({
5542
- theme,
5543
- $isLast
5544
- }) => $isLast ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0, ({
5545
- theme,
5546
- $isLast
5547
- }) => $isLast ? theme.kitt.forms.radioButtonGroup.item.borderRadius : 0, ({
5548
- theme,
5549
- $isFirst
5550
- }) => $isFirst ? theme.kitt.forms.radioButtonGroup.item.borderWidth : 0);
5551
5528
  function AnimatedContainer({
5552
5529
  children,
5553
- isFocused,
5554
- isPressed,
5555
- isSelected,
5556
- isDisabled,
5557
5530
  isFirst,
5558
5531
  isLast,
5559
5532
  animatedStyles
5560
5533
  }) {
5561
- return /*#__PURE__*/jsxRuntime.jsx(StyledAnimatedView, {
5562
- style: [animatedStyles],
5563
- $isFocused: isFocused,
5564
- $isPressed: isPressed,
5565
- $isSelected: isSelected,
5566
- $isDisabled: isDisabled,
5567
- $isFirst: isFirst,
5568
- $isLast: isLast,
5534
+ const sx = nativeBase.useSx();
5535
+ const styles = sx({
5536
+ borderWidth: 'kitt.forms.radioButtonGroup.item.borderWidth',
5537
+ borderTopLeftRadius: isFirst ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
5538
+ borderBottomLeftRadius: isFirst ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
5539
+ borderTopRightRadius: isLast ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
5540
+ borderBottomRightRadius: isLast ? 'kitt.forms.radioButtonGroup.item.borderRadius' : 0,
5541
+ borderLeftWidth: isFirst ? 'kitt.forms.radioButtonGroup.item.borderWidth' : 0
5542
+ });
5543
+ return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
5544
+ style: [styles, animatedStyles],
5569
5545
  children: children
5570
5546
  });
5571
5547
  }
@@ -6251,89 +6227,46 @@ function useKittMapConfig() {
6251
6227
  return context;
6252
6228
  }
6253
6229
 
6254
- const ContentView = /*#__PURE__*/styled__default.View.withConfig({
6255
- displayName: "ListItemContent__ContentView",
6256
- componentId: "kitt-universal__sc-57q0u9-0"
6257
- })(["flex:1 0 0%;align-self:center;"]);
6258
6230
  function ListItemContent({
6259
6231
  children,
6260
6232
  ...rest
6261
6233
  }) {
6262
- return /*#__PURE__*/jsxRuntime.jsx(ContentView, {
6234
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
6235
+ alignSelf: "center",
6236
+ flexBasis: "0%",
6237
+ flexGrow: 1,
6238
+ flexShrink: 0,
6263
6239
  ...rest,
6264
6240
  children: children
6265
6241
  });
6266
6242
  }
6267
6243
 
6268
- const SideContainerView = /*#__PURE__*/styled__default.View.withConfig({
6269
- displayName: "ListItemSideContent__SideContainerView",
6270
- componentId: "kitt-universal__sc-1vajiw-0"
6271
- })(["flex-direction:row;margin-left:", ";margin-right:", ";"], ({
6272
- theme,
6273
- side
6274
- }) => side === 'right' ? `${theme.kitt.listItem.innerMargin}px` : 0, ({
6275
- theme,
6276
- side
6277
- }) => side === 'left' ? `${theme.kitt.listItem.innerMargin}px` : 0);
6278
-
6279
6244
  // Handles the vertical alignment of the side elements of the list item
6280
6245
  function ListItemSideContainer({
6281
6246
  children,
6282
6247
  side = 'left',
6283
6248
  ...rest
6284
6249
  }) {
6285
- return /*#__PURE__*/jsxRuntime.jsx(SideContainerView, {
6286
- side: side,
6250
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
6251
+ flexDirection: "row",
6252
+ marginLeft: side === 'right' ? 'kitt.2' : undefined,
6253
+ marginRight: side === 'left' ? 'kitt.2' : undefined,
6287
6254
  ...rest,
6288
6255
  children: children
6289
6256
  });
6290
6257
  }
6291
- const SideContentView = /*#__PURE__*/styled__default.View.withConfig({
6292
- displayName: "ListItemSideContent__SideContentView",
6293
- componentId: "kitt-universal__sc-1vajiw-1"
6294
- })(["align-self:", ";"], ({
6295
- align
6296
- }) => align);
6297
6258
  function ListItemSideContent({
6298
6259
  children,
6299
6260
  align = 'auto',
6300
6261
  ...rest
6301
6262
  }) {
6302
- return /*#__PURE__*/jsxRuntime.jsx(SideContentView, {
6303
- align: align,
6263
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
6264
+ alignSelf: align,
6304
6265
  ...rest,
6305
6266
  children: children
6306
6267
  });
6307
6268
  }
6308
6269
 
6309
- const ContainerView = /*#__PURE__*/styled__default.View.withConfig({
6310
- displayName: "ListItem__ContainerView",
6311
- componentId: "kitt-universal__sc-2afp9s-0"
6312
- })(["flex-direction:row;padding:", ";", ";border-color:", ";background-color:", ";"], ({
6313
- withPadding,
6314
- theme
6315
- }) => withPadding ? theme.kitt.listItem.padding : 0, ({
6316
- theme,
6317
- borders
6318
- }) => {
6319
- const {
6320
- borderWidth
6321
- } = theme.kitt.listItem;
6322
- if (borders === 'top') {
6323
- return `border-top-width: ${borderWidth}px`;
6324
- }
6325
- if (borders === 'bottom') {
6326
- return `border-bottom-width: ${borderWidth}px`;
6327
- }
6328
- if (borders === 'both') {
6329
- return styled.css(["border-top-width:", "px;border-bottom-width:", "px;"], borderWidth, borderWidth);
6330
- }
6331
- return 'border: none';
6332
- }, ({
6333
- theme
6334
- }) => theme.kitt.listItem.borderColor, ({
6335
- theme
6336
- }) => theme.kitt.colors.uiBackgroundLight);
6337
6270
  function ListItem({
6338
6271
  children,
6339
6272
  withPadding,
@@ -6352,9 +6285,14 @@ function ListItem({
6352
6285
  const containerProps = onPress ? undefined : rest;
6353
6286
  return /*#__PURE__*/jsxRuntime.jsx(Wrapper, {
6354
6287
  ...wrapperProps,
6355
- children: /*#__PURE__*/jsxRuntime.jsxs(ContainerView, {
6356
- withPadding: withPadding,
6357
- borders: borders,
6288
+ children: /*#__PURE__*/jsxRuntime.jsxs(View, {
6289
+ flexDirection: "row",
6290
+ paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
6291
+ paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
6292
+ borderColor: "kitt.listItem.borderColor",
6293
+ backgroundColor: "kitt.uiBackgroundLight",
6294
+ borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
6295
+ borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
6358
6296
  ...containerProps,
6359
6297
  children: [left ? /*#__PURE__*/jsxRuntime.jsx(ListItemSideContainer, {
6360
6298
  side: "left",
@@ -6871,6 +6809,71 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
6871
6809
  'subtle-dark': theme.button['subtle-dark'],
6872
6810
  disabled: theme.button.disabled
6873
6811
  },
6812
+ choices: {
6813
+ item: {
6814
+ default: {
6815
+ backgroundColor: theme.choices.item.backgroundColor.default
6816
+ },
6817
+ disabled: {
6818
+ backgroundColor: theme.choices.item.backgroundColor.disabled,
6819
+ borderColor: theme.choices.item.disabled.border.color
6820
+ },
6821
+ selected: {
6822
+ backgroundColor: theme.choices.item.backgroundColor.selected
6823
+ },
6824
+ pressed: {
6825
+ backgroundColor: theme.choices.item.backgroundColor.pressed
6826
+ },
6827
+ hover: {
6828
+ backgroundColor: theme.choices.item.backgroundColor.hover
6829
+ },
6830
+ hoverWhenSelected: {
6831
+ backgroundColor: theme.choices.item.backgroundColor.hoverWhenSelected
6832
+ }
6833
+ }
6834
+ },
6835
+ tag: {
6836
+ primary: {
6837
+ fill: {
6838
+ backgroundColor: theme.tag.primary.fill.backgroundColor,
6839
+ borderColor: theme.tag.primary.fill.borderColor
6840
+ },
6841
+ outline: {
6842
+ backgroundColor: theme.tag.primary.outline.backgroundColor,
6843
+ borderColor: theme.tag.primary.outline.borderColor
6844
+ }
6845
+ },
6846
+ default: {
6847
+ fill: {
6848
+ backgroundColor: theme.tag.default.fill.backgroundColor,
6849
+ borderColor: theme.tag.default.fill.borderColor
6850
+ },
6851
+ outline: {
6852
+ backgroundColor: theme.tag.default.outline.backgroundColor,
6853
+ borderColor: theme.tag.default.outline.borderColor
6854
+ }
6855
+ },
6856
+ danger: {
6857
+ fill: {
6858
+ backgroundColor: theme.tag.danger.fill.backgroundColor,
6859
+ borderColor: theme.tag.danger.fill.borderColor
6860
+ },
6861
+ outline: {
6862
+ backgroundColor: theme.tag.danger.outline.backgroundColor,
6863
+ borderColor: theme.tag.danger.outline.borderColor
6864
+ }
6865
+ },
6866
+ warn: {
6867
+ fill: {
6868
+ backgroundColor: theme.tag.warn.fill.backgroundColor,
6869
+ borderColor: theme.tag.warn.fill.borderColor
6870
+ },
6871
+ outline: {
6872
+ backgroundColor: theme.tag.warn.outline.backgroundColor,
6873
+ borderColor: theme.tag.warn.outline.borderColor
6874
+ }
6875
+ }
6876
+ },
6874
6877
  tooltip: {
6875
6878
  backgroundColor: theme.tooltip.backgroundColor
6876
6879
  },
@@ -6894,6 +6897,17 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
6894
6897
  input: {
6895
6898
  states: theme.forms.input.states
6896
6899
  },
6900
+ inputTag: {
6901
+ danger: {
6902
+ backgroundColor: theme.forms.inputTag.danger.backgroundColor
6903
+ },
6904
+ default: {
6905
+ backgroundColor: theme.forms.inputTag.default.backgroundColor
6906
+ },
6907
+ success: {
6908
+ backgroundColor: theme.forms.inputTag.success.backgroundColor
6909
+ }
6910
+ },
6897
6911
  radioButtonGroup: {
6898
6912
  item: {
6899
6913
  borderColor: theme.forms.radioButtonGroup.item.borderColor,
@@ -6992,6 +7006,49 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
6992
7006
  dark: {
6993
7007
  backgroundColor: theme.highlight.dark.backgroundColor
6994
7008
  }
7009
+ },
7010
+ verticalSteps: {
7011
+ active: {
7012
+ icon: {
7013
+ backgroundColor: theme.verticalSteps.active.icon.backgroundColor,
7014
+ textColor: theme.verticalSteps.active.icon.textColor
7015
+ }
7016
+ },
7017
+ done: {
7018
+ icon: {
7019
+ backgroundColor: theme.verticalSteps.done.icon.backgroundColor,
7020
+ textColor: theme.verticalSteps.done.icon.textColor
7021
+ }
7022
+ },
7023
+ default: {
7024
+ icon: {
7025
+ backgroundColor: theme.verticalSteps.default.icon.backgroundColor,
7026
+ textColor: theme.verticalSteps.default.icon.textColor
7027
+ }
7028
+ }
7029
+ },
7030
+ listItem: {
7031
+ borderColor: theme.listItem.borderColor
7032
+ },
7033
+ picker: {
7034
+ ios: {
7035
+ item: {
7036
+ selected: {
7037
+ color: theme.picker.ios.selected.color
7038
+ }
7039
+ }
7040
+ },
7041
+ android: {
7042
+ item: {
7043
+ default: {
7044
+ backgroundColor: theme.picker.android.default.backgroundColor
7045
+ },
7046
+ selected: {
7047
+ color: theme.picker.android.selected.color,
7048
+ backgroundColor: theme.picker.android.selected.backgroundColor
7049
+ }
7050
+ }
7051
+ }
6995
7052
  }
6996
7053
  },
6997
7054
  app: appTheme?.colors
@@ -7027,6 +7084,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7027
7084
  cardModal: {
7028
7085
  borderRadius: theme.cardModal.borderRadius
7029
7086
  },
7087
+ choices: {
7088
+ item: {
7089
+ borderRadius: theme.choices.item.borderRadius
7090
+ }
7091
+ },
7030
7092
  dialogModal: {
7031
7093
  borderRadius: theme.dialogModal.borderRadius
7032
7094
  },
@@ -7034,6 +7096,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7034
7096
  input: {
7035
7097
  borderRadius: theme.forms.input.borderRadius
7036
7098
  },
7099
+ inputTag: {
7100
+ borderRadius: theme.forms.inputTag.borderRadius
7101
+ },
7037
7102
  radioButtonGroup: {
7038
7103
  item: {
7039
7104
  borderRadius: theme.forms.radioButtonGroup.item.borderRadius
@@ -7055,6 +7120,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7055
7120
  iconButton: {
7056
7121
  borderRadius: theme.iconButton.borderRadius
7057
7122
  },
7123
+ tag: {
7124
+ borderRadius: theme.tag.borderRadius
7125
+ },
7058
7126
  tooltip: {
7059
7127
  borderRadius: theme.tooltip.borderRadius
7060
7128
  },
@@ -7166,6 +7234,13 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7166
7234
  button: {
7167
7235
  borderWidth: theme.button.borderWidth
7168
7236
  },
7237
+ choices: {
7238
+ item: {
7239
+ disabled: {
7240
+ borderWidth: theme.choices.item.disabled.border.width
7241
+ }
7242
+ }
7243
+ },
7169
7244
  iconButton: {
7170
7245
  borderWidth: theme.iconButton.borderWidth
7171
7246
  },
@@ -7192,6 +7267,43 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7192
7267
  footer: {
7193
7268
  borderWidth: theme.cardModal.footer.borderWidth
7194
7269
  }
7270
+ },
7271
+ listItem: {
7272
+ borderWidth: theme.listItem.borderWidth
7273
+ },
7274
+ tag: {
7275
+ primary: {
7276
+ fill: {
7277
+ borderWidth: theme.tag.primary.fill.borderWidth
7278
+ },
7279
+ outline: {
7280
+ borderWidth: theme.tag.primary.outline.borderWidth
7281
+ }
7282
+ },
7283
+ default: {
7284
+ fill: {
7285
+ borderWidth: theme.tag.default.fill.borderWidth
7286
+ },
7287
+ outline: {
7288
+ borderWidth: theme.tag.default.outline.borderWidth
7289
+ }
7290
+ },
7291
+ danger: {
7292
+ fill: {
7293
+ borderWidth: theme.tag.danger.fill.borderWidth
7294
+ },
7295
+ outline: {
7296
+ borderWidth: theme.tag.danger.outline.borderWidth
7297
+ }
7298
+ },
7299
+ warn: {
7300
+ fill: {
7301
+ borderWidth: theme.tag.warn.fill.borderWidth
7302
+ },
7303
+ outline: {
7304
+ borderWidth: theme.tag.warn.outline.borderWidth
7305
+ }
7306
+ }
7195
7307
  }
7196
7308
  },
7197
7309
  app: appTheme?.borderWidths
@@ -7266,6 +7378,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7266
7378
  },
7267
7379
  textArea: {
7268
7380
  minHeight: theme.forms.textArea.minHeight
7381
+ },
7382
+ timePicker: {
7383
+ minWidth: theme.forms.timePicker.minWidth
7269
7384
  }
7270
7385
  },
7271
7386
  iconButton: {
@@ -7278,6 +7393,9 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7278
7393
  height: theme.fullscreenModal.header.height
7279
7394
  }
7280
7395
  },
7396
+ pageLoader: {
7397
+ size: theme.pageLoader.size
7398
+ },
7281
7399
  tooltip: {
7282
7400
  maxWidth: theme.tooltip.maxWidth,
7283
7401
  arrow: {
@@ -7297,6 +7415,16 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7297
7415
  size: theme.skeleton.shape.square.size
7298
7416
  }
7299
7417
  }
7418
+ },
7419
+ picker: {
7420
+ ios: {
7421
+ default: {
7422
+ height: theme.picker.ios.default.height
7423
+ },
7424
+ landscape: {
7425
+ height: theme.picker.ios.landscape.height
7426
+ }
7427
+ }
7300
7428
  }
7301
7429
  },
7302
7430
  app: appTheme?.sizes
@@ -7345,10 +7473,26 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7345
7473
  highlight: {
7346
7474
  padding: theme.highlight.padding
7347
7475
  },
7476
+ listItem: {
7477
+ verticalPadding: theme.listItem.verticalPadding,
7478
+ horizontalPadding: theme.listItem.horizontalPadding
7479
+ },
7480
+ tag: {
7481
+ verticalPadding: theme.tag.verticalPadding,
7482
+ horizontalPadding: theme.tag.horizontalPadding
7483
+ },
7348
7484
  tooltip: {
7349
7485
  horizontalPadding: theme.tooltip.horizontalPadding,
7350
7486
  verticalPadding: theme.tooltip.verticalPadding,
7351
7487
  floatingPadding: theme.tooltip.floatingPadding
7488
+ },
7489
+ picker: {
7490
+ android: {
7491
+ item: {
7492
+ verticalPadding: theme.picker.android.verticalPadding,
7493
+ horizontalPadding: theme.picker.android.horizontalPadding
7494
+ }
7495
+ }
7352
7496
  }
7353
7497
  },
7354
7498
  app: appTheme?.space
@@ -8208,30 +8352,27 @@ function AnimatedFilledCircle() {
8208
8352
  });
8209
8353
  }
8210
8354
 
8211
- const PageLoaderContainer = /*#__PURE__*/styled__default.View.withConfig({
8212
- displayName: "PageLoader__PageLoaderContainer",
8213
- componentId: "kitt-universal__sc-1l9zwqg-0"
8214
- })(["transform:scale(-1) rotate(90deg);position:relative;width:", "px;height:", "px;"], ({
8215
- theme
8216
- }) => theme.kitt.pageLoader.size, ({
8217
- theme
8218
- }) => theme.kitt.pageLoader.size);
8219
8355
  function PageLoader() {
8220
- return /*#__PURE__*/jsxRuntime.jsxs(PageLoaderContainer, {
8356
+ const sharedTransformStyle = {
8357
+ style: {
8358
+ /* Needed to make the animation starting from the top of the circles */
8359
+ transform: [{
8360
+ rotate: '90deg'
8361
+ }, {
8362
+ scale: -1
8363
+ }]
8364
+ }
8365
+ };
8366
+ return /*#__PURE__*/jsxRuntime.jsxs(View, {
8367
+ position: "relative",
8368
+ height: "kitt.pageLoader.size",
8369
+ width: "kitt.pageLoader.size",
8370
+ _ios: sharedTransformStyle,
8371
+ _android: sharedTransformStyle,
8221
8372
  children: [/*#__PURE__*/jsxRuntime.jsx(AnimatedBackgroundCircle, {}), /*#__PURE__*/jsxRuntime.jsx(AnimatedFilledCircle, {})]
8222
8373
  });
8223
8374
  }
8224
8375
 
8225
- const ContainerPressable = /*#__PURE__*/styled__default.Pressable.withConfig({
8226
- displayName: "PickerItem__ContainerPressable",
8227
- componentId: "kitt-universal__sc-w7n3sn-0"
8228
- })(["padding:", ";background-color:", ";"], ({
8229
- theme
8230
- }) => theme.kitt.picker.android.padding, ({
8231
- theme,
8232
- $isSelected
8233
- }) => $isSelected ? theme.kitt.picker.android.selected.backgroundColor : theme.kitt.picker.android.default.backgroundColor);
8234
-
8235
8376
  // This item is for Android only, iOS uses its own implementation and web is not supported yet
8236
8377
  function PickerItem({
8237
8378
  label,
@@ -8239,13 +8380,19 @@ function PickerItem({
8239
8380
  isSelected,
8240
8381
  onPress
8241
8382
  }) {
8242
- return /*#__PURE__*/jsxRuntime.jsx(ContainerPressable, {
8383
+ return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
8243
8384
  accessibilityRole: "button",
8244
8385
  accessibilityState: {
8245
8386
  selected: isSelected
8246
8387
  },
8247
- $isSelected: isSelected,
8248
- onPress: onPress ? () => onPress(value) : undefined,
8388
+ backgroundColor: isSelected ? 'kitt.picker.android.item.selected.backgroundColor' : 'kitt.picker.android.item.default.backgroundColor',
8389
+ paddingX: "kitt.picker.android.horizontalPadding",
8390
+ paddingY: "kitt.picker.android.verticalPadding",
8391
+ onPress: () => {
8392
+ if (onPress) {
8393
+ onPress(value);
8394
+ }
8395
+ },
8249
8396
  children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
8250
8397
  base: "body",
8251
8398
  color: isSelected ? 'white' : undefined,
@@ -8264,61 +8411,77 @@ function Picker({
8264
8411
  onValueSelected,
8265
8412
  onClose
8266
8413
  }) {
8414
+ const sx = nativeBase.useSx();
8415
+
8267
8416
  // 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)
8268
8417
  const [isMatchingMaxHeight] = nativeBase.useMediaQuery({
8269
8418
  maxHeight: 492
8270
8419
  });
8420
+ const iosItemStyle = sx({
8421
+ fontSize: 'baseAndSmall.body',
8422
+ lineHeight: 'baseAndSmall.body',
8423
+ fontFamily: 'bodies.regular',
8424
+ color: 'kitt.typography.black-light',
8425
+ // As it is displayed in a modal, we must hard code an height to ensure that the picker doesn't bleed out of it
8426
+ // We can't set a percentage as it will be computed based on the page height
8427
+ height: isMatchingMaxHeight ? 'kitt.picker.ios.landscape.height' : 'kitt.picker.ios.default.height'
8428
+ });
8429
+ const getIosTextStyle = isSelected => {
8430
+ return sx({
8431
+ color: isSelected ? 'kitt.picker.ios.selected.color' : undefined
8432
+ });
8433
+ };
8271
8434
  const [value, setValue] = React.useState(initialValue);
8272
- return /*#__PURE__*/jsxRuntime.jsxs(Modal, {
8435
+ return /*#__PURE__*/jsxRuntime.jsx(CardModal.ModalBehaviour, {
8273
8436
  visible: isVisible,
8274
8437
  onClose: onClose,
8275
- children: [/*#__PURE__*/jsxRuntime.jsx(Modal.Header, {
8276
- children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
8277
- base: "body",
8278
- variant: "bold",
8279
- children: title
8280
- })
8281
- }), reactNative.Platform.OS === 'ios' ? /*#__PURE__*/jsxRuntime.jsx(picker$1.Picker, {
8282
- testID: testID,
8283
- selectedValue: value
8284
- // As it is displayed in a modal, we must hard code an height to ensure that the picker doesn't bleed out of it
8285
- // We can't set a percentage as it will be computed based on the page height
8286
- ,
8287
- itemStyle: {
8288
- ...theme.picker.ios.default,
8289
- height: isMatchingMaxHeight ? theme.picker.ios.landscape.height : theme.picker.ios.default.height
8290
- },
8291
- onValueChange: itemValue => setValue(itemValue),
8292
- children: React__default.Children.map(children, child => {
8293
- const item = child;
8294
-
8295
- // iOS Picker doesn't support a custom Item component, we need to override its props manually for the selected one
8296
- return /*#__PURE__*/React.cloneElement(item, {
8297
- color: item.props.value === value ? theme.picker.ios.selected.color : undefined
8298
- });
8299
- })
8300
- }) : /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
8301
- testID: testID,
8302
- children: React__default.Children.map(children, child => {
8303
- const item = child;
8304
- return /*#__PURE__*/React.cloneElement(item, {
8305
- onPress: newValue => setValue(newValue),
8306
- isSelected: item.props.value === value
8307
- });
8308
- })
8309
- }), /*#__PURE__*/jsxRuntime.jsx(Modal.Footer, {
8310
- children: /*#__PURE__*/jsxRuntime.jsx(Button, {
8311
- stretch: true,
8312
- type: "primary",
8313
- onPress: () => {
8314
- onValueSelected(value);
8315
- onClose();
8316
- },
8317
- children: validateButtonLabel || /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
8318
- id: "kitt-universal.Picker.validate"
8438
+ children: /*#__PURE__*/jsxRuntime.jsxs(CardModal, {
8439
+ children: [/*#__PURE__*/jsxRuntime.jsx(CardModal.Header, {
8440
+ right: /*#__PURE__*/jsxRuntime.jsx(IconButton, {
8441
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.XIcon, {}),
8442
+ onPress: onClose
8443
+ }),
8444
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
8445
+ base: "body",
8446
+ variant: "bold",
8447
+ children: title
8319
8448
  })
8320
- })
8321
- })]
8449
+ }), reactNative.Platform.OS === 'ios' ? /*#__PURE__*/jsxRuntime.jsx(picker$1.Picker, {
8450
+ testID: testID,
8451
+ selectedValue: value,
8452
+ itemStyle: iosItemStyle,
8453
+ onValueChange: itemValue => setValue(itemValue),
8454
+ children: React__default.Children.map(children, child => {
8455
+ const item = child;
8456
+
8457
+ // iOS Picker doesn't support a custom Item component, we need to override its props manually for the selected one
8458
+ return /*#__PURE__*/React.cloneElement(item, {
8459
+ color: getIosTextStyle(item.props.value === value).color
8460
+ });
8461
+ })
8462
+ }) : /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
8463
+ testID: testID,
8464
+ children: React__default.Children.map(children, child => {
8465
+ const item = child;
8466
+ return /*#__PURE__*/React.cloneElement(item, {
8467
+ onPress: newValue => setValue(newValue),
8468
+ isSelected: item.props.value === value
8469
+ });
8470
+ })
8471
+ }), /*#__PURE__*/jsxRuntime.jsx(CardModal.Footer, {
8472
+ children: /*#__PURE__*/jsxRuntime.jsx(Button, {
8473
+ stretch: true,
8474
+ type: "primary",
8475
+ onPress: () => {
8476
+ onValueSelected(value);
8477
+ onClose();
8478
+ },
8479
+ children: validateButtonLabel || /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
8480
+ id: "kitt-universal.Picker.validate"
8481
+ })
8482
+ })
8483
+ })]
8484
+ })
8322
8485
  });
8323
8486
  }
8324
8487
  Picker.Item = PickerItem;
@@ -8372,14 +8535,6 @@ function SegmentedProgressBar({
8372
8535
  });
8373
8536
  }
8374
8537
 
8375
- const Container$2 = /*#__PURE__*/styled__default.View.withConfig({
8376
- displayName: "SkeletonContent__Container",
8377
- componentId: "kitt-universal__sc-1u3chjb-0"
8378
- })(["background-color:", ";border-color:", ";height:100%;width:100%;"], ({
8379
- theme
8380
- }) => theme.kitt.skeleton.backgroundColor, ({
8381
- theme
8382
- }) => theme.kitt.skeleton.flareColor);
8383
8538
  const AnimatedLinearGradient = Animated__default.createAnimatedComponent(expoLinearGradient.LinearGradient);
8384
8539
  function SkeletonContent({
8385
8540
  isLoading,
@@ -8410,11 +8565,15 @@ function SkeletonContent({
8410
8565
  };
8411
8566
  _f.asString = "function _f(){const{interpolate,sharedX,width}=jsThis._closure;{return{transform:[{translateX:interpolate(sharedX.value,[0,1],[-width,width])}]};}}";
8412
8567
  _f.__workletHash = 1670955855244;
8413
- _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (42:47)";
8568
+ _f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/Skeleton/SkeletonContent.tsx (36:47)";
8414
8569
  _f.__optimalization = 3;
8415
8570
  return _f;
8416
8571
  }());
8417
- return /*#__PURE__*/jsxRuntime.jsx(Container$2, {
8572
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
8573
+ height: "100%",
8574
+ width: "100%",
8575
+ backgroundColor: "kitt.skeleton.backgroundColor",
8576
+ borderColor: "kitt.skeleton.flareColor",
8418
8577
  children: /*#__PURE__*/jsxRuntime.jsx(AnimatedLinearGradient, {
8419
8578
  colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
8420
8579
  locations: [0.1, 0.5, 0.9],
@@ -8729,17 +8888,17 @@ StaticMap.Loader = StaticMapLoader;
8729
8888
  StaticMap.Error = StaticMapError;
8730
8889
  StaticMap.Marker = StaticMapMarker;
8731
8890
 
8732
- const Flex = /*#__PURE__*/styled__default.View.withConfig({
8733
- shouldForwardProp: (prop, defaultValidatorFn) => !['direction', 'padding'].includes(prop) && defaultValidatorFn(prop)
8734
- }).withConfig({
8735
- displayName: "Flex",
8736
- componentId: "kitt-universal__sc-15q3v3h-0"
8737
- })(["display:flex;flex-direction:", ";flex-wrap:wrap;padding:", "px;"], ({
8738
- direction
8739
- }) => direction, ({
8740
- theme,
8741
- padding = 0
8742
- }) => padding * theme.kitt.spacing);
8891
+ function Flex({
8892
+ direction,
8893
+ wrap = 'wrap',
8894
+ ...props
8895
+ }) {
8896
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
8897
+ ...props,
8898
+ flexDirection: direction,
8899
+ flexWrap: wrap
8900
+ });
8901
+ }
8743
8902
 
8744
8903
  const storyPadding = 'kitt.4';
8745
8904
 
@@ -9024,26 +9183,6 @@ const StoryGrid = {
9024
9183
  Col: StoryGridCol
9025
9184
  };
9026
9185
 
9027
- const Container$1 = /*#__PURE__*/styled__default.View.withConfig({
9028
- displayName: "Tag__Container",
9029
- componentId: "kitt-universal__sc-19jmowi-0"
9030
- })(["background-color:", ";border-width:", "px;border-color:", ";padding:", ";border-radius:", "px;align-self:flex-start;"], ({
9031
- theme,
9032
- type,
9033
- variant
9034
- }) => theme.kitt.tag[type][variant].backgroundColor, ({
9035
- theme,
9036
- type,
9037
- variant
9038
- }) => theme.kitt.tag[type][variant].borderWidth, ({
9039
- theme,
9040
- type,
9041
- variant
9042
- }) => theme.kitt.tag[type][variant].borderColor, ({
9043
- theme
9044
- }) => theme.kitt.tag.padding, ({
9045
- theme
9046
- }) => theme.kitt.tag.borderRadius);
9047
9186
  const getLabelColor = (type, variant) => {
9048
9187
  switch (type) {
9049
9188
  case 'danger':
@@ -9073,9 +9212,14 @@ function Tag({
9073
9212
  type = 'default',
9074
9213
  variant = 'fill'
9075
9214
  }) {
9076
- return /*#__PURE__*/jsxRuntime.jsx(Container$1, {
9077
- type: type,
9078
- variant: variant,
9215
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
9216
+ alignSelf: "flex-start",
9217
+ borderRadius: "kitt.tag.borderRadius",
9218
+ paddingX: "kitt.tag.horizontalPadding",
9219
+ paddingY: "kitt.tag.verticalPadding",
9220
+ backgroundColor: `kitt.tag.${type}.${variant}.backgroundColor`,
9221
+ borderColor: `kitt.tag.${type}.${variant}.borderColor`,
9222
+ borderWidth: `kitt.tag.${type}.${variant}.borderWidth`,
9079
9223
  children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
9080
9224
  base: "body-xsmall",
9081
9225
  color: getLabelColor(type, variant),
@@ -9084,176 +9228,187 @@ function Tag({
9084
9228
  });
9085
9229
  }
9086
9230
 
9087
- /** @deprecated use native-base instead for SSR compatibility */
9088
- const getTypographyTypeConfigKey = theme => {
9089
- const isMediumOrAbove = theme.responsive.matchWindowSize({
9090
- minWidth: KittBreakpoints.MEDIUM
9091
- });
9092
- return isMediumOrAbove ? 'mediumAndWide' : 'baseAndSmall';
9093
- };
9094
- /** @deprecated this mixin is not SSR compatible */
9095
- const styledTextInputMixin = /*#__PURE__*/styled.css(["background-color:", ";border-width:", "px;border-radius:", "px;border-color:", ";font-size:", ";color:", ";font-family:", ";"], ({
9096
- theme,
9097
- $state
9098
- }) => $state === 'disabled' ? theme.kitt.forms.input.states.disabled.backgroundColor : theme.kitt.forms.input.states.default.backgroundColor, ({
9099
- theme
9100
- }) => theme.kitt.forms.input.borderWidth, ({
9101
- theme
9102
- }) => theme.kitt.forms.input.borderRadius, ({
9103
- theme,
9104
- $state
9105
- }) => theme.kitt.forms.input.states[$state].borderColor, ({
9106
- theme
9107
- }) => {
9108
- const typeConfigKey = getTypographyTypeConfigKey(theme);
9109
- return `${theme.kitt.typography.types.bodies.configs.body[typeConfigKey].fontSize}px`;
9110
- }, ({
9111
- theme,
9112
- $state
9113
- }) => theme.kitt.forms.input.states[$state].color || theme.kitt.forms.input.states.default.color, ({
9114
- theme
9115
- }) => reactNative.Platform.OS === 'web' ? theme.kitt.typography.types.bodies.fontFamily.web.regular : theme.kitt.typography.types.bodies.fontFamily.native.regular);
9116
-
9117
- function Title({
9118
- children
9119
- }) {
9120
- return /*#__PURE__*/jsxRuntime.jsx(Modal.Header, {
9121
- children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
9122
- base: "body",
9123
- variant: "bold",
9124
- children: children
9125
- })
9126
- });
9127
- }
9128
9231
  function ModalDateTimePicker({
9129
9232
  title,
9130
9233
  visible,
9131
9234
  value,
9132
9235
  validateButtonLabel,
9236
+ testID,
9237
+ pickerTestID,
9133
9238
  onChange,
9134
9239
  onClose
9135
9240
  }) {
9136
9241
  const [currentValue, setCurrentValue] = React.useState(value);
9137
9242
 
9138
9243
  // Prevent unsynced value between the modal and its parent state
9139
-
9140
- return /*#__PURE__*/jsxRuntime.jsx(Modal, {
9244
+ const handleClose = () => {
9245
+ setCurrentValue(value);
9246
+ onClose();
9247
+ };
9248
+ const handleChange = nextDate => {
9249
+ if (nextDate) setCurrentValue(nextDate);
9250
+ };
9251
+ const buttonContent = validateButtonLabel || /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
9252
+ id: "kitt-universal.ModalDateTimePicker.confirm"
9253
+ });
9254
+ return /*#__PURE__*/jsxRuntime.jsx(CardModal.ModalBehaviour, {
9141
9255
  visible: Boolean(visible),
9142
- onClose: () => {
9143
- setCurrentValue(value);
9144
- onClose();
9145
- },
9146
- children: visible ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
9147
- children: [title ? /*#__PURE__*/jsxRuntime.jsx(Title, {
9148
- children: title
9149
- }) : null, /*#__PURE__*/jsxRuntime.jsx(Modal.Body, {
9256
+ onClose: handleClose,
9257
+ children: /*#__PURE__*/jsxRuntime.jsxs(CardModal, {
9258
+ testID: testID,
9259
+ children: [title ? /*#__PURE__*/jsxRuntime.jsx(CardModal.Header, {
9260
+ title: title,
9261
+ right: /*#__PURE__*/jsxRuntime.jsx(IconButton, {
9262
+ testID: "timePicker.ModalDateTimePicker.closeButton",
9263
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.XIcon, {}),
9264
+ onPress: handleClose
9265
+ })
9266
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(CardModal.Body, {
9150
9267
  children: /*#__PURE__*/jsxRuntime.jsx(DateTimePicker__default, {
9151
9268
  is24Hour: true,
9152
- testID: "timePicker.ModalDateTimePicker.dateTimeNativePicker",
9269
+ testID: pickerTestID,
9153
9270
  value: currentValue,
9154
9271
  mode: "time",
9155
9272
  display: reactNative.Platform.OS === 'ios' ? 'spinner' : 'default',
9156
- onChange: (_event, date) => setCurrentValue(prev => {
9157
- return date || prev;
9158
- })
9273
+ onChange: (event, date) => handleChange(date)
9159
9274
  })
9160
- }), /*#__PURE__*/jsxRuntime.jsx(Modal.Footer, {
9275
+ }), /*#__PURE__*/jsxRuntime.jsx(CardModal.Footer, {
9161
9276
  children: /*#__PURE__*/jsxRuntime.jsx(Button, {
9162
9277
  stretch: true,
9278
+ testID: "timePicker.ModalDateTimePicker.submitButton",
9163
9279
  type: "primary",
9164
9280
  onPress: () => {
9165
9281
  onChange(currentValue);
9166
9282
  },
9167
- children: validateButtonLabel ? /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
9168
- children: validateButtonLabel
9169
- }) : /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
9170
- id: "kitt-universal.ModalDateTimePicker.confirm"
9171
- })
9283
+ children: buttonContent
9172
9284
  })
9173
9285
  })]
9174
- }) : null
9286
+ })
9175
9287
  });
9176
9288
  }
9177
9289
 
9178
- const timePickerPlaceholder = '--:--';
9179
- const formatNumberToTimeString = time => `${String(time).padStart(2, '0')}`;
9180
- const formatDateToTimeString = date => `${formatNumberToTimeString(date.getHours())}:${formatNumberToTimeString(date.getMinutes())}`;
9181
- const useTimePicker = (value, onChange, onBlur, disabled, defaultValue, isDefaultVisible) => {
9182
- const [isTimePickerModalVisible, setIsTimePickerModalVisible] = React.useState(Boolean(isDefaultVisible));
9183
- const todayAtNoon = React.useMemo(() => {
9184
- const now = new Date(2000, 0, 1, 12);
9185
- return new Date(now.getFullYear(), now.getMonth(), now.getDay(), 12);
9186
- }, []);
9187
- const defaultDate = defaultValue || todayAtNoon;
9188
- const dateTimePickerValue = value || defaultDate;
9189
- const displayedValue = value === null ? timePickerPlaceholder : formatDateToTimeString(dateTimePickerValue);
9190
- const timePickerState = isTimePickerModalVisible ? 'focus' : 'default';
9191
- return {
9192
- dateTimePickerValue,
9193
- displayedValue,
9194
- timePickerState,
9195
- isTimePickerModalVisible,
9196
- handleInputPress: () => {
9197
- if (disabled) {
9198
- return;
9199
- }
9200
- setIsTimePickerModalVisible(true);
9201
- },
9202
- handleTimeChange: date => {
9203
- setIsTimePickerModalVisible(false);
9204
- onChange(date || defaultDate);
9205
- onBlur();
9206
- },
9207
- handleModalClose: () => setIsTimePickerModalVisible(false)
9208
- };
9209
- };
9290
+ function formatNumberToTimeString(time) {
9291
+ return `${String(time).padStart(2, '0')}`;
9292
+ }
9293
+ function formatDateToTimeString(date) {
9294
+ return `${formatNumberToTimeString(date.getHours())}:${formatNumberToTimeString(date.getMinutes())}`;
9295
+ }
9296
+
9297
+ function getCurrentInternalForcedState({
9298
+ isDisabled,
9299
+ isHoveredInternal,
9300
+ isFocusedInternal,
9301
+ isPressedInternal
9302
+ }) {
9303
+ if (isDisabled) return 'disabled';
9304
+ if (isHoveredInternal) return 'hover';
9305
+ if (isFocusedInternal) return 'focus';
9306
+ if (isPressedInternal) return 'hover';
9307
+ return 'default';
9308
+ }
9309
+
9310
+ function TimePickerPressable({
9311
+ testID,
9312
+ disabled,
9313
+ stretch,
9314
+ value,
9315
+ placeholder,
9316
+ isHoveredInternal,
9317
+ isFocusedInternal,
9318
+ isPressedInternal,
9319
+ onPress
9320
+ }) {
9321
+ return /*#__PURE__*/jsxRuntime.jsx(Pressable, {
9322
+ testID: testID,
9323
+ disabled: disabled,
9324
+ accessibilityRole: "button",
9325
+ width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
9326
+ onPress: onPress,
9327
+ children: ({
9328
+ isHovered,
9329
+ isFocused,
9330
+ isPressed
9331
+ }) => /*#__PURE__*/jsxRuntime.jsxs(View, {
9332
+ position: "relative",
9333
+ children: [/*#__PURE__*/jsxRuntime.jsx(InputText, {
9334
+ internalForceState: getCurrentInternalForcedState({
9335
+ isDisabled: disabled,
9336
+ isHoveredInternal: isHovered || isHoveredInternal,
9337
+ isFocusedInternal: isFocused || isFocusedInternal,
9338
+ isPressedInternal: isPressed || isPressedInternal
9339
+ }),
9340
+ value: value ? formatDateToTimeString(value) : undefined,
9341
+ placeholder: placeholder,
9342
+ disabled: disabled,
9343
+ textAlign: "center"
9344
+ }), /*#__PURE__*/jsxRuntime.jsx(View, {
9345
+ position: "absolute",
9346
+ top: "0",
9347
+ left: "0",
9348
+ height: "100%",
9349
+ width: "100%"
9350
+ })]
9351
+ })
9352
+ });
9353
+ }
9210
9354
 
9211
- const Container = /*#__PURE__*/styled__default.Pressable.withConfig({
9212
- displayName: "TimePicker__Container",
9213
- componentId: "kitt-universal__sc-18zhpwp-0"
9214
- })(["", " width:100px;height:40px;justify-content:center;align-items:center;"], styledTextInputMixin);
9215
9355
  function TimePicker({
9216
9356
  title,
9217
- state = 'default',
9218
9357
  disabled = false,
9219
- forceDefaultValue,
9358
+ stretch,
9220
9359
  value,
9221
9360
  validateButtonLabel,
9222
9361
  isDefaultVisible,
9362
+ placeholder = '--:--',
9363
+ testID,
9364
+ modalTestID,
9365
+ pickerTestID = 'timePicker.ModalDateTimePicker.dateTimeNativePicker',
9366
+ isHoveredInternal,
9367
+ isFocusedInternal,
9368
+ isPressedInternal,
9223
9369
  onChange,
9224
9370
  onBlur
9225
9371
  }) {
9226
- const {
9227
- dateTimePickerValue,
9228
- displayedValue,
9229
- timePickerState,
9230
- handleInputPress,
9231
- handleModalClose,
9232
- handleTimeChange,
9233
- isTimePickerModalVisible
9234
- } = useTimePicker(value || null, onChange, onBlur, disabled, forceDefaultValue, isDefaultVisible);
9235
- return /*#__PURE__*/jsxRuntime.jsxs(Container, {
9236
- $state: timePickerState === 'default' ? state : timePickerState,
9237
- accessibilityRole: "button",
9238
- onPress: handleInputPress,
9239
- children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
9240
- base: "body",
9241
- color: displayedValue === timePickerPlaceholder ? 'black-light' : 'black',
9242
- children: displayedValue
9243
- }), reactNative.Platform.OS === 'android' && isTimePickerModalVisible ? /*#__PURE__*/jsxRuntime.jsx(DateTimePicker__default, {
9372
+ const [currentValue, setCurrentValue] = React.useState(value);
9373
+ const [isPickerVisible, setIsPickerVisible] = React.useState(isDefaultVisible);
9374
+ const handleChange = nextDate => {
9375
+ setCurrentValue(nextDate);
9376
+ setIsPickerVisible(false);
9377
+ if (onChange) onChange(nextDate);
9378
+ if (onBlur) onBlur();
9379
+ };
9380
+ const pickerValue = currentValue || new Date();
9381
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
9382
+ children: [/*#__PURE__*/jsxRuntime.jsx(TimePickerPressable, {
9383
+ testID: testID,
9384
+ disabled: disabled,
9385
+ stretch: stretch,
9386
+ value: currentValue,
9387
+ placeholder: placeholder,
9388
+ isHoveredInternal: isHoveredInternal,
9389
+ isFocusedInternal: isFocusedInternal,
9390
+ isPressedInternal: isPressedInternal,
9391
+ onPress: () => {
9392
+ setIsPickerVisible(true);
9393
+ }
9394
+ }), reactNative.Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsxRuntime.jsx(DateTimePicker__default, {
9244
9395
  is24Hour: true,
9245
- testID: "timePicker.TimePicker.dateTimeNativePicker",
9246
- value: dateTimePickerValue,
9396
+ testID: pickerTestID,
9397
+ value: pickerValue,
9247
9398
  mode: "time",
9248
9399
  display: "default",
9249
- onChange: (_event, date) => handleTimeChange(date)
9400
+ onChange: (event, date) => handleChange(date)
9250
9401
  }) : null, reactNative.Platform.OS !== 'android' ? /*#__PURE__*/jsxRuntime.jsx(ModalDateTimePicker, {
9402
+ visible: isPickerVisible,
9251
9403
  title: title,
9252
- visible: isTimePickerModalVisible,
9253
- value: dateTimePickerValue,
9404
+ testID: modalTestID,
9405
+ pickerTestID: pickerTestID,
9406
+ value: pickerValue,
9254
9407
  validateButtonLabel: validateButtonLabel,
9255
- onChange: handleTimeChange,
9256
- onClose: handleModalClose
9408
+ onChange: handleChange,
9409
+ onClose: () => {
9410
+ setIsPickerVisible(false);
9411
+ }
9257
9412
  }) : null]
9258
9413
  });
9259
9414
  }
@@ -9756,6 +9911,128 @@ function withTheme(WrappedComponent) {
9756
9911
  });
9757
9912
  }
9758
9913
 
9914
+ const backgroundColors = {
9915
+ done: 'kitt.verticalSteps.done.icon.backgroundColor',
9916
+ active: 'kitt.verticalSteps.active.icon.backgroundColor',
9917
+ default: 'kitt.verticalSteps.default.icon.backgroundColor'
9918
+ };
9919
+ function IconStatus({
9920
+ state,
9921
+ index
9922
+ }) {
9923
+ if (state === 'done') {
9924
+ return /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
9925
+ icon: /*#__PURE__*/jsxRuntime.jsx(kittIcons.CheckIcon, {}),
9926
+ color: "kitt.verticalSteps.done.icon.textColor"
9927
+ });
9928
+ }
9929
+ if (state === 'active') {
9930
+ return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
9931
+ textAlign: "center",
9932
+ variant: "bold",
9933
+ color: "kitt.verticalSteps.active.icon.textColor",
9934
+ children: index + 1
9935
+ });
9936
+ }
9937
+ return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
9938
+ textAlign: "center",
9939
+ variant: "bold",
9940
+ color: "kitt.verticalSteps.default.icon.textColor",
9941
+ children: index + 1
9942
+ });
9943
+ }
9944
+ function StepIcon({
9945
+ index,
9946
+ state = 'default'
9947
+ }) {
9948
+ return /*#__PURE__*/jsxRuntime.jsx(View, {
9949
+ justifyContent: "center",
9950
+ alignItems: "center",
9951
+ width: 30,
9952
+ height: 30,
9953
+ borderRadius: 15,
9954
+ backgroundColor: backgroundColors[state],
9955
+ children: /*#__PURE__*/jsxRuntime.jsx(IconStatus, {
9956
+ state: state,
9957
+ index: index
9958
+ })
9959
+ });
9960
+ }
9961
+
9962
+ function ExternalStep() {
9963
+ return null;
9964
+ }
9965
+ function Step({
9966
+ index = 0,
9967
+ children,
9968
+ state = 'default',
9969
+ isLast = false,
9970
+ shouldDisableNextLink = false
9971
+ }) {
9972
+ return /*#__PURE__*/jsxRuntime.jsxs(nativeBase.HStack, {
9973
+ space: "kitt.2",
9974
+ flexGrow: 1,
9975
+ children: [/*#__PURE__*/jsxRuntime.jsxs(View, {
9976
+ marginTop: "kitt.2",
9977
+ paddingY: "kitt.2",
9978
+ backgroundColor: "kitt.white",
9979
+ children: [/*#__PURE__*/jsxRuntime.jsx(StepIcon, {
9980
+ state: state,
9981
+ index: index
9982
+ }), !isLast ? /*#__PURE__*/jsxRuntime.jsx(View, {
9983
+ backgroundColor: shouldDisableNextLink ? 'kitt.palettes.lateOcean.black100' : 'kitt.palettes.lateOcean.moonPurple',
9984
+ width: 1,
9985
+ position: "absolute",
9986
+ top: 46,
9987
+ left: 15,
9988
+ zIndex: -1,
9989
+ height: "100%"
9990
+ }) : null]
9991
+ }), /*#__PURE__*/jsxRuntime.jsx(View, {
9992
+ flexGrow: 1,
9993
+ children: /*#__PURE__*/jsxRuntime.jsx(ActionCard, {
9994
+ variant: "primary",
9995
+ children: children
9996
+ })
9997
+ })]
9998
+ });
9999
+ }
10000
+
10001
+ function getStepState(index, activeIndex) {
10002
+ if (index === activeIndex) {
10003
+ return 'active';
10004
+ }
10005
+ if (index < activeIndex) {
10006
+ return 'done';
10007
+ }
10008
+ return 'default';
10009
+ }
10010
+
10011
+ function VerticalSteps({
10012
+ children,
10013
+ activeIndex,
10014
+ ...props
10015
+ }) {
10016
+ return /*#__PURE__*/jsxRuntime.jsx(nativeBase.VStack, {
10017
+ space: "kitt.4",
10018
+ width: "100%",
10019
+ ...props,
10020
+ children: React.Children.map(children, (child, index) => {
10021
+ if ((process.env.NODE_ENV !== "production") && child.type !== ExternalStep) {
10022
+ throw new Error('VerticalSteps only accepts VerticalSteps.Step as children');
10023
+ }
10024
+ const isLast = index === React.Children.count(children) - 1;
10025
+ return /*#__PURE__*/React.createElement(Step, {
10026
+ ...child.props,
10027
+ index,
10028
+ isLast,
10029
+ state: getStepState(index, activeIndex)
10030
+ }, child.props.children);
10031
+ })
10032
+ });
10033
+ }
10034
+ VerticalSteps.Step = ExternalStep;
10035
+
9759
10036
  exports.useBreakpointValue = nativeBase.useBreakpointValue;
9760
10037
  exports.useClipboard = nativeBase.useClipboard;
9761
10038
  exports.useMediaQuery = nativeBase.useMediaQuery;
@@ -9842,6 +10119,7 @@ exports.TypographyEmoji = TypographyEmoji;
9842
10119
  exports.TypographyIcon = TypographyIcon;
9843
10120
  exports.TypographyLink = TypographyLink;
9844
10121
  exports.VStack = VStack;
10122
+ exports.VerticalSteps = VerticalSteps;
9845
10123
  exports.View = View;
9846
10124
  exports.createChoicesComponent = createChoicesComponent;
9847
10125
  exports.createResponsiveStyleFromProp = createResponsiveStyleFromProp;