@bitrise/bitkit 11.2.3 → 11.3.1-alpha-chakra.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": "11.2.3",
4
+ "version": "11.3.1-alpha-chakra.1",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -61,7 +61,7 @@ const colors: ColorObj = {
61
61
  };
62
62
 
63
63
  const variants: VariantObj = {
64
- default: {
64
+ legacy: {
65
65
  borderRadius: '8',
66
66
  boxShadow: 'small',
67
67
  },
@@ -6,13 +6,13 @@ import {
6
6
  usePrefersReducedMotion,
7
7
  } from '@chakra-ui/react';
8
8
 
9
- export interface AccordionProps extends Omit<ChakraAccordionProps, 'onChange'> {
9
+ export interface LegacyAccordionProps extends Omit<ChakraAccordionProps, 'onChange'> {
10
10
  colorScheme?: 'white' | 'gray' | 'orange';
11
- variant?: 'default' | 'flat';
11
+ variant?: 'flat' | 'legacy';
12
12
  onChange?: (ids: string[], indexes: number[]) => void;
13
13
  }
14
14
 
15
- const getItemIds = (props: AccordionProps) => {
15
+ const getItemIds = (props: LegacyAccordionProps) => {
16
16
  const ids: string[] = [];
17
17
  const items = Children.toArray(props.children);
18
18
  items.forEach((item: any, index: number) => {
@@ -24,7 +24,7 @@ const getItemIds = (props: AccordionProps) => {
24
24
  /**
25
25
  * Accordions display a list of high-level options that can expand/collapse to reveal more information.
26
26
  */
27
- const Accordion = (props: AccordionProps) => {
27
+ const LegacyAccordion = (props: LegacyAccordionProps) => {
28
28
  const prefersReducedMotion = usePrefersReducedMotion({ ssr: false });
29
29
  const { children, colorScheme, variant, onChange, ...rest } = props;
30
30
  const itemIds = getItemIds(props);
@@ -54,8 +54,8 @@ const Accordion = (props: AccordionProps) => {
54
54
  );
55
55
  };
56
56
 
57
- Accordion.defaultProps = {
57
+ LegacyAccordion.defaultProps = {
58
58
  colorScheme: 'white',
59
- variant: 'default',
59
+ variant: 'legacy',
60
60
  };
61
- export default Accordion;
61
+ export default LegacyAccordion;
@@ -10,13 +10,13 @@ import {
10
10
  } from '@chakra-ui/react';
11
11
  import Text from '../Text/Text';
12
12
 
13
- export interface AccordionItemProps extends AccordionPanelProps {
13
+ export interface LegacyAccordionItemProps extends AccordionPanelProps {
14
14
  buttonContent: ReactNode;
15
15
  children?: ReactNode;
16
16
  id?: ChakraAccordionItemProps['id'];
17
17
  }
18
18
 
19
- const AccordionItem = (props: AccordionItemProps) => {
19
+ const LegacyAccordionItem = (props: LegacyAccordionItemProps) => {
20
20
  const { buttonContent, children, id, ...rest } = props;
21
21
  const styles = useAccordionStyles();
22
22
 
@@ -31,4 +31,4 @@ const AccordionItem = (props: AccordionItemProps) => {
31
31
  );
32
32
  };
33
33
 
34
- export default AccordionItem;
34
+ export default LegacyAccordionItem;
@@ -37,7 +37,6 @@ type TextTags =
37
37
  | 'var';
38
38
 
39
39
  export interface TextProps extends ChakraTextProps {
40
- align?: ResponsiveValue<'center' | 'justify' | 'left' | 'right'>;
41
40
  /**
42
41
  * Any valid HTML text tag
43
42
  */
@@ -45,13 +44,12 @@ export interface TextProps extends ChakraTextProps {
45
44
  /**
46
45
  * Font weight
47
46
  */
48
- fontWeight?: ResponsiveValue<'bold' | 'normal'>;
47
+ fontWeight?: ResponsiveValue<'bold' | 'demiBold' | 'normal'>;
48
+ hasEllipsis?: boolean;
49
49
  /**
50
50
  * Size config (https://www.figma.com/file/grik9mTaJ5DfhydhWhXdP5/Bitkit-Foundations?node-id=211%3A12)
51
51
  */
52
52
  size?: ResponsiveValue<TextSizes>;
53
- textTransform?: ResponsiveValue<'capitalize' | 'lowercase' | 'none' | 'uppercase'>;
54
- hasEllipsis?: boolean;
55
53
  }
56
54
 
57
55
  /**
@@ -15,6 +15,7 @@ const typography = {
15
15
  },
16
16
  fontWeights: {
17
17
  normal: 400,
18
+ demiBold: 600,
18
19
  bold: 700,
19
20
  },
20
21
  letterSpacings: {
@@ -24,51 +25,41 @@ const typography = {
24
25
  '4': '0.0375rem',
25
26
  '5': '0.05rem',
26
27
  },
27
- lineHeights: {
28
- '1': '1rem',
29
- '2': '1.25rem',
30
- '3': '1.5rem',
31
- '4': '1.75rem',
32
- '5': '2.25rem',
33
- '6': '2.5rem',
34
- '7': '3rem',
35
- '8': '3.75rem',
36
- },
37
28
  };
38
29
 
39
30
  export const textSizes = {
40
31
  sizes: {
41
32
  '1': {
42
33
  fontSize: '1',
43
- lineHeight: '1',
34
+ lineHeight: '1rem',
44
35
  },
45
36
  '2': {
46
37
  fontSize: '2',
47
- lineHeight: '2',
38
+ lineHeight: '1.25rem',
48
39
  },
49
40
  '3': {
50
41
  fontSize: '3',
51
- lineHeight: '3',
42
+ lineHeight: '1.5rem',
52
43
  },
53
44
  '4': {
54
45
  fontSize: '4',
55
- lineHeight: '4',
46
+ lineHeight: '1.75rem',
56
47
  },
57
48
  '5': {
58
49
  fontSize: '5',
59
- lineHeight: '5',
50
+ lineHeight: '2.25rem',
60
51
  },
61
52
  '6': {
62
53
  fontSize: '6',
63
- lineHeight: '6',
54
+ lineHeight: '2.5rem',
64
55
  },
65
56
  '7': {
66
57
  fontSize: '7',
67
- lineHeight: '7',
58
+ lineHeight: '3rem',
68
59
  },
69
60
  '8': {
70
61
  fontSize: '8',
71
- lineHeight: '8',
62
+ lineHeight: '3.75rem',
72
63
  },
73
64
  },
74
65
  };
package/src/index.ts CHANGED
@@ -159,11 +159,11 @@ export { default as Notification } from './Components/Notification/Notification'
159
159
 
160
160
  export { BREAKPOINTS } from './Foundations/Breakpoints/Breakpoints';
161
161
 
162
- export type { AccordionProps } from './Components/Accordion/Accordion';
163
- export { default as Accordion } from './Components/Accordion/Accordion';
162
+ export type { LegacyAccordionProps } from './Components/AccordionLegacy/LegacyAccordion';
163
+ export { default as LegacyAccordion } from './Components/AccordionLegacy/LegacyAccordion';
164
164
 
165
- export type { AccordionItemProps } from './Components/Accordion/AccordionItem';
166
- export { default as AccordionItem } from './Components/Accordion/AccordionItem';
165
+ export type { LegacyAccordionItemProps } from './Components/AccordionLegacy/LegacyAccordionItem';
166
+ export { default as LegacyAccordionItem } from './Components/AccordionLegacy/LegacyAccordionItem';
167
167
 
168
168
  export type { LightBoxProps } from './Components/LightBox/LightBox';
169
169
  export { default as LightBox } from './Components/LightBox/LightBox';
package/src/theme.ts CHANGED
@@ -1,4 +1,4 @@
1
- import Accordion from './Components/Accordion/Accordion.theme';
1
+ import Accordion from './Components/AccordionLegacy/Accordion.theme';
2
2
  import Avatar from './Components/Avatar/Avatar.theme';
3
3
  import Badge from './Components/Badge/Badge.theme';
4
4
  import Breadcrumb from './Components/Breadcrumb/Breadcrumb.theme';