@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
|
@@ -2,7 +2,7 @@ import { useContext, createContext, forwardRef, useMemo, cloneElement, useState,
|
|
|
2
2
|
import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useBreakpointValue as useBreakpointValue$1, useSx, Text, Input, NativeBaseProvider, extendTheme } from 'native-base';
|
|
3
3
|
export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
|
-
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';
|
|
5
|
+
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';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { CSSTransition } from 'react-transition-group';
|
|
8
8
|
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
@@ -4021,7 +4021,7 @@ function useOnCloseModalBehaviour() {
|
|
|
4021
4021
|
return onClose;
|
|
4022
4022
|
}
|
|
4023
4023
|
|
|
4024
|
-
function CloseButton({
|
|
4024
|
+
function CloseButton$1({
|
|
4025
4025
|
children,
|
|
4026
4026
|
onPress
|
|
4027
4027
|
}) {
|
|
@@ -4056,7 +4056,7 @@ function ModalBehaviour({
|
|
|
4056
4056
|
})
|
|
4057
4057
|
});
|
|
4058
4058
|
}
|
|
4059
|
-
ModalBehaviour.CloseButton = CloseButton;
|
|
4059
|
+
ModalBehaviour.CloseButton = CloseButton$1;
|
|
4060
4060
|
|
|
4061
4061
|
function Overlay({
|
|
4062
4062
|
onPress
|
|
@@ -12669,6 +12669,85 @@ function Tooltip({
|
|
|
12669
12669
|
Tooltip.Arrow = Arrow;
|
|
12670
12670
|
Tooltip.Content = TooltipContent;
|
|
12671
12671
|
|
|
12672
|
+
function TopNavBar({
|
|
12673
|
+
left,
|
|
12674
|
+
right,
|
|
12675
|
+
title,
|
|
12676
|
+
titleAlign = 'center',
|
|
12677
|
+
stickers,
|
|
12678
|
+
mode = 'default',
|
|
12679
|
+
hasSeparator = true
|
|
12680
|
+
}) {
|
|
12681
|
+
const isLargeTitleMode = mode === 'largeTitle';
|
|
12682
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
12683
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
12684
|
+
width: "100%",
|
|
12685
|
+
height: mode === 'default' ? 56 : undefined,
|
|
12686
|
+
justifyContent: "center",
|
|
12687
|
+
paddingX: "kitt.2",
|
|
12688
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
12689
|
+
paddingBottom: "kitt.3",
|
|
12690
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
12691
|
+
borderColor: "kitt.separator",
|
|
12692
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
12693
|
+
alignItems: "center",
|
|
12694
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
12695
|
+
children: [left ?? /*#__PURE__*/jsx(View, {
|
|
12696
|
+
width: "kitt.button.minWidth"
|
|
12697
|
+
}), mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
12698
|
+
flexGrow: "1",
|
|
12699
|
+
flexShrink: 1,
|
|
12700
|
+
paddingRight: "kitt.2",
|
|
12701
|
+
paddingLeft: "kitt.2",
|
|
12702
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
12703
|
+
textAlign: titleAlign,
|
|
12704
|
+
variant: "bold",
|
|
12705
|
+
ellipsizeMode: "tail",
|
|
12706
|
+
numberOfLines: 1,
|
|
12707
|
+
children: title
|
|
12708
|
+
}) : null
|
|
12709
|
+
}) : null, right ?? /*#__PURE__*/jsx(View, {
|
|
12710
|
+
width: "kitt.button.minWidth"
|
|
12711
|
+
})]
|
|
12712
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
12713
|
+
space: "kitt.4",
|
|
12714
|
+
paddingX: "kitt.2",
|
|
12715
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
12716
|
+
width: "100%",
|
|
12717
|
+
space: "kitt.1",
|
|
12718
|
+
flexShrink: 1,
|
|
12719
|
+
flexWrap: "wrap",
|
|
12720
|
+
style: {
|
|
12721
|
+
rowGap: theme.getSpacing(1)
|
|
12722
|
+
},
|
|
12723
|
+
children: stickers.map((sticker, index) =>
|
|
12724
|
+
/*#__PURE__*/
|
|
12725
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
12726
|
+
jsx(View, {
|
|
12727
|
+
children: sticker
|
|
12728
|
+
}, index))
|
|
12729
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
12730
|
+
base: "heading-m",
|
|
12731
|
+
children: title
|
|
12732
|
+
})]
|
|
12733
|
+
}) : null]
|
|
12734
|
+
});
|
|
12735
|
+
}
|
|
12736
|
+
function CloseButton(props) {
|
|
12737
|
+
return /*#__PURE__*/jsx(IconButton, {
|
|
12738
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {}),
|
|
12739
|
+
...props
|
|
12740
|
+
});
|
|
12741
|
+
}
|
|
12742
|
+
function BackButton(props) {
|
|
12743
|
+
return /*#__PURE__*/jsx(IconButton, {
|
|
12744
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {}),
|
|
12745
|
+
...props
|
|
12746
|
+
});
|
|
12747
|
+
}
|
|
12748
|
+
TopNavBar.CloseButton = CloseButton;
|
|
12749
|
+
TopNavBar.BackButton = BackButton;
|
|
12750
|
+
|
|
12672
12751
|
function getTypographyTypeConfig(type, theme) {
|
|
12673
12752
|
const {
|
|
12674
12753
|
configs
|
|
@@ -13163,5 +13242,5 @@ function VerticalSteps({
|
|
|
13163
13242
|
VerticalSteps.Step = Step;
|
|
13164
13243
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
13165
13244
|
|
|
13166
|
-
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, 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 };
|
|
13245
|
+
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, 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 };
|
|
13167
13246
|
//# sourceMappingURL=index-node-22.17.es.web.mjs.map
|