@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
@@ -4028,7 +4028,7 @@ function useOnCloseModalBehaviour() {
4028
4028
  return onClose;
4029
4029
  }
4030
4030
 
4031
- function CloseButton({
4031
+ function CloseButton$1({
4032
4032
  children,
4033
4033
  onPress
4034
4034
  }) {
@@ -4063,7 +4063,7 @@ function ModalBehaviour({
4063
4063
  })
4064
4064
  });
4065
4065
  }
4066
- ModalBehaviour.CloseButton = CloseButton;
4066
+ ModalBehaviour.CloseButton = CloseButton$1;
4067
4067
 
4068
4068
  function Overlay({
4069
4069
  onPress
@@ -12676,6 +12676,85 @@ function Tooltip({
12676
12676
  Tooltip.Arrow = Arrow;
12677
12677
  Tooltip.Content = TooltipContent;
12678
12678
 
12679
+ function TopNavBar({
12680
+ left,
12681
+ right,
12682
+ title,
12683
+ titleAlign = 'center',
12684
+ stickers,
12685
+ mode = 'default',
12686
+ hasSeparator = true
12687
+ }) {
12688
+ const isLargeTitleMode = mode === 'largeTitle';
12689
+ return /*#__PURE__*/jsxRuntime.jsxs(VStack, {
12690
+ space: isLargeTitleMode ? 'kitt.2' : undefined,
12691
+ width: "100%",
12692
+ height: mode === 'default' ? 56 : undefined,
12693
+ justifyContent: "center",
12694
+ paddingX: "kitt.2",
12695
+ paddingTop: isLargeTitleMode ? 'kitt.2' : 'kitt.3',
12696
+ paddingBottom: "kitt.3",
12697
+ borderBottomWidth: hasSeparator && mode === 'default' ? 1 : 0,
12698
+ borderColor: "kitt.separator",
12699
+ children: [/*#__PURE__*/jsxRuntime.jsxs(HStack, {
12700
+ alignItems: "center",
12701
+ justifyContent: !title && !left ? 'flex-end' : 'space-between',
12702
+ children: [left ?? /*#__PURE__*/jsxRuntime.jsx(View, {
12703
+ width: "kitt.button.minWidth"
12704
+ }), mode === 'default' ? /*#__PURE__*/jsxRuntime.jsx(View, {
12705
+ flexGrow: "1",
12706
+ flexShrink: 1,
12707
+ paddingRight: "kitt.2",
12708
+ paddingLeft: "kitt.2",
12709
+ children: title ? /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
12710
+ textAlign: titleAlign,
12711
+ variant: "bold",
12712
+ ellipsizeMode: "tail",
12713
+ numberOfLines: 1,
12714
+ children: title
12715
+ }) : null
12716
+ }) : null, right ?? /*#__PURE__*/jsxRuntime.jsx(View, {
12717
+ width: "kitt.button.minWidth"
12718
+ })]
12719
+ }), mode === 'largeTitle' ? /*#__PURE__*/jsxRuntime.jsxs(VStack, {
12720
+ space: "kitt.4",
12721
+ paddingX: "kitt.2",
12722
+ children: [stickers ? /*#__PURE__*/jsxRuntime.jsx(HStack, {
12723
+ width: "100%",
12724
+ space: "kitt.1",
12725
+ flexShrink: 1,
12726
+ flexWrap: "wrap",
12727
+ style: {
12728
+ rowGap: theme.getSpacing(1)
12729
+ },
12730
+ children: stickers.map((sticker, index) =>
12731
+ /*#__PURE__*/
12732
+ // eslint-disable-next-line react/no-array-index-key
12733
+ jsxRuntime.jsx(View, {
12734
+ children: sticker
12735
+ }, index))
12736
+ }) : null, /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
12737
+ base: "heading-m",
12738
+ children: title
12739
+ })]
12740
+ }) : null]
12741
+ });
12742
+ }
12743
+ function CloseButton(props) {
12744
+ return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
12745
+ icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.XRegularIcon, {}),
12746
+ ...props
12747
+ });
12748
+ }
12749
+ function BackButton(props) {
12750
+ return /*#__PURE__*/jsxRuntime.jsx(IconButton, {
12751
+ icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.ArrowLeftRegularIcon, {}),
12752
+ ...props
12753
+ });
12754
+ }
12755
+ TopNavBar.CloseButton = CloseButton;
12756
+ TopNavBar.BackButton = BackButton;
12757
+
12679
12758
  function getTypographyTypeConfig(type, theme) {
12680
12759
  const {
12681
12760
  configs
@@ -13269,6 +13348,7 @@ exports.TimePicker = TimePicker;
13269
13348
  exports.ToastComponent = ToastComponent;
13270
13349
  exports.Toggle = Toggle;
13271
13350
  exports.Tooltip = Tooltip;
13351
+ exports.TopNavBar = TopNavBar;
13272
13352
  exports.Typography = Typography;
13273
13353
  exports.TypographyEmoji = TypographyEmoji;
13274
13354
  exports.TypographyIcon = TypographyIcon;