@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);}
@@ -4215,17 +4215,18 @@ function useStaticBottomSheet(Content) {
4215
4215
  };
4216
4216
  }
4217
4217
 
4218
+ const overflowHidden = "kitt-u_overflowHidden_otm3u3";
4218
4219
  function useBlockBodyScroll(shouldBlockScroll, isInitialRender) {
4219
4220
  useEffect(() => {
4220
4221
  if (shouldBlockScroll) {
4221
- document.body.style.overflow = 'hidden';
4222
+ document.body.classList.add(overflowHidden);
4222
4223
  } else if (!isInitialRender) {
4223
- document.body.style.overflow = '';
4224
+ document.body.classList.remove(overflowHidden);
4224
4225
  }
4225
4226
  return () => {
4226
4227
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- When leaving the website, document.body can be null
4227
4228
  if (document.body) {
4228
- document.body.style.overflow = '';
4229
+ document.body.classList.remove(overflowHidden);
4229
4230
  }
4230
4231
  };
4231
4232
  }, [shouldBlockScroll, isInitialRender]);
@@ -6237,6 +6238,83 @@ function ImagePicker({
6237
6238
  });
6238
6239
  }
6239
6240
 
6241
+ function InputAddressOption({
6242
+ item,
6243
+ mainText,
6244
+ secondaryText
6245
+ }) {
6246
+ const sharedTransform = {
6247
+ style: {
6248
+ transform: 'translateY(4px)'
6249
+ }
6250
+ };
6251
+ return /*#__PURE__*/jsx(Autocomplete.Option, {
6252
+ item: item,
6253
+ testID: "kitt.InputAddressOption.item",
6254
+ children: /*#__PURE__*/jsxs(HStack, {
6255
+ space: "kitt.2",
6256
+ children: [/*#__PURE__*/jsx(View, {
6257
+ _web: sharedTransform,
6258
+ _ios: sharedTransform,
6259
+ _android: sharedTransform,
6260
+ children: /*#__PURE__*/jsx(TypographyIcon, {
6261
+ icon: /*#__PURE__*/jsx(MapPinRegularIcon, {}),
6262
+ color: "black"
6263
+ })
6264
+ }), /*#__PURE__*/jsx(View, {
6265
+ flexShrink: 1,
6266
+ children: /*#__PURE__*/jsxs(Typography.Text, {
6267
+ children: [/*#__PURE__*/jsx(Typography.Text, {
6268
+ variant: "bold",
6269
+ children: mainText
6270
+ }), secondaryText ? /*#__PURE__*/jsxs(Typography.Text, {
6271
+ color: "black-light",
6272
+ variant: "bold",
6273
+ children: [' ', secondaryText]
6274
+ }) : null]
6275
+ })
6276
+ })]
6277
+ })
6278
+ });
6279
+ }
6280
+
6281
+ function InputAddress({
6282
+ errorElement,
6283
+ initialValue,
6284
+ emptyResultsElement,
6285
+ onChange,
6286
+ items,
6287
+ isLoading,
6288
+ hasError,
6289
+ onInputChange,
6290
+ onSelectItem,
6291
+ convertInitialValue,
6292
+ children,
6293
+ ...props
6294
+ }) {
6295
+ const formattedInitialValue = initialValue ? convertInitialValue(initialValue) : undefined;
6296
+ return /*#__PURE__*/jsx(Autocomplete, {
6297
+ ...props,
6298
+ initialValue: formattedInitialValue,
6299
+ right: isLoading ? /*#__PURE__*/jsx(Icon, {
6300
+ icon: /*#__PURE__*/jsx(LoaderIcon, {}),
6301
+ color: "kitt.black"
6302
+ }) : undefined,
6303
+ errorElement: hasError ? errorElement : null,
6304
+ emptyResultsElement: items.length === 0 ? emptyResultsElement : null,
6305
+ onInputChange: value => onInputChange(value),
6306
+ onChange: item => onSelectItem(item, onChange),
6307
+ children: items.map(item => {
6308
+ const child = children(item);
6309
+ return /*#__PURE__*/cloneElement(child, {
6310
+ key: child.key,
6311
+ item
6312
+ });
6313
+ })
6314
+ });
6315
+ }
6316
+ InputAddress.Option = InputAddressOption;
6317
+
6240
6318
  const GoogleMapsApiKeyContext = /*#__PURE__*/createContext(undefined);
6241
6319
  function GoogleMapsApiKeyProvider({
6242
6320
  children,
@@ -6562,7 +6640,7 @@ function useGoogleMapsAutocomplete() {
6562
6640
  return context;
6563
6641
  }
6564
6642
 
6565
- function InputAddressOption({
6643
+ function InputAddressOptionLegacy({
6566
6644
  item
6567
6645
  }) {
6568
6646
  const sharedTransform = {
@@ -6572,7 +6650,7 @@ function InputAddressOption({
6572
6650
  };
6573
6651
  return /*#__PURE__*/jsx(Autocomplete.Option, {
6574
6652
  item: item,
6575
- testID: "kitt.InputAddressOption.item",
6653
+ testID: "kitt.InputAddressOptionLegacy.item",
6576
6654
  children: /*#__PURE__*/jsxs(HStack, {
6577
6655
  space: "kitt.2",
6578
6656
  children: [/*#__PURE__*/jsx(View, {
@@ -6633,7 +6711,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
6633
6711
  };
6634
6712
  }
6635
6713
 
6636
- function InputAddress({
6714
+ function InputAddressLegacy({
6637
6715
  initialValue,
6638
6716
  itemToString = defaultItemToString,
6639
6717
  errorElement,
@@ -6666,12 +6744,12 @@ function InputAddress({
6666
6744
  onChange: v => {
6667
6745
  onSelectItem(v, onChange);
6668
6746
  },
6669
- children: state.items.map(item => /*#__PURE__*/jsx(InputAddressOption, {
6747
+ children: state.items.map(item => /*#__PURE__*/jsx(InputAddressOptionLegacy, {
6670
6748
  item: item
6671
6749
  }, item.place_id))
6672
6750
  });
6673
6751
  }
6674
- InputAddress.Option = InputAddressOption;
6752
+ InputAddressLegacy.Option = InputAddressOptionLegacy;
6675
6753
 
6676
6754
  const InputEmail = /*#__PURE__*/forwardRef((props, ref) => {
6677
6755
  return /*#__PURE__*/jsx(InputText, {
@@ -13635,5 +13713,5 @@ function VerticalSteps({
13635
13713
  VerticalSteps.Step = Step;
13636
13714
  VerticalSteps.BorderlessStep = BorderlessStep;
13637
13715
 
13638
- export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, ChromaticReducedMotionDecorator, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, NativeOnlyFlatList, NavigationBottomSheet, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Sticker, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, TopNavBar, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
13716
+ export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, ChromaticReducedMotionDecorator, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputAddressLegacy, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, NativeOnlyFlatList, NavigationBottomSheet, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Sticker, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, TopNavBar, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
13639
13717
  //# sourceMappingURL=index-node-22.17.es.web.mjs.map