@ornikar/kitt-universal 31.3.2-canary.1a5b65d2fbfa0e00bf6c237b7d017b61dce7e75b.0 → 31.3.2-canary.a176fae6a745e6f1b650fe56c3dca27af6b8816f.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.
@@ -6970,16 +6970,14 @@ function FilePicker({
6970
6970
 
6971
6971
  function InputAddressOption({
6972
6972
  item,
6973
- itemToMainText,
6974
- itemToSecondaryText
6973
+ mainText,
6974
+ secondaryText
6975
6975
  }) {
6976
6976
  const sharedTransform = {
6977
6977
  style: {
6978
6978
  transform: 'translateY(4px)'
6979
6979
  }
6980
6980
  };
6981
- const mainText = itemToMainText(item);
6982
- const secondaryText = itemToSecondaryText(item);
6983
6981
  return /*#__PURE__*/jsx(Autocomplete.Option, {
6984
6982
  item: item,
6985
6983
  testID: "kitt.InputAddressOption.item",
@@ -7010,44 +7008,6 @@ function InputAddressOption({
7010
7008
  });
7011
7009
  }
7012
7010
 
7013
- function InputAddressOptionLegacy({
7014
- item
7015
- }) {
7016
- const sharedTransform = {
7017
- style: {
7018
- transform: 'translateY(4px)'
7019
- }
7020
- };
7021
- return /*#__PURE__*/jsx(Autocomplete.Option, {
7022
- item: item,
7023
- testID: "kitt.InputAddressOptionLegacy.item",
7024
- children: /*#__PURE__*/jsxs(HStack, {
7025
- space: "kitt.2",
7026
- children: [/*#__PURE__*/jsx(View, {
7027
- _web: sharedTransform,
7028
- _ios: sharedTransform,
7029
- _android: sharedTransform,
7030
- children: /*#__PURE__*/jsx(TypographyIcon, {
7031
- icon: /*#__PURE__*/jsx(MapPinRegularIcon, {}),
7032
- color: "black"
7033
- })
7034
- }), /*#__PURE__*/jsx(View, {
7035
- flexShrink: 1,
7036
- children: /*#__PURE__*/jsxs(Typography.Text, {
7037
- children: [/*#__PURE__*/jsx(Typography.Text, {
7038
- variant: "bold",
7039
- children: item.structured_formatting.main_text
7040
- }), item.structured_formatting.secondary_text ? /*#__PURE__*/jsxs(Typography.Text, {
7041
- color: "black-light",
7042
- variant: "bold",
7043
- children: [' ', item.structured_formatting.secondary_text]
7044
- }) : null]
7045
- })
7046
- })]
7047
- })
7048
- });
7049
- }
7050
-
7051
7011
  function InputAddress({
7052
7012
  errorElement,
7053
7013
  initialValue,
@@ -7059,9 +7019,7 @@ function InputAddress({
7059
7019
  onInputChange,
7060
7020
  onSelectItem,
7061
7021
  convertInitialValue,
7062
- itemToMainText,
7063
- itemToSecondaryText,
7064
- itemToKey,
7022
+ children,
7065
7023
  ...props
7066
7024
  }) {
7067
7025
  const formattedInitialValue = initialValue ? convertInitialValue(initialValue) : undefined;
@@ -7076,14 +7034,16 @@ function InputAddress({
7076
7034
  emptyResultsElement: items.length === 0 ? emptyResultsElement : null,
7077
7035
  onInputChange: value => onInputChange(value),
7078
7036
  onChange: item => onSelectItem(item, onChange),
7079
- children: items.map(item => /*#__PURE__*/jsx(InputAddressOption, {
7080
- item: item,
7081
- itemToMainText: itemToMainText,
7082
- itemToSecondaryText: itemToSecondaryText
7083
- }, itemToKey(item)))
7037
+ children: items.map(item => {
7038
+ const child = children(item);
7039
+ return /*#__PURE__*/cloneElement(child, {
7040
+ key: child.key,
7041
+ item
7042
+ });
7043
+ })
7084
7044
  });
7085
7045
  }
7086
- InputAddress.Option = InputAddressOptionLegacy;
7046
+ InputAddress.Option = InputAddressOption;
7087
7047
 
7088
7048
  const GoogleMapsApiKeyContext = /*#__PURE__*/createContext(undefined);
7089
7049
  function GoogleMapsApiKeyProvider({
@@ -7428,6 +7388,44 @@ function useGoogleMapsAutocomplete() {
7428
7388
  return context;
7429
7389
  }
7430
7390
 
7391
+ function InputAddressOptionLegacy({
7392
+ item
7393
+ }) {
7394
+ const sharedTransform = {
7395
+ style: {
7396
+ transform: 'translateY(4px)'
7397
+ }
7398
+ };
7399
+ return /*#__PURE__*/jsx(Autocomplete.Option, {
7400
+ item: item,
7401
+ testID: "kitt.InputAddressOptionLegacy.item",
7402
+ children: /*#__PURE__*/jsxs(HStack, {
7403
+ space: "kitt.2",
7404
+ children: [/*#__PURE__*/jsx(View, {
7405
+ _web: sharedTransform,
7406
+ _ios: sharedTransform,
7407
+ _android: sharedTransform,
7408
+ children: /*#__PURE__*/jsx(TypographyIcon, {
7409
+ icon: /*#__PURE__*/jsx(MapPinRegularIcon, {}),
7410
+ color: "black"
7411
+ })
7412
+ }), /*#__PURE__*/jsx(View, {
7413
+ flexShrink: 1,
7414
+ children: /*#__PURE__*/jsxs(Typography.Text, {
7415
+ children: [/*#__PURE__*/jsx(Typography.Text, {
7416
+ variant: "bold",
7417
+ children: item.structured_formatting.main_text
7418
+ }), item.structured_formatting.secondary_text ? /*#__PURE__*/jsxs(Typography.Text, {
7419
+ color: "black-light",
7420
+ variant: "bold",
7421
+ children: [' ', item.structured_formatting.secondary_text]
7422
+ }) : null]
7423
+ })
7424
+ })]
7425
+ })
7426
+ });
7427
+ }
7428
+
7431
7429
  function defaultItemToString(item) {
7432
7430
  if (!item) return '';
7433
7431
  return item.description;