@ornikar/kitt-universal 23.2.7 → 23.4.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 (58) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/definitions/BottomSheet/useStaticBottomSheet.d.ts +3 -3
  3. package/dist/definitions/BottomSheet/useStaticBottomSheet.d.ts.map +1 -1
  4. package/dist/definitions/Tag/Tag.d.ts +10 -6
  5. package/dist/definitions/Tag/Tag.d.ts.map +1 -1
  6. package/dist/definitions/forms/DocumentPicker/DocumentPicker.d.ts +15 -0
  7. package/dist/definitions/forms/DocumentPicker/DocumentPicker.d.ts.map +1 -0
  8. package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActions.d.ts +13 -0
  9. package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActions.d.ts.map +1 -0
  10. package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActionsItem.d.ts +7 -0
  11. package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActionsItem.d.ts.map +1 -0
  12. package/dist/definitions/forms/FilePicker/FilePicker.d.ts +17 -0
  13. package/dist/definitions/forms/FilePicker/FilePicker.d.ts.map +1 -0
  14. package/dist/definitions/forms/FilePicker/FilePicker.web.d.ts +4 -0
  15. package/dist/definitions/forms/FilePicker/FilePicker.web.d.ts.map +1 -0
  16. package/dist/definitions/forms/ImagePicker/ImagePicker.d.ts +15 -0
  17. package/dist/definitions/forms/ImagePicker/ImagePicker.d.ts.map +1 -0
  18. package/dist/definitions/index.d.ts +7 -2
  19. package/dist/definitions/index.d.ts.map +1 -1
  20. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +43 -78
  21. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  22. package/dist/definitions/themes/late-ocean/tag.d.ts +22 -14
  23. package/dist/definitions/themes/late-ocean/tag.d.ts.map +1 -1
  24. package/dist/index-metro.es.android.js +463 -319
  25. package/dist/index-metro.es.android.js.map +1 -1
  26. package/dist/index-metro.es.ios.js +463 -319
  27. package/dist/index-metro.es.ios.js.map +1 -1
  28. package/dist/index-node-20.10.cjs.js +383 -238
  29. package/dist/index-node-20.10.cjs.js.map +1 -1
  30. package/dist/index-node-20.10.cjs.web.js +214 -155
  31. package/dist/index-node-20.10.cjs.web.js.map +1 -1
  32. package/dist/index-node-20.10.es.mjs +383 -241
  33. package/dist/index-node-20.10.es.mjs.map +1 -1
  34. package/dist/index-node-20.10.es.web.mjs +212 -156
  35. package/dist/index-node-20.10.es.web.mjs.map +1 -1
  36. package/dist/index.es.js +496 -314
  37. package/dist/index.es.js.map +1 -1
  38. package/dist/index.es.web.js +257 -157
  39. package/dist/index.es.web.js.map +1 -1
  40. package/dist/linaria-themes-metro.es.android.js +38 -44
  41. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  42. package/dist/linaria-themes-metro.es.ios.js +38 -44
  43. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  44. package/dist/linaria-themes-node-20.10.cjs.js +38 -44
  45. package/dist/linaria-themes-node-20.10.cjs.js.map +1 -1
  46. package/dist/linaria-themes-node-20.10.cjs.web.js +38 -44
  47. package/dist/linaria-themes-node-20.10.cjs.web.js.map +1 -1
  48. package/dist/linaria-themes-node-20.10.es.mjs +38 -44
  49. package/dist/linaria-themes-node-20.10.es.mjs.map +1 -1
  50. package/dist/linaria-themes-node-20.10.es.web.mjs +38 -44
  51. package/dist/linaria-themes-node-20.10.es.web.mjs.map +1 -1
  52. package/dist/linaria-themes.es.js +38 -44
  53. package/dist/linaria-themes.es.js.map +1 -1
  54. package/dist/linaria-themes.es.web.js +38 -44
  55. package/dist/linaria-themes.es.web.js.map +1 -1
  56. package/dist/tsbuildinfo +1 -1
  57. package/package.json +5 -2
  58. package/translations/fr-FR.json +2 -0
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState, useMemo, Children, useReducer, useCallback, Fragment as Fragment$1, createElement } from 'react';
3
+ import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState, useMemo, Children, useReducer, Fragment as Fragment$1, useCallback, createElement } from 'react';
4
4
  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, useBreakpointValue as useBreakpointValue$1, NativeBaseProvider, extendTheme, useMediaQuery } from 'native-base';
5
5
  export { useClipboard, useMediaQuery, useSx, useToken } from 'native-base';
6
6
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -15,7 +15,7 @@ import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
15
15
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
16
16
  import { ArcIcon, UserIcon, MapPinIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, RotateCCWIcon } from '@ornikar/kitt-icons';
17
17
  export * from '@ornikar/kitt-icons';
18
- import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
18
+ import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop, useBottomSheetModal } from '@gorhom/bottom-sheet';
19
19
  import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
20
20
  import { parse } from 'twemoji-parser';
21
21
  import * as WebBrowser from 'expo-web-browser';
@@ -23,6 +23,8 @@ import { CaretUpFillIcon, CaretDownFillIcon, EyeClosedRegularIcon, EyeRegularIco
23
23
  import Downshift from 'downshift';
24
24
  import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
25
25
  import { FormattedMessage } from 'react-intl';
26
+ import { getDocumentAsync } from 'expo-document-picker';
27
+ import { launchImageLibraryAsync } from 'expo-image-picker';
26
28
  import { useDebouncedCallback } from 'use-debounce';
27
29
  import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
28
30
  import Svg, { Circle as Circle$1 } from 'react-native-svg';
@@ -1659,57 +1661,51 @@ var skeleton = {
1659
1661
  };
1660
1662
 
1661
1663
  var tag = {
1662
- borderRadius: 10,
1663
- padding: '2px 12px',
1664
- verticalPadding: 2,
1665
- horizontalPadding: 12,
1666
- primary: {
1667
- fill: {
1668
- backgroundColor: lateOceanColorPalette.moonPurpleLight1,
1669
- borderWidth: 0,
1670
- borderColor: colors.transparent
1671
- },
1672
- outline: {
1673
- backgroundColor: colors.transparent,
1674
- borderWidth: 1,
1675
- borderColor: colors.primary
1676
- }
1664
+ borderRadius: 16,
1665
+ icon: {
1666
+ small: 16,
1667
+ medium: 16,
1668
+ large: 20
1677
1669
  },
1678
- "default": {
1679
- fill: {
1680
- backgroundColor: lateOceanColorPalette.black50,
1681
- borderWidth: 0,
1682
- borderColor: colors.transparent
1670
+ withIcon: {
1671
+ small: {
1672
+ paddingLeft: 2,
1673
+ paddingRight: 8,
1674
+ height: 20
1683
1675
  },
1684
- outline: {
1685
- backgroundColor: colors.transparent,
1686
- borderWidth: 1,
1687
- borderColor: colors.black
1688
- }
1689
- },
1690
- danger: {
1691
- fill: {
1692
- backgroundColor: colors.danger,
1693
- borderWidth: 0,
1694
- borderColor: colors.transparent
1676
+ medium: {
1677
+ paddingLeft: 4,
1678
+ paddingRight: 8,
1679
+ height: 24
1695
1680
  },
1696
- outline: {
1697
- backgroundColor: colors.transparent,
1698
- borderWidth: 1,
1699
- borderColor: colors.danger
1681
+ large: {
1682
+ paddingLeft: 6,
1683
+ paddingRight: 8,
1684
+ height: 32
1700
1685
  }
1701
1686
  },
1702
- warn: {
1703
- fill: {
1704
- backgroundColor: colors.warning,
1705
- borderWidth: 0,
1706
- borderColor: colors.transparent
1687
+ withoutIcon: {
1688
+ small: {
1689
+ paddingLeft: 8,
1690
+ paddingRight: 8,
1691
+ height: 20
1707
1692
  },
1708
- outline: {
1709
- backgroundColor: colors.transparent,
1710
- borderWidth: 1,
1711
- borderColor: colors.warning
1693
+ medium: {
1694
+ paddingLeft: 8,
1695
+ paddingRight: 8,
1696
+ height: 22
1697
+ },
1698
+ large: {
1699
+ paddingLeft: 8,
1700
+ paddingRight: 8,
1701
+ height: 28
1712
1702
  }
1703
+ },
1704
+ fill: {
1705
+ borderWidth: 0
1706
+ },
1707
+ outline: {
1708
+ borderWidth: 1
1713
1709
  }
1714
1710
  };
1715
1711
 
@@ -1907,7 +1903,7 @@ function ActionCardDisabled(_ref) {
1907
1903
  });
1908
1904
  }
1909
1905
 
1910
- var _excluded$M = ["children", "variant", "borderVariant", "disabled", "isHovered", "isPressed", "isFocused"];
1906
+ var _excluded$N = ["children", "variant", "borderVariant", "disabled", "isHovered", "isPressed", "isFocused"];
1911
1907
  function ActionCard(_ref) {
1912
1908
  var children = _ref.children,
1913
1909
  _ref$variant = _ref.variant,
@@ -1918,7 +1914,7 @@ function ActionCard(_ref) {
1918
1914
  isHovered = _ref.isHovered,
1919
1915
  isPressed = _ref.isPressed,
1920
1916
  isFocused = _ref.isFocused,
1921
- props = _objectWithoutProperties(_ref, _excluded$M);
1917
+ props = _objectWithoutProperties(_ref, _excluded$N);
1922
1918
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
1923
1919
  children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
1924
1920
  variant: variant,
@@ -2142,7 +2138,7 @@ var getTypographyFamilyWithAncestorValue = function (type, typographyFamilyInCon
2142
2138
  throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
2143
2139
  };
2144
2140
 
2145
- var _excluded$L = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
2141
+ var _excluded$M = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
2146
2142
  var TypographyFamilyContext = /*#__PURE__*/createContext(null);
2147
2143
  var TypographyTypeContext = /*#__PURE__*/createContext(null);
2148
2144
  var TypographyColorContext = /*#__PURE__*/createContext('black');
@@ -2196,7 +2192,7 @@ function Typography(_ref) {
2196
2192
  } : _ref$type,
2197
2193
  variant = _ref.variant,
2198
2194
  color = _ref.color,
2199
- otherProps = _objectWithoutProperties(_ref, _excluded$L);
2195
+ otherProps = _objectWithoutProperties(_ref, _excluded$M);
2200
2196
  var sx = useSx();
2201
2197
  var typographyFamilyInContext = useContext(TypographyFamilyContext);
2202
2198
  var defaultColor = useTypographyDefaultColor();
@@ -2307,7 +2303,7 @@ function Icon(_ref) {
2307
2303
  });
2308
2304
  }
2309
2305
 
2310
- var _excluded$K = ["color", "size"],
2306
+ var _excluded$L = ["color", "size"],
2311
2307
  _excluded2$5 = ["color"];
2312
2308
  function getIconSizeConfigKeyFromTypeName(breakpointName) {
2313
2309
  return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
@@ -2328,7 +2324,7 @@ function createNativeBaseIconSize(type) {
2328
2324
  function TypographyIconSpecifiedColor(_ref) {
2329
2325
  var color = _ref.color,
2330
2326
  size = _ref.size,
2331
- props = _objectWithoutProperties(_ref, _excluded$K);
2327
+ props = _objectWithoutProperties(_ref, _excluded$L);
2332
2328
  var ancestorType = useTypographyAncestorType();
2333
2329
  var iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
2334
2330
  var colorValue = getTypographyColorValue(color);
@@ -2377,7 +2373,7 @@ var getButtonTextColorByType = function (type, variant, isHovered, isPressed) {
2377
2373
  }
2378
2374
  };
2379
2375
 
2380
- var _excluded$J = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
2376
+ var _excluded$K = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
2381
2377
  function ButtonIcon(_ref) {
2382
2378
  var icon = _ref.icon,
2383
2379
  color = _ref.color,
@@ -2452,7 +2448,7 @@ function ButtonContent(_ref3) {
2452
2448
  isHovered = _ref3.isHovered,
2453
2449
  isPressed = _ref3.isPressed;
2454
2450
  _ref3.isFocused;
2455
- var props = _objectWithoutProperties(_ref3, _excluded$J);
2451
+ var props = _objectWithoutProperties(_ref3, _excluded$K);
2456
2452
  var color = isDisabled ? 'black-light' : getButtonTextColorByType(type, variant, isHovered, isPressed);
2457
2453
  return /*#__PURE__*/jsx(View, {
2458
2454
  _web: {
@@ -2745,7 +2741,7 @@ function LoaderIcon(_ref) {
2745
2741
  });
2746
2742
  }
2747
2743
 
2748
- var _excluded$I = ["as", "onPress", "disabled", "icon", "stretch"];
2744
+ var _excluded$J = ["as", "onPress", "disabled", "icon", "stretch"];
2749
2745
  var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
2750
2746
  var as = _ref.as,
2751
2747
  onPress = _ref.onPress,
@@ -2756,7 +2752,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
2756
2752
  base: true,
2757
2753
  medium: false
2758
2754
  } : _ref$stretch,
2759
- props = _objectWithoutProperties(_ref, _excluded$I);
2755
+ props = _objectWithoutProperties(_ref, _excluded$J);
2760
2756
  var _useState = useState(false),
2761
2757
  _useState2 = _slicedToArray(_useState, 2),
2762
2758
  isLoading = _useState2[0],
@@ -2829,7 +2825,7 @@ function ActionsButton(_ref) {
2829
2825
  }, props));
2830
2826
  }
2831
2827
 
2832
- var _excluded$H = ["children", "layout", "reversed"];
2828
+ var _excluded$I = ["children", "layout", "reversed"];
2833
2829
  function getCurrentLayout(layout) {
2834
2830
  if (!layout) return {
2835
2831
  base: 'stretch',
@@ -2858,7 +2854,7 @@ function Actions(_ref) {
2858
2854
  var children = _ref.children,
2859
2855
  layout = _ref.layout,
2860
2856
  reversed = _ref.reversed,
2861
- props = _objectWithoutProperties(_ref, _excluded$H);
2857
+ props = _objectWithoutProperties(_ref, _excluded$I);
2862
2858
  var currentAlignItems = getCurrentLayout(layout);
2863
2859
  var currentDirection = getCurrentDirection(layout);
2864
2860
  var currentAlignSelf = getCurrentAlignSelf(layout);
@@ -2907,7 +2903,7 @@ function getInitials(firstname, lastname) {
2907
2903
  return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
2908
2904
  }
2909
2905
 
2910
- var _excluded$G = ["size", "round", "light", "sizeVariant"];
2906
+ var _excluded$H = ["size", "round", "light", "sizeVariant"];
2911
2907
  function AvatarContent(_ref) {
2912
2908
  var size = _ref.size,
2913
2909
  src = _ref.src,
@@ -2946,7 +2942,7 @@ function Avatar(_ref2) {
2946
2942
  round = _ref2.round,
2947
2943
  light = _ref2.light,
2948
2944
  sizeVariant = _ref2.sizeVariant,
2949
- props = _objectWithoutProperties(_ref2, _excluded$G);
2945
+ props = _objectWithoutProperties(_ref2, _excluded$H);
2950
2946
  var currentSize = getCurrentSize({
2951
2947
  size: size,
2952
2948
  sizeVariant: sizeVariant
@@ -3292,13 +3288,13 @@ function CardModalAnimation(_ref) {
3292
3288
  });
3293
3289
  }
3294
3290
 
3295
- var _excluded$F = ["children", "visible", "onClose", "onExited"];
3291
+ var _excluded$G = ["children", "visible", "onClose", "onExited"];
3296
3292
  function CardModalBehaviour(_ref) {
3297
3293
  var children = _ref.children,
3298
3294
  visible = _ref.visible,
3299
3295
  onClose = _ref.onClose,
3300
3296
  onExited = _ref.onExited,
3301
- props = _objectWithoutProperties(_ref, _excluded$F);
3297
+ props = _objectWithoutProperties(_ref, _excluded$G);
3302
3298
  var _useState = useState(visible),
3303
3299
  _useState2 = _slicedToArray(_useState, 2),
3304
3300
  isModalBehaviourVisible = _useState2[0],
@@ -3323,7 +3319,7 @@ function CardModalBehaviour(_ref) {
3323
3319
  });
3324
3320
  }
3325
3321
 
3326
- var _excluded$E = ["children", "paddingX", "paddingY"];
3322
+ var _excluded$F = ["children", "paddingX", "paddingY"];
3327
3323
  function CardModalBody(_ref) {
3328
3324
  var children = _ref.children,
3329
3325
  _ref$paddingX = _ref.paddingX,
@@ -3333,7 +3329,7 @@ function CardModalBody(_ref) {
3333
3329
  } : _ref$paddingX,
3334
3330
  _ref$paddingY = _ref.paddingY,
3335
3331
  paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
3336
- props = _objectWithoutProperties(_ref, _excluded$E);
3332
+ props = _objectWithoutProperties(_ref, _excluded$F);
3337
3333
  return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
3338
3334
  showsVerticalScrollIndicator: false,
3339
3335
  _contentContainerStyle: {
@@ -3345,7 +3341,7 @@ function CardModalBody(_ref) {
3345
3341
  }));
3346
3342
  }
3347
3343
 
3348
- var _excluded$D = ["children", "padding", "hasSeparator"];
3344
+ var _excluded$E = ["children", "padding", "hasSeparator"];
3349
3345
  function CardModalFooter(_ref) {
3350
3346
  var children = _ref.children,
3351
3347
  _ref$padding = _ref.padding,
@@ -3355,7 +3351,7 @@ function CardModalFooter(_ref) {
3355
3351
  } : _ref$padding,
3356
3352
  _ref$hasSeparator = _ref.hasSeparator,
3357
3353
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
3358
- props = _objectWithoutProperties(_ref, _excluded$D);
3354
+ props = _objectWithoutProperties(_ref, _excluded$E);
3359
3355
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
3360
3356
  marginTop: "kitt.2",
3361
3357
  padding: padding,
@@ -3369,7 +3365,7 @@ function CardModalFooter(_ref) {
3369
3365
  }));
3370
3366
  }
3371
3367
 
3372
- var _excluded$C = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
3368
+ var _excluded$D = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
3373
3369
  function CardModalHeader(_ref) {
3374
3370
  var children = _ref.children,
3375
3371
  title = _ref.title,
@@ -3382,7 +3378,7 @@ function CardModalHeader(_ref) {
3382
3378
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
3383
3379
  right = _ref.right,
3384
3380
  left = _ref.left,
3385
- props = _objectWithoutProperties(_ref, _excluded$C);
3381
+ props = _objectWithoutProperties(_ref, _excluded$D);
3386
3382
  var defaultContainerPadding = {
3387
3383
  base: 'kitt.4',
3388
3384
  medium: 'kitt.6'
@@ -3420,7 +3416,7 @@ function CardModalHeader(_ref) {
3420
3416
  }));
3421
3417
  }
3422
3418
 
3423
- var _excluded$B = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
3419
+ var _excluded$C = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
3424
3420
  function CardModal(_ref) {
3425
3421
  var _ref$backgroundColor = _ref.backgroundColor,
3426
3422
  backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
@@ -3431,7 +3427,7 @@ function CardModal(_ref) {
3431
3427
  header = _ref.header,
3432
3428
  body = _ref.body,
3433
3429
  footer = _ref.footer,
3434
- props = _objectWithoutProperties(_ref, _excluded$B);
3430
+ props = _objectWithoutProperties(_ref, _excluded$C);
3435
3431
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
3436
3432
  overflow: "hidden",
3437
3433
  backgroundColor: backgroundColor,
@@ -3648,10 +3644,10 @@ function ChoiceItemContainer(_ref) {
3648
3644
  });
3649
3645
  }
3650
3646
 
3651
- var _excluded$A = ["direction"];
3647
+ var _excluded$B = ["direction"];
3652
3648
  function ChoicesContainer(_ref) {
3653
3649
  var direction = _ref.direction,
3654
- props = _objectWithoutProperties(_ref, _excluded$A);
3650
+ props = _objectWithoutProperties(_ref, _excluded$B);
3655
3651
  if (direction === 'row') {
3656
3652
  return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
3657
3653
  horizontal: true
@@ -3876,13 +3872,13 @@ function DialogModalAnimation(_ref) {
3876
3872
  });
3877
3873
  }
3878
3874
 
3879
- var _excluded$z = ["children", "visible", "onClose", "onExited"];
3875
+ var _excluded$A = ["children", "visible", "onClose", "onExited"];
3880
3876
  function DialogModalBehaviour(_ref) {
3881
3877
  var children = _ref.children,
3882
3878
  visible = _ref.visible,
3883
3879
  onClose = _ref.onClose,
3884
3880
  onExited = _ref.onExited,
3885
- props = _objectWithoutProperties(_ref, _excluded$z);
3881
+ props = _objectWithoutProperties(_ref, _excluded$A);
3886
3882
  var _useState = useState(visible),
3887
3883
  _useState2 = _slicedToArray(_useState, 2),
3888
3884
  isModalBehaviourVisible = _useState2[0],
@@ -3913,7 +3909,7 @@ function DialogModalBehaviour(_ref) {
3913
3909
  });
3914
3910
  }
3915
3911
 
3916
- var _excluded$y = ["stretch"];
3912
+ var _excluded$z = ["stretch"];
3917
3913
  function DialogModal(_ref) {
3918
3914
  var illustration = _ref.illustration,
3919
3915
  title = _ref.title,
@@ -3953,7 +3949,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
3953
3949
  function DialogModalButton(_ref2) {
3954
3950
  var _ref2$stretch = _ref2.stretch,
3955
3951
  stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
3956
- props = _objectWithoutProperties(_ref2, _excluded$y);
3952
+ props = _objectWithoutProperties(_ref2, _excluded$z);
3957
3953
  return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
3958
3954
  stretch: stretch
3959
3955
  }, props));
@@ -3990,7 +3986,7 @@ function Emoji(_ref) {
3990
3986
  });
3991
3987
  }
3992
3988
 
3993
- var _excluded$x = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
3989
+ var _excluded$y = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
3994
3990
  _excluded2$4 = ["phoneNumber", "children"],
3995
3991
  _excluded3$3 = ["phoneNumber", "children"],
3996
3992
  _excluded4$3 = ["emailAddress", "children"];
@@ -4000,7 +3996,7 @@ function ExternalAppLink(_ref) {
4000
3996
  appValue = _ref.appValue,
4001
3997
  onPress = _ref.onPress,
4002
3998
  onOpenAppError = _ref.onOpenAppError,
4003
- rest = _objectWithoutProperties(_ref, _excluded$x);
3999
+ rest = _objectWithoutProperties(_ref, _excluded$y);
4004
4000
  var href = "".concat(appScheme, ":").concat(appValue);
4005
4001
  var handleOnPress = /*#__PURE__*/function () {
4006
4002
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
@@ -4126,7 +4122,7 @@ function useOpenExternalLink() {
4126
4122
  }();
4127
4123
  }
4128
4124
 
4129
- var _excluded$w = ["as", "href", "openLinkBehavior", "onPress", "onOpenLinkError"];
4125
+ var _excluded$x = ["as", "href", "openLinkBehavior", "onPress", "onOpenLinkError"];
4130
4126
  function ExternalLink(_ref) {
4131
4127
  var Component = _ref.as,
4132
4128
  href = _ref.href,
@@ -4135,7 +4131,7 @@ function ExternalLink(_ref) {
4135
4131
  onPress = _ref.onPress,
4136
4132
  _ref$onOpenLinkError = _ref.onOpenLinkError,
4137
4133
  onOpenLinkError = _ref$onOpenLinkError === void 0 ? console.error : _ref$onOpenLinkError,
4138
- rest = _objectWithoutProperties(_ref, _excluded$w);
4134
+ rest = _objectWithoutProperties(_ref, _excluded$x);
4139
4135
  var openExternalLink = useOpenExternalLink();
4140
4136
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4141
4137
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
@@ -4192,7 +4188,7 @@ function InputTextContainer(_ref) {
4192
4188
  });
4193
4189
  }
4194
4190
 
4195
- var _excluded$v = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "onSubmitEditing"];
4191
+ var _excluded$w = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "onSubmitEditing"];
4196
4192
  var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
4197
4193
  var id = _ref.id,
4198
4194
  right = _ref.right;
@@ -4212,7 +4208,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
4212
4208
  inputMode = _ref$inputMode === void 0 ? 'text' : _ref$inputMode,
4213
4209
  multiline = _ref.multiline,
4214
4210
  onSubmitEditing = _ref.onSubmitEditing,
4215
- props = _objectWithoutProperties(_ref, _excluded$v);
4211
+ props = _objectWithoutProperties(_ref, _excluded$w);
4216
4212
  var theme = useTheme();
4217
4213
  var fontSizeForNativeBase = createNativeBaseFontSize({
4218
4214
  base: 'body'
@@ -4329,10 +4325,10 @@ function AutocompleteItemsListContainer(_ref) {
4329
4325
  });
4330
4326
  }
4331
4327
 
4332
- var _excluded$u = ["children"];
4328
+ var _excluded$v = ["children"];
4333
4329
  function AutocompleteOption(_ref) {
4334
4330
  var children = _ref.children,
4335
- props = _objectWithoutProperties(_ref, _excluded$u);
4331
+ props = _objectWithoutProperties(_ref, _excluded$v);
4336
4332
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
4337
4333
  paddingX: {
4338
4334
  base: 'kitt.2',
@@ -4344,7 +4340,7 @@ function AutocompleteOption(_ref) {
4344
4340
  }));
4345
4341
  }
4346
4342
 
4347
- var _excluded$t = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex"],
4343
+ var _excluded$u = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex"],
4348
4344
  _excluded2$3 = ["onClick", "onPress"],
4349
4345
  _excluded3$2 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
4350
4346
  _excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
@@ -4383,7 +4379,7 @@ function Autocomplete(_ref) {
4383
4379
  listContainerTestID = _ref$listContainerTes === void 0 ? 'kitt.Autocomplete.listContainer' : _ref$listContainerTes,
4384
4380
  _ref$zIndex = _ref.zIndex,
4385
4381
  zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
4386
- props = _objectWithoutProperties(_ref, _excluded$t);
4382
+ props = _objectWithoutProperties(_ref, _excluded$u);
4387
4383
  var childrenArray = Children.toArray(_children);
4388
4384
  var items = childrenArray.filter(isReactElement).map(function (child) {
4389
4385
  return {
@@ -4922,7 +4918,7 @@ function PartContainer(_ref) {
4922
4918
  });
4923
4919
  }
4924
4920
 
4925
- var _excluded$s = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
4921
+ var _excluded$t = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
4926
4922
  var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
4927
4923
  var id = _ref.id,
4928
4924
  value = _ref.value,
@@ -4940,7 +4936,7 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
4940
4936
  onBlur = _ref.onBlur,
4941
4937
  onFocus = _ref.onFocus,
4942
4938
  onSubmitEditing = _ref.onSubmitEditing;
4943
- _objectWithoutProperties(_ref, _excluded$s);
4939
+ _objectWithoutProperties(_ref, _excluded$t);
4944
4940
  var monthRef = useRef(null);
4945
4941
  var yearRef = useRef(null);
4946
4942
  var defaultValue = value;
@@ -5152,7 +5148,7 @@ var PressableDateInputs = /*#__PURE__*/forwardRef(function (_ref, ref) {
5152
5148
  });
5153
5149
  });
5154
5150
 
5155
- var _excluded$r = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
5151
+ var _excluded$s = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
5156
5152
  var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
5157
5153
  var onBlur = _ref.onBlur,
5158
5154
  onFocus = _ref.onFocus,
@@ -5161,7 +5157,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
5161
5157
  isDefaultVisible = _ref.isDefaultVisible,
5162
5158
  value = _ref.value,
5163
5159
  _onChange = _ref.onChange,
5164
- props = _objectWithoutProperties(_ref, _excluded$r);
5160
+ props = _objectWithoutProperties(_ref, _excluded$s);
5165
5161
  var _useState = useState(false),
5166
5162
  _useState2 = _slicedToArray(_useState, 2),
5167
5163
  isFocused = _useState2[0],
@@ -5237,7 +5233,7 @@ function PlatformDateTimePicker(_ref) {
5237
5233
  }));
5238
5234
  }
5239
5235
 
5240
- var _excluded$q = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
5236
+ var _excluded$r = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
5241
5237
  function ModalTitle(_ref) {
5242
5238
  var children = _ref.children;
5243
5239
  return /*#__PURE__*/jsx(CardModal.Header, {
@@ -5255,7 +5251,7 @@ function ModalPlatformDateTimePicker(_ref2) {
5255
5251
  validateButtonLabel = _ref2.validateButtonLabel,
5256
5252
  onClose = _ref2.onClose,
5257
5253
  onChange = _ref2.onChange,
5258
- props = _objectWithoutProperties(_ref2, _excluded$q);
5254
+ props = _objectWithoutProperties(_ref2, _excluded$r);
5259
5255
  var _useState = useState(value),
5260
5256
  _useState2 = _slicedToArray(_useState, 2),
5261
5257
  currentValue = _useState2[0],
@@ -5301,7 +5297,7 @@ function ModalPlatformDateTimePicker(_ref2) {
5301
5297
  });
5302
5298
  }
5303
5299
 
5304
- var _excluded$p = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
5300
+ var _excluded$q = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
5305
5301
  var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5306
5302
  var value = _ref.value,
5307
5303
  pickerUITestID = _ref.pickerUITestID,
@@ -5315,7 +5311,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5315
5311
  onChange = _ref.onChange,
5316
5312
  onFocus = _ref.onFocus,
5317
5313
  onBlur = _ref.onBlur,
5318
- props = _objectWithoutProperties(_ref, _excluded$p);
5314
+ props = _objectWithoutProperties(_ref, _excluded$q);
5319
5315
  var _useState = useState(isDefaultVisible),
5320
5316
  _useState2 = _slicedToArray(_useState, 2),
5321
5317
  isPickerUIVisible = _useState2[0],
@@ -5362,7 +5358,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5362
5358
  });
5363
5359
  });
5364
5360
 
5365
- var _excluded$o = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
5361
+ var _excluded$p = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
5366
5362
  var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5367
5363
  var value = _ref.value,
5368
5364
  pickerUITestID = _ref.pickerUITestID,
@@ -5370,7 +5366,7 @@ var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5370
5366
  pickerDefaultDate = _ref.pickerDefaultDate,
5371
5367
  onChange = _ref.onChange,
5372
5368
  onBlur = _ref.onBlur,
5373
- props = _objectWithoutProperties(_ref, _excluded$o);
5369
+ props = _objectWithoutProperties(_ref, _excluded$p);
5374
5370
  if (Platform.OS === 'android') {
5375
5371
  return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
5376
5372
  ref: ref,
@@ -5392,14 +5388,14 @@ var NativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5392
5388
  }, props));
5393
5389
  });
5394
5390
 
5395
- var _excluded$n = ["fillMode", "enterKeyHint", "value", "onSubmitEditing"];
5391
+ var _excluded$o = ["fillMode", "enterKeyHint", "value", "onSubmitEditing"];
5396
5392
  var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5397
5393
  var _ref$fillMode = _ref.fillMode,
5398
5394
  fillMode = _ref$fillMode === void 0 ? 'native' : _ref$fillMode,
5399
5395
  enterKeyHint = _ref.enterKeyHint,
5400
5396
  value = _ref.value,
5401
5397
  onSubmitEditing = _ref.onSubmitEditing,
5402
- props = _objectWithoutProperties(_ref, _excluded$n);
5398
+ props = _objectWithoutProperties(_ref, _excluded$o);
5403
5399
  // in apps, final-form can give a string value that will break the component
5404
5400
  var currentValue = value || undefined;
5405
5401
  if (fillMode === 'keyboard') {
@@ -5418,6 +5414,272 @@ var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
5418
5414
  }));
5419
5415
  });
5420
5416
 
5417
+ function DocumentPicker(_ref) {
5418
+ var onDocumentUpload = _ref.onDocumentUpload,
5419
+ children = _ref.children,
5420
+ disabled = _ref.disabled,
5421
+ documentPickerOptions = _ref.documentPickerOptions;
5422
+ var childElement = Children.only(children);
5423
+ var handlePickDocument = /*#__PURE__*/function () {
5424
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5425
+ var _childElement$props$o, _childElement$props;
5426
+ var result;
5427
+ return _regeneratorRuntime().wrap(function (_context) {
5428
+ while (1) switch (_context.prev = _context.next) {
5429
+ case 0:
5430
+ if (!disabled) {
5431
+ _context.next = 2;
5432
+ break;
5433
+ }
5434
+ return _context.abrupt("return");
5435
+ case 2:
5436
+ (_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
5437
+ _context.next = 5;
5438
+ return getDocumentAsync(_objectSpread(_objectSpread({}, documentPickerOptions), {}, {
5439
+ multiple: false
5440
+ }));
5441
+ case 5:
5442
+ result = _context.sent;
5443
+ if (!result.canceled && result.assets[0].file) {
5444
+ onDocumentUpload(result.assets[0].file);
5445
+ }
5446
+ case 7:
5447
+ case "end":
5448
+ return _context.stop();
5449
+ }
5450
+ }, _callee);
5451
+ }));
5452
+ return function () {
5453
+ return _ref2.apply(this, arguments);
5454
+ };
5455
+ }();
5456
+ return /*#__PURE__*/cloneElement(childElement, {
5457
+ // ensure that the press event is not prevented by Button component
5458
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
5459
+ onPress: handlePickDocument,
5460
+ disabled: disabled
5461
+ });
5462
+ }
5463
+
5464
+ function ImagePicker(_ref) {
5465
+ var onImageSelected = _ref.onImageSelected,
5466
+ children = _ref.children,
5467
+ disabled = _ref.disabled,
5468
+ imagePickerOptions = _ref.imagePickerOptions;
5469
+ var childElement = Children.only(children);
5470
+ var handlePickImage = /*#__PURE__*/function () {
5471
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5472
+ var _childElement$props$o, _childElement$props;
5473
+ var result;
5474
+ return _regeneratorRuntime().wrap(function (_context) {
5475
+ while (1) switch (_context.prev = _context.next) {
5476
+ case 0:
5477
+ if (!disabled) {
5478
+ _context.next = 2;
5479
+ break;
5480
+ }
5481
+ return _context.abrupt("return");
5482
+ case 2:
5483
+ (_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
5484
+
5485
+ // No permissions request is necessary for launching the image library
5486
+ _context.next = 5;
5487
+ return launchImageLibraryAsync(_objectSpread(_objectSpread({}, imagePickerOptions), {}, {
5488
+ allowsMultipleSelection: false
5489
+ }));
5490
+ case 5:
5491
+ result = _context.sent;
5492
+ if (!result.canceled) {
5493
+ onImageSelected(result.assets[0]);
5494
+ }
5495
+ case 7:
5496
+ case "end":
5497
+ return _context.stop();
5498
+ }
5499
+ }, _callee);
5500
+ }));
5501
+ return function () {
5502
+ return _ref2.apply(this, arguments);
5503
+ };
5504
+ }();
5505
+ return /*#__PURE__*/jsx(View, {
5506
+ children: /*#__PURE__*/cloneElement(childElement, {
5507
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
5508
+ onPress: handlePickImage,
5509
+ disabled: disabled
5510
+ })
5511
+ });
5512
+ }
5513
+
5514
+ var _excluded$n = ["children"];
5515
+ function ListItemContent(_ref) {
5516
+ var children = _ref.children,
5517
+ rest = _objectWithoutProperties(_ref, _excluded$n);
5518
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
5519
+ alignSelf: "center",
5520
+ flexBasis: "0%",
5521
+ flexGrow: 1,
5522
+ flexShrink: 0
5523
+ }, rest), {}, {
5524
+ children: children
5525
+ }));
5526
+ }
5527
+
5528
+ var _excluded$m = ["children", "side"],
5529
+ _excluded2$2 = ["children", "align"];
5530
+ // Handles the vertical alignment of the side elements of the list item
5531
+ function ListItemSideContainer(_ref) {
5532
+ var children = _ref.children,
5533
+ _ref$side = _ref.side,
5534
+ side = _ref$side === void 0 ? 'left' : _ref$side,
5535
+ rest = _objectWithoutProperties(_ref, _excluded$m);
5536
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
5537
+ flexDirection: "row",
5538
+ marginLeft: side === 'right' ? 'kitt.2' : undefined,
5539
+ marginRight: side === 'left' ? 'kitt.2' : undefined
5540
+ }, rest), {}, {
5541
+ children: children
5542
+ }));
5543
+ }
5544
+ function ListItemSideContent(_ref2) {
5545
+ var children = _ref2.children,
5546
+ _ref2$align = _ref2.align,
5547
+ align = _ref2$align === void 0 ? 'auto' : _ref2$align,
5548
+ rest = _objectWithoutProperties(_ref2, _excluded2$2);
5549
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
5550
+ alignSelf: align
5551
+ }, rest), {}, {
5552
+ children: children
5553
+ }));
5554
+ }
5555
+
5556
+ var _excluded$l = ["children", "withPadding", "borders", "left", "right", "onPress"];
5557
+ function ListItem(_ref) {
5558
+ var children = _ref.children,
5559
+ withPadding = _ref.withPadding,
5560
+ borders = _ref.borders,
5561
+ left = _ref.left,
5562
+ right = _ref.right,
5563
+ onPress = _ref.onPress,
5564
+ rest = _objectWithoutProperties(_ref, _excluded$l);
5565
+ var Wrapper = onPress ? Pressable$2 : Fragment$1;
5566
+ var wrapperProps = onPress ? _objectSpread({
5567
+ accessibilityRole: 'button',
5568
+ onPress: onPress
5569
+ }, rest) : undefined;
5570
+ var containerProps = onPress ? undefined : rest;
5571
+ return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
5572
+ children: /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
5573
+ flexDirection: "row",
5574
+ paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
5575
+ paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
5576
+ borderColor: "kitt.listItem.borderColor",
5577
+ backgroundColor: "kitt.uiBackgroundLight",
5578
+ borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
5579
+ borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined
5580
+ }, containerProps), {}, {
5581
+ children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
5582
+ side: "left",
5583
+ children: left
5584
+ }) : null, /*#__PURE__*/jsx(ListItemContent, {
5585
+ children: children
5586
+ }), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
5587
+ side: "right",
5588
+ children: right
5589
+ }) : null]
5590
+ }))
5591
+ }));
5592
+ }
5593
+ ListItem.Content = ListItemContent;
5594
+ ListItem.SideContent = ListItemSideContent;
5595
+ ListItem.SideContainer = ListItemSideContainer;
5596
+
5597
+ var _excluded$k = ["title"];
5598
+ function BottomSheetActionsItem(_ref) {
5599
+ var title = _ref.title,
5600
+ props = _objectWithoutProperties(_ref, _excluded$k);
5601
+ return /*#__PURE__*/jsx(Pressable$2, _objectSpread(_objectSpread({}, props), {}, {
5602
+ children: /*#__PURE__*/jsx(ListItem, {
5603
+ withPadding: true,
5604
+ children: /*#__PURE__*/jsx(Typography.Text, {
5605
+ variant: "bold",
5606
+ base: "body",
5607
+ children: title
5608
+ })
5609
+ })
5610
+ }));
5611
+ }
5612
+
5613
+ function BottomSheetActions(_ref) {
5614
+ var onBottomSheetActionsChange = _ref.onBottomSheetActionsChange,
5615
+ imagePickerOptions = _ref.imagePickerOptions,
5616
+ documentPickerOptions = _ref.documentPickerOptions,
5617
+ disabled = _ref.disabled;
5618
+ var isPlatformIOS = Platform.OS === 'ios';
5619
+ return /*#__PURE__*/jsxs(VStack, {
5620
+ marginBottom: "kitt.8",
5621
+ children: [/*#__PURE__*/jsx(ImagePicker, {
5622
+ imagePickerOptions: imagePickerOptions,
5623
+ disabled: disabled,
5624
+ onImageSelected: onBottomSheetActionsChange,
5625
+ children: /*#__PURE__*/jsx(BottomSheetActionsItem, {
5626
+ title: /*#__PURE__*/jsx(FormattedMessage, {
5627
+ id: "account.BottomSheetActions.openLibrary",
5628
+ values: {
5629
+ isPlatformIOS: isPlatformIOS
5630
+ }
5631
+ })
5632
+ })
5633
+ }), /*#__PURE__*/jsx(DocumentPicker, {
5634
+ disabled: disabled,
5635
+ documentPickerOptions: documentPickerOptions,
5636
+ onDocumentUpload: onBottomSheetActionsChange,
5637
+ children: /*#__PURE__*/jsx(BottomSheetActionsItem, {
5638
+ title: /*#__PURE__*/jsx(FormattedMessage, {
5639
+ id: "account.BottomSheetActions.openFileExplorer",
5640
+ values: {
5641
+ isPlatformIOS: isPlatformIOS
5642
+ }
5643
+ })
5644
+ })
5645
+ })]
5646
+ });
5647
+ }
5648
+
5649
+ function FilePicker(_ref) {
5650
+ var onFileSelected = _ref.onFileSelected,
5651
+ children = _ref.children,
5652
+ disabled = _ref.disabled,
5653
+ imagePickerOptions = _ref.imagePickerOptions,
5654
+ documentPickerOptions = _ref.documentPickerOptions;
5655
+ var childElement = Children.only(children);
5656
+ var _useStaticBottomSheet = useStaticBottomSheet(BottomSheetActions),
5657
+ bottomSheetRef = _useStaticBottomSheet.bottomSheetRef,
5658
+ BottomSheet = _useStaticBottomSheet.BottomSheet;
5659
+ var _useBottomSheetModal = useBottomSheetModal(),
5660
+ dismissAll = _useBottomSheetModal.dismissAll;
5661
+ var handleBottomSheetActionsChange = function (file) {
5662
+ dismissAll();
5663
+ onFileSelected(file);
5664
+ };
5665
+ return /*#__PURE__*/jsxs(Fragment, {
5666
+ children: [/*#__PURE__*/cloneElement(childElement, {
5667
+ // ensure that the press event is not prevented by Button component
5668
+ onPress: function onPress() {
5669
+ var _childElement$props$o, _childElement$props, _bottomSheetRef$curre;
5670
+ if (disabled) return;
5671
+ (_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
5672
+ (_bottomSheetRef$curre = bottomSheetRef.current) === null || _bottomSheetRef$curre === void 0 || _bottomSheetRef$curre.present({
5673
+ onBottomSheetActionsChange: handleBottomSheetActionsChange,
5674
+ imagePickerOptions: imagePickerOptions,
5675
+ documentPickerOptions: documentPickerOptions
5676
+ });
5677
+ },
5678
+ disabled: disabled
5679
+ }), /*#__PURE__*/jsx(BottomSheet, {})]
5680
+ });
5681
+ }
5682
+
5421
5683
  var GoogleMapsApiKeyContext = /*#__PURE__*/createContext(undefined);
5422
5684
  function GoogleMapsApiKeyProvider(_ref) {
5423
5685
  var children = _ref.children,
@@ -5878,7 +6140,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
5878
6140
  };
5879
6141
  }
5880
6142
 
5881
- var _excluded$m = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
6143
+ var _excluded$j = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
5882
6144
  function InputAddress(_ref) {
5883
6145
  var initialValue = _ref.initialValue,
5884
6146
  _ref$itemToString = _ref.itemToString,
@@ -5886,7 +6148,7 @@ function InputAddress(_ref) {
5886
6148
  errorElement = _ref.errorElement,
5887
6149
  emptyResultsElement = _ref.emptyResultsElement,
5888
6150
  _onChange = _ref.onChange,
5889
- props = _objectWithoutProperties(_ref, _excluded$m);
6151
+ props = _objectWithoutProperties(_ref, _excluded$j);
5890
6152
  var _useGoogleMapsAutocom = useGoogleMapsAutocomplete(),
5891
6153
  state = _useGoogleMapsAutocom.state,
5892
6154
  _onInputChange = _useGoogleMapsAutocom.onInputChange,
@@ -5976,10 +6238,10 @@ function InputField(_ref) {
5976
6238
  });
5977
6239
  }
5978
6240
 
5979
- var _excluded$l = ["onChange"];
6241
+ var _excluded$i = ["onChange"];
5980
6242
  var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
5981
6243
  var onChange = _ref.onChange,
5982
- props = _objectWithoutProperties(_ref, _excluded$l);
6244
+ props = _objectWithoutProperties(_ref, _excluded$i);
5983
6245
  return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
5984
6246
  ref: ref
5985
6247
  }, props), {}, {
@@ -5996,11 +6258,11 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
5996
6258
  }));
5997
6259
  });
5998
6260
 
5999
- var _excluded$k = ["isPasswordDefaultVisible", "right"];
6261
+ var _excluded$h = ["isPasswordDefaultVisible", "right"];
6000
6262
  var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
6001
6263
  var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
6002
6264
  right = _ref.right,
6003
- props = _objectWithoutProperties(_ref, _excluded$k);
6265
+ props = _objectWithoutProperties(_ref, _excluded$h);
6004
6266
  var _useState = useState(Boolean(isPasswordDefaultVisible)),
6005
6267
  _useState2 = _slicedToArray(_useState, 2),
6006
6268
  isVisible = _useState2[0],
@@ -6028,7 +6290,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
6028
6290
  }));
6029
6291
  });
6030
6292
 
6031
- var _excluded$j = ["enterKeyHint", "autoComplete", "phoneNumberLength", "value", "onChange"];
6293
+ var _excluded$g = ["enterKeyHint", "autoComplete", "phoneNumberLength", "value", "onChange"];
6032
6294
  function isPhoneNumberValid(number) {
6033
6295
  return isValidNumber(number);
6034
6296
  }
@@ -6043,7 +6305,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
6043
6305
  phoneNumberLength = _ref$phoneNumberLengt === void 0 ? 10 : _ref$phoneNumberLengt,
6044
6306
  value = _ref.value,
6045
6307
  onChange = _ref.onChange,
6046
- props = _objectWithoutProperties(_ref, _excluded$j);
6308
+ props = _objectWithoutProperties(_ref, _excluded$g);
6047
6309
  var _useState = useState(value),
6048
6310
  _useState2 = _slicedToArray(_useState, 2),
6049
6311
  currentValue = _useState2[0],
@@ -6478,7 +6740,7 @@ function RadioButton(_ref) {
6478
6740
  });
6479
6741
  }
6480
6742
 
6481
- var _excluded$i = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
6743
+ var _excluded$f = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
6482
6744
  function RadioButtonGroupItem(_ref) {
6483
6745
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
6484
6746
  return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
@@ -6491,7 +6753,7 @@ function RadioButtonGroup(_ref2) {
6491
6753
  onFocus = _ref2.onFocus,
6492
6754
  onBlur = _ref2.onBlur,
6493
6755
  onChange = _ref2.onChange,
6494
- props = _objectWithoutProperties(_ref2, _excluded$i);
6756
+ props = _objectWithoutProperties(_ref2, _excluded$f);
6495
6757
  var _useState = useState(value),
6496
6758
  _useState2 = _slicedToArray(_useState, 2),
6497
6759
  currentValue = _useState2[0],
@@ -6533,13 +6795,13 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
6533
6795
  }, props));
6534
6796
  });
6535
6797
 
6536
- var _excluded$h = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
6798
+ var _excluded$e = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
6537
6799
  function FullscreenModalBody(_ref) {
6538
6800
  var children = _ref.children,
6539
6801
  shouldHandleBottomNotch = _ref.shouldHandleBottomNotch,
6540
6802
  style = _ref.style,
6541
6803
  shouldHandleTopNotch = _ref.shouldHandleTopNotch,
6542
- props = _objectWithoutProperties(_ref, _excluded$h);
6804
+ props = _objectWithoutProperties(_ref, _excluded$e);
6543
6805
  var _useSafeAreaInsets = useSafeAreaInsets(),
6544
6806
  bottom = _useSafeAreaInsets.bottom,
6545
6807
  top = _useSafeAreaInsets.top;
@@ -6556,14 +6818,14 @@ function FullscreenModalBody(_ref) {
6556
6818
  }));
6557
6819
  }
6558
6820
 
6559
- var _excluded$g = ["shouldHandleBottomNotch", "hasSeparator", "children"];
6821
+ var _excluded$d = ["shouldHandleBottomNotch", "hasSeparator", "children"];
6560
6822
  function FullscreenModalFooter(_ref) {
6561
6823
  var _ref$shouldHandleBott = _ref.shouldHandleBottomNotch,
6562
6824
  shouldHandleBottomNotch = _ref$shouldHandleBott === void 0 ? true : _ref$shouldHandleBott,
6563
6825
  _ref$hasSeparator = _ref.hasSeparator,
6564
6826
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
6565
6827
  children = _ref.children,
6566
- props = _objectWithoutProperties(_ref, _excluded$g);
6828
+ props = _objectWithoutProperties(_ref, _excluded$d);
6567
6829
  var _useSafeAreaInsets = useSafeAreaInsets(),
6568
6830
  bottom = _useSafeAreaInsets.bottom;
6569
6831
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
@@ -6721,13 +6983,13 @@ function FullscreenModalAnimation(_ref) {
6721
6983
  });
6722
6984
  }
6723
6985
 
6724
- var _excluded$f = ["children", "visible", "onClose", "onExited"];
6986
+ var _excluded$c = ["children", "visible", "onClose", "onExited"];
6725
6987
  function FullscreenModalBehaviour(_ref) {
6726
6988
  var children = _ref.children,
6727
6989
  visible = _ref.visible,
6728
6990
  onClose = _ref.onClose,
6729
6991
  onExited = _ref.onExited,
6730
- props = _objectWithoutProperties(_ref, _excluded$f);
6992
+ props = _objectWithoutProperties(_ref, _excluded$c);
6731
6993
  var _useState = useState(visible),
6732
6994
  _useState2 = _slicedToArray(_useState, 2),
6733
6995
  isModalBehaviourVisible = _useState2[0],
@@ -6774,7 +7036,7 @@ function FullscreenModalContainer(_ref) {
6774
7036
  });
6775
7037
  }
6776
7038
 
6777
- var _excluded$e = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
7039
+ var _excluded$b = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
6778
7040
  function FullscreenModalHeader(_ref) {
6779
7041
  var _ref$hasSeparator = _ref.hasSeparator,
6780
7042
  hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
@@ -6785,7 +7047,7 @@ function FullscreenModalHeader(_ref) {
6785
7047
  left = _ref.left,
6786
7048
  _ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
6787
7049
  shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
6788
- props = _objectWithoutProperties(_ref, _excluded$e);
7050
+ props = _objectWithoutProperties(_ref, _excluded$b);
6789
7051
  var _useSafeAreaInsets = useSafeAreaInsets(),
6790
7052
  top = _useSafeAreaInsets.top;
6791
7053
  var hasRight = Boolean(right);
@@ -7098,7 +7360,7 @@ function Highlight(_ref) {
7098
7360
  // eslint-disable-next-line no-restricted-imports
7099
7361
  var useBreakpointValue = useBreakpointValue$1;
7100
7362
 
7101
- var _excluded$d = ["color", "isDisabled"];
7363
+ var _excluded$a = ["color", "isDisabled"];
7102
7364
  function getBackgroundColor(color, isDisabled) {
7103
7365
  if (isDisabled) {
7104
7366
  return 'kitt.iconButton.disabled.backgroundColor';
@@ -7116,7 +7378,7 @@ function getBackgroundColor(color, isDisabled) {
7116
7378
  function Background(_ref) {
7117
7379
  var color = _ref.color,
7118
7380
  isDisabled = _ref.isDisabled,
7119
- props = _objectWithoutProperties(_ref, _excluded$d);
7381
+ props = _objectWithoutProperties(_ref, _excluded$a);
7120
7382
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
7121
7383
  width: "100%",
7122
7384
  height: "100%",
@@ -7313,89 +7575,6 @@ function useKittMapConfig() {
7313
7575
  return context;
7314
7576
  }
7315
7577
 
7316
- var _excluded$c = ["children"];
7317
- function ListItemContent(_ref) {
7318
- var children = _ref.children,
7319
- rest = _objectWithoutProperties(_ref, _excluded$c);
7320
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
7321
- alignSelf: "center",
7322
- flexBasis: "0%",
7323
- flexGrow: 1,
7324
- flexShrink: 0
7325
- }, rest), {}, {
7326
- children: children
7327
- }));
7328
- }
7329
-
7330
- var _excluded$b = ["children", "side"],
7331
- _excluded2$2 = ["children", "align"];
7332
- // Handles the vertical alignment of the side elements of the list item
7333
- function ListItemSideContainer(_ref) {
7334
- var children = _ref.children,
7335
- _ref$side = _ref.side,
7336
- side = _ref$side === void 0 ? 'left' : _ref$side,
7337
- rest = _objectWithoutProperties(_ref, _excluded$b);
7338
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
7339
- flexDirection: "row",
7340
- marginLeft: side === 'right' ? 'kitt.2' : undefined,
7341
- marginRight: side === 'left' ? 'kitt.2' : undefined
7342
- }, rest), {}, {
7343
- children: children
7344
- }));
7345
- }
7346
- function ListItemSideContent(_ref2) {
7347
- var children = _ref2.children,
7348
- _ref2$align = _ref2.align,
7349
- align = _ref2$align === void 0 ? 'auto' : _ref2$align,
7350
- rest = _objectWithoutProperties(_ref2, _excluded2$2);
7351
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
7352
- alignSelf: align
7353
- }, rest), {}, {
7354
- children: children
7355
- }));
7356
- }
7357
-
7358
- var _excluded$a = ["children", "withPadding", "borders", "left", "right", "onPress"];
7359
- function ListItem(_ref) {
7360
- var children = _ref.children,
7361
- withPadding = _ref.withPadding,
7362
- borders = _ref.borders,
7363
- left = _ref.left,
7364
- right = _ref.right,
7365
- onPress = _ref.onPress,
7366
- rest = _objectWithoutProperties(_ref, _excluded$a);
7367
- var Wrapper = onPress ? Pressable$2 : Fragment$1;
7368
- var wrapperProps = onPress ? _objectSpread({
7369
- accessibilityRole: 'button',
7370
- onPress: onPress
7371
- }, rest) : undefined;
7372
- var containerProps = onPress ? undefined : rest;
7373
- return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
7374
- children: /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
7375
- flexDirection: "row",
7376
- paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
7377
- paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
7378
- borderColor: "kitt.listItem.borderColor",
7379
- backgroundColor: "kitt.uiBackgroundLight",
7380
- borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
7381
- borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined
7382
- }, containerProps), {}, {
7383
- children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
7384
- side: "left",
7385
- children: left
7386
- }) : null, /*#__PURE__*/jsx(ListItemContent, {
7387
- children: children
7388
- }), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
7389
- side: "right",
7390
- children: right
7391
- }) : null]
7392
- }))
7393
- }));
7394
- }
7395
- ListItem.Content = ListItemContent;
7396
- ListItem.SideContent = ListItemSideContent;
7397
- ListItem.SideContainer = ListItemSideContainer;
7398
-
7399
7578
  var SvgMarkerLargeinline = function SvgMarkerLargeinline(props) {
7400
7579
  return /*#__PURE__*/jsxs("svg", _objectSpread(_objectSpread({
7401
7580
  fill: "currentColor",
@@ -7927,48 +8106,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7927
8106
  }
7928
8107
  }
7929
8108
  },
7930
- tag: {
7931
- primary: {
7932
- fill: {
7933
- backgroundColor: theme.tag.primary.fill.backgroundColor,
7934
- borderColor: theme.tag.primary.fill.borderColor
7935
- },
7936
- outline: {
7937
- backgroundColor: theme.tag.primary.outline.backgroundColor,
7938
- borderColor: theme.tag.primary.outline.borderColor
7939
- }
7940
- },
7941
- "default": {
7942
- fill: {
7943
- backgroundColor: theme.tag["default"].fill.backgroundColor,
7944
- borderColor: theme.tag["default"].fill.borderColor
7945
- },
7946
- outline: {
7947
- backgroundColor: theme.tag["default"].outline.backgroundColor,
7948
- borderColor: theme.tag["default"].outline.borderColor
7949
- }
7950
- },
7951
- danger: {
7952
- fill: {
7953
- backgroundColor: theme.tag.danger.fill.backgroundColor,
7954
- borderColor: theme.tag.danger.fill.borderColor
7955
- },
7956
- outline: {
7957
- backgroundColor: theme.tag.danger.outline.backgroundColor,
7958
- borderColor: theme.tag.danger.outline.borderColor
7959
- }
7960
- },
7961
- warn: {
7962
- fill: {
7963
- backgroundColor: theme.tag.warn.fill.backgroundColor,
7964
- borderColor: theme.tag.warn.fill.borderColor
7965
- },
7966
- outline: {
7967
- backgroundColor: theme.tag.warn.outline.backgroundColor,
7968
- borderColor: theme.tag.warn.outline.borderColor
7969
- }
7970
- }
7971
- },
7972
8109
  tooltip: {
7973
8110
  backgroundColor: theme.tooltip.backgroundColor
7974
8111
  },
@@ -8456,37 +8593,11 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8456
8593
  borderWidth: theme.listItem.borderWidth
8457
8594
  },
8458
8595
  tag: {
8459
- primary: {
8460
- fill: {
8461
- borderWidth: theme.tag.primary.fill.borderWidth
8462
- },
8463
- outline: {
8464
- borderWidth: theme.tag.primary.outline.borderWidth
8465
- }
8596
+ fill: {
8597
+ borderWidth: theme.tag.fill.borderWidth
8466
8598
  },
8467
- "default": {
8468
- fill: {
8469
- borderWidth: theme.tag["default"].fill.borderWidth
8470
- },
8471
- outline: {
8472
- borderWidth: theme.tag["default"].outline.borderWidth
8473
- }
8474
- },
8475
- danger: {
8476
- fill: {
8477
- borderWidth: theme.tag.danger.fill.borderWidth
8478
- },
8479
- outline: {
8480
- borderWidth: theme.tag.danger.outline.borderWidth
8481
- }
8482
- },
8483
- warn: {
8484
- fill: {
8485
- borderWidth: theme.tag.warn.fill.borderWidth
8486
- },
8487
- outline: {
8488
- borderWidth: theme.tag.warn.outline.borderWidth
8489
- }
8599
+ outline: {
8600
+ borderWidth: theme.tag.outline.borderWidth
8490
8601
  }
8491
8602
  }
8492
8603
  },
@@ -8581,6 +8692,39 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8581
8692
  pageLoader: {
8582
8693
  size: theme.pageLoader.size
8583
8694
  },
8695
+ tag: {
8696
+ small: {
8697
+ iconSize: theme.tag.icon.small
8698
+ },
8699
+ medium: {
8700
+ iconSize: theme.tag.icon.medium
8701
+ },
8702
+ large: {
8703
+ iconSize: theme.tag.icon.large
8704
+ },
8705
+ withIcon: {
8706
+ small: {
8707
+ height: theme.tag.withIcon.small.height
8708
+ },
8709
+ medium: {
8710
+ height: theme.tag.withIcon.medium.height
8711
+ },
8712
+ large: {
8713
+ height: theme.tag.withIcon.large.height
8714
+ }
8715
+ },
8716
+ withoutIcon: {
8717
+ small: {
8718
+ height: theme.tag.withoutIcon.small.height
8719
+ },
8720
+ medium: {
8721
+ height: theme.tag.withoutIcon.medium.height
8722
+ },
8723
+ large: {
8724
+ height: theme.tag.withoutIcon.large.height
8725
+ }
8726
+ }
8727
+ },
8584
8728
  tooltip: {
8585
8729
  maxWidth: theme.tooltip.maxWidth,
8586
8730
  arrow: {
@@ -8670,8 +8814,34 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8670
8814
  horizontalPadding: theme.listItem.horizontalPadding
8671
8815
  },
8672
8816
  tag: {
8673
- verticalPadding: theme.tag.verticalPadding,
8674
- horizontalPadding: theme.tag.horizontalPadding
8817
+ withoutIcon: {
8818
+ small: {
8819
+ paddingLeft: theme.tag.withoutIcon.small.paddingLeft,
8820
+ paddingRight: theme.tag.withoutIcon.small.paddingRight
8821
+ },
8822
+ medium: {
8823
+ paddingLeft: theme.tag.withoutIcon.medium.paddingLeft,
8824
+ paddingRight: theme.tag.withoutIcon.medium.paddingRight
8825
+ },
8826
+ large: {
8827
+ paddingLeft: theme.tag.withoutIcon.large.paddingLeft,
8828
+ paddingRight: theme.tag.withoutIcon.large.paddingRight
8829
+ }
8830
+ },
8831
+ withIcon: {
8832
+ small: {
8833
+ paddingLeft: theme.tag.withIcon.small.paddingLeft,
8834
+ paddingRight: theme.tag.withIcon.small.paddingRight
8835
+ },
8836
+ medium: {
8837
+ paddingLeft: theme.tag.withIcon.medium.paddingLeft,
8838
+ paddingRight: theme.tag.withIcon.medium.paddingRight
8839
+ },
8840
+ large: {
8841
+ paddingLeft: theme.tag.withIcon.large.paddingLeft,
8842
+ paddingRight: theme.tag.withIcon.large.paddingRight
8843
+ }
8844
+ }
8675
8845
  },
8676
8846
  tooltip: {
8677
8847
  horizontalPadding: theme.tooltip.horizontalPadding,
@@ -10647,49 +10817,69 @@ var StoryGrid = {
10647
10817
  Col: StoryGridCol
10648
10818
  };
10649
10819
 
10650
- var getLabelColor = function (type, variant) {
10820
+ function useKittTheme() {
10821
+ return useMemo(function () {
10822
+ return {
10823
+ kitt: theme
10824
+ };
10825
+ }, []);
10826
+ }
10827
+
10828
+ var getTypography = function (size) {
10829
+ switch (size) {
10830
+ case 'small':
10831
+ return 'body-xs';
10832
+ case 'medium':
10833
+ return 'body-s';
10834
+ case 'large':
10835
+ default:
10836
+ return 'body-m';
10837
+ }
10838
+ };
10839
+ var typeToColor = function (color, type) {
10840
+ if (color) return color;
10651
10841
  switch (type) {
10652
- case 'danger':
10653
- {
10654
- return variant === 'outline' ? 'danger' : 'black';
10655
- }
10656
- case 'warn':
10657
- {
10658
- return variant === 'outline' ? 'warning' : 'black';
10659
- }
10660
10842
  case 'primary':
10661
- {
10662
- return 'primary';
10663
- }
10843
+ return 'violine';
10844
+ case 'warn':
10845
+ return 'sun';
10846
+ case 'danger':
10847
+ return 'coral';
10664
10848
  case 'default':
10665
- {
10666
- return 'black';
10667
- }
10668
10849
  default:
10669
- {
10670
- return 'black';
10671
- }
10850
+ return 'eggshell';
10672
10851
  }
10673
10852
  };
10674
10853
  function Tag(_ref) {
10675
10854
  var label = _ref.label,
10676
- _ref$type = _ref.type,
10677
- type = _ref$type === void 0 ? 'default' : _ref$type,
10855
+ icon = _ref.icon,
10856
+ color = _ref.color,
10857
+ type = _ref.type,
10858
+ _ref$size = _ref.size,
10859
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
10678
10860
  _ref$variant = _ref.variant,
10679
10861
  variant = _ref$variant === void 0 ? 'fill' : _ref$variant;
10680
- return /*#__PURE__*/jsx(View, {
10862
+ var kittTheme = useKittTheme();
10863
+ var tagColor = typeToColor(color, type);
10864
+ return /*#__PURE__*/jsxs(HStack, {
10681
10865
  alignSelf: "flex-start",
10682
10866
  borderRadius: "kitt.tag.borderRadius",
10683
- paddingX: "kitt.tag.horizontalPadding",
10684
- paddingY: "kitt.tag.verticalPadding",
10685
- backgroundColor: "kitt.tag.".concat(type, ".").concat(variant, ".backgroundColor"),
10686
- borderColor: "kitt.tag.".concat(type, ".").concat(variant, ".borderColor"),
10687
- borderWidth: "kitt.tag.".concat(type, ".").concat(variant, ".borderWidth"),
10688
- children: /*#__PURE__*/jsx(Typography.Text, {
10689
- base: "body-xsmall",
10690
- color: getLabelColor(type, variant),
10867
+ height: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".height"),
10868
+ paddingLeft: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".paddingLeft"),
10869
+ paddingRight: "kitt.tag.".concat(icon ? 'withIcon' : 'withoutIcon', ".").concat(size, ".paddingRight"),
10870
+ backgroundColor: variant === 'fill' ? kittTheme.kitt.palettes.lateOcean["".concat(tagColor, ".4")] : 'kitt.transparent',
10871
+ borderColor: kittTheme.kitt.palettes.lateOcean["".concat(tagColor, ".6")],
10872
+ borderWidth: "kitt.tag.".concat(variant, ".borderWidth"),
10873
+ space: "kitt.1",
10874
+ alignItems: "center",
10875
+ children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
10876
+ icon: icon,
10877
+ size: "kitt.tag.".concat(size, ".iconSize")
10878
+ }) : null, /*#__PURE__*/jsx(Typography.Text, {
10879
+ base: getTypography(size),
10880
+ color: "black",
10691
10881
  children: label
10692
- })
10882
+ })]
10693
10883
  });
10694
10884
  }
10695
10885
 
@@ -11276,14 +11466,6 @@ function TypographyLink(_ref) {
11276
11466
  });
11277
11467
  }
11278
11468
 
11279
- function useKittTheme() {
11280
- return useMemo(function () {
11281
- return {
11282
- kitt: theme
11283
- };
11284
- }, []);
11285
- }
11286
-
11287
11469
  function KittThemeProvider(_ref) {
11288
11470
  var isSSR = _ref.isSSR,
11289
11471
  children = _ref.children,
@@ -11509,5 +11691,5 @@ function VerticalSteps(_ref) {
11509
11691
  }
11510
11692
  VerticalSteps.Step = ExternalStep;
11511
11693
 
11512
- export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, Emoji, ExternalAppLink, ExternalLink, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, HStack, Highlight, Icon, IconButton, Image, InputAddress, InputEmail, InputFeedback, InputField, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarkerLarge, MapMarkerPosition, MapMarkerSimple, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, 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, SwitchBreakpoints, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
11694
+ export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InputAddress, InputEmail, InputFeedback, InputField, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarkerLarge, MapMarkerPosition, MapMarkerSimple, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, 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, SwitchBreakpoints, Tag, TextArea, TimePicker, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
11513
11695
  //# sourceMappingURL=index.es.js.map