@ornikar/kitt-universal 28.1.0 → 29.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/definitions/typography/Typography.d.ts +6 -2
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index.es.js +90 -90
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +61 -61
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes.es.js +1 -1
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +1 -1
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +26 -26
package/dist/index.es.js
CHANGED
|
@@ -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
|
|
2631
|
+
getSpacing: function (multiplier) {
|
|
2632
2632
|
return spacing * multiplier;
|
|
2633
2633
|
},
|
|
2634
2634
|
colors: colors,
|
|
@@ -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
|
|
2819
|
+
children: function (_ref3) {
|
|
2820
2820
|
var isHovered = _ref3.isHovered,
|
|
2821
2821
|
isPressed = _ref3.isPressed,
|
|
2822
2822
|
isFocused = _ref3.isFocused;
|
|
@@ -3591,11 +3591,11 @@ var useNativeAnimation$4 = function (_ref) {
|
|
|
3591
3591
|
};
|
|
3592
3592
|
});
|
|
3593
3593
|
return {
|
|
3594
|
-
onPressIn: function
|
|
3594
|
+
onPressIn: function () {
|
|
3595
3595
|
color.value = withSpring(1);
|
|
3596
3596
|
pressed.value = 1;
|
|
3597
3597
|
},
|
|
3598
|
-
onPressOut: function
|
|
3598
|
+
onPressOut: function () {
|
|
3599
3599
|
color.value = withSpring(0);
|
|
3600
3600
|
pressed.value = 0;
|
|
3601
3601
|
},
|
|
@@ -3664,7 +3664,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3664
3664
|
onHoverOut: onHoverOut,
|
|
3665
3665
|
onFocus: onFocus,
|
|
3666
3666
|
onBlur: onBlur,
|
|
3667
|
-
children: function
|
|
3667
|
+
children: function (_ref2) {
|
|
3668
3668
|
var isHovered = _ref2.isHovered,
|
|
3669
3669
|
isPressed = _ref2.isPressed,
|
|
3670
3670
|
isFocused = _ref2.isFocused;
|
|
@@ -3787,7 +3787,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3787
3787
|
stretch: stretch,
|
|
3788
3788
|
disabled: isLoading ? true : disabled,
|
|
3789
3789
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
3790
|
-
onPress: function
|
|
3790
|
+
onPress: function (e) {
|
|
3791
3791
|
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
3792
3792
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3793
3793
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
@@ -4059,10 +4059,10 @@ function BottomSheetComp(_ref, ref) {
|
|
|
4059
4059
|
borderRadius: 4,
|
|
4060
4060
|
backgroundColor: theme.kitt.bottomSheet.handle.backgroundColor
|
|
4061
4061
|
},
|
|
4062
|
-
handleComponent: function
|
|
4062
|
+
handleComponent: function (props) {
|
|
4063
4063
|
return hasHandle ? /*#__PURE__*/jsx(BottomSheetHandle, _objectSpread({}, props)) : null;
|
|
4064
4064
|
},
|
|
4065
|
-
backdropComponent: function
|
|
4065
|
+
backdropComponent: function (props) {
|
|
4066
4066
|
return hasBackdrop ? /*#__PURE__*/jsx(BottomSheetBackdrop, _objectSpread(_objectSpread({}, props), {}, {
|
|
4067
4067
|
opacity: 0.25,
|
|
4068
4068
|
appearsOnIndex: 0,
|
|
@@ -4071,7 +4071,7 @@ function BottomSheetComp(_ref, ref) {
|
|
|
4071
4071
|
}
|
|
4072
4072
|
}, rest), {}, {
|
|
4073
4073
|
topInset: top,
|
|
4074
|
-
children: function
|
|
4074
|
+
children: function (props) {
|
|
4075
4075
|
return /*#__PURE__*/jsx(Wrapper, {
|
|
4076
4076
|
children: typeof Content === 'function' ? /*#__PURE__*/jsx(Content, _objectSpread({}, props === null || props === void 0 ? void 0 : props.data)) : Content
|
|
4077
4077
|
});
|
|
@@ -4147,7 +4147,7 @@ function CloseButton$1(_ref) {
|
|
|
4147
4147
|
onPress = _ref.onPress;
|
|
4148
4148
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
4149
4149
|
return /*#__PURE__*/cloneElement(children, {
|
|
4150
|
-
onPress: function
|
|
4150
|
+
onPress: function () {
|
|
4151
4151
|
if (onPress) onPress();
|
|
4152
4152
|
onCloseContextCallback();
|
|
4153
4153
|
}
|
|
@@ -4323,11 +4323,11 @@ function CardModalAnimation(_ref) {
|
|
|
4323
4323
|
transparent: true,
|
|
4324
4324
|
supportedOrientations: ['landscape', 'portrait'],
|
|
4325
4325
|
visible: isModalVisible,
|
|
4326
|
-
onShow: function
|
|
4326
|
+
onShow: function () {
|
|
4327
4327
|
if (onEnter) onEnter();
|
|
4328
4328
|
setIsContentVisible(true);
|
|
4329
4329
|
},
|
|
4330
|
-
onDismiss: function
|
|
4330
|
+
onDismiss: function () {
|
|
4331
4331
|
if (onExited) onExited();
|
|
4332
4332
|
},
|
|
4333
4333
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -4374,7 +4374,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4374
4374
|
onClose: onClose,
|
|
4375
4375
|
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4376
4376
|
visible: visible,
|
|
4377
|
-
onExited: function
|
|
4377
|
+
onExited: function () {
|
|
4378
4378
|
if (onExited) onExited();
|
|
4379
4379
|
setIsModalBehaviourVisible(false);
|
|
4380
4380
|
},
|
|
@@ -4691,10 +4691,10 @@ var useNativeAnimation$3 = function (_ref) {
|
|
|
4691
4691
|
};
|
|
4692
4692
|
});
|
|
4693
4693
|
return {
|
|
4694
|
-
onPressIn: function
|
|
4694
|
+
onPressIn: function () {
|
|
4695
4695
|
pressed.value = true;
|
|
4696
4696
|
},
|
|
4697
|
-
onPressOut: function
|
|
4697
|
+
onPressOut: function () {
|
|
4698
4698
|
pressed.value = false;
|
|
4699
4699
|
},
|
|
4700
4700
|
backgroundStyles: backgroundStyles
|
|
@@ -4757,7 +4757,7 @@ function ChoiceItem(_ref) {
|
|
|
4757
4757
|
style: style,
|
|
4758
4758
|
onBlur: onBlur,
|
|
4759
4759
|
onFocus: onFocus,
|
|
4760
|
-
onPress: function
|
|
4760
|
+
onPress: function (e) {
|
|
4761
4761
|
if (onFocus) onFocus(e);
|
|
4762
4762
|
if (onPress) onPress();
|
|
4763
4763
|
handleChange();
|
|
@@ -4765,7 +4765,7 @@ function ChoiceItem(_ref) {
|
|
|
4765
4765
|
},
|
|
4766
4766
|
onPressIn: onPressIn,
|
|
4767
4767
|
onPressOut: onPressOut,
|
|
4768
|
-
children: function
|
|
4768
|
+
children: function (_ref2) {
|
|
4769
4769
|
var isHovered = _ref2.isHovered,
|
|
4770
4770
|
isPressed = _ref2.isPressed;
|
|
4771
4771
|
var textColor = getCurrentTextColor$1({
|
|
@@ -4869,7 +4869,7 @@ function Choices(_ref2) {
|
|
|
4869
4869
|
type: type,
|
|
4870
4870
|
disabled: disabled,
|
|
4871
4871
|
onPress: !isForm ? onPress : undefined,
|
|
4872
|
-
onChange: isForm ? function
|
|
4872
|
+
onChange: isForm ? function (newValue) {
|
|
4873
4873
|
setCurrentValue(newValue);
|
|
4874
4874
|
if (onChange) onChange(newValue);
|
|
4875
4875
|
} : undefined,
|
|
@@ -5025,11 +5025,11 @@ function DialogModalAnimation(_ref) {
|
|
|
5025
5025
|
transparent: true,
|
|
5026
5026
|
supportedOrientations: ['landscape', 'portrait'],
|
|
5027
5027
|
visible: isModalVisible,
|
|
5028
|
-
onShow: function
|
|
5028
|
+
onShow: function () {
|
|
5029
5029
|
if (onEnter) onEnter();
|
|
5030
5030
|
setIsContentVisible(true);
|
|
5031
5031
|
},
|
|
5032
|
-
onDismiss: function
|
|
5032
|
+
onDismiss: function () {
|
|
5033
5033
|
if (onExited) onExited();
|
|
5034
5034
|
},
|
|
5035
5035
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -5083,7 +5083,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
5083
5083
|
},
|
|
5084
5084
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
5085
5085
|
visible: visible,
|
|
5086
|
-
onExited: function
|
|
5086
|
+
onExited: function () {
|
|
5087
5087
|
if (onExited) onExited();
|
|
5088
5088
|
setIsModalBehaviourVisible(false);
|
|
5089
5089
|
},
|
|
@@ -5346,7 +5346,7 @@ function ExternalLink(_ref) {
|
|
|
5346
5346
|
var openExternalLink = useOpenExternalLink();
|
|
5347
5347
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5348
5348
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
5349
|
-
onPress: function
|
|
5349
|
+
onPress: function (e) {
|
|
5350
5350
|
if (onPress) {
|
|
5351
5351
|
onPress(e);
|
|
5352
5352
|
if (e.defaultPrevented) return;
|
|
@@ -5570,14 +5570,14 @@ var _excluded$y = ["children", "name", "disabled", "placeholder", "isInitialOpen
|
|
|
5570
5570
|
function patchNativeEvent(event) {
|
|
5571
5571
|
return event || {
|
|
5572
5572
|
preventDownshiftDefault: false,
|
|
5573
|
-
preventDefault: function
|
|
5573
|
+
preventDefault: function () {}
|
|
5574
5574
|
};
|
|
5575
5575
|
}
|
|
5576
5576
|
function isReactElement(element) {
|
|
5577
5577
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5578
5578
|
}
|
|
5579
5579
|
function Autocomplete(_ref) {
|
|
5580
|
-
var
|
|
5580
|
+
var children = _ref.children,
|
|
5581
5581
|
name = _ref.name,
|
|
5582
5582
|
disabled = _ref.disabled,
|
|
5583
5583
|
placeholder = _ref.placeholder,
|
|
@@ -5604,7 +5604,7 @@ function Autocomplete(_ref) {
|
|
|
5604
5604
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5605
5605
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5606
5606
|
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5607
|
-
var childrenArray = Children.toArray(
|
|
5607
|
+
var childrenArray = Children.toArray(children);
|
|
5608
5608
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5609
5609
|
return {
|
|
5610
5610
|
child: child,
|
|
@@ -5615,12 +5615,12 @@ function Autocomplete(_ref) {
|
|
|
5615
5615
|
defaultIsOpen: isInitialOpen,
|
|
5616
5616
|
initialSelectedItem: initialValue,
|
|
5617
5617
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5618
|
-
itemToString: function
|
|
5618
|
+
itemToString: function (item) {
|
|
5619
5619
|
// Prevents returning null values
|
|
5620
5620
|
if (!itemToString) return '';
|
|
5621
5621
|
return itemToString(item || undefined);
|
|
5622
5622
|
},
|
|
5623
|
-
stateReducer: function
|
|
5623
|
+
stateReducer: function (state, changes) {
|
|
5624
5624
|
switch (changes.type) {
|
|
5625
5625
|
case Downshift.stateChangeTypes.changeInput:
|
|
5626
5626
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5630,7 +5630,7 @@ function Autocomplete(_ref) {
|
|
|
5630
5630
|
return changes;
|
|
5631
5631
|
}
|
|
5632
5632
|
},
|
|
5633
|
-
onChange: function
|
|
5633
|
+
onChange: function (selectedItem, stateAndHelpers) {
|
|
5634
5634
|
if (_onChange) {
|
|
5635
5635
|
_onChange(selectedItem, stateAndHelpers);
|
|
5636
5636
|
}
|
|
@@ -5638,7 +5638,7 @@ function Autocomplete(_ref) {
|
|
|
5638
5638
|
onSelect: onSelectItem,
|
|
5639
5639
|
onOuterClick: onOuterPress,
|
|
5640
5640
|
onInputValueChange: onInputChange,
|
|
5641
|
-
children: function
|
|
5641
|
+
children: function (_ref2) {
|
|
5642
5642
|
var getRootProps = _ref2.getRootProps,
|
|
5643
5643
|
getInputProps = _ref2.getInputProps,
|
|
5644
5644
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5690,7 +5690,7 @@ function Autocomplete(_ref) {
|
|
|
5690
5690
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5691
5691
|
testID: "kitt.Autocomplete.listToggle",
|
|
5692
5692
|
hitSlop: 40,
|
|
5693
|
-
onPress: function
|
|
5693
|
+
onPress: function (e) {
|
|
5694
5694
|
if (Platform.OS === 'web') {
|
|
5695
5695
|
onClickToggle(e);
|
|
5696
5696
|
return;
|
|
@@ -5701,13 +5701,13 @@ function Autocomplete(_ref) {
|
|
|
5701
5701
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5702
5702
|
})
|
|
5703
5703
|
})) : null),
|
|
5704
|
-
onFocus: function
|
|
5704
|
+
onFocus: function (e) {
|
|
5705
5705
|
openMenu();
|
|
5706
5706
|
/** @ts-expect-error onFocus wants web events */
|
|
5707
5707
|
if (Platform.OS !== 'android' && onSearchInputFocus) onSearchInputFocus(e);
|
|
5708
5708
|
if (_onFocus) _onFocus(e);
|
|
5709
5709
|
},
|
|
5710
|
-
onBlur: function
|
|
5710
|
+
onBlur: function (e) {
|
|
5711
5711
|
/** @ts-expect-error onBlur wants web events */
|
|
5712
5712
|
if (Platform.OS === 'web' && onSearchInputBlur) onSearchInputBlur(e);
|
|
5713
5713
|
|
|
@@ -5743,14 +5743,14 @@ function Autocomplete(_ref) {
|
|
|
5743
5743
|
selected: ariaSelected
|
|
5744
5744
|
},
|
|
5745
5745
|
disabled: disabled,
|
|
5746
|
-
onPress: function
|
|
5746
|
+
onPress: function (e) {
|
|
5747
5747
|
if (Platform.OS === 'web') {
|
|
5748
5748
|
if (onClick) onClick(e);
|
|
5749
5749
|
return;
|
|
5750
5750
|
}
|
|
5751
5751
|
if (_onPress) _onPress(patchNativeEvent(e));
|
|
5752
5752
|
},
|
|
5753
|
-
children: function
|
|
5753
|
+
children: function (_ref5) {
|
|
5754
5754
|
var isHovered = _ref5.isHovered,
|
|
5755
5755
|
isFocused = _ref5.isFocused,
|
|
5756
5756
|
isPressed = _ref5.isPressed;
|
|
@@ -5840,12 +5840,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5840
5840
|
disabled: disabled
|
|
5841
5841
|
},
|
|
5842
5842
|
disabled: disabled,
|
|
5843
|
-
onPress: function
|
|
5843
|
+
onPress: function (e) {
|
|
5844
5844
|
if (onFocus) onFocus();
|
|
5845
5845
|
if (onChange) onChange(!checked, e);
|
|
5846
5846
|
if (onBlur) onBlur();
|
|
5847
5847
|
},
|
|
5848
|
-
children: function
|
|
5848
|
+
children: function (_ref2) {
|
|
5849
5849
|
var isHovered = _ref2.isHovered,
|
|
5850
5850
|
isPressed = _ref2.isPressed,
|
|
5851
5851
|
isFocused = _ref2.isFocused;
|
|
@@ -6400,7 +6400,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6400
6400
|
DateTimePickerAndroid.open({
|
|
6401
6401
|
testID: pickerUITestID,
|
|
6402
6402
|
value: currentValue || pickerDefaultDate || new Date(Date.now()),
|
|
6403
|
-
onChange: function
|
|
6403
|
+
onChange: function (e) {
|
|
6404
6404
|
setIsFocused(false);
|
|
6405
6405
|
var timestamp = e.nativeEvent.timestamp;
|
|
6406
6406
|
if (timestamp) {
|
|
@@ -6452,7 +6452,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
6452
6452
|
minimumDate: minimuDate,
|
|
6453
6453
|
display: displayMode
|
|
6454
6454
|
}, iosProps), {}, {
|
|
6455
|
-
onChange: function
|
|
6455
|
+
onChange: function (_event, date) {
|
|
6456
6456
|
return _onChange(date);
|
|
6457
6457
|
}
|
|
6458
6458
|
}));
|
|
@@ -6482,7 +6482,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6482
6482
|
|
|
6483
6483
|
return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
|
|
6484
6484
|
visible: Boolean(isVisible),
|
|
6485
|
-
onClose: function
|
|
6485
|
+
onClose: function () {
|
|
6486
6486
|
setCurrentValue(value);
|
|
6487
6487
|
onClose();
|
|
6488
6488
|
},
|
|
@@ -6493,7 +6493,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6493
6493
|
}) : null, /*#__PURE__*/jsx(CardModal.Body, {
|
|
6494
6494
|
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
6495
6495
|
value: currentValue,
|
|
6496
|
-
onChange: function
|
|
6496
|
+
onChange: function (newDate) {
|
|
6497
6497
|
setCurrentValue(function (prev) {
|
|
6498
6498
|
return newDate || prev;
|
|
6499
6499
|
});
|
|
@@ -6503,7 +6503,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6503
6503
|
children: /*#__PURE__*/jsx(Button, {
|
|
6504
6504
|
stretch: true,
|
|
6505
6505
|
type: "primary",
|
|
6506
|
-
onPress: function
|
|
6506
|
+
onPress: function () {
|
|
6507
6507
|
onChange(currentValue);
|
|
6508
6508
|
},
|
|
6509
6509
|
children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
|
|
@@ -6557,7 +6557,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6557
6557
|
isFocusedInternal: isFocused || isFocusedInternal,
|
|
6558
6558
|
isHoveredInternal: isHoveredInternal,
|
|
6559
6559
|
isPressedInternal: isPressedInternal,
|
|
6560
|
-
onPress: function
|
|
6560
|
+
onPress: function () {
|
|
6561
6561
|
if (onFocus) onFocus();
|
|
6562
6562
|
setIsPickerUIVisible(true);
|
|
6563
6563
|
setIsFocused(true);
|
|
@@ -6570,7 +6570,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6570
6570
|
validateButtonLabel: pickerUIValidateButtonLabel,
|
|
6571
6571
|
defaultDate: pickerDefaultDate,
|
|
6572
6572
|
onClose: handleModalClose,
|
|
6573
|
-
onChange: function
|
|
6573
|
+
onChange: function (newDate) {
|
|
6574
6574
|
setCurrentValue(newDate);
|
|
6575
6575
|
onChange(newDate);
|
|
6576
6576
|
handleModalClose();
|
|
@@ -6886,7 +6886,7 @@ function FilePicker(_ref) {
|
|
|
6886
6886
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
6887
6887
|
children: [/*#__PURE__*/cloneElement(childElement, {
|
|
6888
6888
|
// ensure that the press event is not prevented by Button component
|
|
6889
|
-
onPress: function
|
|
6889
|
+
onPress: function () {
|
|
6890
6890
|
var _childElement$props$o, _childElement$props, _bottomSheetRef$curre;
|
|
6891
6891
|
if (disabled) return;
|
|
6892
6892
|
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
@@ -7187,10 +7187,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
7187
7187
|
isLoadingResultDetails: false,
|
|
7188
7188
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
7189
7189
|
},
|
|
7190
|
-
onInputChange: function
|
|
7190
|
+
onInputChange: function () {
|
|
7191
7191
|
return Promise.resolve();
|
|
7192
7192
|
},
|
|
7193
|
-
onSelectItem: function
|
|
7193
|
+
onSelectItem: function () {}
|
|
7194
7194
|
});
|
|
7195
7195
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
7196
7196
|
var children = _ref.children,
|
|
@@ -7441,7 +7441,7 @@ function InputAddress(_ref) {
|
|
|
7441
7441
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
7442
7442
|
itemToString: itemToString,
|
|
7443
7443
|
initialValue: formattedInitialValue,
|
|
7444
|
-
checkSelectedItem: function
|
|
7444
|
+
checkSelectedItem: function (selectedItem, item) {
|
|
7445
7445
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
7446
7446
|
},
|
|
7447
7447
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -7450,10 +7450,10 @@ function InputAddress(_ref) {
|
|
|
7450
7450
|
}) : undefined,
|
|
7451
7451
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
7452
7452
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
7453
|
-
onInputChange: function
|
|
7453
|
+
onInputChange: function (v) {
|
|
7454
7454
|
_onInputChange(v);
|
|
7455
7455
|
},
|
|
7456
|
-
onChange: function
|
|
7456
|
+
onChange: function (v) {
|
|
7457
7457
|
onSelectItem(v, _onChange);
|
|
7458
7458
|
},
|
|
7459
7459
|
children: state.items.map(function (item) {
|
|
@@ -7535,7 +7535,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7535
7535
|
ref: ref
|
|
7536
7536
|
}, props), {}, {
|
|
7537
7537
|
inputMode: "numeric",
|
|
7538
|
-
onChange: function
|
|
7538
|
+
onChange: function (event) {
|
|
7539
7539
|
if (!onChange) return;
|
|
7540
7540
|
var value = parseFloat(event.nativeEvent.text);
|
|
7541
7541
|
|
|
@@ -7567,7 +7567,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7567
7567
|
testID: "kitt.InputPassword.passwordToggle",
|
|
7568
7568
|
hitSlop: 20,
|
|
7569
7569
|
accessibilityRole: "button",
|
|
7570
|
-
onPress: function
|
|
7570
|
+
onPress: function () {
|
|
7571
7571
|
return setIsVisible(function (prev) {
|
|
7572
7572
|
return !prev;
|
|
7573
7573
|
});
|
|
@@ -7602,7 +7602,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7602
7602
|
enterKeyHint: currentEnterKeyHint,
|
|
7603
7603
|
autoComplete: autoComplete,
|
|
7604
7604
|
textContentType: "telephoneNumber",
|
|
7605
|
-
onChange: function
|
|
7605
|
+
onChange: function (event) {
|
|
7606
7606
|
var number = parseNumber(event.nativeEvent.text);
|
|
7607
7607
|
|
|
7608
7608
|
// When intl phone number is valid :
|
|
@@ -7795,14 +7795,14 @@ function Radio(_ref, ref) {
|
|
|
7795
7795
|
focusable: checked && !disabled,
|
|
7796
7796
|
flexDirection: "row",
|
|
7797
7797
|
alignItems: "center",
|
|
7798
|
-
onPress: function
|
|
7798
|
+
onPress: function (event) {
|
|
7799
7799
|
if (onFocus) onFocus();
|
|
7800
7800
|
if (onChange) onChange(value, event);
|
|
7801
7801
|
if (onBlur) onBlur();
|
|
7802
7802
|
},
|
|
7803
7803
|
onFocus: onFocus,
|
|
7804
7804
|
onBlur: onBlur,
|
|
7805
|
-
children: function
|
|
7805
|
+
children: function (_ref2) {
|
|
7806
7806
|
var isHovered = _ref2.isHovered,
|
|
7807
7807
|
isPressed = _ref2.isPressed,
|
|
7808
7808
|
isFocused = _ref2.isFocused;
|
|
@@ -7921,11 +7921,11 @@ var useNativeAnimation$2 = function (_ref) {
|
|
|
7921
7921
|
};
|
|
7922
7922
|
});
|
|
7923
7923
|
return {
|
|
7924
|
-
onPressIn: function
|
|
7924
|
+
onPressIn: function () {
|
|
7925
7925
|
color.value = withSpring(1);
|
|
7926
7926
|
pressed.value = 1;
|
|
7927
7927
|
},
|
|
7928
|
-
onPressOut: function
|
|
7928
|
+
onPressOut: function () {
|
|
7929
7929
|
color.value = withSpring(0);
|
|
7930
7930
|
pressed.value = 0;
|
|
7931
7931
|
},
|
|
@@ -7978,7 +7978,7 @@ function RadioButton(_ref) {
|
|
|
7978
7978
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
7979
7979
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
7980
7980
|
disabled: disabled,
|
|
7981
|
-
onPress: function
|
|
7981
|
+
onPress: function (e) {
|
|
7982
7982
|
if (onFocus) onFocus(e);
|
|
7983
7983
|
if (onChange) onChange(value);
|
|
7984
7984
|
if (onBlur) onBlur(e);
|
|
@@ -7987,7 +7987,7 @@ function RadioButton(_ref) {
|
|
|
7987
7987
|
onPressOut: onPressOut,
|
|
7988
7988
|
onFocus: onFocus,
|
|
7989
7989
|
onBlur: onBlur,
|
|
7990
|
-
children: function
|
|
7990
|
+
children: function (_ref2) {
|
|
7991
7991
|
var isHovered = _ref2.isHovered,
|
|
7992
7992
|
isPressed = _ref2.isPressed,
|
|
7993
7993
|
isFocused = _ref2.isFocused;
|
|
@@ -8106,7 +8106,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
8106
8106
|
textAlignVertical: "top",
|
|
8107
8107
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
8108
8108
|
}, props), {}, {
|
|
8109
|
-
onChange: function
|
|
8109
|
+
onChange: function (e) {
|
|
8110
8110
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
8111
8111
|
var _props$onChange;
|
|
8112
8112
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -8269,10 +8269,10 @@ function Toggle(_ref) {
|
|
|
8269
8269
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
8270
8270
|
accessibilityRole: "togglebutton",
|
|
8271
8271
|
disabled: isDisabled,
|
|
8272
|
-
onPress: function
|
|
8272
|
+
onPress: function () {
|
|
8273
8273
|
onChange(!value);
|
|
8274
8274
|
},
|
|
8275
|
-
children: function
|
|
8275
|
+
children: function (_ref2) {
|
|
8276
8276
|
var isHovered = _ref2.isHovered,
|
|
8277
8277
|
isPressed = _ref2.isPressed,
|
|
8278
8278
|
isFocused = _ref2.isFocused;
|
|
@@ -8459,11 +8459,11 @@ function FullscreenModalAnimation(_ref) {
|
|
|
8459
8459
|
transparent: true,
|
|
8460
8460
|
supportedOrientations: ['landscape', 'portrait'],
|
|
8461
8461
|
visible: isModalVisible,
|
|
8462
|
-
onShow: function
|
|
8462
|
+
onShow: function () {
|
|
8463
8463
|
if (onEnter) onEnter();
|
|
8464
8464
|
setIsContentVisible(true);
|
|
8465
8465
|
},
|
|
8466
|
-
onDismiss: function
|
|
8466
|
+
onDismiss: function () {
|
|
8467
8467
|
if (onExited) onExited();
|
|
8468
8468
|
},
|
|
8469
8469
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -8510,7 +8510,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
8510
8510
|
onClose: onClose,
|
|
8511
8511
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
8512
8512
|
visible: visible,
|
|
8513
|
-
onExited: function
|
|
8513
|
+
onExited: function () {
|
|
8514
8514
|
if (onExited) onExited();
|
|
8515
8515
|
setIsModalBehaviourVisible(false);
|
|
8516
8516
|
},
|
|
@@ -8693,11 +8693,11 @@ var useNativeAnimation$1 = function (_ref) {
|
|
|
8693
8693
|
};
|
|
8694
8694
|
});
|
|
8695
8695
|
return {
|
|
8696
|
-
onPressIn: function
|
|
8696
|
+
onPressIn: function () {
|
|
8697
8697
|
color.value = withTiming(1, withTimingConfig);
|
|
8698
8698
|
translate.value = withTiming(2, withTimingConfig);
|
|
8699
8699
|
},
|
|
8700
|
-
onPressOut: function
|
|
8700
|
+
onPressOut: function () {
|
|
8701
8701
|
color.value = withTiming(0, withTimingConfig);
|
|
8702
8702
|
translate.value = withTiming(0, withTimingConfig);
|
|
8703
8703
|
},
|
|
@@ -8791,13 +8791,13 @@ function Highlight(_ref) {
|
|
|
8791
8791
|
});
|
|
8792
8792
|
}
|
|
8793
8793
|
return /*#__PURE__*/jsx(Pressable, {
|
|
8794
|
-
onPress: function
|
|
8794
|
+
onPress: function () {
|
|
8795
8795
|
setIsExpanded(!isExpanded);
|
|
8796
8796
|
setIsInitialRender(false);
|
|
8797
8797
|
},
|
|
8798
8798
|
onPressIn: onPressIn,
|
|
8799
8799
|
onPressOut: onPressOut,
|
|
8800
|
-
children: function
|
|
8800
|
+
children: function (_ref2) {
|
|
8801
8801
|
var isHovered = _ref2.isHovered;
|
|
8802
8802
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
8803
8803
|
isHovered: isHovered,
|
|
@@ -9135,7 +9135,7 @@ function MapMarker(_ref2) {
|
|
|
9135
9135
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
9136
9136
|
testID: testID,
|
|
9137
9137
|
onPress: onPress,
|
|
9138
|
-
children: function
|
|
9138
|
+
children: function (_ref3) {
|
|
9139
9139
|
var isHovered = _ref3.isHovered;
|
|
9140
9140
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
9141
9141
|
isHovered: isHovered
|
|
@@ -11897,19 +11897,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11897
11897
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
11898
11898
|
appear: shouldAppear,
|
|
11899
11899
|
visible: visible,
|
|
11900
|
-
onEnter: function
|
|
11900
|
+
onEnter: function () {
|
|
11901
11901
|
if (onEnter) onEnter();
|
|
11902
11902
|
|
|
11903
11903
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11904
11904
|
setShouldAppear(false);
|
|
11905
11905
|
},
|
|
11906
|
-
onExit: function
|
|
11906
|
+
onExit: function () {
|
|
11907
11907
|
if (onExit) onExit();
|
|
11908
11908
|
|
|
11909
11909
|
// Reset appear value to its original value for future modal display
|
|
11910
11910
|
setShouldAppear(appear);
|
|
11911
11911
|
},
|
|
11912
|
-
onExited: function
|
|
11912
|
+
onExited: function () {
|
|
11913
11913
|
if (onExited) onExited();
|
|
11914
11914
|
setIsModalBehaviourVisible(false);
|
|
11915
11915
|
},
|
|
@@ -12270,7 +12270,7 @@ function Picker(_ref) {
|
|
|
12270
12270
|
isOpen: state.isOpen,
|
|
12271
12271
|
selectedItem: state.currentValue,
|
|
12272
12272
|
disabled: disabled,
|
|
12273
|
-
onPress: function
|
|
12273
|
+
onPress: function () {
|
|
12274
12274
|
if (syncStateWithSourceValue) {
|
|
12275
12275
|
dispatch({
|
|
12276
12276
|
type: 'open-modal-with-value',
|
|
@@ -12319,7 +12319,7 @@ function Picker(_ref) {
|
|
|
12319
12319
|
accessibilityState: {
|
|
12320
12320
|
selected: isSelected
|
|
12321
12321
|
},
|
|
12322
|
-
onPress: function
|
|
12322
|
+
onPress: function () {
|
|
12323
12323
|
handleInternalChange(item.props.value);
|
|
12324
12324
|
},
|
|
12325
12325
|
children: function (_ref2) {
|
|
@@ -12340,7 +12340,7 @@ function Picker(_ref) {
|
|
|
12340
12340
|
children: /*#__PURE__*/jsx(Button, {
|
|
12341
12341
|
stretch: true,
|
|
12342
12342
|
type: "primary",
|
|
12343
|
-
onPress: function
|
|
12343
|
+
onPress: function () {
|
|
12344
12344
|
if (onChange) onChange(state.internalValue);
|
|
12345
12345
|
dispatch({
|
|
12346
12346
|
type: 'change-value'
|
|
@@ -12477,7 +12477,7 @@ function Skeleton(_ref) {
|
|
|
12477
12477
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
12478
12478
|
overflow: "hidden",
|
|
12479
12479
|
style: style,
|
|
12480
|
-
onLayout: function
|
|
12480
|
+
onLayout: function (_ref2) {
|
|
12481
12481
|
var nativeEvent = _ref2.nativeEvent;
|
|
12482
12482
|
return setWidth(nativeEvent.layout.width);
|
|
12483
12483
|
},
|
|
@@ -12699,7 +12699,7 @@ function StaticMap(_ref) {
|
|
|
12699
12699
|
position: "relative",
|
|
12700
12700
|
maxWidth: mapBoxMaxPictureWidth,
|
|
12701
12701
|
height: height,
|
|
12702
|
-
onLayout: function
|
|
12702
|
+
onLayout: function (event) {
|
|
12703
12703
|
var nativeEvent = event.nativeEvent;
|
|
12704
12704
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
12705
12705
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -12711,11 +12711,11 @@ function StaticMap(_ref) {
|
|
|
12711
12711
|
width: currentWidth,
|
|
12712
12712
|
height: height,
|
|
12713
12713
|
alt: alt,
|
|
12714
|
-
onLoadEnd: function
|
|
12714
|
+
onLoadEnd: function () {
|
|
12715
12715
|
setIsLoading(false);
|
|
12716
12716
|
if (onLoaded) onLoaded();
|
|
12717
12717
|
},
|
|
12718
|
-
onError: function
|
|
12718
|
+
onError: function () {
|
|
12719
12719
|
setHasError(true);
|
|
12720
12720
|
if (onError) onError();
|
|
12721
12721
|
}
|
|
@@ -12740,7 +12740,7 @@ function StaticMap(_ref) {
|
|
|
12740
12740
|
width: "100%",
|
|
12741
12741
|
height: "100%",
|
|
12742
12742
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
12743
|
-
onReload: function
|
|
12743
|
+
onReload: function () {
|
|
12744
12744
|
setHasError(false);
|
|
12745
12745
|
setIsLoading(true);
|
|
12746
12746
|
setCurrentMapKey(function (prev) {
|
|
@@ -12981,7 +12981,7 @@ function StoryContainer(_ref) {
|
|
|
12981
12981
|
var StoryDecorator = makeDecorator({
|
|
12982
12982
|
name: 'StoryDecorator',
|
|
12983
12983
|
parameterName: 'storyDecorator',
|
|
12984
|
-
wrapper: function
|
|
12984
|
+
wrapper: function (storyFn, context) {
|
|
12985
12985
|
var story = storyFn(context);
|
|
12986
12986
|
if (context.parameters.disableStoryContainer) {
|
|
12987
12987
|
return story;
|
|
@@ -13089,7 +13089,7 @@ function TabBarItem(_ref) {
|
|
|
13089
13089
|
disabled: disabled,
|
|
13090
13090
|
testID: testID,
|
|
13091
13091
|
onPress: onPress,
|
|
13092
|
-
children: function
|
|
13092
|
+
children: function (_ref2) {
|
|
13093
13093
|
var isHovered = _ref2.isHovered,
|
|
13094
13094
|
isPressed = _ref2.isPressed,
|
|
13095
13095
|
isFocused = _ref2.isFocused;
|
|
@@ -13178,7 +13178,7 @@ function TabBar(_ref) {
|
|
|
13178
13178
|
color: color,
|
|
13179
13179
|
variant: definedVariant,
|
|
13180
13180
|
type: type,
|
|
13181
|
-
onPress: function
|
|
13181
|
+
onPress: function (event) {
|
|
13182
13182
|
var _child$props$onPress, _child$props;
|
|
13183
13183
|
onChangeTab({
|
|
13184
13184
|
tab: tab,
|
|
@@ -13327,7 +13327,7 @@ function ModalDateTimePicker(_ref) {
|
|
|
13327
13327
|
stretch: true,
|
|
13328
13328
|
testID: "timePicker.ModalDateTimePicker.submitButton",
|
|
13329
13329
|
type: "primary",
|
|
13330
|
-
onPress: function
|
|
13330
|
+
onPress: function () {
|
|
13331
13331
|
onChange(currentValue);
|
|
13332
13332
|
},
|
|
13333
13333
|
children: buttonContent
|
|
@@ -13374,7 +13374,7 @@ var TimePickerPressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13374
13374
|
width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
|
|
13375
13375
|
pointerEvents: "box-only",
|
|
13376
13376
|
onPress: onPress,
|
|
13377
|
-
children: function
|
|
13377
|
+
children: function (_ref2) {
|
|
13378
13378
|
var isHovered = _ref2.isHovered,
|
|
13379
13379
|
isFocused = _ref2.isFocused,
|
|
13380
13380
|
isPressed = _ref2.isPressed;
|
|
@@ -13451,7 +13451,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13451
13451
|
isHoveredInternal: isHoveredInternal,
|
|
13452
13452
|
isFocusedInternal: isFocusedInternal,
|
|
13453
13453
|
isPressedInternal: isPressedInternal,
|
|
13454
|
-
onPress: function
|
|
13454
|
+
onPress: function () {
|
|
13455
13455
|
setIsPickerVisible(true);
|
|
13456
13456
|
}
|
|
13457
13457
|
}), Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsx(DateTimePicker, {
|
|
@@ -13475,7 +13475,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13475
13475
|
value: pickerValue,
|
|
13476
13476
|
validateButtonLabel: validateButtonLabel,
|
|
13477
13477
|
onChange: handleChange,
|
|
13478
|
-
onClose: function
|
|
13478
|
+
onClose: function () {
|
|
13479
13479
|
setIsPickerVisible(false);
|
|
13480
13480
|
}
|
|
13481
13481
|
}) : null]
|
|
@@ -13838,7 +13838,7 @@ function Tooltip(_ref) {
|
|
|
13838
13838
|
ref: reference,
|
|
13839
13839
|
children: renderPressable({
|
|
13840
13840
|
ref: getPressableRect,
|
|
13841
|
-
onPress: function
|
|
13841
|
+
onPress: function () {
|
|
13842
13842
|
if (onToggle) onToggle(!!pressed.value);
|
|
13843
13843
|
pressed.value = !pressed.value;
|
|
13844
13844
|
},
|
|
@@ -13857,7 +13857,7 @@ function Tooltip(_ref) {
|
|
|
13857
13857
|
left: customShiftData.left,
|
|
13858
13858
|
right: customShiftData.right,
|
|
13859
13859
|
zIndex: zIndex,
|
|
13860
|
-
onLayout: function
|
|
13860
|
+
onLayout: function (_ref2) {
|
|
13861
13861
|
var nativeEvent = _ref2.nativeEvent;
|
|
13862
13862
|
return setFloatingWidth(nativeEvent.layout.width);
|
|
13863
13863
|
},
|
|
@@ -14021,7 +14021,7 @@ function KittThemeProvider(_ref) {
|
|
|
14021
14021
|
var KittThemeDecorator = makeDecorator({
|
|
14022
14022
|
name: 'ThemeDecorator',
|
|
14023
14023
|
parameterName: 'theme',
|
|
14024
|
-
wrapper: function
|
|
14024
|
+
wrapper: function (storyFn, context, _ref2) {
|
|
14025
14025
|
var _parameters$isSSR;
|
|
14026
14026
|
var _ref2$options = _ref2.options,
|
|
14027
14027
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|