@ornikar/kitt-universal 27.9.1-canary.e79ce5a70db58d281f30a0e111ad7cf70d64cdb1.0 → 27.9.1-canary.f58d71b1dad7167039ee1fbddbcf093a87688e98.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 -17
- package/dist/definitions/CardModal/CardModalBody.d.ts +1 -1
- package/dist/definitions/CardModal/CardModalBody.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalHeader.d.ts +3 -17
- package/dist/definitions/CardModal/CardModalHeader.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/Header.d.ts +3 -18
- package/dist/definitions/FullscreenModal/Header.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts +6 -7
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.d.ts.map +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts +1 -1
- package/dist/definitions/NavigationBottomSheet/NavigationBottomSheet.web.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.d.ts.map +1 -1
- package/dist/definitions/TopNavBar/TopNavBar.d.ts +3 -2
- package/dist/definitions/TopNavBar/TopNavBar.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/components/NativeUIDatePicker/ModalPlatformDateTimePicker.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +4 -8
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts +6 -18
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +158 -278
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +158 -278
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +155 -267
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +146 -253
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +156 -268
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +147 -254
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +253 -373
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +284 -398
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +5 -5
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +5 -5
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +5 -5
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +5 -5
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +5 -5
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +5 -5
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +6 -6
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +6 -6
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +28 -28
package/dist/index.es.js
CHANGED
|
@@ -13,7 +13,7 @@ export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
|
13
13
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
14
14
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
15
15
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
16
|
-
import { SpinnerGapRegularIcon, UserRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon,
|
|
16
|
+
import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
|
|
17
17
|
import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
18
18
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
19
19
|
import { parse } from '@twemoji/parser';
|
|
@@ -1820,12 +1820,12 @@ var fullscreenModal = {
|
|
|
1820
1820
|
header: {
|
|
1821
1821
|
height: 56
|
|
1822
1822
|
},
|
|
1823
|
-
|
|
1823
|
+
horizontalPadding: 16,
|
|
1824
1824
|
footer: {
|
|
1825
1825
|
verticalPadding: 12
|
|
1826
1826
|
},
|
|
1827
1827
|
body: {
|
|
1828
|
-
verticalPadding:
|
|
1828
|
+
verticalPadding: 16
|
|
1829
1829
|
},
|
|
1830
1830
|
animation: {
|
|
1831
1831
|
overlay: {
|
|
@@ -1913,8 +1913,8 @@ var icon = {
|
|
|
1913
1913
|
};
|
|
1914
1914
|
|
|
1915
1915
|
var iconButton = {
|
|
1916
|
-
width: button.height
|
|
1917
|
-
height: button.height
|
|
1916
|
+
width: button.height["default"],
|
|
1917
|
+
height: button.height["default"]
|
|
1918
1918
|
};
|
|
1919
1919
|
|
|
1920
1920
|
var listItem = {
|
|
@@ -2628,7 +2628,7 @@ var breakpoints = {
|
|
|
2628
2628
|
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2629
2629
|
var theme = {
|
|
2630
2630
|
spacing: spacing,
|
|
2631
|
-
getSpacing: function (multiplier) {
|
|
2631
|
+
getSpacing: function getSpacing(multiplier) {
|
|
2632
2632
|
return spacing * multiplier;
|
|
2633
2633
|
},
|
|
2634
2634
|
colors: colors,
|
|
@@ -2647,8 +2647,8 @@ var theme = {
|
|
|
2647
2647
|
forms: forms,
|
|
2648
2648
|
highlight: highlight,
|
|
2649
2649
|
icon: icon,
|
|
2650
|
-
buttonBadge: buttonBadge,
|
|
2651
2650
|
iconButton: iconButton,
|
|
2651
|
+
buttonBadge: buttonBadge,
|
|
2652
2652
|
listItem: listItem,
|
|
2653
2653
|
pageLoader: pageLoader,
|
|
2654
2654
|
picker: picker,
|
|
@@ -2816,7 +2816,7 @@ var ActionCardPressable = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
2816
2816
|
onPress: onPress,
|
|
2817
2817
|
onHoverIn: onHoverIn,
|
|
2818
2818
|
onHoverOut: onHoverOut,
|
|
2819
|
-
children: function (_ref3) {
|
|
2819
|
+
children: function children(_ref3) {
|
|
2820
2820
|
var isHovered = _ref3.isHovered,
|
|
2821
2821
|
isPressed = _ref3.isPressed,
|
|
2822
2822
|
isFocused = _ref3.isFocused;
|
|
@@ -3586,11 +3586,11 @@ var useNativeAnimation$4 = function (_ref) {
|
|
|
3586
3586
|
};
|
|
3587
3587
|
});
|
|
3588
3588
|
return {
|
|
3589
|
-
onPressIn: function () {
|
|
3589
|
+
onPressIn: function handlePressIn() {
|
|
3590
3590
|
color.value = withSpring(1);
|
|
3591
3591
|
pressed.value = 1;
|
|
3592
3592
|
},
|
|
3593
|
-
onPressOut: function () {
|
|
3593
|
+
onPressOut: function handlePressOut() {
|
|
3594
3594
|
color.value = withSpring(0);
|
|
3595
3595
|
pressed.value = 0;
|
|
3596
3596
|
},
|
|
@@ -3659,7 +3659,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3659
3659
|
onHoverOut: onHoverOut,
|
|
3660
3660
|
onFocus: onFocus,
|
|
3661
3661
|
onBlur: onBlur,
|
|
3662
|
-
children: function (_ref2) {
|
|
3662
|
+
children: function children(_ref2) {
|
|
3663
3663
|
var isHovered = _ref2.isHovered,
|
|
3664
3664
|
isPressed = _ref2.isPressed,
|
|
3665
3665
|
isFocused = _ref2.isFocused;
|
|
@@ -3782,7 +3782,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3782
3782
|
stretch: stretch,
|
|
3783
3783
|
disabled: isLoading ? true : disabled,
|
|
3784
3784
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
3785
|
-
onPress: function (e) {
|
|
3785
|
+
onPress: function handlePress(e) {
|
|
3786
3786
|
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
3787
3787
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3788
3788
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
@@ -4054,10 +4054,10 @@ function BottomSheetComp(_ref, ref) {
|
|
|
4054
4054
|
borderRadius: 4,
|
|
4055
4055
|
backgroundColor: theme.kitt.bottomSheet.handle.backgroundColor
|
|
4056
4056
|
},
|
|
4057
|
-
handleComponent: function (props) {
|
|
4057
|
+
handleComponent: function handleComponent(props) {
|
|
4058
4058
|
return hasHandle ? /*#__PURE__*/jsx(BottomSheetHandle, _objectSpread({}, props)) : null;
|
|
4059
4059
|
},
|
|
4060
|
-
backdropComponent: function (props) {
|
|
4060
|
+
backdropComponent: function backdropComponent(props) {
|
|
4061
4061
|
return hasBackdrop ? /*#__PURE__*/jsx(BottomSheetBackdrop, _objectSpread(_objectSpread({}, props), {}, {
|
|
4062
4062
|
opacity: 0.25,
|
|
4063
4063
|
appearsOnIndex: 0,
|
|
@@ -4066,7 +4066,7 @@ function BottomSheetComp(_ref, ref) {
|
|
|
4066
4066
|
}
|
|
4067
4067
|
}, rest), {}, {
|
|
4068
4068
|
topInset: top,
|
|
4069
|
-
children: function (props) {
|
|
4069
|
+
children: function children(props) {
|
|
4070
4070
|
return /*#__PURE__*/jsx(Wrapper, {
|
|
4071
4071
|
children: typeof Content === 'function' ? /*#__PURE__*/jsx(Content, _objectSpread({}, props === null || props === void 0 ? void 0 : props.data)) : Content
|
|
4072
4072
|
});
|
|
@@ -4142,7 +4142,7 @@ function CloseButton$1(_ref) {
|
|
|
4142
4142
|
onPress = _ref.onPress;
|
|
4143
4143
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
4144
4144
|
return /*#__PURE__*/cloneElement(children, {
|
|
4145
|
-
onPress: function () {
|
|
4145
|
+
onPress: function handleClose() {
|
|
4146
4146
|
if (onPress) onPress();
|
|
4147
4147
|
onCloseContextCallback();
|
|
4148
4148
|
}
|
|
@@ -4318,11 +4318,11 @@ function CardModalAnimation(_ref) {
|
|
|
4318
4318
|
transparent: true,
|
|
4319
4319
|
supportedOrientations: ['landscape', 'portrait'],
|
|
4320
4320
|
visible: isModalVisible,
|
|
4321
|
-
onShow: function () {
|
|
4321
|
+
onShow: function onShow() {
|
|
4322
4322
|
if (onEnter) onEnter();
|
|
4323
4323
|
setIsContentVisible(true);
|
|
4324
4324
|
},
|
|
4325
|
-
onDismiss: function () {
|
|
4325
|
+
onDismiss: function onDismiss() {
|
|
4326
4326
|
if (onExited) onExited();
|
|
4327
4327
|
},
|
|
4328
4328
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -4369,7 +4369,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4369
4369
|
onClose: onClose,
|
|
4370
4370
|
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4371
4371
|
visible: visible,
|
|
4372
|
-
onExited: function () {
|
|
4372
|
+
onExited: function handleExitAnimationDone() {
|
|
4373
4373
|
if (onExited) onExited();
|
|
4374
4374
|
setIsModalBehaviourVisible(false);
|
|
4375
4375
|
},
|
|
@@ -4379,25 +4379,16 @@ function CardModalBehaviour(_ref) {
|
|
|
4379
4379
|
});
|
|
4380
4380
|
}
|
|
4381
4381
|
|
|
4382
|
-
var _excluded$J = ["children", "
|
|
4382
|
+
var _excluded$J = ["children", "padding"];
|
|
4383
4383
|
function CardModalBody(_ref) {
|
|
4384
4384
|
var children = _ref.children,
|
|
4385
|
-
_ref$
|
|
4386
|
-
|
|
4387
|
-
base: 'kitt.4',
|
|
4388
|
-
medium: 'kitt.6'
|
|
4389
|
-
} : _ref$paddingX,
|
|
4390
|
-
_ref$paddingY = _ref.paddingY,
|
|
4391
|
-
paddingY = _ref$paddingY === void 0 ? {
|
|
4392
|
-
base: 'kitt.4',
|
|
4393
|
-
medium: 'kitt.6'
|
|
4394
|
-
} : _ref$paddingY,
|
|
4385
|
+
_ref$padding = _ref.padding,
|
|
4386
|
+
padding = _ref$padding === void 0 ? 'kitt.4' : _ref$padding,
|
|
4395
4387
|
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4396
4388
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4397
4389
|
showsVerticalScrollIndicator: false,
|
|
4398
4390
|
_contentContainerStyle: {
|
|
4399
|
-
|
|
4400
|
-
paddingY: paddingY
|
|
4391
|
+
padding: padding
|
|
4401
4392
|
}
|
|
4402
4393
|
}, props), {}, {
|
|
4403
4394
|
children: children
|
|
@@ -4428,55 +4419,147 @@ function CardModalFooter(_ref) {
|
|
|
4428
4419
|
}));
|
|
4429
4420
|
}
|
|
4430
4421
|
|
|
4431
|
-
var
|
|
4432
|
-
|
|
4433
|
-
|
|
4422
|
+
var getButtonTypeAndVariant = function (iconColor) {
|
|
4423
|
+
switch (iconColor) {
|
|
4424
|
+
case 'black':
|
|
4425
|
+
return {
|
|
4426
|
+
type: 'tertiary'
|
|
4427
|
+
};
|
|
4428
|
+
case 'secondary':
|
|
4429
|
+
return {
|
|
4430
|
+
type: 'secondary'
|
|
4431
|
+
};
|
|
4432
|
+
case 'primary':
|
|
4433
|
+
return {
|
|
4434
|
+
type: 'primary'
|
|
4435
|
+
};
|
|
4436
|
+
case 'primary-plain':
|
|
4437
|
+
return {
|
|
4438
|
+
type: 'primary'
|
|
4439
|
+
};
|
|
4440
|
+
case 'ghost':
|
|
4441
|
+
return {
|
|
4442
|
+
type: 'tertiary',
|
|
4443
|
+
variant: 'revert'
|
|
4444
|
+
};
|
|
4445
|
+
default:
|
|
4446
|
+
return {
|
|
4447
|
+
type: 'secondary'
|
|
4448
|
+
};
|
|
4449
|
+
}
|
|
4450
|
+
};
|
|
4451
|
+
|
|
4452
|
+
var _excluded$H = ["color", "ariaLabel"];
|
|
4453
|
+
/**
|
|
4454
|
+
* @deprecated IconButton should only be used as a navigation button
|
|
4455
|
+
* Other use cases should use a <Button> component with an icon
|
|
4456
|
+
*/
|
|
4457
|
+
function IconButton(_ref) {
|
|
4458
|
+
var _ref$color = _ref.color,
|
|
4459
|
+
color = _ref$color === void 0 ? 'black' : _ref$color;
|
|
4460
|
+
_ref.ariaLabel;
|
|
4461
|
+
var props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4462
|
+
var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
|
|
4463
|
+
legacyColorToType = _getButtonTypeAndVari.type,
|
|
4464
|
+
legacyColorToVariant = _getButtonTypeAndVari.variant;
|
|
4465
|
+
return /*#__PURE__*/jsx(Button, _objectSpread({
|
|
4466
|
+
variant: legacyColorToVariant,
|
|
4467
|
+
type: legacyColorToType
|
|
4468
|
+
}, props));
|
|
4469
|
+
}
|
|
4470
|
+
function CloseIconButton(props) {
|
|
4471
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4472
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4473
|
+
}, props));
|
|
4474
|
+
}
|
|
4475
|
+
|
|
4476
|
+
function TopNavBar(_ref) {
|
|
4477
|
+
var left = _ref.left,
|
|
4478
|
+
right = _ref.right,
|
|
4434
4479
|
title = _ref.title,
|
|
4435
|
-
_ref$
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4480
|
+
_ref$titleAlign = _ref.titleAlign,
|
|
4481
|
+
titleAlign = _ref$titleAlign === void 0 ? 'center' : _ref$titleAlign,
|
|
4482
|
+
stickers = _ref.stickers,
|
|
4483
|
+
_ref$mode = _ref.mode,
|
|
4484
|
+
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
4440
4485
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
4441
4486
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4450
|
-
padding: paddingBottom,
|
|
4451
|
-
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4452
|
-
borderColor: "kitt.separator",
|
|
4453
|
-
justifyContent: "center",
|
|
4487
|
+
testID = _ref.testID;
|
|
4488
|
+
var isLargeTitleMode = mode === 'largeTitle';
|
|
4489
|
+
var leftEmptySpace = !left && titleAlign === 'left' ? null : /*#__PURE__*/jsx(View, {
|
|
4490
|
+
width: "kitt.iconButton.width"
|
|
4491
|
+
});
|
|
4492
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
4493
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
4454
4494
|
width: "100%",
|
|
4455
|
-
height:
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4495
|
+
height: mode === 'default' ? 56 : undefined,
|
|
4496
|
+
justifyContent: "center",
|
|
4497
|
+
paddingX: "kitt.2",
|
|
4498
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4499
|
+
paddingBottom: "kitt.3",
|
|
4500
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4501
|
+
borderColor: "kitt.separator",
|
|
4502
|
+
testID: testID,
|
|
4503
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
4459
4504
|
alignItems: "center",
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4463
|
-
width: "kitt.iconButton.width",
|
|
4464
|
-
children: left
|
|
4465
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4505
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
4506
|
+
children: [left !== null && left !== void 0 ? left : leftEmptySpace, mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
4466
4507
|
flexGrow: "1",
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4508
|
+
flexShrink: 1,
|
|
4509
|
+
paddingRight: "kitt.2",
|
|
4510
|
+
paddingLeft: "kitt.2",
|
|
4511
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4512
|
+
textAlign: titleAlign,
|
|
4471
4513
|
variant: "bold",
|
|
4514
|
+
ellipsizeMode: "tail",
|
|
4515
|
+
numberOfLines: 1,
|
|
4472
4516
|
children: title
|
|
4473
|
-
}) : null
|
|
4474
|
-
}), right ? /*#__PURE__*/jsx(View, {
|
|
4475
|
-
width: "kitt.iconButton.width"
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4517
|
+
}) : null
|
|
4518
|
+
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
4519
|
+
width: "kitt.iconButton.width"
|
|
4520
|
+
})]
|
|
4521
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
4522
|
+
space: "kitt.4",
|
|
4523
|
+
paddingX: "kitt.2",
|
|
4524
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
4525
|
+
width: "100%",
|
|
4526
|
+
space: "kitt.1",
|
|
4527
|
+
flexShrink: 1,
|
|
4528
|
+
flexWrap: "wrap",
|
|
4529
|
+
style: {
|
|
4530
|
+
rowGap: theme.getSpacing(1)
|
|
4531
|
+
},
|
|
4532
|
+
children: stickers.map(function (sticker, index) {
|
|
4533
|
+
return (
|
|
4534
|
+
/*#__PURE__*/
|
|
4535
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
4536
|
+
jsx(View, {
|
|
4537
|
+
children: sticker
|
|
4538
|
+
}, index)
|
|
4539
|
+
);
|
|
4540
|
+
})
|
|
4541
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
4542
|
+
base: "heading-m",
|
|
4543
|
+
children: title
|
|
4544
|
+
})]
|
|
4545
|
+
}) : null]
|
|
4546
|
+
});
|
|
4547
|
+
}
|
|
4548
|
+
function CloseButton(props) {
|
|
4549
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4550
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4551
|
+
}, props));
|
|
4552
|
+
}
|
|
4553
|
+
function BackButton(props) {
|
|
4554
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4555
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
4556
|
+
}, props));
|
|
4557
|
+
}
|
|
4558
|
+
TopNavBar.CloseButton = CloseButton;
|
|
4559
|
+
TopNavBar.BackButton = BackButton;
|
|
4560
|
+
|
|
4561
|
+
function CardModalHeader(props) {
|
|
4562
|
+
return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
|
|
4480
4563
|
}
|
|
4481
4564
|
|
|
4482
4565
|
var _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
@@ -4600,10 +4683,10 @@ var useNativeAnimation$3 = function (_ref) {
|
|
|
4600
4683
|
};
|
|
4601
4684
|
});
|
|
4602
4685
|
return {
|
|
4603
|
-
onPressIn: function () {
|
|
4686
|
+
onPressIn: function onPressIn() {
|
|
4604
4687
|
pressed.value = true;
|
|
4605
4688
|
},
|
|
4606
|
-
onPressOut: function () {
|
|
4689
|
+
onPressOut: function onPressOut() {
|
|
4607
4690
|
pressed.value = false;
|
|
4608
4691
|
},
|
|
4609
4692
|
backgroundStyles: backgroundStyles
|
|
@@ -4666,7 +4749,7 @@ function ChoiceItem(_ref) {
|
|
|
4666
4749
|
style: style,
|
|
4667
4750
|
onBlur: onBlur,
|
|
4668
4751
|
onFocus: onFocus,
|
|
4669
|
-
onPress: function (e) {
|
|
4752
|
+
onPress: function handlePress(e) {
|
|
4670
4753
|
if (onFocus) onFocus(e);
|
|
4671
4754
|
if (onPress) onPress();
|
|
4672
4755
|
handleChange();
|
|
@@ -4674,7 +4757,7 @@ function ChoiceItem(_ref) {
|
|
|
4674
4757
|
},
|
|
4675
4758
|
onPressIn: onPressIn,
|
|
4676
4759
|
onPressOut: onPressOut,
|
|
4677
|
-
children: function (_ref2) {
|
|
4760
|
+
children: function children(_ref2) {
|
|
4678
4761
|
var isHovered = _ref2.isHovered,
|
|
4679
4762
|
isPressed = _ref2.isPressed;
|
|
4680
4763
|
var textColor = getCurrentTextColor$1({
|
|
@@ -4778,7 +4861,7 @@ function Choices(_ref2) {
|
|
|
4778
4861
|
type: type,
|
|
4779
4862
|
disabled: disabled,
|
|
4780
4863
|
onPress: !isForm ? onPress : undefined,
|
|
4781
|
-
onChange: isForm ? function (newValue) {
|
|
4864
|
+
onChange: isForm ? function handleChange(newValue) {
|
|
4782
4865
|
setCurrentValue(newValue);
|
|
4783
4866
|
if (onChange) onChange(newValue);
|
|
4784
4867
|
} : undefined,
|
|
@@ -4934,11 +5017,11 @@ function DialogModalAnimation(_ref) {
|
|
|
4934
5017
|
transparent: true,
|
|
4935
5018
|
supportedOrientations: ['landscape', 'portrait'],
|
|
4936
5019
|
visible: isModalVisible,
|
|
4937
|
-
onShow: function () {
|
|
5020
|
+
onShow: function onShow() {
|
|
4938
5021
|
if (onEnter) onEnter();
|
|
4939
5022
|
setIsContentVisible(true);
|
|
4940
5023
|
},
|
|
4941
|
-
onDismiss: function () {
|
|
5024
|
+
onDismiss: function onDismiss() {
|
|
4942
5025
|
if (onExited) onExited();
|
|
4943
5026
|
},
|
|
4944
5027
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -4992,7 +5075,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4992
5075
|
},
|
|
4993
5076
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4994
5077
|
visible: visible,
|
|
4995
|
-
onExited: function () {
|
|
5078
|
+
onExited: function handleExitAnimationDone() {
|
|
4996
5079
|
if (onExited) onExited();
|
|
4997
5080
|
setIsModalBehaviourVisible(false);
|
|
4998
5081
|
},
|
|
@@ -5255,7 +5338,7 @@ function ExternalLink(_ref) {
|
|
|
5255
5338
|
var openExternalLink = useOpenExternalLink();
|
|
5256
5339
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5257
5340
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
5258
|
-
onPress: function (e) {
|
|
5341
|
+
onPress: function handleOnPress(e) {
|
|
5259
5342
|
if (onPress) {
|
|
5260
5343
|
onPress(e);
|
|
5261
5344
|
if (e.defaultPrevented) return;
|
|
@@ -5479,14 +5562,14 @@ var _excluded$y = ["children", "name", "disabled", "placeholder", "isInitialOpen
|
|
|
5479
5562
|
function patchNativeEvent(event) {
|
|
5480
5563
|
return event || {
|
|
5481
5564
|
preventDownshiftDefault: false,
|
|
5482
|
-
preventDefault: function () {}
|
|
5565
|
+
preventDefault: function preventDefault() {}
|
|
5483
5566
|
};
|
|
5484
5567
|
}
|
|
5485
5568
|
function isReactElement(element) {
|
|
5486
5569
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5487
5570
|
}
|
|
5488
5571
|
function Autocomplete(_ref) {
|
|
5489
|
-
var
|
|
5572
|
+
var _children = _ref.children,
|
|
5490
5573
|
name = _ref.name,
|
|
5491
5574
|
disabled = _ref.disabled,
|
|
5492
5575
|
placeholder = _ref.placeholder,
|
|
@@ -5513,7 +5596,7 @@ function Autocomplete(_ref) {
|
|
|
5513
5596
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5514
5597
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5515
5598
|
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5516
|
-
var childrenArray = Children.toArray(
|
|
5599
|
+
var childrenArray = Children.toArray(_children);
|
|
5517
5600
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5518
5601
|
return {
|
|
5519
5602
|
child: child,
|
|
@@ -5524,12 +5607,12 @@ function Autocomplete(_ref) {
|
|
|
5524
5607
|
defaultIsOpen: isInitialOpen,
|
|
5525
5608
|
initialSelectedItem: initialValue,
|
|
5526
5609
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5527
|
-
itemToString: function (item) {
|
|
5610
|
+
itemToString: function handleItemToString(item) {
|
|
5528
5611
|
// Prevents returning null values
|
|
5529
5612
|
if (!itemToString) return '';
|
|
5530
5613
|
return itemToString(item || undefined);
|
|
5531
5614
|
},
|
|
5532
|
-
stateReducer: function (state, changes) {
|
|
5615
|
+
stateReducer: function stateReducer(state, changes) {
|
|
5533
5616
|
switch (changes.type) {
|
|
5534
5617
|
case Downshift.stateChangeTypes.changeInput:
|
|
5535
5618
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5539,7 +5622,7 @@ function Autocomplete(_ref) {
|
|
|
5539
5622
|
return changes;
|
|
5540
5623
|
}
|
|
5541
5624
|
},
|
|
5542
|
-
onChange: function (selectedItem, stateAndHelpers) {
|
|
5625
|
+
onChange: function onChange(selectedItem, stateAndHelpers) {
|
|
5543
5626
|
if (_onChange) {
|
|
5544
5627
|
_onChange(selectedItem, stateAndHelpers);
|
|
5545
5628
|
}
|
|
@@ -5547,7 +5630,7 @@ function Autocomplete(_ref) {
|
|
|
5547
5630
|
onSelect: onSelectItem,
|
|
5548
5631
|
onOuterClick: onOuterPress,
|
|
5549
5632
|
onInputValueChange: onInputChange,
|
|
5550
|
-
children: function (_ref2) {
|
|
5633
|
+
children: function children(_ref2) {
|
|
5551
5634
|
var getRootProps = _ref2.getRootProps,
|
|
5552
5635
|
getInputProps = _ref2.getInputProps,
|
|
5553
5636
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5599,7 +5682,7 @@ function Autocomplete(_ref) {
|
|
|
5599
5682
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5600
5683
|
testID: "kitt.Autocomplete.listToggle",
|
|
5601
5684
|
hitSlop: 40,
|
|
5602
|
-
onPress: function (e) {
|
|
5685
|
+
onPress: function handleTogglePress(e) {
|
|
5603
5686
|
if (Platform.OS === 'web') {
|
|
5604
5687
|
onClickToggle(e);
|
|
5605
5688
|
return;
|
|
@@ -5610,13 +5693,13 @@ function Autocomplete(_ref) {
|
|
|
5610
5693
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5611
5694
|
})
|
|
5612
5695
|
})) : null),
|
|
5613
|
-
onFocus: function (e) {
|
|
5696
|
+
onFocus: function onFocus(e) {
|
|
5614
5697
|
openMenu();
|
|
5615
5698
|
/** @ts-expect-error onFocus wants web events */
|
|
5616
5699
|
if (Platform.OS !== 'android' && onSearchInputFocus) onSearchInputFocus(e);
|
|
5617
5700
|
if (_onFocus) _onFocus(e);
|
|
5618
5701
|
},
|
|
5619
|
-
onBlur: function (e) {
|
|
5702
|
+
onBlur: function onBlur(e) {
|
|
5620
5703
|
/** @ts-expect-error onBlur wants web events */
|
|
5621
5704
|
if (Platform.OS === 'web' && onSearchInputBlur) onSearchInputBlur(e);
|
|
5622
5705
|
|
|
@@ -5652,14 +5735,14 @@ function Autocomplete(_ref) {
|
|
|
5652
5735
|
selected: ariaSelected
|
|
5653
5736
|
},
|
|
5654
5737
|
disabled: disabled,
|
|
5655
|
-
onPress: function (e) {
|
|
5738
|
+
onPress: function onPress(e) {
|
|
5656
5739
|
if (Platform.OS === 'web') {
|
|
5657
5740
|
if (onClick) onClick(e);
|
|
5658
5741
|
return;
|
|
5659
5742
|
}
|
|
5660
5743
|
if (_onPress) _onPress(patchNativeEvent(e));
|
|
5661
5744
|
},
|
|
5662
|
-
children: function (_ref5) {
|
|
5745
|
+
children: function children(_ref5) {
|
|
5663
5746
|
var isHovered = _ref5.isHovered,
|
|
5664
5747
|
isFocused = _ref5.isFocused,
|
|
5665
5748
|
isPressed = _ref5.isPressed;
|
|
@@ -5749,12 +5832,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5749
5832
|
disabled: disabled
|
|
5750
5833
|
},
|
|
5751
5834
|
disabled: disabled,
|
|
5752
|
-
onPress: function (e) {
|
|
5835
|
+
onPress: function handlePress(e) {
|
|
5753
5836
|
if (onFocus) onFocus();
|
|
5754
5837
|
if (onChange) onChange(!checked, e);
|
|
5755
5838
|
if (onBlur) onBlur();
|
|
5756
5839
|
},
|
|
5757
|
-
children: function (_ref2) {
|
|
5840
|
+
children: function children(_ref2) {
|
|
5758
5841
|
var isHovered = _ref2.isHovered,
|
|
5759
5842
|
isPressed = _ref2.isPressed,
|
|
5760
5843
|
isFocused = _ref2.isFocused;
|
|
@@ -6309,7 +6392,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6309
6392
|
DateTimePickerAndroid.open({
|
|
6310
6393
|
testID: pickerUITestID,
|
|
6311
6394
|
value: currentValue || pickerDefaultDate || new Date(Date.now()),
|
|
6312
|
-
onChange: function (e) {
|
|
6395
|
+
onChange: function onChange(e) {
|
|
6313
6396
|
setIsFocused(false);
|
|
6314
6397
|
var timestamp = e.nativeEvent.timestamp;
|
|
6315
6398
|
if (timestamp) {
|
|
@@ -6361,7 +6444,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
6361
6444
|
minimumDate: minimuDate,
|
|
6362
6445
|
display: displayMode
|
|
6363
6446
|
}, iosProps), {}, {
|
|
6364
|
-
onChange: function (_event, date) {
|
|
6447
|
+
onChange: function onChange(_event, date) {
|
|
6365
6448
|
return _onChange(date);
|
|
6366
6449
|
}
|
|
6367
6450
|
}));
|
|
@@ -6371,11 +6454,7 @@ var _excluded$u = ["title", "isVisible", "value", "validateButtonLabel", "onClos
|
|
|
6371
6454
|
function ModalTitle(_ref) {
|
|
6372
6455
|
var children = _ref.children;
|
|
6373
6456
|
return /*#__PURE__*/jsx(CardModal.Header, {
|
|
6374
|
-
|
|
6375
|
-
base: "body-m",
|
|
6376
|
-
variant: "bold",
|
|
6377
|
-
children: children
|
|
6378
|
-
})
|
|
6457
|
+
title: children
|
|
6379
6458
|
});
|
|
6380
6459
|
}
|
|
6381
6460
|
function ModalPlatformDateTimePicker(_ref2) {
|
|
@@ -6395,7 +6474,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6395
6474
|
|
|
6396
6475
|
return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
|
|
6397
6476
|
visible: Boolean(isVisible),
|
|
6398
|
-
onClose: function () {
|
|
6477
|
+
onClose: function handleClose() {
|
|
6399
6478
|
setCurrentValue(value);
|
|
6400
6479
|
onClose();
|
|
6401
6480
|
},
|
|
@@ -6406,7 +6485,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6406
6485
|
}) : null, /*#__PURE__*/jsx(CardModal.Body, {
|
|
6407
6486
|
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
6408
6487
|
value: currentValue,
|
|
6409
|
-
onChange: function (newDate) {
|
|
6488
|
+
onChange: function handleChange(newDate) {
|
|
6410
6489
|
setCurrentValue(function (prev) {
|
|
6411
6490
|
return newDate || prev;
|
|
6412
6491
|
});
|
|
@@ -6416,7 +6495,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6416
6495
|
children: /*#__PURE__*/jsx(Button, {
|
|
6417
6496
|
stretch: true,
|
|
6418
6497
|
type: "primary",
|
|
6419
|
-
onPress: function () {
|
|
6498
|
+
onPress: function handleSubmit() {
|
|
6420
6499
|
onChange(currentValue);
|
|
6421
6500
|
},
|
|
6422
6501
|
children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
|
|
@@ -6470,7 +6549,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6470
6549
|
isFocusedInternal: isFocused || isFocusedInternal,
|
|
6471
6550
|
isHoveredInternal: isHoveredInternal,
|
|
6472
6551
|
isPressedInternal: isPressedInternal,
|
|
6473
|
-
onPress: function () {
|
|
6552
|
+
onPress: function handleModalOpen() {
|
|
6474
6553
|
if (onFocus) onFocus();
|
|
6475
6554
|
setIsPickerUIVisible(true);
|
|
6476
6555
|
setIsFocused(true);
|
|
@@ -6483,7 +6562,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6483
6562
|
validateButtonLabel: pickerUIValidateButtonLabel,
|
|
6484
6563
|
defaultDate: pickerDefaultDate,
|
|
6485
6564
|
onClose: handleModalClose,
|
|
6486
|
-
onChange: function (newDate) {
|
|
6565
|
+
onChange: function handleChange(newDate) {
|
|
6487
6566
|
setCurrentValue(newDate);
|
|
6488
6567
|
onChange(newDate);
|
|
6489
6568
|
handleModalClose();
|
|
@@ -6799,7 +6878,7 @@ function FilePicker(_ref) {
|
|
|
6799
6878
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
6800
6879
|
children: [/*#__PURE__*/cloneElement(childElement, {
|
|
6801
6880
|
// ensure that the press event is not prevented by Button component
|
|
6802
|
-
onPress: function () {
|
|
6881
|
+
onPress: function onPress() {
|
|
6803
6882
|
var _childElement$props$o, _childElement$props, _bottomSheetRef$curre;
|
|
6804
6883
|
if (disabled) return;
|
|
6805
6884
|
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
@@ -7100,10 +7179,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
7100
7179
|
isLoadingResultDetails: false,
|
|
7101
7180
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
7102
7181
|
},
|
|
7103
|
-
onInputChange: function () {
|
|
7182
|
+
onInputChange: function onInputChange() {
|
|
7104
7183
|
return Promise.resolve();
|
|
7105
7184
|
},
|
|
7106
|
-
onSelectItem: function () {}
|
|
7185
|
+
onSelectItem: function onSelectItem() {}
|
|
7107
7186
|
});
|
|
7108
7187
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
7109
7188
|
var children = _ref.children,
|
|
@@ -7354,7 +7433,7 @@ function InputAddress(_ref) {
|
|
|
7354
7433
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
7355
7434
|
itemToString: itemToString,
|
|
7356
7435
|
initialValue: formattedInitialValue,
|
|
7357
|
-
checkSelectedItem: function (selectedItem, item) {
|
|
7436
|
+
checkSelectedItem: function checkSelectedItem(selectedItem, item) {
|
|
7358
7437
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
7359
7438
|
},
|
|
7360
7439
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -7363,10 +7442,10 @@ function InputAddress(_ref) {
|
|
|
7363
7442
|
}) : undefined,
|
|
7364
7443
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
7365
7444
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
7366
|
-
onInputChange: function (v) {
|
|
7445
|
+
onInputChange: function onInputChange(v) {
|
|
7367
7446
|
_onInputChange(v);
|
|
7368
7447
|
},
|
|
7369
|
-
onChange: function (v) {
|
|
7448
|
+
onChange: function onChange(v) {
|
|
7370
7449
|
onSelectItem(v, _onChange);
|
|
7371
7450
|
},
|
|
7372
7451
|
children: state.items.map(function (item) {
|
|
@@ -7448,7 +7527,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7448
7527
|
ref: ref
|
|
7449
7528
|
}, props), {}, {
|
|
7450
7529
|
inputMode: "numeric",
|
|
7451
|
-
onChange: function (event) {
|
|
7530
|
+
onChange: function handleChange(event) {
|
|
7452
7531
|
if (!onChange) return;
|
|
7453
7532
|
var value = parseFloat(event.nativeEvent.text);
|
|
7454
7533
|
|
|
@@ -7480,7 +7559,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7480
7559
|
testID: "kitt.InputPassword.passwordToggle",
|
|
7481
7560
|
hitSlop: 20,
|
|
7482
7561
|
accessibilityRole: "button",
|
|
7483
|
-
onPress: function () {
|
|
7562
|
+
onPress: function onPress() {
|
|
7484
7563
|
return setIsVisible(function (prev) {
|
|
7485
7564
|
return !prev;
|
|
7486
7565
|
});
|
|
@@ -7515,7 +7594,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7515
7594
|
enterKeyHint: currentEnterKeyHint,
|
|
7516
7595
|
autoComplete: autoComplete,
|
|
7517
7596
|
textContentType: "telephoneNumber",
|
|
7518
|
-
onChange: function (event) {
|
|
7597
|
+
onChange: function handleChange(event) {
|
|
7519
7598
|
var number = parseNumber(event.nativeEvent.text);
|
|
7520
7599
|
|
|
7521
7600
|
// When intl phone number is valid :
|
|
@@ -7708,14 +7787,14 @@ function Radio(_ref, ref) {
|
|
|
7708
7787
|
focusable: checked && !disabled,
|
|
7709
7788
|
flexDirection: "row",
|
|
7710
7789
|
alignItems: "center",
|
|
7711
|
-
onPress: function (event) {
|
|
7790
|
+
onPress: function handlePress(event) {
|
|
7712
7791
|
if (onFocus) onFocus();
|
|
7713
7792
|
if (onChange) onChange(value, event);
|
|
7714
7793
|
if (onBlur) onBlur();
|
|
7715
7794
|
},
|
|
7716
7795
|
onFocus: onFocus,
|
|
7717
7796
|
onBlur: onBlur,
|
|
7718
|
-
children: function (_ref2) {
|
|
7797
|
+
children: function children(_ref2) {
|
|
7719
7798
|
var isHovered = _ref2.isHovered,
|
|
7720
7799
|
isPressed = _ref2.isPressed,
|
|
7721
7800
|
isFocused = _ref2.isFocused;
|
|
@@ -7834,11 +7913,11 @@ var useNativeAnimation$2 = function (_ref) {
|
|
|
7834
7913
|
};
|
|
7835
7914
|
});
|
|
7836
7915
|
return {
|
|
7837
|
-
onPressIn: function () {
|
|
7916
|
+
onPressIn: function handlePressIn() {
|
|
7838
7917
|
color.value = withSpring(1);
|
|
7839
7918
|
pressed.value = 1;
|
|
7840
7919
|
},
|
|
7841
|
-
onPressOut: function () {
|
|
7920
|
+
onPressOut: function handlePressOut() {
|
|
7842
7921
|
color.value = withSpring(0);
|
|
7843
7922
|
pressed.value = 0;
|
|
7844
7923
|
},
|
|
@@ -7891,7 +7970,7 @@ function RadioButton(_ref) {
|
|
|
7891
7970
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
7892
7971
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
7893
7972
|
disabled: disabled,
|
|
7894
|
-
onPress: function (e) {
|
|
7973
|
+
onPress: function handlePress(e) {
|
|
7895
7974
|
if (onFocus) onFocus(e);
|
|
7896
7975
|
if (onChange) onChange(value);
|
|
7897
7976
|
if (onBlur) onBlur(e);
|
|
@@ -7900,7 +7979,7 @@ function RadioButton(_ref) {
|
|
|
7900
7979
|
onPressOut: onPressOut,
|
|
7901
7980
|
onFocus: onFocus,
|
|
7902
7981
|
onBlur: onBlur,
|
|
7903
|
-
children: function (_ref2) {
|
|
7982
|
+
children: function children(_ref2) {
|
|
7904
7983
|
var isHovered = _ref2.isHovered,
|
|
7905
7984
|
isPressed = _ref2.isPressed,
|
|
7906
7985
|
isFocused = _ref2.isFocused;
|
|
@@ -8019,7 +8098,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
8019
8098
|
textAlignVertical: "top",
|
|
8020
8099
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
8021
8100
|
}, props), {}, {
|
|
8022
|
-
onChange: function (e) {
|
|
8101
|
+
onChange: function handleOnChange(e) {
|
|
8023
8102
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
8024
8103
|
var _props$onChange;
|
|
8025
8104
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -8182,10 +8261,10 @@ function Toggle(_ref) {
|
|
|
8182
8261
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
8183
8262
|
accessibilityRole: "togglebutton",
|
|
8184
8263
|
disabled: isDisabled,
|
|
8185
|
-
onPress: function () {
|
|
8264
|
+
onPress: function handlePress() {
|
|
8186
8265
|
onChange(!value);
|
|
8187
8266
|
},
|
|
8188
|
-
children: function (_ref2) {
|
|
8267
|
+
children: function children(_ref2) {
|
|
8189
8268
|
var isHovered = _ref2.isHovered,
|
|
8190
8269
|
isPressed = _ref2.isPressed,
|
|
8191
8270
|
isFocused = _ref2.isFocused;
|
|
@@ -8372,11 +8451,11 @@ function FullscreenModalAnimation(_ref) {
|
|
|
8372
8451
|
transparent: true,
|
|
8373
8452
|
supportedOrientations: ['landscape', 'portrait'],
|
|
8374
8453
|
visible: isModalVisible,
|
|
8375
|
-
onShow: function () {
|
|
8454
|
+
onShow: function onShow() {
|
|
8376
8455
|
if (onEnter) onEnter();
|
|
8377
8456
|
setIsContentVisible(true);
|
|
8378
8457
|
},
|
|
8379
|
-
onDismiss: function () {
|
|
8458
|
+
onDismiss: function onDismiss() {
|
|
8380
8459
|
if (onExited) onExited();
|
|
8381
8460
|
},
|
|
8382
8461
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -8423,7 +8502,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
8423
8502
|
onClose: onClose,
|
|
8424
8503
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
8425
8504
|
visible: visible,
|
|
8426
|
-
onExited: function () {
|
|
8505
|
+
onExited: function handleExitAnimationDone() {
|
|
8427
8506
|
if (onExited) onExited();
|
|
8428
8507
|
setIsModalBehaviourVisible(false);
|
|
8429
8508
|
},
|
|
@@ -8455,64 +8534,17 @@ function FullscreenModalContainer(_ref) {
|
|
|
8455
8534
|
});
|
|
8456
8535
|
}
|
|
8457
8536
|
|
|
8458
|
-
var _excluded$c = ["
|
|
8537
|
+
var _excluded$c = ["shouldHandleTopNotch"];
|
|
8459
8538
|
function FullscreenModalHeader(_ref) {
|
|
8460
|
-
var _ref$
|
|
8461
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
8462
|
-
isTransparent = _ref.isTransparent,
|
|
8463
|
-
title = _ref.title,
|
|
8464
|
-
children = _ref.children,
|
|
8465
|
-
right = _ref.right,
|
|
8466
|
-
left = _ref.left,
|
|
8467
|
-
_ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
8539
|
+
var _ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
8468
8540
|
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
8469
8541
|
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
8470
8542
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
8471
8543
|
top = _useSafeAreaInsets.top;
|
|
8472
|
-
|
|
8473
|
-
var hasLeft = Boolean(left);
|
|
8474
|
-
var hasContent = Boolean(title || children);
|
|
8475
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
8476
|
-
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
8477
|
-
minHeight: "kitt.fullscreenModal.header.height",
|
|
8478
|
-
width: "100%",
|
|
8479
|
-
justifyContent: "center",
|
|
8544
|
+
return /*#__PURE__*/jsx(View, {
|
|
8480
8545
|
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
borderBottomColor: "kitt.separator",
|
|
8484
|
-
borderBottomWidth: hasSeparator ? 1 : undefined
|
|
8485
|
-
}, props), {}, {
|
|
8486
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
8487
|
-
flexDirection: "row",
|
|
8488
|
-
alignItems: "center",
|
|
8489
|
-
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
8490
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
8491
|
-
width: "kitt.iconButton.width",
|
|
8492
|
-
children: left
|
|
8493
|
-
}) : null, title ? /*#__PURE__*/jsx(View, {
|
|
8494
|
-
flexGrow: 1,
|
|
8495
|
-
flexShrink: 1,
|
|
8496
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8497
|
-
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
8498
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
8499
|
-
variant: "bold",
|
|
8500
|
-
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
8501
|
-
children: title
|
|
8502
|
-
})
|
|
8503
|
-
}) : null, children ? /*#__PURE__*/jsx(View, {
|
|
8504
|
-
flexGrow: 1,
|
|
8505
|
-
flexShrink: 1,
|
|
8506
|
-
alignItems: "center",
|
|
8507
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8508
|
-
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
8509
|
-
children: children
|
|
8510
|
-
}) : null, right || left ? /*#__PURE__*/jsx(View, {
|
|
8511
|
-
width: "kitt.iconButton.width",
|
|
8512
|
-
children: right
|
|
8513
|
-
}) : null]
|
|
8514
|
-
})
|
|
8515
|
-
}));
|
|
8546
|
+
children: /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props))
|
|
8547
|
+
});
|
|
8516
8548
|
}
|
|
8517
8549
|
|
|
8518
8550
|
function FullscreenModal(_ref) {
|
|
@@ -8653,11 +8685,11 @@ var useNativeAnimation$1 = function (_ref) {
|
|
|
8653
8685
|
};
|
|
8654
8686
|
});
|
|
8655
8687
|
return {
|
|
8656
|
-
onPressIn: function () {
|
|
8688
|
+
onPressIn: function handleHoverIn() {
|
|
8657
8689
|
color.value = withTiming(1, withTimingConfig);
|
|
8658
8690
|
translate.value = withTiming(2, withTimingConfig);
|
|
8659
8691
|
},
|
|
8660
|
-
onPressOut: function () {
|
|
8692
|
+
onPressOut: function handleHoverOut() {
|
|
8661
8693
|
color.value = withTiming(0, withTimingConfig);
|
|
8662
8694
|
translate.value = withTiming(0, withTimingConfig);
|
|
8663
8695
|
},
|
|
@@ -8751,13 +8783,13 @@ function Highlight(_ref) {
|
|
|
8751
8783
|
});
|
|
8752
8784
|
}
|
|
8753
8785
|
return /*#__PURE__*/jsx(Pressable, {
|
|
8754
|
-
onPress: function () {
|
|
8786
|
+
onPress: function handlePress() {
|
|
8755
8787
|
setIsExpanded(!isExpanded);
|
|
8756
8788
|
setIsInitialRender(false);
|
|
8757
8789
|
},
|
|
8758
8790
|
onPressIn: onPressIn,
|
|
8759
8791
|
onPressOut: onPressOut,
|
|
8760
|
-
children: function (_ref2) {
|
|
8792
|
+
children: function children(_ref2) {
|
|
8761
8793
|
var isHovered = _ref2.isHovered;
|
|
8762
8794
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
8763
8795
|
isHovered: isHovered,
|
|
@@ -8811,60 +8843,6 @@ function Highlight(_ref) {
|
|
|
8811
8843
|
});
|
|
8812
8844
|
}
|
|
8813
8845
|
|
|
8814
|
-
var getButtonTypeAndVariant = function (iconColor) {
|
|
8815
|
-
switch (iconColor) {
|
|
8816
|
-
case 'black':
|
|
8817
|
-
return {
|
|
8818
|
-
type: 'tertiary'
|
|
8819
|
-
};
|
|
8820
|
-
case 'secondary':
|
|
8821
|
-
return {
|
|
8822
|
-
type: 'secondary'
|
|
8823
|
-
};
|
|
8824
|
-
case 'primary':
|
|
8825
|
-
return {
|
|
8826
|
-
type: 'primary'
|
|
8827
|
-
};
|
|
8828
|
-
case 'primary-plain':
|
|
8829
|
-
return {
|
|
8830
|
-
type: 'primary'
|
|
8831
|
-
};
|
|
8832
|
-
case 'ghost':
|
|
8833
|
-
return {
|
|
8834
|
-
type: 'tertiary',
|
|
8835
|
-
variant: 'revert'
|
|
8836
|
-
};
|
|
8837
|
-
default:
|
|
8838
|
-
return {
|
|
8839
|
-
type: 'secondary'
|
|
8840
|
-
};
|
|
8841
|
-
}
|
|
8842
|
-
};
|
|
8843
|
-
|
|
8844
|
-
var _excluded$b = ["color", "ariaLabel"];
|
|
8845
|
-
/**
|
|
8846
|
-
* @deprecated IconButton should only be used as a navigation button
|
|
8847
|
-
* Other use cases should use a <Button> component with an icon
|
|
8848
|
-
*/
|
|
8849
|
-
function IconButton(_ref) {
|
|
8850
|
-
var _ref$color = _ref.color,
|
|
8851
|
-
color = _ref$color === void 0 ? 'black' : _ref$color;
|
|
8852
|
-
_ref.ariaLabel;
|
|
8853
|
-
var props = _objectWithoutProperties(_ref, _excluded$b);
|
|
8854
|
-
var _getButtonTypeAndVari = getButtonTypeAndVariant(color),
|
|
8855
|
-
legacyColorToType = _getButtonTypeAndVari.type,
|
|
8856
|
-
legacyColorToVariant = _getButtonTypeAndVari.variant;
|
|
8857
|
-
return /*#__PURE__*/jsx(Button, _objectSpread({
|
|
8858
|
-
variant: legacyColorToVariant,
|
|
8859
|
-
type: legacyColorToType
|
|
8860
|
-
}, props));
|
|
8861
|
-
}
|
|
8862
|
-
function CloseIconButton(props) {
|
|
8863
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
8864
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
8865
|
-
}, props));
|
|
8866
|
-
}
|
|
8867
|
-
|
|
8868
8846
|
function InfoCard(_ref) {
|
|
8869
8847
|
var title = _ref.title,
|
|
8870
8848
|
action = _ref.action,
|
|
@@ -9086,7 +9064,7 @@ var getBackgroundColor = function (_ref) {
|
|
|
9086
9064
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint["default"];
|
|
9087
9065
|
};
|
|
9088
9066
|
|
|
9089
|
-
var _excluded$
|
|
9067
|
+
var _excluded$b = ["onPress", "testID"];
|
|
9090
9068
|
function StaticMapMarker$1(_ref) {
|
|
9091
9069
|
var variant = _ref.variant,
|
|
9092
9070
|
isHovered = _ref.isHovered,
|
|
@@ -9145,11 +9123,11 @@ function StaticMapMarker$1(_ref) {
|
|
|
9145
9123
|
function MapMarker(_ref2) {
|
|
9146
9124
|
var onPress = _ref2.onPress,
|
|
9147
9125
|
testID = _ref2.testID,
|
|
9148
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
9126
|
+
props = _objectWithoutProperties(_ref2, _excluded$b);
|
|
9149
9127
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
9150
9128
|
testID: testID,
|
|
9151
9129
|
onPress: onPress,
|
|
9152
|
-
children: function (_ref3) {
|
|
9130
|
+
children: function children(_ref3) {
|
|
9153
9131
|
var isHovered = _ref3.isHovered;
|
|
9154
9132
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
9155
9133
|
isHovered: isHovered
|
|
@@ -10592,9 +10570,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10592
10570
|
},
|
|
10593
10571
|
icon: theme.icon,
|
|
10594
10572
|
cardModal: {
|
|
10595
|
-
header: {
|
|
10596
|
-
height: theme.cardModal.header.height
|
|
10597
|
-
},
|
|
10598
10573
|
maxWidth: theme.cardModal.maxWidth,
|
|
10599
10574
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
10600
10575
|
minHeight: theme.cardModal.minHeight
|
|
@@ -10899,11 +10874,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10899
10874
|
width: theme.iconButton.width,
|
|
10900
10875
|
height: theme.iconButton.height
|
|
10901
10876
|
},
|
|
10902
|
-
fullscreenModal: {
|
|
10903
|
-
header: {
|
|
10904
|
-
height: theme.fullscreenModal.header.height
|
|
10905
|
-
}
|
|
10906
|
-
},
|
|
10907
10877
|
pageLoader: {
|
|
10908
10878
|
size: theme.pageLoader.size
|
|
10909
10879
|
},
|
|
@@ -10998,7 +10968,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10998
10968
|
}
|
|
10999
10969
|
},
|
|
11000
10970
|
fullscreenModal: {
|
|
11001
|
-
horizontalPadding: theme.fullscreenModal.
|
|
10971
|
+
horizontalPadding: theme.fullscreenModal.horizontalPadding,
|
|
11002
10972
|
body: {
|
|
11003
10973
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
11004
10974
|
},
|
|
@@ -11819,6 +11789,7 @@ function KittNativeBaseProvider(_ref) {
|
|
|
11819
11789
|
});
|
|
11820
11790
|
}
|
|
11821
11791
|
|
|
11792
|
+
var _excluded$a = ["right"];
|
|
11822
11793
|
function NavigationBottomSheet(_ref) {
|
|
11823
11794
|
var children = _ref.children,
|
|
11824
11795
|
hasScrollView = _ref.hasScrollView,
|
|
@@ -11857,19 +11828,15 @@ function NavigationBottomSheet(_ref) {
|
|
|
11857
11828
|
})
|
|
11858
11829
|
});
|
|
11859
11830
|
}
|
|
11831
|
+
|
|
11832
|
+
/**
|
|
11833
|
+
* Web only: display right CloseButton
|
|
11834
|
+
*/
|
|
11835
|
+
|
|
11860
11836
|
function NavigationBottomSheetHeader(_ref2) {
|
|
11861
|
-
|
|
11862
|
-
_ref2
|
|
11863
|
-
return /*#__PURE__*/jsx(
|
|
11864
|
-
marginBottom: "kitt.6",
|
|
11865
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
11866
|
-
flexGrow: 1,
|
|
11867
|
-
flexShrink: 1,
|
|
11868
|
-
variant: "bold",
|
|
11869
|
-
textAlign: "center",
|
|
11870
|
-
children: children
|
|
11871
|
-
})
|
|
11872
|
-
});
|
|
11837
|
+
_ref2.right;
|
|
11838
|
+
var props = _objectWithoutProperties(_ref2, _excluded$a);
|
|
11839
|
+
return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
|
|
11873
11840
|
}
|
|
11874
11841
|
function NavigationBottomSheetBody(props) {
|
|
11875
11842
|
return /*#__PURE__*/jsx(VStack, _objectSpread({
|
|
@@ -11921,19 +11888,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11921
11888
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
11922
11889
|
appear: shouldAppear,
|
|
11923
11890
|
visible: visible,
|
|
11924
|
-
onEnter: function () {
|
|
11891
|
+
onEnter: function handleEnter() {
|
|
11925
11892
|
if (onEnter) onEnter();
|
|
11926
11893
|
|
|
11927
11894
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11928
11895
|
setShouldAppear(false);
|
|
11929
11896
|
},
|
|
11930
|
-
onExit: function () {
|
|
11897
|
+
onExit: function handleExit() {
|
|
11931
11898
|
if (onExit) onExit();
|
|
11932
11899
|
|
|
11933
11900
|
// Reset appear value to its original value for future modal display
|
|
11934
11901
|
setShouldAppear(appear);
|
|
11935
11902
|
},
|
|
11936
|
-
onExited: function () {
|
|
11903
|
+
onExited: function handleExitAnimationDone() {
|
|
11937
11904
|
if (onExited) onExited();
|
|
11938
11905
|
setIsModalBehaviourVisible(false);
|
|
11939
11906
|
},
|
|
@@ -12294,7 +12261,7 @@ function Picker(_ref) {
|
|
|
12294
12261
|
isOpen: state.isOpen,
|
|
12295
12262
|
selectedItem: state.currentValue,
|
|
12296
12263
|
disabled: disabled,
|
|
12297
|
-
onPress: function () {
|
|
12264
|
+
onPress: function handlePressTrigger() {
|
|
12298
12265
|
if (syncStateWithSourceValue) {
|
|
12299
12266
|
dispatch({
|
|
12300
12267
|
type: 'open-modal-with-value',
|
|
@@ -12313,14 +12280,9 @@ function Picker(_ref) {
|
|
|
12313
12280
|
onClose: handleClose,
|
|
12314
12281
|
children: /*#__PURE__*/jsxs(CardModal, {
|
|
12315
12282
|
children: [/*#__PURE__*/jsx(CardModal.Header, {
|
|
12316
|
-
|
|
12317
|
-
|
|
12283
|
+
title: title,
|
|
12284
|
+
right: /*#__PURE__*/jsx(TopNavBar.CloseButton, {
|
|
12318
12285
|
onPress: handleClose
|
|
12319
|
-
}),
|
|
12320
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
12321
|
-
base: "body-m",
|
|
12322
|
-
variant: "bold",
|
|
12323
|
-
children: title
|
|
12324
12286
|
})
|
|
12325
12287
|
}), Platform.OS === 'ios' && shouldDisplayNativePickerOnIOS ? /*#__PURE__*/jsx(Picker$1, {
|
|
12326
12288
|
testID: testID,
|
|
@@ -12348,7 +12310,7 @@ function Picker(_ref) {
|
|
|
12348
12310
|
accessibilityState: {
|
|
12349
12311
|
selected: isSelected
|
|
12350
12312
|
},
|
|
12351
|
-
onPress: function () {
|
|
12313
|
+
onPress: function onPress() {
|
|
12352
12314
|
handleInternalChange(item.props.value);
|
|
12353
12315
|
},
|
|
12354
12316
|
children: function (_ref2) {
|
|
@@ -12369,7 +12331,7 @@ function Picker(_ref) {
|
|
|
12369
12331
|
children: /*#__PURE__*/jsx(Button, {
|
|
12370
12332
|
stretch: true,
|
|
12371
12333
|
type: "primary",
|
|
12372
|
-
onPress: function () {
|
|
12334
|
+
onPress: function handleChange() {
|
|
12373
12335
|
if (onChange) onChange(state.internalValue);
|
|
12374
12336
|
dispatch({
|
|
12375
12337
|
type: 'change-value'
|
|
@@ -12506,7 +12468,7 @@ function Skeleton(_ref) {
|
|
|
12506
12468
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
12507
12469
|
overflow: "hidden",
|
|
12508
12470
|
style: style,
|
|
12509
|
-
onLayout: function (_ref2) {
|
|
12471
|
+
onLayout: function onLayout(_ref2) {
|
|
12510
12472
|
var nativeEvent = _ref2.nativeEvent;
|
|
12511
12473
|
return setWidth(nativeEvent.layout.width);
|
|
12512
12474
|
},
|
|
@@ -12728,7 +12690,7 @@ function StaticMap(_ref) {
|
|
|
12728
12690
|
position: "relative",
|
|
12729
12691
|
maxWidth: mapBoxMaxPictureWidth,
|
|
12730
12692
|
height: height,
|
|
12731
|
-
onLayout: function (event) {
|
|
12693
|
+
onLayout: function handleParentLayout(event) {
|
|
12732
12694
|
var nativeEvent = event.nativeEvent;
|
|
12733
12695
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
12734
12696
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -12740,11 +12702,11 @@ function StaticMap(_ref) {
|
|
|
12740
12702
|
width: currentWidth,
|
|
12741
12703
|
height: height,
|
|
12742
12704
|
alt: alt,
|
|
12743
|
-
onLoadEnd: function () {
|
|
12705
|
+
onLoadEnd: function handleImageLoadEnd() {
|
|
12744
12706
|
setIsLoading(false);
|
|
12745
12707
|
if (onLoaded) onLoaded();
|
|
12746
12708
|
},
|
|
12747
|
-
onError: function () {
|
|
12709
|
+
onError: function handleError() {
|
|
12748
12710
|
setHasError(true);
|
|
12749
12711
|
if (onError) onError();
|
|
12750
12712
|
}
|
|
@@ -12769,7 +12731,7 @@ function StaticMap(_ref) {
|
|
|
12769
12731
|
width: "100%",
|
|
12770
12732
|
height: "100%",
|
|
12771
12733
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
12772
|
-
onReload: function () {
|
|
12734
|
+
onReload: function handleReload() {
|
|
12773
12735
|
setHasError(false);
|
|
12774
12736
|
setIsLoading(true);
|
|
12775
12737
|
setCurrentMapKey(function (prev) {
|
|
@@ -13010,7 +12972,7 @@ function StoryContainer(_ref) {
|
|
|
13010
12972
|
var StoryDecorator = makeDecorator({
|
|
13011
12973
|
name: 'StoryDecorator',
|
|
13012
12974
|
parameterName: 'storyDecorator',
|
|
13013
|
-
wrapper: function (storyFn, context) {
|
|
12975
|
+
wrapper: function wrapper(storyFn, context) {
|
|
13014
12976
|
var story = storyFn(context);
|
|
13015
12977
|
if (context.parameters.disableStoryContainer) {
|
|
13016
12978
|
return story;
|
|
@@ -13118,7 +13080,7 @@ function TabBarItem(_ref) {
|
|
|
13118
13080
|
disabled: disabled,
|
|
13119
13081
|
testID: testID,
|
|
13120
13082
|
onPress: onPress,
|
|
13121
|
-
children: function (_ref2) {
|
|
13083
|
+
children: function children(_ref2) {
|
|
13122
13084
|
var isHovered = _ref2.isHovered,
|
|
13123
13085
|
isPressed = _ref2.isPressed,
|
|
13124
13086
|
isFocused = _ref2.isFocused;
|
|
@@ -13207,7 +13169,7 @@ function TabBar(_ref) {
|
|
|
13207
13169
|
color: color,
|
|
13208
13170
|
variant: definedVariant,
|
|
13209
13171
|
type: type,
|
|
13210
|
-
onPress: function (event) {
|
|
13172
|
+
onPress: function onPress(event) {
|
|
13211
13173
|
var _child$props$onPress, _child$props;
|
|
13212
13174
|
onChangeTab({
|
|
13213
13175
|
tab: tab,
|
|
@@ -13356,7 +13318,7 @@ function ModalDateTimePicker(_ref) {
|
|
|
13356
13318
|
stretch: true,
|
|
13357
13319
|
testID: "timePicker.ModalDateTimePicker.submitButton",
|
|
13358
13320
|
type: "primary",
|
|
13359
|
-
onPress: function () {
|
|
13321
|
+
onPress: function handleSubmit() {
|
|
13360
13322
|
onChange(currentValue);
|
|
13361
13323
|
},
|
|
13362
13324
|
children: buttonContent
|
|
@@ -13403,7 +13365,7 @@ var TimePickerPressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13403
13365
|
width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
|
|
13404
13366
|
pointerEvents: "box-only",
|
|
13405
13367
|
onPress: onPress,
|
|
13406
|
-
children: function (_ref2) {
|
|
13368
|
+
children: function children(_ref2) {
|
|
13407
13369
|
var isHovered = _ref2.isHovered,
|
|
13408
13370
|
isFocused = _ref2.isFocused,
|
|
13409
13371
|
isPressed = _ref2.isPressed;
|
|
@@ -13480,7 +13442,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13480
13442
|
isHoveredInternal: isHoveredInternal,
|
|
13481
13443
|
isFocusedInternal: isFocusedInternal,
|
|
13482
13444
|
isPressedInternal: isPressedInternal,
|
|
13483
|
-
onPress: function () {
|
|
13445
|
+
onPress: function handlePress() {
|
|
13484
13446
|
setIsPickerVisible(true);
|
|
13485
13447
|
}
|
|
13486
13448
|
}), Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsx(DateTimePicker, {
|
|
@@ -13504,7 +13466,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13504
13466
|
value: pickerValue,
|
|
13505
13467
|
validateButtonLabel: validateButtonLabel,
|
|
13506
13468
|
onChange: handleChange,
|
|
13507
|
-
onClose: function () {
|
|
13469
|
+
onClose: function handleClose() {
|
|
13508
13470
|
setIsPickerVisible(false);
|
|
13509
13471
|
}
|
|
13510
13472
|
}) : null]
|
|
@@ -13867,7 +13829,7 @@ function Tooltip(_ref) {
|
|
|
13867
13829
|
ref: reference,
|
|
13868
13830
|
children: renderPressable({
|
|
13869
13831
|
ref: getPressableRect,
|
|
13870
|
-
onPress: function () {
|
|
13832
|
+
onPress: function handlePress() {
|
|
13871
13833
|
if (onToggle) onToggle(!!pressed.value);
|
|
13872
13834
|
pressed.value = !pressed.value;
|
|
13873
13835
|
},
|
|
@@ -13886,7 +13848,7 @@ function Tooltip(_ref) {
|
|
|
13886
13848
|
left: customShiftData.left,
|
|
13887
13849
|
right: customShiftData.right,
|
|
13888
13850
|
zIndex: zIndex,
|
|
13889
|
-
onLayout: function (_ref2) {
|
|
13851
|
+
onLayout: function onLayout(_ref2) {
|
|
13890
13852
|
var nativeEvent = _ref2.nativeEvent;
|
|
13891
13853
|
return setFloatingWidth(nativeEvent.layout.width);
|
|
13892
13854
|
},
|
|
@@ -13902,88 +13864,6 @@ function Tooltip(_ref) {
|
|
|
13902
13864
|
Tooltip.Arrow = Arrow;
|
|
13903
13865
|
Tooltip.Content = TooltipContent;
|
|
13904
13866
|
|
|
13905
|
-
function TopNavBar(_ref) {
|
|
13906
|
-
var left = _ref.left,
|
|
13907
|
-
right = _ref.right,
|
|
13908
|
-
title = _ref.title,
|
|
13909
|
-
_ref$titleAlign = _ref.titleAlign,
|
|
13910
|
-
titleAlign = _ref$titleAlign === void 0 ? 'center' : _ref$titleAlign,
|
|
13911
|
-
stickers = _ref.stickers,
|
|
13912
|
-
_ref$mode = _ref.mode,
|
|
13913
|
-
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
13914
|
-
_ref$hasSeparator = _ref.hasSeparator,
|
|
13915
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator;
|
|
13916
|
-
var isLargeTitleMode = mode === 'largeTitle';
|
|
13917
|
-
return /*#__PURE__*/jsxs(VStack, {
|
|
13918
|
-
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
13919
|
-
width: "100%",
|
|
13920
|
-
height: mode === 'default' ? 56 : undefined,
|
|
13921
|
-
justifyContent: "center",
|
|
13922
|
-
paddingX: "kitt.2",
|
|
13923
|
-
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
13924
|
-
paddingBottom: "kitt.3",
|
|
13925
|
-
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
13926
|
-
borderColor: "kitt.separator",
|
|
13927
|
-
children: [/*#__PURE__*/jsxs(HStack, {
|
|
13928
|
-
alignItems: "center",
|
|
13929
|
-
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
13930
|
-
children: [left !== null && left !== void 0 ? left : /*#__PURE__*/jsx(View, {
|
|
13931
|
-
width: "kitt.button.minWidth"
|
|
13932
|
-
}), mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
13933
|
-
flexGrow: "1",
|
|
13934
|
-
flexShrink: 1,
|
|
13935
|
-
paddingRight: "kitt.2",
|
|
13936
|
-
paddingLeft: "kitt.2",
|
|
13937
|
-
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
13938
|
-
textAlign: titleAlign,
|
|
13939
|
-
variant: "bold",
|
|
13940
|
-
ellipsizeMode: "tail",
|
|
13941
|
-
numberOfLines: 1,
|
|
13942
|
-
children: title
|
|
13943
|
-
}) : null
|
|
13944
|
-
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
13945
|
-
width: "kitt.button.minWidth"
|
|
13946
|
-
})]
|
|
13947
|
-
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
13948
|
-
space: "kitt.4",
|
|
13949
|
-
paddingX: "kitt.2",
|
|
13950
|
-
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
13951
|
-
width: "100%",
|
|
13952
|
-
space: "kitt.1",
|
|
13953
|
-
flexShrink: 1,
|
|
13954
|
-
flexWrap: "wrap",
|
|
13955
|
-
style: {
|
|
13956
|
-
rowGap: theme.getSpacing(1)
|
|
13957
|
-
},
|
|
13958
|
-
children: stickers.map(function (sticker, index) {
|
|
13959
|
-
return (
|
|
13960
|
-
/*#__PURE__*/
|
|
13961
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
13962
|
-
jsx(View, {
|
|
13963
|
-
children: sticker
|
|
13964
|
-
}, index)
|
|
13965
|
-
);
|
|
13966
|
-
})
|
|
13967
|
-
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
13968
|
-
base: "heading-m",
|
|
13969
|
-
children: title
|
|
13970
|
-
})]
|
|
13971
|
-
}) : null]
|
|
13972
|
-
});
|
|
13973
|
-
}
|
|
13974
|
-
function CloseButton(props) {
|
|
13975
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
13976
|
-
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
13977
|
-
}, props));
|
|
13978
|
-
}
|
|
13979
|
-
function BackButton(props) {
|
|
13980
|
-
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
13981
|
-
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
13982
|
-
}, props));
|
|
13983
|
-
}
|
|
13984
|
-
TopNavBar.CloseButton = CloseButton;
|
|
13985
|
-
TopNavBar.BackButton = BackButton;
|
|
13986
|
-
|
|
13987
13867
|
function getTypographyTypeConfig(type, theme) {
|
|
13988
13868
|
var configs = theme.kitt.typography.types[getTypographyFamily(type)].configs;
|
|
13989
13869
|
return configs[type];
|
|
@@ -14131,7 +14011,7 @@ function KittThemeProvider(_ref) {
|
|
|
14131
14011
|
var KittThemeDecorator = makeDecorator({
|
|
14132
14012
|
name: 'ThemeDecorator',
|
|
14133
14013
|
parameterName: 'theme',
|
|
14134
|
-
wrapper: function (storyFn, context, _ref2) {
|
|
14014
|
+
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
14135
14015
|
var _parameters$isSSR;
|
|
14136
14016
|
var _ref2$options = _ref2.options,
|
|
14137
14017
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|