@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.
- package/CHANGELOG.md +19 -0
- package/dist/definitions/TopNavBar/TopNavBar.d.ts +21 -0
- package/dist/definitions/TopNavBar/TopNavBar.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +2 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/story-components/StoryDecorator.d.ts +1 -1
- package/dist/definitions/story-components/StoryDecorator.d.ts.map +1 -1
- package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts +1 -1
- package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +81 -4
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +81 -4
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +82 -2
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +82 -2
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +83 -4
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +83 -4
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +86 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +86 -4
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
- package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.input.tsx +11 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/decorator.output.tsx +17 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/default.input.tsx +88 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/default.output.tsx +94 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/multiple-add.input.tsx +77 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/multiple-add.output.tsx +92 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.input.tsx +21 -0
- package/scripts/codemods/__testfixtures__/csf1-csf2/parameters.output.tsx +28 -0
- package/scripts/codemods/__tests__/csf1-csf2.test.js +10 -0
- package/scripts/codemods/codemod-template.js +27 -0
- package/scripts/codemods/csf1-csf2.js +323 -0
|
@@ -9,7 +9,7 @@ import _extends from '@babel/runtime/helpers/extends';
|
|
|
9
9
|
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate } from 'react-native-reanimated';
|
|
10
10
|
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';
|
|
11
11
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
12
|
-
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';
|
|
12
|
+
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';
|
|
13
13
|
import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
|
|
14
14
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
15
15
|
import { parse } from '@twemoji/parser';
|
|
@@ -4085,7 +4085,7 @@ function useOnCloseModalBehaviour() {
|
|
|
4085
4085
|
return onClose;
|
|
4086
4086
|
}
|
|
4087
4087
|
|
|
4088
|
-
function CloseButton({
|
|
4088
|
+
function CloseButton$1({
|
|
4089
4089
|
children,
|
|
4090
4090
|
onPress
|
|
4091
4091
|
}) {
|
|
@@ -4120,7 +4120,7 @@ function ModalBehaviour({
|
|
|
4120
4120
|
})
|
|
4121
4121
|
});
|
|
4122
4122
|
}
|
|
4123
|
-
ModalBehaviour.CloseButton = CloseButton;
|
|
4123
|
+
ModalBehaviour.CloseButton = CloseButton$1;
|
|
4124
4124
|
|
|
4125
4125
|
function Overlay({
|
|
4126
4126
|
onPress
|
|
@@ -13654,6 +13654,83 @@ function Tooltip({
|
|
|
13654
13654
|
Tooltip.Arrow = Arrow;
|
|
13655
13655
|
Tooltip.Content = TooltipContent;
|
|
13656
13656
|
|
|
13657
|
+
function TopNavBar({
|
|
13658
|
+
left,
|
|
13659
|
+
right,
|
|
13660
|
+
title,
|
|
13661
|
+
titleAlign = 'center',
|
|
13662
|
+
stickers,
|
|
13663
|
+
mode = 'default',
|
|
13664
|
+
hasSeparator = true
|
|
13665
|
+
}) {
|
|
13666
|
+
const isLargeTitleMode = mode === 'largeTitle';
|
|
13667
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
13668
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
13669
|
+
width: "100%",
|
|
13670
|
+
height: mode === 'default' ? 56 : undefined,
|
|
13671
|
+
justifyContent: "center",
|
|
13672
|
+
paddingX: "kitt.2",
|
|
13673
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
13674
|
+
paddingBottom: "kitt.3",
|
|
13675
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
13676
|
+
borderColor: "kitt.separator",
|
|
13677
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
13678
|
+
alignItems: "center",
|
|
13679
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
13680
|
+
children: [left !== null && left !== void 0 ? left : /*#__PURE__*/jsx(View, {
|
|
13681
|
+
width: "kitt.button.minWidth"
|
|
13682
|
+
}), mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
13683
|
+
flexGrow: "1",
|
|
13684
|
+
flexShrink: 1,
|
|
13685
|
+
paddingRight: "kitt.2",
|
|
13686
|
+
paddingLeft: "kitt.2",
|
|
13687
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
13688
|
+
textAlign: titleAlign,
|
|
13689
|
+
variant: "bold",
|
|
13690
|
+
ellipsizeMode: "tail",
|
|
13691
|
+
numberOfLines: 1,
|
|
13692
|
+
children: title
|
|
13693
|
+
}) : null
|
|
13694
|
+
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
13695
|
+
width: "kitt.button.minWidth"
|
|
13696
|
+
})]
|
|
13697
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
13698
|
+
space: "kitt.4",
|
|
13699
|
+
paddingX: "kitt.2",
|
|
13700
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
13701
|
+
width: "100%",
|
|
13702
|
+
space: "kitt.1",
|
|
13703
|
+
flexShrink: 1,
|
|
13704
|
+
flexWrap: "wrap",
|
|
13705
|
+
style: {
|
|
13706
|
+
rowGap: theme.getSpacing(1)
|
|
13707
|
+
},
|
|
13708
|
+
children: stickers.map((sticker, index) =>
|
|
13709
|
+
/*#__PURE__*/
|
|
13710
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
13711
|
+
jsx(View, {
|
|
13712
|
+
children: sticker
|
|
13713
|
+
}, index))
|
|
13714
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
13715
|
+
base: "heading-m",
|
|
13716
|
+
children: title
|
|
13717
|
+
})]
|
|
13718
|
+
}) : null]
|
|
13719
|
+
});
|
|
13720
|
+
}
|
|
13721
|
+
function CloseButton(props) {
|
|
13722
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
13723
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
13724
|
+
}, props));
|
|
13725
|
+
}
|
|
13726
|
+
function BackButton(props) {
|
|
13727
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
13728
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
13729
|
+
}, props));
|
|
13730
|
+
}
|
|
13731
|
+
TopNavBar.CloseButton = CloseButton;
|
|
13732
|
+
TopNavBar.BackButton = BackButton;
|
|
13733
|
+
|
|
13657
13734
|
function getTypographyTypeConfig(type, theme) {
|
|
13658
13735
|
const {
|
|
13659
13736
|
configs
|
|
@@ -14152,5 +14229,5 @@ function VerticalSteps(_ref) {
|
|
|
14152
14229
|
VerticalSteps.Step = Step;
|
|
14153
14230
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
14154
14231
|
|
|
14155
|
-
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 };
|
|
14232
|
+
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 };
|
|
14156
14233
|
//# sourceMappingURL=index-metro.es.ios.js.map
|