@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
package/dist/index.es.web.js
CHANGED
|
@@ -10,7 +10,7 @@ import _extends from '@babel/runtime/helpers/extends';
|
|
|
10
10
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
11
11
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
12
12
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
13
|
-
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';
|
|
13
|
+
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';
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
15
|
import { CSSTransition } from 'react-transition-group';
|
|
16
16
|
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
@@ -4064,7 +4064,7 @@ function useOnCloseModalBehaviour() {
|
|
|
4064
4064
|
return onClose;
|
|
4065
4065
|
}
|
|
4066
4066
|
|
|
4067
|
-
function CloseButton(_ref) {
|
|
4067
|
+
function CloseButton$1(_ref) {
|
|
4068
4068
|
var children = _ref.children,
|
|
4069
4069
|
onPress = _ref.onPress;
|
|
4070
4070
|
var onCloseContextCallback = useOnCloseModalBehaviour();
|
|
@@ -4097,7 +4097,7 @@ function ModalBehaviour(_ref2) {
|
|
|
4097
4097
|
})
|
|
4098
4098
|
});
|
|
4099
4099
|
}
|
|
4100
|
-
ModalBehaviour.CloseButton = CloseButton;
|
|
4100
|
+
ModalBehaviour.CloseButton = CloseButton$1;
|
|
4101
4101
|
|
|
4102
4102
|
function Overlay(_ref) {
|
|
4103
4103
|
var onPress = _ref.onPress;
|
|
@@ -12872,6 +12872,88 @@ function Tooltip(_ref) {
|
|
|
12872
12872
|
Tooltip.Arrow = Arrow;
|
|
12873
12873
|
Tooltip.Content = TooltipContent;
|
|
12874
12874
|
|
|
12875
|
+
function TopNavBar(_ref) {
|
|
12876
|
+
var left = _ref.left,
|
|
12877
|
+
right = _ref.right,
|
|
12878
|
+
title = _ref.title,
|
|
12879
|
+
_ref$titleAlign = _ref.titleAlign,
|
|
12880
|
+
titleAlign = _ref$titleAlign === void 0 ? 'center' : _ref$titleAlign,
|
|
12881
|
+
stickers = _ref.stickers,
|
|
12882
|
+
_ref$mode = _ref.mode,
|
|
12883
|
+
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
12884
|
+
_ref$hasSeparator = _ref.hasSeparator,
|
|
12885
|
+
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator;
|
|
12886
|
+
var isLargeTitleMode = mode === 'largeTitle';
|
|
12887
|
+
return /*#__PURE__*/jsxs(VStack, {
|
|
12888
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
12889
|
+
width: "100%",
|
|
12890
|
+
height: mode === 'default' ? 56 : undefined,
|
|
12891
|
+
justifyContent: "center",
|
|
12892
|
+
paddingX: "kitt.2",
|
|
12893
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
12894
|
+
paddingBottom: "kitt.3",
|
|
12895
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
12896
|
+
borderColor: "kitt.separator",
|
|
12897
|
+
children: [/*#__PURE__*/jsxs(HStack, {
|
|
12898
|
+
alignItems: "center",
|
|
12899
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
12900
|
+
children: [left !== null && left !== void 0 ? left : /*#__PURE__*/jsx(View, {
|
|
12901
|
+
width: "kitt.button.minWidth"
|
|
12902
|
+
}), mode === 'default' ? /*#__PURE__*/jsx(View, {
|
|
12903
|
+
flexGrow: "1",
|
|
12904
|
+
flexShrink: 1,
|
|
12905
|
+
paddingRight: "kitt.2",
|
|
12906
|
+
paddingLeft: "kitt.2",
|
|
12907
|
+
children: title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
12908
|
+
textAlign: titleAlign,
|
|
12909
|
+
variant: "bold",
|
|
12910
|
+
ellipsizeMode: "tail",
|
|
12911
|
+
numberOfLines: 1,
|
|
12912
|
+
children: title
|
|
12913
|
+
}) : null
|
|
12914
|
+
}) : null, right !== null && right !== void 0 ? right : /*#__PURE__*/jsx(View, {
|
|
12915
|
+
width: "kitt.button.minWidth"
|
|
12916
|
+
})]
|
|
12917
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxs(VStack, {
|
|
12918
|
+
space: "kitt.4",
|
|
12919
|
+
paddingX: "kitt.2",
|
|
12920
|
+
children: [stickers ? /*#__PURE__*/jsx(HStack, {
|
|
12921
|
+
width: "100%",
|
|
12922
|
+
space: "kitt.1",
|
|
12923
|
+
flexShrink: 1,
|
|
12924
|
+
flexWrap: "wrap",
|
|
12925
|
+
style: {
|
|
12926
|
+
rowGap: theme.getSpacing(1)
|
|
12927
|
+
},
|
|
12928
|
+
children: stickers.map(function (sticker, index) {
|
|
12929
|
+
return (
|
|
12930
|
+
/*#__PURE__*/
|
|
12931
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
12932
|
+
jsx(View, {
|
|
12933
|
+
children: sticker
|
|
12934
|
+
}, index)
|
|
12935
|
+
);
|
|
12936
|
+
})
|
|
12937
|
+
}) : null, /*#__PURE__*/jsx(Typography.Text, {
|
|
12938
|
+
base: "heading-m",
|
|
12939
|
+
children: title
|
|
12940
|
+
})]
|
|
12941
|
+
}) : null]
|
|
12942
|
+
});
|
|
12943
|
+
}
|
|
12944
|
+
function CloseButton(props) {
|
|
12945
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
12946
|
+
icon: /*#__PURE__*/jsx(XRegularIcon, {})
|
|
12947
|
+
}, props));
|
|
12948
|
+
}
|
|
12949
|
+
function BackButton(props) {
|
|
12950
|
+
return /*#__PURE__*/jsx(IconButton, _objectSpread({
|
|
12951
|
+
icon: /*#__PURE__*/jsx(ArrowLeftRegularIcon, {})
|
|
12952
|
+
}, props));
|
|
12953
|
+
}
|
|
12954
|
+
TopNavBar.CloseButton = CloseButton;
|
|
12955
|
+
TopNavBar.BackButton = BackButton;
|
|
12956
|
+
|
|
12875
12957
|
function getTypographyTypeConfig(type, theme) {
|
|
12876
12958
|
var configs = theme.kitt.typography.types[getTypographyFamily(type)].configs;
|
|
12877
12959
|
return configs[type];
|
|
@@ -13362,5 +13444,5 @@ function VerticalSteps(_ref) {
|
|
|
13362
13444
|
VerticalSteps.Step = Step;
|
|
13363
13445
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
13364
13446
|
|
|
13365
|
-
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 };
|
|
13447
|
+
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 };
|
|
13366
13448
|
//# sourceMappingURL=index.es.web.js.map
|