@ornikar/kitt-universal 27.9.1-canary.e79ce5a70db58d281f30a0e111ad7cf70d64cdb1.0 → 27.9.1-canary.f2c8ce09203150f3f2cb65aacb7c85ea25435b9f.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 +10 -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 +5 -3
- 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 +160 -278
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +160 -278
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +157 -267
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +148 -253
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +158 -268
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +149 -254
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +255 -373
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +286 -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,149 @@ 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
|
-
var
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
padding: paddingBottom,
|
|
4451
|
-
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4452
|
-
borderColor: "kitt.separator",
|
|
4453
|
-
justifyContent: "center",
|
|
4487
|
+
backgroundColor = _ref.backgroundColor,
|
|
4488
|
+
testID = _ref.testID;
|
|
4489
|
+
var isLargeTitleMode = mode === 'largeTitle';
|
|
4490
|
+
var leftEmptySpace = !left && titleAlign === 'left' ? null : /*#__PURE__*/jsx(View, {
|
|
4491
|
+
width: "kitt.iconButton.width"
|
|
4492
|
+
});
|
|
4493
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
4494
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
4454
4495
|
width: "100%",
|
|
4455
|
-
height:
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4496
|
+
height: mode === 'default' ? 56 : undefined,
|
|
4497
|
+
justifyContent: "center",
|
|
4498
|
+
paddingX: "kitt.2",
|
|
4499
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
4500
|
+
paddingBottom: "kitt.3",
|
|
4501
|
+
backgroundColor: backgroundColor,
|
|
4502
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
4503
|
+
borderColor: "kitt.separator",
|
|
4504
|
+
testID: testID,
|
|
4505
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
4459
4506
|
alignItems: "center",
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4463
|
-
width: "kitt.iconButton.width",
|
|
4464
|
-
children: left
|
|
4465
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4507
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
4508
|
+
children: [left !== null && left !== void 0 ? left : leftEmptySpace, mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
4466
4509
|
flexGrow: "1",
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4510
|
+
flexShrink: 1,
|
|
4511
|
+
paddingRight: "kitt.2",
|
|
4512
|
+
paddingLeft: "kitt.2",
|
|
4513
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4514
|
+
textAlign: titleAlign,
|
|
4471
4515
|
variant: "bold",
|
|
4516
|
+
ellipsizeMode: "tail",
|
|
4517
|
+
numberOfLines: 1,
|
|
4472
4518
|
children: title
|
|
4473
|
-
}) : null
|
|
4474
|
-
}), right ? /*#__PURE__*/jsx(View, {
|
|
4475
|
-
width: "kitt.iconButton.width"
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4519
|
+
}) : null
|
|
4520
|
+
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
4521
|
+
width: "kitt.iconButton.width"
|
|
4522
|
+
})]
|
|
4523
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
4524
|
+
space: "kitt.4",
|
|
4525
|
+
paddingX: "kitt.2",
|
|
4526
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
4527
|
+
width: "100%",
|
|
4528
|
+
space: "kitt.1",
|
|
4529
|
+
flexShrink: 1,
|
|
4530
|
+
flexWrap: "wrap",
|
|
4531
|
+
style: {
|
|
4532
|
+
rowGap: theme.getSpacing(1)
|
|
4533
|
+
},
|
|
4534
|
+
children: stickers.map(function (sticker, index) {
|
|
4535
|
+
return (
|
|
4536
|
+
/*#__PURE__*/
|
|
4537
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
4538
|
+
jsx(View, {
|
|
4539
|
+
children: sticker
|
|
4540
|
+
}, index)
|
|
4541
|
+
);
|
|
4542
|
+
})
|
|
4543
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
4544
|
+
base: "heading-m",
|
|
4545
|
+
children: title
|
|
4546
|
+
})]
|
|
4547
|
+
}) : null]
|
|
4548
|
+
});
|
|
4549
|
+
}
|
|
4550
|
+
function CloseButton(props) {
|
|
4551
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4552
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
4553
|
+
}, props));
|
|
4554
|
+
}
|
|
4555
|
+
function BackButton(props) {
|
|
4556
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
4557
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
4558
|
+
}, props));
|
|
4559
|
+
}
|
|
4560
|
+
TopNavBar.CloseButton = CloseButton;
|
|
4561
|
+
TopNavBar.BackButton = BackButton;
|
|
4562
|
+
|
|
4563
|
+
function CardModalHeader(props) {
|
|
4564
|
+
return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
|
|
4480
4565
|
}
|
|
4481
4566
|
|
|
4482
4567
|
var _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
@@ -4600,10 +4685,10 @@ var useNativeAnimation$3 = function (_ref) {
|
|
|
4600
4685
|
};
|
|
4601
4686
|
});
|
|
4602
4687
|
return {
|
|
4603
|
-
onPressIn: function () {
|
|
4688
|
+
onPressIn: function onPressIn() {
|
|
4604
4689
|
pressed.value = true;
|
|
4605
4690
|
},
|
|
4606
|
-
onPressOut: function () {
|
|
4691
|
+
onPressOut: function onPressOut() {
|
|
4607
4692
|
pressed.value = false;
|
|
4608
4693
|
},
|
|
4609
4694
|
backgroundStyles: backgroundStyles
|
|
@@ -4666,7 +4751,7 @@ function ChoiceItem(_ref) {
|
|
|
4666
4751
|
style: style,
|
|
4667
4752
|
onBlur: onBlur,
|
|
4668
4753
|
onFocus: onFocus,
|
|
4669
|
-
onPress: function (e) {
|
|
4754
|
+
onPress: function handlePress(e) {
|
|
4670
4755
|
if (onFocus) onFocus(e);
|
|
4671
4756
|
if (onPress) onPress();
|
|
4672
4757
|
handleChange();
|
|
@@ -4674,7 +4759,7 @@ function ChoiceItem(_ref) {
|
|
|
4674
4759
|
},
|
|
4675
4760
|
onPressIn: onPressIn,
|
|
4676
4761
|
onPressOut: onPressOut,
|
|
4677
|
-
children: function (_ref2) {
|
|
4762
|
+
children: function children(_ref2) {
|
|
4678
4763
|
var isHovered = _ref2.isHovered,
|
|
4679
4764
|
isPressed = _ref2.isPressed;
|
|
4680
4765
|
var textColor = getCurrentTextColor$1({
|
|
@@ -4778,7 +4863,7 @@ function Choices(_ref2) {
|
|
|
4778
4863
|
type: type,
|
|
4779
4864
|
disabled: disabled,
|
|
4780
4865
|
onPress: !isForm ? onPress : undefined,
|
|
4781
|
-
onChange: isForm ? function (newValue) {
|
|
4866
|
+
onChange: isForm ? function handleChange(newValue) {
|
|
4782
4867
|
setCurrentValue(newValue);
|
|
4783
4868
|
if (onChange) onChange(newValue);
|
|
4784
4869
|
} : undefined,
|
|
@@ -4934,11 +5019,11 @@ function DialogModalAnimation(_ref) {
|
|
|
4934
5019
|
transparent: true,
|
|
4935
5020
|
supportedOrientations: ['landscape', 'portrait'],
|
|
4936
5021
|
visible: isModalVisible,
|
|
4937
|
-
onShow: function () {
|
|
5022
|
+
onShow: function onShow() {
|
|
4938
5023
|
if (onEnter) onEnter();
|
|
4939
5024
|
setIsContentVisible(true);
|
|
4940
5025
|
},
|
|
4941
|
-
onDismiss: function () {
|
|
5026
|
+
onDismiss: function onDismiss() {
|
|
4942
5027
|
if (onExited) onExited();
|
|
4943
5028
|
},
|
|
4944
5029
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -4992,7 +5077,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4992
5077
|
},
|
|
4993
5078
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4994
5079
|
visible: visible,
|
|
4995
|
-
onExited: function () {
|
|
5080
|
+
onExited: function handleExitAnimationDone() {
|
|
4996
5081
|
if (onExited) onExited();
|
|
4997
5082
|
setIsModalBehaviourVisible(false);
|
|
4998
5083
|
},
|
|
@@ -5255,7 +5340,7 @@ function ExternalLink(_ref) {
|
|
|
5255
5340
|
var openExternalLink = useOpenExternalLink();
|
|
5256
5341
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5257
5342
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
5258
|
-
onPress: function (e) {
|
|
5343
|
+
onPress: function handleOnPress(e) {
|
|
5259
5344
|
if (onPress) {
|
|
5260
5345
|
onPress(e);
|
|
5261
5346
|
if (e.defaultPrevented) return;
|
|
@@ -5479,14 +5564,14 @@ var _excluded$y = ["children", "name", "disabled", "placeholder", "isInitialOpen
|
|
|
5479
5564
|
function patchNativeEvent(event) {
|
|
5480
5565
|
return event || {
|
|
5481
5566
|
preventDownshiftDefault: false,
|
|
5482
|
-
preventDefault: function () {}
|
|
5567
|
+
preventDefault: function preventDefault() {}
|
|
5483
5568
|
};
|
|
5484
5569
|
}
|
|
5485
5570
|
function isReactElement(element) {
|
|
5486
5571
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5487
5572
|
}
|
|
5488
5573
|
function Autocomplete(_ref) {
|
|
5489
|
-
var
|
|
5574
|
+
var _children = _ref.children,
|
|
5490
5575
|
name = _ref.name,
|
|
5491
5576
|
disabled = _ref.disabled,
|
|
5492
5577
|
placeholder = _ref.placeholder,
|
|
@@ -5513,7 +5598,7 @@ function Autocomplete(_ref) {
|
|
|
5513
5598
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5514
5599
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5515
5600
|
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5516
|
-
var childrenArray = Children.toArray(
|
|
5601
|
+
var childrenArray = Children.toArray(_children);
|
|
5517
5602
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5518
5603
|
return {
|
|
5519
5604
|
child: child,
|
|
@@ -5524,12 +5609,12 @@ function Autocomplete(_ref) {
|
|
|
5524
5609
|
defaultIsOpen: isInitialOpen,
|
|
5525
5610
|
initialSelectedItem: initialValue,
|
|
5526
5611
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5527
|
-
itemToString: function (item) {
|
|
5612
|
+
itemToString: function handleItemToString(item) {
|
|
5528
5613
|
// Prevents returning null values
|
|
5529
5614
|
if (!itemToString) return '';
|
|
5530
5615
|
return itemToString(item || undefined);
|
|
5531
5616
|
},
|
|
5532
|
-
stateReducer: function (state, changes) {
|
|
5617
|
+
stateReducer: function stateReducer(state, changes) {
|
|
5533
5618
|
switch (changes.type) {
|
|
5534
5619
|
case Downshift.stateChangeTypes.changeInput:
|
|
5535
5620
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5539,7 +5624,7 @@ function Autocomplete(_ref) {
|
|
|
5539
5624
|
return changes;
|
|
5540
5625
|
}
|
|
5541
5626
|
},
|
|
5542
|
-
onChange: function (selectedItem, stateAndHelpers) {
|
|
5627
|
+
onChange: function onChange(selectedItem, stateAndHelpers) {
|
|
5543
5628
|
if (_onChange) {
|
|
5544
5629
|
_onChange(selectedItem, stateAndHelpers);
|
|
5545
5630
|
}
|
|
@@ -5547,7 +5632,7 @@ function Autocomplete(_ref) {
|
|
|
5547
5632
|
onSelect: onSelectItem,
|
|
5548
5633
|
onOuterClick: onOuterPress,
|
|
5549
5634
|
onInputValueChange: onInputChange,
|
|
5550
|
-
children: function (_ref2) {
|
|
5635
|
+
children: function children(_ref2) {
|
|
5551
5636
|
var getRootProps = _ref2.getRootProps,
|
|
5552
5637
|
getInputProps = _ref2.getInputProps,
|
|
5553
5638
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5599,7 +5684,7 @@ function Autocomplete(_ref) {
|
|
|
5599
5684
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5600
5685
|
testID: "kitt.Autocomplete.listToggle",
|
|
5601
5686
|
hitSlop: 40,
|
|
5602
|
-
onPress: function (e) {
|
|
5687
|
+
onPress: function handleTogglePress(e) {
|
|
5603
5688
|
if (Platform.OS === 'web') {
|
|
5604
5689
|
onClickToggle(e);
|
|
5605
5690
|
return;
|
|
@@ -5610,13 +5695,13 @@ function Autocomplete(_ref) {
|
|
|
5610
5695
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5611
5696
|
})
|
|
5612
5697
|
})) : null),
|
|
5613
|
-
onFocus: function (e) {
|
|
5698
|
+
onFocus: function onFocus(e) {
|
|
5614
5699
|
openMenu();
|
|
5615
5700
|
/** @ts-expect-error onFocus wants web events */
|
|
5616
5701
|
if (Platform.OS !== 'android' && onSearchInputFocus) onSearchInputFocus(e);
|
|
5617
5702
|
if (_onFocus) _onFocus(e);
|
|
5618
5703
|
},
|
|
5619
|
-
onBlur: function (e) {
|
|
5704
|
+
onBlur: function onBlur(e) {
|
|
5620
5705
|
/** @ts-expect-error onBlur wants web events */
|
|
5621
5706
|
if (Platform.OS === 'web' && onSearchInputBlur) onSearchInputBlur(e);
|
|
5622
5707
|
|
|
@@ -5652,14 +5737,14 @@ function Autocomplete(_ref) {
|
|
|
5652
5737
|
selected: ariaSelected
|
|
5653
5738
|
},
|
|
5654
5739
|
disabled: disabled,
|
|
5655
|
-
onPress: function (e) {
|
|
5740
|
+
onPress: function onPress(e) {
|
|
5656
5741
|
if (Platform.OS === 'web') {
|
|
5657
5742
|
if (onClick) onClick(e);
|
|
5658
5743
|
return;
|
|
5659
5744
|
}
|
|
5660
5745
|
if (_onPress) _onPress(patchNativeEvent(e));
|
|
5661
5746
|
},
|
|
5662
|
-
children: function (_ref5) {
|
|
5747
|
+
children: function children(_ref5) {
|
|
5663
5748
|
var isHovered = _ref5.isHovered,
|
|
5664
5749
|
isFocused = _ref5.isFocused,
|
|
5665
5750
|
isPressed = _ref5.isPressed;
|
|
@@ -5749,12 +5834,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5749
5834
|
disabled: disabled
|
|
5750
5835
|
},
|
|
5751
5836
|
disabled: disabled,
|
|
5752
|
-
onPress: function (e) {
|
|
5837
|
+
onPress: function handlePress(e) {
|
|
5753
5838
|
if (onFocus) onFocus();
|
|
5754
5839
|
if (onChange) onChange(!checked, e);
|
|
5755
5840
|
if (onBlur) onBlur();
|
|
5756
5841
|
},
|
|
5757
|
-
children: function (_ref2) {
|
|
5842
|
+
children: function children(_ref2) {
|
|
5758
5843
|
var isHovered = _ref2.isHovered,
|
|
5759
5844
|
isPressed = _ref2.isPressed,
|
|
5760
5845
|
isFocused = _ref2.isFocused;
|
|
@@ -6309,7 +6394,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6309
6394
|
DateTimePickerAndroid.open({
|
|
6310
6395
|
testID: pickerUITestID,
|
|
6311
6396
|
value: currentValue || pickerDefaultDate || new Date(Date.now()),
|
|
6312
|
-
onChange: function (e) {
|
|
6397
|
+
onChange: function onChange(e) {
|
|
6313
6398
|
setIsFocused(false);
|
|
6314
6399
|
var timestamp = e.nativeEvent.timestamp;
|
|
6315
6400
|
if (timestamp) {
|
|
@@ -6361,7 +6446,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
6361
6446
|
minimumDate: minimuDate,
|
|
6362
6447
|
display: displayMode
|
|
6363
6448
|
}, iosProps), {}, {
|
|
6364
|
-
onChange: function (_event, date) {
|
|
6449
|
+
onChange: function onChange(_event, date) {
|
|
6365
6450
|
return _onChange(date);
|
|
6366
6451
|
}
|
|
6367
6452
|
}));
|
|
@@ -6371,11 +6456,7 @@ var _excluded$u = ["title", "isVisible", "value", "validateButtonLabel", "onClos
|
|
|
6371
6456
|
function ModalTitle(_ref) {
|
|
6372
6457
|
var children = _ref.children;
|
|
6373
6458
|
return /*#__PURE__*/jsx(CardModal.Header, {
|
|
6374
|
-
|
|
6375
|
-
base: "body-m",
|
|
6376
|
-
variant: "bold",
|
|
6377
|
-
children: children
|
|
6378
|
-
})
|
|
6459
|
+
title: children
|
|
6379
6460
|
});
|
|
6380
6461
|
}
|
|
6381
6462
|
function ModalPlatformDateTimePicker(_ref2) {
|
|
@@ -6395,7 +6476,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6395
6476
|
|
|
6396
6477
|
return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
|
|
6397
6478
|
visible: Boolean(isVisible),
|
|
6398
|
-
onClose: function () {
|
|
6479
|
+
onClose: function handleClose() {
|
|
6399
6480
|
setCurrentValue(value);
|
|
6400
6481
|
onClose();
|
|
6401
6482
|
},
|
|
@@ -6406,7 +6487,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6406
6487
|
}) : null, /*#__PURE__*/jsx(CardModal.Body, {
|
|
6407
6488
|
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
6408
6489
|
value: currentValue,
|
|
6409
|
-
onChange: function (newDate) {
|
|
6490
|
+
onChange: function handleChange(newDate) {
|
|
6410
6491
|
setCurrentValue(function (prev) {
|
|
6411
6492
|
return newDate || prev;
|
|
6412
6493
|
});
|
|
@@ -6416,7 +6497,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6416
6497
|
children: /*#__PURE__*/jsx(Button, {
|
|
6417
6498
|
stretch: true,
|
|
6418
6499
|
type: "primary",
|
|
6419
|
-
onPress: function () {
|
|
6500
|
+
onPress: function handleSubmit() {
|
|
6420
6501
|
onChange(currentValue);
|
|
6421
6502
|
},
|
|
6422
6503
|
children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
|
|
@@ -6470,7 +6551,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6470
6551
|
isFocusedInternal: isFocused || isFocusedInternal,
|
|
6471
6552
|
isHoveredInternal: isHoveredInternal,
|
|
6472
6553
|
isPressedInternal: isPressedInternal,
|
|
6473
|
-
onPress: function () {
|
|
6554
|
+
onPress: function handleModalOpen() {
|
|
6474
6555
|
if (onFocus) onFocus();
|
|
6475
6556
|
setIsPickerUIVisible(true);
|
|
6476
6557
|
setIsFocused(true);
|
|
@@ -6483,7 +6564,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6483
6564
|
validateButtonLabel: pickerUIValidateButtonLabel,
|
|
6484
6565
|
defaultDate: pickerDefaultDate,
|
|
6485
6566
|
onClose: handleModalClose,
|
|
6486
|
-
onChange: function (newDate) {
|
|
6567
|
+
onChange: function handleChange(newDate) {
|
|
6487
6568
|
setCurrentValue(newDate);
|
|
6488
6569
|
onChange(newDate);
|
|
6489
6570
|
handleModalClose();
|
|
@@ -6799,7 +6880,7 @@ function FilePicker(_ref) {
|
|
|
6799
6880
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
6800
6881
|
children: [/*#__PURE__*/cloneElement(childElement, {
|
|
6801
6882
|
// ensure that the press event is not prevented by Button component
|
|
6802
|
-
onPress: function () {
|
|
6883
|
+
onPress: function onPress() {
|
|
6803
6884
|
var _childElement$props$o, _childElement$props, _bottomSheetRef$curre;
|
|
6804
6885
|
if (disabled) return;
|
|
6805
6886
|
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
@@ -7100,10 +7181,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
7100
7181
|
isLoadingResultDetails: false,
|
|
7101
7182
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
7102
7183
|
},
|
|
7103
|
-
onInputChange: function () {
|
|
7184
|
+
onInputChange: function onInputChange() {
|
|
7104
7185
|
return Promise.resolve();
|
|
7105
7186
|
},
|
|
7106
|
-
onSelectItem: function () {}
|
|
7187
|
+
onSelectItem: function onSelectItem() {}
|
|
7107
7188
|
});
|
|
7108
7189
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
7109
7190
|
var children = _ref.children,
|
|
@@ -7354,7 +7435,7 @@ function InputAddress(_ref) {
|
|
|
7354
7435
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
7355
7436
|
itemToString: itemToString,
|
|
7356
7437
|
initialValue: formattedInitialValue,
|
|
7357
|
-
checkSelectedItem: function (selectedItem, item) {
|
|
7438
|
+
checkSelectedItem: function checkSelectedItem(selectedItem, item) {
|
|
7358
7439
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
7359
7440
|
},
|
|
7360
7441
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -7363,10 +7444,10 @@ function InputAddress(_ref) {
|
|
|
7363
7444
|
}) : undefined,
|
|
7364
7445
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
7365
7446
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
7366
|
-
onInputChange: function (v) {
|
|
7447
|
+
onInputChange: function onInputChange(v) {
|
|
7367
7448
|
_onInputChange(v);
|
|
7368
7449
|
},
|
|
7369
|
-
onChange: function (v) {
|
|
7450
|
+
onChange: function onChange(v) {
|
|
7370
7451
|
onSelectItem(v, _onChange);
|
|
7371
7452
|
},
|
|
7372
7453
|
children: state.items.map(function (item) {
|
|
@@ -7448,7 +7529,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7448
7529
|
ref: ref
|
|
7449
7530
|
}, props), {}, {
|
|
7450
7531
|
inputMode: "numeric",
|
|
7451
|
-
onChange: function (event) {
|
|
7532
|
+
onChange: function handleChange(event) {
|
|
7452
7533
|
if (!onChange) return;
|
|
7453
7534
|
var value = parseFloat(event.nativeEvent.text);
|
|
7454
7535
|
|
|
@@ -7480,7 +7561,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7480
7561
|
testID: "kitt.InputPassword.passwordToggle",
|
|
7481
7562
|
hitSlop: 20,
|
|
7482
7563
|
accessibilityRole: "button",
|
|
7483
|
-
onPress: function () {
|
|
7564
|
+
onPress: function onPress() {
|
|
7484
7565
|
return setIsVisible(function (prev) {
|
|
7485
7566
|
return !prev;
|
|
7486
7567
|
});
|
|
@@ -7515,7 +7596,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7515
7596
|
enterKeyHint: currentEnterKeyHint,
|
|
7516
7597
|
autoComplete: autoComplete,
|
|
7517
7598
|
textContentType: "telephoneNumber",
|
|
7518
|
-
onChange: function (event) {
|
|
7599
|
+
onChange: function handleChange(event) {
|
|
7519
7600
|
var number = parseNumber(event.nativeEvent.text);
|
|
7520
7601
|
|
|
7521
7602
|
// When intl phone number is valid :
|
|
@@ -7708,14 +7789,14 @@ function Radio(_ref, ref) {
|
|
|
7708
7789
|
focusable: checked && !disabled,
|
|
7709
7790
|
flexDirection: "row",
|
|
7710
7791
|
alignItems: "center",
|
|
7711
|
-
onPress: function (event) {
|
|
7792
|
+
onPress: function handlePress(event) {
|
|
7712
7793
|
if (onFocus) onFocus();
|
|
7713
7794
|
if (onChange) onChange(value, event);
|
|
7714
7795
|
if (onBlur) onBlur();
|
|
7715
7796
|
},
|
|
7716
7797
|
onFocus: onFocus,
|
|
7717
7798
|
onBlur: onBlur,
|
|
7718
|
-
children: function (_ref2) {
|
|
7799
|
+
children: function children(_ref2) {
|
|
7719
7800
|
var isHovered = _ref2.isHovered,
|
|
7720
7801
|
isPressed = _ref2.isPressed,
|
|
7721
7802
|
isFocused = _ref2.isFocused;
|
|
@@ -7834,11 +7915,11 @@ var useNativeAnimation$2 = function (_ref) {
|
|
|
7834
7915
|
};
|
|
7835
7916
|
});
|
|
7836
7917
|
return {
|
|
7837
|
-
onPressIn: function () {
|
|
7918
|
+
onPressIn: function handlePressIn() {
|
|
7838
7919
|
color.value = withSpring(1);
|
|
7839
7920
|
pressed.value = 1;
|
|
7840
7921
|
},
|
|
7841
|
-
onPressOut: function () {
|
|
7922
|
+
onPressOut: function handlePressOut() {
|
|
7842
7923
|
color.value = withSpring(0);
|
|
7843
7924
|
pressed.value = 0;
|
|
7844
7925
|
},
|
|
@@ -7891,7 +7972,7 @@ function RadioButton(_ref) {
|
|
|
7891
7972
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
7892
7973
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
7893
7974
|
disabled: disabled,
|
|
7894
|
-
onPress: function (e) {
|
|
7975
|
+
onPress: function handlePress(e) {
|
|
7895
7976
|
if (onFocus) onFocus(e);
|
|
7896
7977
|
if (onChange) onChange(value);
|
|
7897
7978
|
if (onBlur) onBlur(e);
|
|
@@ -7900,7 +7981,7 @@ function RadioButton(_ref) {
|
|
|
7900
7981
|
onPressOut: onPressOut,
|
|
7901
7982
|
onFocus: onFocus,
|
|
7902
7983
|
onBlur: onBlur,
|
|
7903
|
-
children: function (_ref2) {
|
|
7984
|
+
children: function children(_ref2) {
|
|
7904
7985
|
var isHovered = _ref2.isHovered,
|
|
7905
7986
|
isPressed = _ref2.isPressed,
|
|
7906
7987
|
isFocused = _ref2.isFocused;
|
|
@@ -8019,7 +8100,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
8019
8100
|
textAlignVertical: "top",
|
|
8020
8101
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
8021
8102
|
}, props), {}, {
|
|
8022
|
-
onChange: function (e) {
|
|
8103
|
+
onChange: function handleOnChange(e) {
|
|
8023
8104
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
8024
8105
|
var _props$onChange;
|
|
8025
8106
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -8182,10 +8263,10 @@ function Toggle(_ref) {
|
|
|
8182
8263
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
8183
8264
|
accessibilityRole: "togglebutton",
|
|
8184
8265
|
disabled: isDisabled,
|
|
8185
|
-
onPress: function () {
|
|
8266
|
+
onPress: function handlePress() {
|
|
8186
8267
|
onChange(!value);
|
|
8187
8268
|
},
|
|
8188
|
-
children: function (_ref2) {
|
|
8269
|
+
children: function children(_ref2) {
|
|
8189
8270
|
var isHovered = _ref2.isHovered,
|
|
8190
8271
|
isPressed = _ref2.isPressed,
|
|
8191
8272
|
isFocused = _ref2.isFocused;
|
|
@@ -8372,11 +8453,11 @@ function FullscreenModalAnimation(_ref) {
|
|
|
8372
8453
|
transparent: true,
|
|
8373
8454
|
supportedOrientations: ['landscape', 'portrait'],
|
|
8374
8455
|
visible: isModalVisible,
|
|
8375
|
-
onShow: function () {
|
|
8456
|
+
onShow: function onShow() {
|
|
8376
8457
|
if (onEnter) onEnter();
|
|
8377
8458
|
setIsContentVisible(true);
|
|
8378
8459
|
},
|
|
8379
|
-
onDismiss: function () {
|
|
8460
|
+
onDismiss: function onDismiss() {
|
|
8380
8461
|
if (onExited) onExited();
|
|
8381
8462
|
},
|
|
8382
8463
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -8423,7 +8504,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
8423
8504
|
onClose: onClose,
|
|
8424
8505
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
8425
8506
|
visible: visible,
|
|
8426
|
-
onExited: function () {
|
|
8507
|
+
onExited: function handleExitAnimationDone() {
|
|
8427
8508
|
if (onExited) onExited();
|
|
8428
8509
|
setIsModalBehaviourVisible(false);
|
|
8429
8510
|
},
|
|
@@ -8455,64 +8536,17 @@ function FullscreenModalContainer(_ref) {
|
|
|
8455
8536
|
});
|
|
8456
8537
|
}
|
|
8457
8538
|
|
|
8458
|
-
var _excluded$c = ["
|
|
8539
|
+
var _excluded$c = ["shouldHandleTopNotch"];
|
|
8459
8540
|
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,
|
|
8541
|
+
var _ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
8468
8542
|
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
8469
8543
|
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
8470
8544
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
8471
8545
|
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",
|
|
8546
|
+
return /*#__PURE__*/jsx(View, {
|
|
8480
8547
|
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
|
-
}));
|
|
8548
|
+
children: /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props))
|
|
8549
|
+
});
|
|
8516
8550
|
}
|
|
8517
8551
|
|
|
8518
8552
|
function FullscreenModal(_ref) {
|
|
@@ -8653,11 +8687,11 @@ var useNativeAnimation$1 = function (_ref) {
|
|
|
8653
8687
|
};
|
|
8654
8688
|
});
|
|
8655
8689
|
return {
|
|
8656
|
-
onPressIn: function () {
|
|
8690
|
+
onPressIn: function handleHoverIn() {
|
|
8657
8691
|
color.value = withTiming(1, withTimingConfig);
|
|
8658
8692
|
translate.value = withTiming(2, withTimingConfig);
|
|
8659
8693
|
},
|
|
8660
|
-
onPressOut: function () {
|
|
8694
|
+
onPressOut: function handleHoverOut() {
|
|
8661
8695
|
color.value = withTiming(0, withTimingConfig);
|
|
8662
8696
|
translate.value = withTiming(0, withTimingConfig);
|
|
8663
8697
|
},
|
|
@@ -8751,13 +8785,13 @@ function Highlight(_ref) {
|
|
|
8751
8785
|
});
|
|
8752
8786
|
}
|
|
8753
8787
|
return /*#__PURE__*/jsx(Pressable, {
|
|
8754
|
-
onPress: function () {
|
|
8788
|
+
onPress: function handlePress() {
|
|
8755
8789
|
setIsExpanded(!isExpanded);
|
|
8756
8790
|
setIsInitialRender(false);
|
|
8757
8791
|
},
|
|
8758
8792
|
onPressIn: onPressIn,
|
|
8759
8793
|
onPressOut: onPressOut,
|
|
8760
|
-
children: function (_ref2) {
|
|
8794
|
+
children: function children(_ref2) {
|
|
8761
8795
|
var isHovered = _ref2.isHovered;
|
|
8762
8796
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
8763
8797
|
isHovered: isHovered,
|
|
@@ -8811,60 +8845,6 @@ function Highlight(_ref) {
|
|
|
8811
8845
|
});
|
|
8812
8846
|
}
|
|
8813
8847
|
|
|
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
8848
|
function InfoCard(_ref) {
|
|
8869
8849
|
var title = _ref.title,
|
|
8870
8850
|
action = _ref.action,
|
|
@@ -9086,7 +9066,7 @@ var getBackgroundColor = function (_ref) {
|
|
|
9086
9066
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint["default"];
|
|
9087
9067
|
};
|
|
9088
9068
|
|
|
9089
|
-
var _excluded$
|
|
9069
|
+
var _excluded$b = ["onPress", "testID"];
|
|
9090
9070
|
function StaticMapMarker$1(_ref) {
|
|
9091
9071
|
var variant = _ref.variant,
|
|
9092
9072
|
isHovered = _ref.isHovered,
|
|
@@ -9145,11 +9125,11 @@ function StaticMapMarker$1(_ref) {
|
|
|
9145
9125
|
function MapMarker(_ref2) {
|
|
9146
9126
|
var onPress = _ref2.onPress,
|
|
9147
9127
|
testID = _ref2.testID,
|
|
9148
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
9128
|
+
props = _objectWithoutProperties(_ref2, _excluded$b);
|
|
9149
9129
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
9150
9130
|
testID: testID,
|
|
9151
9131
|
onPress: onPress,
|
|
9152
|
-
children: function (_ref3) {
|
|
9132
|
+
children: function children(_ref3) {
|
|
9153
9133
|
var isHovered = _ref3.isHovered;
|
|
9154
9134
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
9155
9135
|
isHovered: isHovered
|
|
@@ -10592,9 +10572,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10592
10572
|
},
|
|
10593
10573
|
icon: theme.icon,
|
|
10594
10574
|
cardModal: {
|
|
10595
|
-
header: {
|
|
10596
|
-
height: theme.cardModal.header.height
|
|
10597
|
-
},
|
|
10598
10575
|
maxWidth: theme.cardModal.maxWidth,
|
|
10599
10576
|
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
10600
10577
|
minHeight: theme.cardModal.minHeight
|
|
@@ -10899,11 +10876,6 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10899
10876
|
width: theme.iconButton.width,
|
|
10900
10877
|
height: theme.iconButton.height
|
|
10901
10878
|
},
|
|
10902
|
-
fullscreenModal: {
|
|
10903
|
-
header: {
|
|
10904
|
-
height: theme.fullscreenModal.header.height
|
|
10905
|
-
}
|
|
10906
|
-
},
|
|
10907
10879
|
pageLoader: {
|
|
10908
10880
|
size: theme.pageLoader.size
|
|
10909
10881
|
},
|
|
@@ -10998,7 +10970,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
10998
10970
|
}
|
|
10999
10971
|
},
|
|
11000
10972
|
fullscreenModal: {
|
|
11001
|
-
horizontalPadding: theme.fullscreenModal.
|
|
10973
|
+
horizontalPadding: theme.fullscreenModal.horizontalPadding,
|
|
11002
10974
|
body: {
|
|
11003
10975
|
verticalPadding: theme.fullscreenModal.body.verticalPadding
|
|
11004
10976
|
},
|
|
@@ -11819,6 +11791,7 @@ function KittNativeBaseProvider(_ref) {
|
|
|
11819
11791
|
});
|
|
11820
11792
|
}
|
|
11821
11793
|
|
|
11794
|
+
var _excluded$a = ["right"];
|
|
11822
11795
|
function NavigationBottomSheet(_ref) {
|
|
11823
11796
|
var children = _ref.children,
|
|
11824
11797
|
hasScrollView = _ref.hasScrollView,
|
|
@@ -11857,19 +11830,15 @@ function NavigationBottomSheet(_ref) {
|
|
|
11857
11830
|
})
|
|
11858
11831
|
});
|
|
11859
11832
|
}
|
|
11833
|
+
|
|
11834
|
+
/**
|
|
11835
|
+
* Web only: display right CloseButton
|
|
11836
|
+
*/
|
|
11837
|
+
|
|
11860
11838
|
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
|
-
});
|
|
11839
|
+
_ref2.right;
|
|
11840
|
+
var props = _objectWithoutProperties(_ref2, _excluded$a);
|
|
11841
|
+
return /*#__PURE__*/jsx(TopNavBar, _objectSpread({}, props));
|
|
11873
11842
|
}
|
|
11874
11843
|
function NavigationBottomSheetBody(props) {
|
|
11875
11844
|
return /*#__PURE__*/jsx(VStack, _objectSpread({
|
|
@@ -11921,19 +11890,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11921
11890
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
11922
11891
|
appear: shouldAppear,
|
|
11923
11892
|
visible: visible,
|
|
11924
|
-
onEnter: function () {
|
|
11893
|
+
onEnter: function handleEnter() {
|
|
11925
11894
|
if (onEnter) onEnter();
|
|
11926
11895
|
|
|
11927
11896
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11928
11897
|
setShouldAppear(false);
|
|
11929
11898
|
},
|
|
11930
|
-
onExit: function () {
|
|
11899
|
+
onExit: function handleExit() {
|
|
11931
11900
|
if (onExit) onExit();
|
|
11932
11901
|
|
|
11933
11902
|
// Reset appear value to its original value for future modal display
|
|
11934
11903
|
setShouldAppear(appear);
|
|
11935
11904
|
},
|
|
11936
|
-
onExited: function () {
|
|
11905
|
+
onExited: function handleExitAnimationDone() {
|
|
11937
11906
|
if (onExited) onExited();
|
|
11938
11907
|
setIsModalBehaviourVisible(false);
|
|
11939
11908
|
},
|
|
@@ -12294,7 +12263,7 @@ function Picker(_ref) {
|
|
|
12294
12263
|
isOpen: state.isOpen,
|
|
12295
12264
|
selectedItem: state.currentValue,
|
|
12296
12265
|
disabled: disabled,
|
|
12297
|
-
onPress: function () {
|
|
12266
|
+
onPress: function handlePressTrigger() {
|
|
12298
12267
|
if (syncStateWithSourceValue) {
|
|
12299
12268
|
dispatch({
|
|
12300
12269
|
type: 'open-modal-with-value',
|
|
@@ -12313,14 +12282,9 @@ function Picker(_ref) {
|
|
|
12313
12282
|
onClose: handleClose,
|
|
12314
12283
|
children: /*#__PURE__*/jsxs(CardModal, {
|
|
12315
12284
|
children: [/*#__PURE__*/jsx(CardModal.Header, {
|
|
12316
|
-
|
|
12317
|
-
|
|
12285
|
+
title: title,
|
|
12286
|
+
right: /*#__PURE__*/jsx(TopNavBar.CloseButton, {
|
|
12318
12287
|
onPress: handleClose
|
|
12319
|
-
}),
|
|
12320
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
12321
|
-
base: "body-m",
|
|
12322
|
-
variant: "bold",
|
|
12323
|
-
children: title
|
|
12324
12288
|
})
|
|
12325
12289
|
}), Platform.OS === 'ios' && shouldDisplayNativePickerOnIOS ? /*#__PURE__*/jsx(Picker$1, {
|
|
12326
12290
|
testID: testID,
|
|
@@ -12348,7 +12312,7 @@ function Picker(_ref) {
|
|
|
12348
12312
|
accessibilityState: {
|
|
12349
12313
|
selected: isSelected
|
|
12350
12314
|
},
|
|
12351
|
-
onPress: function () {
|
|
12315
|
+
onPress: function onPress() {
|
|
12352
12316
|
handleInternalChange(item.props.value);
|
|
12353
12317
|
},
|
|
12354
12318
|
children: function (_ref2) {
|
|
@@ -12369,7 +12333,7 @@ function Picker(_ref) {
|
|
|
12369
12333
|
children: /*#__PURE__*/jsx(Button, {
|
|
12370
12334
|
stretch: true,
|
|
12371
12335
|
type: "primary",
|
|
12372
|
-
onPress: function () {
|
|
12336
|
+
onPress: function handleChange() {
|
|
12373
12337
|
if (onChange) onChange(state.internalValue);
|
|
12374
12338
|
dispatch({
|
|
12375
12339
|
type: 'change-value'
|
|
@@ -12506,7 +12470,7 @@ function Skeleton(_ref) {
|
|
|
12506
12470
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
12507
12471
|
overflow: "hidden",
|
|
12508
12472
|
style: style,
|
|
12509
|
-
onLayout: function (_ref2) {
|
|
12473
|
+
onLayout: function onLayout(_ref2) {
|
|
12510
12474
|
var nativeEvent = _ref2.nativeEvent;
|
|
12511
12475
|
return setWidth(nativeEvent.layout.width);
|
|
12512
12476
|
},
|
|
@@ -12728,7 +12692,7 @@ function StaticMap(_ref) {
|
|
|
12728
12692
|
position: "relative",
|
|
12729
12693
|
maxWidth: mapBoxMaxPictureWidth,
|
|
12730
12694
|
height: height,
|
|
12731
|
-
onLayout: function (event) {
|
|
12695
|
+
onLayout: function handleParentLayout(event) {
|
|
12732
12696
|
var nativeEvent = event.nativeEvent;
|
|
12733
12697
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
12734
12698
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -12740,11 +12704,11 @@ function StaticMap(_ref) {
|
|
|
12740
12704
|
width: currentWidth,
|
|
12741
12705
|
height: height,
|
|
12742
12706
|
alt: alt,
|
|
12743
|
-
onLoadEnd: function () {
|
|
12707
|
+
onLoadEnd: function handleImageLoadEnd() {
|
|
12744
12708
|
setIsLoading(false);
|
|
12745
12709
|
if (onLoaded) onLoaded();
|
|
12746
12710
|
},
|
|
12747
|
-
onError: function () {
|
|
12711
|
+
onError: function handleError() {
|
|
12748
12712
|
setHasError(true);
|
|
12749
12713
|
if (onError) onError();
|
|
12750
12714
|
}
|
|
@@ -12769,7 +12733,7 @@ function StaticMap(_ref) {
|
|
|
12769
12733
|
width: "100%",
|
|
12770
12734
|
height: "100%",
|
|
12771
12735
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
12772
|
-
onReload: function () {
|
|
12736
|
+
onReload: function handleReload() {
|
|
12773
12737
|
setHasError(false);
|
|
12774
12738
|
setIsLoading(true);
|
|
12775
12739
|
setCurrentMapKey(function (prev) {
|
|
@@ -13010,7 +12974,7 @@ function StoryContainer(_ref) {
|
|
|
13010
12974
|
var StoryDecorator = makeDecorator({
|
|
13011
12975
|
name: 'StoryDecorator',
|
|
13012
12976
|
parameterName: 'storyDecorator',
|
|
13013
|
-
wrapper: function (storyFn, context) {
|
|
12977
|
+
wrapper: function wrapper(storyFn, context) {
|
|
13014
12978
|
var story = storyFn(context);
|
|
13015
12979
|
if (context.parameters.disableStoryContainer) {
|
|
13016
12980
|
return story;
|
|
@@ -13118,7 +13082,7 @@ function TabBarItem(_ref) {
|
|
|
13118
13082
|
disabled: disabled,
|
|
13119
13083
|
testID: testID,
|
|
13120
13084
|
onPress: onPress,
|
|
13121
|
-
children: function (_ref2) {
|
|
13085
|
+
children: function children(_ref2) {
|
|
13122
13086
|
var isHovered = _ref2.isHovered,
|
|
13123
13087
|
isPressed = _ref2.isPressed,
|
|
13124
13088
|
isFocused = _ref2.isFocused;
|
|
@@ -13207,7 +13171,7 @@ function TabBar(_ref) {
|
|
|
13207
13171
|
color: color,
|
|
13208
13172
|
variant: definedVariant,
|
|
13209
13173
|
type: type,
|
|
13210
|
-
onPress: function (event) {
|
|
13174
|
+
onPress: function onPress(event) {
|
|
13211
13175
|
var _child$props$onPress, _child$props;
|
|
13212
13176
|
onChangeTab({
|
|
13213
13177
|
tab: tab,
|
|
@@ -13356,7 +13320,7 @@ function ModalDateTimePicker(_ref) {
|
|
|
13356
13320
|
stretch: true,
|
|
13357
13321
|
testID: "timePicker.ModalDateTimePicker.submitButton",
|
|
13358
13322
|
type: "primary",
|
|
13359
|
-
onPress: function () {
|
|
13323
|
+
onPress: function handleSubmit() {
|
|
13360
13324
|
onChange(currentValue);
|
|
13361
13325
|
},
|
|
13362
13326
|
children: buttonContent
|
|
@@ -13403,7 +13367,7 @@ var TimePickerPressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13403
13367
|
width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
|
|
13404
13368
|
pointerEvents: "box-only",
|
|
13405
13369
|
onPress: onPress,
|
|
13406
|
-
children: function (_ref2) {
|
|
13370
|
+
children: function children(_ref2) {
|
|
13407
13371
|
var isHovered = _ref2.isHovered,
|
|
13408
13372
|
isFocused = _ref2.isFocused,
|
|
13409
13373
|
isPressed = _ref2.isPressed;
|
|
@@ -13480,7 +13444,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13480
13444
|
isHoveredInternal: isHoveredInternal,
|
|
13481
13445
|
isFocusedInternal: isFocusedInternal,
|
|
13482
13446
|
isPressedInternal: isPressedInternal,
|
|
13483
|
-
onPress: function () {
|
|
13447
|
+
onPress: function handlePress() {
|
|
13484
13448
|
setIsPickerVisible(true);
|
|
13485
13449
|
}
|
|
13486
13450
|
}), Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsx(DateTimePicker, {
|
|
@@ -13504,7 +13468,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13504
13468
|
value: pickerValue,
|
|
13505
13469
|
validateButtonLabel: validateButtonLabel,
|
|
13506
13470
|
onChange: handleChange,
|
|
13507
|
-
onClose: function () {
|
|
13471
|
+
onClose: function handleClose() {
|
|
13508
13472
|
setIsPickerVisible(false);
|
|
13509
13473
|
}
|
|
13510
13474
|
}) : null]
|
|
@@ -13867,7 +13831,7 @@ function Tooltip(_ref) {
|
|
|
13867
13831
|
ref: reference,
|
|
13868
13832
|
children: renderPressable({
|
|
13869
13833
|
ref: getPressableRect,
|
|
13870
|
-
onPress: function () {
|
|
13834
|
+
onPress: function handlePress() {
|
|
13871
13835
|
if (onToggle) onToggle(!!pressed.value);
|
|
13872
13836
|
pressed.value = !pressed.value;
|
|
13873
13837
|
},
|
|
@@ -13886,7 +13850,7 @@ function Tooltip(_ref) {
|
|
|
13886
13850
|
left: customShiftData.left,
|
|
13887
13851
|
right: customShiftData.right,
|
|
13888
13852
|
zIndex: zIndex,
|
|
13889
|
-
onLayout: function (_ref2) {
|
|
13853
|
+
onLayout: function onLayout(_ref2) {
|
|
13890
13854
|
var nativeEvent = _ref2.nativeEvent;
|
|
13891
13855
|
return setFloatingWidth(nativeEvent.layout.width);
|
|
13892
13856
|
},
|
|
@@ -13902,88 +13866,6 @@ function Tooltip(_ref) {
|
|
|
13902
13866
|
Tooltip.Arrow = Arrow;
|
|
13903
13867
|
Tooltip.Content = TooltipContent;
|
|
13904
13868
|
|
|
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
13869
|
function getTypographyTypeConfig(type, theme) {
|
|
13988
13870
|
var configs = theme.kitt.typography.types[getTypographyFamily(type)].configs;
|
|
13989
13871
|
return configs[type];
|
|
@@ -14131,7 +14013,7 @@ function KittThemeProvider(_ref) {
|
|
|
14131
14013
|
var KittThemeDecorator = makeDecorator({
|
|
14132
14014
|
name: 'ThemeDecorator',
|
|
14133
14015
|
parameterName: 'theme',
|
|
14134
|
-
wrapper: function (storyFn, context, _ref2) {
|
|
14016
|
+
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
14135
14017
|
var _parameters$isSSR;
|
|
14136
14018
|
var _ref2$options = _ref2.options,
|
|
14137
14019
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|