@ornikar/kitt-universal 28.0.1 → 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/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 getSpacing(multiplier) {
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 children(_ref3) {
2819
+ children: function (_ref3) {
2820
2820
  var isHovered = _ref3.isHovered,
2821
2821
  isPressed = _ref3.isPressed,
2822
2822
  isFocused = _ref3.isFocused;
@@ -3198,7 +3198,7 @@ function getUniversalFontWeight(type, variant, typographyFamily) {
3198
3198
  nativeFontFamily: nativeFontFamily
3199
3199
  };
3200
3200
  }
3201
- function Typography(_ref2) {
3201
+ var TypographyBase = /*#__PURE__*/forwardRef(function (_ref2, ref) {
3202
3202
  var _typographyType$base;
3203
3203
  var accessibilityRole = _ref2.accessibilityRole,
3204
3204
  legacyBase = _ref2.base,
@@ -3250,6 +3250,7 @@ function Typography(_ref2) {
3250
3250
  });
3251
3251
  }
3252
3252
  var text = /*#__PURE__*/jsx(Text, _objectSpread(_objectSpread({
3253
+ ref: ref,
3253
3254
  accessibilityRole: accessibilityRole || undefined,
3254
3255
  fontSize: fontSizeForNativeBase,
3255
3256
  lineHeight: hasTypographyAncestor ? undefined : fontSizeForNativeBase,
@@ -3268,31 +3269,35 @@ function Typography(_ref2) {
3268
3269
  value: color,
3269
3270
  children: content
3270
3271
  }) : content;
3271
- }
3272
- function TypographyText(props) {
3273
- return /*#__PURE__*/jsx(Typography, _objectSpread({
3272
+ });
3273
+ var TypographyText = /*#__PURE__*/forwardRef(function (props, ref) {
3274
+ return /*#__PURE__*/jsx(TypographyBase, _objectSpread({
3275
+ ref: ref,
3274
3276
  accessibilityRole: null
3275
3277
  }, props));
3276
- }
3277
- function TypographyParagraph(props) {
3278
+ });
3279
+ var TypographyParagraph = /*#__PURE__*/forwardRef(function (props, ref) {
3278
3280
  // role 'paragraph' does not exist in native, it's a web feature only.
3279
- return /*#__PURE__*/jsx(Typography, _objectSpread({
3281
+ return /*#__PURE__*/jsx(TypographyBase, _objectSpread({
3282
+ ref: ref,
3280
3283
  accessibilityRole: Platform.OS === 'web' ? 'paragraph' : null
3281
3284
  }, props));
3282
- }
3285
+ });
3283
3286
  var createHeading = function (level, defaultBase) {
3284
3287
  // https://github.com/necolas/react-native-web/issues/401
3285
- function TypographyHeading(props) {
3286
- return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({
3288
+ var TypographyHeading = /*#__PURE__*/forwardRef(function (props, ref) {
3289
+ return /*#__PURE__*/jsx(TypographyBase, _objectSpread(_objectSpread({
3290
+ ref: ref,
3287
3291
  accessibilityRole: "header",
3288
3292
  base: defaultBase
3289
3293
  }, props), {}, {
3290
3294
  "aria-level": level
3291
3295
  }));
3292
- }
3296
+ });
3293
3297
  TypographyHeading.displayName = "TypographyHeading".concat(level);
3294
3298
  return TypographyHeading;
3295
3299
  };
3300
+ var Typography = TypographyBase;
3296
3301
  Typography.SetDefaultColor = TypographyDefaultColorContext.Provider;
3297
3302
  Typography.Text = TypographyText;
3298
3303
  Typography.Paragraph = TypographyParagraph;
@@ -3586,11 +3591,11 @@ var useNativeAnimation$4 = function (_ref) {
3586
3591
  };
3587
3592
  });
3588
3593
  return {
3589
- onPressIn: function handlePressIn() {
3594
+ onPressIn: function () {
3590
3595
  color.value = withSpring(1);
3591
3596
  pressed.value = 1;
3592
3597
  },
3593
- onPressOut: function handlePressOut() {
3598
+ onPressOut: function () {
3594
3599
  color.value = withSpring(0);
3595
3600
  pressed.value = 0;
3596
3601
  },
@@ -3659,7 +3664,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
3659
3664
  onHoverOut: onHoverOut,
3660
3665
  onFocus: onFocus,
3661
3666
  onBlur: onBlur,
3662
- children: function children(_ref2) {
3667
+ children: function (_ref2) {
3663
3668
  var isHovered = _ref2.isHovered,
3664
3669
  isPressed = _ref2.isPressed,
3665
3670
  isFocused = _ref2.isFocused;
@@ -3782,7 +3787,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
3782
3787
  stretch: stretch,
3783
3788
  disabled: isLoading ? true : disabled,
3784
3789
  icon: isLoading ? /*#__PURE__*/jsx(LoaderIcon, {}) : icon,
3785
- onPress: function handlePress(e) {
3790
+ onPress: function (e) {
3786
3791
  var callPressAndUpdateLoadingState = /*#__PURE__*/function () {
3787
3792
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3788
3793
  return _regeneratorRuntime().wrap(function (_context) {
@@ -4054,10 +4059,10 @@ function BottomSheetComp(_ref, ref) {
4054
4059
  borderRadius: 4,
4055
4060
  backgroundColor: theme.kitt.bottomSheet.handle.backgroundColor
4056
4061
  },
4057
- handleComponent: function handleComponent(props) {
4062
+ handleComponent: function (props) {
4058
4063
  return hasHandle ? /*#__PURE__*/jsx(BottomSheetHandle, _objectSpread({}, props)) : null;
4059
4064
  },
4060
- backdropComponent: function backdropComponent(props) {
4065
+ backdropComponent: function (props) {
4061
4066
  return hasBackdrop ? /*#__PURE__*/jsx(BottomSheetBackdrop, _objectSpread(_objectSpread({}, props), {}, {
4062
4067
  opacity: 0.25,
4063
4068
  appearsOnIndex: 0,
@@ -4066,7 +4071,7 @@ function BottomSheetComp(_ref, ref) {
4066
4071
  }
4067
4072
  }, rest), {}, {
4068
4073
  topInset: top,
4069
- children: function children(props) {
4074
+ children: function (props) {
4070
4075
  return /*#__PURE__*/jsx(Wrapper, {
4071
4076
  children: typeof Content === 'function' ? /*#__PURE__*/jsx(Content, _objectSpread({}, props === null || props === void 0 ? void 0 : props.data)) : Content
4072
4077
  });
@@ -4142,7 +4147,7 @@ function CloseButton$1(_ref) {
4142
4147
  onPress = _ref.onPress;
4143
4148
  var onCloseContextCallback = useOnCloseModalBehaviour();
4144
4149
  return /*#__PURE__*/cloneElement(children, {
4145
- onPress: function handleClose() {
4150
+ onPress: function () {
4146
4151
  if (onPress) onPress();
4147
4152
  onCloseContextCallback();
4148
4153
  }
@@ -4318,11 +4323,11 @@ function CardModalAnimation(_ref) {
4318
4323
  transparent: true,
4319
4324
  supportedOrientations: ['landscape', 'portrait'],
4320
4325
  visible: isModalVisible,
4321
- onShow: function onShow() {
4326
+ onShow: function () {
4322
4327
  if (onEnter) onEnter();
4323
4328
  setIsContentVisible(true);
4324
4329
  },
4325
- onDismiss: function onDismiss() {
4330
+ onDismiss: function () {
4326
4331
  if (onExited) onExited();
4327
4332
  },
4328
4333
  children: /*#__PURE__*/jsxs(View, {
@@ -4369,7 +4374,7 @@ function CardModalBehaviour(_ref) {
4369
4374
  onClose: onClose,
4370
4375
  children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
4371
4376
  visible: visible,
4372
- onExited: function handleExitAnimationDone() {
4377
+ onExited: function () {
4373
4378
  if (onExited) onExited();
4374
4379
  setIsModalBehaviourVisible(false);
4375
4380
  },
@@ -4686,10 +4691,10 @@ var useNativeAnimation$3 = function (_ref) {
4686
4691
  };
4687
4692
  });
4688
4693
  return {
4689
- onPressIn: function onPressIn() {
4694
+ onPressIn: function () {
4690
4695
  pressed.value = true;
4691
4696
  },
4692
- onPressOut: function onPressOut() {
4697
+ onPressOut: function () {
4693
4698
  pressed.value = false;
4694
4699
  },
4695
4700
  backgroundStyles: backgroundStyles
@@ -4752,7 +4757,7 @@ function ChoiceItem(_ref) {
4752
4757
  style: style,
4753
4758
  onBlur: onBlur,
4754
4759
  onFocus: onFocus,
4755
- onPress: function handlePress(e) {
4760
+ onPress: function (e) {
4756
4761
  if (onFocus) onFocus(e);
4757
4762
  if (onPress) onPress();
4758
4763
  handleChange();
@@ -4760,7 +4765,7 @@ function ChoiceItem(_ref) {
4760
4765
  },
4761
4766
  onPressIn: onPressIn,
4762
4767
  onPressOut: onPressOut,
4763
- children: function children(_ref2) {
4768
+ children: function (_ref2) {
4764
4769
  var isHovered = _ref2.isHovered,
4765
4770
  isPressed = _ref2.isPressed;
4766
4771
  var textColor = getCurrentTextColor$1({
@@ -4864,7 +4869,7 @@ function Choices(_ref2) {
4864
4869
  type: type,
4865
4870
  disabled: disabled,
4866
4871
  onPress: !isForm ? onPress : undefined,
4867
- onChange: isForm ? function handleChange(newValue) {
4872
+ onChange: isForm ? function (newValue) {
4868
4873
  setCurrentValue(newValue);
4869
4874
  if (onChange) onChange(newValue);
4870
4875
  } : undefined,
@@ -5020,11 +5025,11 @@ function DialogModalAnimation(_ref) {
5020
5025
  transparent: true,
5021
5026
  supportedOrientations: ['landscape', 'portrait'],
5022
5027
  visible: isModalVisible,
5023
- onShow: function onShow() {
5028
+ onShow: function () {
5024
5029
  if (onEnter) onEnter();
5025
5030
  setIsContentVisible(true);
5026
5031
  },
5027
- onDismiss: function onDismiss() {
5032
+ onDismiss: function () {
5028
5033
  if (onExited) onExited();
5029
5034
  },
5030
5035
  children: /*#__PURE__*/jsxs(View, {
@@ -5078,7 +5083,7 @@ function DialogModalBehaviour(_ref) {
5078
5083
  },
5079
5084
  children: /*#__PURE__*/jsx(DialogModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
5080
5085
  visible: visible,
5081
- onExited: function handleExitAnimationDone() {
5086
+ onExited: function () {
5082
5087
  if (onExited) onExited();
5083
5088
  setIsModalBehaviourVisible(false);
5084
5089
  },
@@ -5341,7 +5346,7 @@ function ExternalLink(_ref) {
5341
5346
  var openExternalLink = useOpenExternalLink();
5342
5347
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5343
5348
  return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
5344
- onPress: function handleOnPress(e) {
5349
+ onPress: function (e) {
5345
5350
  if (onPress) {
5346
5351
  onPress(e);
5347
5352
  if (e.defaultPrevented) return;
@@ -5565,14 +5570,14 @@ var _excluded$y = ["children", "name", "disabled", "placeholder", "isInitialOpen
5565
5570
  function patchNativeEvent(event) {
5566
5571
  return event || {
5567
5572
  preventDownshiftDefault: false,
5568
- preventDefault: function preventDefault() {}
5573
+ preventDefault: function () {}
5569
5574
  };
5570
5575
  }
5571
5576
  function isReactElement(element) {
5572
5577
  return _typeof(element) === 'object' && element !== null && 'type' in element && 'props' in element;
5573
5578
  }
5574
5579
  function Autocomplete(_ref) {
5575
- var _children = _ref.children,
5580
+ var children = _ref.children,
5576
5581
  name = _ref.name,
5577
5582
  disabled = _ref.disabled,
5578
5583
  placeholder = _ref.placeholder,
@@ -5599,7 +5604,7 @@ function Autocomplete(_ref) {
5599
5604
  zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
5600
5605
  maxItemContainerHeight = _ref.maxItemContainerHeight,
5601
5606
  props = _objectWithoutProperties(_ref, _excluded$y);
5602
- var childrenArray = Children.toArray(_children);
5607
+ var childrenArray = Children.toArray(children);
5603
5608
  var items = childrenArray.filter(isReactElement).map(function (child) {
5604
5609
  return {
5605
5610
  child: child,
@@ -5610,12 +5615,12 @@ function Autocomplete(_ref) {
5610
5615
  defaultIsOpen: isInitialOpen,
5611
5616
  initialSelectedItem: initialValue,
5612
5617
  initialInputValue: initialValue ? itemToString(initialValue) : undefined,
5613
- itemToString: function handleItemToString(item) {
5618
+ itemToString: function (item) {
5614
5619
  // Prevents returning null values
5615
5620
  if (!itemToString) return '';
5616
5621
  return itemToString(item || undefined);
5617
5622
  },
5618
- stateReducer: function stateReducer(state, changes) {
5623
+ stateReducer: function (state, changes) {
5619
5624
  switch (changes.type) {
5620
5625
  case Downshift.stateChangeTypes.changeInput:
5621
5626
  return _objectSpread(_objectSpread({}, changes), {}, {
@@ -5625,7 +5630,7 @@ function Autocomplete(_ref) {
5625
5630
  return changes;
5626
5631
  }
5627
5632
  },
5628
- onChange: function onChange(selectedItem, stateAndHelpers) {
5633
+ onChange: function (selectedItem, stateAndHelpers) {
5629
5634
  if (_onChange) {
5630
5635
  _onChange(selectedItem, stateAndHelpers);
5631
5636
  }
@@ -5633,7 +5638,7 @@ function Autocomplete(_ref) {
5633
5638
  onSelect: onSelectItem,
5634
5639
  onOuterClick: onOuterPress,
5635
5640
  onInputValueChange: onInputChange,
5636
- children: function children(_ref2) {
5641
+ children: function (_ref2) {
5637
5642
  var getRootProps = _ref2.getRootProps,
5638
5643
  getInputProps = _ref2.getInputProps,
5639
5644
  getMenuProps = _ref2.getMenuProps,
@@ -5685,7 +5690,7 @@ function Autocomplete(_ref) {
5685
5690
  right: right || (canDisplayCollapseButton ? /*#__PURE__*/jsx(InputPressable, _objectSpread(_objectSpread({}, toggleProps), {}, {
5686
5691
  testID: "kitt.Autocomplete.listToggle",
5687
5692
  hitSlop: 40,
5688
- onPress: function handleTogglePress(e) {
5693
+ onPress: function (e) {
5689
5694
  if (Platform.OS === 'web') {
5690
5695
  onClickToggle(e);
5691
5696
  return;
@@ -5696,13 +5701,13 @@ function Autocomplete(_ref) {
5696
5701
  icon: isCurrentlyOpen ? /*#__PURE__*/jsx(CaretUpFillIcon, {}) : /*#__PURE__*/jsx(CaretDownFillIcon, {})
5697
5702
  })
5698
5703
  })) : null),
5699
- onFocus: function onFocus(e) {
5704
+ onFocus: function (e) {
5700
5705
  openMenu();
5701
5706
  /** @ts-expect-error onFocus wants web events */
5702
5707
  if (Platform.OS !== 'android' && onSearchInputFocus) onSearchInputFocus(e);
5703
5708
  if (_onFocus) _onFocus(e);
5704
5709
  },
5705
- onBlur: function onBlur(e) {
5710
+ onBlur: function (e) {
5706
5711
  /** @ts-expect-error onBlur wants web events */
5707
5712
  if (Platform.OS === 'web' && onSearchInputBlur) onSearchInputBlur(e);
5708
5713
 
@@ -5738,14 +5743,14 @@ function Autocomplete(_ref) {
5738
5743
  selected: ariaSelected
5739
5744
  },
5740
5745
  disabled: disabled,
5741
- onPress: function onPress(e) {
5746
+ onPress: function (e) {
5742
5747
  if (Platform.OS === 'web') {
5743
5748
  if (onClick) onClick(e);
5744
5749
  return;
5745
5750
  }
5746
5751
  if (_onPress) _onPress(patchNativeEvent(e));
5747
5752
  },
5748
- children: function children(_ref5) {
5753
+ children: function (_ref5) {
5749
5754
  var isHovered = _ref5.isHovered,
5750
5755
  isFocused = _ref5.isFocused,
5751
5756
  isPressed = _ref5.isPressed;
@@ -5835,12 +5840,12 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
5835
5840
  disabled: disabled
5836
5841
  },
5837
5842
  disabled: disabled,
5838
- onPress: function handlePress(e) {
5843
+ onPress: function (e) {
5839
5844
  if (onFocus) onFocus();
5840
5845
  if (onChange) onChange(!checked, e);
5841
5846
  if (onBlur) onBlur();
5842
5847
  },
5843
- children: function children(_ref2) {
5848
+ children: function (_ref2) {
5844
5849
  var isHovered = _ref2.isHovered,
5845
5850
  isPressed = _ref2.isPressed,
5846
5851
  isFocused = _ref2.isFocused;
@@ -6395,7 +6400,7 @@ var DatePickerAndroid = /*#__PURE__*/forwardRef(function (_ref, ref) {
6395
6400
  DateTimePickerAndroid.open({
6396
6401
  testID: pickerUITestID,
6397
6402
  value: currentValue || pickerDefaultDate || new Date(Date.now()),
6398
- onChange: function onChange(e) {
6403
+ onChange: function (e) {
6399
6404
  setIsFocused(false);
6400
6405
  var timestamp = e.nativeEvent.timestamp;
6401
6406
  if (timestamp) {
@@ -6447,7 +6452,7 @@ function PlatformDateTimePicker(_ref) {
6447
6452
  minimumDate: minimuDate,
6448
6453
  display: displayMode
6449
6454
  }, iosProps), {}, {
6450
- onChange: function onChange(_event, date) {
6455
+ onChange: function (_event, date) {
6451
6456
  return _onChange(date);
6452
6457
  }
6453
6458
  }));
@@ -6477,7 +6482,7 @@ function ModalPlatformDateTimePicker(_ref2) {
6477
6482
 
6478
6483
  return /*#__PURE__*/jsx(CardModal.ModalBehaviour, {
6479
6484
  visible: Boolean(isVisible),
6480
- onClose: function handleClose() {
6485
+ onClose: function () {
6481
6486
  setCurrentValue(value);
6482
6487
  onClose();
6483
6488
  },
@@ -6488,7 +6493,7 @@ function ModalPlatformDateTimePicker(_ref2) {
6488
6493
  }) : null, /*#__PURE__*/jsx(CardModal.Body, {
6489
6494
  children: /*#__PURE__*/jsx(PlatformDateTimePicker, _objectSpread(_objectSpread({}, props), {}, {
6490
6495
  value: currentValue,
6491
- onChange: function handleChange(newDate) {
6496
+ onChange: function (newDate) {
6492
6497
  setCurrentValue(function (prev) {
6493
6498
  return newDate || prev;
6494
6499
  });
@@ -6498,7 +6503,7 @@ function ModalPlatformDateTimePicker(_ref2) {
6498
6503
  children: /*#__PURE__*/jsx(Button, {
6499
6504
  stretch: true,
6500
6505
  type: "primary",
6501
- onPress: function handleSubmit() {
6506
+ onPress: function () {
6502
6507
  onChange(currentValue);
6503
6508
  },
6504
6509
  children: validateButtonLabel ? /*#__PURE__*/jsx(Text$1, {
@@ -6552,7 +6557,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
6552
6557
  isFocusedInternal: isFocused || isFocusedInternal,
6553
6558
  isHoveredInternal: isHoveredInternal,
6554
6559
  isPressedInternal: isPressedInternal,
6555
- onPress: function handleModalOpen() {
6560
+ onPress: function () {
6556
6561
  if (onFocus) onFocus();
6557
6562
  setIsPickerUIVisible(true);
6558
6563
  setIsFocused(true);
@@ -6565,7 +6570,7 @@ var DefaultNativeUIDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
6565
6570
  validateButtonLabel: pickerUIValidateButtonLabel,
6566
6571
  defaultDate: pickerDefaultDate,
6567
6572
  onClose: handleModalClose,
6568
- onChange: function handleChange(newDate) {
6573
+ onChange: function (newDate) {
6569
6574
  setCurrentValue(newDate);
6570
6575
  onChange(newDate);
6571
6576
  handleModalClose();
@@ -6881,7 +6886,7 @@ function FilePicker(_ref) {
6881
6886
  return /*#__PURE__*/jsxs(Fragment, {
6882
6887
  children: [/*#__PURE__*/cloneElement(childElement, {
6883
6888
  // ensure that the press event is not prevented by Button component
6884
- onPress: function onPress() {
6889
+ onPress: function () {
6885
6890
  var _childElement$props$o, _childElement$props, _bottomSheetRef$curre;
6886
6891
  if (disabled) return;
6887
6892
  (_childElement$props$o = (_childElement$props = childElement.props).onPress) === null || _childElement$props$o === void 0 || _childElement$props$o.call(_childElement$props);
@@ -7182,10 +7187,10 @@ var GoogleMapsAutocompleteContext = /*#__PURE__*/createContext({
7182
7187
  isLoadingResultDetails: false,
7183
7188
  shouldDisplayEmptyStateWhenNoResults: false
7184
7189
  },
7185
- onInputChange: function onInputChange() {
7190
+ onInputChange: function () {
7186
7191
  return Promise.resolve();
7187
7192
  },
7188
- onSelectItem: function onSelectItem() {}
7193
+ onSelectItem: function () {}
7189
7194
  });
7190
7195
  function GoogleMapsAutocompleteProvider(_ref) {
7191
7196
  var children = _ref.children,
@@ -7436,7 +7441,7 @@ function InputAddress(_ref) {
7436
7441
  return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
7437
7442
  itemToString: itemToString,
7438
7443
  initialValue: formattedInitialValue,
7439
- checkSelectedItem: function checkSelectedItem(selectedItem, item) {
7444
+ checkSelectedItem: function (selectedItem, item) {
7440
7445
  return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.place_id) === item.place_id;
7441
7446
  },
7442
7447
  right: state.isLoadingSearch || state.isLoadingResultDetails ? /*#__PURE__*/jsx(Icon, {
@@ -7445,10 +7450,10 @@ function InputAddress(_ref) {
7445
7450
  }) : undefined,
7446
7451
  errorElement: state.hasSearchError || state.hasSelectResultError ? errorElement : null,
7447
7452
  emptyResultsElement: state.items.length === 0 ? emptyResultsElement : null,
7448
- onInputChange: function onInputChange(v) {
7453
+ onInputChange: function (v) {
7449
7454
  _onInputChange(v);
7450
7455
  },
7451
- onChange: function onChange(v) {
7456
+ onChange: function (v) {
7452
7457
  onSelectItem(v, _onChange);
7453
7458
  },
7454
7459
  children: state.items.map(function (item) {
@@ -7530,7 +7535,7 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
7530
7535
  ref: ref
7531
7536
  }, props), {}, {
7532
7537
  inputMode: "numeric",
7533
- onChange: function handleChange(event) {
7538
+ onChange: function (event) {
7534
7539
  if (!onChange) return;
7535
7540
  var value = parseFloat(event.nativeEvent.text);
7536
7541
 
@@ -7562,7 +7567,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
7562
7567
  testID: "kitt.InputPassword.passwordToggle",
7563
7568
  hitSlop: 20,
7564
7569
  accessibilityRole: "button",
7565
- onPress: function onPress() {
7570
+ onPress: function () {
7566
7571
  return setIsVisible(function (prev) {
7567
7572
  return !prev;
7568
7573
  });
@@ -7597,7 +7602,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
7597
7602
  enterKeyHint: currentEnterKeyHint,
7598
7603
  autoComplete: autoComplete,
7599
7604
  textContentType: "telephoneNumber",
7600
- onChange: function handleChange(event) {
7605
+ onChange: function (event) {
7601
7606
  var number = parseNumber(event.nativeEvent.text);
7602
7607
 
7603
7608
  // When intl phone number is valid :
@@ -7790,14 +7795,14 @@ function Radio(_ref, ref) {
7790
7795
  focusable: checked && !disabled,
7791
7796
  flexDirection: "row",
7792
7797
  alignItems: "center",
7793
- onPress: function handlePress(event) {
7798
+ onPress: function (event) {
7794
7799
  if (onFocus) onFocus();
7795
7800
  if (onChange) onChange(value, event);
7796
7801
  if (onBlur) onBlur();
7797
7802
  },
7798
7803
  onFocus: onFocus,
7799
7804
  onBlur: onBlur,
7800
- children: function children(_ref2) {
7805
+ children: function (_ref2) {
7801
7806
  var isHovered = _ref2.isHovered,
7802
7807
  isPressed = _ref2.isPressed,
7803
7808
  isFocused = _ref2.isFocused;
@@ -7916,11 +7921,11 @@ var useNativeAnimation$2 = function (_ref) {
7916
7921
  };
7917
7922
  });
7918
7923
  return {
7919
- onPressIn: function handlePressIn() {
7924
+ onPressIn: function () {
7920
7925
  color.value = withSpring(1);
7921
7926
  pressed.value = 1;
7922
7927
  },
7923
- onPressOut: function handlePressOut() {
7928
+ onPressOut: function () {
7924
7929
  color.value = withSpring(0);
7925
7930
  pressed.value = 0;
7926
7931
  },
@@ -7973,7 +7978,7 @@ function RadioButton(_ref) {
7973
7978
  flexShrink: createResponsiveStyleFromProp(stretch, 1, undefined),
7974
7979
  flexBasis: createResponsiveStyleFromProp(stretch, 0),
7975
7980
  disabled: disabled,
7976
- onPress: function handlePress(e) {
7981
+ onPress: function (e) {
7977
7982
  if (onFocus) onFocus(e);
7978
7983
  if (onChange) onChange(value);
7979
7984
  if (onBlur) onBlur(e);
@@ -7982,7 +7987,7 @@ function RadioButton(_ref) {
7982
7987
  onPressOut: onPressOut,
7983
7988
  onFocus: onFocus,
7984
7989
  onBlur: onBlur,
7985
- children: function children(_ref2) {
7990
+ children: function (_ref2) {
7986
7991
  var isHovered = _ref2.isHovered,
7987
7992
  isPressed = _ref2.isPressed,
7988
7993
  isFocused = _ref2.isFocused;
@@ -8101,7 +8106,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
8101
8106
  textAlignVertical: "top",
8102
8107
  minHeight: "kitt.forms.textArea.minHeight"
8103
8108
  }, props), {}, {
8104
- onChange: function handleOnChange(e) {
8109
+ onChange: function (e) {
8105
8110
  if (!limit || e.nativeEvent.text.length <= limit) {
8106
8111
  var _props$onChange;
8107
8112
  (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, e);
@@ -8264,10 +8269,10 @@ function Toggle(_ref) {
8264
8269
  children: [/*#__PURE__*/jsx(Pressable, {
8265
8270
  accessibilityRole: "togglebutton",
8266
8271
  disabled: isDisabled,
8267
- onPress: function handlePress() {
8272
+ onPress: function () {
8268
8273
  onChange(!value);
8269
8274
  },
8270
- children: function children(_ref2) {
8275
+ children: function (_ref2) {
8271
8276
  var isHovered = _ref2.isHovered,
8272
8277
  isPressed = _ref2.isPressed,
8273
8278
  isFocused = _ref2.isFocused;
@@ -8454,11 +8459,11 @@ function FullscreenModalAnimation(_ref) {
8454
8459
  transparent: true,
8455
8460
  supportedOrientations: ['landscape', 'portrait'],
8456
8461
  visible: isModalVisible,
8457
- onShow: function onShow() {
8462
+ onShow: function () {
8458
8463
  if (onEnter) onEnter();
8459
8464
  setIsContentVisible(true);
8460
8465
  },
8461
- onDismiss: function onDismiss() {
8466
+ onDismiss: function () {
8462
8467
  if (onExited) onExited();
8463
8468
  },
8464
8469
  children: /*#__PURE__*/jsxs(View, {
@@ -8505,7 +8510,7 @@ function FullscreenModalBehaviour(_ref) {
8505
8510
  onClose: onClose,
8506
8511
  children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
8507
8512
  visible: visible,
8508
- onExited: function handleExitAnimationDone() {
8513
+ onExited: function () {
8509
8514
  if (onExited) onExited();
8510
8515
  setIsModalBehaviourVisible(false);
8511
8516
  },
@@ -8688,11 +8693,11 @@ var useNativeAnimation$1 = function (_ref) {
8688
8693
  };
8689
8694
  });
8690
8695
  return {
8691
- onPressIn: function handleHoverIn() {
8696
+ onPressIn: function () {
8692
8697
  color.value = withTiming(1, withTimingConfig);
8693
8698
  translate.value = withTiming(2, withTimingConfig);
8694
8699
  },
8695
- onPressOut: function handleHoverOut() {
8700
+ onPressOut: function () {
8696
8701
  color.value = withTiming(0, withTimingConfig);
8697
8702
  translate.value = withTiming(0, withTimingConfig);
8698
8703
  },
@@ -8786,13 +8791,13 @@ function Highlight(_ref) {
8786
8791
  });
8787
8792
  }
8788
8793
  return /*#__PURE__*/jsx(Pressable, {
8789
- onPress: function handlePress() {
8794
+ onPress: function () {
8790
8795
  setIsExpanded(!isExpanded);
8791
8796
  setIsInitialRender(false);
8792
8797
  },
8793
8798
  onPressIn: onPressIn,
8794
8799
  onPressOut: onPressOut,
8795
- children: function children(_ref2) {
8800
+ children: function (_ref2) {
8796
8801
  var isHovered = _ref2.isHovered;
8797
8802
  return /*#__PURE__*/jsxs(AnimatedContainer, {
8798
8803
  isHovered: isHovered,
@@ -9130,7 +9135,7 @@ function MapMarker(_ref2) {
9130
9135
  return /*#__PURE__*/jsx(Pressable$1, {
9131
9136
  testID: testID,
9132
9137
  onPress: onPress,
9133
- children: function children(_ref3) {
9138
+ children: function (_ref3) {
9134
9139
  var isHovered = _ref3.isHovered;
9135
9140
  return /*#__PURE__*/jsx(StaticMapMarker$1, _objectSpread(_objectSpread({}, props), {}, {
9136
9141
  isHovered: isHovered
@@ -10546,6 +10551,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
10546
10551
  button: {
10547
10552
  minWidth: theme.button.minWidth,
10548
10553
  maxWidth: theme.button.maxWidth,
10554
+ maxHeight: theme.button.maxHeight,
10549
10555
  height: {
10550
10556
  "default": theme.button.height["default"],
10551
10557
  medium: theme.button.height.medium
@@ -11891,19 +11897,19 @@ function NavigationModalBehaviour(_ref) {
11891
11897
  children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
11892
11898
  appear: shouldAppear,
11893
11899
  visible: visible,
11894
- onEnter: function handleEnter() {
11900
+ onEnter: function () {
11895
11901
  if (onEnter) onEnter();
11896
11902
 
11897
11903
  // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
11898
11904
  setShouldAppear(false);
11899
11905
  },
11900
- onExit: function handleExit() {
11906
+ onExit: function () {
11901
11907
  if (onExit) onExit();
11902
11908
 
11903
11909
  // Reset appear value to its original value for future modal display
11904
11910
  setShouldAppear(appear);
11905
11911
  },
11906
- onExited: function handleExitAnimationDone() {
11912
+ onExited: function () {
11907
11913
  if (onExited) onExited();
11908
11914
  setIsModalBehaviourVisible(false);
11909
11915
  },
@@ -12264,7 +12270,7 @@ function Picker(_ref) {
12264
12270
  isOpen: state.isOpen,
12265
12271
  selectedItem: state.currentValue,
12266
12272
  disabled: disabled,
12267
- onPress: function handlePressTrigger() {
12273
+ onPress: function () {
12268
12274
  if (syncStateWithSourceValue) {
12269
12275
  dispatch({
12270
12276
  type: 'open-modal-with-value',
@@ -12313,7 +12319,7 @@ function Picker(_ref) {
12313
12319
  accessibilityState: {
12314
12320
  selected: isSelected
12315
12321
  },
12316
- onPress: function onPress() {
12322
+ onPress: function () {
12317
12323
  handleInternalChange(item.props.value);
12318
12324
  },
12319
12325
  children: function (_ref2) {
@@ -12334,7 +12340,7 @@ function Picker(_ref) {
12334
12340
  children: /*#__PURE__*/jsx(Button, {
12335
12341
  stretch: true,
12336
12342
  type: "primary",
12337
- onPress: function handleChange() {
12343
+ onPress: function () {
12338
12344
  if (onChange) onChange(state.internalValue);
12339
12345
  dispatch({
12340
12346
  type: 'change-value'
@@ -12471,7 +12477,7 @@ function Skeleton(_ref) {
12471
12477
  return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
12472
12478
  overflow: "hidden",
12473
12479
  style: style,
12474
- onLayout: function onLayout(_ref2) {
12480
+ onLayout: function (_ref2) {
12475
12481
  var nativeEvent = _ref2.nativeEvent;
12476
12482
  return setWidth(nativeEvent.layout.width);
12477
12483
  },
@@ -12693,7 +12699,7 @@ function StaticMap(_ref) {
12693
12699
  position: "relative",
12694
12700
  maxWidth: mapBoxMaxPictureWidth,
12695
12701
  height: height,
12696
- onLayout: function handleParentLayout(event) {
12702
+ onLayout: function (event) {
12697
12703
  var nativeEvent = event.nativeEvent;
12698
12704
  var rangedMapWidth = getPictureWidth(nativeEvent.layout.width);
12699
12705
  setCurrentWidth(rangedMapWidth);
@@ -12705,11 +12711,11 @@ function StaticMap(_ref) {
12705
12711
  width: currentWidth,
12706
12712
  height: height,
12707
12713
  alt: alt,
12708
- onLoadEnd: function handleImageLoadEnd() {
12714
+ onLoadEnd: function () {
12709
12715
  setIsLoading(false);
12710
12716
  if (onLoaded) onLoaded();
12711
12717
  },
12712
- onError: function handleError() {
12718
+ onError: function () {
12713
12719
  setHasError(true);
12714
12720
  if (onError) onError();
12715
12721
  }
@@ -12734,7 +12740,7 @@ function StaticMap(_ref) {
12734
12740
  width: "100%",
12735
12741
  height: "100%",
12736
12742
  children: /*#__PURE__*/jsx(StaticMapError, {
12737
- onReload: function handleReload() {
12743
+ onReload: function () {
12738
12744
  setHasError(false);
12739
12745
  setIsLoading(true);
12740
12746
  setCurrentMapKey(function (prev) {
@@ -12975,7 +12981,7 @@ function StoryContainer(_ref) {
12975
12981
  var StoryDecorator = makeDecorator({
12976
12982
  name: 'StoryDecorator',
12977
12983
  parameterName: 'storyDecorator',
12978
- wrapper: function wrapper(storyFn, context) {
12984
+ wrapper: function (storyFn, context) {
12979
12985
  var story = storyFn(context);
12980
12986
  if (context.parameters.disableStoryContainer) {
12981
12987
  return story;
@@ -13083,7 +13089,7 @@ function TabBarItem(_ref) {
13083
13089
  disabled: disabled,
13084
13090
  testID: testID,
13085
13091
  onPress: onPress,
13086
- children: function children(_ref2) {
13092
+ children: function (_ref2) {
13087
13093
  var isHovered = _ref2.isHovered,
13088
13094
  isPressed = _ref2.isPressed,
13089
13095
  isFocused = _ref2.isFocused;
@@ -13172,7 +13178,7 @@ function TabBar(_ref) {
13172
13178
  color: color,
13173
13179
  variant: definedVariant,
13174
13180
  type: type,
13175
- onPress: function onPress(event) {
13181
+ onPress: function (event) {
13176
13182
  var _child$props$onPress, _child$props;
13177
13183
  onChangeTab({
13178
13184
  tab: tab,
@@ -13321,7 +13327,7 @@ function ModalDateTimePicker(_ref) {
13321
13327
  stretch: true,
13322
13328
  testID: "timePicker.ModalDateTimePicker.submitButton",
13323
13329
  type: "primary",
13324
- onPress: function handleSubmit() {
13330
+ onPress: function () {
13325
13331
  onChange(currentValue);
13326
13332
  },
13327
13333
  children: buttonContent
@@ -13368,7 +13374,7 @@ var TimePickerPressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
13368
13374
  width: createResponsiveStyleFromProp(stretch, '100%', 'kitt.forms.timePicker.minWidth'),
13369
13375
  pointerEvents: "box-only",
13370
13376
  onPress: onPress,
13371
- children: function children(_ref2) {
13377
+ children: function (_ref2) {
13372
13378
  var isHovered = _ref2.isHovered,
13373
13379
  isFocused = _ref2.isFocused,
13374
13380
  isPressed = _ref2.isPressed;
@@ -13445,7 +13451,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
13445
13451
  isHoveredInternal: isHoveredInternal,
13446
13452
  isFocusedInternal: isFocusedInternal,
13447
13453
  isPressedInternal: isPressedInternal,
13448
- onPress: function handlePress() {
13454
+ onPress: function () {
13449
13455
  setIsPickerVisible(true);
13450
13456
  }
13451
13457
  }), Platform.OS === 'android' && isPickerVisible ? /*#__PURE__*/jsx(DateTimePicker, {
@@ -13469,7 +13475,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
13469
13475
  value: pickerValue,
13470
13476
  validateButtonLabel: validateButtonLabel,
13471
13477
  onChange: handleChange,
13472
- onClose: function handleClose() {
13478
+ onClose: function () {
13473
13479
  setIsPickerVisible(false);
13474
13480
  }
13475
13481
  }) : null]
@@ -13832,7 +13838,7 @@ function Tooltip(_ref) {
13832
13838
  ref: reference,
13833
13839
  children: renderPressable({
13834
13840
  ref: getPressableRect,
13835
- onPress: function handlePress() {
13841
+ onPress: function () {
13836
13842
  if (onToggle) onToggle(!!pressed.value);
13837
13843
  pressed.value = !pressed.value;
13838
13844
  },
@@ -13851,7 +13857,7 @@ function Tooltip(_ref) {
13851
13857
  left: customShiftData.left,
13852
13858
  right: customShiftData.right,
13853
13859
  zIndex: zIndex,
13854
- onLayout: function onLayout(_ref2) {
13860
+ onLayout: function (_ref2) {
13855
13861
  var nativeEvent = _ref2.nativeEvent;
13856
13862
  return setFloatingWidth(nativeEvent.layout.width);
13857
13863
  },
@@ -13957,7 +13963,7 @@ function TypographyLinkWebWrapper(_ref) {
13957
13963
  }
13958
13964
 
13959
13965
  var _excluded$3 = ["children", "disabled", "noUnderline", "href", "hrefAttrs", "onPress"];
13960
- function TypographyLink(_ref) {
13966
+ var TypographyLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
13961
13967
  var children = _ref.children,
13962
13968
  disabled = _ref.disabled,
13963
13969
  noUnderline = _ref.noUnderline,
@@ -13968,6 +13974,7 @@ function TypographyLink(_ref) {
13968
13974
  return /*#__PURE__*/jsx(TypographyLinkWebWrapper, {
13969
13975
  hasNoUnderline: noUnderline,
13970
13976
  children: /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({
13977
+ ref: ref,
13971
13978
  underline: !noUnderline,
13972
13979
  color: disabled ? 'black-disabled' : undefined,
13973
13980
  href: href,
@@ -13997,7 +14004,7 @@ function TypographyLink(_ref) {
13997
14004
  children: children
13998
14005
  }))
13999
14006
  });
14000
- }
14007
+ });
14001
14008
 
14002
14009
  function KittThemeProvider(_ref) {
14003
14010
  var isSSR = _ref.isSSR,
@@ -14014,7 +14021,7 @@ function KittThemeProvider(_ref) {
14014
14021
  var KittThemeDecorator = makeDecorator({
14015
14022
  name: 'ThemeDecorator',
14016
14023
  parameterName: 'theme',
14017
- wrapper: function wrapper(storyFn, context, _ref2) {
14024
+ wrapper: function (storyFn, context, _ref2) {
14018
14025
  var _parameters$isSSR;
14019
14026
  var _ref2$options = _ref2.options,
14020
14027
  options = _ref2$options === void 0 ? {} : _ref2$options,