@bitrise/bitkit 9.3.0-alpha.3 → 9.3.0-alpha.4
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/CHANGELOG.md +7 -0
- package/lib/cjs/Button2/Button2.d.ts +3 -2
- package/lib/cjs/Button2/Button2.d.ts.map +1 -1
- package/lib/cjs/Button2/Button2.js +3 -3
- package/lib/cjs/Button2/Button2.js.map +1 -1
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.d.ts +3 -2
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.d.ts.map +1 -1
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.js +6 -4
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.js.map +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esn/Button2/Button2.d.ts +3 -2
- package/lib/esn/Button2/Button2.d.ts.map +1 -1
- package/lib/esn/Button2/Button2.js +4 -4
- package/lib/esn/Button2/Button2.js.map +1 -1
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.d.ts +3 -2
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.d.ts.map +1 -1
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.js +7 -5
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.js.map +1 -1
- package/lib/esn/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/site/components/Documentation/Components/SectionButton2.tsx +5 -1
- package/site/components/Documentation/Components/SectionButtons.tsx +1 -2
- package/src/Button2/Button2.tsx +6 -5
- package/src/ButtonWithDropdown/ButtonWithDropdown.tsx +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [9.3.0-alpha.4](https://github.com/bitrise-io/bitkit/compare/v9.3.0-alpha.3...v9.3.0-alpha.4) (2022-03-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **button:** chakra poc ([bef4241](https://github.com/bitrise-io/bitkit/commit/bef42412e9e571154d49298f63adc9fa8e764172))
|
|
7
|
+
|
|
1
8
|
# [9.3.0-alpha.3](https://github.com/bitrise-io/bitkit/compare/v9.3.0-alpha.2...v9.3.0-alpha.3) (2022-03-09)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -3,12 +3,13 @@ import { ButtonProps } from '@chakra-ui/react';
|
|
|
3
3
|
interface Props extends Pick<ButtonProps, 'as' | 'disabled' | 'leftIcon' | 'rightIcon' | 'sx'> {
|
|
4
4
|
children: ButtonProps['children'];
|
|
5
5
|
href?: string;
|
|
6
|
-
onClick?: (e: React.MouseEvent<
|
|
6
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
7
|
+
ref?: any;
|
|
7
8
|
size?: 'small' | 'medium';
|
|
8
9
|
target?: '_blank' | '_parent' | '_self' | '_top';
|
|
9
10
|
type?: ButtonProps['type'];
|
|
10
11
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'dangerPrimary' | 'dangerSecondary';
|
|
11
12
|
}
|
|
12
|
-
declare const Button2: (
|
|
13
|
+
declare const Button2: import("@chakra-ui/react").ComponentWithAs<import("@chakra-ui/react").As<any>, Props>;
|
|
13
14
|
export default Button2;
|
|
14
15
|
//# sourceMappingURL=Button2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button2.d.ts","sourceRoot":"","sources":["../../../src/Button2/Button2.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA0B,WAAW,
|
|
1
|
+
{"version":3,"file":"Button2.d.ts","sourceRoot":"","sources":["../../../src/Button2/Button2.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA0B,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAEnF,UAAU,KAAM,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAE,IAAI,CAAC;IACzF,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACvE,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;IACjD,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,GAAG,iBAAiB,CAAC;CACtF;AAEH,QAAA,MAAM,OAAO,uFAOX,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -37,13 +37,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
/* eslint-disable object-shorthand */
|
|
38
38
|
var React = __importStar(require("react"));
|
|
39
39
|
var react_1 = require("@chakra-ui/react");
|
|
40
|
-
var Button2 = function (props) {
|
|
40
|
+
var Button2 = (0, react_1.forwardRef)(function (props, ref) {
|
|
41
41
|
var defaults = {
|
|
42
42
|
size: 'medium',
|
|
43
43
|
variant: 'primary',
|
|
44
44
|
};
|
|
45
45
|
var iconSpacing = props.size === 'medium' ? '10px' : '6px';
|
|
46
|
-
return React.createElement(react_1.Button, __assign({ iconSpacing: iconSpacing }, defaults, props));
|
|
47
|
-
};
|
|
46
|
+
return React.createElement(react_1.Button, __assign({ iconSpacing: iconSpacing, ref: ref }, defaults, props));
|
|
47
|
+
});
|
|
48
48
|
exports.default = Button2;
|
|
49
49
|
//# sourceMappingURL=Button2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button2.js","sourceRoot":"","sources":["../../../src/Button2/Button2.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAqC;AACrC,2CAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"Button2.js","sourceRoot":"","sources":["../../../src/Button2/Button2.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAqC;AACrC,2CAA+B;AAC/B,0CAAmF;AAanF,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,UAAC,KAAY,EAAE,GAAG;IAC3C,IAAM,QAAQ,GAAG;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,SAAS;KACnB,CAAC;IACF,IAAM,WAAW,GAAG,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7D,OAAO,oBAAC,cAAY,aAAC,WAAW,EAAG,WAAW,EAAG,GAAG,EAAG,GAAG,IAAQ,QAAQ,EAAQ,KAAK,EAAK,CAAC;AAC/F,CAAC,CAAC,CAAC;AAEH,kBAAe,OAAO,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DropdownMenuItemProps, PlacementProps } from '@bitrise/bitkit';
|
|
3
|
+
import { ButtonProps } from '@chakra-ui/react';
|
|
3
4
|
export interface ItemProps extends DropdownMenuItemProps {
|
|
4
5
|
component?: string;
|
|
5
6
|
disabled?: boolean;
|
|
@@ -9,7 +10,7 @@ export interface ItemProps extends DropdownMenuItemProps {
|
|
|
9
10
|
}
|
|
10
11
|
export interface Props {
|
|
11
12
|
buttonProps?: ButtonProps;
|
|
12
|
-
children?: React.
|
|
13
|
+
children?: React.ReactNode | undefined;
|
|
13
14
|
dropdownWidth?: string;
|
|
14
15
|
items: ItemProps[];
|
|
15
16
|
placementProps?: PlacementProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonWithDropdown.d.ts","sourceRoot":"","sources":["../../../src/ButtonWithDropdown/ButtonWithDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"ButtonWithDropdown.d.ts","sourceRoot":"","sources":["../../../src/ButtonWithDropdown/ButtonWithDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIH,qBAAqB,EAIrB,cAAc,EAEb,MAAM,iBAAiB,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,MAAM,WAAW,SAAU,SAAQ,qBAAqB;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,cAAc,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,QAAA,MAAM,kBAAkB,qEAMrB,KAAK,KAAG,WAwCV,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -42,11 +42,13 @@ var ButtonWithDropdown = function (_a) {
|
|
|
42
42
|
return (React.createElement(bitkit_1.PlacementManager, null,
|
|
43
43
|
React.createElement(bitkit_1.PlacementReference, null, function (_a) {
|
|
44
44
|
var ref = _a.ref;
|
|
45
|
-
return (
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
return (
|
|
46
|
+
/* @ts-ignore */
|
|
47
|
+
React.createElement(bitkit_1.Button2, __assign({ onClick: function () { return setVisible(!visible); }, ref: ref, rightIcon: React.createElement(bitkit_1.Icon, { name: "ChevronDown" }) }, buttonProps), children));
|
|
48
48
|
}),
|
|
49
|
-
!buttonProps.disabled && (React.createElement(bitkit_1.Placement, __assign({ disableMargin: "left-right",
|
|
49
|
+
!buttonProps.disabled && (React.createElement(bitkit_1.Placement, __assign({ disableMargin: "left-right",
|
|
50
|
+
// onClose={ () => setVisible(false) }
|
|
51
|
+
placement: "bottom-end", visible: visible }, placementProps), function () { return (React.createElement(bitkit_1.DropdownMenu, { width: dropdownWidth, withArrow: true }, items.map(function (_a) {
|
|
50
52
|
var component = _a.component, disabled = _a.disabled, href = _a.href, icon = _a.icon, onClick = _a.onClick, target = _a.target, text = _a.text;
|
|
51
53
|
return (React.createElement(bitkit_1.DropdownMenuItem, { Component: component || 'div', disabled: disabled, href: href, icon: icon, key: text, onClick: onClick, target: target }, text));
|
|
52
54
|
}))); }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonWithDropdown.js","sourceRoot":"","sources":["../../../src/ButtonWithDropdown/ButtonWithDropdown.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"ButtonWithDropdown.js","sourceRoot":"","sources":["../../../src/ButtonWithDropdown/ButtonWithDropdown.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,0CAU6B;AAmB7B,IAAM,kBAAkB,GAAG,UAAC,EAMpB;QALN,mBAAgB,EAAhB,WAAW,mBAAG,EAAE,KAAA,EAChB,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,KAAK,WAAA,EACL,cAAc,oBAAA;IAER,IAAA,KAAwB,KAAK,CAAC,QAAQ,CAAC,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