@ornikar/kitt-universal 27.7.0 → 27.9.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 (38) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/definitions/TopNavBar/TopNavBar.d.ts +21 -0
  3. package/dist/definitions/TopNavBar/TopNavBar.d.ts.map +1 -0
  4. package/dist/definitions/index.d.ts +2 -0
  5. package/dist/definitions/index.d.ts.map +1 -1
  6. package/dist/definitions/story-components/StoryDecorator.d.ts +1 -1
  7. package/dist/definitions/story-components/StoryDecorator.d.ts.map +1 -1
  8. package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts +1 -1
  9. package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -1
  10. package/dist/index-metro.es.android.js +81 -4
  11. package/dist/index-metro.es.android.js.map +1 -1
  12. package/dist/index-metro.es.ios.js +81 -4
  13. package/dist/index-metro.es.ios.js.map +1 -1
  14. package/dist/index-node-22.17.cjs.js +82 -2
  15. package/dist/index-node-22.17.cjs.js.map +1 -1
  16. package/dist/index-node-22.17.cjs.web.js +82 -2
  17. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  18. package/dist/index-node-22.17.es.mjs +83 -4
  19. package/dist/index-node-22.17.es.mjs.map +1 -1
  20. package/dist/index-node-22.17.es.web.mjs +83 -4
  21. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  22. package/dist/index.es.js +86 -4
  23. package/dist/index.es.js.map +1 -1
  24. package/dist/index.es.web.js +86 -4
  25. package/dist/index.es.web.js.map +1 -1
  26. package/dist/tsbuildinfo +1 -1
  27. package/package.json +3 -3
  28. package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.input.tsx +11 -0
  29. package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.output.tsx +17 -0
  30. package/scripts/codemods/__testfixtures__/csf1-csf2/default.input.tsx +88 -0
  31. package/scripts/codemods/__testfixtures__/csf1-csf2/default.output.tsx +94 -0
  32. package/scripts/codemods/__testfixtures__/csf1-csf2/multiple-add.input.tsx +77 -0
  33. package/scripts/codemods/__testfixtures__/csf1-csf2/multiple-add.output.tsx +92 -0
  34. package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.input.tsx +21 -0
  35. package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.output.tsx +28 -0
  36. package/scripts/codemods/__tests__/csf1-csf2.test.js +10 -0
  37. package/scripts/codemods/codemod-template.js +27 -0
  38. package/scripts/codemods/csf1-csf2.js +323 -0
@@ -5,7 +5,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
6
6
  import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, Keyboard, Text as Text$1, useWindowDimensions, PixelRatio } from 'react-native';
7
7
  export { useWindowDimensions as useWindowSize } from 'react-native';
8
- import { SpinnerGapRegularIcon, UserRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, XRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
8
+ import { SpinnerGapRegularIcon, UserRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, XRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon, ArrowLeftRegularIcon } from '@ornikar/kitt-icons/phosphor';
9
9
  import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
10
10
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
11
11
  import { parse } from '@twemoji/parser';
@@ -4086,7 +4086,7 @@ function useOnCloseModalBehaviour() {
4086
4086
  return onClose;
4087
4087
  }
4088
4088
 
4089
- function CloseButton({
4089
+ function CloseButton$1({
4090
4090
  children,
4091
4091
  onPress
4092
4092
  }) {
@@ -4121,7 +4121,7 @@ function ModalBehaviour({
4121
4121
  })
4122
4122
  });
4123
4123
  }
4124
- ModalBehaviour.CloseButton = CloseButton;
4124
+ ModalBehaviour.CloseButton = CloseButton$1;
4125
4125
 
4126
4126
  function Overlay({
4127
4127
  onPress
@@ -13626,6 +13626,85 @@ function Tooltip({
13626
13626
  Tooltip.Arrow = Arrow;
13627
13627
  Tooltip.Content = TooltipContent;
13628
13628
 
13629
+ function TopNavBar({
13630
+ left,
13631
+ right,
13632
+ title,
13633
+ titleAlign = 'center',
13634
+ stickers,
13635
+ mode = 'default',
13636
+ hasSeparator = true
13637
+ }) {
13638
+ const isLargeTitleMode = mode === 'largeTitle';
13639
+ return /*#__PURE__*/jsxs(VStack, {
13640
+ space: isLargeTitleMode ? 'kitt.2' : undefined,
13641
+ width: "100%",
13642
+ height: mode === 'default' ? 56 : undefined,
13643
+ justifyContent: "center",
13644
+ paddingX: "kitt.2",
13645
+ paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
13646
+ paddingBottom: "kitt.3",
13647
+ borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
13648
+ borderColor: "kitt.separator",
13649
+ children: [/*#__PURE__*/jsxs(HStack, {
13650
+ alignItems: "center",
13651
+ justifyContent: !title && !left ? 'flex-end' : 'space-between',
13652
+ children: [left ?? /*#__PURE__*/jsx(View, {
13653
+ width: "kitt.button.minWidth"
13654
+ }), mode === 'default' ? /*#__PURE__*/jsx(View, {
13655
+ flexGrow: "1",
13656
+ flexShrink: 1,
13657
+ paddingRight: "kitt.2",
13658
+ paddingLeft: "kitt.2",
13659
+ children: title ? /*#__PURE__*/jsx(Typography.Text, {
13660
+ textAlign: titleAlign,
13661
+ variant: "bold",
13662
+ ellipsizeMode: "tail",
13663
+ numberOfLines: 1,
13664
+ children: title
13665
+ }) : null
13666
+ }) : null, right ?? /*#__PURE__*/jsx(View, {
13667
+ width: "kitt.button.minWidth"
13668
+ })]
13669
+ }), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
13670
+ space: "kitt.4",
13671
+ paddingX: "kitt.2",
13672
+ children: [stickers ? /*#__PURE__*/jsx(HStack, {
13673
+ width: "100%",
13674
+ space: "kitt.1",
13675
+ flexShrink: 1,
13676
+ flexWrap: "wrap",
13677
+ style: {
13678
+ rowGap: theme.getSpacing(1)
13679
+ },
13680
+ children: stickers.map((sticker, index) =>
13681
+ /*#__PURE__*/
13682
+ // eslint-disable-next-line react/no-array-index-key
13683
+ jsx(View, {
13684
+ children: sticker
13685
+ }, index))
13686
+ }) : null, /*#__PURE__*/jsx(Typography.Text, {
13687
+ base: "heading-m",
13688
+ children: title
13689
+ })]
13690
+ }) : null]
13691
+ });
13692
+ }
13693
+ function CloseButton(props) {
13694
+ return /*#__PURE__*/jsx(IconButton, {
13695
+ icon: /*#__PURE__*/jsx(XRegularIcon, {}),
13696
+ ...props
13697
+ });
13698
+ }
13699
+ function BackButton(props) {
13700
+ return /*#__PURE__*/jsx(IconButton, {
13701
+ icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {}),
13702
+ ...props
13703
+ });
13704
+ }
13705
+ TopNavBar.CloseButton = CloseButton;
13706
+ TopNavBar.BackButton = BackButton;
13707
+
13629
13708
  function getTypographyTypeConfig(type, theme) {
13630
13709
  const {
13631
13710
  configs
@@ -14115,5 +14194,5 @@ function VerticalSteps({
14115
14194
  VerticalSteps.Step = Step;
14116
14195
  VerticalSteps.BorderlessStep = BorderlessStep;
14117
14196
 
14118
- export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, 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, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, 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 };
14197
+ export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, 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, 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 };
14119
14198
  //# sourceMappingURL=index-node-22.17.es.mjs.map