@ornikar/kitt-universal 31.3.2-canary.2f602b2cfade63278a988a7f253e6de89bdee0e8.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +8 -3
  2. package/dist/definitions/ModalBehaviour/ModalBehaviourPortal.web.d.ts.map +1 -1
  3. package/dist/definitions/forms/InputAddress/InputAddress.d.ts +12 -8
  4. package/dist/definitions/forms/InputAddress/InputAddress.d.ts.map +1 -1
  5. package/dist/definitions/forms/InputAddress/InputAddressLegacy.d.ts +15 -0
  6. package/dist/definitions/forms/InputAddress/InputAddressLegacy.d.ts.map +1 -0
  7. package/dist/definitions/forms/InputAddress/InputAddressOption.d.ts +5 -4
  8. package/dist/definitions/forms/InputAddress/InputAddressOption.d.ts.map +1 -1
  9. package/dist/definitions/forms/InputAddress/InputAddressOptionLegacy.d.ts +7 -0
  10. package/dist/definitions/forms/InputAddress/InputAddressOptionLegacy.d.ts.map +1 -0
  11. package/dist/definitions/index.d.ts +4 -1
  12. package/dist/definitions/index.d.ts.map +1 -1
  13. package/dist/index-metro.es.android.js +148 -70
  14. package/dist/index-metro.es.android.js.map +1 -1
  15. package/dist/index-metro.es.ios.js +148 -70
  16. package/dist/index-metro.es.ios.js.map +1 -1
  17. package/dist/index-node-22.17.cjs.js +83 -5
  18. package/dist/index-node-22.17.cjs.js.map +1 -1
  19. package/dist/index-node-22.17.cjs.web.css +1 -0
  20. package/dist/index-node-22.17.cjs.web.js +87 -8
  21. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  22. package/dist/index-node-22.17.es.mjs +83 -6
  23. package/dist/index-node-22.17.es.mjs.map +1 -1
  24. package/dist/index-node-22.17.es.web.css +1 -0
  25. package/dist/index-node-22.17.es.web.mjs +87 -9
  26. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  27. package/dist/index.es.js +149 -70
  28. package/dist/index.es.js.map +1 -1
  29. package/dist/index.es.web.js +139 -59
  30. package/dist/index.es.web.js.map +1 -1
  31. package/dist/styles.css +1 -0
  32. package/dist/tsbuildinfo +1 -1
  33. package/package.json +3 -3
@@ -6992,6 +6992,83 @@ function FilePicker({
6992
6992
  });
6993
6993
  }
6994
6994
 
6995
+ function InputAddressOption({
6996
+ item,
6997
+ mainText,
6998
+ secondaryText
6999
+ }) {
7000
+ const sharedTransform = {
7001
+ style: {
7002
+ transform: 'translateY(4px)'
7003
+ }
7004
+ };
7005
+ return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
7006
+ item: item,
7007
+ testID: "kitt.InputAddressOption.item",
7008
+ children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
7009
+ space: "kitt.2",
7010
+ children: [/*#__PURE__*/jsxRuntime.jsx(View, {
7011
+ _web: sharedTransform,
7012
+ _ios: sharedTransform,
7013
+ _android: sharedTransform,
7014
+ children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
7015
+ icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.MapPinRegularIcon, {}),
7016
+ color: "black"
7017
+ })
7018
+ }), /*#__PURE__*/jsxRuntime.jsx(View, {
7019
+ flexShrink: 1,
7020
+ children: /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
7021
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
7022
+ variant: "bold",
7023
+ children: mainText
7024
+ }), secondaryText ? /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
7025
+ color: "black-light",
7026
+ variant: "bold",
7027
+ children: [' ', secondaryText]
7028
+ }) : null]
7029
+ })
7030
+ })]
7031
+ })
7032
+ });
7033
+ }
7034
+
7035
+ function InputAddress({
7036
+ errorElement,
7037
+ initialValue,
7038
+ emptyResultsElement,
7039
+ onChange,
7040
+ items,
7041
+ isLoading,
7042
+ hasError,
7043
+ onInputChange,
7044
+ onSelectItem,
7045
+ convertInitialValue,
7046
+ children,
7047
+ ...props
7048
+ }) {
7049
+ const formattedInitialValue = initialValue ? convertInitialValue(initialValue) : undefined;
7050
+ return /*#__PURE__*/jsxRuntime.jsx(Autocomplete, {
7051
+ ...props,
7052
+ initialValue: formattedInitialValue,
7053
+ right: isLoading ? /*#__PURE__*/jsxRuntime.jsx(Icon, {
7054
+ icon: /*#__PURE__*/jsxRuntime.jsx(LoaderIcon, {}),
7055
+ color: "kitt.black"
7056
+ }) : undefined,
7057
+ errorElement: hasError ? errorElement : null,
7058
+ emptyResultsElement: items.length === 0 ? emptyResultsElement : null,
7059
+ onInputChange: value => onInputChange(value),
7060
+ onChange: item => onSelectItem(item, onChange),
7061
+ children: items.map(item => {
7062
+ const child = children(item);
7063
+ return /*#__PURE__*/React.cloneElement(child, {
7064
+ key: child.key,
7065
+ item
7066
+ });
7067
+ })
7068
+ });
7069
+ }
7070
+ InputAddress.Option = InputAddressOption;
7071
+
6995
7072
  const GoogleMapsApiKeyContext = /*#__PURE__*/React.createContext(undefined);
6996
7073
  function GoogleMapsApiKeyProvider({
6997
7074
  children,
@@ -7335,7 +7412,7 @@ function useGoogleMapsAutocomplete() {
7335
7412
  return context;
7336
7413
  }
7337
7414
 
7338
- function InputAddressOption({
7415
+ function InputAddressOptionLegacy({
7339
7416
  item
7340
7417
  }) {
7341
7418
  const sharedTransform = {
@@ -7345,7 +7422,7 @@ function InputAddressOption({
7345
7422
  };
7346
7423
  return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
7347
7424
  item: item,
7348
- testID: "kitt.InputAddressOption.item",
7425
+ testID: "kitt.InputAddressOptionLegacy.item",
7349
7426
  children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
7350
7427
  space: "kitt.2",
7351
7428
  children: [/*#__PURE__*/jsxRuntime.jsx(View, {
@@ -7406,7 +7483,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
7406
7483
  };
7407
7484
  }
7408
7485
 
7409
- function InputAddress({
7486
+ function InputAddressLegacy({
7410
7487
  initialValue,
7411
7488
  itemToString = defaultItemToString,
7412
7489
  errorElement,
@@ -7439,12 +7516,12 @@ function InputAddress({
7439
7516
  onChange: v => {
7440
7517
  onSelectItem(v, onChange);
7441
7518
  },
7442
- children: state.items.map(item => /*#__PURE__*/jsxRuntime.jsx(InputAddressOption, {
7519
+ children: state.items.map(item => /*#__PURE__*/jsxRuntime.jsx(InputAddressOptionLegacy, {
7443
7520
  item: item
7444
7521
  }, item.place_id))
7445
7522
  });
7446
7523
  }
7447
- InputAddress.Option = InputAddressOption;
7524
+ InputAddressLegacy.Option = InputAddressOptionLegacy;
7448
7525
 
7449
7526
  const InputEmail = /*#__PURE__*/React.forwardRef((props, ref) => {
7450
7527
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
@@ -14458,6 +14535,7 @@ exports.Image = Image;
14458
14535
  exports.ImagePicker = ImagePicker;
14459
14536
  exports.InfoCard = InfoCard;
14460
14537
  exports.InputAddress = InputAddress;
14538
+ exports.InputAddressLegacy = InputAddressLegacy;
14461
14539
  exports.InputEmail = InputEmail;
14462
14540
  exports.InputFeedback = InputFeedback;
14463
14541
  exports.InputField = InputField;