@ornikar/kitt-universal 27.3.1-canary.2a1e1042a7d526c8c6b6197a77f84626e0e5d206.0 → 27.5.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 +11 -14
- package/dist/definitions/BaseMessage/helper.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
- package/dist/definitions/GoogleMapsAutocompleteProvider/GoogleMapsAutocompleteProvider.d.ts.map +1 -1
- package/dist/definitions/Highlight/AnimatedContainer/AnimatedContainer.d.ts +1 -1
- package/dist/definitions/Highlight/AnimatedContainer/AnimatedContainer.d.ts.map +1 -1
- package/dist/definitions/Highlight/AnimatedContainer/AnimatedContainer.web.d.ts.map +1 -1
- package/dist/definitions/Highlight/Highlight.d.ts.map +1 -1
- package/dist/definitions/MapMarker/MapMarker.d.ts +2 -5
- package/dist/definitions/MapMarker/MapMarker.d.ts.map +1 -1
- package/dist/definitions/MapMarker/constants.d.ts +6 -0
- package/dist/definitions/MapMarker/constants.d.ts.map +1 -0
- package/dist/definitions/MapMarker/utils/getBackgroundColor.d.ts +2 -1
- package/dist/definitions/MapMarker/utils/getBackgroundColor.d.ts.map +1 -1
- package/dist/definitions/Picker/Picker.web.d.ts.map +1 -1
- package/dist/definitions/TabBar/TabBar.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePicker.web.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/cardModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/cardModal.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/dialogModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/dialogModal.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +21 -4
- package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/highlight.d.ts +4 -0
- package/dist/definitions/themes/late-ocean/highlight.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/shadows.d.ts +4 -2
- package/dist/definitions/themes/late-ocean/shadows.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/skeleton.d.ts +2 -1
- package/dist/definitions/themes/late-ocean/skeleton.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 +124 -50
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +124 -50
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +123 -49
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +2 -2
- package/dist/index-node-22.17.cjs.web.js +87 -41
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +123 -49
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +2 -2
- package/dist/index-node-22.17.es.web.mjs +87 -41
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +210 -174
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +157 -113
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +50 -16
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +50 -16
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.js +50 -16
- package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-22.17.cjs.web.js +50 -16
- package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-22.17.es.mjs +50 -16
- package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
- package/dist/linaria-themes-node-22.17.es.web.mjs +50 -16
- package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +51 -17
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +51 -17
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +28 -28
package/dist/index.es.web.js
CHANGED
|
@@ -751,13 +751,23 @@ var card = {
|
|
|
751
751
|
};
|
|
752
752
|
|
|
753
753
|
var webAnimationContentDuration$2 = 400;
|
|
754
|
-
var webAnimationContentEasing$2 =
|
|
754
|
+
var webAnimationContentEasing$2 = {
|
|
755
|
+
x1: 0.77,
|
|
756
|
+
y1: 0,
|
|
757
|
+
x2: 0.175,
|
|
758
|
+
y2: 1
|
|
759
|
+
};
|
|
755
760
|
var webAnimationOverlayDuration$2 = 250;
|
|
756
|
-
var webAnimationOverlayEasing$2 =
|
|
761
|
+
var webAnimationOverlayEasing$2 = {
|
|
762
|
+
x1: 0.42,
|
|
763
|
+
y1: 0,
|
|
764
|
+
x2: 1,
|
|
765
|
+
y2: 1
|
|
766
|
+
};
|
|
757
767
|
var maxWidth = 540;
|
|
758
768
|
var overlayHorizontalPadding = 24;
|
|
759
769
|
var cardModal = {
|
|
760
|
-
borderRadius:
|
|
770
|
+
borderRadius: spacing * 2,
|
|
761
771
|
maxWidth: maxWidth,
|
|
762
772
|
maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
|
|
763
773
|
minHeight: 280,
|
|
@@ -845,11 +855,21 @@ var choices = {
|
|
|
845
855
|
};
|
|
846
856
|
|
|
847
857
|
var webAnimationContentDuration$1 = 400;
|
|
848
|
-
var webAnimationContentEasing$1 =
|
|
858
|
+
var webAnimationContentEasing$1 = {
|
|
859
|
+
x1: 0.77,
|
|
860
|
+
y1: 0,
|
|
861
|
+
x2: 0.175,
|
|
862
|
+
y2: 1
|
|
863
|
+
};
|
|
849
864
|
var webAnimationOverlayDuration$1 = 250;
|
|
850
|
-
var webAnimationOverlayEasing$1 =
|
|
865
|
+
var webAnimationOverlayEasing$1 = {
|
|
866
|
+
x1: 0.42,
|
|
867
|
+
y1: 0,
|
|
868
|
+
x2: 1,
|
|
869
|
+
y2: 1
|
|
870
|
+
};
|
|
851
871
|
var dialogModal = {
|
|
852
|
-
borderRadius:
|
|
872
|
+
borderRadius: spacing * 2,
|
|
853
873
|
maxWidth: 540,
|
|
854
874
|
overlayPadding: {
|
|
855
875
|
horizontal: 24,
|
|
@@ -1779,9 +1799,19 @@ var forms = {
|
|
|
1779
1799
|
};
|
|
1780
1800
|
|
|
1781
1801
|
var webAnimationContentDuration = 600;
|
|
1782
|
-
var webAnimationContentEasing =
|
|
1802
|
+
var webAnimationContentEasing = {
|
|
1803
|
+
x1: 0.77,
|
|
1804
|
+
y1: 0,
|
|
1805
|
+
x2: 0.175,
|
|
1806
|
+
y2: 1
|
|
1807
|
+
};
|
|
1783
1808
|
var webAnimationOverlayDuration = 250;
|
|
1784
|
-
var webAnimationOverlayEasing =
|
|
1809
|
+
var webAnimationOverlayEasing = {
|
|
1810
|
+
x1: 0.42,
|
|
1811
|
+
y1: 0,
|
|
1812
|
+
x2: 1,
|
|
1813
|
+
y2: 1
|
|
1814
|
+
};
|
|
1785
1815
|
var fullscreenModal = {
|
|
1786
1816
|
header: {
|
|
1787
1817
|
height: 56
|
|
@@ -1818,10 +1848,10 @@ var highlight = {
|
|
|
1818
1848
|
},
|
|
1819
1849
|
primary: {
|
|
1820
1850
|
"default": {
|
|
1821
|
-
backgroundColor: deepPurpleColorPalette['
|
|
1851
|
+
backgroundColor: deepPurpleColorPalette['blue.1']
|
|
1822
1852
|
},
|
|
1823
1853
|
hover: {
|
|
1824
|
-
backgroundColor: deepPurpleColorPalette['
|
|
1854
|
+
backgroundColor: deepPurpleColorPalette['blue.2']
|
|
1825
1855
|
}
|
|
1826
1856
|
},
|
|
1827
1857
|
secondary: {
|
|
@@ -1842,10 +1872,14 @@ var highlight = {
|
|
|
1842
1872
|
},
|
|
1843
1873
|
dark: {
|
|
1844
1874
|
"default": {
|
|
1845
|
-
backgroundColor: deepPurpleColorPalette['
|
|
1875
|
+
backgroundColor: deepPurpleColorPalette['grey.0'],
|
|
1876
|
+
borderWidth: 1,
|
|
1877
|
+
borderColor: deepPurpleColorPalette['beige.3']
|
|
1846
1878
|
},
|
|
1847
1879
|
hover: {
|
|
1848
|
-
backgroundColor: deepPurpleColorPalette['beige.1']
|
|
1880
|
+
backgroundColor: deepPurpleColorPalette['beige.1'],
|
|
1881
|
+
borderWidth: 1,
|
|
1882
|
+
borderColor: deepPurpleColorPalette['beige.3']
|
|
1849
1883
|
}
|
|
1850
1884
|
},
|
|
1851
1885
|
success: {
|
|
@@ -1925,8 +1959,8 @@ var listItem = {
|
|
|
1925
1959
|
|
|
1926
1960
|
var mapMarker = {
|
|
1927
1961
|
home: {
|
|
1928
|
-
"default":
|
|
1929
|
-
selected:
|
|
1962
|
+
"default": deepPurpleColorPalette['grey.9'],
|
|
1963
|
+
selected: deepPurpleColorPalette['grey.7'],
|
|
1930
1964
|
svg: {
|
|
1931
1965
|
height: 36
|
|
1932
1966
|
},
|
|
@@ -1936,8 +1970,8 @@ var mapMarker = {
|
|
|
1936
1970
|
}
|
|
1937
1971
|
},
|
|
1938
1972
|
meetingPoint: {
|
|
1939
|
-
"default":
|
|
1940
|
-
selected:
|
|
1973
|
+
"default": deepPurpleColorPalette['deepPurple.8'],
|
|
1974
|
+
selected: deepPurpleColorPalette['deepPurple.6'],
|
|
1941
1975
|
svg: {
|
|
1942
1976
|
width: 40,
|
|
1943
1977
|
height: 43
|
|
@@ -2448,7 +2482,7 @@ var breakpoints = {
|
|
|
2448
2482
|
// TODO : seperate brand color usage definition from proper theme definition and add typings - https://ornikar.atlassian.net/browse/CME-156
|
|
2449
2483
|
var theme = {
|
|
2450
2484
|
spacing: spacing,
|
|
2451
|
-
getSpacing: function (multiplier) {
|
|
2485
|
+
getSpacing: function getSpacing(multiplier) {
|
|
2452
2486
|
return spacing * multiplier;
|
|
2453
2487
|
},
|
|
2454
2488
|
colors: colors,
|
|
@@ -2635,7 +2669,7 @@ var ActionCardPressable = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
2635
2669
|
onPress: onPress,
|
|
2636
2670
|
onHoverIn: onHoverIn,
|
|
2637
2671
|
onHoverOut: onHoverOut,
|
|
2638
|
-
children: function (_ref3) {
|
|
2672
|
+
children: function children(_ref3) {
|
|
2639
2673
|
var isHovered = _ref3.isHovered,
|
|
2640
2674
|
isPressed = _ref3.isPressed,
|
|
2641
2675
|
isFocused = _ref3.isFocused;
|
|
@@ -3476,7 +3510,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3476
3510
|
onHoverOut: onHoverOut,
|
|
3477
3511
|
onFocus: onFocus,
|
|
3478
3512
|
onBlur: onBlur,
|
|
3479
|
-
children: function (_ref2) {
|
|
3513
|
+
children: function children(_ref2) {
|
|
3480
3514
|
var isHovered = _ref2.isHovered,
|
|
3481
3515
|
isPressed = _ref2.isPressed,
|
|
3482
3516
|
isFocused = _ref2.isFocused;
|
|
@@ -3573,7 +3607,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3573
3607
|
stretch: stretch,
|
|
3574
3608
|
disabled: isLoading ? true : disabled,
|
|
3575
3609
|
icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
|
|
3576
|
-
onPress: function (e) {
|
|
3610
|
+
onPress: function handlePress(e) {
|
|
3577
3611
|
var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
|
|
3578
3612
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3579
3613
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
@@ -3902,7 +3936,7 @@ function CloseButton(_ref) {
|
|
|
3902
3936
|
onPress = _ref.onPress;
|
|
3903
3937
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
3904
3938
|
return /*#__PURE__*/cloneElement(children, {
|
|
3905
|
-
onPress: function () {
|
|
3939
|
+
onPress: function handleClose() {
|
|
3906
3940
|
if (onPress) onPress();
|
|
3907
3941
|
onCloseContextCallback();
|
|
3908
3942
|
}
|
|
@@ -4052,7 +4086,7 @@ function CardModalBehaviour(_ref) {
|
|
|
4052
4086
|
onClose: onClose,
|
|
4053
4087
|
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4054
4088
|
visible: visible,
|
|
4055
|
-
onExited: function () {
|
|
4089
|
+
onExited: function handleExitAnimationDone() {
|
|
4056
4090
|
if (onExited) onExited();
|
|
4057
4091
|
setIsModalBehaviourVisible(false);
|
|
4058
4092
|
},
|
|
@@ -4260,8 +4294,8 @@ function AnimatedChoiceItemView(_ref) {
|
|
|
4260
4294
|
|
|
4261
4295
|
var useNativeAnimation$3 = function () {
|
|
4262
4296
|
return {
|
|
4263
|
-
onPressIn: function () {},
|
|
4264
|
-
onPressOut: function () {},
|
|
4297
|
+
onPressIn: function onPressIn() {},
|
|
4298
|
+
onPressOut: function onPressOut() {},
|
|
4265
4299
|
backgroundStyles: undefined
|
|
4266
4300
|
};
|
|
4267
4301
|
};
|
|
@@ -4318,7 +4352,7 @@ function ChoiceItem(_ref) {
|
|
|
4318
4352
|
style: style,
|
|
4319
4353
|
onBlur: onBlur,
|
|
4320
4354
|
onFocus: onFocus,
|
|
4321
|
-
onPress: function (e) {
|
|
4355
|
+
onPress: function handlePress(e) {
|
|
4322
4356
|
if (onFocus) onFocus(e);
|
|
4323
4357
|
if (onPress) onPress();
|
|
4324
4358
|
handleChange();
|
|
@@ -4326,7 +4360,7 @@ function ChoiceItem(_ref) {
|
|
|
4326
4360
|
},
|
|
4327
4361
|
onPressIn: onPressIn,
|
|
4328
4362
|
onPressOut: onPressOut,
|
|
4329
|
-
children: function (_ref2) {
|
|
4363
|
+
children: function children(_ref2) {
|
|
4330
4364
|
var isHovered = _ref2.isHovered,
|
|
4331
4365
|
isPressed = _ref2.isPressed;
|
|
4332
4366
|
var textColor = getCurrentTextColor$1({
|
|
@@ -4430,7 +4464,7 @@ function Choices(_ref2) {
|
|
|
4430
4464
|
type: type,
|
|
4431
4465
|
disabled: disabled,
|
|
4432
4466
|
onPress: !isForm ? onPress : undefined,
|
|
4433
|
-
onChange: isForm ? function (newValue) {
|
|
4467
|
+
onChange: isForm ? function handleChange(newValue) {
|
|
4434
4468
|
setCurrentValue(newValue);
|
|
4435
4469
|
if (onChange) onChange(newValue);
|
|
4436
4470
|
} : undefined,
|
|
@@ -4567,7 +4601,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4567
4601
|
},
|
|
4568
4602
|
children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4569
4603
|
visible: visible,
|
|
4570
|
-
onExited: function () {
|
|
4604
|
+
onExited: function handleExitAnimationDone() {
|
|
4571
4605
|
if (onExited) onExited();
|
|
4572
4606
|
setIsModalBehaviourVisible(false);
|
|
4573
4607
|
},
|
|
@@ -5014,7 +5048,7 @@ function isReactElement(element) {
|
|
|
5014
5048
|
return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
|
|
5015
5049
|
}
|
|
5016
5050
|
function Autocomplete(_ref) {
|
|
5017
|
-
var
|
|
5051
|
+
var _children = _ref.children,
|
|
5018
5052
|
name = _ref.name,
|
|
5019
5053
|
disabled = _ref.disabled,
|
|
5020
5054
|
placeholder = _ref.placeholder,
|
|
@@ -5041,7 +5075,7 @@ function Autocomplete(_ref) {
|
|
|
5041
5075
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5042
5076
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5043
5077
|
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5044
|
-
var childrenArray = Children.toArray(
|
|
5078
|
+
var childrenArray = Children.toArray(_children);
|
|
5045
5079
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5046
5080
|
return {
|
|
5047
5081
|
child: child,
|
|
@@ -5052,12 +5086,12 @@ function Autocomplete(_ref) {
|
|
|
5052
5086
|
defaultIsOpen: isInitialOpen,
|
|
5053
5087
|
initialSelectedItem: initialValue,
|
|
5054
5088
|
initialInputValue: initialValue ? itemToString(initialValue) : undefined,
|
|
5055
|
-
itemToString: function (item) {
|
|
5089
|
+
itemToString: function handleItemToString(item) {
|
|
5056
5090
|
// Prevents returning null values
|
|
5057
5091
|
if (!itemToString) return '';
|
|
5058
5092
|
return itemToString(item || undefined);
|
|
5059
5093
|
},
|
|
5060
|
-
stateReducer: function (state, changes) {
|
|
5094
|
+
stateReducer: function stateReducer(state, changes) {
|
|
5061
5095
|
switch (changes.type) {
|
|
5062
5096
|
case Downshift.stateChangeTypes.changeInput:
|
|
5063
5097
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
@@ -5067,7 +5101,7 @@ function Autocomplete(_ref) {
|
|
|
5067
5101
|
return changes;
|
|
5068
5102
|
}
|
|
5069
5103
|
},
|
|
5070
|
-
onChange: function (selectedItem, stateAndHelpers) {
|
|
5104
|
+
onChange: function onChange(selectedItem, stateAndHelpers) {
|
|
5071
5105
|
if (_onChange) {
|
|
5072
5106
|
_onChange(selectedItem, stateAndHelpers);
|
|
5073
5107
|
}
|
|
@@ -5075,7 +5109,7 @@ function Autocomplete(_ref) {
|
|
|
5075
5109
|
onSelect: onSelectItem,
|
|
5076
5110
|
onOuterClick: onOuterPress,
|
|
5077
5111
|
onInputValueChange: onInputChange,
|
|
5078
|
-
children: function (_ref2) {
|
|
5112
|
+
children: function children(_ref2) {
|
|
5079
5113
|
var getRootProps = _ref2.getRootProps,
|
|
5080
5114
|
getInputProps = _ref2.getInputProps,
|
|
5081
5115
|
getMenuProps = _ref2.getMenuProps,
|
|
@@ -5127,20 +5161,20 @@ function Autocomplete(_ref) {
|
|
|
5127
5161
|
right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
|
|
5128
5162
|
testID: "kitt.Autocomplete.listToggle",
|
|
5129
5163
|
hitSlop: 40,
|
|
5130
|
-
onPress: function (e) {
|
|
5164
|
+
onPress: function handleTogglePress(e) {
|
|
5131
5165
|
onClickToggle(e);
|
|
5132
5166
|
},
|
|
5133
5167
|
children: /*#__PURE__*/jsx(InputIcon, {
|
|
5134
5168
|
icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
|
|
5135
5169
|
})
|
|
5136
5170
|
})) : null),
|
|
5137
|
-
onFocus: function (e) {
|
|
5171
|
+
onFocus: function onFocus(e) {
|
|
5138
5172
|
openMenu();
|
|
5139
5173
|
/** @ts-expect-error onFocus wants web events */
|
|
5140
5174
|
if (onSearchInputFocus) onSearchInputFocus(e);
|
|
5141
5175
|
if (_onFocus) _onFocus(e);
|
|
5142
5176
|
},
|
|
5143
|
-
onBlur: function (e) {
|
|
5177
|
+
onBlur: function onBlur(e) {
|
|
5144
5178
|
/** @ts-expect-error onBlur wants web events */
|
|
5145
5179
|
if (onSearchInputBlur) onSearchInputBlur(e);
|
|
5146
5180
|
|
|
@@ -5176,10 +5210,10 @@ function Autocomplete(_ref) {
|
|
|
5176
5210
|
selected: ariaSelected
|
|
5177
5211
|
},
|
|
5178
5212
|
disabled: disabled,
|
|
5179
|
-
onPress: function (e) {
|
|
5213
|
+
onPress: function onPress(e) {
|
|
5180
5214
|
if (onClick) onClick(e);
|
|
5181
5215
|
},
|
|
5182
|
-
children: function (_ref5) {
|
|
5216
|
+
children: function children(_ref5) {
|
|
5183
5217
|
var isHovered = _ref5.isHovered,
|
|
5184
5218
|
isFocused = _ref5.isFocused,
|
|
5185
5219
|
isPressed = _ref5.isPressed;
|
|
@@ -5269,12 +5303,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5269
5303
|
disabled: disabled
|
|
5270
5304
|
},
|
|
5271
5305
|
disabled: disabled,
|
|
5272
|
-
onPress: function (e) {
|
|
5306
|
+
onPress: function handlePress(e) {
|
|
5273
5307
|
if (onFocus) onFocus();
|
|
5274
5308
|
if (onChange) onChange(!checked, e);
|
|
5275
5309
|
if (onBlur) onBlur();
|
|
5276
5310
|
},
|
|
5277
|
-
children: function (_ref2) {
|
|
5311
|
+
children: function children(_ref2) {
|
|
5278
5312
|
var isHovered = _ref2.isHovered,
|
|
5279
5313
|
isPressed = _ref2.isPressed,
|
|
5280
5314
|
isFocused = _ref2.isFocused;
|
|
@@ -5752,7 +5786,7 @@ function DocumentPicker(_ref) {
|
|
|
5752
5786
|
var childElement = Children.only(children);
|
|
5753
5787
|
var handlePickDocument = /*#__PURE__*/function () {
|
|
5754
5788
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5755
|
-
var _childElement$props$o, _childElement$props
|
|
5789
|
+
var _childElement$props$o, _childElement$props, _result$assets$;
|
|
5756
5790
|
var result;
|
|
5757
5791
|
return _regeneratorRuntime().wrap(function (_context) {
|
|
5758
5792
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -5770,7 +5804,7 @@ function DocumentPicker(_ref) {
|
|
|
5770
5804
|
}));
|
|
5771
5805
|
case 5:
|
|
5772
5806
|
result = _context.sent;
|
|
5773
|
-
if (!result.canceled && result.assets[0]
|
|
5807
|
+
if (!result.canceled && (_result$assets$ = result.assets[0]) !== null && _result$assets$ !== void 0 && _result$assets$.file) {
|
|
5774
5808
|
onDocumentUpload(result.assets[0].file);
|
|
5775
5809
|
}
|
|
5776
5810
|
case 7:
|
|
@@ -5823,7 +5857,7 @@ function ImagePicker(_ref) {
|
|
|
5823
5857
|
}));
|
|
5824
5858
|
case 5:
|
|
5825
5859
|
result = _context.sent;
|
|
5826
|
-
if (!result.canceled) {
|
|
5860
|
+
if (!result.canceled && result.assets[0]) {
|
|
5827
5861
|
onImageSelected(result.assets[0]);
|
|
5828
5862
|
}
|
|
5829
5863
|
case 7:
|
|
@@ -6083,10 +6117,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
|
|
|
6083
6117
|
isLoadingResultDetails: false,
|
|
6084
6118
|
shouldDisplayEmptyStateWhenNoResults: false
|
|
6085
6119
|
},
|
|
6086
|
-
onInputChange: function () {
|
|
6120
|
+
onInputChange: function onInputChange() {
|
|
6087
6121
|
return Promise.resolve();
|
|
6088
6122
|
},
|
|
6089
|
-
onSelectItem: function () {}
|
|
6123
|
+
onSelectItem: function onSelectItem() {}
|
|
6090
6124
|
});
|
|
6091
6125
|
function GoogleMapsAutocompleteProvider(_ref) {
|
|
6092
6126
|
var children = _ref.children,
|
|
@@ -6132,36 +6166,34 @@ function GoogleMapsAutocompleteProvider(_ref) {
|
|
|
6132
6166
|
_yield$predictionsPro = _context.sent;
|
|
6133
6167
|
results = _yield$predictionsPro.results;
|
|
6134
6168
|
status = _yield$predictionsPro.status;
|
|
6135
|
-
if (
|
|
6136
|
-
|
|
6137
|
-
|
|
6169
|
+
if (status !== 'OK') {
|
|
6170
|
+
dispatch({
|
|
6171
|
+
type: 'search-error'
|
|
6172
|
+
});
|
|
6138
6173
|
}
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
}
|
|
6151
|
-
});
|
|
6152
|
-
_context.next = 20;
|
|
6174
|
+
if (results) {
|
|
6175
|
+
// We cache the results to avoid calling the API again if the user types the same value
|
|
6176
|
+
searchResultsCache.current[value] = results;
|
|
6177
|
+
dispatch({
|
|
6178
|
+
type: 'search-success',
|
|
6179
|
+
payload: {
|
|
6180
|
+
results: results
|
|
6181
|
+
}
|
|
6182
|
+
});
|
|
6183
|
+
}
|
|
6184
|
+
_context.next = 17;
|
|
6153
6185
|
break;
|
|
6154
|
-
case
|
|
6155
|
-
_context.prev =
|
|
6186
|
+
case 14:
|
|
6187
|
+
_context.prev = 14;
|
|
6156
6188
|
_context.t0 = _context["catch"](4);
|
|
6157
6189
|
dispatch({
|
|
6158
6190
|
type: 'search-error'
|
|
6159
6191
|
});
|
|
6160
|
-
case
|
|
6192
|
+
case 17:
|
|
6161
6193
|
case "end":
|
|
6162
6194
|
return _context.stop();
|
|
6163
6195
|
}
|
|
6164
|
-
}, _callee, null, [[4,
|
|
6196
|
+
}, _callee, null, [[4, 14]]);
|
|
6165
6197
|
}));
|
|
6166
6198
|
return function () {
|
|
6167
6199
|
return _ref2.apply(this, arguments);
|
|
@@ -6339,7 +6371,7 @@ function InputAddress(_ref) {
|
|
|
6339
6371
|
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
6340
6372
|
itemToString: itemToString,
|
|
6341
6373
|
initialValue: formattedInitialValue,
|
|
6342
|
-
checkSelectedItem: function (selectedItem, item) {
|
|
6374
|
+
checkSelectedItem: function checkSelectedItem(selectedItem, item) {
|
|
6343
6375
|
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
|
|
6344
6376
|
},
|
|
6345
6377
|
right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
|
|
@@ -6348,10 +6380,10 @@ function InputAddress(_ref) {
|
|
|
6348
6380
|
}) : undefined,
|
|
6349
6381
|
errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
|
|
6350
6382
|
emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
|
|
6351
|
-
onInputChange: function (v) {
|
|
6383
|
+
onInputChange: function onInputChange(v) {
|
|
6352
6384
|
_onInputChange(v);
|
|
6353
6385
|
},
|
|
6354
|
-
onChange: function (v) {
|
|
6386
|
+
onChange: function onChange(v) {
|
|
6355
6387
|
onSelectItem(v, _onChange);
|
|
6356
6388
|
},
|
|
6357
6389
|
children: state.items.map(function (item) {
|
|
@@ -6433,7 +6465,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6433
6465
|
ref: ref
|
|
6434
6466
|
}, props), {}, {
|
|
6435
6467
|
inputMode: "numeric",
|
|
6436
|
-
onChange: function (event) {
|
|
6468
|
+
onChange: function handleChange(event) {
|
|
6437
6469
|
if (!onChange) return;
|
|
6438
6470
|
var value = parseFloat(event.nativeEvent.text);
|
|
6439
6471
|
|
|
@@ -6465,7 +6497,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6465
6497
|
testID: "kitt.InputPassword.passwordToggle",
|
|
6466
6498
|
hitSlop: 20,
|
|
6467
6499
|
accessibilityRole: "button",
|
|
6468
|
-
onPress: function () {
|
|
6500
|
+
onPress: function onPress() {
|
|
6469
6501
|
return setIsVisible(function (prev) {
|
|
6470
6502
|
return !prev;
|
|
6471
6503
|
});
|
|
@@ -6500,7 +6532,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6500
6532
|
enterKeyHint: currentEnterKeyHint,
|
|
6501
6533
|
autoComplete: autoComplete,
|
|
6502
6534
|
textContentType: "telephoneNumber",
|
|
6503
|
-
onChange: function (event) {
|
|
6535
|
+
onChange: function handleChange(event) {
|
|
6504
6536
|
var number = parseNumber(event.nativeEvent.text);
|
|
6505
6537
|
|
|
6506
6538
|
// When intl phone number is valid :
|
|
@@ -6692,14 +6724,14 @@ function Radio(_ref, ref) {
|
|
|
6692
6724
|
focusable: checked && !disabled,
|
|
6693
6725
|
flexDirection: "row",
|
|
6694
6726
|
alignItems: "center",
|
|
6695
|
-
onPress: function (event) {
|
|
6727
|
+
onPress: function handlePress(event) {
|
|
6696
6728
|
if (onFocus) onFocus();
|
|
6697
6729
|
if (onChange) onChange(value, event);
|
|
6698
6730
|
if (onBlur) onBlur();
|
|
6699
6731
|
},
|
|
6700
6732
|
onFocus: onFocus,
|
|
6701
6733
|
onBlur: onBlur,
|
|
6702
|
-
children: function (_ref2) {
|
|
6734
|
+
children: function children(_ref2) {
|
|
6703
6735
|
var isHovered = _ref2.isHovered,
|
|
6704
6736
|
isPressed = _ref2.isPressed,
|
|
6705
6737
|
isFocused = _ref2.isFocused;
|
|
@@ -6875,7 +6907,7 @@ function RadioButton(_ref) {
|
|
|
6875
6907
|
flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
|
|
6876
6908
|
flexBasis: createResponsiveStyleFromProp(stretch, 0),
|
|
6877
6909
|
disabled: disabled,
|
|
6878
|
-
onPress: function (e) {
|
|
6910
|
+
onPress: function handlePress(e) {
|
|
6879
6911
|
if (onFocus) onFocus(e);
|
|
6880
6912
|
if (onChange) onChange(value);
|
|
6881
6913
|
if (onBlur) onBlur(e);
|
|
@@ -6884,7 +6916,7 @@ function RadioButton(_ref) {
|
|
|
6884
6916
|
onPressOut: onPressOut,
|
|
6885
6917
|
onFocus: onFocus,
|
|
6886
6918
|
onBlur: onBlur,
|
|
6887
|
-
children: function (_ref2) {
|
|
6919
|
+
children: function children(_ref2) {
|
|
6888
6920
|
var isHovered = _ref2.isHovered,
|
|
6889
6921
|
isPressed = _ref2.isPressed,
|
|
6890
6922
|
isFocused = _ref2.isFocused;
|
|
@@ -7003,7 +7035,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7003
7035
|
textAlignVertical: "top",
|
|
7004
7036
|
minHeight: "kitt.forms.textArea.minHeight"
|
|
7005
7037
|
}, props), {}, {
|
|
7006
|
-
onChange: function (e) {
|
|
7038
|
+
onChange: function handleOnChange(e) {
|
|
7007
7039
|
if (!limit || e.nativeEvent.text.length <= limit) {
|
|
7008
7040
|
var _props$onChange;
|
|
7009
7041
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
|
|
@@ -7166,10 +7198,10 @@ function Toggle(_ref) {
|
|
|
7166
7198
|
children: [/*#__PURE__*/jsx(Pressable, {
|
|
7167
7199
|
accessibilityRole: "togglebutton",
|
|
7168
7200
|
disabled: isDisabled,
|
|
7169
|
-
onPress: function () {
|
|
7201
|
+
onPress: function handlePress() {
|
|
7170
7202
|
onChange(!value);
|
|
7171
7203
|
},
|
|
7172
|
-
children: function (_ref2) {
|
|
7204
|
+
children: function children(_ref2) {
|
|
7173
7205
|
var isHovered = _ref2.isHovered,
|
|
7174
7206
|
isPressed = _ref2.isPressed,
|
|
7175
7207
|
isFocused = _ref2.isFocused;
|
|
@@ -7334,7 +7366,7 @@ function FullscreenModalBehaviour(_ref) {
|
|
|
7334
7366
|
onClose: onClose,
|
|
7335
7367
|
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
7336
7368
|
visible: visible,
|
|
7337
|
-
onExited: function () {
|
|
7369
|
+
onExited: function handleExitAnimationDone() {
|
|
7338
7370
|
if (onExited) onExited();
|
|
7339
7371
|
setIsModalBehaviourVisible(false);
|
|
7340
7372
|
},
|
|
@@ -7518,6 +7550,8 @@ function AnimatedContainer(_ref) {
|
|
|
7518
7550
|
},
|
|
7519
7551
|
borderRadius: "kitt.highlight.borderRadius",
|
|
7520
7552
|
padding: theme.kitt.highlight.padding[size],
|
|
7553
|
+
borderWidth: theme.kitt.highlight[variant]["default"].borderWidth,
|
|
7554
|
+
borderColor: theme.kitt.highlight[variant]["default"].borderColor,
|
|
7521
7555
|
backgroundColor: isHovered ? theme.kitt.highlight[variant].hover.backgroundColor : theme.kitt.highlight[variant]["default"].backgroundColor,
|
|
7522
7556
|
children: children
|
|
7523
7557
|
});
|
|
@@ -7608,6 +7642,8 @@ function Highlight(_ref) {
|
|
|
7608
7642
|
borderRadius: "kitt.highlight.borderRadius",
|
|
7609
7643
|
padding: theme.kitt.highlight.padding[size],
|
|
7610
7644
|
backgroundColor: "kitt.highlight.".concat(variant, ".default.backgroundColor"),
|
|
7645
|
+
borderWidth: theme.kitt.highlight[variant]["default"].borderWidth,
|
|
7646
|
+
borderColor: theme.kitt.highlight[variant]["default"].borderColor,
|
|
7611
7647
|
children: /*#__PURE__*/jsxs(HStack, {
|
|
7612
7648
|
space: highlightStyle[size].spaceBetween,
|
|
7613
7649
|
children: [icon && /*#__PURE__*/jsx(View, {
|
|
@@ -7629,13 +7665,13 @@ function Highlight(_ref) {
|
|
|
7629
7665
|
});
|
|
7630
7666
|
}
|
|
7631
7667
|
return /*#__PURE__*/jsx(Pressable, {
|
|
7632
|
-
onPress: function () {
|
|
7668
|
+
onPress: function handlePress() {
|
|
7633
7669
|
setIsExpanded(!isExpanded);
|
|
7634
7670
|
setIsInitialRender(false);
|
|
7635
7671
|
},
|
|
7636
7672
|
onPressIn: onPressIn,
|
|
7637
7673
|
onPressOut: onPressOut,
|
|
7638
|
-
children: function (_ref2) {
|
|
7674
|
+
children: function children(_ref2) {
|
|
7639
7675
|
var isHovered = _ref2.isHovered;
|
|
7640
7676
|
return /*#__PURE__*/jsxs(AnimatedContainer, {
|
|
7641
7677
|
isHovered: isHovered,
|
|
@@ -7948,12 +7984,11 @@ var SvgPinMarkerinline = function SvgPinMarkerinline(props) {
|
|
|
7948
7984
|
width: 34,
|
|
7949
7985
|
height: 36,
|
|
7950
7986
|
viewBox: "0 0 34 36",
|
|
7951
|
-
fill: "
|
|
7987
|
+
fill: "currentColor",
|
|
7952
7988
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7953
7989
|
}, props), {}, {
|
|
7954
7990
|
children: [/*#__PURE__*/jsx("path", {
|
|
7955
7991
|
d: "M17 .5C26.113.5 33.5 7.887 33.5 17c0 8.272-6.087 15.121-14.025 16.315-.05.008-.157.054-.337.211-.173.151-.351.345-.56.57a5.972 5.972 0 0 1-.662.637c-.232.181-.545.367-.916.367-.37 0-.684-.186-.916-.367a5.972 5.972 0 0 1-.662-.637c-.209-.224-.387-.419-.56-.57-.18-.157-.287-.203-.337-.21C6.586 32.12.5 25.271.5 17 .5 7.887 7.887.5 17 .5Z",
|
|
7956
|
-
fill: "#7B66FF",
|
|
7957
7992
|
stroke: "#fff"
|
|
7958
7993
|
}), /*#__PURE__*/jsx("path", {
|
|
7959
7994
|
d: "M17 10a5.506 5.506 0 0 0-5.5 5.5c0 4.706 5 8.26 5.213 8.41a.5.5 0 0 0 .574 0c.213-.15 5.213-3.704 5.213-8.41A5.506 5.506 0 0 0 17 10Zm0 3.5a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z",
|
|
@@ -7981,6 +8016,13 @@ var SvgShadowinline = function SvgShadowinline(props) {
|
|
|
7981
8016
|
}));
|
|
7982
8017
|
};
|
|
7983
8018
|
|
|
8019
|
+
var MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
8020
|
+
MapMarkerVariantEnum["HOME"] = "home";
|
|
8021
|
+
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
8022
|
+
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
8023
|
+
return MapMarkerVariantEnum;
|
|
8024
|
+
}({});
|
|
8025
|
+
|
|
7984
8026
|
var SCALE_DURATION = 300;
|
|
7985
8027
|
var TRANSLATE_Y_DURATION = 150;
|
|
7986
8028
|
var useNativeAnimation = function (_ref) {
|
|
@@ -8035,19 +8077,13 @@ var getBackgroundColor$1 = function (_ref) {
|
|
|
8035
8077
|
var isHovered = _ref.isHovered,
|
|
8036
8078
|
isSelected = _ref.isSelected,
|
|
8037
8079
|
variant = _ref.variant;
|
|
8038
|
-
if (variant ===
|
|
8080
|
+
if (variant === MapMarkerVariantEnum.HOME || variant === MapMarkerVariantEnum.CLOSE_MEETING_POINT) {
|
|
8039
8081
|
return isSelected || isHovered ? theme.mapMarker.home.selected : theme.mapMarker.home["default"];
|
|
8040
8082
|
}
|
|
8041
8083
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint["default"];
|
|
8042
8084
|
};
|
|
8043
8085
|
|
|
8044
8086
|
var _excluded$d = ["onPress", "testID"];
|
|
8045
|
-
var MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
8046
|
-
MapMarkerVariantEnum["HOME"] = "home";
|
|
8047
|
-
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
8048
|
-
MapMarkerVariantEnum["CLOSE_MEETING_POINT"] = "closeMeetingPoint";
|
|
8049
|
-
return MapMarkerVariantEnum;
|
|
8050
|
-
}({});
|
|
8051
8087
|
function StaticMapMarker$1(_ref) {
|
|
8052
8088
|
var variant = _ref.variant,
|
|
8053
8089
|
isHovered = _ref.isHovered,
|
|
@@ -8110,7 +8146,7 @@ function MapMarker(_ref2) {
|
|
|
8110
8146
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8111
8147
|
testID: testID,
|
|
8112
8148
|
onPress: onPress,
|
|
8113
|
-
children: function (_ref3) {
|
|
8149
|
+
children: function children(_ref3) {
|
|
8114
8150
|
var isHovered = _ref3.isHovered;
|
|
8115
8151
|
return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
8116
8152
|
isHovered: isHovered
|
|
@@ -8146,6 +8182,8 @@ var getColorByType = function (type) {
|
|
|
8146
8182
|
switch (type) {
|
|
8147
8183
|
case 'success':
|
|
8148
8184
|
case 'danger':
|
|
8185
|
+
case 'info':
|
|
8186
|
+
return 'white';
|
|
8149
8187
|
case 'warning':
|
|
8150
8188
|
default:
|
|
8151
8189
|
return 'black';
|
|
@@ -8155,6 +8193,8 @@ var getIconButtonColor = function (messageType) {
|
|
|
8155
8193
|
switch (messageType) {
|
|
8156
8194
|
case 'success':
|
|
8157
8195
|
case 'danger':
|
|
8196
|
+
case 'info':
|
|
8197
|
+
return 'ghost';
|
|
8158
8198
|
case 'warning':
|
|
8159
8199
|
default:
|
|
8160
8200
|
return 'black';
|
|
@@ -8175,7 +8215,7 @@ function BaseMessage(_ref) {
|
|
|
8175
8215
|
justifyContent: "space-between",
|
|
8176
8216
|
minHeight: "kitt.feedbackMessage.minHeight",
|
|
8177
8217
|
paddingTop: insets === null || insets === void 0 ? void 0 : insets.top,
|
|
8178
|
-
borderRadius: hasNoRadius ? undefined : 'kitt.
|
|
8218
|
+
borderRadius: hasNoRadius ? undefined : 'kitt.2',
|
|
8179
8219
|
backgroundColor: "kitt.feedbackMessage.".concat(type, ".backgroundColor"),
|
|
8180
8220
|
children: [/*#__PURE__*/jsxs(HStack, {
|
|
8181
8221
|
flexGrow: 1,
|
|
@@ -8183,9 +8223,9 @@ function BaseMessage(_ref) {
|
|
|
8183
8223
|
alignSelf: "center",
|
|
8184
8224
|
alignItems: "flex-start",
|
|
8185
8225
|
paddingY: "kitt.4",
|
|
8186
|
-
paddingX: "kitt.
|
|
8226
|
+
paddingX: "kitt.4",
|
|
8187
8227
|
children: [centeredText ? null : /*#__PURE__*/jsx(View, {
|
|
8188
|
-
marginRight: "kitt.
|
|
8228
|
+
marginRight: "kitt.2",
|
|
8189
8229
|
children: /*#__PURE__*/jsx(Icon, {
|
|
8190
8230
|
color: color,
|
|
8191
8231
|
icon: /*#__PURE__*/jsx(IconContent, {
|
|
@@ -10674,19 +10714,19 @@ function NavigationModalBehaviour(_ref) {
|
|
|
10674
10714
|
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
10675
10715
|
appear: shouldAppear,
|
|
10676
10716
|
visible: visible,
|
|
10677
|
-
onEnter: function () {
|
|
10717
|
+
onEnter: function handleEnter() {
|
|
10678
10718
|
if (onEnter) onEnter();
|
|
10679
10719
|
|
|
10680
10720
|
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
10681
10721
|
setShouldAppear(false);
|
|
10682
10722
|
},
|
|
10683
|
-
onExit: function () {
|
|
10723
|
+
onExit: function handleExit() {
|
|
10684
10724
|
if (onExit) onExit();
|
|
10685
10725
|
|
|
10686
10726
|
// Reset appear value to its original value for future modal display
|
|
10687
10727
|
setShouldAppear(appear);
|
|
10688
10728
|
},
|
|
10689
|
-
onExited: function () {
|
|
10729
|
+
onExited: function handleExitAnimationDone() {
|
|
10690
10730
|
if (onExited) onExited();
|
|
10691
10731
|
setIsModalBehaviourVisible(false);
|
|
10692
10732
|
},
|
|
@@ -10952,18 +10992,18 @@ function Picker(_ref) {
|
|
|
10952
10992
|
items: items,
|
|
10953
10993
|
initialSelectedItem: initialValueIndex > -1 ? items[initialValueIndex] : undefined,
|
|
10954
10994
|
initialIsOpen: isInitialOpen,
|
|
10955
|
-
stateReducer: function (state, actionAndChanges) {
|
|
10995
|
+
stateReducer: function stateReducer(state, actionAndChanges) {
|
|
10956
10996
|
return webUseSelectReducer(state, actionAndChanges, {
|
|
10957
10997
|
keepOpenOnChange: keepOpenOnChange
|
|
10958
10998
|
});
|
|
10959
10999
|
},
|
|
10960
11000
|
selectedItem: syncStateWithSourceValue ? sourceValue : undefined,
|
|
10961
|
-
onIsOpenChange: function (changes) {
|
|
11001
|
+
onIsOpenChange: function onIsOpenChange(changes) {
|
|
10962
11002
|
if (changes.isOpen === false) {
|
|
10963
11003
|
if (onClose) onClose();
|
|
10964
11004
|
}
|
|
10965
11005
|
},
|
|
10966
|
-
onSelectedItemChange: function (changes) {
|
|
11006
|
+
onSelectedItemChange: function onSelectedItemChange(changes) {
|
|
10967
11007
|
if (!onChange) return;
|
|
10968
11008
|
if (changes.selectedItem === null) {
|
|
10969
11009
|
onChange(undefined);
|
|
@@ -11060,6 +11100,7 @@ function Picker(_ref) {
|
|
|
11060
11100
|
paddingY: "kitt.2",
|
|
11061
11101
|
children: childrenArray.map(function (child, index) {
|
|
11062
11102
|
var currentValue = items[index];
|
|
11103
|
+
if (!currentValue) throw new Error("Picker: No value found for item at index ".concat(index));
|
|
11063
11104
|
var _getItemProps = getItemProps({
|
|
11064
11105
|
item: currentValue,
|
|
11065
11106
|
index: index,
|
|
@@ -11182,7 +11223,7 @@ function Skeleton(_ref) {
|
|
|
11182
11223
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
11183
11224
|
overflow: "hidden",
|
|
11184
11225
|
style: style,
|
|
11185
|
-
onLayout: function (_ref2) {
|
|
11226
|
+
onLayout: function onLayout(_ref2) {
|
|
11186
11227
|
var nativeEvent = _ref2.nativeEvent;
|
|
11187
11228
|
return setWidth(nativeEvent.layout.width);
|
|
11188
11229
|
},
|
|
@@ -11408,7 +11449,7 @@ function StaticMap(_ref) {
|
|
|
11408
11449
|
position: "relative",
|
|
11409
11450
|
maxWidth: mapBoxMaxPictureWidth,
|
|
11410
11451
|
height: height,
|
|
11411
|
-
onLayout: function (event) {
|
|
11452
|
+
onLayout: function handleParentLayout(event) {
|
|
11412
11453
|
var nativeEvent = event.nativeEvent;
|
|
11413
11454
|
var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
|
|
11414
11455
|
setCurrentWidth(rangedMapWidth);
|
|
@@ -11420,11 +11461,11 @@ function StaticMap(_ref) {
|
|
|
11420
11461
|
width: currentWidth,
|
|
11421
11462
|
height: height,
|
|
11422
11463
|
alt: alt,
|
|
11423
|
-
onLoadEnd: function () {
|
|
11464
|
+
onLoadEnd: function handleImageLoadEnd() {
|
|
11424
11465
|
setIsLoading(false);
|
|
11425
11466
|
if (onLoaded) onLoaded();
|
|
11426
11467
|
},
|
|
11427
|
-
onError: function () {
|
|
11468
|
+
onError: function handleError() {
|
|
11428
11469
|
setHasError(true);
|
|
11429
11470
|
if (onError) onError();
|
|
11430
11471
|
}
|
|
@@ -11449,7 +11490,7 @@ function StaticMap(_ref) {
|
|
|
11449
11490
|
width: "100%",
|
|
11450
11491
|
height: "100%",
|
|
11451
11492
|
children: /*#__PURE__*/jsx(StaticMapError, {
|
|
11452
|
-
onReload: function () {
|
|
11493
|
+
onReload: function handleReload() {
|
|
11453
11494
|
setHasError(false);
|
|
11454
11495
|
setIsLoading(true);
|
|
11455
11496
|
setCurrentMapKey(function (prev) {
|
|
@@ -11691,7 +11732,7 @@ function StoryContainer(_ref) {
|
|
|
11691
11732
|
var StoryDecorator = makeDecorator({
|
|
11692
11733
|
name: 'StoryDecorator',
|
|
11693
11734
|
parameterName: 'storyDecorator',
|
|
11694
|
-
wrapper: function (storyFn, context) {
|
|
11735
|
+
wrapper: function wrapper(storyFn, context) {
|
|
11695
11736
|
var story = storyFn(context);
|
|
11696
11737
|
if (context.parameters.disableStoryContainer) {
|
|
11697
11738
|
return story;
|
|
@@ -11869,13 +11910,14 @@ function TabBar(_ref) {
|
|
|
11869
11910
|
}, props), {}, {
|
|
11870
11911
|
children: Children.map(tabItems, function (child, index) {
|
|
11871
11912
|
var tab = tabs[index];
|
|
11913
|
+
if (!tab) throw new Error("TabBar: tab is undefined at index ".concat(index));
|
|
11872
11914
|
return /*#__PURE__*/jsx(View, {
|
|
11873
11915
|
children: /*#__PURE__*/cloneElement(child, {
|
|
11874
11916
|
color: color,
|
|
11875
|
-
onPress: function (event) {
|
|
11917
|
+
onPress: function onPress(event) {
|
|
11876
11918
|
var _child$props$onPress, _child$props;
|
|
11877
11919
|
onChangeTab({
|
|
11878
|
-
tab:
|
|
11920
|
+
tab: tab,
|
|
11879
11921
|
index: index
|
|
11880
11922
|
});
|
|
11881
11923
|
(_child$props$onPress = (_child$props = child.props).onPress) === null || _child$props$onPress === void 0 || _child$props$onPress.call(_child$props, event);
|
|
@@ -12030,6 +12072,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12030
12072
|
_currentInputValue$sp2 = _slicedToArray(_currentInputValue$sp, 2),
|
|
12031
12073
|
hours = _currentInputValue$sp2[0],
|
|
12032
12074
|
minutes = _currentInputValue$sp2[1];
|
|
12075
|
+
if (!hours || !minutes) return;
|
|
12033
12076
|
|
|
12034
12077
|
// Prepare the next date. It clones the date value passed as prop if available
|
|
12035
12078
|
var nextDate = value ? new Date(value) : new Date();
|
|
@@ -12050,7 +12093,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12050
12093
|
isFocusedInternal: isFocusedInternal,
|
|
12051
12094
|
isPressedInternal: isPressedInternal
|
|
12052
12095
|
}),
|
|
12053
|
-
onChange: function (event) {
|
|
12096
|
+
onChange: function handleInputChange(event) {
|
|
12054
12097
|
var currentValue = event.nativeEvent.text;
|
|
12055
12098
|
if (currentValue.length === 0) {
|
|
12056
12099
|
setInputValue(currentValue);
|
|
@@ -12073,6 +12116,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12073
12116
|
_sanitizedValue$split2 = _slicedToArray(_sanitizedValue$split, 2),
|
|
12074
12117
|
hours = _sanitizedValue$split2[0],
|
|
12075
12118
|
minutes = _sanitizedValue$split2[1];
|
|
12119
|
+
if (!hours || !minutes) return;
|
|
12076
12120
|
var currentHours = getDisplayedHours(hours);
|
|
12077
12121
|
var currentMinutes = getDisplayedMinutes(minutes);
|
|
12078
12122
|
var nextValue = "".concat(currentHours, ":").concat(currentMinutes);
|
|
@@ -12100,7 +12144,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12100
12144
|
setInputValue(sanitizedValue);
|
|
12101
12145
|
handleChange(sanitizedValue);
|
|
12102
12146
|
},
|
|
12103
|
-
onBlur: function () {
|
|
12147
|
+
onBlur: function handleBlur() {
|
|
12104
12148
|
if (inputValue.indexOf(':') === 1) {
|
|
12105
12149
|
setInputValue("0".concat(inputValue));
|
|
12106
12150
|
}
|
|
@@ -12655,7 +12699,7 @@ function KittThemeProvider(_ref) {
|
|
|
12655
12699
|
var KittThemeDecorator = makeDecorator({
|
|
12656
12700
|
name: 'ThemeDecorator',
|
|
12657
12701
|
parameterName: 'theme',
|
|
12658
|
-
wrapper: function (storyFn, context, _ref2) {
|
|
12702
|
+
wrapper: function wrapper(storyFn, context, _ref2) {
|
|
12659
12703
|
var _parameters$isSSR;
|
|
12660
12704
|
var _ref2$options = _ref2.options,
|
|
12661
12705
|
options = _ref2$options === void 0 ? {} : _ref2$options,
|