@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
@@ -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;