@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
@@ -6968,6 +6968,83 @@ function FilePicker({
6968
6968
  });
6969
6969
  }
6970
6970
 
6971
+ function InputAddressOption({
6972
+ item,
6973
+ mainText,
6974
+ secondaryText
6975
+ }) {
6976
+ const sharedTransform = {
6977
+ style: {
6978
+ transform: 'translateY(4px)'
6979
+ }
6980
+ };
6981
+ return /*#__PURE__*/jsx(Autocomplete.Option, {
6982
+ item: item,
6983
+ testID: "kitt.InputAddressOption.item",
6984
+ children: /*#__PURE__*/jsxs(HStack, {
6985
+ space: "kitt.2",
6986
+ children: [/*#__PURE__*/jsx(View, {
6987
+ _web: sharedTransform,
6988
+ _ios: sharedTransform,
6989
+ _android: sharedTransform,
6990
+ children: /*#__PURE__*/jsx(TypographyIcon, {
6991
+ icon: /*#__PURE__*/jsx(MapPinRegularIcon, {}),
6992
+ color: "black"
6993
+ })
6994
+ }), /*#__PURE__*/jsx(View, {
6995
+ flexShrink: 1,
6996
+ children: /*#__PURE__*/jsxs(Typography.Text, {
6997
+ children: [/*#__PURE__*/jsx(Typography.Text, {
6998
+ variant: "bold",
6999
+ children: mainText
7000
+ }), secondaryText ? /*#__PURE__*/jsxs(Typography.Text, {
7001
+ color: "black-light",
7002
+ variant: "bold",
7003
+ children: [' ', secondaryText]
7004
+ }) : null]
7005
+ })
7006
+ })]
7007
+ })
7008
+ });
7009
+ }
7010
+
7011
+ function InputAddress({
7012
+ errorElement,
7013
+ initialValue,
7014
+ emptyResultsElement,
7015
+ onChange,
7016
+ items,
7017
+ isLoading,
7018
+ hasError,
7019
+ onInputChange,
7020
+ onSelectItem,
7021
+ convertInitialValue,
7022
+ children,
7023
+ ...props
7024
+ }) {
7025
+ const formattedInitialValue = initialValue ? convertInitialValue(initialValue) : undefined;
7026
+ return /*#__PURE__*/jsx(Autocomplete, {
7027
+ ...props,
7028
+ initialValue: formattedInitialValue,
7029
+ right: isLoading ? /*#__PURE__*/jsx(Icon, {
7030
+ icon: /*#__PURE__*/jsx(LoaderIcon, {}),
7031
+ color: "kitt.black"
7032
+ }) : undefined,
7033
+ errorElement: hasError ? errorElement : null,
7034
+ emptyResultsElement: items.length === 0 ? emptyResultsElement : null,
7035
+ onInputChange: value => onInputChange(value),
7036
+ onChange: item => onSelectItem(item, onChange),
7037
+ children: items.map(item => {
7038
+ const child = children(item);
7039
+ return /*#__PURE__*/cloneElement(child, {
7040
+ key: child.key,
7041
+ item
7042
+ });
7043
+ })
7044
+ });
7045
+ }
7046
+ InputAddress.Option = InputAddressOption;
7047
+
6971
7048
  const GoogleMapsApiKeyContext = /*#__PURE__*/createContext(undefined);
6972
7049
  function GoogleMapsApiKeyProvider({
6973
7050
  children,
@@ -7311,7 +7388,7 @@ function useGoogleMapsAutocomplete() {
7311
7388
  return context;
7312
7389
  }
7313
7390
 
7314
- function InputAddressOption({
7391
+ function InputAddressOptionLegacy({
7315
7392
  item
7316
7393
  }) {
7317
7394
  const sharedTransform = {
@@ -7321,7 +7398,7 @@ function InputAddressOption({
7321
7398
  };
7322
7399
  return /*#__PURE__*/jsx(Autocomplete.Option, {
7323
7400
  item: item,
7324
- testID: "kitt.InputAddressOption.item",
7401
+ testID: "kitt.InputAddressOptionLegacy.item",
7325
7402
  children: /*#__PURE__*/jsxs(HStack, {
7326
7403
  space: "kitt.2",
7327
7404
  children: [/*#__PURE__*/jsx(View, {
@@ -7382,7 +7459,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
7382
7459
  };
7383
7460
  }
7384
7461
 
7385
- function InputAddress({
7462
+ function InputAddressLegacy({
7386
7463
  initialValue,
7387
7464
  itemToString = defaultItemToString,
7388
7465
  errorElement,
@@ -7415,12 +7492,12 @@ function InputAddress({
7415
7492
  onChange: v => {
7416
7493
  onSelectItem(v, onChange);
7417
7494
  },
7418
- children: state.items.map(item => /*#__PURE__*/jsx(InputAddressOption, {
7495
+ children: state.items.map(item => /*#__PURE__*/jsx(InputAddressOptionLegacy, {
7419
7496
  item: item
7420
7497
  }, item.place_id))
7421
7498
  });
7422
7499
  }
7423
- InputAddress.Option = InputAddressOption;
7500
+ InputAddressLegacy.Option = InputAddressOptionLegacy;
7424
7501
 
7425
7502
  const InputEmail = /*#__PURE__*/forwardRef((props, ref) => {
7426
7503
  return /*#__PURE__*/jsx(InputText, {
@@ -14394,5 +14471,5 @@ function VerticalSteps({
14394
14471
  VerticalSteps.Step = Step;
14395
14472
  VerticalSteps.BorderlessStep = BorderlessStep;
14396
14473
 
14397
- 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, FlatList as 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 };
14474
+ 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, FlatList as 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 };
14398
14475
  //# sourceMappingURL=index-node-22.17.es.mjs.map