@bitrise/bitkit 9.4.1-alpha.1 → 9.5.0-alpha.3
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/.eslintrc.js +1 -1
- package/.husky/commit-msg +4 -0
- package/.nvmrc +1 -1
- package/.stylelintignore +0 -1
- package/CHANGELOG.md +11 -2
- package/bitrise.yml +32 -28
- package/jest.setup.js +1 -0
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.d.ts +6 -3
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.d.ts.map +1 -1
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.js +13 -6
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.js.map +1 -1
- package/lib/cjs/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/cjs/Dropdown/Dropdown.js +9 -8
- package/lib/cjs/Dropdown/Dropdown.js.map +1 -1
- package/lib/cjs/Placement/Placement.css +17 -35
- package/lib/cjs/Placement/Placement.d.ts +5 -8
- package/lib/cjs/Placement/Placement.d.ts.map +1 -1
- package/lib/cjs/Placement/Placement.js.map +1 -1
- package/lib/cjs/Placement/PlacementPopper.d.ts +3 -4
- package/lib/cjs/Placement/PlacementPopper.d.ts.map +1 -1
- package/lib/cjs/Placement/PlacementPopper.js +32 -17
- package/lib/cjs/Placement/PlacementPopper.js.map +1 -1
- package/lib/cjs/Tooltip/Tooltip.d.ts +1 -1
- package/lib/cjs/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/cjs/hooks/useEventListener.d.ts.map +1 -1
- package/lib/cjs/hooks/useEventListener.js +0 -1
- package/lib/cjs/hooks/useEventListener.js.map +1 -1
- package/lib/cjs/index.d.ts +0 -9
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +1 -20
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.d.ts +6 -3
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.d.ts.map +1 -1
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.js +10 -3
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.js.map +1 -1
- package/lib/esn/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/esn/Dropdown/Dropdown.js +9 -5
- package/lib/esn/Dropdown/Dropdown.js.map +1 -1
- package/lib/esn/Placement/Placement.css +17 -35
- package/lib/esn/Placement/Placement.d.ts +5 -8
- package/lib/esn/Placement/Placement.d.ts.map +1 -1
- package/lib/esn/Placement/Placement.js.map +1 -1
- package/lib/esn/Placement/PlacementPopper.d.ts +3 -4
- package/lib/esn/Placement/PlacementPopper.d.ts.map +1 -1
- package/lib/esn/Placement/PlacementPopper.js +44 -29
- package/lib/esn/Placement/PlacementPopper.js.map +1 -1
- package/lib/esn/Tooltip/Tooltip.d.ts +1 -1
- package/lib/esn/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/esn/hooks/useEventListener.d.ts.map +1 -1
- package/lib/esn/hooks/useEventListener.js +0 -1
- package/lib/esn/hooks/useEventListener.js.map +1 -1
- package/lib/esn/index.d.ts +0 -9
- package/lib/esn/index.d.ts.map +1 -1
- package/lib/esn/index.js +0 -9
- package/lib/esn/index.js.map +1 -1
- package/lib/esn/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -41
- package/postcss.config.js +9 -5
- package/site/components/Documentation/Components/SectionButtons.tsx +8 -4
- package/site/components/Documentation/Components/SectionDropdowns.tsx +1 -1
- package/site/components/Documentation/Components/SectionPlacement.tsx +7 -1
- package/src/ButtonWithDropdown/ButtonWithDropdown.tsx +22 -21
- package/src/Dropdown/Dropdown.tsx +16 -8
- package/src/Placement/Placement.css +17 -35
- package/src/Placement/Placement.tsx +5 -8
- package/src/Placement/PlacementPopper.tsx +64 -48
- package/src/Tooltip/Tooltip.tsx +1 -1
- package/src/hooks/useEventListener.ts +25 -5
- package/src/index.ts +0 -10
- package/tsconfig.json +2 -5
- package/.storybook/main.js +0 -35
- package/.storybook/preview.js +0 -20
- package/lib/cjs/chakra/BitkitProvider.d.ts +0 -5
- package/lib/cjs/chakra/BitkitProvider.d.ts.map +0 -1
- package/lib/cjs/chakra/BitkitProvider.js +0 -14
- package/lib/cjs/chakra/BitkitProvider.js.map +0 -1
- package/lib/cjs/chakra/components/Button/Button.d.ts +0 -22
- package/lib/cjs/chakra/components/Button/Button.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Button/Button.js +0 -61
- package/lib/cjs/chakra/components/Button/Button.js.map +0 -1
- package/lib/cjs/chakra/components/Button/Button.stories.d.ts +0 -6
- package/lib/cjs/chakra/components/Button/Button.stories.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Button/Button.stories.js +0 -37
- package/lib/cjs/chakra/components/Button/Button.stories.js.map +0 -1
- package/lib/cjs/chakra/components/Button/Button.theme.d.ts +0 -117
- package/lib/cjs/chakra/components/Button/Button.theme.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Button/Button.theme.js +0 -119
- package/lib/cjs/chakra/components/Button/Button.theme.js.map +0 -1
- package/lib/cjs/chakra/components/IconButton/IconButton.d.ts +0 -14
- package/lib/cjs/chakra/components/IconButton/IconButton.d.ts.map +0 -1
- package/lib/cjs/chakra/components/IconButton/IconButton.js +0 -41
- package/lib/cjs/chakra/components/IconButton/IconButton.js.map +0 -1
- package/lib/cjs/chakra/components/IconButton/IconButton.stories.d.ts +0 -6
- package/lib/cjs/chakra/components/IconButton/IconButton.stories.d.ts.map +0 -1
- package/lib/cjs/chakra/components/IconButton/IconButton.stories.js +0 -48
- package/lib/cjs/chakra/components/IconButton/IconButton.stories.js.map +0 -1
- package/lib/cjs/chakra/components/Link/Link.d.ts +0 -16
- package/lib/cjs/chakra/components/Link/Link.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Link/Link.js +0 -44
- package/lib/cjs/chakra/components/Link/Link.js.map +0 -1
- package/lib/cjs/chakra/components/Link/Link.stories.d.ts +0 -12
- package/lib/cjs/chakra/components/Link/Link.stories.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Link/Link.stories.js +0 -42
- package/lib/cjs/chakra/components/Link/Link.stories.js.map +0 -1
- package/lib/cjs/chakra/components/Menu/Menu.d.ts +0 -6
- package/lib/cjs/chakra/components/Menu/Menu.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Menu/Menu.js +0 -21
- package/lib/cjs/chakra/components/Menu/Menu.js.map +0 -1
- package/lib/cjs/chakra/components/Menu/Menu.stories.d.ts +0 -9
- package/lib/cjs/chakra/components/Menu/Menu.stories.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Menu/Menu.stories.js +0 -48
- package/lib/cjs/chakra/components/Menu/Menu.stories.js.map +0 -1
- package/lib/cjs/chakra/components/Menu/Menu.theme.d.ts +0 -4
- package/lib/cjs/chakra/components/Menu/Menu.theme.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Menu/Menu.theme.js +0 -23
- package/lib/cjs/chakra/components/Menu/Menu.theme.js.map +0 -1
- package/lib/cjs/chakra/components/Menu/MenuItem.d.ts +0 -10
- package/lib/cjs/chakra/components/Menu/MenuItem.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Menu/MenuItem.js +0 -39
- package/lib/cjs/chakra/components/Menu/MenuItem.js.map +0 -1
- package/lib/cjs/chakra/components/StatusTag/StatusTag.d.ts +0 -16
- package/lib/cjs/chakra/components/StatusTag/StatusTag.d.ts.map +0 -1
- package/lib/cjs/chakra/components/StatusTag/StatusTag.js +0 -36
- package/lib/cjs/chakra/components/StatusTag/StatusTag.js.map +0 -1
- package/lib/cjs/chakra/components/StatusTag/StatusTag.stories.d.ts +0 -13
- package/lib/cjs/chakra/components/StatusTag/StatusTag.stories.d.ts.map +0 -1
- package/lib/cjs/chakra/components/StatusTag/StatusTag.stories.js +0 -44
- package/lib/cjs/chakra/components/StatusTag/StatusTag.stories.js.map +0 -1
- package/lib/cjs/chakra/components/StatusTag/StatusTag.theme.d.ts +0 -45
- package/lib/cjs/chakra/components/StatusTag/StatusTag.theme.d.ts.map +0 -1
- package/lib/cjs/chakra/components/StatusTag/StatusTag.theme.js +0 -47
- package/lib/cjs/chakra/components/StatusTag/StatusTag.theme.js.map +0 -1
- package/lib/cjs/chakra/components/Text/Text.d.ts +0 -32
- package/lib/cjs/chakra/components/Text/Text.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Text/Text.js +0 -38
- package/lib/cjs/chakra/components/Text/Text.js.map +0 -1
- package/lib/cjs/chakra/components/Text/Text.stories.d.ts +0 -12
- package/lib/cjs/chakra/components/Text/Text.stories.d.ts.map +0 -1
- package/lib/cjs/chakra/components/Text/Text.stories.js +0 -42
- package/lib/cjs/chakra/components/Text/Text.stories.js.map +0 -1
- package/lib/cjs/chakra/shared.d.ts +0 -2
- package/lib/cjs/chakra/shared.d.ts.map +0 -1
- package/lib/cjs/chakra/shared.js +0 -15
- package/lib/cjs/chakra/shared.js.map +0 -1
- package/lib/cjs/chakra/theme/theme.d.ts +0 -3
- package/lib/cjs/chakra/theme/theme.d.ts.map +0 -1
- package/lib/cjs/chakra/theme/theme.js +0 -54
- package/lib/cjs/chakra/theme/theme.js.map +0 -1
- package/lib/cjs/chakra/theme/typographyConfig.d.ts +0 -4
- package/lib/cjs/chakra/theme/typographyConfig.d.ts.map +0 -1
- package/lib/cjs/chakra/theme/typographyConfig.js +0 -38
- package/lib/cjs/chakra/theme/typographyConfig.js.map +0 -1
- package/lib/esn/chakra/BitkitProvider.d.ts +0 -5
- package/lib/esn/chakra/BitkitProvider.d.ts.map +0 -1
- package/lib/esn/chakra/BitkitProvider.js +0 -8
- package/lib/esn/chakra/BitkitProvider.js.map +0 -1
- package/lib/esn/chakra/components/Button/Button.d.ts +0 -22
- package/lib/esn/chakra/components/Button/Button.d.ts.map +0 -1
- package/lib/esn/chakra/components/Button/Button.js +0 -34
- package/lib/esn/chakra/components/Button/Button.js.map +0 -1
- package/lib/esn/chakra/components/Button/Button.stories.d.ts +0 -6
- package/lib/esn/chakra/components/Button/Button.stories.d.ts.map +0 -1
- package/lib/esn/chakra/components/Button/Button.stories.js +0 -29
- package/lib/esn/chakra/components/Button/Button.stories.js.map +0 -1
- package/lib/esn/chakra/components/Button/Button.theme.d.ts +0 -117
- package/lib/esn/chakra/components/Button/Button.theme.d.ts.map +0 -1
- package/lib/esn/chakra/components/Button/Button.theme.js +0 -117
- package/lib/esn/chakra/components/Button/Button.theme.js.map +0 -1
- package/lib/esn/chakra/components/IconButton/IconButton.d.ts +0 -14
- package/lib/esn/chakra/components/IconButton/IconButton.d.ts.map +0 -1
- package/lib/esn/chakra/components/IconButton/IconButton.js +0 -18
- package/lib/esn/chakra/components/IconButton/IconButton.js.map +0 -1
- package/lib/esn/chakra/components/IconButton/IconButton.stories.d.ts +0 -6
- package/lib/esn/chakra/components/IconButton/IconButton.stories.d.ts.map +0 -1
- package/lib/esn/chakra/components/IconButton/IconButton.stories.js +0 -21
- package/lib/esn/chakra/components/IconButton/IconButton.stories.js.map +0 -1
- package/lib/esn/chakra/components/Link/Link.d.ts +0 -16
- package/lib/esn/chakra/components/Link/Link.d.ts.map +0 -1
- package/lib/esn/chakra/components/Link/Link.js +0 -17
- package/lib/esn/chakra/components/Link/Link.js.map +0 -1
- package/lib/esn/chakra/components/Link/Link.stories.d.ts +0 -12
- package/lib/esn/chakra/components/Link/Link.stories.d.ts.map +0 -1
- package/lib/esn/chakra/components/Link/Link.stories.js +0 -16
- package/lib/esn/chakra/components/Link/Link.stories.js.map +0 -1
- package/lib/esn/chakra/components/Menu/Menu.d.ts +0 -6
- package/lib/esn/chakra/components/Menu/Menu.d.ts.map +0 -1
- package/lib/esn/chakra/components/Menu/Menu.js +0 -5
- package/lib/esn/chakra/components/Menu/Menu.js.map +0 -1
- package/lib/esn/chakra/components/Menu/Menu.stories.d.ts +0 -9
- package/lib/esn/chakra/components/Menu/Menu.stories.d.ts.map +0 -1
- package/lib/esn/chakra/components/Menu/Menu.stories.js +0 -39
- package/lib/esn/chakra/components/Menu/Menu.stories.js.map +0 -1
- package/lib/esn/chakra/components/Menu/Menu.theme.d.ts +0 -4
- package/lib/esn/chakra/components/Menu/Menu.theme.d.ts.map +0 -1
- package/lib/esn/chakra/components/Menu/Menu.theme.js +0 -21
- package/lib/esn/chakra/components/Menu/Menu.theme.js.map +0 -1
- package/lib/esn/chakra/components/Menu/MenuItem.d.ts +0 -10
- package/lib/esn/chakra/components/Menu/MenuItem.d.ts.map +0 -1
- package/lib/esn/chakra/components/Menu/MenuItem.js +0 -12
- package/lib/esn/chakra/components/Menu/MenuItem.js.map +0 -1
- package/lib/esn/chakra/components/StatusTag/StatusTag.d.ts +0 -16
- package/lib/esn/chakra/components/StatusTag/StatusTag.d.ts.map +0 -1
- package/lib/esn/chakra/components/StatusTag/StatusTag.js +0 -30
- package/lib/esn/chakra/components/StatusTag/StatusTag.js.map +0 -1
- package/lib/esn/chakra/components/StatusTag/StatusTag.stories.d.ts +0 -13
- package/lib/esn/chakra/components/StatusTag/StatusTag.stories.d.ts.map +0 -1
- package/lib/esn/chakra/components/StatusTag/StatusTag.stories.js +0 -16
- package/lib/esn/chakra/components/StatusTag/StatusTag.stories.js.map +0 -1
- package/lib/esn/chakra/components/StatusTag/StatusTag.theme.d.ts +0 -45
- package/lib/esn/chakra/components/StatusTag/StatusTag.theme.d.ts.map +0 -1
- package/lib/esn/chakra/components/StatusTag/StatusTag.theme.js +0 -45
- package/lib/esn/chakra/components/StatusTag/StatusTag.theme.js.map +0 -1
- package/lib/esn/chakra/components/Text/Text.d.ts +0 -32
- package/lib/esn/chakra/components/Text/Text.d.ts.map +0 -1
- package/lib/esn/chakra/components/Text/Text.js +0 -22
- package/lib/esn/chakra/components/Text/Text.js.map +0 -1
- package/lib/esn/chakra/components/Text/Text.stories.d.ts +0 -12
- package/lib/esn/chakra/components/Text/Text.stories.d.ts.map +0 -1
- package/lib/esn/chakra/components/Text/Text.stories.js +0 -19
- package/lib/esn/chakra/components/Text/Text.stories.js.map +0 -1
- package/lib/esn/chakra/shared.d.ts +0 -2
- package/lib/esn/chakra/shared.d.ts.map +0 -1
- package/lib/esn/chakra/shared.js +0 -11
- package/lib/esn/chakra/shared.js.map +0 -1
- package/lib/esn/chakra/theme/theme.d.ts +0 -3
- package/lib/esn/chakra/theme/theme.d.ts.map +0 -1
- package/lib/esn/chakra/theme/theme.js +0 -49
- package/lib/esn/chakra/theme/theme.js.map +0 -1
- package/lib/esn/chakra/theme/typographyConfig.d.ts +0 -4
- package/lib/esn/chakra/theme/typographyConfig.d.ts.map +0 -1
- package/lib/esn/chakra/theme/typographyConfig.js +0 -36
- package/lib/esn/chakra/theme/typographyConfig.js.map +0 -1
- package/src/chakra/BitkitProvider.tsx +0 -9
- package/src/chakra/components/Button/Button.stories.tsx +0 -32
- package/src/chakra/components/Button/Button.theme.ts +0 -117
- package/src/chakra/components/Button/Button.tsx +0 -52
- package/src/chakra/components/IconButton/IconButton.stories.tsx +0 -24
- package/src/chakra/components/IconButton/IconButton.tsx +0 -29
- package/src/chakra/components/Link/Link.stories.tsx +0 -19
- package/src/chakra/components/Link/Link.tsx +0 -30
- package/src/chakra/components/Menu/Menu.stories.tsx +0 -57
- package/src/chakra/components/Menu/Menu.theme.ts +0 -23
- package/src/chakra/components/Menu/Menu.tsx +0 -8
- package/src/chakra/components/Menu/MenuItem.tsx +0 -19
- package/src/chakra/components/StatusTag/StatusTag.stories.tsx +0 -19
- package/src/chakra/components/StatusTag/StatusTag.theme.ts +0 -45
- package/src/chakra/components/StatusTag/StatusTag.tsx +0 -55
- package/src/chakra/components/Text/Text.stories.tsx +0 -22
- package/src/chakra/components/Text/Text.tsx +0 -73
- package/src/chakra/shared.ts +0 -11
- package/src/chakra/theme/theme.ts +0 -50
- package/src/chakra/theme/typographyConfig.ts +0 -38
|
@@ -4,10 +4,30 @@ type HTMLElementOrDocumentOrWindow = HTMLElement | Document | Window;
|
|
|
4
4
|
interface HTMLElementOrDocumentOrWindowEventMap extends HTMLElementEventMap, DocumentEventMap, WindowEventMap {}
|
|
5
5
|
|
|
6
6
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
7
|
-
function useEventListener<E extends Window, K extends keyof WindowEventMap>(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
function useEventListener<E extends Window, K extends keyof WindowEventMap>(
|
|
8
|
+
el: E | null | undefined,
|
|
9
|
+
type: K,
|
|
10
|
+
handler: (evnt: WindowEventMap[K]) => void,
|
|
11
|
+
watch?: any[],
|
|
12
|
+
): void;
|
|
13
|
+
function useEventListener<E extends Document, K extends keyof DocumentEventMap>(
|
|
14
|
+
el: E | null | undefined,
|
|
15
|
+
type: K,
|
|
16
|
+
handler: (evt: DocumentEventMap[K]) => void,
|
|
17
|
+
watch?: any[],
|
|
18
|
+
): void;
|
|
19
|
+
function useEventListener<E extends HTMLElement, K extends keyof HTMLElementEventMap>(
|
|
20
|
+
el: E | null | undefined,
|
|
21
|
+
type: K,
|
|
22
|
+
handler: (evt: HTMLElementEventMap[K]) => void,
|
|
23
|
+
watch?: any[],
|
|
24
|
+
): void;
|
|
25
|
+
function useEventListener<K extends keyof HTMLElementOrDocumentOrWindowEventMap>(
|
|
26
|
+
el: HTMLElementOrDocumentOrWindow,
|
|
27
|
+
type: string,
|
|
28
|
+
handler: (evt: HTMLElementOrDocumentOrWindowEventMap[K]) => void,
|
|
29
|
+
watch?: any[],
|
|
30
|
+
): void;
|
|
11
31
|
function useEventListener(el: any, type: string, handler: any, watch?: any[]) {
|
|
12
32
|
useEffect(() => {
|
|
13
33
|
if (el) {
|
|
@@ -20,6 +40,6 @@ function useEventListener(el: any, type: string, handler: any, watch?: any[]) {
|
|
|
20
40
|
}
|
|
21
41
|
};
|
|
22
42
|
}, watch || []);
|
|
23
|
-
}
|
|
43
|
+
}
|
|
24
44
|
|
|
25
45
|
export default useEventListener;
|
package/src/index.ts
CHANGED
|
@@ -106,13 +106,3 @@ export { default as Toggle, Props as ToggleProps } from './Toggle/Toggle';
|
|
|
106
106
|
export { default as Tooltip, Props as TooltipProps } from './Tooltip/Tooltip';
|
|
107
107
|
export { default as Visibility, Props as VisibilityProps } from './Visibility/Visibility';
|
|
108
108
|
export { default as VisibilityContainer, Props as VisibilityContainerProps } from './Visibility/VisibilityContainer';
|
|
109
|
-
|
|
110
|
-
export { default as BitkitProvider } from './chakra/BitkitProvider';
|
|
111
|
-
export { default as BitkitTheme } from './chakra/theme/theme';
|
|
112
|
-
export { default as NewButton, Props as NewButtonProps } from './chakra/components/Button/Button';
|
|
113
|
-
export { default as NewIconButton, Props as NewIconButtonProps } from './chakra/components/IconButton/IconButton';
|
|
114
|
-
export { default as NewLink, Props as NewLinkProps } from './chakra/components/Link/Link';
|
|
115
|
-
export { default as Menu, Props as MenuProps } from './chakra/components/Menu/Menu';
|
|
116
|
-
export { default as MenuItem, Props as MenuItemProps } from './chakra/components/Menu/MenuItem';
|
|
117
|
-
export { default as StatusTag, Props as StatusTagProps } from './chakra/components/StatusTag/StatusTag';
|
|
118
|
-
export { default as NewText, Props as NewTextProps } from './chakra/components/Text/Text';
|
package/tsconfig.json
CHANGED
|
@@ -12,14 +12,11 @@
|
|
|
12
12
|
"moduleResolution": "node",
|
|
13
13
|
"paths": {
|
|
14
14
|
"*": ["@types/*"],
|
|
15
|
-
"@": ["src"]
|
|
16
|
-
"@bitrise/bitkit": ["src"],
|
|
15
|
+
"@bitrise/bitkit": ["src"]
|
|
17
16
|
},
|
|
18
17
|
"resolveJsonModule": true,
|
|
19
18
|
"sourceMap": true,
|
|
20
19
|
"strict": true,
|
|
21
|
-
"target": "es5"
|
|
22
|
-
// https://github.com/chakra-ui/chakra-ui/issues/2955 :(
|
|
23
|
-
"skipLibCheck": true,
|
|
20
|
+
"target": "es5"
|
|
24
21
|
}
|
|
25
22
|
}
|
package/.storybook/main.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
core: {
|
|
5
|
-
builder: 'webpack5',
|
|
6
|
-
},
|
|
7
|
-
stories: [
|
|
8
|
-
"../src/**/*.stories.mdx",
|
|
9
|
-
"../src/**/*.stories.@(js|jsx|ts|tsx)"
|
|
10
|
-
],
|
|
11
|
-
addons: [
|
|
12
|
-
"@storybook/addon-links",
|
|
13
|
-
"@storybook/addon-essentials",
|
|
14
|
-
"@storybook/addon-interactions"
|
|
15
|
-
],
|
|
16
|
-
framework: "@storybook/react",
|
|
17
|
-
features: { emotionAlias: false },
|
|
18
|
-
refs: {
|
|
19
|
-
'@chakra-ui/react': { disable: true }
|
|
20
|
-
},
|
|
21
|
-
webpackFinal: async (config) => {
|
|
22
|
-
config.module.rules.push({
|
|
23
|
-
test: /\.mjs$/,
|
|
24
|
-
include: /node_modules/,
|
|
25
|
-
type: 'javascript/auto',
|
|
26
|
-
});
|
|
27
|
-
config.resolve.plugins = [
|
|
28
|
-
...(config.resolve.plugins || []),
|
|
29
|
-
new TsconfigPathsPlugin({
|
|
30
|
-
extensions: config.resolve.extensions,
|
|
31
|
-
}),
|
|
32
|
-
];
|
|
33
|
-
return config;
|
|
34
|
-
},
|
|
35
|
-
};
|
package/.storybook/preview.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import BitkitProvider from '../src/chakra/BitkitProvider';
|
|
2
|
-
import '../site/index.css'
|
|
3
|
-
|
|
4
|
-
export const decorators = [
|
|
5
|
-
(Story) => (
|
|
6
|
-
<BitkitProvider>
|
|
7
|
-
<Story />
|
|
8
|
-
</BitkitProvider>
|
|
9
|
-
),
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
export const parameters = {
|
|
13
|
-
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
14
|
-
controls: {
|
|
15
|
-
matchers: {
|
|
16
|
-
color: /(background|color)$/i,
|
|
17
|
-
date: /Date$/,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitProvider.d.ts","sourceRoot":"","sources":["../../../src/chakra/BitkitProvider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvE,QAAA,MAAM,cAAc,iBAAkB,mBAAmB,gBAExD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var react_2 = require("@chakra-ui/react");
|
|
8
|
-
var theme_1 = __importDefault(require("./theme/theme"));
|
|
9
|
-
var BitkitProvider = function (_a) {
|
|
10
|
-
var children = _a.children;
|
|
11
|
-
return react_1.default.createElement(react_2.ChakraProvider, { theme: theme_1.default }, children);
|
|
12
|
-
};
|
|
13
|
-
exports.default = BitkitProvider;
|
|
14
|
-
//# sourceMappingURL=BitkitProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitProvider.js","sourceRoot":"","sources":["../../../src/chakra/BitkitProvider.tsx"],"names":[],"mappings":";;;;;AAAA,gDAA0B;AAC1B,0CAAuE;AACvE,wDAAkC;AAElC,IAAM,cAAc,GAAG,UAAC,EAAiC;QAA/B,QAAQ,cAAA;IAChC,OAAO,8BAAC,sBAAc,IAAC,KAAK,EAAE,eAAK,IAAG,QAAQ,CAAkB,CAAC;AACnE,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ButtonProps } from '@chakra-ui/react';
|
|
3
|
-
import { TypeIconName } from '@bitrise/bitkit';
|
|
4
|
-
export interface Props {
|
|
5
|
-
as?: 'a' | 'button';
|
|
6
|
-
children: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
href?: string;
|
|
9
|
-
isDisabled?: boolean;
|
|
10
|
-
leftIconName?: TypeIconName;
|
|
11
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
12
|
-
ref?: ButtonProps['itemRef'];
|
|
13
|
-
rightIconName?: TypeIconName;
|
|
14
|
-
size?: 'small' | 'medium';
|
|
15
|
-
sx?: ButtonProps['sx'];
|
|
16
|
-
target?: '_blank' | '_parent' | '_self' | '_top';
|
|
17
|
-
type?: ButtonProps['type'];
|
|
18
|
-
variant?: 'primary' | 'secondary' | 'tertiary' | 'dangerPrimary' | 'dangerSecondary';
|
|
19
|
-
}
|
|
20
|
-
declare const Button: React.ForwardRefExoticComponent<Pick<Props, "size" | "className" | "children" | "onClick" | "href" | "variant" | "target" | "type" | "as" | "sx" | "isDisabled" | "leftIconName" | "rightIconName"> & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
-
export default Button;
|
|
22
|
-
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA0B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAQ,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,KAAK;IACpB,EAAE,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACvE,GAAG,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,EAAE,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IACvB,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;AAED,QAAA,MAAM,MAAM,+OAqBV,CAAC;AAQH,eAAe,MAAM,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
29
|
-
var react_1 = __importDefault(require("react"));
|
|
30
|
-
var react_2 = require("@chakra-ui/react");
|
|
31
|
-
var bitkit_1 = require("@bitrise/bitkit");
|
|
32
|
-
var Button = react_1.default.forwardRef(function (props, ref) {
|
|
33
|
-
var as = props.as, leftIconName = props.leftIconName, rightIconName = props.rightIconName, size = props.size, rest = __rest(props, ["as", "leftIconName", "rightIconName", "size"]);
|
|
34
|
-
var properties = __assign({ as: as, size: size }, rest);
|
|
35
|
-
if (leftIconName) {
|
|
36
|
-
properties.leftIcon = react_1.default.createElement(bitkit_1.Icon, { name: leftIconName });
|
|
37
|
-
}
|
|
38
|
-
if (rightIconName) {
|
|
39
|
-
properties.rightIcon = react_1.default.createElement(bitkit_1.Icon, { name: rightIconName });
|
|
40
|
-
}
|
|
41
|
-
if (leftIconName || rightIconName) {
|
|
42
|
-
properties.iconSpacing = size === 'medium' ? '10px' : '6px';
|
|
43
|
-
}
|
|
44
|
-
if (as === 'a') {
|
|
45
|
-
delete properties.type;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
/* @ts-ignore */
|
|
49
|
-
delete properties.href;
|
|
50
|
-
/* @ts-ignore */
|
|
51
|
-
delete properties.target;
|
|
52
|
-
}
|
|
53
|
-
return react_1.default.createElement(react_2.Button, __assign({ ref: ref }, properties));
|
|
54
|
-
});
|
|
55
|
-
Button.defaultProps = {
|
|
56
|
-
as: 'button',
|
|
57
|
-
size: 'medium',
|
|
58
|
-
variant: 'primary',
|
|
59
|
-
};
|
|
60
|
-
exports.default = Button;
|
|
61
|
-
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../../src/chakra/components/Button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAsD;AACtD,gDAA0B;AAC1B,0CAAuE;AACvE,0CAAqD;AAmBrD,IAAM,MAAM,GAAG,eAAK,CAAC,UAAU,CAA2B,UAAC,KAAY,EAAE,GAAG;IAClE,IAAA,EAAE,GAAiD,KAAK,GAAtD,EAAE,YAAY,GAAmC,KAAK,aAAxC,EAAE,aAAa,GAAoB,KAAK,cAAzB,EAAE,IAAI,GAAc,KAAK,KAAnB,EAAK,IAAI,UAAK,KAAK,EAA1D,+CAAkD,CAAF,CAAW;IACjE,IAAM,UAAU,cAAkB,EAAE,IAAA,EAAE,IAAI,MAAA,IAAK,IAAI,CAAE,CAAC;IACtD,IAAI,YAAY,EAAE;QAChB,UAAU,CAAC,QAAQ,GAAG,8BAAC,aAAI,IAAC,IAAI,EAAE,YAAY,GAAI,CAAC;KACpD;IACD,IAAI,aAAa,EAAE;QACjB,UAAU,CAAC,SAAS,GAAG,8BAAC,aAAI,IAAC,IAAI,EAAE,aAAa,GAAI,CAAC;KACtD;IACD,IAAI,YAAY,IAAI,aAAa,EAAE;QACjC,UAAU,CAAC,WAAW,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;KAC7D;IACD,IAAI,EAAE,KAAK,GAAG,EAAE;QACd,OAAO,UAAU,CAAC,IAAI,CAAC;KACxB;SAAM;QACL,gBAAgB;QAChB,OAAO,UAAU,CAAC,IAAI,CAAC;QACvB,gBAAgB;QAChB,OAAO,UAAU,CAAC,MAAM,CAAC;KAC1B;IACD,OAAO,8BAAC,cAAY,aAAC,GAAG,EAAE,GAAG,IAAM,UAAU,EAAI,CAAC;AACpD,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,YAAY,GAAG;IACpB,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,kBAAe,MAAM,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Pick<import("./Button").Props, "size" | "className" | "children" | "onClick" | "href" | "variant" | "target" | "type" | "as" | "sx" | "isDisabled" | "leftIconName" | "rightIconName"> & React.RefAttributes<HTMLButtonElement>>>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const WithProps: ComponentStory<React.ForwardRefExoticComponent<Pick<import("./Button").Props, "size" | "className" | "children" | "onClick" | "href" | "variant" | "target" | "type" | "as" | "sx" | "isDisabled" | "leftIconName" | "rightIconName"> & React.RefAttributes<HTMLButtonElement>>>;
|
|
6
|
-
//# sourceMappingURL=Button.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/Button/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;;AAKjE,wBAWkC;AAIlC,eAAO,MAAM,SAAS,kRAAoB,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.WithProps = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var shared_1 = require("../../shared");
|
|
20
|
-
var tsx_1 = require("../../../Icon/tsx");
|
|
21
|
-
var Button_1 = __importDefault(require("./Button"));
|
|
22
|
-
exports.default = {
|
|
23
|
-
title: 'Components/Button',
|
|
24
|
-
component: Button_1.default,
|
|
25
|
-
argTypes: {
|
|
26
|
-
leftIconName: {
|
|
27
|
-
options: tsx_1.IconList,
|
|
28
|
-
},
|
|
29
|
-
rightIconName: {
|
|
30
|
-
options: tsx_1.IconList,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
var Template = function (props) { return react_1.default.createElement(Button_1.default, __assign({}, props)); };
|
|
35
|
-
exports.WithProps = Template.bind({});
|
|
36
|
-
exports.WithProps.args = (0, shared_1.sortObjectByKey)(__assign(__assign({}, Button_1.default.defaultProps), { as: 'button', className: '', isDisabled: false, href: '', target: '_self', type: 'button', children: 'Button' }));
|
|
37
|
-
//# sourceMappingURL=Button.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../../../src/chakra/components/Button/Button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,uCAA+C;AAC/C,yCAA6C;AAC7C,oDAA8B;AAE9B,kBAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,gBAAM;IACjB,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,OAAO,EAAE,cAAQ;SAClB;QACD,aAAa,EAAE;YACb,OAAO,EAAE,cAAQ;SAClB;KACF;CAC8B,CAAC;AAElC,IAAM,QAAQ,GAAkC,UAAC,KAAK,IAAK,OAAA,8BAAC,gBAAM,eAAK,KAAK,EAAI,EAArB,CAAqB,CAAC;AAEpE,QAAA,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,iBAAS,CAAC,IAAI,GAAG,IAAA,wBAAe,wBAC3B,gBAAM,CAAC,YAAY,KACtB,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,EAAE,EACb,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,EAAE,EACR,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,QAAQ,IAClB,CAAC"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
declare const ButtonTheme: {
|
|
2
|
-
baseStyle: {
|
|
3
|
-
border: string;
|
|
4
|
-
borderRadius: string;
|
|
5
|
-
fontWeight: string;
|
|
6
|
-
lineHeight: number;
|
|
7
|
-
};
|
|
8
|
-
variants: {
|
|
9
|
-
primary: {
|
|
10
|
-
bgGradient: string;
|
|
11
|
-
borderColor: string;
|
|
12
|
-
color: string;
|
|
13
|
-
fontWeight: string;
|
|
14
|
-
_hover: {
|
|
15
|
-
bgGradient: string;
|
|
16
|
-
_disabled: {
|
|
17
|
-
bgGradient: string;
|
|
18
|
-
borderColor: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
_active: {
|
|
22
|
-
bgGradient: string;
|
|
23
|
-
};
|
|
24
|
-
_disabled: {
|
|
25
|
-
bgGradient: string;
|
|
26
|
-
borderColor: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
secondary: {
|
|
30
|
-
bgGradient: string;
|
|
31
|
-
borderColor: string;
|
|
32
|
-
color: string;
|
|
33
|
-
_hover: {
|
|
34
|
-
bgGradient: string;
|
|
35
|
-
};
|
|
36
|
-
_active: {
|
|
37
|
-
bgGradient: string;
|
|
38
|
-
color: string;
|
|
39
|
-
};
|
|
40
|
-
_disabled: {
|
|
41
|
-
color: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
tertiary: {
|
|
45
|
-
background: string;
|
|
46
|
-
borderColor: string;
|
|
47
|
-
color: string;
|
|
48
|
-
_hover: {
|
|
49
|
-
background: string;
|
|
50
|
-
};
|
|
51
|
-
_active: {
|
|
52
|
-
background: string;
|
|
53
|
-
color: string;
|
|
54
|
-
};
|
|
55
|
-
_disabled: {
|
|
56
|
-
color: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
dangerPrimary: {
|
|
60
|
-
bgGradient: string;
|
|
61
|
-
borderColor: string;
|
|
62
|
-
color: string;
|
|
63
|
-
fontWeight: string;
|
|
64
|
-
_hover: {
|
|
65
|
-
bgGradient: string;
|
|
66
|
-
_disabled: {
|
|
67
|
-
bgGradient: string;
|
|
68
|
-
borderColor: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
_active: {
|
|
72
|
-
bgGradient: string;
|
|
73
|
-
};
|
|
74
|
-
_disabled: {
|
|
75
|
-
bgGradient: string;
|
|
76
|
-
borderColor: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
dangerSecondary: {
|
|
80
|
-
bgGradient: string;
|
|
81
|
-
borderColor: string;
|
|
82
|
-
color: string;
|
|
83
|
-
_hover: {
|
|
84
|
-
bgGradient: string;
|
|
85
|
-
borderColor: string;
|
|
86
|
-
_disabled: {
|
|
87
|
-
bgGradient: string;
|
|
88
|
-
borderColor: string;
|
|
89
|
-
color: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
_active: {
|
|
93
|
-
bgGradient: string;
|
|
94
|
-
color: string;
|
|
95
|
-
};
|
|
96
|
-
_disabled: {
|
|
97
|
-
color: string;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
sizes: {
|
|
102
|
-
small: {
|
|
103
|
-
minWidth: string;
|
|
104
|
-
height: string;
|
|
105
|
-
fontSize: number;
|
|
106
|
-
paddingX: string;
|
|
107
|
-
};
|
|
108
|
-
medium: {
|
|
109
|
-
minWidth: string;
|
|
110
|
-
height: string;
|
|
111
|
-
fontSize: number;
|
|
112
|
-
paddingX: string;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
export default ButtonTheme;
|
|
117
|
-
//# sourceMappingURL=Button.theme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.theme.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/Button/Button.theme.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ButtonTheme = {
|
|
4
|
-
baseStyle: {
|
|
5
|
-
border: '1px solid',
|
|
6
|
-
borderRadius: 'base',
|
|
7
|
-
fontWeight: 'normal',
|
|
8
|
-
lineHeight: 3,
|
|
9
|
-
},
|
|
10
|
-
variants: {
|
|
11
|
-
primary: {
|
|
12
|
-
bgGradient: 'linear(to-b, #6C0EB2, #450674)',
|
|
13
|
-
borderColor: '#683D87',
|
|
14
|
-
color: '#F8F8F8',
|
|
15
|
-
fontWeight: 'bold',
|
|
16
|
-
_hover: {
|
|
17
|
-
bgGradient: 'linear(to-b, #50167B, #3D125D)',
|
|
18
|
-
_disabled: {
|
|
19
|
-
bgGradient: 'linear(to-b, #ccc, #ACACAC)',
|
|
20
|
-
borderColor: '#ACACAC',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
_active: {
|
|
24
|
-
bgGradient: 'linear(to-b, #351D48, #351D48)',
|
|
25
|
-
},
|
|
26
|
-
_disabled: {
|
|
27
|
-
bgGradient: 'linear(to-b, #ccc, #ACACAC)',
|
|
28
|
-
borderColor: '#ACACAC',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
secondary: {
|
|
32
|
-
bgGradient: 'linear(to-b, #f8f8f8, #fff)',
|
|
33
|
-
borderColor: '#ddd',
|
|
34
|
-
color: '#351D48',
|
|
35
|
-
_hover: {
|
|
36
|
-
bgGradient: 'linear(to-b, #ECECEC, #ECECEC)',
|
|
37
|
-
},
|
|
38
|
-
_active: {
|
|
39
|
-
bgGradient: 'linear(to-b, #351D48, #351D48)',
|
|
40
|
-
color: '#F8F8F8',
|
|
41
|
-
},
|
|
42
|
-
_disabled: {
|
|
43
|
-
color: '#ACACAC',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
tertiary: {
|
|
47
|
-
background: 'transparent',
|
|
48
|
-
borderColor: 'transparent',
|
|
49
|
-
color: '#760FC3',
|
|
50
|
-
_hover: {
|
|
51
|
-
background: '#F8F0FF',
|
|
52
|
-
},
|
|
53
|
-
_active: {
|
|
54
|
-
background: '#351D48',
|
|
55
|
-
color: '#F8F8F8',
|
|
56
|
-
},
|
|
57
|
-
_disabled: {
|
|
58
|
-
color: '#ACACAC',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
dangerPrimary: {
|
|
62
|
-
bgGradient: 'linear(to-b, #E41447, #FF2158)',
|
|
63
|
-
borderColor: '#D4093C',
|
|
64
|
-
color: '#fff',
|
|
65
|
-
fontWeight: 'bold',
|
|
66
|
-
_hover: {
|
|
67
|
-
bgGradient: 'linear(to-b, #C90032, #C90032)',
|
|
68
|
-
_disabled: {
|
|
69
|
-
bgGradient: 'linear(to-b, #ccc, #acacac)',
|
|
70
|
-
borderColor: '#ACACAC',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
_active: {
|
|
74
|
-
bgGradient: 'linear(to-b, #C02048, #C02048)',
|
|
75
|
-
},
|
|
76
|
-
_disabled: {
|
|
77
|
-
bgGradient: 'linear(to-b, #ccc, #acacac)',
|
|
78
|
-
borderColor: '#ACACAC',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
dangerSecondary: {
|
|
82
|
-
bgGradient: 'linear(to-b, #f8f8f8, #fff)',
|
|
83
|
-
borderColor: '#ddd',
|
|
84
|
-
color: '#FF2158',
|
|
85
|
-
_hover: {
|
|
86
|
-
bgGradient: 'linear(to-b, #FFE8EE, #FFE8EE)',
|
|
87
|
-
borderColor: '#FF8FAB',
|
|
88
|
-
_disabled: {
|
|
89
|
-
bgGradient: 'linear(to-b, #f8f8f8, #fff)',
|
|
90
|
-
borderColor: '#ddd',
|
|
91
|
-
color: '#ACACAC',
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
_active: {
|
|
95
|
-
bgGradient: 'linear(to-b, #C02048, #C02048)',
|
|
96
|
-
color: '#fff',
|
|
97
|
-
},
|
|
98
|
-
_disabled: {
|
|
99
|
-
color: '#ACACAC',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
sizes: {
|
|
104
|
-
small: {
|
|
105
|
-
minWidth: '32px',
|
|
106
|
-
height: '32px',
|
|
107
|
-
fontSize: 2,
|
|
108
|
-
paddingX: '12px',
|
|
109
|
-
},
|
|
110
|
-
medium: {
|
|
111
|
-
minWidth: '48px',
|
|
112
|
-
height: '48px',
|
|
113
|
-
fontSize: 3,
|
|
114
|
-
paddingX: '16px',
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
exports.default = ButtonTheme;
|
|
119
|
-
//# sourceMappingURL=Button.theme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.theme.js","sourceRoot":"","sources":["../../../../../src/chakra/components/Button/Button.theme.ts"],"names":[],"mappings":";;AAAA,IAAM,WAAW,GAAG;IAClB,SAAS,EAAE;QACT,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,QAAQ;QACpB,UAAU,EAAE,CAAC;KACd;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,UAAU,EAAE,gCAAgC;YAC5C,WAAW,EAAE,SAAS;YACtB,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE,MAAM;YAClB,MAAM,EAAE;gBACN,UAAU,EAAE,gCAAgC;gBAC5C,SAAS,EAAE;oBACT,UAAU,EAAE,6BAA6B;oBACzC,WAAW,EAAE,SAAS;iBACvB;aACF;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,gCAAgC;aAC7C;YACD,SAAS,EAAE;gBACT,UAAU,EAAE,6BAA6B;gBACzC,WAAW,EAAE,SAAS;aACvB;SACF;QACD,SAAS,EAAE;YACT,UAAU,EAAE,6BAA6B;YACzC,WAAW,EAAE,MAAM;YACnB,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE;gBACN,UAAU,EAAE,gCAAgC;aAC7C;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,gCAAgC;gBAC5C,KAAK,EAAE,SAAS;aACjB;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,SAAS;aACjB;SACF;QACD,QAAQ,EAAE;YACR,UAAU,EAAE,aAAa;YACzB,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE;gBACN,UAAU,EAAE,SAAS;aACtB;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,SAAS;gBACrB,KAAK,EAAE,SAAS;aACjB;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,SAAS;aACjB;SACF;QACD,aAAa,EAAE;YACb,UAAU,EAAE,gCAAgC;YAC5C,WAAW,EAAE,SAAS;YACtB,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,MAAM;YAClB,MAAM,EAAE;gBACN,UAAU,EAAE,gCAAgC;gBAC5C,SAAS,EAAE;oBACT,UAAU,EAAE,6BAA6B;oBACzC,WAAW,EAAE,SAAS;iBACvB;aACF;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,gCAAgC;aAC7C;YACD,SAAS,EAAE;gBACT,UAAU,EAAE,6BAA6B;gBACzC,WAAW,EAAE,SAAS;aACvB;SACF;QACD,eAAe,EAAE;YACf,UAAU,EAAE,6BAA6B;YACzC,WAAW,EAAE,MAAM;YACnB,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE;gBACN,UAAU,EAAE,gCAAgC;gBAC5C,WAAW,EAAE,SAAS;gBACtB,SAAS,EAAE;oBACT,UAAU,EAAE,6BAA6B;oBACzC,WAAW,EAAE,MAAM;oBACnB,KAAK,EAAE,SAAS;iBACjB;aACF;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,gCAAgC;gBAC5C,KAAK,EAAE,MAAM;aACd;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,SAAS;aACjB;SACF;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,MAAM;SACjB;QACD,MAAM,EAAE;YACN,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,MAAM;SACjB;KACF;CACF,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconButtonProps } from '@chakra-ui/react';
|
|
3
|
-
import { TypeIconName } from '@bitrise/bitkit';
|
|
4
|
-
export interface Props {
|
|
5
|
-
iconName: TypeIconName;
|
|
6
|
-
label: IconButtonProps['aria-label'];
|
|
7
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
-
size?: 'small' | 'medium';
|
|
9
|
-
sx?: IconButtonProps['sx'];
|
|
10
|
-
variant?: 'primary' | 'secondary' | 'tertiary' | 'dangerPrimary' | 'dangerSecondary';
|
|
11
|
-
}
|
|
12
|
-
declare const IconButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
export default IconButton;
|
|
14
|
-
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkC,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAQ,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACvE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,EAAE,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,GAAG,iBAAiB,CAAC;CACtF;AAED,QAAA,MAAM,UAAU,iFAQd,CAAC;AAOH,eAAe,UAAU,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
var react_1 = __importDefault(require("react"));
|
|
29
|
-
var react_2 = require("@chakra-ui/react");
|
|
30
|
-
var bitkit_1 = require("@bitrise/bitkit");
|
|
31
|
-
var IconButton = react_1.default.forwardRef(function (props, ref) {
|
|
32
|
-
var iconName = props.iconName, label = props.label, rest = __rest(props, ["iconName", "label"]);
|
|
33
|
-
var properties = __assign({ 'aria-label': label, icon: react_1.default.createElement(bitkit_1.Icon, { name: iconName }) }, rest);
|
|
34
|
-
return react_1.default.createElement(react_2.IconButton, __assign({ ref: ref }, properties));
|
|
35
|
-
});
|
|
36
|
-
IconButton.defaultProps = {
|
|
37
|
-
size: 'medium',
|
|
38
|
-
variant: 'primary',
|
|
39
|
-
};
|
|
40
|
-
exports.default = IconButton;
|
|
41
|
-
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../../src/chakra/components/IconButton/IconButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,0CAAmF;AACnF,0CAAqD;AAWrD,IAAM,UAAU,GAAG,eAAK,CAAC,UAAU,CAA2B,UAAC,KAAY,EAAE,GAAG;IACtE,IAAA,QAAQ,GAAqB,KAAK,SAA1B,EAAE,KAAK,GAAc,KAAK,MAAnB,EAAK,IAAI,UAAK,KAAK,EAApC,qBAA4B,CAAF,CAAW;IAC3C,IAAM,UAAU,cACd,YAAY,EAAE,KAAK,EACnB,IAAI,EAAE,8BAAC,aAAI,IAAC,IAAI,EAAE,QAAQ,GAAI,IAC3B,IAAI,CACR,CAAC;IACF,OAAO,8BAAC,kBAAgB,aAAC,GAAG,EAAE,GAAG,IAAM,UAAU,EAAI,CAAC;AACxD,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG;IACxB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,SAAS;CACV,CAAC;AAEX,kBAAe,UAAU,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("./IconButton").Props & React.RefAttributes<HTMLButtonElement>>>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const WithProps: ComponentStory<React.ForwardRefExoticComponent<import("./IconButton").Props & React.RefAttributes<HTMLButtonElement>>>;
|
|
6
|
-
//# sourceMappingURL=IconButton.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/IconButton/IconButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;;AAKjE,wBAQsC;AAItC,eAAO,MAAM,SAAS,wHAAoB,CAAC"}
|