@bitrise/bitkit 9.17.0-alpha-chakra.3 → 9.17.0-alpha-badge.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "9.17.0-alpha-chakra.3",
4
+ "version": "9.17.0-alpha-badge.1",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -55,7 +55,7 @@
55
55
  "@babel/core": "^7.18.2",
56
56
  "@bitrise/eslint-plugin": "^2.1.0",
57
57
  "@chakra-ui/cli": "^1.9.0",
58
- "@chakra-ui/storybook-addon": "^1.0.3",
58
+ "@chakra-ui/storybook-addon": "^3.0.2",
59
59
  "@commitlint/cli": "^16.3.0",
60
60
  "@commitlint/config-conventional": "^16.2.4",
61
61
  "@google-cloud/storage": "^5.19.4",
@@ -0,0 +1,13 @@
1
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
2
+ import Badge from './Badge';
3
+
4
+ export default {
5
+ title: 'Components/Badge',
6
+ component: Badge,
7
+ } as ComponentMeta<typeof Badge>;
8
+
9
+ export const WithProps: ComponentStory<typeof Badge> = (props) => <Badge {...props} />;
10
+ WithProps.args = {
11
+ children: 'Coming soon',
12
+ ...Badge.defaultProps,
13
+ };
@@ -0,0 +1,15 @@
1
+ const BadgeTheme = {
2
+ baseStyle: {
3
+ display: 'inline-block',
4
+ paddingX: '8',
5
+ paddingY: '3',
6
+ fontSize: '1',
7
+ lineHeight: '1',
8
+ fontWeight: 'bold',
9
+ textTransform: 'uppercase',
10
+ borderRadius: '4',
11
+ cursor: 'default',
12
+ },
13
+ };
14
+
15
+ export default BadgeTheme;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { Badge as ChakraBadge, BadgeProps as ChakraBadgeProps } from '@chakra-ui/react';
3
+
4
+ export type BadgeProps = ChakraBadgeProps;
5
+
6
+ /**
7
+ * Badges are used to highlight an item's status for quick recognition.
8
+ */
9
+ const Badge = (props: BadgeProps) => {
10
+ return <ChakraBadge {...props} />;
11
+ };
12
+
13
+ Badge.defaultProps = {
14
+ color: 'neutral.100',
15
+ backgroundColor: 'purple.40',
16
+ } as BadgeProps;
17
+
18
+ export default Badge;
package/src/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from './old';
2
2
  export * from './types/chakra';
3
3
  export * from './utils/chakra';
4
- export * from './hooks';
5
4
 
6
5
  export type { LinkProps } from './Components/Link/Link';
7
6
  export { default as Link } from './Components/Link/Link';
@@ -38,18 +37,3 @@ export { default as Box } from './Components/Box/Box';
38
37
 
39
38
  export type { ColorButtonProps } from './Components/ColorButton/ColorButton';
40
39
  export { default as ColorButton } from './Components/ColorButton/ColorButton';
41
-
42
- export type { TabsProps } from './Components/Tabs/Tabs';
43
- export { default as Tabs } from './Components/Tabs/Tabs';
44
-
45
- export type { TabListProps } from './Components/Tabs/TabList';
46
- export { default as TabList } from './Components/Tabs/TabList';
47
-
48
- export type { TabProps } from './Components/Tabs/Tab';
49
- export { default as Tab } from './Components/Tabs/Tab';
50
-
51
- export type { TabPanelsProps } from './Components/Tabs/TabPanels';
52
- export { default as TabPanels } from './Components/Tabs/TabPanels';
53
-
54
- export type { TabPanelProps } from './Components/Tabs/TabPanel';
55
- export { default as TabPanel } from './Components/Tabs/TabPanel';
package/src/old.ts CHANGED
@@ -226,6 +226,12 @@ export { default as TableHeaderRow } from './Old/Table/TableHeaderRow';
226
226
  export type { Props as TableRowProps } from './Old/Table/TableRow';
227
227
  export { default as TableRow } from './Old/Table/TableRow';
228
228
 
229
+ export type { Props as TabProps } from './Old/Tabs/Tab';
230
+ export { default as Tab } from './Old/Tabs/Tab';
231
+
232
+ export type { Props as TabsProps } from './Old/Tabs/Tabs';
233
+ export { default as Tabs } from './Old/Tabs/Tabs';
234
+
229
235
  export type { Props as TextareaProps } from './Old/Textarea/Textarea';
230
236
  export { default as Textarea } from './Old/Textarea/Textarea';
231
237
 
package/src/theme.ts CHANGED
@@ -1,10 +1,10 @@
1
+ import Badge from './Components/Badge/Badge.theme';
1
2
  import Button from './Components/Button/Button.theme';
2
3
  import Card from './Components/Card/Card.theme';
3
4
  import ColorButton from './Components/ColorButton/ColorButton.theme';
4
5
  import Divider from './Components/Divider/Divider.theme';
5
6
  import Link from './Components/Link/Link.theme';
6
7
  import Menu from './Components/Menu/Menu.theme';
7
- import Tabs from './Components/Tabs/Tabs.theme';
8
8
  import Text from './Components/Text/Text.theme';
9
9
 
10
10
  import colors from './Foundations/Colors/Colors';
@@ -47,13 +47,13 @@ const theme = {
47
47
  },
48
48
  },
49
49
  components: {
50
+ Badge,
50
51
  Button,
51
52
  Card,
52
53
  ColorButton,
53
54
  Divider,
54
55
  Link,
55
56
  Menu,
56
- Tabs,
57
57
  Text,
58
58
  },
59
59
  };