@bitrise/bitkit 9.7.0 → 9.7.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/README.md CHANGED
@@ -44,7 +44,7 @@ Cleans up the build directories
44
44
 
45
45
  #### `$ yarn lint`
46
46
 
47
- Runs Javascript and CSS linting
47
+ Runs Javascript linting
48
48
 
49
49
  #### `$ yarn serve`
50
50
 
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.7.0",
4
+ "version": "9.7.1",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -40,7 +40,7 @@
40
40
  "@types/react-transition-group": "^4.4.4",
41
41
  "classnames": "^2.3.1",
42
42
  "clipboard": "^2.0.10",
43
- "framer-motion": "^6.3.1",
43
+ "framer-motion": "^6.3.2",
44
44
  "luxon": "^2.3.2",
45
45
  "react": "^17.0.2",
46
46
  "react-dom": "^17.0.2",
@@ -81,15 +81,15 @@
81
81
  "@types/luxon": "^2.3.1",
82
82
  "@types/prismjs": "^1.26.0",
83
83
  "@types/react": "17.0.44",
84
- "@types/react-dom": "^17.0.15",
84
+ "@types/react-dom": "^17.0.16",
85
85
  "@types/react-router": "^5.1.18",
86
86
  "@types/react-router-dom": "^5.3.3",
87
87
  "@types/react-transition-group": "^4.4.4",
88
88
  "@types/vfile-message": "^2.0.0",
89
- "@typescript-eslint/eslint-plugin": "^5.20.0",
90
- "@typescript-eslint/parser": "^5.20.0",
89
+ "@typescript-eslint/eslint-plugin": "^5.21.0",
90
+ "@typescript-eslint/parser": "^5.21.0",
91
91
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
92
- "axios": "^0.26.1",
92
+ "axios": "^0.27.1",
93
93
  "babel-eslint": "^10.0.1",
94
94
  "babel-loader": "^8.2.5",
95
95
  "babel-plugin-polyfill-corejs2": "^0.3.1",
@@ -33,10 +33,10 @@ export interface Props extends FlexProps {
33
33
 
34
34
  /** Standard Button component */
35
35
  const Button: React.FunctionComponent<Props> = (props: Props) => {
36
- const { borderless, fullWidth, level, size, variant, ...rest } = props;
36
+ const { borderless, className, fullWidth, level, size, variant, ...rest } = props;
37
37
 
38
38
  const gap = size === 'small' ? 'x1' : 'x2';
39
- const classes = classnames('Button', `Button--level-${level}`, `Button--size-${size}`, {
39
+ const classes = classnames(className, 'Button', `Button--level-${level}`, `Button--size-${size}`, {
40
40
  'Button--borderless': borderless,
41
41
  'Button--full-width': fullWidth,
42
42
  [`Button--variant-${variant}`]: variant,
@@ -30,6 +30,7 @@ export interface Props extends DropdownButtonProps {
30
30
  /** Selected value from the options */
31
31
  selected?: DropdownValue;
32
32
  maxHeight?: string;
33
+ menuClassName?: string;
33
34
  }
34
35
 
35
36
  /**
@@ -38,7 +39,7 @@ export interface Props extends DropdownButtonProps {
38
39
  * and custom should be done with Placement.
39
40
  */
40
41
  const Dropdown: React.FunctionComponent<Props> = (props: Props) => {
41
- const { children, options, onChange, selected, maxHeight, ...rest } = props;
42
+ const { children, options, onChange, selected, maxHeight, menuClassName, ...rest } = props;
42
43
  const [visible, setVisible] = useState(false);
43
44
 
44
45
  const handleChange = (value: DropdownValue) => {
@@ -73,7 +74,7 @@ const Dropdown: React.FunctionComponent<Props> = (props: Props) => {
73
74
 
74
75
  <Placement onClose={() => setVisible(false)} sameWidth visible={visible}>
75
76
  {() => (
76
- <DropdownMenu maxHeight={maxHeight} width="100%">
77
+ <DropdownMenu className={menuClassName} maxHeight={maxHeight} width="100%">
77
78
  {options.map((option) => (
78
79
  <React.Fragment key={option.text}>
79
80
  {'options' in option ? (
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import classNames from 'classnames';
2
3
  import { Props as BaseProps } from '../Base/Base';
3
4
  import Flex from '../Flex/Flex';
4
5
  import PlacementArea from '../Placement/PlacementArea';
@@ -15,11 +16,13 @@ export interface Props extends BaseProps {
15
16
  * Parent container for DropdownMenuItems
16
17
  */
17
18
  const DropdownMenu: React.FunctionComponent<Props> = (props: Props) => {
18
- const { children, maxHeight, width, ...rest } = props;
19
+ const { className, children, maxHeight, width, ...rest } = props;
20
+
21
+ const classes = classNames(className, 'DropdownMenu__content');
19
22
 
20
23
  return (
21
24
  <PlacementArea {...rest} direction="vertical" paddingVertical="x4">
22
- <Flex className="DropdownMenu__content" direction="vertical" maxHeight={maxHeight} width={width}>
25
+ <Flex className={classes} direction="vertical" maxHeight={maxHeight} width={width}>
23
26
  {children}
24
27
  </Flex>
25
28
  </PlacementArea>