@ornikar/kitt-universal 27.9.0 → 27.9.1-canary.e79ce5a70db58d281f30a0e111ad7cf70d64cdb1.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 +24 -0
- package/dist/definitions/typography/Typography.d.ts +18 -6
- 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 +28 -28
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;
|
|
@@ -3586,11 +3586,11 @@ var useNativeAnimation$4 = function (_ref) {
|
|
|
3586
3586
|
};
|
|
3587
3587
|
});
|
|
3588
3588
|
return {
|
|
3589
|
-
onPressIn: function
|
|
3589
|
+
onPressIn: function () {
|
|
3590
3590
|
color.value = withSpring(1);
|
|
3591
3591
|
pressed.value = 1;
|
|
3592
3592
|
},
|
|
3593
|
-
onPressOut: function
|
|
3593
|
+
onPressOut: function () {
|
|
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
|
|
3662
|
+
children: function (_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
|
|
3785
|
+
onPress: function (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
|
|
4057
|
+
handleComponent: function (props) {
|
|
4058
4058
|
return hasHandle ? /*#__PURE__*/jsx(BottomSheetHandle, _objectSpread({}, props)) : null;
|
|
4059
4059
|
},
|
|
4060
|
-
backdropComponent: function
|
|
4060
|
+
backdropComponent: function (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
|
|
4069
|
+
children: function (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 () {
|
|
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 () {
|
|
4322
4322
|
if (onEnter) onEnter();
|
|
4323
4323
|
setIsContentVisible(true);
|
|
4324
4324
|
},
|
|
4325
|
-
onDismiss: function
|
|
4325
|
+
onDismiss: function () {
|
|
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 () {
|
|
4373
4373
|
if (onExited) onExited();
|
|
4374
4374
|
setIsModalBehaviourVisible(false);
|
|
4375
4375
|
},
|
|
@@ -4600,10 +4600,10 @@ var useNativeAnimation$3 = function (_ref) {
|
|
|
4600
4600
|
};
|
|
4601
4601
|
});
|
|
4602
4602
|
return {
|
|
4603
|
-
onPressIn: function
|
|
4603
|
+
onPressIn: function () {
|
|
4604
4604
|
pressed.value = true;
|
|
4605
4605
|
},
|
|
4606
|
-
onPressOut: function
|
|
4606
|
+
onPressOut: function () {
|
|
4607
4607
|
pressed.value = false;
|
|
4608
4608
|
},
|
|
4609
4609
|
backgroundStyles: backgroundStyles
|
|
@@ -4666,7 +4666,7 @@ function ChoiceItem(_ref) {
|
|
|
4666
4666
|
style: style,
|
|
4667
4667
|
onBlur: onBlur,
|
|
4668
4668
|
onFocus: onFocus,
|
|
4669
|
-
onPress: function
|
|
4669
|
+
onPress: function (e) {
|
|
4670
4670
|
if (onFocus) onFocus(e);
|
|
4671
4671
|
if (onPress) onPress();
|
|
4672
4672
|
handleChange();
|
|
@@ -4674,7 +4674,7 @@ function ChoiceItem(_ref) {
|
|
|
4674
4674
|
},
|
|
4675
4675
|
onPressIn: onPressIn,
|
|
4676
4676
|
onPressOut: onPressOut,
|
|
4677
|
-
children: function
|
|
4677
|
+
children: function (_ref2) {
|
|
4678
4678
|
var isHovered = _ref2.isHovered,
|
|
4679
4679
|
isPressed = _ref2.isPressed;
|
|
4680
4680
|
var textColor = getCurrentTextColor$1({
|
|
@@ -4778,7 +4778,7 @@ function Choices(_ref2) {
|
|
|
4778
4778
|
type: type,
|
|
4779
4779
|
disabled: disabled,
|
|
4780
4780
|
onPress: !isForm ? onPress : undefined,
|
|
4781
|
-
onChange: isForm ? function
|
|
4781
|
+
onChange: isForm ? function (newValue) {
|
|
4782
4782
|
setCurrentValue(newValue);
|
|
4783
4783
|
if (onChange) onChange(newValue);
|
|
4784
4784
|
} : undefined,
|
|
@@ -4934,11 +4934,11 @@ function DialogModalAnimation(_ref) {
|
|
|
4934
4934
|
transparent: true,
|
|
4935
4935
|
supportedOrientations: ['landscape', 'portrait'],
|
|
4936
4936
|
visible: isModalVisible,
|
|
4937
|
-
onShow: function
|
|
4937
|
+
onShow: function () {
|
|
4938
4938
|
if (onEnter) onEnter();
|
|
4939
4939
|
setIsContentVisible(true);
|
|
4940
4940
|
},
|
|
4941
|
-
onDismiss: function
|
|
4941
|
+
onDismiss: function () {
|
|
4942
4942
|
if (onExited) onExited();
|
|
4943
4943
|
},
|
|
4944
4944
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -4992,7 +4992,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4992
4992
|
},
|
|
4993
4993
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4994
4994
|
visible: visible,
|
|
4995
|
-
onExited: function
|
|
4995
|
+
onExited: function () {
|
|
4996
4996
|
if (onExited) onExited();
|
|
4997
4997
|
setIsModalBehaviourVisible(false);
|
|
4998
4998
|
},
|
|
@@ -5255,7 +5255,7 @@ function ExternalLink(_ref) {
|
|
|
5255
5255
|
var openExternalLink = useOpenExternalLink();
|
|
5256
5256
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5257
5257
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
5258
|
-
onPress: function
|
|
5258
|
+
onPress: function (e) {
|
|
5259
5259
|
if (onPress) {
|
|
5260
5260
|
onPress(e);
|
|
5261
5261
|
if (e.defaultPrevented) return;
|
|
@@ -5479,14 +5479,14 @@ var _excluded$y = ["children", "name", "disabled", "placeholder", "isInitialOpen
|
|
|
5479
5479
|
function patchNativeEvent(event) {
|
|
5480
5480
|
return event || {
|
|
5481
5481
|
preventDownshiftDefault: false,
|
|
5482
|
-
preventDefault: function
|
|
5482
|
+
preventDefault: function () {}
|
|
5483
5483
|
};
|
|
5484
5484
|
}
|
|
5485
5485
|
function isReactElement(element) {
|
|
5486
5486
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5487
5487
|
}
|
|
5488
5488
|
function Autocomplete(_ref) {
|
|
5489
|
-
var
|
|
5489
|
+
var children = _ref.children,
|
|
5490
5490
|
name = _ref.name,
|
|
5491
5491
|
disabled = _ref.disabled,
|
|
5492
5492
|
placeholder = _ref.placeholder,
|
|
@@ -5513,7 +5513,7 @@ function Autocomplete(_ref) {
|
|
|
5513
5513
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5514
5514
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5515
5515
|
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5516
|
-
var childrenArray = Children.toArray(
|
|
5516
|
+
var childrenArray = Children.toArray(children);
|
|
5517
5517
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5518
5518
|
return {
|
|
5519
5519
|
child: child,
|
|
@@ -5524,12 +5524,12 @@ function Autocomplete(_ref) {
|
|
|
5524
5524
|
defaultIsOpen: isInitialOpen,
|
|
5525
5525
|
initialSelectedItem: initialValue,
|
|
5526
5526
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5527
|
-
itemToString: function
|
|
5527
|
+
itemToString: function (item) {
|
|
5528
5528
|
// Prevents returning null values
|
|
5529
5529
|
if (!itemToString) return '';
|
|
5530
5530
|
return itemToString(item || undefined);
|
|
5531
5531
|
},
|
|
5532
|
-
stateReducer: function
|
|
5532
|
+
stateReducer: function (state, changes) {
|
|
5533
5533
|
switch (changes.type) {
|
|
5534
5534
|
case Downshift.stateChangeTypes.changeInput:
|
|
5535
5535
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5539,7 +5539,7 @@ function Autocomplete(_ref) {
|
|
|
5539
5539
|
return changes;
|
|
5540
5540
|
}
|
|
5541
5541
|
},
|
|
5542
|
-
onChange: function
|
|
5542
|
+
onChange: function (selectedItem, stateAndHelpers) {
|
|
5543
5543
|
if (_onChange) {
|
|
5544
5544
|
_onChange(selectedItem, stateAndHelpers);
|
|
5545
5545
|
}
|
|
@@ -5547,7 +5547,7 @@ function Autocomplete(_ref) {
|
|
|
5547
5547
|
onSelect: onSelectItem,
|
|
5548
5548
|
onOuterClick: onOuterPress,
|
|
5549
5549
|
onInputValueChange: onInputChange,
|
|
5550
|
-
children: function
|
|
5550
|
+
children: function (_ref2) {
|
|
5551
5551
|
var getRootProps = _ref2.getRootProps,
|
|
5552
5552
|
getInputProps = _ref2.getInputProps,
|
|
5553
5553
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5599,7 +5599,7 @@ function Autocomplete(_ref) {
|
|
|
5599
5599
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5600
5600
|
testID: "kitt.Autocomplete.listToggle",
|
|
5601
5601
|
hitSlop: 40,
|
|
5602
|
-
onPress: function
|
|
5602
|
+
onPress: function (e) {
|
|
5603
5603
|
if (Platform.OS === 'web') {
|
|
5604
5604
|
onClickToggle(e);
|
|
5605
5605
|
return;
|
|
@@ -5610,13 +5610,13 @@ function Autocomplete(_ref) {
|
|
|
5610
5610
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5611
5611
|
})
|
|
5612
5612
|
})) : null),
|
|
5613
|
-
onFocus: function
|
|
5613
|
+
onFocus: function (e) {
|
|
5614
5614
|
openMenu();
|
|
5615
5615
|
/** @ts-expect-error onFocus wants web events */
|
|
5616
5616
|
if (Platform.OS !== 'android' && onSearchInputFocus) onSearchInputFocus(e);
|
|
5617
5617
|
if (_onFocus) _onFocus(e);
|
|
5618
5618
|
},
|
|
5619
|
-
onBlur: function
|
|
5619
|
+
onBlur: function (e) {
|
|
5620
5620
|
/** @ts-expect-error onBlur wants web events */
|
|
5621
5621
|
if (Platform.OS === 'web' && onSearchInputBlur) onSearchInputBlur(e);
|
|
5622
5622
|
|
|
@@ -5652,14 +5652,14 @@ function Autocomplete(_ref) {
|
|
|
5652
5652
|
selected: ariaSelected
|
|
5653
5653
|
},
|
|
5654
5654
|
disabled: disabled,
|
|
5655
|
-
onPress: function
|
|
5655
|
+
onPress: function (e) {
|
|
5656
5656
|
if (Platform.OS === 'web') {
|
|
5657
5657
|
if (onClick) onClick(e);
|
|
5658
5658
|
return;
|
|
5659
5659
|
}
|
|
5660
5660
|
if (_onPress) _onPress(patchNativeEvent(e));
|
|
5661
5661
|
},
|
|
5662
|
-
children: function
|
|
5662
|
+
children: function (_ref5) {
|
|
5663
5663
|
var isHovered = _ref5.isHovered,
|
|
5664
5664
|
isFocused = _ref5.isFocused,
|
|
5665
5665
|
isPressed = _ref5.isPressed;
|
|
@@ -5749,12 +5749,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5749
5749
|
disabled: disabled
|
|
5750
5750
|
},
|
|
5751
5751
|
disabled: disabled,
|
|
5752
|
-
onPress: function
|
|
5752
|
+
onPress: function (e) {
|
|
5753
5753
|
if (onFocus) onFocus();
|
|
5754
5754
|
if (onChange) onChange(!checked, e);
|
|
5755
5755
|
if (onBlur) onBlur();
|
|
5756
5756
|
},
|
|
5757
|
-
children: function
|
|
5757
|
+
children: function (_ref2) {
|
|
5758
5758
|
var isHovered = _ref2.isHovered,
|
|
5759
5759
|
isPressed = _ref2.isPressed,
|
|
5760
5760
|
isFocused = _ref2.isFocused;
|
|
@@ -6309,7 +6309,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6309
6309
|
DateTimePickerAndroid.open({
|
|
6310
6310
|
testID: pickerUITestID,
|
|
6311
6311
|
value: currentValue || pickerDefaultDate || new Date(Date.now()),
|
|
6312
|
-
onChange: function
|
|
6312
|
+
onChange: function (e) {
|
|
6313
6313
|
setIsFocused(false);
|
|
6314
6314
|
var timestamp = e.nativeEvent.timestamp;
|
|
6315
6315
|
if (timestamp) {
|
|
@@ -6361,7 +6361,7 @@ function PlatformDateTimePicker(_ref) {
|
|
|
6361
6361
|
minimumDate: minimuDate,
|
|
6362
6362
|
display: displayMode
|
|
6363
6363
|
}, iosProps), {}, {
|
|
6364
|
-
onChange: function
|
|
6364
|
+
onChange: function (_event, date) {
|
|
6365
6365
|
return _onChange(date);
|
|
6366
6366
|
}
|
|
6367
6367
|
}));
|
|
@@ -6395,7 +6395,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6395
6395
|
|
|
6396
6396
|
return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
|
|
6397
6397
|
visible: Boolean(isVisible),
|
|
6398
|
-
onClose: function
|
|
6398
|
+
onClose: function () {
|
|
6399
6399
|
setCurrentValue(value);
|
|
6400
6400
|
onClose();
|
|
6401
6401
|
},
|
|
@@ -6406,7 +6406,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6406
6406
|
}) : null, /*#__PURE__*/jsx(CardModal.Body, {
|
|
6407
6407
|
children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
6408
6408
|
value: currentValue,
|
|
6409
|
-
onChange: function
|
|
6409
|
+
onChange: function (newDate) {
|
|
6410
6410
|
setCurrentValue(function (prev) {
|
|
6411
6411
|
return newDate || prev;
|
|
6412
6412
|
});
|
|
@@ -6416,7 +6416,7 @@ function ModalPlatformDateTimePicker(_ref2) {
|
|
|
6416
6416
|
children: /*#__PURE__*/jsx(Button, {
|
|
6417
6417
|
stretch: true,
|
|
6418
6418
|
type: "primary",
|
|
6419
|
-
onPress: function
|
|
6419
|
+
onPress: function () {
|
|
6420
6420
|
onChange(currentValue);
|
|
6421
6421
|
},
|
|
6422
6422
|
children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
|
|
@@ -6470,7 +6470,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6470
6470
|
isFocusedInternal: isFocused || isFocusedInternal,
|
|
6471
6471
|
isHoveredInternal: isHoveredInternal,
|
|
6472
6472
|
isPressedInternal: isPressedInternal,
|
|
6473
|
-
onPress: function
|
|
6473
|
+
onPress: function () {
|
|
6474
6474
|
if (onFocus) onFocus();
|
|
6475
6475
|
setIsPickerUIVisible(true);
|
|
6476
6476
|
setIsFocused(true);
|
|
@@ -6483,7 +6483,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6483
6483
|
validateButtonLabel: pickerUIValidateButtonLabel,
|
|
6484
6484
|
defaultDate: pickerDefaultDate,
|
|
6485
6485
|
onClose: handleModalClose,
|
|
6486
|
-
onChange: function
|
|
6486
|
+
onChange: function (newDate) {
|
|
6487
6487
|
setCurrentValue(newDate);
|
|
6488
6488
|
onChange(newDate);
|
|
6489
6489
|
handleModalClose();
|
|
@@ -6799,7 +6799,7 @@ function FilePicker(_ref) {
|
|
|
6799
6799
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
6800
6800
|
children: [/*#__PURE__*/cloneElement(childElement, {
|
|
6801
6801
|
// ensure that the press event is not prevented by Button component
|
|
6802
|
-
onPress: function
|
|
6802
|
+
onPress: function () {
|
|
6803
6803
|
var _childElement$props$o, _childElement$props, _bottomSheetRef$curre;
|
|
6804
6804
|
if (disabled) return;
|
|
6805
6805
|
(_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
|
|
@@ -7100,10 +7100,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
7100
7100
|
isLoadingResultDetails: false,
|
|
7101
7101
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
7102
7102
|
},
|
|
7103
|
-
onInputChange: function
|
|
7103
|
+
onInputChange: function () {
|
|
7104
7104
|
return Promise.resolve();
|
|
7105
7105
|
},
|
|
7106
|
-
onSelectItem: function
|
|
7106
|
+
onSelectItem: function () {}
|
|
7107
7107
|
});
|
|
7108
7108
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
7109
7109
|
var children = _ref.children,
|
|
@@ -7354,7 +7354,7 @@ function InputAddress(_ref) {
|
|
|
7354
7354
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
7355
7355
|
itemToString: itemToString,
|
|
7356
7356
|
initialValue: formattedInitialValue,
|
|
7357
|
-
checkSelectedItem: function
|
|
7357
|
+
checkSelectedItem: function (selectedItem, item) {
|
|
7358
7358
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
7359
7359
|
},
|
|
7360
7360
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -7363,10 +7363,10 @@ function InputAddress(_ref) {
|
|
|
7363
7363
|
}) : undefined,
|
|
7364
7364
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
7365
7365
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
7366
|
-
onInputChange: function
|
|
7366
|
+
onInputChange: function (v) {
|
|
7367
7367
|
_onInputChange(v);
|
|
7368
7368
|
},
|
|
7369
|
-
onChange: function
|
|
7369
|
+
onChange: function (v) {
|
|
7370
7370
|
onSelectItem(v, _onChange);
|
|
7371
7371
|
},
|
|
7372
7372
|
children: state.items.map(function (item) {
|
|
@@ -7448,7 +7448,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7448
7448
|
ref: ref
|
|
7449
7449
|
}, props), {}, {
|
|
7450
7450
|
inputMode: "numeric",
|
|
7451
|
-
onChange: function
|
|
7451
|
+
onChange: function (event) {
|
|
7452
7452
|
if (!onChange) return;
|
|
7453
7453
|
var value = parseFloat(event.nativeEvent.text);
|
|
7454
7454
|
|
|
@@ -7480,7 +7480,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7480
7480
|
testID: "kitt.InputPassword.passwordToggle",
|
|
7481
7481
|
hitSlop: 20,
|
|
7482
7482
|
accessibilityRole: "button",
|
|
7483
|
-
onPress: function
|
|
7483
|
+
onPress: function () {
|
|
7484
7484
|
return setIsVisible(function (prev) {
|
|
7485
7485
|
return !prev;
|
|
7486
7486
|
});
|
|
@@ -7515,7 +7515,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7515
7515
|
enterKeyHint: currentEnterKeyHint,
|
|
7516
7516
|
autoComplete: autoComplete,
|
|
7517
7517
|
textContentType: "telephoneNumber",
|
|
7518
|
-
onChange: function
|
|
7518
|
+
onChange: function (event) {
|
|
7519
7519
|
var number = parseNumber(event.nativeEvent.text);
|
|
7520
7520
|
|
|
7521
7521
|
// When intl phone number is valid :
|
|
@@ -7708,14 +7708,14 @@ function Radio(_ref, ref) {
|
|
|
7708
7708
|
focusable: checked && !disabled,
|
|
7709
7709
|
flexDirection: "row",
|
|
7710
7710
|
alignItems: "center",
|
|
7711
|
-
onPress: function
|
|
7711
|
+
onPress: function (event) {
|
|
7712
7712
|
if (onFocus) onFocus();
|
|
7713
7713
|
if (onChange) onChange(value, event);
|
|
7714
7714
|
if (onBlur) onBlur();
|
|
7715
7715
|
},
|
|
7716
7716
|
onFocus: onFocus,
|
|
7717
7717
|
onBlur: onBlur,
|
|
7718
|
-
children: function
|
|
7718
|
+
children: function (_ref2) {
|
|
7719
7719
|
var isHovered = _ref2.isHovered,
|
|
7720
7720
|
isPressed = _ref2.isPressed,
|
|
7721
7721
|
isFocused = _ref2.isFocused;
|
|
@@ -7834,11 +7834,11 @@ var useNativeAnimation$2 = function (_ref) {
|
|
|
7834
7834
|
};
|
|
7835
7835
|
});
|
|
7836
7836
|
return {
|
|
7837
|
-
onPressIn: function
|
|
7837
|
+
onPressIn: function () {
|
|
7838
7838
|
color.value = withSpring(1);
|
|
7839
7839
|
pressed.value = 1;
|
|
7840
7840
|
},
|
|
7841
|
-
onPressOut: function
|
|
7841
|
+
onPressOut: function () {
|
|
7842
7842
|
color.value = withSpring(0);
|
|
7843
7843
|
pressed.value = 0;
|
|
7844
7844
|
},
|
|
@@ -7891,7 +7891,7 @@ function RadioButton(_ref) {
|
|
|
7891
7891
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
7892
7892
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
7893
7893
|
disabled: disabled,
|
|
7894
|
-
onPress: function
|
|
7894
|
+
onPress: function (e) {
|
|
7895
7895
|
if (onFocus) onFocus(e);
|
|
7896
7896
|
if (onChange) onChange(value);
|
|
7897
7897
|
if (onBlur) onBlur(e);
|
|
@@ -7900,7 +7900,7 @@ function RadioButton(_ref) {
|
|
|
7900
7900
|
onPressOut: onPressOut,
|
|
7901
7901
|
onFocus: onFocus,
|
|
7902
7902
|
onBlur: onBlur,
|
|
7903
|
-
children: function
|
|
7903
|
+
children: function (_ref2) {
|
|
7904
7904
|
var isHovered = _ref2.isHovered,
|
|
7905
7905
|
isPressed = _ref2.isPressed,
|
|
7906
7906
|
isFocused = _ref2.isFocused;
|
|
@@ -8019,7 +8019,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
8019
8019
|
textAlignVertical: "top",
|
|
8020
8020
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
8021
8021
|
}, props), {}, {
|
|
8022
|
-
onChange: function
|
|
8022
|
+
onChange: function (e) {
|
|
8023
8023
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
8024
8024
|
var _props$onChange;
|
|
8025
8025
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -8182,10 +8182,10 @@ function Toggle(_ref) {
|
|
|
8182
8182
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
8183
8183
|
accessibilityRole: "togglebutton",
|
|
8184
8184
|
disabled: isDisabled,
|
|
8185
|
-
onPress: function
|
|
8185
|
+
onPress: function () {
|
|
8186
8186
|
onChange(!value);
|
|
8187
8187
|
},
|
|
8188
|
-
children: function
|
|
8188
|
+
children: function (_ref2) {
|
|
8189
8189
|
var isHovered = _ref2.isHovered,
|
|
8190
8190
|
isPressed = _ref2.isPressed,
|
|
8191
8191
|
isFocused = _ref2.isFocused;
|
|
@@ -8372,11 +8372,11 @@ function FullscreenModalAnimation(_ref) {
|
|
|
8372
8372
|
transparent: true,
|
|
8373
8373
|
supportedOrientations: ['landscape', 'portrait'],
|
|
8374
8374
|
visible: isModalVisible,
|
|
8375
|
-
onShow: function
|
|
8375
|
+
onShow: function () {
|
|
8376
8376
|
if (onEnter) onEnter();
|
|
8377
8377
|
setIsContentVisible(true);
|
|
8378
8378
|
},
|
|
8379
|
-
onDismiss: function
|
|
8379
|
+
onDismiss: function () {
|
|
8380
8380
|
if (onExited) onExited();
|
|
8381
8381
|
},
|
|
8382
8382
|
children: /*#__PURE__*/jsxs(View, {
|
|
@@ -8423,7 +8423,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
8423
8423
|
onClose: onClose,
|
|
8424
8424
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
8425
8425
|
visible: visible,
|
|
8426
|
-
onExited: function
|
|
8426
|
+
onExited: function () {
|
|
8427
8427
|
if (onExited) onExited();
|
|
8428
8428
|
setIsModalBehaviourVisible(false);
|
|
8429
8429
|
},
|
|
@@ -8653,11 +8653,11 @@ var useNativeAnimation$1 = function (_ref) {
|
|
|
8653
8653
|
};
|
|
8654
8654
|
});
|
|
8655
8655
|
return {
|
|
8656
|
-
onPressIn: function
|
|
8656
|
+
onPressIn: function () {
|
|
8657
8657
|
color.value = withTiming(1, withTimingConfig);
|
|
8658
8658
|
translate.value = withTiming(2, withTimingConfig);
|
|
8659
8659
|
},
|
|
8660
|
-
onPressOut: function
|
|
8660
|
+
onPressOut: function () {
|
|
8661
8661
|
color.value = withTiming(0, withTimingConfig);
|
|
8662
8662
|
translate.value = withTiming(0, withTimingConfig);
|
|
8663
8663
|
},
|
|
@@ -8751,13 +8751,13 @@ function Highlight(_ref) {
|
|
|
8751
8751
|
});
|
|
8752
8752
|
}
|
|
8753
8753
|
return /*#__PURE__*/jsx(Pressable, {
|
|
8754
|
-
onPress: function
|
|
8754
|
+
onPress: function () {
|
|
8755
8755
|
setIsExpanded(!isExpanded);
|
|
8756
8756
|
setIsInitialRender(false);
|
|
8757
8757
|
},
|
|
8758
8758
|
onPressIn: onPressIn,
|
|
8759
8759
|
onPressOut: onPressOut,
|
|
8760
|
-
children: function
|
|
8760
|
+
children: function (_ref2) {
|
|
8761
8761
|
var isHovered = _ref2.isHovered;
|
|
8762
8762
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
8763
8763
|
isHovered: isHovered,
|
|
@@ -9149,7 +9149,7 @@ function MapMarker(_ref2) {
|
|
|
9149
9149
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
9150
9150
|
testID: testID,
|
|
9151
9151
|
onPress: onPress,
|
|
9152
|
-
children: function
|
|
9152
|
+
children: function (_ref3) {
|
|
9153
9153
|
var isHovered = _ref3.isHovered;
|
|
9154
9154
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
9155
9155
|
isHovered: isHovered
|
|
@@ -11921,19 +11921,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11921
11921
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
11922
11922
|
appear: shouldAppear,
|
|
11923
11923
|
visible: visible,
|
|
11924
|
-
onEnter: function
|
|
11924
|
+
onEnter: function () {
|
|
11925
11925
|
if (onEnter) onEnter();
|
|
11926
11926
|
|
|
11927
11927
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11928
11928
|
setShouldAppear(false);
|
|
11929
11929
|
},
|
|
11930
|
-
onExit: function
|
|
11930
|
+
onExit: function () {
|
|
11931
11931
|
if (onExit) onExit();
|
|
11932
11932
|
|
|
11933
11933
|
// Reset appear value to its original value for future modal display
|
|
11934
11934
|
setShouldAppear(appear);
|
|
11935
11935
|
},
|
|
11936
|
-
onExited: function
|
|
11936
|
+
onExited: function () {
|
|
11937
11937
|
if (onExited) onExited();
|
|
11938
11938
|
setIsModalBehaviourVisible(false);
|
|
11939
11939
|
},
|
|
@@ -12294,7 +12294,7 @@ function Picker(_ref) {
|
|
|
12294
12294
|
isOpen: state.isOpen,
|
|
12295
12295
|
selectedItem: state.currentValue,
|
|
12296
12296
|
disabled: disabled,
|
|
12297
|
-
onPress: function
|
|
12297
|
+
onPress: function () {
|
|
12298
12298
|
if (syncStateWithSourceValue) {
|
|
12299
12299
|
dispatch({
|
|
12300
12300
|
type: 'open-modal-with-value',
|
|
@@ -12348,7 +12348,7 @@ function Picker(_ref) {
|
|
|
12348
12348
|
accessibilityState: {
|
|
12349
12349
|
selected: isSelected
|
|
12350
12350
|
},
|
|
12351
|
-
onPress: function
|
|
12351
|
+
onPress: function () {
|
|
12352
12352
|
handleInternalChange(item.props.value);
|
|
12353
12353
|
},
|
|
12354
12354
|
children: function (_ref2) {
|
|
@@ -12369,7 +12369,7 @@ function Picker(_ref) {
|
|
|
12369
12369
|
children: /*#__PURE__*/jsx(Button, {
|
|
12370
12370
|
stretch: true,
|
|
12371
12371
|
type: "primary",
|
|
12372
|
-
onPress: function
|
|
12372
|
+
onPress: function () {
|
|
12373
12373
|
if (onChange) onChange(state.internalValue);
|
|
12374
12374
|
dispatch({
|
|
12375
12375
|
type: 'change-value'
|
|
@@ -12506,7 +12506,7 @@ function Skeleton(_ref) {
|
|
|
12506
12506
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
12507
12507
|
overflow: "hidden",
|
|
12508
12508
|
style: style,
|
|
12509
|
-
onLayout: function
|
|
12509
|
+
onLayout: function (_ref2) {
|
|
12510
12510
|
var nativeEvent = _ref2.nativeEvent;
|
|
12511
12511
|
return setWidth(nativeEvent.layout.width);
|
|
12512
12512
|
},
|
|
@@ -12728,7 +12728,7 @@ function StaticMap(_ref) {
|
|
|
12728
12728
|
position: "relative",
|
|
12729
12729
|
maxWidth: mapBoxMaxPictureWidth,
|
|
12730
12730
|
height: height,
|
|
12731
|
-
onLayout: function
|
|
12731
|
+
onLayout: function (event) {
|
|
12732
12732
|
var nativeEvent = event.nativeEvent;
|
|
12733
12733
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
12734
12734
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -12740,11 +12740,11 @@ function StaticMap(_ref) {
|
|
|
12740
12740
|
width: currentWidth,
|
|
12741
12741
|
height: height,
|
|
12742
12742
|
alt: alt,
|
|
12743
|
-
onLoadEnd: function
|
|
12743
|
+
onLoadEnd: function () {
|
|
12744
12744
|
setIsLoading(false);
|
|
12745
12745
|
if (onLoaded) onLoaded();
|
|
12746
12746
|
},
|
|
12747
|
-
onError: function
|
|
12747
|
+
onError: function () {
|
|
12748
12748
|
setHasError(true);
|
|
12749
12749
|
if (onError) onError();
|
|
12750
12750
|
}
|
|
@@ -12769,7 +12769,7 @@ function StaticMap(_ref) {
|
|
|
12769
12769
|
width: "100%",
|
|
12770
12770
|
height: "100%",
|
|
12771
12771
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
12772
|
-
onReload: function
|
|
12772
|
+
onReload: function () {
|
|
12773
12773
|
setHasError(false);
|
|
12774
12774
|
setIsLoading(true);
|
|
12775
12775
|
setCurrentMapKey(function (prev) {
|
|
@@ -13010,7 +13010,7 @@ function StoryContainer(_ref) {
|
|
|
13010
13010
|
var StoryDecorator = makeDecorator({
|
|
13011
13011
|
name: 'StoryDecorator',
|
|
13012
13012
|
parameterName: 'storyDecorator',
|
|
13013
|
-
wrapper: function
|
|
13013
|
+
wrapper: function (storyFn, context) {
|
|
13014
13014
|
var story = storyFn(context);
|
|
13015
13015
|
if (context.parameters.disableStoryContainer) {
|
|
13016
13016
|
return story;
|
|
@@ -13118,7 +13118,7 @@ function TabBarItem(_ref) {
|
|
|
13118
13118
|
disabled: disabled,
|
|
13119
13119
|
testID: testID,
|
|
13120
13120
|
onPress: onPress,
|
|
13121
|
-
children: function
|
|
13121
|
+
children: function (_ref2) {
|
|
13122
13122
|
var isHovered = _ref2.isHovered,
|
|
13123
13123
|
isPressed = _ref2.isPressed,
|
|
13124
13124
|
isFocused = _ref2.isFocused;
|
|
@@ -13207,7 +13207,7 @@ function TabBar(_ref) {
|
|
|
13207
13207
|
color: color,
|
|
13208
13208
|
variant: definedVariant,
|
|
13209
13209
|
type: type,
|
|
13210
|
-
onPress: function
|
|
13210
|
+
onPress: function (event) {
|
|
13211
13211
|
var _child$props$onPress, _child$props;
|
|
13212
13212
|
onChangeTab({
|
|
13213
13213
|
tab: tab,
|
|
@@ -13356,7 +13356,7 @@ function ModalDateTimePicker(_ref) {
|
|
|
13356
13356
|
stretch: true,
|
|
13357
13357
|
testID: "timePicker.ModalDateTimePicker.submitButton",
|
|
13358
13358
|
type: "primary",
|
|
13359
|
-
onPress: function
|
|
13359
|
+
onPress: function () {
|
|
13360
13360
|
onChange(currentValue);
|
|
13361
13361
|
},
|
|
13362
13362
|
children: buttonContent
|
|
@@ -13403,7 +13403,7 @@ var TimePickerPressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13403
13403
|
width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
|
|
13404
13404
|
pointerEvents: "box-only",
|
|
13405
13405
|
onPress: onPress,
|
|
13406
|
-
children: function
|
|
13406
|
+
children: function (_ref2) {
|
|
13407
13407
|
var isHovered = _ref2.isHovered,
|
|
13408
13408
|
isFocused = _ref2.isFocused,
|
|
13409
13409
|
isPressed = _ref2.isPressed;
|
|
@@ -13480,7 +13480,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13480
13480
|
isHoveredInternal: isHoveredInternal,
|
|
13481
13481
|
isFocusedInternal: isFocusedInternal,
|
|
13482
13482
|
isPressedInternal: isPressedInternal,
|
|
13483
|
-
onPress: function
|
|
13483
|
+
onPress: function () {
|
|
13484
13484
|
setIsPickerVisible(true);
|
|
13485
13485
|
}
|
|
13486
13486
|
}), Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsx(DateTimePicker, {
|
|
@@ -13504,7 +13504,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13504
13504
|
value: pickerValue,
|
|
13505
13505
|
validateButtonLabel: validateButtonLabel,
|
|
13506
13506
|
onChange: handleChange,
|
|
13507
|
-
onClose: function
|
|
13507
|
+
onClose: function () {
|
|
13508
13508
|
setIsPickerVisible(false);
|
|
13509
13509
|
}
|
|
13510
13510
|
}) : null]
|
|
@@ -13867,7 +13867,7 @@ function Tooltip(_ref) {
|
|
|
13867
13867
|
ref: reference,
|
|
13868
13868
|
children: renderPressable({
|
|
13869
13869
|
ref: getPressableRect,
|
|
13870
|
-
onPress: function
|
|
13870
|
+
onPress: function () {
|
|
13871
13871
|
if (onToggle) onToggle(!!pressed.value);
|
|
13872
13872
|
pressed.value = !pressed.value;
|
|
13873
13873
|
},
|
|
@@ -13886,7 +13886,7 @@ function Tooltip(_ref) {
|
|
|
13886
13886
|
left: customShiftData.left,
|
|
13887
13887
|
right: customShiftData.right,
|
|
13888
13888
|
zIndex: zIndex,
|
|
13889
|
-
onLayout: function
|
|
13889
|
+
onLayout: function (_ref2) {
|
|
13890
13890
|
var nativeEvent = _ref2.nativeEvent;
|
|
13891
13891
|
return setFloatingWidth(nativeEvent.layout.width);
|
|
13892
13892
|
},
|
|
@@ -14131,7 +14131,7 @@ function KittThemeProvider(_ref) {
|
|
|
14131
14131
|
var KittThemeDecorator = makeDecorator({
|
|
14132
14132
|
name: 'ThemeDecorator',
|
|
14133
14133
|
parameterName: 'theme',
|
|
14134
|
-
wrapper: function
|
|
14134
|
+
wrapper: function (storyFn, context, _ref2) {
|
|
14135
14135
|
var _parameters$isSSR;
|
|
14136
14136
|
var _ref2$options = _ref2.options,
|
|
14137
14137
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|