@ornikar/kitt-universal 32.7.0 → 32.8.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.
@@ -18,6 +18,7 @@ import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumbe
18
18
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
19
19
  import Svg, { Circle as Circle$1 } from 'react-native-svg';
20
20
  import { useFloating, autoUpdate, offset, autoPlacement, shift, arrow } from '@floating-ui/react-dom';
21
+ import { defineMessages, FormattedMessage } from 'react-intl';
21
22
  import { LinearGradient } from 'expo-linear-gradient';
22
23
  import { makeDecorator } from '@storybook/addons';
23
24
  import isChromatic from 'chromatic/isChromatic';
@@ -11897,6 +11898,105 @@ Picker.Option = PickerOption;
11897
11898
  */
11898
11899
  Picker.UnsafeInternalItem = PickerItem;
11899
11900
 
11901
+ const styles = {"displayUnderline":"TypographyLinkWebWrapper-module_displayUnderline__KxwMp","displayUnderlineWhenHovered":"TypographyLinkWebWrapper-module_displayUnderlineWhenHovered__5V5Cl"};
11902
+
11903
+ function TypographyLinkWebWrapper({
11904
+ children,
11905
+ hasNoUnderline
11906
+ }) {
11907
+ const className = hasNoUnderline ? `${styles.displayUnderline} ${styles.displayUnderlineWhenHovered}` : styles.displayUnderline;
11908
+ return /*#__PURE__*/jsx("span", {
11909
+ className: className,
11910
+ children: children
11911
+ });
11912
+ }
11913
+
11914
+ const TypographyLink = /*#__PURE__*/forwardRef(({
11915
+ children,
11916
+ disabled,
11917
+ noUnderline,
11918
+ href,
11919
+ hrefAttrs,
11920
+ onPress,
11921
+ ...otherProps
11922
+ }, ref) => {
11923
+ return /*#__PURE__*/jsx(TypographyLinkWebWrapper, {
11924
+ hasNoUnderline: noUnderline,
11925
+ children: /*#__PURE__*/jsx(Typography, {
11926
+ ref: ref,
11927
+ underline: !noUnderline,
11928
+ color: disabled ? 'black-disabled' : undefined,
11929
+ href: href,
11930
+ hrefAttrs: hrefAttrs,
11931
+ accessibilityRole: "link",
11932
+ dataSet: {
11933
+ // remove data-kitt-universal when we delete kitt web. See :global(a) in Link styles.module.css
11934
+ 'kitt-universal': 'true'
11935
+ },
11936
+ _web: {
11937
+ // @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
11938
+ cursor: disabled ? 'not-allowed' : 'pointer',
11939
+ transitionProperty: 'color',
11940
+ transitionDuration: '0.2s',
11941
+ transitionTimingFunction: 'ease-in-out'
11942
+ }
11943
+ // TODO[native-base@>=3.4.19] this currently does not work. Retest when updating native-base.
11944
+ // _active={{
11945
+ // underline: !!noUnderline,
11946
+ // }}
11947
+ // _hover={{
11948
+ // underline: !!noUnderline,
11949
+ // }}
11950
+ ,
11951
+ onPress: disabled ? undefined : onPress,
11952
+ ...otherProps,
11953
+ children: children
11954
+ })
11955
+ });
11956
+ });
11957
+
11958
+ const messages = defineMessages({
11959
+ seeMore: {
11960
+ id: "shared.components.ReadMore.seeMore"
11961
+ },
11962
+ seeLess: {
11963
+ id: "shared.components.ReadMore.seeLess"
11964
+ }
11965
+ });
11966
+ function ReadMore({
11967
+ lines,
11968
+ children,
11969
+ textColor = 'bumper.content.base.hi',
11970
+ noUnderline = false
11971
+ }) {
11972
+ const [isExpanded, setIsExpanded] = useState(false);
11973
+ const nbOfLines = isExpanded ? undefined : lines;
11974
+ const messageProps = isExpanded ? messages.seeLess : messages.seeMore;
11975
+ return /*#__PURE__*/jsxs(Fragment, {
11976
+ children: [/*#__PURE__*/jsx(View, {
11977
+ flexShrink: 1,
11978
+ children: /*#__PURE__*/jsx(Typography.Text, {
11979
+ textAlign: "left",
11980
+ numberOfLines: nbOfLines,
11981
+ ellipsizeMode: "tail",
11982
+ children: children
11983
+ })
11984
+ }), lines ? /*#__PURE__*/jsx(View, {
11985
+ children: /*#__PURE__*/jsx(TypographyLink, {
11986
+ noUnderline: noUnderline,
11987
+ color: textColor,
11988
+ variant: "bold",
11989
+ onPress: () => {
11990
+ setIsExpanded(prev => !prev);
11991
+ },
11992
+ children: /*#__PURE__*/jsx(FormattedMessage, {
11993
+ ...messageProps
11994
+ })
11995
+ })
11996
+ }) : null]
11997
+ });
11998
+ }
11999
+
11900
12000
  const SvgStripesinline = props => /*#__PURE__*/jsx("svg", {
11901
12001
  viewBox: "0 0 453 71",
11902
12002
  fill: "none",
@@ -13501,63 +13601,6 @@ function TypographyEmoji({
13501
13601
  });
13502
13602
  }
13503
13603
 
13504
- const styles = {"displayUnderline":"TypographyLinkWebWrapper-module_displayUnderline__KxwMp","displayUnderlineWhenHovered":"TypographyLinkWebWrapper-module_displayUnderlineWhenHovered__5V5Cl"};
13505
-
13506
- function TypographyLinkWebWrapper({
13507
- children,
13508
- hasNoUnderline
13509
- }) {
13510
- const className = hasNoUnderline ? `${styles.displayUnderline} ${styles.displayUnderlineWhenHovered}` : styles.displayUnderline;
13511
- return /*#__PURE__*/jsx("span", {
13512
- className: className,
13513
- children: children
13514
- });
13515
- }
13516
-
13517
- const TypographyLink = /*#__PURE__*/forwardRef(({
13518
- children,
13519
- disabled,
13520
- noUnderline,
13521
- href,
13522
- hrefAttrs,
13523
- onPress,
13524
- ...otherProps
13525
- }, ref) => {
13526
- return /*#__PURE__*/jsx(TypographyLinkWebWrapper, {
13527
- hasNoUnderline: noUnderline,
13528
- children: /*#__PURE__*/jsx(Typography, {
13529
- ref: ref,
13530
- underline: !noUnderline,
13531
- color: disabled ? 'black-disabled' : undefined,
13532
- href: href,
13533
- hrefAttrs: hrefAttrs,
13534
- accessibilityRole: "link",
13535
- dataSet: {
13536
- // remove data-kitt-universal when we delete kitt web. See :global(a) in Link styles.module.css
13537
- 'kitt-universal': 'true'
13538
- },
13539
- _web: {
13540
- // @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
13541
- cursor: disabled ? 'not-allowed' : 'pointer',
13542
- transitionProperty: 'color',
13543
- transitionDuration: '0.2s',
13544
- transitionTimingFunction: 'ease-in-out'
13545
- }
13546
- // TODO[native-base@>=3.4.19] this currently does not work. Retest when updating native-base.
13547
- // _active={{
13548
- // underline: !!noUnderline,
13549
- // }}
13550
- // _hover={{
13551
- // underline: !!noUnderline,
13552
- // }}
13553
- ,
13554
- onPress: disabled ? undefined : onPress,
13555
- ...otherProps,
13556
- children: children
13557
- })
13558
- });
13559
- });
13560
-
13561
13604
  const ChromaticReducedMotionDecorator = makeDecorator({
13562
13605
  name: 'ChromaticReducedMotionDecorator',
13563
13606
  parameterName: 'chromaticReducedMotion',
@@ -13924,5 +13967,5 @@ function VerticalSteps({
13924
13967
  VerticalSteps.Step = Step;
13925
13968
  VerticalSteps.BorderlessStep = BorderlessStep;
13926
13969
 
13927
- 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 };
13970
+ 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, ReadMore, 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 };
13928
13971
  //# sourceMappingURL=index-node-22.17.es.web.mjs.map