@ornikar/kitt-universal 31.3.2-canary.1a5b65d2fbfa0e00bf6c237b7d017b61dce7e75b.0 → 31.3.2-canary.2f602b2cfade63278a988a7f253e6de89bdee0e8.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +3 -2
  2. package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.web.d.ts.map +1 -1
  3. package/dist/definitions/forms/InputAddress/InputAddress.d.ts +9 -15
  4. package/dist/definitions/forms/InputAddress/InputAddress.d.ts.map +1 -1
  5. package/dist/definitions/forms/InputAddress/InputAddressOption.d.ts +4 -5
  6. package/dist/definitions/forms/InputAddress/InputAddressOption.d.ts.map +1 -1
  7. package/dist/definitions/index.d.ts +1 -4
  8. package/dist/definitions/index.d.ts.map +1 -1
  9. package/dist/index-metro.es.android.js +106 -186
  10. package/dist/index-metro.es.android.js.map +1 -1
  11. package/dist/index-metro.es.ios.js +106 -186
  12. package/dist/index-metro.es.ios.js.map +1 -1
  13. package/dist/index-node-22.17.cjs.js +41 -121
  14. package/dist/index-node-22.17.cjs.js.map +1 -1
  15. package/dist/index-node-22.17.cjs.web.css +0 -1
  16. package/dist/index-node-22.17.cjs.web.js +44 -125
  17. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  18. package/dist/index-node-22.17.es.mjs +42 -121
  19. package/dist/index-node-22.17.es.mjs.map +1 -1
  20. package/dist/index-node-22.17.es.web.css +0 -1
  21. package/dist/index-node-22.17.es.web.mjs +45 -125
  22. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  23. package/dist/index.es.js +105 -188
  24. package/dist/index.es.js.map +1 -1
  25. package/dist/index.es.web.js +94 -178
  26. package/dist/index.es.web.js.map +1 -1
  27. package/dist/styles.css +0 -1
  28. package/dist/tsbuildinfo +1 -1
  29. package/package.json +3 -3
  30. package/dist/definitions/forms/InputAddress/InputAddressLegacy.d.ts +0 -15
  31. package/dist/definitions/forms/InputAddress/InputAddressLegacy.d.ts.map +0 -1
  32. package/dist/definitions/forms/InputAddress/InputAddressOptionLegacy.d.ts +0 -7
  33. package/dist/definitions/forms/InputAddress/InputAddressOptionLegacy.d.ts.map +0 -1
@@ -6992,123 +6992,6 @@ function FilePicker({
6992
6992
  });
6993
6993
  }
6994
6994
 
6995
- function InputAddressOption({
6996
- item,
6997
- itemToMainText,
6998
- itemToSecondaryText
6999
- }) {
7000
- const sharedTransform = {
7001
- style: {
7002
- transform: 'translateY(4px)'
7003
- }
7004
- };
7005
- const mainText = itemToMainText(item);
7006
- const secondaryText = itemToSecondaryText(item);
7007
- return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
7008
- item: item,
7009
- testID: "kitt.InputAddressOption.item",
7010
- children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
7011
- space: "kitt.2",
7012
- children: [/*#__PURE__*/jsxRuntime.jsx(View, {
7013
- _web: sharedTransform,
7014
- _ios: sharedTransform,
7015
- _android: sharedTransform,
7016
- children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
7017
- icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.MapPinRegularIcon, {}),
7018
- color: "black"
7019
- })
7020
- }), /*#__PURE__*/jsxRuntime.jsx(View, {
7021
- flexShrink: 1,
7022
- children: /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
7023
- children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
7024
- variant: "bold",
7025
- children: mainText
7026
- }), secondaryText ? /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
7027
- color: "black-light",
7028
- variant: "bold",
7029
- children: [' ', secondaryText]
7030
- }) : null]
7031
- })
7032
- })]
7033
- })
7034
- });
7035
- }
7036
-
7037
- function InputAddressOptionLegacy({
7038
- item
7039
- }) {
7040
- const sharedTransform = {
7041
- style: {
7042
- transform: 'translateY(4px)'
7043
- }
7044
- };
7045
- return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
7046
- item: item,
7047
- testID: "kitt.InputAddressOptionLegacy.item",
7048
- children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
7049
- space: "kitt.2",
7050
- children: [/*#__PURE__*/jsxRuntime.jsx(View, {
7051
- _web: sharedTransform,
7052
- _ios: sharedTransform,
7053
- _android: sharedTransform,
7054
- children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
7055
- icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.MapPinRegularIcon, {}),
7056
- color: "black"
7057
- })
7058
- }), /*#__PURE__*/jsxRuntime.jsx(View, {
7059
- flexShrink: 1,
7060
- children: /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
7061
- children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
7062
- variant: "bold",
7063
- children: item.structured_formatting.main_text
7064
- }), item.structured_formatting.secondary_text ? /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
7065
- color: "black-light",
7066
- variant: "bold",
7067
- children: [' ', item.structured_formatting.secondary_text]
7068
- }) : null]
7069
- })
7070
- })]
7071
- })
7072
- });
7073
- }
7074
-
7075
- function InputAddress({
7076
- errorElement,
7077
- initialValue,
7078
- emptyResultsElement,
7079
- onChange,
7080
- items,
7081
- isLoading,
7082
- hasError,
7083
- onInputChange,
7084
- onSelectItem,
7085
- convertInitialValue,
7086
- itemToMainText,
7087
- itemToSecondaryText,
7088
- itemToKey,
7089
- ...props
7090
- }) {
7091
- const formattedInitialValue = initialValue ? convertInitialValue(initialValue) : undefined;
7092
- return /*#__PURE__*/jsxRuntime.jsx(Autocomplete, {
7093
- ...props,
7094
- initialValue: formattedInitialValue,
7095
- right: isLoading ? /*#__PURE__*/jsxRuntime.jsx(Icon, {
7096
- icon: /*#__PURE__*/jsxRuntime.jsx(LoaderIcon, {}),
7097
- color: "kitt.black"
7098
- }) : undefined,
7099
- errorElement: hasError ? errorElement : null,
7100
- emptyResultsElement: items.length === 0 ? emptyResultsElement : null,
7101
- onInputChange: value => onInputChange(value),
7102
- onChange: item => onSelectItem(item, onChange),
7103
- children: items.map(item => /*#__PURE__*/jsxRuntime.jsx(InputAddressOption, {
7104
- item: item,
7105
- itemToMainText: itemToMainText,
7106
- itemToSecondaryText: itemToSecondaryText
7107
- }, itemToKey(item)))
7108
- });
7109
- }
7110
- InputAddress.Option = InputAddressOptionLegacy;
7111
-
7112
6995
  const GoogleMapsApiKeyContext = /*#__PURE__*/React.createContext(undefined);
7113
6996
  function GoogleMapsApiKeyProvider({
7114
6997
  children,
@@ -7452,6 +7335,44 @@ function useGoogleMapsAutocomplete() {
7452
7335
  return context;
7453
7336
  }
7454
7337
 
7338
+ function InputAddressOption({
7339
+ item
7340
+ }) {
7341
+ const sharedTransform = {
7342
+ style: {
7343
+ transform: 'translateY(4px)'
7344
+ }
7345
+ };
7346
+ return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
7347
+ item: item,
7348
+ testID: "kitt.InputAddressOption.item",
7349
+ children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
7350
+ space: "kitt.2",
7351
+ children: [/*#__PURE__*/jsxRuntime.jsx(View, {
7352
+ _web: sharedTransform,
7353
+ _ios: sharedTransform,
7354
+ _android: sharedTransform,
7355
+ children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
7356
+ icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.MapPinRegularIcon, {}),
7357
+ color: "black"
7358
+ })
7359
+ }), /*#__PURE__*/jsxRuntime.jsx(View, {
7360
+ flexShrink: 1,
7361
+ children: /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
7362
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
7363
+ variant: "bold",
7364
+ children: item.structured_formatting.main_text
7365
+ }), item.structured_formatting.secondary_text ? /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
7366
+ color: "black-light",
7367
+ variant: "bold",
7368
+ children: [' ', item.structured_formatting.secondary_text]
7369
+ }) : null]
7370
+ })
7371
+ })]
7372
+ })
7373
+ });
7374
+ }
7375
+
7455
7376
  function defaultItemToString(item) {
7456
7377
  if (!item) return '';
7457
7378
  return item.description;
@@ -7485,7 +7406,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
7485
7406
  };
7486
7407
  }
7487
7408
 
7488
- function InputAddressLegacy({
7409
+ function InputAddress({
7489
7410
  initialValue,
7490
7411
  itemToString = defaultItemToString,
7491
7412
  errorElement,
@@ -7518,12 +7439,12 @@ function InputAddressLegacy({
7518
7439
  onChange: v => {
7519
7440
  onSelectItem(v, onChange);
7520
7441
  },
7521
- children: state.items.map(item => /*#__PURE__*/jsxRuntime.jsx(InputAddressOptionLegacy, {
7442
+ children: state.items.map(item => /*#__PURE__*/jsxRuntime.jsx(InputAddressOption, {
7522
7443
  item: item
7523
7444
  }, item.place_id))
7524
7445
  });
7525
7446
  }
7526
- InputAddressLegacy.Option = InputAddressOptionLegacy;
7447
+ InputAddress.Option = InputAddressOption;
7527
7448
 
7528
7449
  const InputEmail = /*#__PURE__*/React.forwardRef((props, ref) => {
7529
7450
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
@@ -14537,7 +14458,6 @@ exports.Image = Image;
14537
14458
  exports.ImagePicker = ImagePicker;
14538
14459
  exports.InfoCard = InfoCard;
14539
14460
  exports.InputAddress = InputAddress;
14540
- exports.InputAddressLegacy = InputAddressLegacy;
14541
14461
  exports.InputEmail = InputEmail;
14542
14462
  exports.InputFeedback = InputFeedback;
14543
14463
  exports.InputField = InputField;