@bitrise/bitkit 9.4.1-alpha.1 → 9.4.1-beta.2
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/.tool-versions +1 -1
- package/CHANGELOG.md +3 -1
- package/bitrise.yml +41 -27
- 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 +9 -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 +6 -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 +52 -19
- 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 +6 -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 +6 -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 +53 -30
- 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 +18 -42
- package/postcss.config.js +9 -5
- package/release.config.js +2 -1
- package/site/components/Documentation/Components/SectionButtons.tsx +37 -4
- package/site/components/Documentation/Components/SectionDropdowns.tsx +1 -1
- package/site/components/Documentation/Components/SectionPlacement.tsx +4 -1
- package/src/ButtonWithDropdown/ButtonWithDropdown.tsx +18 -21
- package/src/Dropdown/Dropdown.tsx +13 -8
- package/src/Placement/Placement.css +17 -35
- package/src/Placement/Placement.tsx +5 -8
- package/src/Placement/PlacementPopper.tsx +78 -50
- 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
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { HStack, useStyleConfig } from '@chakra-ui/react';
|
|
3
|
-
import { Icon } from '@bitrise/bitkit';
|
|
4
|
-
import Text from '../Text/Text';
|
|
5
|
-
const getIcon = (variant, iconName) => {
|
|
6
|
-
const iconMap = {
|
|
7
|
-
aborted: 'BuildstatusAborted',
|
|
8
|
-
failed: 'BuildstatusFailed',
|
|
9
|
-
onHold: 'BuildstatusAborted',
|
|
10
|
-
running: 'BuildstatusLoadingAnimated',
|
|
11
|
-
starting: 'BuildstatusLoadingAnimated',
|
|
12
|
-
success: 'BuildstatusSuccessful',
|
|
13
|
-
};
|
|
14
|
-
if (!iconName) {
|
|
15
|
-
return iconMap[variant];
|
|
16
|
-
}
|
|
17
|
-
return iconName;
|
|
18
|
-
};
|
|
19
|
-
const StatusTag = ({ children, iconName, size, variant, width }) => {
|
|
20
|
-
const styles = useStyleConfig('StatusTag', { size, variant });
|
|
21
|
-
return (React.createElement(HStack, { alignItems: "center", sx: styles, width: width },
|
|
22
|
-
React.createElement(Icon, { name: getIcon(variant, iconName) }),
|
|
23
|
-
React.createElement(Text, { fontWeight: "bold", size: "2", textTransform: "uppercase" }, children)));
|
|
24
|
-
};
|
|
25
|
-
StatusTag.defaultProps = {
|
|
26
|
-
size: 'normal',
|
|
27
|
-
width: '8.5rem',
|
|
28
|
-
};
|
|
29
|
-
export default StatusTag;
|
|
30
|
-
//# sourceMappingURL=StatusTag.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusTag.js","sourceRoot":"","sources":["../../../../../src/chakra/components/StatusTag/StatusTag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,IAAI,MAAM,cAAc,CAAC;AAmBhC,MAAM,OAAO,GAAG,CAAC,OAAgB,EAAE,QAAmB,EAAY,EAAE;IAClE,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,oBAAoB;QAC7B,MAAM,EAAE,mBAAmB;QAC3B,MAAM,EAAE,oBAAoB;QAC5B,OAAO,EAAE,4BAA4B;QACrC,QAAQ,EAAE,4BAA4B;QACtC,OAAO,EAAE,uBAAuB;KACjC,CAAC;IACF,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,OAAO,CAAC,OAAO,CAAa,CAAC;KACrC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAS,EAAE,EAAE;IACxE,MAAM,MAAM,GAAG,cAAc,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC9D,OAAO,CACL,oBAAC,MAAM,IAAC,UAAU,EAAC,QAAQ,EAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;QAClD,oBAAC,IAAI,IAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAI;QAC1C,oBAAC,IAAI,IAAC,UAAU,EAAC,MAAM,EAAC,IAAI,EAAC,GAAG,EAAC,aAAa,EAAC,WAAW,IACvD,QAAQ,CACJ,CACA,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;CACP,CAAC;AAEX,eAAe,SAAS,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
import { Props } from './StatusTag';
|
|
4
|
-
declare const _default: ComponentMeta<{
|
|
5
|
-
({ children, iconName, size, variant, width }: Props): JSX.Element;
|
|
6
|
-
defaultProps: Props;
|
|
7
|
-
}>;
|
|
8
|
-
export default _default;
|
|
9
|
-
export declare const WithProps: ComponentStory<{
|
|
10
|
-
({ children, iconName, size, variant, width }: Props): JSX.Element;
|
|
11
|
-
defaultProps: Props;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=StatusTag.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusTag.stories.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/StatusTag/StatusTag.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAkB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;;;;;AAE/C,wBAGqC;AAIrC,eAAO,MAAM,SAAS;;;EAAoB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { sortObjectByKey } from '../../shared';
|
|
3
|
-
import StatusTag from './StatusTag';
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Components/StatusTag',
|
|
6
|
-
component: StatusTag,
|
|
7
|
-
};
|
|
8
|
-
const Template = ({ ...props }) => React.createElement(StatusTag, { ...props });
|
|
9
|
-
export const WithProps = Template.bind({});
|
|
10
|
-
WithProps.args = sortObjectByKey({
|
|
11
|
-
...StatusTag.defaultProps,
|
|
12
|
-
children: 'Running',
|
|
13
|
-
// iconName: 'BuildstatusLoadingAnimated',
|
|
14
|
-
variant: 'running',
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=StatusTag.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusTag.stories.js","sourceRoot":"","sources":["../../../../../src/chakra/components/StatusTag/StatusTag.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,SAAoB,MAAM,aAAa,CAAC;AAE/C,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,SAAS;CACc,CAAC;AAErC,MAAM,QAAQ,GAAqC,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,oBAAC,SAAS,OAAK,KAAK,GAAI,CAAC;AAE9F,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG,eAAe,CAAC;IAC/B,GAAG,SAAS,CAAC,YAAY;IACzB,QAAQ,EAAE,SAAS;IACnB,0CAA0C;IAC1C,OAAO,EAAE,SAAS;CACV,CAAC,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
declare const StatusTagTheme: {
|
|
2
|
-
baseStyle: {
|
|
3
|
-
borderRadius: string;
|
|
4
|
-
paddingX: string;
|
|
5
|
-
};
|
|
6
|
-
sizes: {
|
|
7
|
-
small: {
|
|
8
|
-
paddingY: string;
|
|
9
|
-
};
|
|
10
|
-
normal: {
|
|
11
|
-
paddingY: string;
|
|
12
|
-
};
|
|
13
|
-
big: {
|
|
14
|
-
paddingY: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
variants: {
|
|
18
|
-
aborted: {
|
|
19
|
-
backgroundColor: string;
|
|
20
|
-
color: string;
|
|
21
|
-
};
|
|
22
|
-
failed: {
|
|
23
|
-
backgroundColor: string;
|
|
24
|
-
color: string;
|
|
25
|
-
};
|
|
26
|
-
onHold: {
|
|
27
|
-
backgroundColor: string;
|
|
28
|
-
color: string;
|
|
29
|
-
};
|
|
30
|
-
running: {
|
|
31
|
-
backgroundColor: string;
|
|
32
|
-
color: string;
|
|
33
|
-
};
|
|
34
|
-
starting: {
|
|
35
|
-
backgroundColor: string;
|
|
36
|
-
color: string;
|
|
37
|
-
};
|
|
38
|
-
success: {
|
|
39
|
-
backgroundColor: string;
|
|
40
|
-
color: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export default StatusTagTheme;
|
|
45
|
-
//# sourceMappingURL=StatusTag.theme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusTag.theme.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/StatusTag/StatusTag.theme.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const StatusTagTheme = {
|
|
2
|
-
baseStyle: {
|
|
3
|
-
borderRadius: '4px',
|
|
4
|
-
paddingX: '8px',
|
|
5
|
-
},
|
|
6
|
-
sizes: {
|
|
7
|
-
small: {
|
|
8
|
-
paddingY: '4px',
|
|
9
|
-
},
|
|
10
|
-
normal: {
|
|
11
|
-
paddingY: '8px',
|
|
12
|
-
},
|
|
13
|
-
big: {
|
|
14
|
-
paddingY: '20px',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
variants: {
|
|
18
|
-
aborted: {
|
|
19
|
-
backgroundColor: '#FFF6D1',
|
|
20
|
-
color: '#875B00',
|
|
21
|
-
},
|
|
22
|
-
failed: {
|
|
23
|
-
backgroundColor: '#FFF0F3',
|
|
24
|
-
color: '#A91E2E',
|
|
25
|
-
},
|
|
26
|
-
onHold: {
|
|
27
|
-
backgroundColor: '#F6F4F6',
|
|
28
|
-
color: '#6B6071',
|
|
29
|
-
},
|
|
30
|
-
running: {
|
|
31
|
-
backgroundColor: '#F9F2FD',
|
|
32
|
-
color: '#492F5C',
|
|
33
|
-
},
|
|
34
|
-
starting: {
|
|
35
|
-
backgroundColor: '#ECF8FD',
|
|
36
|
-
color: '#1066AC',
|
|
37
|
-
},
|
|
38
|
-
success: {
|
|
39
|
-
backgroundColor: '#EEF9F1',
|
|
40
|
-
color: '#167231',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
export default StatusTagTheme;
|
|
45
|
-
//# sourceMappingURL=StatusTag.theme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusTag.theme.js","sourceRoot":"","sources":["../../../../../src/chakra/components/StatusTag/StatusTag.theme.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG;IACrB,SAAS,EAAE;QACT,YAAY,EAAE,KAAK;QACnB,QAAQ,EAAE,KAAK;KAChB;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,QAAQ,EAAE,KAAK;SAChB;QACD,MAAM,EAAE;YACN,QAAQ,EAAE,KAAK;SAChB;QACD,GAAG,EAAE;YACH,QAAQ,EAAE,MAAM;SACjB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,eAAe,EAAE,SAAS;YAC1B,KAAK,EAAE,SAAS;SACjB;QACD,MAAM,EAAE;YACN,eAAe,EAAE,SAAS;YAC1B,KAAK,EAAE,SAAS;SACjB;QACD,MAAM,EAAE;YACN,eAAe,EAAE,SAAS;YAC1B,KAAK,EAAE,SAAS;SACjB;QACD,OAAO,EAAE;YACP,eAAe,EAAE,SAAS;YAC1B,KAAK,EAAE,SAAS;SACjB;QACD,QAAQ,EAAE;YACR,eAAe,EAAE,SAAS;YAC1B,KAAK,EAAE,SAAS;SACjB;QACD,OAAO,EAAE;YACP,eAAe,EAAE,SAAS;YAC1B,KAAK,EAAE,SAAS;SACjB;KACF;CACF,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextProps } from '@chakra-ui/react';
|
|
3
|
-
declare type TextTags = 'a' | 'abbr' | 'bdi' | 'bdo' | 'blockquote' | 'cite' | 'data' | 'dd' | 'dfn' | 'dt' | 'em' | 'figcaption' | 'kbd' | 'li' | 'mark' | 'p' | 'pre' | 'q' | 'samp' | 'small' | 'span' | 'strong' | 'sub' | 'sup' | 'time' | 'var';
|
|
4
|
-
export interface Props {
|
|
5
|
-
align?: 'center' | 'justify' | 'left' | 'right';
|
|
6
|
-
/**
|
|
7
|
-
* Any valid HTML text tag
|
|
8
|
-
*/
|
|
9
|
-
as?: TextTags;
|
|
10
|
-
children?: TextProps['children'];
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Font weight
|
|
14
|
-
*/
|
|
15
|
-
fontWeight?: 'bold' | 'normal';
|
|
16
|
-
letterSpacing?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Size config (https://www.figma.com/file/grik9mTaJ5DfhydhWhXdP5/Bitkit-Foundations?node-id=211%3A12)
|
|
19
|
-
*/
|
|
20
|
-
size?: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';
|
|
21
|
-
sx?: TextProps['sx'];
|
|
22
|
-
textTransform?: 'capitalize' | 'lowercase' | 'none' | 'uppercase';
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Basic `Text` component
|
|
26
|
-
*/
|
|
27
|
-
declare const Text: {
|
|
28
|
-
(props: Props): JSX.Element;
|
|
29
|
-
defaultProps: Props;
|
|
30
|
-
};
|
|
31
|
-
export default Text;
|
|
32
|
-
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/Text/Text.tsx"],"names":[],"mappings":";AACA,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,aAAK,QAAQ,GACT,GAAG,GACH,MAAM,GACN,KAAK,GACL,KAAK,GACL,YAAY,GACZ,MAAM,GACN,MAAM,GACN,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,YAAY,GACZ,KAAK,GACL,IAAI,GACJ,MAAM,GACN,GAAG,GACH,KAAK,GACL,GAAG,GACH,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,MAAM,GACN,KAAK,CAAC;AAEV,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAChD;;OAEG;IACH,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACrD,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACrB,aAAa,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;CACnE;AAED;;GAEG;AACH,QAAA,MAAM,IAAI;YAAW,KAAK;;CAUzB,CAAC;AAOF,eAAe,IAAI,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text as ChakraText } from '@chakra-ui/react';
|
|
3
|
-
/**
|
|
4
|
-
* Basic `Text` component
|
|
5
|
-
*/
|
|
6
|
-
const Text = (props) => {
|
|
7
|
-
const { size, textTransform } = props;
|
|
8
|
-
const properties = { ...props };
|
|
9
|
-
if (size === '1' && (!textTransform || textTransform === 'none')) {
|
|
10
|
-
properties.textTransform = 'uppercase';
|
|
11
|
-
}
|
|
12
|
-
if (size === '5' || size === '6' || size === '7' || size === '8') {
|
|
13
|
-
properties.fontWeight = 'bold';
|
|
14
|
-
}
|
|
15
|
-
return React.createElement(ChakraText, { ...properties });
|
|
16
|
-
};
|
|
17
|
-
Text.defaultProps = {
|
|
18
|
-
as: 'span',
|
|
19
|
-
size: '4',
|
|
20
|
-
};
|
|
21
|
-
export default Text;
|
|
22
|
-
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../../src/chakra/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,UAAU,EAAa,MAAM,kBAAkB,CAAC;AAmDjE;;GAEG;AACH,MAAM,IAAI,GAAG,CAAC,KAAY,EAAE,EAAE;IAC5B,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,UAAU,GAAc,EAAE,GAAG,KAAK,EAAE,CAAC;IAC3C,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,CAAC,aAAa,IAAI,aAAa,KAAK,MAAM,CAAC,EAAE;QAChE,UAAU,CAAC,aAAa,GAAG,WAAW,CAAC;KACxC;IACD,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,EAAE;QAChE,UAAU,CAAC,UAAU,GAAG,MAAM,CAAC;KAChC;IACD,OAAO,oBAAC,UAAU,OAAK,UAAU,GAAI,CAAC;AACxC,CAAC,CAAC;AAEF,IAAI,CAAC,YAAY,GAAG;IAClB,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,GAAG;CACD,CAAC;AAEX,eAAe,IAAI,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<{
|
|
4
|
-
(props: import("./Text").Props): JSX.Element;
|
|
5
|
-
defaultProps: import("./Text").Props;
|
|
6
|
-
}>;
|
|
7
|
-
export default _default;
|
|
8
|
-
export declare const WithProps: ComponentStory<{
|
|
9
|
-
(props: import("./Text").Props): JSX.Element;
|
|
10
|
-
defaultProps: import("./Text").Props;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=Text.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.stories.d.ts","sourceRoot":"","sources":["../../../../../src/chakra/components/Text/Text.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;;;;;AAIjE,wBAGgC;AAIhC,eAAO,MAAM,SAAS;;;EAAoB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { sortObjectByKey } from '../../shared';
|
|
3
|
-
import Text from './Text';
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Components/Text',
|
|
6
|
-
component: Text,
|
|
7
|
-
};
|
|
8
|
-
const Template = ({ ...props }) => React.createElement(Text, { ...props });
|
|
9
|
-
export const WithProps = Template.bind({});
|
|
10
|
-
WithProps.args = sortObjectByKey({
|
|
11
|
-
align: 'left',
|
|
12
|
-
className: '',
|
|
13
|
-
children: 'The quick brown fox jumps over the lazy dog.',
|
|
14
|
-
fontWeight: 'normal',
|
|
15
|
-
letterSpacing: 'normal',
|
|
16
|
-
textTransform: 'none',
|
|
17
|
-
...Text.defaultProps,
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=Text.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.stories.js","sourceRoot":"","sources":["../../../../../src/chakra/components/Text/Text.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,eAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,IAAI;CACc,CAAC;AAEhC,MAAM,QAAQ,GAAgC,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,oBAAC,IAAI,OAAK,KAAK,GAAI,CAAC;AAEpF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG,eAAe,CAAC;IAC/B,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,8CAA8C;IACxD,UAAU,EAAE,QAAQ;IACpB,aAAa,EAAE,QAAQ;IACvB,aAAa,EAAE,MAAM;IACrB,GAAG,IAAI,CAAC,YAAY;CACrB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/chakra/shared.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,cAAe,GAAG,OAQ7C,CAAC"}
|
package/lib/esn/chakra/shared.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/chakra/shared.ts"],"names":[],"mappings":"AAAA,oBAAoB;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAc,EAAE,EAAE;IAChD,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;SAC1B,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACnB,gBAAgB;QAChB,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;QAC1B,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/chakra/theme/theme.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,KAAK,sCAwCT,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { extendTheme } from '@chakra-ui/react';
|
|
2
|
-
import { variables } from '@bitrise/bitkit';
|
|
3
|
-
import ButtonTheme from '../components/Button/Button.theme';
|
|
4
|
-
import StatusTagTheme from '../components/StatusTag/StatusTag.theme';
|
|
5
|
-
import MenuTheme from '../components/Menu/Menu.theme';
|
|
6
|
-
import typographyConfig from './typographyConfig';
|
|
7
|
-
const theme = extendTheme({
|
|
8
|
-
config: {
|
|
9
|
-
cssVarPrefix: 'bitkit',
|
|
10
|
-
},
|
|
11
|
-
colors: variables.colorMap,
|
|
12
|
-
fonts: {
|
|
13
|
-
body: `"TT Norms Pro", sans-serif`,
|
|
14
|
-
heading: `"TT Norms Pro", sans-serif`,
|
|
15
|
-
},
|
|
16
|
-
fontSizes: {
|
|
17
|
-
1: '11px',
|
|
18
|
-
2: '14px',
|
|
19
|
-
3: '16px',
|
|
20
|
-
4: '19px',
|
|
21
|
-
5: '24px',
|
|
22
|
-
6: '30px',
|
|
23
|
-
7: '36px',
|
|
24
|
-
8: '48px',
|
|
25
|
-
},
|
|
26
|
-
lineHeights: {
|
|
27
|
-
1: '16px',
|
|
28
|
-
2: '20px',
|
|
29
|
-
3: '24px',
|
|
30
|
-
4: '28px',
|
|
31
|
-
5: '36px',
|
|
32
|
-
6: '40px',
|
|
33
|
-
7: '48px',
|
|
34
|
-
8: '60px',
|
|
35
|
-
},
|
|
36
|
-
components: {
|
|
37
|
-
Button: ButtonTheme,
|
|
38
|
-
Heading: {
|
|
39
|
-
sizes: typographyConfig,
|
|
40
|
-
},
|
|
41
|
-
Menu: MenuTheme,
|
|
42
|
-
StatusTag: StatusTagTheme,
|
|
43
|
-
Text: {
|
|
44
|
-
sizes: typographyConfig,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
export default theme;
|
|
49
|
-
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../../src/chakra/theme/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,mCAAmC,CAAC;AAC5D,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,SAAS,MAAM,+BAA+B,CAAC;AACtD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,MAAM,KAAK,GAAG,WAAW,CAAC;IACxB,MAAM,EAAE;QACN,YAAY,EAAE,QAAQ;KACvB;IACD,MAAM,EAAE,SAAS,CAAC,QAAQ;IAC1B,KAAK,EAAE;QACL,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,4BAA4B;KACtC;IACD,SAAS,EAAE;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;KACV;IACD,WAAW,EAAE;QACX,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,MAAM;KACV;IACD,UAAU,EAAE;QACV,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE;YACP,KAAK,EAAE,gBAAgB;SACxB;QACD,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,cAAc;QACzB,IAAI,EAAE;YACJ,KAAK,EAAE,gBAAgB;SACxB;KACF;CACF,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typographyConfig.d.ts","sourceRoot":"","sources":["../../../../src/chakra/theme/typographyConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAiC7C,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const config = {
|
|
2
|
-
1: {
|
|
3
|
-
fontSize: '11px',
|
|
4
|
-
lineHeight: '16px',
|
|
5
|
-
},
|
|
6
|
-
2: {
|
|
7
|
-
fontSize: '14px',
|
|
8
|
-
lineHeight: '20px',
|
|
9
|
-
},
|
|
10
|
-
3: {
|
|
11
|
-
fontSize: '16px',
|
|
12
|
-
lineHeight: '24px',
|
|
13
|
-
},
|
|
14
|
-
4: {
|
|
15
|
-
fontSize: '19px',
|
|
16
|
-
lineHeight: '28px',
|
|
17
|
-
},
|
|
18
|
-
5: {
|
|
19
|
-
fontSize: '24px',
|
|
20
|
-
lineHeight: '36px',
|
|
21
|
-
},
|
|
22
|
-
6: {
|
|
23
|
-
fontSize: '30px',
|
|
24
|
-
lineHeight: '40px',
|
|
25
|
-
},
|
|
26
|
-
7: {
|
|
27
|
-
fontSize: '36px',
|
|
28
|
-
lineHeight: '48px',
|
|
29
|
-
},
|
|
30
|
-
8: {
|
|
31
|
-
fontSize: '48px',
|
|
32
|
-
lineHeight: '60px',
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
export default config;
|
|
36
|
-
//# sourceMappingURL=typographyConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typographyConfig.js","sourceRoot":"","sources":["../../../../src/chakra/theme/typographyConfig.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAsC;IAChD,CAAC,EAAE;QACD,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;KACnB;IACD,CAAC,EAAE;QACD,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;KACnB;IACD,CAAC,EAAE;QACD,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;KACnB;IACD,CAAC,EAAE;QACD,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;KACnB;IACD,CAAC,EAAE;QACD,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;KACnB;IACD,CAAC,EAAE;QACD,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;KACnB;IACD,CAAC,EAAE;QACD,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;KACnB;IACD,CAAC,EAAE;QACD,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;KACnB;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChakraProvider, ChakraProviderProps } from '@chakra-ui/react';
|
|
3
|
-
import theme from './theme/theme';
|
|
4
|
-
|
|
5
|
-
const BitkitProvider = ({ children }: ChakraProviderProps) => {
|
|
6
|
-
return <ChakraProvider theme={theme}>{children}</ChakraProvider>;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default BitkitProvider;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
import { sortObjectByKey } from '../../shared';
|
|
4
|
-
import { IconList } from '../../../Icon/tsx';
|
|
5
|
-
import Button from './Button';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Components/Button',
|
|
9
|
-
component: Button,
|
|
10
|
-
argTypes: {
|
|
11
|
-
leftIconName: {
|
|
12
|
-
options: IconList,
|
|
13
|
-
},
|
|
14
|
-
rightIconName: {
|
|
15
|
-
options: IconList,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
} as ComponentMeta<typeof Button>;
|
|
19
|
-
|
|
20
|
-
const Template: ComponentStory<typeof Button> = (props) => <Button {...props} />;
|
|
21
|
-
|
|
22
|
-
export const WithProps = Template.bind({});
|
|
23
|
-
WithProps.args = sortObjectByKey({
|
|
24
|
-
...Button.defaultProps,
|
|
25
|
-
as: 'button',
|
|
26
|
-
className: '',
|
|
27
|
-
isDisabled: false,
|
|
28
|
-
href: '',
|
|
29
|
-
target: '_self',
|
|
30
|
-
type: 'button',
|
|
31
|
-
children: 'Button',
|
|
32
|
-
});
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
const ButtonTheme = {
|
|
2
|
-
baseStyle: {
|
|
3
|
-
border: '1px solid',
|
|
4
|
-
borderRadius: 'base',
|
|
5
|
-
fontWeight: 'normal',
|
|
6
|
-
lineHeight: 3,
|
|
7
|
-
},
|
|
8
|
-
variants: {
|
|
9
|
-
primary: {
|
|
10
|
-
bgGradient: 'linear(to-b, #6C0EB2, #450674)',
|
|
11
|
-
borderColor: '#683D87',
|
|
12
|
-
color: '#F8F8F8',
|
|
13
|
-
fontWeight: 'bold',
|
|
14
|
-
_hover: {
|
|
15
|
-
bgGradient: 'linear(to-b, #50167B, #3D125D)',
|
|
16
|
-
_disabled: {
|
|
17
|
-
bgGradient: 'linear(to-b, #ccc, #ACACAC)',
|
|
18
|
-
borderColor: '#ACACAC',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
_active: {
|
|
22
|
-
bgGradient: 'linear(to-b, #351D48, #351D48)',
|
|
23
|
-
},
|
|
24
|
-
_disabled: {
|
|
25
|
-
bgGradient: 'linear(to-b, #ccc, #ACACAC)',
|
|
26
|
-
borderColor: '#ACACAC',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
secondary: {
|
|
30
|
-
bgGradient: 'linear(to-b, #f8f8f8, #fff)',
|
|
31
|
-
borderColor: '#ddd',
|
|
32
|
-
color: '#351D48',
|
|
33
|
-
_hover: {
|
|
34
|
-
bgGradient: 'linear(to-b, #ECECEC, #ECECEC)',
|
|
35
|
-
},
|
|
36
|
-
_active: {
|
|
37
|
-
bgGradient: 'linear(to-b, #351D48, #351D48)',
|
|
38
|
-
color: '#F8F8F8',
|
|
39
|
-
},
|
|
40
|
-
_disabled: {
|
|
41
|
-
color: '#ACACAC',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
tertiary: {
|
|
45
|
-
background: 'transparent',
|
|
46
|
-
borderColor: 'transparent',
|
|
47
|
-
color: '#760FC3',
|
|
48
|
-
_hover: {
|
|
49
|
-
background: '#F8F0FF',
|
|
50
|
-
},
|
|
51
|
-
_active: {
|
|
52
|
-
background: '#351D48',
|
|
53
|
-
color: '#F8F8F8',
|
|
54
|
-
},
|
|
55
|
-
_disabled: {
|
|
56
|
-
color: '#ACACAC',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
dangerPrimary: {
|
|
60
|
-
bgGradient: 'linear(to-b, #E41447, #FF2158)',
|
|
61
|
-
borderColor: '#D4093C',
|
|
62
|
-
color: '#fff',
|
|
63
|
-
fontWeight: 'bold',
|
|
64
|
-
_hover: {
|
|
65
|
-
bgGradient: 'linear(to-b, #C90032, #C90032)',
|
|
66
|
-
_disabled: {
|
|
67
|
-
bgGradient: 'linear(to-b, #ccc, #acacac)',
|
|
68
|
-
borderColor: '#ACACAC',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
_active: {
|
|
72
|
-
bgGradient: 'linear(to-b, #C02048, #C02048)',
|
|
73
|
-
},
|
|
74
|
-
_disabled: {
|
|
75
|
-
bgGradient: 'linear(to-b, #ccc, #acacac)',
|
|
76
|
-
borderColor: '#ACACAC',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
dangerSecondary: {
|
|
80
|
-
bgGradient: 'linear(to-b, #f8f8f8, #fff)',
|
|
81
|
-
borderColor: '#ddd',
|
|
82
|
-
color: '#FF2158',
|
|
83
|
-
_hover: {
|
|
84
|
-
bgGradient: 'linear(to-b, #FFE8EE, #FFE8EE)',
|
|
85
|
-
borderColor: '#FF8FAB',
|
|
86
|
-
_disabled: {
|
|
87
|
-
bgGradient: 'linear(to-b, #f8f8f8, #fff)',
|
|
88
|
-
borderColor: '#ddd',
|
|
89
|
-
color: '#ACACAC',
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
_active: {
|
|
93
|
-
bgGradient: 'linear(to-b, #C02048, #C02048)',
|
|
94
|
-
color: '#fff',
|
|
95
|
-
},
|
|
96
|
-
_disabled: {
|
|
97
|
-
color: '#ACACAC',
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
sizes: {
|
|
102
|
-
small: {
|
|
103
|
-
minWidth: '32px',
|
|
104
|
-
height: '32px',
|
|
105
|
-
fontSize: 2,
|
|
106
|
-
paddingX: '12px',
|
|
107
|
-
},
|
|
108
|
-
medium: {
|
|
109
|
-
minWidth: '48px',
|
|
110
|
-
height: '48px',
|
|
111
|
-
fontSize: 3,
|
|
112
|
-
paddingX: '16px',
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export default ButtonTheme;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Button as ChakraButton, ButtonProps } from '@chakra-ui/react';
|
|
4
|
-
import { Icon, TypeIconName } from '@bitrise/bitkit';
|
|
5
|
-
|
|
6
|
-
export interface Props {
|
|
7
|
-
as?: 'a' | 'button';
|
|
8
|
-
children: string;
|
|
9
|
-
className?: string;
|
|
10
|
-
href?: string;
|
|
11
|
-
isDisabled?: boolean;
|
|
12
|
-
leftIconName?: TypeIconName;
|
|
13
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
14
|
-
ref?: ButtonProps['itemRef'];
|
|
15
|
-
rightIconName?: TypeIconName;
|
|
16
|
-
size?: 'small' | 'medium';
|
|
17
|
-
sx?: ButtonProps['sx'];
|
|
18
|
-
target?: '_blank' | '_parent' | '_self' | '_top';
|
|
19
|
-
type?: ButtonProps['type'];
|
|
20
|
-
variant?: 'primary' | 'secondary' | 'tertiary' | 'dangerPrimary' | 'dangerSecondary';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const Button = React.forwardRef<HTMLButtonElement, Props>((props: Props, ref) => {
|
|
24
|
-
const { as, leftIconName, rightIconName, size, ...rest } = props;
|
|
25
|
-
const properties: ButtonProps = { as, size, ...rest };
|
|
26
|
-
if (leftIconName) {
|
|
27
|
-
properties.leftIcon = <Icon name={leftIconName} />;
|
|
28
|
-
}
|
|
29
|
-
if (rightIconName) {
|
|
30
|
-
properties.rightIcon = <Icon name={rightIconName} />;
|
|
31
|
-
}
|
|
32
|
-
if (leftIconName || rightIconName) {
|
|
33
|
-
properties.iconSpacing = size === 'medium' ? '10px' : '6px';
|
|
34
|
-
}
|
|
35
|
-
if (as === 'a') {
|
|
36
|
-
delete properties.type;
|
|
37
|
-
} else {
|
|
38
|
-
/* @ts-ignore */
|
|
39
|
-
delete properties.href;
|
|
40
|
-
/* @ts-ignore */
|
|
41
|
-
delete properties.target;
|
|
42
|
-
}
|
|
43
|
-
return <ChakraButton ref={ref} {...properties} />;
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
Button.defaultProps = {
|
|
47
|
-
as: 'button',
|
|
48
|
-
size: 'medium',
|
|
49
|
-
variant: 'primary',
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export default Button;
|