@ornikar/kitt-universal 23.3.0 → 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.
- package/CHANGELOG.md +9 -0
- package/dist/definitions/BottomSheet/useStaticBottomSheet.d.ts +3 -3
- package/dist/definitions/BottomSheet/useStaticBottomSheet.d.ts.map +1 -1
- package/dist/definitions/forms/DocumentPicker/DocumentPicker.d.ts +15 -0
- package/dist/definitions/forms/DocumentPicker/DocumentPicker.d.ts.map +1 -0
- package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActions.d.ts +13 -0
- package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActions.d.ts.map +1 -0
- package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActionsItem.d.ts +7 -0
- package/dist/definitions/forms/FilePicker/BottomSheetActions/BottomSheetActionsItem.d.ts.map +1 -0
- package/dist/definitions/forms/FilePicker/FilePicker.d.ts +17 -0
- package/dist/definitions/forms/FilePicker/FilePicker.d.ts.map +1 -0
- package/dist/definitions/forms/FilePicker/FilePicker.web.d.ts +4 -0
- package/dist/definitions/forms/FilePicker/FilePicker.web.d.ts.map +1 -0
- package/dist/definitions/forms/ImagePicker/ImagePicker.d.ts +15 -0
- package/dist/definitions/forms/ImagePicker/ImagePicker.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +7 -2
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +311 -164
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +311 -164
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +231 -83
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.js +62 -0
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +231 -86
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.mjs +60 -1
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +343 -158
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +104 -1
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +4 -1
- package/translations/fr-FR.json +2 -0
|
@@ -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,
|
|
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 { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -11,7 +11,7 @@ import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, ScrollView
|
|
|
11
11
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
12
12
|
import { ArcIcon, UserIcon, MapPinIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, XIcon, RotateCCWIcon } from '@ornikar/kitt-icons';
|
|
13
13
|
export * from '@ornikar/kitt-icons';
|
|
14
|
-
import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
|
14
|
+
import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints, BottomSheetModal, BottomSheetHandle, BottomSheetBackdrop, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
15
15
|
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
16
16
|
import { parse } from 'twemoji-parser';
|
|
17
17
|
import * as WebBrowser from 'expo-web-browser';
|
|
@@ -20,6 +20,8 @@ import Downshift from 'downshift';
|
|
|
20
20
|
import Svg, { Path, LinearGradient, Stop, Mask, G, Defs, Circle as Circle$1 } from 'react-native-svg';
|
|
21
21
|
import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
|
|
22
22
|
import { FormattedMessage } from 'react-intl';
|
|
23
|
+
import { getDocumentAsync } from 'expo-document-picker';
|
|
24
|
+
import { launchImageLibraryAsync } from 'expo-image-picker';
|
|
23
25
|
import { useDebouncedCallback } from 'use-debounce';
|
|
24
26
|
import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
|
|
25
27
|
import { Picker as Picker$1 } from '@react-native-picker/picker';
|
|
@@ -1879,7 +1881,7 @@ function ActionCardDisabled({
|
|
|
1879
1881
|
});
|
|
1880
1882
|
}
|
|
1881
1883
|
|
|
1882
|
-
const _excluded$
|
|
1884
|
+
const _excluded$N = ["children", "variant", "borderVariant", "disabled", "isHovered", "isPressed", "isFocused"];
|
|
1883
1885
|
function ActionCard(_ref) {
|
|
1884
1886
|
let {
|
|
1885
1887
|
children,
|
|
@@ -1890,7 +1892,7 @@ function ActionCard(_ref) {
|
|
|
1890
1892
|
isPressed,
|
|
1891
1893
|
isFocused
|
|
1892
1894
|
} = _ref,
|
|
1893
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1895
|
+
props = _objectWithoutProperties(_ref, _excluded$N);
|
|
1894
1896
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
1895
1897
|
children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
|
|
1896
1898
|
variant: variant,
|
|
@@ -2104,7 +2106,7 @@ const getTypographyFamilyWithAncestorValue = (type, typographyFamilyInContext) =
|
|
|
2104
2106
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2105
2107
|
};
|
|
2106
2108
|
|
|
2107
|
-
const _excluded$
|
|
2109
|
+
const _excluded$M = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
2108
2110
|
const TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
2109
2111
|
const TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
2110
2112
|
const TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
@@ -2159,7 +2161,7 @@ function Typography(_ref) {
|
|
|
2159
2161
|
variant,
|
|
2160
2162
|
color
|
|
2161
2163
|
} = _ref,
|
|
2162
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
2164
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$M);
|
|
2163
2165
|
const sx = useSx();
|
|
2164
2166
|
const typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
2165
2167
|
const defaultColor = useTypographyDefaultColor();
|
|
@@ -2266,7 +2268,7 @@ function Icon({
|
|
|
2266
2268
|
});
|
|
2267
2269
|
}
|
|
2268
2270
|
|
|
2269
|
-
const _excluded$
|
|
2271
|
+
const _excluded$L = ["color", "size"],
|
|
2270
2272
|
_excluded2$5 = ["color"];
|
|
2271
2273
|
function getIconSizeConfigKeyFromTypeName(breakpointName) {
|
|
2272
2274
|
return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
|
|
@@ -2289,7 +2291,7 @@ function TypographyIconSpecifiedColor(_ref) {
|
|
|
2289
2291
|
color,
|
|
2290
2292
|
size
|
|
2291
2293
|
} = _ref,
|
|
2292
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2294
|
+
props = _objectWithoutProperties(_ref, _excluded$L);
|
|
2293
2295
|
const ancestorType = useTypographyAncestorType();
|
|
2294
2296
|
const iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
|
|
2295
2297
|
const colorValue = getTypographyColorValue(color);
|
|
@@ -2341,7 +2343,7 @@ const getButtonTextColorByType = (type, variant, isHovered, isPressed) => {
|
|
|
2341
2343
|
}
|
|
2342
2344
|
};
|
|
2343
2345
|
|
|
2344
|
-
const _excluded$
|
|
2346
|
+
const _excluded$K = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused"];
|
|
2345
2347
|
function ButtonIcon({
|
|
2346
2348
|
icon,
|
|
2347
2349
|
color,
|
|
@@ -2420,7 +2422,7 @@ function ButtonContent(_ref) {
|
|
|
2420
2422
|
isPressed,
|
|
2421
2423
|
isFocused
|
|
2422
2424
|
} = _ref,
|
|
2423
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2425
|
+
props = _objectWithoutProperties(_ref, _excluded$K);
|
|
2424
2426
|
const color = isDisabled ? 'black-light' : getButtonTextColorByType(type, variant, isHovered, isPressed);
|
|
2425
2427
|
return /*#__PURE__*/jsx(View, {
|
|
2426
2428
|
_web: {
|
|
@@ -2723,7 +2725,7 @@ function LoaderIcon({
|
|
|
2723
2725
|
});
|
|
2724
2726
|
}
|
|
2725
2727
|
|
|
2726
|
-
const _excluded$
|
|
2728
|
+
const _excluded$J = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
2727
2729
|
const ActionsItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
2728
2730
|
let {
|
|
2729
2731
|
as,
|
|
@@ -2735,7 +2737,7 @@ const ActionsItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
2735
2737
|
medium: false
|
|
2736
2738
|
}
|
|
2737
2739
|
} = _ref,
|
|
2738
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2740
|
+
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
2739
2741
|
const [isLoading, setIsLoading] = useState(false);
|
|
2740
2742
|
const mountedRef = useRef(false);
|
|
2741
2743
|
|
|
@@ -2781,7 +2783,7 @@ function ActionsButton(_ref) {
|
|
|
2781
2783
|
}, props));
|
|
2782
2784
|
}
|
|
2783
2785
|
|
|
2784
|
-
const _excluded$
|
|
2786
|
+
const _excluded$I = ["children", "layout", "reversed"];
|
|
2785
2787
|
function getCurrentLayout(layout) {
|
|
2786
2788
|
if (!layout) return {
|
|
2787
2789
|
base: 'stretch',
|
|
@@ -2812,7 +2814,7 @@ function Actions(_ref) {
|
|
|
2812
2814
|
layout,
|
|
2813
2815
|
reversed
|
|
2814
2816
|
} = _ref,
|
|
2815
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2817
|
+
props = _objectWithoutProperties(_ref, _excluded$I);
|
|
2816
2818
|
const currentAlignItems = getCurrentLayout(layout);
|
|
2817
2819
|
const currentDirection = getCurrentDirection(layout);
|
|
2818
2820
|
const currentAlignSelf = getCurrentAlignSelf(layout);
|
|
@@ -2863,7 +2865,7 @@ function getInitials(firstname, lastname) {
|
|
|
2863
2865
|
return `${firstname[0]}${lastname[0]}`.toUpperCase();
|
|
2864
2866
|
}
|
|
2865
2867
|
|
|
2866
|
-
const _excluded$
|
|
2868
|
+
const _excluded$H = ["size", "round", "light", "sizeVariant"];
|
|
2867
2869
|
function AvatarContent({
|
|
2868
2870
|
size,
|
|
2869
2871
|
src,
|
|
@@ -2905,7 +2907,7 @@ function Avatar(_ref) {
|
|
|
2905
2907
|
light,
|
|
2906
2908
|
sizeVariant
|
|
2907
2909
|
} = _ref,
|
|
2908
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2910
|
+
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
2909
2911
|
const currentSize = getCurrentSize({
|
|
2910
2912
|
size,
|
|
2911
2913
|
sizeVariant
|
|
@@ -3235,7 +3237,7 @@ function CardModalAnimation({
|
|
|
3235
3237
|
});
|
|
3236
3238
|
}
|
|
3237
3239
|
|
|
3238
|
-
const _excluded$
|
|
3240
|
+
const _excluded$G = ["children", "visible", "onClose", "onExited"];
|
|
3239
3241
|
function CardModalBehaviour(_ref) {
|
|
3240
3242
|
let {
|
|
3241
3243
|
children,
|
|
@@ -3243,7 +3245,7 @@ function CardModalBehaviour(_ref) {
|
|
|
3243
3245
|
onClose,
|
|
3244
3246
|
onExited
|
|
3245
3247
|
} = _ref,
|
|
3246
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3248
|
+
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
3247
3249
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
3248
3250
|
useEffect(() => {
|
|
3249
3251
|
if (visible === true) {
|
|
@@ -3265,7 +3267,7 @@ function CardModalBehaviour(_ref) {
|
|
|
3265
3267
|
});
|
|
3266
3268
|
}
|
|
3267
3269
|
|
|
3268
|
-
const _excluded$
|
|
3270
|
+
const _excluded$F = ["children", "paddingX", "paddingY"];
|
|
3269
3271
|
function CardModalBody(_ref) {
|
|
3270
3272
|
let {
|
|
3271
3273
|
children,
|
|
@@ -3275,7 +3277,7 @@ function CardModalBody(_ref) {
|
|
|
3275
3277
|
},
|
|
3276
3278
|
paddingY = 'kitt.4'
|
|
3277
3279
|
} = _ref,
|
|
3278
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3280
|
+
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
3279
3281
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
3280
3282
|
showsVerticalScrollIndicator: false,
|
|
3281
3283
|
_contentContainerStyle: {
|
|
@@ -3287,7 +3289,7 @@ function CardModalBody(_ref) {
|
|
|
3287
3289
|
}));
|
|
3288
3290
|
}
|
|
3289
3291
|
|
|
3290
|
-
const _excluded$
|
|
3292
|
+
const _excluded$E = ["children", "padding", "hasSeparator"];
|
|
3291
3293
|
function CardModalFooter(_ref) {
|
|
3292
3294
|
let {
|
|
3293
3295
|
children,
|
|
@@ -3297,7 +3299,7 @@ function CardModalFooter(_ref) {
|
|
|
3297
3299
|
},
|
|
3298
3300
|
hasSeparator = true
|
|
3299
3301
|
} = _ref,
|
|
3300
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3302
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
3301
3303
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
3302
3304
|
marginTop: "kitt.2",
|
|
3303
3305
|
padding: padding,
|
|
@@ -3311,7 +3313,7 @@ function CardModalFooter(_ref) {
|
|
|
3311
3313
|
}));
|
|
3312
3314
|
}
|
|
3313
3315
|
|
|
3314
|
-
const _excluded$
|
|
3316
|
+
const _excluded$D = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
3315
3317
|
function CardModalHeader(_ref) {
|
|
3316
3318
|
let {
|
|
3317
3319
|
children,
|
|
@@ -3324,7 +3326,7 @@ function CardModalHeader(_ref) {
|
|
|
3324
3326
|
right,
|
|
3325
3327
|
left
|
|
3326
3328
|
} = _ref,
|
|
3327
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3329
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
3328
3330
|
const defaultContainerPadding = {
|
|
3329
3331
|
base: 'kitt.4',
|
|
3330
3332
|
medium: 'kitt.6'
|
|
@@ -3362,7 +3364,7 @@ function CardModalHeader(_ref) {
|
|
|
3362
3364
|
}));
|
|
3363
3365
|
}
|
|
3364
3366
|
|
|
3365
|
-
const _excluded$
|
|
3367
|
+
const _excluded$C = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
3366
3368
|
function CardModal(_ref) {
|
|
3367
3369
|
let {
|
|
3368
3370
|
backgroundColor = 'kitt.uiBackgroundLight',
|
|
@@ -3373,7 +3375,7 @@ function CardModal(_ref) {
|
|
|
3373
3375
|
body,
|
|
3374
3376
|
footer
|
|
3375
3377
|
} = _ref,
|
|
3376
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3378
|
+
props = _objectWithoutProperties(_ref, _excluded$C);
|
|
3377
3379
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
3378
3380
|
overflow: "hidden",
|
|
3379
3381
|
backgroundColor: backgroundColor,
|
|
@@ -3596,12 +3598,12 @@ function ChoiceItemContainer({
|
|
|
3596
3598
|
});
|
|
3597
3599
|
}
|
|
3598
3600
|
|
|
3599
|
-
const _excluded$
|
|
3601
|
+
const _excluded$B = ["direction"];
|
|
3600
3602
|
function ChoicesContainer(_ref) {
|
|
3601
3603
|
let {
|
|
3602
3604
|
direction
|
|
3603
3605
|
} = _ref,
|
|
3604
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3606
|
+
props = _objectWithoutProperties(_ref, _excluded$B);
|
|
3605
3607
|
if (direction === 'row') {
|
|
3606
3608
|
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
3607
3609
|
horizontal: true
|
|
@@ -3814,7 +3816,7 @@ function DialogModalAnimation({
|
|
|
3814
3816
|
});
|
|
3815
3817
|
}
|
|
3816
3818
|
|
|
3817
|
-
const _excluded$
|
|
3819
|
+
const _excluded$A = ["children", "visible", "onClose", "onExited"];
|
|
3818
3820
|
function DialogModalBehaviour(_ref) {
|
|
3819
3821
|
let {
|
|
3820
3822
|
children,
|
|
@@ -3822,7 +3824,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
3822
3824
|
onClose,
|
|
3823
3825
|
onExited
|
|
3824
3826
|
} = _ref,
|
|
3825
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3827
|
+
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
3826
3828
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
3827
3829
|
useEffect(() => {
|
|
3828
3830
|
if (visible === true) {
|
|
@@ -3850,7 +3852,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
3850
3852
|
});
|
|
3851
3853
|
}
|
|
3852
3854
|
|
|
3853
|
-
const _excluded$
|
|
3855
|
+
const _excluded$z = ["stretch"];
|
|
3854
3856
|
function DialogModal({
|
|
3855
3857
|
illustration,
|
|
3856
3858
|
title,
|
|
@@ -3892,7 +3894,7 @@ function DialogModalButton(_ref) {
|
|
|
3892
3894
|
let {
|
|
3893
3895
|
stretch = true
|
|
3894
3896
|
} = _ref,
|
|
3895
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3897
|
+
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
3896
3898
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
3897
3899
|
stretch: stretch
|
|
3898
3900
|
}, props));
|
|
@@ -3926,7 +3928,7 @@ function Emoji({
|
|
|
3926
3928
|
});
|
|
3927
3929
|
}
|
|
3928
3930
|
|
|
3929
|
-
const _excluded$
|
|
3931
|
+
const _excluded$y = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
3930
3932
|
_excluded2$4 = ["phoneNumber", "children"],
|
|
3931
3933
|
_excluded3$3 = ["phoneNumber", "children"],
|
|
3932
3934
|
_excluded4$3 = ["emailAddress", "children"];
|
|
@@ -3938,7 +3940,7 @@ function ExternalAppLink(_ref) {
|
|
|
3938
3940
|
onPress,
|
|
3939
3941
|
onOpenAppError
|
|
3940
3942
|
} = _ref,
|
|
3941
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
3943
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
3942
3944
|
const href = `${appScheme}:${appValue}`;
|
|
3943
3945
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({
|
|
3944
3946
|
href: href
|
|
@@ -4019,7 +4021,7 @@ function useOpenExternalLink() {
|
|
|
4019
4021
|
};
|
|
4020
4022
|
}
|
|
4021
4023
|
|
|
4022
|
-
const _excluded$
|
|
4024
|
+
const _excluded$x = ["as", "href", "openLinkBehavior", "onPress", "onOpenLinkError"];
|
|
4023
4025
|
function ExternalLink(_ref) {
|
|
4024
4026
|
let {
|
|
4025
4027
|
as: Component,
|
|
@@ -4029,7 +4031,7 @@ function ExternalLink(_ref) {
|
|
|
4029
4031
|
// eslint-disable-next-line no-console
|
|
4030
4032
|
onOpenLinkError = console.error
|
|
4031
4033
|
} = _ref,
|
|
4032
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
4034
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
4033
4035
|
const openExternalLink = useOpenExternalLink();
|
|
4034
4036
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4035
4037
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
@@ -4088,7 +4090,7 @@ function InputTextContainer({
|
|
|
4088
4090
|
});
|
|
4089
4091
|
}
|
|
4090
4092
|
|
|
4091
|
-
const _excluded$
|
|
4093
|
+
const _excluded$w = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "onSubmitEditing"];
|
|
4092
4094
|
const InputText = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4093
4095
|
let {
|
|
4094
4096
|
id,
|
|
@@ -4104,7 +4106,7 @@ const InputText = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4104
4106
|
multiline,
|
|
4105
4107
|
onSubmitEditing
|
|
4106
4108
|
} = _ref,
|
|
4107
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4109
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
4108
4110
|
const theme = useTheme();
|
|
4109
4111
|
const fontSizeForNativeBase = createNativeBaseFontSize({
|
|
4110
4112
|
base: 'body'
|
|
@@ -4221,12 +4223,12 @@ function AutocompleteItemsListContainer({
|
|
|
4221
4223
|
});
|
|
4222
4224
|
}
|
|
4223
4225
|
|
|
4224
|
-
const _excluded$
|
|
4226
|
+
const _excluded$v = ["children"];
|
|
4225
4227
|
function AutocompleteOption(_ref) {
|
|
4226
4228
|
let {
|
|
4227
4229
|
children
|
|
4228
4230
|
} = _ref,
|
|
4229
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4231
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
4230
4232
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
4231
4233
|
paddingX: {
|
|
4232
4234
|
base: 'kitt.2',
|
|
@@ -4238,7 +4240,7 @@ function AutocompleteOption(_ref) {
|
|
|
4238
4240
|
}));
|
|
4239
4241
|
}
|
|
4240
4242
|
|
|
4241
|
-
const _excluded$
|
|
4243
|
+
const _excluded$u = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex"],
|
|
4242
4244
|
_excluded2$3 = ["onClick", "onPress"],
|
|
4243
4245
|
_excluded3$2 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
|
|
4244
4246
|
_excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
|
|
@@ -4279,7 +4281,7 @@ function Autocomplete(_ref) {
|
|
|
4279
4281
|
listContainerTestID = 'kitt.Autocomplete.listContainer',
|
|
4280
4282
|
zIndex = 1000
|
|
4281
4283
|
} = _ref,
|
|
4282
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4284
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
4283
4285
|
const childrenArray = Children.toArray(children);
|
|
4284
4286
|
const items = childrenArray.filter(isReactElement).map(child => ({
|
|
4285
4287
|
child,
|
|
@@ -4833,7 +4835,7 @@ function PartContainer({
|
|
|
4833
4835
|
});
|
|
4834
4836
|
}
|
|
4835
4837
|
|
|
4836
|
-
const _excluded$
|
|
4838
|
+
const _excluded$t = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
4837
4839
|
const KeyboardDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4838
4840
|
let {
|
|
4839
4841
|
id,
|
|
@@ -4853,7 +4855,7 @@ const KeyboardDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4853
4855
|
onFocus,
|
|
4854
4856
|
onSubmitEditing
|
|
4855
4857
|
} = _ref;
|
|
4856
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
4858
|
+
_objectWithoutProperties(_ref, _excluded$t);
|
|
4857
4859
|
const monthRef = useRef(null);
|
|
4858
4860
|
const yearRef = useRef(null);
|
|
4859
4861
|
const defaultValue = value;
|
|
@@ -5057,7 +5059,7 @@ const PressableDateInputs = /*#__PURE__*/forwardRef(({
|
|
|
5057
5059
|
});
|
|
5058
5060
|
});
|
|
5059
5061
|
|
|
5060
|
-
const _excluded$
|
|
5062
|
+
const _excluded$s = ["onBlur", "onFocus", "pickerDefaultDate", "pickerUITestID", "isDefaultVisible", "value", "onChange"];
|
|
5061
5063
|
const DatePickerAndroid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5062
5064
|
let {
|
|
5063
5065
|
onBlur,
|
|
@@ -5068,7 +5070,7 @@ const DatePickerAndroid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5068
5070
|
value,
|
|
5069
5071
|
onChange
|
|
5070
5072
|
} = _ref,
|
|
5071
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5073
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
5072
5074
|
const [isFocused, setIsFocused] = useState(false);
|
|
5073
5075
|
const [currentValue, setCurrentValue] = useState(value);
|
|
5074
5076
|
const handleClose = () => {
|
|
@@ -5138,7 +5140,7 @@ function PlatformDateTimePicker({
|
|
|
5138
5140
|
}));
|
|
5139
5141
|
}
|
|
5140
5142
|
|
|
5141
|
-
const _excluded$
|
|
5143
|
+
const _excluded$r = ["title", "isVisible", "value", "validateButtonLabel", "onClose", "onChange"];
|
|
5142
5144
|
function ModalTitle({
|
|
5143
5145
|
children
|
|
5144
5146
|
}) {
|
|
@@ -5159,7 +5161,7 @@ function ModalPlatformDateTimePicker(_ref) {
|
|
|
5159
5161
|
onClose,
|
|
5160
5162
|
onChange
|
|
5161
5163
|
} = _ref,
|
|
5162
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5164
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
5163
5165
|
const [currentValue, setCurrentValue] = useState(value);
|
|
5164
5166
|
|
|
5165
5167
|
// Prevent unsynced value between the modal and its parent state
|
|
@@ -5202,7 +5204,7 @@ function ModalPlatformDateTimePicker(_ref) {
|
|
|
5202
5204
|
});
|
|
5203
5205
|
}
|
|
5204
5206
|
|
|
5205
|
-
const _excluded$
|
|
5207
|
+
const _excluded$q = ["value", "pickerUITestID", "pickerUITitle", "pickerUIValidateButtonLabel", "isDefaultVisible", "pickerDefaultDate", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "onChange", "onFocus", "onBlur"];
|
|
5206
5208
|
const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5207
5209
|
let {
|
|
5208
5210
|
value,
|
|
@@ -5218,7 +5220,7 @@ const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5218
5220
|
onFocus,
|
|
5219
5221
|
onBlur
|
|
5220
5222
|
} = _ref,
|
|
5221
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5223
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
5222
5224
|
const [isPickerUIVisible, setIsPickerUIVisible] = useState(isDefaultVisible);
|
|
5223
5225
|
const [isFocused, setIsFocused] = useState(false);
|
|
5224
5226
|
const [currentValue, setCurrentValue] = useState(value);
|
|
@@ -5256,7 +5258,7 @@ const DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5256
5258
|
});
|
|
5257
5259
|
});
|
|
5258
5260
|
|
|
5259
|
-
const _excluded$
|
|
5261
|
+
const _excluded$p = ["value", "pickerUITestID", "isDefaultVisible", "pickerDefaultDate", "onChange", "onBlur"];
|
|
5260
5262
|
const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5261
5263
|
let {
|
|
5262
5264
|
value,
|
|
@@ -5266,7 +5268,7 @@ const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5266
5268
|
onChange,
|
|
5267
5269
|
onBlur
|
|
5268
5270
|
} = _ref,
|
|
5269
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5271
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
5270
5272
|
if (Platform.OS === 'android') {
|
|
5271
5273
|
return /*#__PURE__*/jsx(DatePickerAndroid, _objectSpread({
|
|
5272
5274
|
ref: ref,
|
|
@@ -5288,7 +5290,7 @@ const NativeUIDatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5288
5290
|
}, props));
|
|
5289
5291
|
});
|
|
5290
5292
|
|
|
5291
|
-
const _excluded$
|
|
5293
|
+
const _excluded$o = ["fillMode", "enterKeyHint", "value", "onSubmitEditing"];
|
|
5292
5294
|
const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5293
5295
|
let {
|
|
5294
5296
|
fillMode = 'native',
|
|
@@ -5296,7 +5298,7 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5296
5298
|
value,
|
|
5297
5299
|
onSubmitEditing
|
|
5298
5300
|
} = _ref,
|
|
5299
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5301
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
5300
5302
|
// in apps, final-form can give a string value that will break the component
|
|
5301
5303
|
const currentValue = value || undefined;
|
|
5302
5304
|
if (fillMode === 'keyboard') {
|
|
@@ -5315,6 +5317,240 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5315
5317
|
}));
|
|
5316
5318
|
});
|
|
5317
5319
|
|
|
5320
|
+
function DocumentPicker({
|
|
5321
|
+
onDocumentUpload,
|
|
5322
|
+
children,
|
|
5323
|
+
disabled,
|
|
5324
|
+
documentPickerOptions
|
|
5325
|
+
}) {
|
|
5326
|
+
const childElement = Children.only(children);
|
|
5327
|
+
return /*#__PURE__*/cloneElement(childElement, {
|
|
5328
|
+
// ensure that the press event is not prevented by Button component
|
|
5329
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
5330
|
+
onPress: async () => {
|
|
5331
|
+
var _childElement$props$o, _childElement$props;
|
|
5332
|
+
if (disabled) return;
|
|
5333
|
+
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
5334
|
+
const result = await getDocumentAsync(_objectSpread(_objectSpread({}, documentPickerOptions), {}, {
|
|
5335
|
+
multiple: false
|
|
5336
|
+
}));
|
|
5337
|
+
if (!result.canceled && result.assets[0].file) {
|
|
5338
|
+
onDocumentUpload(result.assets[0].file);
|
|
5339
|
+
}
|
|
5340
|
+
},
|
|
5341
|
+
disabled
|
|
5342
|
+
});
|
|
5343
|
+
}
|
|
5344
|
+
|
|
5345
|
+
function ImagePicker({
|
|
5346
|
+
onImageSelected,
|
|
5347
|
+
children,
|
|
5348
|
+
disabled,
|
|
5349
|
+
imagePickerOptions
|
|
5350
|
+
}) {
|
|
5351
|
+
const childElement = Children.only(children);
|
|
5352
|
+
return /*#__PURE__*/jsx(View, {
|
|
5353
|
+
children: /*#__PURE__*/cloneElement(childElement, {
|
|
5354
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
5355
|
+
onPress: async () => {
|
|
5356
|
+
var _childElement$props$o, _childElement$props;
|
|
5357
|
+
if (disabled) return;
|
|
5358
|
+
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
5359
|
+
|
|
5360
|
+
// No permissions request is necessary for launching the image library
|
|
5361
|
+
const result = await launchImageLibraryAsync(_objectSpread(_objectSpread({}, imagePickerOptions), {}, {
|
|
5362
|
+
allowsMultipleSelection: false
|
|
5363
|
+
}));
|
|
5364
|
+
if (!result.canceled) {
|
|
5365
|
+
onImageSelected(result.assets[0]);
|
|
5366
|
+
}
|
|
5367
|
+
},
|
|
5368
|
+
disabled
|
|
5369
|
+
})
|
|
5370
|
+
});
|
|
5371
|
+
}
|
|
5372
|
+
|
|
5373
|
+
const _excluded$n = ["children"];
|
|
5374
|
+
function ListItemContent(_ref) {
|
|
5375
|
+
let {
|
|
5376
|
+
children
|
|
5377
|
+
} = _ref,
|
|
5378
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
5379
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5380
|
+
alignSelf: "center",
|
|
5381
|
+
flexBasis: "0%",
|
|
5382
|
+
flexGrow: 1,
|
|
5383
|
+
flexShrink: 0
|
|
5384
|
+
}, rest), {}, {
|
|
5385
|
+
children: children
|
|
5386
|
+
}));
|
|
5387
|
+
}
|
|
5388
|
+
|
|
5389
|
+
const _excluded$m = ["children", "side"],
|
|
5390
|
+
_excluded2$2 = ["children", "align"];
|
|
5391
|
+
// Handles the vertical alignment of the side elements of the list item
|
|
5392
|
+
function ListItemSideContainer(_ref) {
|
|
5393
|
+
let {
|
|
5394
|
+
children,
|
|
5395
|
+
side = 'left'
|
|
5396
|
+
} = _ref,
|
|
5397
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
5398
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5399
|
+
flexDirection: "row",
|
|
5400
|
+
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
5401
|
+
marginRight: side === 'left' ? 'kitt.2' : undefined
|
|
5402
|
+
}, rest), {}, {
|
|
5403
|
+
children: children
|
|
5404
|
+
}));
|
|
5405
|
+
}
|
|
5406
|
+
function ListItemSideContent(_ref2) {
|
|
5407
|
+
let {
|
|
5408
|
+
children,
|
|
5409
|
+
align = 'auto'
|
|
5410
|
+
} = _ref2,
|
|
5411
|
+
rest = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
5412
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5413
|
+
alignSelf: align
|
|
5414
|
+
}, rest), {}, {
|
|
5415
|
+
children: children
|
|
5416
|
+
}));
|
|
5417
|
+
}
|
|
5418
|
+
|
|
5419
|
+
const _excluded$l = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
5420
|
+
function ListItem(_ref) {
|
|
5421
|
+
let {
|
|
5422
|
+
children,
|
|
5423
|
+
withPadding,
|
|
5424
|
+
borders,
|
|
5425
|
+
left,
|
|
5426
|
+
right,
|
|
5427
|
+
onPress
|
|
5428
|
+
} = _ref,
|
|
5429
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
5430
|
+
const Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
5431
|
+
const wrapperProps = onPress ? _objectSpread({
|
|
5432
|
+
accessibilityRole: 'button',
|
|
5433
|
+
onPress
|
|
5434
|
+
}, rest) : undefined;
|
|
5435
|
+
const containerProps = onPress ? undefined : rest;
|
|
5436
|
+
return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
5437
|
+
children: /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
|
|
5438
|
+
flexDirection: "row",
|
|
5439
|
+
paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
|
|
5440
|
+
paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
|
|
5441
|
+
borderColor: "kitt.listItem.borderColor",
|
|
5442
|
+
backgroundColor: "kitt.uiBackgroundLight",
|
|
5443
|
+
borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
5444
|
+
borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined
|
|
5445
|
+
}, containerProps), {}, {
|
|
5446
|
+
children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
5447
|
+
side: "left",
|
|
5448
|
+
children: left
|
|
5449
|
+
}) : null, /*#__PURE__*/jsx(ListItemContent, {
|
|
5450
|
+
children: children
|
|
5451
|
+
}), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
5452
|
+
side: "right",
|
|
5453
|
+
children: right
|
|
5454
|
+
}) : null]
|
|
5455
|
+
}))
|
|
5456
|
+
}));
|
|
5457
|
+
}
|
|
5458
|
+
ListItem.Content = ListItemContent;
|
|
5459
|
+
ListItem.SideContent = ListItemSideContent;
|
|
5460
|
+
ListItem.SideContainer = ListItemSideContainer;
|
|
5461
|
+
|
|
5462
|
+
const _excluded$k = ["title"];
|
|
5463
|
+
function BottomSheetActionsItem(_ref) {
|
|
5464
|
+
let {
|
|
5465
|
+
title
|
|
5466
|
+
} = _ref,
|
|
5467
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
5468
|
+
return /*#__PURE__*/jsx(Pressable$2, _objectSpread(_objectSpread({}, props), {}, {
|
|
5469
|
+
children: /*#__PURE__*/jsx(ListItem, {
|
|
5470
|
+
withPadding: true,
|
|
5471
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
5472
|
+
variant: "bold",
|
|
5473
|
+
base: "body",
|
|
5474
|
+
children: title
|
|
5475
|
+
})
|
|
5476
|
+
})
|
|
5477
|
+
}));
|
|
5478
|
+
}
|
|
5479
|
+
|
|
5480
|
+
function BottomSheetActions({
|
|
5481
|
+
onBottomSheetActionsChange,
|
|
5482
|
+
imagePickerOptions,
|
|
5483
|
+
documentPickerOptions,
|
|
5484
|
+
disabled
|
|
5485
|
+
}) {
|
|
5486
|
+
const isPlatformIOS = Platform.OS === 'ios';
|
|
5487
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
5488
|
+
marginBottom: "kitt.8",
|
|
5489
|
+
children: [/*#__PURE__*/jsx(ImagePicker, {
|
|
5490
|
+
imagePickerOptions: imagePickerOptions,
|
|
5491
|
+
disabled: disabled,
|
|
5492
|
+
onImageSelected: onBottomSheetActionsChange,
|
|
5493
|
+
children: /*#__PURE__*/jsx(BottomSheetActionsItem, {
|
|
5494
|
+
title: /*#__PURE__*/jsx(FormattedMessage, {
|
|
5495
|
+
id: "account.BottomSheetActions.openLibrary",
|
|
5496
|
+
values: {
|
|
5497
|
+
isPlatformIOS
|
|
5498
|
+
}
|
|
5499
|
+
})
|
|
5500
|
+
})
|
|
5501
|
+
}), /*#__PURE__*/jsx(DocumentPicker, {
|
|
5502
|
+
disabled: disabled,
|
|
5503
|
+
documentPickerOptions: documentPickerOptions,
|
|
5504
|
+
onDocumentUpload: onBottomSheetActionsChange,
|
|
5505
|
+
children: /*#__PURE__*/jsx(BottomSheetActionsItem, {
|
|
5506
|
+
title: /*#__PURE__*/jsx(FormattedMessage, {
|
|
5507
|
+
id: "account.BottomSheetActions.openFileExplorer",
|
|
5508
|
+
values: {
|
|
5509
|
+
isPlatformIOS
|
|
5510
|
+
}
|
|
5511
|
+
})
|
|
5512
|
+
})
|
|
5513
|
+
})]
|
|
5514
|
+
});
|
|
5515
|
+
}
|
|
5516
|
+
|
|
5517
|
+
function FilePicker({
|
|
5518
|
+
onFileSelected,
|
|
5519
|
+
children,
|
|
5520
|
+
disabled,
|
|
5521
|
+
imagePickerOptions,
|
|
5522
|
+
documentPickerOptions
|
|
5523
|
+
}) {
|
|
5524
|
+
const childElement = Children.only(children);
|
|
5525
|
+
const {
|
|
5526
|
+
bottomSheetRef,
|
|
5527
|
+
BottomSheet
|
|
5528
|
+
} = useStaticBottomSheet(BottomSheetActions);
|
|
5529
|
+
const {
|
|
5530
|
+
dismissAll
|
|
5531
|
+
} = useBottomSheetModal();
|
|
5532
|
+
const handleBottomSheetActionsChange = file => {
|
|
5533
|
+
dismissAll();
|
|
5534
|
+
onFileSelected(file);
|
|
5535
|
+
};
|
|
5536
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5537
|
+
children: [/*#__PURE__*/cloneElement(childElement, {
|
|
5538
|
+
// ensure that the press event is not prevented by Button component
|
|
5539
|
+
onPress: () => {
|
|
5540
|
+
var _childElement$props$o, _childElement$props, _bottomSheetRef$curre;
|
|
5541
|
+
if (disabled) return;
|
|
5542
|
+
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
5543
|
+
(_bottomSheetRef$curre = bottomSheetRef.current) === null || _bottomSheetRef$curre === void 0 || _bottomSheetRef$curre.present({
|
|
5544
|
+
onBottomSheetActionsChange: handleBottomSheetActionsChange,
|
|
5545
|
+
imagePickerOptions,
|
|
5546
|
+
documentPickerOptions
|
|
5547
|
+
});
|
|
5548
|
+
},
|
|
5549
|
+
disabled
|
|
5550
|
+
}), /*#__PURE__*/jsx(BottomSheet, {})]
|
|
5551
|
+
});
|
|
5552
|
+
}
|
|
5553
|
+
|
|
5318
5554
|
const GoogleMapsApiKeyContext = /*#__PURE__*/createContext(undefined);
|
|
5319
5555
|
function GoogleMapsApiKeyProvider({
|
|
5320
5556
|
children,
|
|
@@ -5662,7 +5898,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
5662
5898
|
};
|
|
5663
5899
|
}
|
|
5664
5900
|
|
|
5665
|
-
const _excluded$
|
|
5901
|
+
const _excluded$j = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
|
|
5666
5902
|
function InputAddress(_ref) {
|
|
5667
5903
|
let {
|
|
5668
5904
|
initialValue,
|
|
@@ -5671,7 +5907,7 @@ function InputAddress(_ref) {
|
|
|
5671
5907
|
emptyResultsElement,
|
|
5672
5908
|
onChange
|
|
5673
5909
|
} = _ref,
|
|
5674
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5910
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
5675
5911
|
const {
|
|
5676
5912
|
state,
|
|
5677
5913
|
onInputChange,
|
|
@@ -5760,12 +5996,12 @@ function InputField({
|
|
|
5760
5996
|
});
|
|
5761
5997
|
}
|
|
5762
5998
|
|
|
5763
|
-
const _excluded$
|
|
5999
|
+
const _excluded$i = ["onChange"];
|
|
5764
6000
|
const InputNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5765
6001
|
let {
|
|
5766
6002
|
onChange
|
|
5767
6003
|
} = _ref,
|
|
5768
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6004
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
5769
6005
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
5770
6006
|
ref: ref
|
|
5771
6007
|
}, props), {}, {
|
|
@@ -5782,13 +6018,13 @@ const InputNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5782
6018
|
}));
|
|
5783
6019
|
});
|
|
5784
6020
|
|
|
5785
|
-
const _excluded$
|
|
6021
|
+
const _excluded$h = ["isPasswordDefaultVisible", "right"];
|
|
5786
6022
|
const InputPassword = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5787
6023
|
let {
|
|
5788
6024
|
isPasswordDefaultVisible,
|
|
5789
6025
|
right
|
|
5790
6026
|
} = _ref,
|
|
5791
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6027
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
5792
6028
|
const [isVisible, setIsVisible] = useState(Boolean(isPasswordDefaultVisible));
|
|
5793
6029
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
5794
6030
|
ref: ref
|
|
@@ -5809,7 +6045,7 @@ const InputPassword = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5809
6045
|
}));
|
|
5810
6046
|
});
|
|
5811
6047
|
|
|
5812
|
-
const _excluded$
|
|
6048
|
+
const _excluded$g = ["enterKeyHint", "autoComplete", "phoneNumberLength", "value", "onChange"];
|
|
5813
6049
|
function isPhoneNumberValid(number) {
|
|
5814
6050
|
return isValidNumber(number);
|
|
5815
6051
|
}
|
|
@@ -5824,7 +6060,7 @@ const InputPhone = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5824
6060
|
value,
|
|
5825
6061
|
onChange
|
|
5826
6062
|
} = _ref,
|
|
5827
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6063
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
5828
6064
|
const [currentValue, setCurrentValue] = useState(value);
|
|
5829
6065
|
const currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
|
|
5830
6066
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
@@ -6271,7 +6507,7 @@ function RadioButton({
|
|
|
6271
6507
|
});
|
|
6272
6508
|
}
|
|
6273
6509
|
|
|
6274
|
-
const _excluded$
|
|
6510
|
+
const _excluded$f = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
|
|
6275
6511
|
function RadioButtonGroupItem(_ref) {
|
|
6276
6512
|
let props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
6277
6513
|
return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
|
|
@@ -6286,7 +6522,7 @@ function RadioButtonGroup(_ref2) {
|
|
|
6286
6522
|
onBlur,
|
|
6287
6523
|
onChange
|
|
6288
6524
|
} = _ref2,
|
|
6289
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6525
|
+
props = _objectWithoutProperties(_ref2, _excluded$f);
|
|
6290
6526
|
const [currentValue, setCurrentValue] = useState(value);
|
|
6291
6527
|
const handleChange = newValue => {
|
|
6292
6528
|
if (disabled) return;
|
|
@@ -6325,7 +6561,7 @@ const TextArea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6325
6561
|
}, props));
|
|
6326
6562
|
});
|
|
6327
6563
|
|
|
6328
|
-
const _excluded$
|
|
6564
|
+
const _excluded$e = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
|
|
6329
6565
|
function FullscreenModalBody(_ref) {
|
|
6330
6566
|
let {
|
|
6331
6567
|
children,
|
|
@@ -6333,7 +6569,7 @@ function FullscreenModalBody(_ref) {
|
|
|
6333
6569
|
style,
|
|
6334
6570
|
shouldHandleTopNotch
|
|
6335
6571
|
} = _ref,
|
|
6336
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6572
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
6337
6573
|
const {
|
|
6338
6574
|
bottom,
|
|
6339
6575
|
top
|
|
@@ -6358,14 +6594,14 @@ function FullscreenModalBody(_ref) {
|
|
|
6358
6594
|
}));
|
|
6359
6595
|
}
|
|
6360
6596
|
|
|
6361
|
-
const _excluded$
|
|
6597
|
+
const _excluded$d = ["shouldHandleBottomNotch", "hasSeparator", "children"];
|
|
6362
6598
|
function FullscreenModalFooter(_ref) {
|
|
6363
6599
|
let {
|
|
6364
6600
|
shouldHandleBottomNotch = true,
|
|
6365
6601
|
hasSeparator = true,
|
|
6366
6602
|
children
|
|
6367
6603
|
} = _ref,
|
|
6368
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6604
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
6369
6605
|
const {
|
|
6370
6606
|
bottom
|
|
6371
6607
|
} = useSafeAreaInsets();
|
|
@@ -6516,7 +6752,7 @@ function FullscreenModalAnimation({
|
|
|
6516
6752
|
});
|
|
6517
6753
|
}
|
|
6518
6754
|
|
|
6519
|
-
const _excluded$
|
|
6755
|
+
const _excluded$c = ["children", "visible", "onClose", "onExited"];
|
|
6520
6756
|
function FullscreenModalBehaviour(_ref) {
|
|
6521
6757
|
let {
|
|
6522
6758
|
children,
|
|
@@ -6524,7 +6760,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
6524
6760
|
onClose,
|
|
6525
6761
|
onExited
|
|
6526
6762
|
} = _ref,
|
|
6527
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6763
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
6528
6764
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
6529
6765
|
useEffect(() => {
|
|
6530
6766
|
if (visible === true) {
|
|
@@ -6569,7 +6805,7 @@ function FullscreenModalContainer({
|
|
|
6569
6805
|
});
|
|
6570
6806
|
}
|
|
6571
6807
|
|
|
6572
|
-
const _excluded$
|
|
6808
|
+
const _excluded$b = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
6573
6809
|
function FullscreenModalHeader(_ref) {
|
|
6574
6810
|
let {
|
|
6575
6811
|
hasSeparator = true,
|
|
@@ -6580,7 +6816,7 @@ function FullscreenModalHeader(_ref) {
|
|
|
6580
6816
|
left,
|
|
6581
6817
|
shouldHandleTopNotch = true
|
|
6582
6818
|
} = _ref,
|
|
6583
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6819
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
6584
6820
|
const {
|
|
6585
6821
|
top
|
|
6586
6822
|
} = useSafeAreaInsets();
|
|
@@ -6888,7 +7124,7 @@ function Highlight({
|
|
|
6888
7124
|
// eslint-disable-next-line no-restricted-imports
|
|
6889
7125
|
const useBreakpointValue = useBreakpointValue$1;
|
|
6890
7126
|
|
|
6891
|
-
const _excluded$
|
|
7127
|
+
const _excluded$a = ["color", "isDisabled"];
|
|
6892
7128
|
function getBackgroundColor(color, isDisabled) {
|
|
6893
7129
|
if (isDisabled) {
|
|
6894
7130
|
return 'kitt.iconButton.disabled.backgroundColor';
|
|
@@ -6908,7 +7144,7 @@ function Background(_ref) {
|
|
|
6908
7144
|
color,
|
|
6909
7145
|
isDisabled
|
|
6910
7146
|
} = _ref,
|
|
6911
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7147
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
6912
7148
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
6913
7149
|
width: "100%",
|
|
6914
7150
|
height: "100%",
|
|
@@ -7108,95 +7344,6 @@ function useKittMapConfig() {
|
|
|
7108
7344
|
return context;
|
|
7109
7345
|
}
|
|
7110
7346
|
|
|
7111
|
-
const _excluded$c = ["children"];
|
|
7112
|
-
function ListItemContent(_ref) {
|
|
7113
|
-
let {
|
|
7114
|
-
children
|
|
7115
|
-
} = _ref,
|
|
7116
|
-
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
7117
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
7118
|
-
alignSelf: "center",
|
|
7119
|
-
flexBasis: "0%",
|
|
7120
|
-
flexGrow: 1,
|
|
7121
|
-
flexShrink: 0
|
|
7122
|
-
}, rest), {}, {
|
|
7123
|
-
children: children
|
|
7124
|
-
}));
|
|
7125
|
-
}
|
|
7126
|
-
|
|
7127
|
-
const _excluded$b = ["children", "side"],
|
|
7128
|
-
_excluded2$2 = ["children", "align"];
|
|
7129
|
-
// Handles the vertical alignment of the side elements of the list item
|
|
7130
|
-
function ListItemSideContainer(_ref) {
|
|
7131
|
-
let {
|
|
7132
|
-
children,
|
|
7133
|
-
side = 'left'
|
|
7134
|
-
} = _ref,
|
|
7135
|
-
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
7136
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
7137
|
-
flexDirection: "row",
|
|
7138
|
-
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
7139
|
-
marginRight: side === 'left' ? 'kitt.2' : undefined
|
|
7140
|
-
}, rest), {}, {
|
|
7141
|
-
children: children
|
|
7142
|
-
}));
|
|
7143
|
-
}
|
|
7144
|
-
function ListItemSideContent(_ref2) {
|
|
7145
|
-
let {
|
|
7146
|
-
children,
|
|
7147
|
-
align = 'auto'
|
|
7148
|
-
} = _ref2,
|
|
7149
|
-
rest = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
7150
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
7151
|
-
alignSelf: align
|
|
7152
|
-
}, rest), {}, {
|
|
7153
|
-
children: children
|
|
7154
|
-
}));
|
|
7155
|
-
}
|
|
7156
|
-
|
|
7157
|
-
const _excluded$a = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
7158
|
-
function ListItem(_ref) {
|
|
7159
|
-
let {
|
|
7160
|
-
children,
|
|
7161
|
-
withPadding,
|
|
7162
|
-
borders,
|
|
7163
|
-
left,
|
|
7164
|
-
right,
|
|
7165
|
-
onPress
|
|
7166
|
-
} = _ref,
|
|
7167
|
-
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
7168
|
-
const Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
7169
|
-
const wrapperProps = onPress ? _objectSpread({
|
|
7170
|
-
accessibilityRole: 'button',
|
|
7171
|
-
onPress
|
|
7172
|
-
}, rest) : undefined;
|
|
7173
|
-
const containerProps = onPress ? undefined : rest;
|
|
7174
|
-
return /*#__PURE__*/jsx(Wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
7175
|
-
children: /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({
|
|
7176
|
-
flexDirection: "row",
|
|
7177
|
-
paddingX: withPadding ? 'kitt.listItem.horizontalPadding' : undefined,
|
|
7178
|
-
paddingY: withPadding ? 'kitt.listItem.verticalPadding' : undefined,
|
|
7179
|
-
borderColor: "kitt.listItem.borderColor",
|
|
7180
|
-
backgroundColor: "kitt.uiBackgroundLight",
|
|
7181
|
-
borderTopWidth: borders === 'top' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined,
|
|
7182
|
-
borderBottomWidth: borders === 'bottom' || borders === 'both' ? 'kitt.listItem.borderWidth' : undefined
|
|
7183
|
-
}, containerProps), {}, {
|
|
7184
|
-
children: [left ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
7185
|
-
side: "left",
|
|
7186
|
-
children: left
|
|
7187
|
-
}) : null, /*#__PURE__*/jsx(ListItemContent, {
|
|
7188
|
-
children: children
|
|
7189
|
-
}), right ? /*#__PURE__*/jsx(ListItemSideContainer, {
|
|
7190
|
-
side: "right",
|
|
7191
|
-
children: right
|
|
7192
|
-
}) : null]
|
|
7193
|
-
}))
|
|
7194
|
-
}));
|
|
7195
|
-
}
|
|
7196
|
-
ListItem.Content = ListItemContent;
|
|
7197
|
-
ListItem.SideContent = ListItemSideContent;
|
|
7198
|
-
ListItem.SideContainer = ListItemSideContainer;
|
|
7199
|
-
|
|
7200
7347
|
const SvgMarkerLargeinline = props => /*#__PURE__*/jsxs(Svg, _objectSpread(_objectSpread({
|
|
7201
7348
|
fill: "currentColor",
|
|
7202
7349
|
viewBox: "0 0 54 56",
|
|
@@ -11240,5 +11387,5 @@ function VerticalSteps(_ref) {
|
|
|
11240
11387
|
}
|
|
11241
11388
|
VerticalSteps.Step = ExternalStep;
|
|
11242
11389
|
|
|
11243
|
-
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 };
|
|
11390
|
+
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 };
|
|
11244
11391
|
//# sourceMappingURL=index-metro.es.android.js.map
|