@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
@@ -1,3 +1,4 @@
1
+ .kitt-u_overflowHidden_otm3u3{overflow:hidden;}
1
2
  .kitt-u_contentAnimationEnter_c11xxy4r{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);}
2
3
  .kitt-u_contentAnimatioEnterActive_cl52117{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
3
4
  .kitt-u_contentAnimatioExit_cyjczep{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);}
@@ -4224,17 +4224,18 @@ function useStaticBottomSheet(Content) {
4224
4224
  };
4225
4225
  }
4226
4226
 
4227
+ const overflowHidden = "kitt-u_overflowHidden_otm3u3";
4227
4228
  function useBlockBodyScroll(shouldBlockScroll, isInitialRender) {
4228
4229
  react.useEffect(() => {
4229
4230
  if (shouldBlockScroll) {
4230
- document.body.style.overflow = 'hidden';
4231
+ document.body.classList.add(overflowHidden);
4231
4232
  } else if (!isInitialRender) {
4232
- document.body.style.overflow = '';
4233
+ document.body.classList.remove(overflowHidden);
4233
4234
  }
4234
4235
  return () => {
4235
4236
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- When leaving the website, document.body can be null
4236
4237
  if (document.body) {
4237
- document.body.style.overflow = '';
4238
+ document.body.classList.remove(overflowHidden);
4238
4239
  }
4239
4240
  };
4240
4241
  }, [shouldBlockScroll, isInitialRender]);
@@ -6246,6 +6247,83 @@ function ImagePicker({
6246
6247
  });
6247
6248
  }
6248
6249
 
6250
+ function InputAddressOption({
6251
+ item,
6252
+ mainText,
6253
+ secondaryText
6254
+ }) {
6255
+ const sharedTransform = {
6256
+ style: {
6257
+ transform: 'translateY(4px)'
6258
+ }
6259
+ };
6260
+ return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
6261
+ item: item,
6262
+ testID: "kitt.InputAddressOption.item",
6263
+ children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
6264
+ space: "kitt.2",
6265
+ children: [/*#__PURE__*/jsxRuntime.jsx(View, {
6266
+ _web: sharedTransform,
6267
+ _ios: sharedTransform,
6268
+ _android: sharedTransform,
6269
+ children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
6270
+ icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.MapPinRegularIcon, {}),
6271
+ color: "black"
6272
+ })
6273
+ }), /*#__PURE__*/jsxRuntime.jsx(View, {
6274
+ flexShrink: 1,
6275
+ children: /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
6276
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
6277
+ variant: "bold",
6278
+ children: mainText
6279
+ }), secondaryText ? /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
6280
+ color: "black-light",
6281
+ variant: "bold",
6282
+ children: [' ', secondaryText]
6283
+ }) : null]
6284
+ })
6285
+ })]
6286
+ })
6287
+ });
6288
+ }
6289
+
6290
+ function InputAddress({
6291
+ errorElement,
6292
+ initialValue,
6293
+ emptyResultsElement,
6294
+ onChange,
6295
+ items,
6296
+ isLoading,
6297
+ hasError,
6298
+ onInputChange,
6299
+ onSelectItem,
6300
+ convertInitialValue,
6301
+ children,
6302
+ ...props
6303
+ }) {
6304
+ const formattedInitialValue = initialValue ? convertInitialValue(initialValue) : undefined;
6305
+ return /*#__PURE__*/jsxRuntime.jsx(Autocomplete, {
6306
+ ...props,
6307
+ initialValue: formattedInitialValue,
6308
+ right: isLoading ? /*#__PURE__*/jsxRuntime.jsx(Icon, {
6309
+ icon: /*#__PURE__*/jsxRuntime.jsx(LoaderIcon, {}),
6310
+ color: "kitt.black"
6311
+ }) : undefined,
6312
+ errorElement: hasError ? errorElement : null,
6313
+ emptyResultsElement: items.length === 0 ? emptyResultsElement : null,
6314
+ onInputChange: value => onInputChange(value),
6315
+ onChange: item => onSelectItem(item, onChange),
6316
+ children: items.map(item => {
6317
+ const child = children(item);
6318
+ return /*#__PURE__*/react.cloneElement(child, {
6319
+ key: child.key,
6320
+ item
6321
+ });
6322
+ })
6323
+ });
6324
+ }
6325
+ InputAddress.Option = InputAddressOption;
6326
+
6249
6327
  const GoogleMapsApiKeyContext = /*#__PURE__*/react.createContext(undefined);
6250
6328
  function GoogleMapsApiKeyProvider({
6251
6329
  children,
@@ -6571,7 +6649,7 @@ function useGoogleMapsAutocomplete() {
6571
6649
  return context;
6572
6650
  }
6573
6651
 
6574
- function InputAddressOption({
6652
+ function InputAddressOptionLegacy({
6575
6653
  item
6576
6654
  }) {
6577
6655
  const sharedTransform = {
@@ -6581,7 +6659,7 @@ function InputAddressOption({
6581
6659
  };
6582
6660
  return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
6583
6661
  item: item,
6584
- testID: "kitt.InputAddressOption.item",
6662
+ testID: "kitt.InputAddressOptionLegacy.item",
6585
6663
  children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
6586
6664
  space: "kitt.2",
6587
6665
  children: [/*#__PURE__*/jsxRuntime.jsx(View, {
@@ -6642,7 +6720,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
6642
6720
  };
6643
6721
  }
6644
6722
 
6645
- function InputAddress({
6723
+ function InputAddressLegacy({
6646
6724
  initialValue,
6647
6725
  itemToString = defaultItemToString,
6648
6726
  errorElement,
@@ -6675,12 +6753,12 @@ function InputAddress({
6675
6753
  onChange: v => {
6676
6754
  onSelectItem(v, onChange);
6677
6755
  },
6678
- children: state.items.map(item => /*#__PURE__*/jsxRuntime.jsx(InputAddressOption, {
6756
+ children: state.items.map(item => /*#__PURE__*/jsxRuntime.jsx(InputAddressOptionLegacy, {
6679
6757
  item: item
6680
6758
  }, item.place_id))
6681
6759
  });
6682
6760
  }
6683
- InputAddress.Option = InputAddressOption;
6761
+ InputAddressLegacy.Option = InputAddressOptionLegacy;
6684
6762
 
6685
6763
  const InputEmail = /*#__PURE__*/react.forwardRef((props, ref) => {
6686
6764
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
@@ -13684,6 +13762,7 @@ exports.Image = Image;
13684
13762
  exports.ImagePicker = ImagePicker;
13685
13763
  exports.InfoCard = InfoCard;
13686
13764
  exports.InputAddress = InputAddress;
13765
+ exports.InputAddressLegacy = InputAddressLegacy;
13687
13766
  exports.InputEmail = InputEmail;
13688
13767
  exports.InputFeedback = InputFeedback;
13689
13768
  exports.InputField = InputField;