@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
|
@@ -4109,7 +4109,7 @@ function useOnCloseModalBehaviour() {
|
|
|
4109
4109
|
return onClose;
|
|
4110
4110
|
}
|
|
4111
4111
|
|
|
4112
|
-
function CloseButton({
|
|
4112
|
+
function CloseButton$1({
|
|
4113
4113
|
children,
|
|
4114
4114
|
onPress
|
|
4115
4115
|
}) {
|
|
@@ -4144,7 +4144,7 @@ function ModalBehaviour({
|
|
|
4144
4144
|
})
|
|
4145
4145
|
});
|
|
4146
4146
|
}
|
|
4147
|
-
ModalBehaviour.CloseButton = CloseButton;
|
|
4147
|
+
ModalBehaviour.CloseButton = CloseButton$1;
|
|
4148
4148
|
|
|
4149
4149
|
function Overlay({
|
|
4150
4150
|
onPress
|
|
@@ -13649,6 +13649,85 @@ function Tooltip({
|
|
|
13649
13649
|
Tooltip.Arrow = Arrow;
|
|
13650
13650
|
Tooltip.Content = TooltipContent;
|
|
13651
13651
|
|
|
13652
|
+
function TopNavBar({
|
|
13653
|
+
left,
|
|
13654
|
+
right,
|
|
13655
|
+
title,
|
|
13656
|
+
titleAlign = 'center',
|
|
13657
|
+
stickers,
|
|
13658
|
+
mode = 'default',
|
|
13659
|
+
hasSeparator = true
|
|
13660
|
+
}) {
|
|
13661
|
+
const isLargeTitleMode = mode === 'largeTitle';
|
|
13662
|
+
return /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
13663
|
+
space: isLargeTitleMode ? 'kitt.2' : undefined,
|
|
13664
|
+
width: "100%",
|
|
13665
|
+
height: mode === 'default' ? 56 : undefined,
|
|
13666
|
+
justifyContent: "center",
|
|
13667
|
+
paddingX: "kitt.2",
|
|
13668
|
+
paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
|
|
13669
|
+
paddingBottom: "kitt.3",
|
|
13670
|
+
borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
|
|
13671
|
+
borderColor: "kitt.separator",
|
|
13672
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
13673
|
+
alignItems: "center",
|
|
13674
|
+
justifyContent: !title && !left ? 'flex-end' : 'space-between',
|
|
13675
|
+
children: [left ?? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
13676
|
+
width: "kitt.button.minWidth"
|
|
13677
|
+
}), mode === 'default' ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
13678
|
+
flexGrow: "1",
|
|
13679
|
+
flexShrink: 1,
|
|
13680
|
+
paddingRight: "kitt.2",
|
|
13681
|
+
paddingLeft: "kitt.2",
|
|
13682
|
+
children: title ? /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
13683
|
+
textAlign: titleAlign,
|
|
13684
|
+
variant: "bold",
|
|
13685
|
+
ellipsizeMode: "tail",
|
|
13686
|
+
numberOfLines: 1,
|
|
13687
|
+
children: title
|
|
13688
|
+
}) : null
|
|
13689
|
+
}) : null, right ?? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
13690
|
+
width: "kitt.button.minWidth"
|
|
13691
|
+
})]
|
|
13692
|
+
}), mode === 'largeTitle' ? /*#__PURE__*/jsxRuntime.jsxs(VStack, {
|
|
13693
|
+
space: "kitt.4",
|
|
13694
|
+
paddingX: "kitt.2",
|
|
13695
|
+
children: [stickers ? /*#__PURE__*/jsxRuntime.jsx(HStack, {
|
|
13696
|
+
width: "100%",
|
|
13697
|
+
space: "kitt.1",
|
|
13698
|
+
flexShrink: 1,
|
|
13699
|
+
flexWrap: "wrap",
|
|
13700
|
+
style: {
|
|
13701
|
+
rowGap: theme.getSpacing(1)
|
|
13702
|
+
},
|
|
13703
|
+
children: stickers.map((sticker, index) =>
|
|
13704
|
+
/*#__PURE__*/
|
|
13705
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
13706
|
+
jsxRuntime.jsx(View, {
|
|
13707
|
+
children: sticker
|
|
13708
|
+
}, index))
|
|
13709
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
13710
|
+
base: "heading-m",
|
|
13711
|
+
children: title
|
|
13712
|
+
})]
|
|
13713
|
+
}) : null]
|
|
13714
|
+
});
|
|
13715
|
+
}
|
|
13716
|
+
function CloseButton(props) {
|
|
13717
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
13718
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {}),
|
|
13719
|
+
...props
|
|
13720
|
+
});
|
|
13721
|
+
}
|
|
13722
|
+
function BackButton(props) {
|
|
13723
|
+
return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
13724
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.ArrowLeftRegularIcon, {}),
|
|
13725
|
+
...props
|
|
13726
|
+
});
|
|
13727
|
+
}
|
|
13728
|
+
TopNavBar.CloseButton = CloseButton;
|
|
13729
|
+
TopNavBar.BackButton = BackButton;
|
|
13730
|
+
|
|
13652
13731
|
function getTypographyTypeConfig(type, theme) {
|
|
13653
13732
|
const {
|
|
13654
13733
|
configs
|
|
@@ -14237,6 +14316,7 @@ exports.TimePicker = TimePicker;
|
|
|
14237
14316
|
exports.ToastComponent = ToastComponent;
|
|
14238
14317
|
exports.Toggle = Toggle;
|
|
14239
14318
|
exports.Tooltip = Tooltip;
|
|
14319
|
+
exports.TopNavBar = TopNavBar;
|
|
14240
14320
|
exports.Typography = Typography;
|
|
14241
14321
|
exports.TypographyEmoji = TypographyEmoji;
|
|
14242
14322
|
exports.TypographyIcon = TypographyIcon;
|