@bitrise/bitkit 9.15.0-alpha-chakra.2 → 9.16.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/package.json +11 -12
- package/src/Components/Menu/Menu.theme.ts +3 -3
- package/src/Components/Text/Text.tsx +11 -5
- package/src/Foundations/Typography/Typography.ts +7 -0
- package/src/index.ts +7 -4
- package/src/old.ts +2 -13
- package/src/theme.ts +0 -2
- package/src/tsconfig.tsbuildinfo +1 -1
- package/src/Components/Dropdown/Dropdown.stories.tsx +0 -69
- package/src/Components/Dropdown/Dropdown.styles.ts +0 -82
- package/src/Components/Dropdown/Dropdown.tsx +0 -64
- package/src/Components/Select/Select.stories.tsx +0 -38
- package/src/Components/Select/Select.theme.ts +0 -51
- package/src/Components/Select/Select.tsx +0 -17
- package/src/Old/Button/ColorButton.css +0 -81
- package/src/Old/Button/ColorButton.test.tsx +0 -18
- package/src/Old/Button/ColorButton.tsx +0 -31
- package/src/Old/Button/__snapshots__/ColorButton.test.tsx.snap +0 -13
- package/src/Old/Progress/ProgressColorButton.tsx +0 -22
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.
|
|
4
|
+
"version": "9.16.0",
|
|
5
5
|
"repository": "git@github.com:bitrise-io/bitkit.git",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"license": "UNLICENSED",
|
|
@@ -38,11 +38,10 @@
|
|
|
38
38
|
"@juggle/resize-observer": "^3.3.1",
|
|
39
39
|
"@popperjs/core": "^2.11.5",
|
|
40
40
|
"@types/react-transition-group": "^4.4.4",
|
|
41
|
-
"chakra-react-select": "3.3.3",
|
|
42
41
|
"classnames": "^2.3.1",
|
|
43
42
|
"clipboard": "^2.0.11",
|
|
44
43
|
"framer-motion": "^6.3.3",
|
|
45
|
-
"luxon": "^2.
|
|
44
|
+
"luxon": "^2.3.2",
|
|
46
45
|
"react": "^17.0.2",
|
|
47
46
|
"react-dom": "^17.0.2",
|
|
48
47
|
"react-popper": "^2.3.0",
|
|
@@ -78,19 +77,19 @@
|
|
|
78
77
|
"@types/clipboard": "^2.0.1",
|
|
79
78
|
"@types/enzyme": "^3.10.12",
|
|
80
79
|
"@types/fscreen": "^1.0.1",
|
|
81
|
-
"@types/jest": "^27.5.
|
|
80
|
+
"@types/jest": "^27.5.0",
|
|
82
81
|
"@types/lodash.sample": "^4.2.7",
|
|
83
82
|
"@types/lodash.shuffle": "^4.2.7",
|
|
84
83
|
"@types/luxon": "^2.3.2",
|
|
85
84
|
"@types/prismjs": "^1.26.0",
|
|
86
|
-
"@types/react": "17.0.
|
|
87
|
-
"@types/react-dom": "^17.0.
|
|
85
|
+
"@types/react": "17.0.44",
|
|
86
|
+
"@types/react-dom": "^17.0.16",
|
|
88
87
|
"@types/react-router": "^5.1.18",
|
|
89
88
|
"@types/react-router-dom": "^5.3.3",
|
|
90
89
|
"@types/react-transition-group": "^4.4.4",
|
|
91
90
|
"@types/vfile-message": "^2.0.0",
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
93
|
-
"@typescript-eslint/parser": "^5.
|
|
91
|
+
"@typescript-eslint/eslint-plugin": "^5.22.0",
|
|
92
|
+
"@typescript-eslint/parser": "^5.22.0",
|
|
94
93
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
|
|
95
94
|
"axios": "^0.27.2",
|
|
96
95
|
"babel-eslint": "^10.0.1",
|
|
@@ -100,7 +99,7 @@
|
|
|
100
99
|
"concurrently": "^7.1.0",
|
|
101
100
|
"enzyme": "^3.11.0",
|
|
102
101
|
"enzyme-to-json": "^3.6.2",
|
|
103
|
-
"eslint": "^8.
|
|
102
|
+
"eslint": "^8.14.0",
|
|
104
103
|
"eslint-plugin-import": "^2.26.0",
|
|
105
104
|
"eslint-plugin-jest": "^26.1.5",
|
|
106
105
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
@@ -108,9 +107,9 @@
|
|
|
108
107
|
"eslint-plugin-react": "^7.29.4",
|
|
109
108
|
"eslint-plugin-react-hooks": "^4.5.0",
|
|
110
109
|
"eslint-plugin-storybook": "^0.5.11",
|
|
111
|
-
"eslint-plugin-testing-library": "^5.
|
|
110
|
+
"eslint-plugin-testing-library": "^5.3.1",
|
|
112
111
|
"fscreen": "^1.2.0",
|
|
113
|
-
"glob": "^8.0.
|
|
112
|
+
"glob": "^8.0.1",
|
|
114
113
|
"husky": "^7.0.4",
|
|
115
114
|
"identity-obj-proxy": "^3.0.0",
|
|
116
115
|
"jest": "^27.5.1",
|
|
@@ -132,7 +131,7 @@
|
|
|
132
131
|
"ts-node": "^10.7.0",
|
|
133
132
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
134
133
|
"typescript": "^4.6.4",
|
|
135
|
-
"webpack": "^5.72.
|
|
134
|
+
"webpack": "^5.72.0"
|
|
136
135
|
},
|
|
137
136
|
"files": [
|
|
138
137
|
"src",
|
|
@@ -3,7 +3,7 @@ import type { SystemStyleObject } from '@chakra-ui/theme-tools';
|
|
|
3
3
|
const MenuTheme: SystemStyleObject = {
|
|
4
4
|
baseStyle: {
|
|
5
5
|
list: {
|
|
6
|
-
|
|
6
|
+
backgroundColor: 'neutral.100',
|
|
7
7
|
border: '1px solid',
|
|
8
8
|
borderColor: 'neutral.93',
|
|
9
9
|
borderRadius: '4',
|
|
@@ -15,11 +15,11 @@ const MenuTheme: SystemStyleObject = {
|
|
|
15
15
|
padding: '12',
|
|
16
16
|
paddingRight: '16',
|
|
17
17
|
_focus: {
|
|
18
|
-
|
|
18
|
+
backgroundColor: 'neutral.93',
|
|
19
19
|
boxShadow: 'none',
|
|
20
20
|
},
|
|
21
21
|
_active: {
|
|
22
|
-
|
|
22
|
+
backgroundColor: 'neutral.90',
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
},
|
|
@@ -23,6 +23,7 @@ type TextTags =
|
|
|
23
23
|
| 'h6'
|
|
24
24
|
| 'kbd'
|
|
25
25
|
| 'li'
|
|
26
|
+
| 'label'
|
|
26
27
|
| 'mark'
|
|
27
28
|
| 'p'
|
|
28
29
|
| 'pre'
|
|
@@ -43,7 +44,6 @@ export interface TextProps extends ChakraTextProps {
|
|
|
43
44
|
*/
|
|
44
45
|
as?: TextTags;
|
|
45
46
|
className?: string;
|
|
46
|
-
color?: 'body' | 'secondary' | string;
|
|
47
47
|
/**
|
|
48
48
|
* Font weight
|
|
49
49
|
*/
|
|
@@ -53,22 +53,28 @@ export interface TextProps extends ChakraTextProps {
|
|
|
53
53
|
*/
|
|
54
54
|
size?: TextSizes;
|
|
55
55
|
textTransform?: 'capitalize' | 'lowercase' | 'none' | 'uppercase';
|
|
56
|
+
hasEllipsis?: boolean;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
/**
|
|
59
60
|
* `Text` component is the used to render text and paragraphs within an interface. It renders a `<p>` tag by default.
|
|
60
61
|
*/
|
|
61
62
|
const Text = forwardRef<TextProps, 'p'>((props, ref) => {
|
|
62
|
-
const {
|
|
63
|
-
const properties: ChakraTextProps = { ...
|
|
63
|
+
const { fontWeight, size, textTransform, hasEllipsis, ...rest } = props;
|
|
64
|
+
const properties: ChakraTextProps = { fontWeight, size, textTransform, ...rest };
|
|
64
65
|
if (size === '1' && (!textTransform || textTransform === 'none')) {
|
|
65
66
|
properties.textTransform = 'uppercase';
|
|
66
67
|
}
|
|
67
68
|
if (!fontWeight && (size === '5' || size === '6' || size === '7' || size === '8')) {
|
|
68
69
|
properties.fontWeight = 'bold';
|
|
69
70
|
}
|
|
70
|
-
if (
|
|
71
|
-
properties.
|
|
71
|
+
if (hasEllipsis) {
|
|
72
|
+
if (properties.maxWidth) {
|
|
73
|
+
properties.maxWidth = '100%';
|
|
74
|
+
properties.textOverflow = 'ellipsis';
|
|
75
|
+
properties.whiteSpace = 'nowrap';
|
|
76
|
+
properties.overflow = 'hidden';
|
|
77
|
+
}
|
|
72
78
|
}
|
|
73
79
|
return <ChakraText {...properties} ref={ref} />;
|
|
74
80
|
});
|
package/src/index.ts
CHANGED
|
@@ -29,8 +29,11 @@ export { default as Card } from './Components/Card/Card';
|
|
|
29
29
|
export type { CardContentProps } from './Components/Card/CardContent';
|
|
30
30
|
export { default as CardContent } from './Components/Card/CardContent';
|
|
31
31
|
|
|
32
|
-
export type {
|
|
33
|
-
export { default as
|
|
32
|
+
export type { TextProps } from './Components/Text/Text';
|
|
33
|
+
export { default as Text } from './Components/Text/Text';
|
|
34
34
|
|
|
35
|
-
export type {
|
|
36
|
-
export { default as
|
|
35
|
+
export type { BoxProps } from './Components/Box/Box';
|
|
36
|
+
export { default as Box } from './Components/Box/Box';
|
|
37
|
+
|
|
38
|
+
export type { ColorButtonProps } from './Components/ColorButton/ColorButton';
|
|
39
|
+
export { default as ColorButton } from './Components/ColorButton/ColorButton';
|
package/src/old.ts
CHANGED
|
@@ -52,16 +52,14 @@ export { default as Bounds } from './Old/Bounds/Bounds';
|
|
|
52
52
|
export type { Props as CheckboxProps } from './Old/Checkbox/Checkbox';
|
|
53
53
|
export { default as Checkbox } from './Old/Checkbox/Checkbox';
|
|
54
54
|
|
|
55
|
-
export type { Props as ColorButtonProps } from './Old/Button/ColorButton';
|
|
56
|
-
export { default as ColorButton } from './Old/Button/ColorButton';
|
|
57
|
-
|
|
58
55
|
export type { Props as DatePickerProps } from './Old/DatePicker/DatePicker';
|
|
59
56
|
export { default as DatePicker } from './Old/DatePicker/DatePicker';
|
|
60
57
|
|
|
61
58
|
export type { Props as DotProps } from './Old/Dot/Dot';
|
|
62
59
|
export { default as Dot } from './Old/Dot/Dot';
|
|
63
60
|
|
|
64
|
-
export type { Props as
|
|
61
|
+
export type { Props as DropdownProps } from './Old/Dropdown/Dropdown';
|
|
62
|
+
export { default as Dropdown } from './Old/Dropdown/Dropdown';
|
|
65
63
|
|
|
66
64
|
export type { Props as DropdownButtonProps } from './Old/Dropdown/DropdownButton';
|
|
67
65
|
export { default as DropdownButton } from './Old/Dropdown/DropdownButton';
|
|
@@ -167,9 +165,6 @@ export { default as ProgressBar } from './Old/Progress/ProgressBar';
|
|
|
167
165
|
export type { Props as ProgressBitbotProps } from './Old/Progress/ProgressBitbot';
|
|
168
166
|
export { default as ProgressBitbot } from './Old/Progress/ProgressBitbot';
|
|
169
167
|
|
|
170
|
-
export type { Props as ProgressColorButtonProps } from './Old/Progress/ProgressColorButton';
|
|
171
|
-
export { default as ProgressColorButton } from './Old/Progress/ProgressColorButton';
|
|
172
|
-
|
|
173
168
|
export type { Props as ProgressSpinnerProps } from './Old/Progress/ProgressSpinner';
|
|
174
169
|
export { default as ProgressSpinner } from './Old/Progress/ProgressSpinner';
|
|
175
170
|
|
|
@@ -237,12 +232,6 @@ export { default as Tab } from './Old/Tabs/Tab';
|
|
|
237
232
|
export type { Props as TabsProps } from './Old/Tabs/Tabs';
|
|
238
233
|
export { default as Tabs } from './Old/Tabs/Tabs';
|
|
239
234
|
|
|
240
|
-
export type { Props as TextProps } from './Old/Text/Text';
|
|
241
|
-
export type { TypeTextLetterSpacing } from './Old/Text/Text';
|
|
242
|
-
export type { TypeTextSize } from './Old/Text/Text';
|
|
243
|
-
export type { TypeTextWeight } from './Old/Text/Text';
|
|
244
|
-
export { default as Text } from './Old/Text/Text';
|
|
245
|
-
|
|
246
235
|
export type { Props as TextareaProps } from './Old/Textarea/Textarea';
|
|
247
236
|
export { default as Textarea } from './Old/Textarea/Textarea';
|
|
248
237
|
|
package/src/theme.ts
CHANGED
|
@@ -4,7 +4,6 @@ import ColorButton from './Components/ColorButton/ColorButton.theme';
|
|
|
4
4
|
import Divider from './Components/Divider/Divider.theme';
|
|
5
5
|
import Link from './Components/Link/Link.theme';
|
|
6
6
|
import Menu from './Components/Menu/Menu.theme';
|
|
7
|
-
import Select from './Components/Select/Select.theme';
|
|
8
7
|
import Text from './Components/Text/Text.theme';
|
|
9
8
|
|
|
10
9
|
import colors from './Foundations/Colors/Colors';
|
|
@@ -53,7 +52,6 @@ const theme = {
|
|
|
53
52
|
Divider,
|
|
54
53
|
Link,
|
|
55
54
|
Menu,
|
|
56
|
-
Select,
|
|
57
55
|
Text,
|
|
58
56
|
},
|
|
59
57
|
};
|